@dhis2/analytics 21.0.0-alpha.1 → 21.0.0
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 +2775 -0
- package/build/cjs/__demo__/Filter.stories.js +2 -2
- package/build/cjs/__demo__/FixedPeriodSelect.stories.js +2 -2
- package/build/cjs/__demo__/OpenFileDialog.stories.js +1 -1
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +17 -8
- package/build/cjs/__demo__/PivotTable.stories.js +2 -2
- package/build/cjs/api/analytics/AnalyticsBase.js +1 -1
- package/build/cjs/api/analytics/AnalyticsRequest.js +1 -1
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +3 -3
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +7 -7
- package/build/cjs/api/analytics/AnalyticsResponse.js +2 -2
- package/build/cjs/api/analytics/__tests__/AnalyticsAggregate.spec.js +1 -11
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +9 -9
- package/build/cjs/api/analytics/__tests__/AnalyticsRequestBase.spec.js +4 -4
- package/build/cjs/api/analytics/utils.js +1 -1
- package/build/cjs/api/dimensions.js +37 -37
- package/build/cjs/api/organisationUnits.js +5 -5
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +226 -0
- package/build/cjs/components/AboutAOUnit/styles/AboutAOUnit.style.js +13 -0
- package/build/cjs/components/DataDimension/DataTypesSelector.js +3 -3
- package/build/cjs/components/DataDimension/DetailSelector.js +2 -2
- package/build/cjs/components/DataDimension/GroupSelector.js +9 -9
- package/build/cjs/components/DataDimension/ItemSelector.js +19 -19
- package/build/cjs/components/DataDimension/MetricSelector.js +3 -3
- package/build/cjs/components/DataDimension/styles/DataTypesSelector.style.js +1 -1
- package/build/cjs/components/DataDimension/styles/DetailSelector.style.js +1 -1
- package/build/cjs/components/DataDimension/styles/GroupSelector.style.js +1 -1
- package/build/cjs/components/DataDimension/styles/MetricSelector.style.js +1 -1
- package/build/cjs/components/DimensionMenu.js +10 -10
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +2 -2
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +5 -5
- package/build/cjs/components/DimensionsPanel/List/DimensionLabel.js +2 -2
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +10 -10
- package/build/cjs/components/DimensionsPanel/List/styles/DimensionList.style.js +1 -1
- package/build/cjs/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +4 -4
- package/build/cjs/components/DynamicDimension/ItemSelector.js +8 -8
- package/build/cjs/components/DynamicDimension/styles/DynamicDimension.style.js +1 -1
- package/build/cjs/components/FileMenu/DeleteDialog.js +4 -4
- package/build/cjs/components/FileMenu/FileMenu.js +7 -7
- package/build/cjs/components/FileMenu/FileMenu.styles.js +1 -1
- package/build/cjs/components/FileMenu/GetLinkDialog.js +3 -3
- package/build/cjs/components/FileMenu/RenameDialog.js +4 -4
- package/build/cjs/components/FileMenu/SaveAsDialog.js +4 -4
- package/build/cjs/components/FileMenu/__tests__/DeleteDialog.spec.js +1 -1
- package/build/cjs/components/FileMenu/__tests__/RenameDialog.spec.js +1 -1
- package/build/cjs/components/FileMenu/__tests__/SaveAsDialog.spec.js +1 -1
- package/build/cjs/components/FileMenu/utils.js +3 -3
- package/build/cjs/components/Filter/Filter.js +1 -1
- package/build/cjs/components/Filter/styles/Filter.style.js +1 -1
- package/build/cjs/components/LegendKey/LegendKey.js +9 -9
- package/build/cjs/components/LegendKey/styles/LegendKey.style.js +1 -1
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +2 -2
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +21 -21
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.styles.js +1 -1
- package/build/cjs/components/OpenFileDialog/styles/CustomSelectOption.style.js +1 -1
- package/build/cjs/components/Options/VisualizationOptions.js +2 -2
- package/build/cjs/components/Options/styles/VisualizationOptions.style.js +10 -10
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +90 -20
- package/build/cjs/components/OrgUnitDimension/styles/OrgUnitDimension.style.js +2 -2
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +5 -5
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +6 -6
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +11 -11
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +2 -2
- package/build/cjs/components/PeriodDimension/styles/FixedPeriodSelect.style.js +1 -1
- package/build/cjs/components/PeriodDimension/styles/PeriodFilter.style.js +1 -1
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +49 -49
- package/build/cjs/components/PivotTable/PivotTable.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableCell.js +3 -3
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableContainer.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +4 -4
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +2 -2
- package/build/cjs/components/PivotTable/styles/PivotTable.style.js +3 -3
- package/build/cjs/components/TransferOption.js +7 -7
- package/build/cjs/components/styles/DimensionSelector.style.js +1 -1
- package/build/cjs/components/styles/TransferOption.style.js +1 -1
- package/build/cjs/index.js +28 -2
- package/build/cjs/locales/en/translations.json +26 -0
- package/build/cjs/modules/axis.js +1 -1
- package/build/cjs/modules/layoutUiRules/rules.js +1 -1
- package/build/cjs/modules/list.js +25 -0
- package/build/cjs/modules/ouIdHelper/index.js +2 -2
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +3 -3
- package/build/cjs/modules/pivotTable/measureText.js +1 -1
- package/build/cjs/modules/visTypes.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +2 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getAxisTitle.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +2 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +8 -19
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/title/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/title/scatter.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/xAxis/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/index.js +2 -2
- package/build/cjs/visualizations/config/generators/dhis/singleValue.js +5 -5
- package/build/cjs/visualizations/config/index.js +3 -3
- package/build/cjs/visualizations/store/adapters/dhis_dhis/index.js +1 -1
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +1 -1
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/twoCategory.js +1 -1
- package/build/cjs/visualizations/store/index.js +2 -2
- package/build/cjs/visualizations/util/__tests__/getFilterText.spec.js +1 -1
- package/build/cjs/visualizations/util/axisId.js +1 -1
- package/build/cjs/visualizations/util/getFilterText.js +4 -12
- package/build/es/__demo__/OpenFileDialog.stories.js +1 -1
- package/build/es/__demo__/OrgUnitDimension.stories.js +15 -6
- package/build/es/api/analytics/AnalyticsBase.js +1 -1
- package/build/es/api/analytics/AnalyticsRequest.js +1 -1
- package/build/es/api/analytics/AnalyticsRequestBase.js +3 -3
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +7 -7
- package/build/es/api/analytics/AnalyticsResponse.js +2 -2
- package/build/es/api/analytics/__tests__/AnalyticsAggregate.spec.js +1 -11
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +9 -9
- package/build/es/api/analytics/__tests__/AnalyticsRequestBase.spec.js +4 -4
- package/build/es/api/analytics/utils.js +1 -1
- package/build/es/api/dimensions.js +39 -39
- package/build/es/api/organisationUnits.js +5 -5
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +203 -0
- package/build/es/components/AboutAOUnit/styles/AboutAOUnit.style.js +4 -0
- package/build/es/components/DataDimension/DataTypesSelector.js +3 -3
- package/build/es/components/DataDimension/DetailSelector.js +2 -2
- package/build/es/components/DataDimension/GroupSelector.js +7 -7
- package/build/es/components/DataDimension/ItemSelector.js +17 -17
- package/build/es/components/DataDimension/MetricSelector.js +3 -3
- package/build/es/components/DataDimension/styles/DataTypesSelector.style.js +1 -1
- package/build/es/components/DataDimension/styles/DetailSelector.style.js +1 -1
- package/build/es/components/DataDimension/styles/GroupSelector.style.js +1 -1
- package/build/es/components/DataDimension/styles/MetricSelector.style.js +1 -1
- package/build/es/components/DimensionMenu.js +10 -10
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +3 -3
- package/build/es/components/DimensionsPanel/List/DimensionList.js +8 -8
- package/build/es/components/DimensionsPanel/List/styles/DimensionList.style.js +1 -1
- package/build/es/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
- package/build/es/components/DynamicDimension/DynamicDimension.js +4 -4
- package/build/es/components/DynamicDimension/ItemSelector.js +6 -6
- package/build/es/components/DynamicDimension/styles/DynamicDimension.style.js +1 -1
- package/build/es/components/FileMenu/DeleteDialog.js +1 -1
- package/build/es/components/FileMenu/FileMenu.js +4 -4
- package/build/es/components/FileMenu/FileMenu.styles.js +1 -1
- package/build/es/components/FileMenu/GetLinkDialog.js +2 -2
- package/build/es/components/FileMenu/RenameDialog.js +1 -1
- package/build/es/components/FileMenu/SaveAsDialog.js +1 -1
- package/build/es/components/FileMenu/__tests__/DeleteDialog.spec.js +1 -1
- package/build/es/components/FileMenu/__tests__/RenameDialog.spec.js +1 -1
- package/build/es/components/FileMenu/__tests__/SaveAsDialog.spec.js +1 -1
- package/build/es/components/FileMenu/utils.js +3 -3
- package/build/es/components/Filter/Filter.js +1 -1
- package/build/es/components/Filter/styles/Filter.style.js +1 -1
- package/build/es/components/LegendKey/LegendKey.js +9 -9
- package/build/es/components/LegendKey/styles/LegendKey.style.js +1 -1
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +2 -2
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +19 -19
- package/build/es/components/OpenFileDialog/OpenFileDialog.styles.js +1 -1
- package/build/es/components/OpenFileDialog/styles/CustomSelectOption.style.js +1 -1
- package/build/es/components/Options/styles/VisualizationOptions.style.js +10 -10
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +88 -19
- package/build/es/components/OrgUnitDimension/styles/OrgUnitDimension.style.js +2 -2
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +5 -5
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +8 -8
- package/build/es/components/PeriodDimension/PeriodTransfer.js +9 -9
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +2 -2
- package/build/es/components/PeriodDimension/styles/FixedPeriodSelect.style.js +1 -1
- package/build/es/components/PeriodDimension/styles/PeriodFilter.style.js +1 -1
- package/build/es/components/PeriodDimension/utils/fixedPeriods.js +49 -49
- package/build/es/components/PivotTable/PivotTableCell.js +3 -3
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +2 -2
- package/build/es/components/PivotTable/PivotTableContainer.js +2 -2
- package/build/es/components/PivotTable/PivotTableSortIcon.js +2 -2
- package/build/es/components/PivotTable/PivotTableTitleRow.js +2 -2
- package/build/es/components/PivotTable/styles/PivotTable.style.js +3 -3
- package/build/es/components/TransferOption.js +17 -17
- package/build/es/components/styles/DimensionSelector.style.js +1 -1
- package/build/es/components/styles/TransferOption.style.js +1 -1
- package/build/es/index.js +3 -2
- package/build/es/locales/en/translations.json +26 -0
- package/build/es/modules/axis.js +1 -1
- package/build/es/modules/layoutUiRules/rules.js +1 -1
- package/build/es/modules/list.js +13 -0
- package/build/es/modules/ouIdHelper/index.js +2 -2
- package/build/es/modules/pivotTable/PivotTableEngine.js +3 -3
- package/build/es/modules/pivotTable/measureText.js +1 -1
- package/build/es/modules/visTypes.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +2 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/getAxisTitle.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +8 -19
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/title/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/title/scatter.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/xAxis/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/index.js +2 -2
- package/build/es/visualizations/config/generators/dhis/singleValue.js +5 -5
- package/build/es/visualizations/config/index.js +3 -3
- package/build/es/visualizations/store/adapters/dhis_dhis/index.js +1 -1
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +1 -1
- package/build/es/visualizations/store/adapters/dhis_highcharts/twoCategory.js +1 -1
- package/build/es/visualizations/store/index.js +2 -2
- package/build/es/visualizations/util/__tests__/getFilterText.spec.js +1 -1
- package/build/es/visualizations/util/axisId.js +1 -1
- package/build/es/visualizations/util/getFilterText.js +5 -13
- package/package.json +4 -4
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimensionOld.js +0 -244
- package/build/es/components/OrgUnitDimension/OrgUnitDimensionOld.js +0 -220
|
@@ -7,12 +7,12 @@ exports.TransferOption = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _style = _interopRequireDefault(require("styled-jsx/style"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("@dhis2/prop-types"));
|
|
11
|
-
|
|
12
10
|
var _ui = require("@dhis2/ui");
|
|
13
11
|
|
|
14
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
13
|
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
|
|
18
18
|
var _TransferOption = _interopRequireDefault(require("./styles/TransferOption.style"));
|
|
@@ -47,17 +47,17 @@ const TransferOption = ({
|
|
|
47
47
|
value
|
|
48
48
|
}, event);
|
|
49
49
|
},
|
|
50
|
-
"data-test":
|
|
51
|
-
className:
|
|
50
|
+
"data-test": "".concat(dataTest, "-content"),
|
|
51
|
+
className: "jsx-".concat(_TransferOption.default.__hash) + " " + ((0, _classnames.default)('chip', {
|
|
52
52
|
highlighted,
|
|
53
53
|
disabled,
|
|
54
54
|
selected,
|
|
55
55
|
inactive: active !== undefined && !active
|
|
56
56
|
}) || "")
|
|
57
57
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
58
|
-
className:
|
|
58
|
+
className: "jsx-".concat(_TransferOption.default.__hash) + " " + "icon"
|
|
59
59
|
}, icon), /*#__PURE__*/_react.default.createElement("span", {
|
|
60
|
-
className:
|
|
60
|
+
className: "jsx-".concat(_TransferOption.default.__hash) + " " + "label"
|
|
61
61
|
}, label), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
62
62
|
id: _TransferOption.default.__hash
|
|
63
63
|
}, _TransferOption.default));
|
|
@@ -67,7 +67,7 @@ const TransferOption = ({
|
|
|
67
67
|
"data-test": dataTest,
|
|
68
68
|
className: "wrapper"
|
|
69
69
|
}, tooltipText ? /*#__PURE__*/_react.default.createElement(_ui.Tooltip, {
|
|
70
|
-
key:
|
|
70
|
+
key: "".concat(value),
|
|
71
71
|
content: tooltipText,
|
|
72
72
|
placement: 'top',
|
|
73
73
|
openDelay: 750,
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
10
|
-
const _defaultExport = [
|
|
10
|
+
const _defaultExport = [".filterContainer.jsx-2057111968{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:".concat(_ui.spacers.dp12, ";margin-top:").concat(_ui.spacers.dp8, ";}"), ".emptyList.jsx-2057111968{text-align:center;font-size:14px;line-height:16px;margin:".concat(_ui.spacers.dp24, " 0 0;color:").concat(_ui.colors.grey700, ";}"), ".rightHeader.jsx-2057111968{font-size:14px;font-weight:400;}", ".leftHeader.jsx-2057111968{padding:".concat(_ui.spacers.dp12, " ").concat(_ui.spacers.dp4, ";}"), ".info-container.jsx-2057111968{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:".concat(_ui.spacers.dp8, ";padding:").concat(_ui.spacers.dp8, ";background-color:").concat(_ui.colors.grey200, ";border-radius:3px;}"), ".info-text.jsx-2057111968{padding-left:".concat(_ui.spacers.dp8, ";color:").concat(_ui.colors.grey900, ";font-size:12px;line-height:16px;}")];
|
|
11
11
|
_defaultExport.__hash = "2057111968";
|
|
12
12
|
var _default = _defaultExport;
|
|
13
13
|
exports.default = _default;
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
10
|
-
const _defaultExport = [
|
|
10
|
+
const _defaultExport = [".wrapper.jsx-3199850788:last-child{margin-bottom:".concat(_ui.spacers.dp4, ";}"), ".chip.jsx-3199850788{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;background:".concat(_ui.colors.grey200, ";font-size:14px;line-height:16px;padding:2px ").concat(_ui.spacers.dp8, " 2px ").concat(_ui.spacers.dp4, ";margin:").concat(_ui.spacers.dp4, " ").concat(_ui.spacers.dp8, " 0 ").concat(_ui.spacers.dp8, ";border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"), ".chip.jsx-3199850788:hover{background:".concat(_ui.colors.grey300, ";}"), ".selected.jsx-3199850788{background:".concat(_ui.theme.secondary100, ";color:").concat(_ui.theme.secondary900, ";}"), ".selected.jsx-3199850788 .icon path{fill:".concat(_ui.theme.secondary700, ";}"), ".selected.jsx-3199850788:hover{background:#c9edeb;}", ".highlighted.jsx-3199850788,.highlighted.jsx-3199850788:hover{background:".concat(_ui.theme.secondary800, ";color:").concat(_ui.colors.white, ";}"), ".highlighted.jsx-3199850788 .icon path{fill:".concat(_ui.colors.white, ";}"), ".disabled.jsx-3199850788{opacity:0.3;cursor:not-allowed;}", ".inactive.jsx-3199850788{opacity:0.3;}", ".icon.jsx-3199850788,.label.jsx-3199850788{line-height:18px;}", ".icon.jsx-3199850788{margin-right:".concat(_ui.spacers.dp4, ";display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:text-bottom;padding-top:1px;}"), ".label.jsx-3199850788{font-size:14px;}"];
|
|
11
11
|
_defaultExport.__hash = "3199850788";
|
|
12
12
|
var _default = _defaultExport;
|
|
13
13
|
exports.default = _default;
|
package/build/cjs/index.js
CHANGED
|
@@ -87,6 +87,12 @@ Object.defineProperty(exports, "LegendKey", {
|
|
|
87
87
|
return _LegendKey.default;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "AboutAOUnit", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _AboutAOUnit.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
90
96
|
Object.defineProperty(exports, "Analytics", {
|
|
91
97
|
enumerable: true,
|
|
92
98
|
get: function () {
|
|
@@ -213,6 +219,24 @@ Object.defineProperty(exports, "ouIdHelper", {
|
|
|
213
219
|
return _ouIdHelper.ouIdHelper;
|
|
214
220
|
}
|
|
215
221
|
});
|
|
222
|
+
Object.defineProperty(exports, "USER_ORG_UNIT", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () {
|
|
225
|
+
return _ouIdHelper.USER_ORG_UNIT;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "USER_ORG_UNIT_CHILDREN", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _ouIdHelper.USER_ORG_UNIT_CHILDREN;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "USER_ORG_UNIT_GRANDCHILDREN", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () {
|
|
237
|
+
return _ouIdHelper.USER_ORG_UNIT_GRANDCHILDREN;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
216
240
|
Object.defineProperty(exports, "convertOuLevelsToUids", {
|
|
217
241
|
enumerable: true,
|
|
218
242
|
get: function () {
|
|
@@ -1142,6 +1166,8 @@ var _VisTypeIcon = _interopRequireDefault(require("./components/VisTypeIcon"));
|
|
|
1142
1166
|
|
|
1143
1167
|
var _LegendKey = _interopRequireDefault(require("./components/LegendKey/LegendKey"));
|
|
1144
1168
|
|
|
1169
|
+
var _AboutAOUnit = _interopRequireDefault(require("./components/AboutAOUnit/AboutAOUnit"));
|
|
1170
|
+
|
|
1145
1171
|
var _Analytics = _interopRequireDefault(require("./api/analytics/Analytics"));
|
|
1146
1172
|
|
|
1147
1173
|
var _dimensions = require("./api/dimensions");
|
|
@@ -1254,8 +1280,8 @@ var _fixedPeriods = require("./components/PeriodDimension/utils/fixedPeriods");
|
|
|
1254
1280
|
|
|
1255
1281
|
var _VisualizationOptions = _interopRequireDefault(require("./components/Options/VisualizationOptions"));
|
|
1256
1282
|
|
|
1257
|
-
function _getRequireWildcardCache(
|
|
1283
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
1258
1284
|
|
|
1259
|
-
function _interopRequireWildcard(obj
|
|
1285
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
1260
1286
|
|
|
1261
1287
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"view only": "view only",
|
|
3
|
+
"view and edit": "view and edit",
|
|
4
|
+
"all users ({{accessLevel}})": "all users ({{accessLevel}})",
|
|
5
|
+
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
6
|
+
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "Shared with {{commaSeparatedListOfUsersAndGroups}}",
|
|
7
|
+
"Not shared with any users or groups": "Not shared with any users or groups",
|
|
8
|
+
"About this visualization": "About this visualization",
|
|
9
|
+
"No description": "No description",
|
|
10
|
+
"Last updated {{time}}": "Last updated {{time}}",
|
|
11
|
+
"Created {{time}} by {{author}}": "Created {{time}} by {{author}}",
|
|
12
|
+
"Viewed {{count}} times": "Viewed 1 time",
|
|
13
|
+
"Viewed {{count}} times_plural": "Viewed {{count}} times",
|
|
14
|
+
"Notifications": "Notifications",
|
|
15
|
+
"You're subscribed and getting updates about new interpretations.": "You're subscribed and getting updates about new interpretations.",
|
|
16
|
+
"Unsubscribe": "Unsubscribe",
|
|
17
|
+
"Subscribe to get updates about new interpretations.": "Subscribe to get updates about new interpretations.",
|
|
18
|
+
"Subscribe": "Subscribe",
|
|
2
19
|
"Data Type": "Data Type",
|
|
3
20
|
"All types": "All types",
|
|
4
21
|
"Totals only": "Totals only",
|
|
@@ -101,11 +118,20 @@
|
|
|
101
118
|
"Options": "Options",
|
|
102
119
|
"Hide": "Hide",
|
|
103
120
|
"Update": "Update",
|
|
121
|
+
"{{count}} org units": "{{count}} org unit",
|
|
122
|
+
"{{count}} org units_plural": "{{count}} org units",
|
|
123
|
+
"{{count}} levels": "{{count}} level",
|
|
124
|
+
"{{count}} levels_plural": "{{count}} levels",
|
|
125
|
+
"{{count}} groups": "{{count}} group",
|
|
126
|
+
"{{count}} groups_plural": "{{count}} groups",
|
|
127
|
+
"Selected: {{commaSeparatedListOfOrganisationUnits}}": "Selected: {{commaSeparatedListOfOrganisationUnits}}",
|
|
128
|
+
"Nothing selected": "Nothing selected",
|
|
104
129
|
"User organisation unit": "User organisation unit",
|
|
105
130
|
"User sub-units": "User sub-units",
|
|
106
131
|
"User sub-x2-units": "User sub-x2-units",
|
|
107
132
|
"Select a level": "Select a level",
|
|
108
133
|
"Select a group": "Select a group",
|
|
134
|
+
"Deselect all": "Deselect all",
|
|
109
135
|
"Period type": "Period type",
|
|
110
136
|
"Year": "Year",
|
|
111
137
|
"Select year": "Select year",
|
|
@@ -44,7 +44,7 @@ const getAxisNameByLayoutType = (axisId, layoutType) => {
|
|
|
44
44
|
const name = getAxisNamesByLayoutType(layoutType)[axisId];
|
|
45
45
|
|
|
46
46
|
if (!name) {
|
|
47
|
-
throw new Error(
|
|
47
|
+
throw new Error("".concat(axisId, " is not a valid axis id"));
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
return name;
|
|
@@ -111,7 +111,7 @@ const getRulesByVisType = visType => {
|
|
|
111
111
|
const rules = visTypeToRules[visType];
|
|
112
112
|
|
|
113
113
|
if (!rules) {
|
|
114
|
-
throw new Error(
|
|
114
|
+
throw new Error("".concat(visType, " is not a known visualization type"));
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
return rules;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatList = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = _interopRequireDefault(require("../locales/index.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const formatList = items => {
|
|
13
|
+
// Wrap Intl.ListFormat in try/catch as DHIS2 locales are not always ISO 639 compliant
|
|
14
|
+
try {
|
|
15
|
+
const formatter = new Intl.ListFormat(_index.default.language, {
|
|
16
|
+
style: 'long',
|
|
17
|
+
type: 'conjunction'
|
|
18
|
+
});
|
|
19
|
+
return formatter.format(items);
|
|
20
|
+
} catch (error) {
|
|
21
|
+
return items.join(', ');
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.formatList = formatList;
|
|
@@ -24,8 +24,8 @@ const stripGroupPrefix = id => hasGroupPrefix(id) ? id.substr(GROUP_ID_PREFIX.le
|
|
|
24
24
|
const removePrefix = id => stripGroupPrefix(stripLevelPrefix(id));
|
|
25
25
|
|
|
26
26
|
const ouIdHelper = Object.freeze({
|
|
27
|
-
addLevelPrefix: id =>
|
|
28
|
-
addGroupPrefix: id =>
|
|
27
|
+
addLevelPrefix: id => "".concat(LEVEL_ID_PREFIX, "-").concat(removePrefix(id)),
|
|
28
|
+
addGroupPrefix: id => "".concat(GROUP_ID_PREFIX, "-").concat(removePrefix(id)),
|
|
29
29
|
removePrefix,
|
|
30
30
|
hasGroupPrefix,
|
|
31
31
|
hasLevelPrefix
|
|
@@ -369,7 +369,7 @@ class PivotTableEngine {
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
if (rowLevel === lastRowLevel && this.dimensionLookup.rows[lastRowLevel] && columnLevel === lastColumnLevel && this.dimensionLookup.columns[lastColumnLevel]) {
|
|
372
|
-
return
|
|
372
|
+
return "".concat(this.dimensionLookup.rows[lastRowLevel].meta.name, " / ").concat(this.dimensionLookup.columns[lastColumnLevel].meta.name);
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
if (lastRowLevel === -1) {
|
|
@@ -963,12 +963,12 @@ class PivotTableEngine {
|
|
|
963
963
|
|
|
964
964
|
sort(column, order) {
|
|
965
965
|
if (order !== _pivotTableConstants.SORT_ORDER_ASCENDING && order !== _pivotTableConstants.SORT_ORDER_DESCENDING) {
|
|
966
|
-
console.warn(
|
|
966
|
+
console.warn("Invalid sort order ".concat(order));
|
|
967
967
|
return;
|
|
968
968
|
}
|
|
969
969
|
|
|
970
970
|
if (!this.isSortable(column)) {
|
|
971
|
-
console.warn(
|
|
971
|
+
console.warn("Invalid sort column ".concat(column));
|
|
972
972
|
return;
|
|
973
973
|
}
|
|
974
974
|
|
|
@@ -102,7 +102,7 @@ const getDisplayNameByVisType = visType => {
|
|
|
102
102
|
const displayName = visTypeDisplayNames[visType];
|
|
103
103
|
|
|
104
104
|
if (!displayName) {
|
|
105
|
-
throw new Error(
|
|
105
|
+
throw new Error("".concat(visType, " is not a valid visualization type"));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
return displayName;
|
|
@@ -97,7 +97,7 @@ function getTwoCategoryTrendLines(layout, series, isStacked) {
|
|
|
97
97
|
});
|
|
98
98
|
} else {
|
|
99
99
|
series.forEach(seriesObj => {
|
|
100
|
-
const trendlineSerieId =
|
|
100
|
+
const trendlineSerieId = "trendline-".concat(seriesObj.id);
|
|
101
101
|
newSeries.push(seriesObj);
|
|
102
102
|
|
|
103
103
|
if (!seriesObj.custom.isTwoCategoryFakeSerie) {
|
|
@@ -34,7 +34,7 @@ const getPlotLineLabelStyle = fontStyle => ({
|
|
|
34
34
|
y: -7,
|
|
35
35
|
style: {
|
|
36
36
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
37
|
-
fontSize:
|
|
37
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
38
38
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
39
39
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
40
40
|
}
|
|
@@ -128,7 +128,7 @@ const getLabels = axis => {
|
|
|
128
128
|
return {
|
|
129
129
|
style: {
|
|
130
130
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
131
|
-
fontSize:
|
|
131
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
132
132
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
133
133
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
134
134
|
},
|
|
@@ -20,7 +20,7 @@ const getTitleStyle = (fontStyle, titleType, visType) => fontStyle ? {
|
|
|
20
20
|
margin: 15,
|
|
21
21
|
style: {
|
|
22
22
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
23
|
-
fontSize:
|
|
23
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
24
24
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
25
25
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
26
26
|
}
|
|
@@ -47,9 +47,9 @@ var _xAxis = _interopRequireDefault(require("./xAxis"));
|
|
|
47
47
|
|
|
48
48
|
var _yAxis = _interopRequireDefault(require("./yAxis"));
|
|
49
49
|
|
|
50
|
-
function _getRequireWildcardCache(
|
|
50
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
51
51
|
|
|
52
|
-
function _interopRequireWildcard(obj
|
|
52
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53
53
|
|
|
54
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
55
55
|
|
|
@@ -35,7 +35,7 @@ function getItemStyle(fontStyle, dashboard) {
|
|
|
35
35
|
fontWeight: 'normal'
|
|
36
36
|
}, dashboard ? DASHBOARD_ITEM_STYLE : {
|
|
37
37
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
38
|
-
fontSize:
|
|
38
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
39
39
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
40
40
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
41
41
|
})
|
|
@@ -86,33 +86,22 @@ const formatLabel = ({
|
|
|
86
86
|
|
|
87
87
|
if ((!seriesId || seriesId.startsWith('trendline')) && seriesType === (0, _type.default)(_visTypes.VIS_TYPE_LINE).type) {
|
|
88
88
|
// trendline
|
|
89
|
-
result.push(
|
|
90
|
-
result.push(
|
|
89
|
+
result.push("<span style=\"height: ".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 6.5, "px; width: ").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; background-color: ").concat(seriesColor, "; display: inline-block;\"></span>"));
|
|
90
|
+
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
91
91
|
} else if (legendSet !== null && legendSet !== void 0 && (_legendSet$legends = legendSet.legends) !== null && _legendSet$legends !== void 0 && _legendSet$legends.length && (0, _visTypes.isLegendSetType)(visType) && seriesType !== (0, _type.default)(_visTypes.VIS_TYPE_LINE).type) {
|
|
92
92
|
// item with legend set
|
|
93
|
-
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push(
|
|
94
|
-
|
|
95
|
-
</svg>`));
|
|
96
|
-
result.push(`<span style="margin-left: 8px" class="data-test-series-key-item-name">${seriesName}</span>`);
|
|
93
|
+
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" version=\"1.1\" style=\"margin-right:-5px; z-index: ").concat(legendSet.legends.length - index, "\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(legend.color, "\"></circle>\n </svg>")));
|
|
94
|
+
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
97
95
|
} else {
|
|
98
96
|
// regular item (not a trendline, no applied legend set)
|
|
99
97
|
if ((seriesColor === null || seriesColor === void 0 ? void 0 : seriesColor.patternIndex) !== undefined) {
|
|
100
98
|
const pattern = _colorSets.colorSets[_colorSets.COLOR_SET_PATTERNS].patterns[seriesColor.patternIndex];
|
|
101
|
-
result.push(
|
|
102
|
-
<defs>
|
|
103
|
-
<pattern id="pattern${seriesColor.patternIndex}" patternUnits="userSpaceOnUse" width="${pattern.width}" height="${pattern.height}">
|
|
104
|
-
<path stroke="${pattern.color}" d="${pattern.path}"/>
|
|
105
|
-
</pattern>
|
|
106
|
-
</defs>
|
|
107
|
-
<circle cx="${fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2}" cy="${fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2}" r="${fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2}" fill="url(#pattern${seriesColor.patternIndex})"/>
|
|
108
|
-
</svg>`);
|
|
99
|
+
result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"height: ".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; width: ").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px; display: inline-block; margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <defs>\n <pattern id=\"pattern").concat(seriesColor.patternIndex, "\" patternUnits=\"userSpaceOnUse\" width=\"").concat(pattern.width, "\" height=\"").concat(pattern.height, "\">\n <path stroke=\"").concat(pattern.color, "\" d=\"").concat(pattern.path, "\"/>\n </pattern>\n </defs>\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"url(#pattern").concat(seriesColor.patternIndex, ")\"/>\n </svg>"));
|
|
109
100
|
} else {
|
|
110
|
-
result.push(
|
|
111
|
-
<circle cx="${fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2}" cy="${fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2}" r="${fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2}" fill="${seriesColor}"></circle>
|
|
112
|
-
</svg>`);
|
|
101
|
+
result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" version=\"1.1\" style=\"margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(seriesColor, "\"></circle>\n </svg>"));
|
|
113
102
|
}
|
|
114
103
|
|
|
115
|
-
result.push(
|
|
104
|
+
result.push("<span class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
116
105
|
}
|
|
117
106
|
|
|
118
107
|
result.push('</div>');
|
|
@@ -43,7 +43,7 @@ exports.applyLegendSet = applyLegendSet;
|
|
|
43
43
|
|
|
44
44
|
const getLegendSetTooltip = () => ({
|
|
45
45
|
pointFormatter: function () {
|
|
46
|
-
return
|
|
46
|
+
return "<span style=\"color:".concat(this.color, "\">\u25CF</span> ").concat(this.series.name, ": <b>").concat(this.y, "</b><br>") + (this.legend ? "".concat(this.legendSet, ": <b>").concat(this.legend, "</b>") : "".concat(_index.default.t('No legend for this series')));
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -41,7 +41,7 @@ var _default = ({
|
|
|
41
41
|
}));
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
return
|
|
44
|
+
return "".concat(labels.map(label => "<b>".concat(label, "</b><br>")).join('')).concat(yAxisName, ": ").concat(y, "<br>").concat(xAxisName, ": ").concat(x);
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
switch (visType) {
|
|
@@ -73,7 +73,7 @@ function _default(series, layout, metaData, dashboard) {
|
|
|
73
73
|
style: {
|
|
74
74
|
// DHIS2-578: dynamically truncate subtitle when it's taking more than 1 line
|
|
75
75
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
76
|
-
fontSize:
|
|
76
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
77
77
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
78
78
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal',
|
|
79
79
|
whiteSpace: 'nowrap',
|
|
@@ -77,7 +77,7 @@ function _default(layout, metaData, dashboard) {
|
|
|
77
77
|
align: (0, _getTextAlignOption.getTextAlignOption)(fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_ALIGN], _fontStyle.FONT_STYLE_VISUALIZATION_TITLE, (0, _visTypes.isVerticalType)(layout.type)),
|
|
78
78
|
style: {
|
|
79
79
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
80
|
-
fontSize:
|
|
80
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
81
81
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
82
82
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal',
|
|
83
83
|
whiteSpace: 'nowrap',
|
|
@@ -14,6 +14,6 @@ function _default(layout, metaData, dashboard) {
|
|
|
14
14
|
|
|
15
15
|
if ((_layout$rows = layout.rows) !== null && _layout$rows !== void 0 && _layout$rows.length && (_layout$columns = layout.columns) !== null && _layout$columns !== void 0 && _layout$columns.length && !dashboard) {
|
|
16
16
|
const columns = (0, _getFilterText.default)(layout.columns, metaData).split(', ');
|
|
17
|
-
return
|
|
17
|
+
return "".concat((0, _getFilterText.default)(layout.rows, metaData), ": ").concat(columns[0], " - ").concat(columns[1]);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -44,7 +44,7 @@ const getLabels = axis => {
|
|
|
44
44
|
return {
|
|
45
45
|
style: {
|
|
46
46
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
47
|
-
fontSize:
|
|
47
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
48
48
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
49
49
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
50
50
|
},
|
|
@@ -68,12 +68,12 @@ function getPlotLine(regressionLine = {}, defaultLabel) {
|
|
|
68
68
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR] || '#000',
|
|
69
69
|
...(label && {
|
|
70
70
|
label: {
|
|
71
|
-
text:
|
|
71
|
+
text: "".concat(label, ": ").concat(value),
|
|
72
72
|
verticalAlign,
|
|
73
73
|
y,
|
|
74
74
|
style: {
|
|
75
75
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
76
|
-
fontSize:
|
|
76
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
77
77
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
78
78
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
79
79
|
}
|
|
@@ -90,7 +90,7 @@ const getLabels = axis => {
|
|
|
90
90
|
y: parseInt(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], 10) + 7,
|
|
91
91
|
style: {
|
|
92
92
|
color: fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR],
|
|
93
|
-
fontSize:
|
|
93
|
+
fontSize: "".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
94
94
|
fontWeight: fontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal',
|
|
95
95
|
fontStyle: fontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
96
96
|
}
|
|
@@ -73,9 +73,9 @@ function getDefault(layout, series, extraOptions) {
|
|
|
73
73
|
var _axis$title;
|
|
74
74
|
|
|
75
75
|
rl.title = { ...rl.title,
|
|
76
|
-
text:
|
|
76
|
+
text: "".concat(rl.title.text, " - ").concat(((_axis$title = axis.title) === null || _axis$title === void 0 ? void 0 : _axis$title.text) || _locales.default.t('Axis {{axisId}}', {
|
|
77
77
|
axisId: axis.index + 1
|
|
78
|
-
})
|
|
78
|
+
}))
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -24,7 +24,7 @@ const generateValueSVG = ({
|
|
|
24
24
|
const textSize = 300;
|
|
25
25
|
const svgValue = document.createElementNS(svgNS, 'svg');
|
|
26
26
|
svgValue.setAttribute('xmlns', svgNS);
|
|
27
|
-
svgValue.setAttribute('viewBox',
|
|
27
|
+
svgValue.setAttribute('viewBox', "0 -".concat(textSize + 50, " ").concat(textSize * 0.75 * formattedValue.length, " ").concat(textSize + 200));
|
|
28
28
|
|
|
29
29
|
if (y) {
|
|
30
30
|
svgValue.setAttribute('y', y);
|
|
@@ -52,7 +52,7 @@ const generateValueSVG = ({
|
|
|
52
52
|
if (subText) {
|
|
53
53
|
const svgSubText = document.createElementNS(svgNS, 'svg');
|
|
54
54
|
const subTextSize = 40;
|
|
55
|
-
svgSubText.setAttribute('viewBox',
|
|
55
|
+
svgSubText.setAttribute('viewBox', "0 -50 ".concat(textSize * 0.75 * formattedValue.length, " ").concat(textSize + 200));
|
|
56
56
|
|
|
57
57
|
if (y) {
|
|
58
58
|
svgSubText.setAttribute('y', y);
|
|
@@ -146,7 +146,7 @@ const generateDVItem = (config, {
|
|
|
146
146
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
147
147
|
const svg = document.createElementNS(svgNS, 'svg');
|
|
148
148
|
svg.setAttribute('xmlns', svgNS);
|
|
149
|
-
svg.setAttribute('viewBox',
|
|
149
|
+
svg.setAttribute('viewBox', "0 0 ".concat(width, " ").concat(height));
|
|
150
150
|
svg.setAttribute('width', '100%');
|
|
151
151
|
svg.setAttribute('height', '100%');
|
|
152
152
|
svg.setAttribute('data-test', 'visualization-container');
|
|
@@ -155,7 +155,7 @@ const generateDVItem = (config, {
|
|
|
155
155
|
title.setAttribute('x', getXFromTextAlign(titleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_ALIGN]));
|
|
156
156
|
title.setAttribute('y', 28);
|
|
157
157
|
title.setAttribute('text-anchor', getTextAnchorFromTextAlign(titleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_ALIGN]));
|
|
158
|
-
title.setAttribute('font-size',
|
|
158
|
+
title.setAttribute('font-size', "".concat(titleFontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"));
|
|
159
159
|
title.setAttribute('font-weight', titleFontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal');
|
|
160
160
|
title.setAttribute('font-style', titleFontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal');
|
|
161
161
|
title.setAttribute('fill', titleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR]);
|
|
@@ -172,7 +172,7 @@ const generateDVItem = (config, {
|
|
|
172
172
|
subtitle.setAttribute('y', 28);
|
|
173
173
|
subtitle.setAttribute('dy', 22);
|
|
174
174
|
subtitle.setAttribute('text-anchor', getTextAnchorFromTextAlign(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_ALIGN]));
|
|
175
|
-
subtitle.setAttribute('font-size',
|
|
175
|
+
subtitle.setAttribute('font-size', "".concat(subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "px"));
|
|
176
176
|
subtitle.setAttribute('font-weight', subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_BOLD] ? _fontStyle.FONT_STYLE_OPTION_BOLD : 'normal');
|
|
177
177
|
subtitle.setAttribute('font-style', subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_ITALIC] ? _fontStyle.FONT_STYLE_OPTION_ITALIC : 'normal');
|
|
178
178
|
subtitle.setAttribute('fill', subtitleFontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR]);
|
|
@@ -34,15 +34,15 @@ function _default({
|
|
|
34
34
|
const _generator = _generators.default[outputFormat];
|
|
35
35
|
|
|
36
36
|
if (_validator === _validators.default.noValidation) {
|
|
37
|
-
onWarning(
|
|
37
|
+
onWarning("No validation implementation for config input format \"".concat(inputFormat, "\""));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
if (!_adapter) {
|
|
41
|
-
onError(
|
|
41
|
+
onError("No config tranformation implementation for format \"".concat(inputFormat, "\" to format \"").concat(outputFormat, "\""));
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if (!_generator) {
|
|
45
|
-
onError(
|
|
45
|
+
onError("No visualization implementation for format ".concat(outputFormat));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const DEFAULT_EXTRA_OPTIONS = {
|
|
@@ -41,7 +41,7 @@ function getDefault(acc, seriesIds, categoryIds, idValueMap, metaData) {
|
|
|
41
41
|
seriesIds.forEach(seriesId => {
|
|
42
42
|
const serieData = [];
|
|
43
43
|
categoryIds.forEach(categoryId => {
|
|
44
|
-
const value = idValueMap.get(
|
|
44
|
+
const value = idValueMap.get("".concat(seriesId, "-").concat(categoryId)); // DHIS2-1261: 0 is a valid value
|
|
45
45
|
// undefined value means the key was not found within the rows
|
|
46
46
|
// in that case null is returned as value in the serie
|
|
47
47
|
|
|
@@ -56,7 +56,7 @@ function getDefault(acc, series, categories, idValueMap, metaData) {
|
|
|
56
56
|
series[0].forEach(serieItemId => {
|
|
57
57
|
const serieData = [];
|
|
58
58
|
categories[0].forEach(categoryItemId => {
|
|
59
|
-
const value = idValueMap.get(
|
|
59
|
+
const value = idValueMap.get("".concat(serieItemId, "-").concat(categoryItemId)); // DHIS2-1261: 0 is a valid value
|
|
60
60
|
// undefined value means the key was not found within the rows
|
|
61
61
|
// in that case null is returned as value in the serie
|
|
62
62
|
// this is to keep the correct indexes for the values within the serie array
|
|
@@ -16,7 +16,7 @@ function _default(acc, series, categories, idValueMap, metaData) {
|
|
|
16
16
|
categories[0].forEach(category1ItemId => {
|
|
17
17
|
const groupData = [];
|
|
18
18
|
categories[1].forEach(category2ItemId => {
|
|
19
|
-
const value = idValueMap.get(
|
|
19
|
+
const value = idValueMap.get("".concat(seriesItemId, "-").concat(category1ItemId, "-").concat(category2ItemId));
|
|
20
20
|
groupData.push(value === undefined ? null : parseFloat(value));
|
|
21
21
|
});
|
|
22
22
|
groupedData.push(groupData);
|