@dhis2/analytics 23.8.5 → 23.8.6
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 +9 -0
- package/build/cjs/__demo__/FileMenu.stories.js +4 -2
- 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 +4 -2
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +2 -2
- package/build/cjs/__demo__/PivotTable.stories.js +206 -153
- package/build/cjs/api/__tests__/dimensions.spec.js +2 -1
- package/build/cjs/api/analytics/Analytics.js +8 -7
- package/build/cjs/api/analytics/AnalyticsBase.js +58 -43
- package/build/cjs/api/analytics/AnalyticsRequest.js +2 -1
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +22 -17
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
- package/build/cjs/api/analytics/AnalyticsResponseHeader.js +7 -5
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
- package/build/cjs/api/dimensions.js +150 -120
- package/build/cjs/api/organisationUnits.js +36 -24
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +19 -12
- package/build/cjs/components/CachedDataQueryProvider.js +8 -7
- package/build/cjs/components/DataDimension/DataDimension.js +8 -6
- package/build/cjs/components/DataDimension/DataTypeSelector.js +6 -5
- package/build/cjs/components/DataDimension/DetailSelector.js +6 -5
- package/build/cjs/components/DataDimension/GroupSelector.js +12 -11
- package/build/cjs/components/DataDimension/ItemSelector.js +87 -73
- package/build/cjs/components/DataDimension/MetricSelector.js +6 -5
- package/build/cjs/components/DimensionMenu.js +14 -13
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/DimensionLabel.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +10 -7
- package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -8
- package/build/cjs/components/DynamicDimension/ItemSelector.js +58 -44
- package/build/cjs/components/FileMenu/DeleteDialog.js +16 -12
- package/build/cjs/components/FileMenu/FileMenu.js +19 -18
- package/build/cjs/components/FileMenu/GetLinkDialog.js +6 -5
- package/build/cjs/components/FileMenu/RenameDialog.js +38 -25
- package/build/cjs/components/FileMenu/SaveAsDialog.js +21 -14
- package/build/cjs/components/FileMenu/utils.js +1 -1
- package/build/cjs/components/Filter/Filter.js +22 -19
- package/build/cjs/components/LegendKey/LegendKey.js +4 -3
- package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +26 -20
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +26 -23
- package/build/cjs/components/OpenFileDialog/DateField.js +4 -3
- package/build/cjs/components/OpenFileDialog/FileList.js +22 -19
- package/build/cjs/components/OpenFileDialog/NameFilter.js +21 -15
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +43 -35
- package/build/cjs/components/OpenFileDialog/PaginationControls.js +28 -22
- package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +37 -28
- package/build/cjs/components/OpenFileDialog/utils.js +1 -1
- package/build/cjs/components/Options/VisualizationOptions.js +46 -36
- package/build/cjs/components/Options/styles/VisualizationOptions.style.js +1 -1
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +50 -34
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +22 -15
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +19 -14
- package/build/cjs/components/PeriodDimension/PeriodDimension.js +8 -6
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +24 -19
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +30 -24
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +1 -1
- package/build/cjs/components/PeriodDimension/utils/index.js +6 -2
- package/build/cjs/components/PeriodDimension/utils/relativePeriods.js +1 -1
- package/build/cjs/components/PivotTable/PivotTable.js +10 -9
- package/build/cjs/components/PivotTable/PivotTableBody.js +29 -20
- package/build/cjs/components/PivotTable/PivotTableCell.js +9 -8
- package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +17 -14
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
- package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +29 -22
- package/build/cjs/components/PivotTable/PivotTableContainer.js +6 -5
- package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -2
- package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +7 -6
- package/build/cjs/components/PivotTable/PivotTableHead.js +16 -13
- package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +9 -8
- package/build/cjs/components/PivotTable/PivotTableRow.js +27 -20
- package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +9 -8
- package/build/cjs/components/PivotTable/PivotTableTitleRows.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +8 -7
- package/build/cjs/components/PivotTable/styles/PivotTable.style.js +1 -1
- package/build/cjs/components/TransferOption.js +15 -13
- package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +25 -18
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +9 -8
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
- package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
- package/build/cjs/components/VisTypeIcon.js +6 -5
- package/build/cjs/index.js +464 -464
- package/build/cjs/locales/en/translations.json +1 -1
- package/build/cjs/locales/nl/translations.json +30 -30
- package/build/cjs/modules/axis.js +1 -1
- package/build/cjs/modules/dataSets.js +1 -1
- package/build/cjs/modules/dataTypes.js +2 -2
- package/build/cjs/modules/dimensionSelectorHelper.js +1 -1
- package/build/cjs/modules/fontStyle.js +1 -1
- package/build/cjs/modules/layout/axis.js +1 -1
- package/build/cjs/modules/layout/dimension.js +1 -1
- package/build/cjs/modules/layout/dimensionCreate.js +3 -1
- package/build/cjs/modules/layout/dimensionIsValid.js +5 -3
- package/build/cjs/modules/layout/item.js +1 -1
- package/build/cjs/modules/layout/testResources.js +1 -1
- package/build/cjs/modules/layoutTypes.js +1 -1
- package/build/cjs/modules/layoutUiRules/index.js +20 -20
- package/build/cjs/modules/layoutUiRules/rules.js +1 -1
- package/build/cjs/modules/layoutUiRules/rulesHelper.js +2 -1
- package/build/cjs/modules/layoutUiRules/rulesUtils.js +1 -1
- package/build/cjs/modules/legends.js +1 -1
- package/build/cjs/modules/outliers/index.js +4 -2
- package/build/cjs/modules/outliers/iqr.js +8 -5
- package/build/cjs/modules/outliers/modZScore.js +15 -7
- package/build/cjs/modules/outliers/zScore.js +5 -4
- package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +17 -12
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +57 -44
- package/build/cjs/modules/pivotTable/clipAxis.js +8 -7
- package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +10 -9
- package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +9 -8
- package/build/cjs/modules/pivotTable/measureText.js +10 -7
- package/build/cjs/modules/pivotTable/pivotTableConstants.js +1 -1
- package/build/cjs/modules/pivotTable/useParentSize.js +2 -1
- package/build/cjs/modules/pivotTable/useScrollPosition.js +2 -1
- package/build/cjs/modules/pivotTable/useTableClipping.js +7 -6
- package/build/cjs/modules/predefinedDimensions.js +2 -2
- package/build/cjs/modules/relativeItems/index.js +4 -1
- package/build/cjs/modules/valueTypes.js +1 -1
- package/build/cjs/modules/visTypes.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_dhis/index.js +7 -6
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +9 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +5 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +9 -5
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +11 -9
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +24 -20
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
- 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 -1
- package/build/cjs/visualizations/config/generators/dhis/singleValue.js +28 -24
- package/build/cjs/visualizations/config/generators/highcharts/index.js +5 -1
- package/build/cjs/visualizations/config/index.js +13 -11
- package/build/cjs/visualizations/config/validators/dhis/index.js +4 -3
- package/build/cjs/visualizations/index.js +6 -2
- package/build/cjs/visualizations/store/adapters/dhis_dhis/index.js +7 -6
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
- package/build/cjs/visualizations/store/index.js +18 -15
- package/build/cjs/visualizations/store/validators/dhis/index.js +7 -5
- package/build/cjs/visualizations/util/colors/colorSets.js +1 -1
- package/build/cjs/visualizations/util/colors/themes.js +1 -1
- package/build/cjs/visualizations/util/getFilterText.js +9 -6
- package/build/es/__demo__/FileMenu.stories.js +4 -2
- package/build/es/__demo__/OpenFileDialog.stories.js +4 -2
- package/build/es/__demo__/PivotTable.stories.js +204 -151
- package/build/es/api/__tests__/dimensions.spec.js +2 -1
- package/build/es/api/analytics/Analytics.js +8 -7
- package/build/es/api/analytics/AnalyticsBase.js +58 -43
- package/build/es/api/analytics/AnalyticsRequest.js +2 -1
- package/build/es/api/analytics/AnalyticsRequestBase.js +22 -17
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
- package/build/es/api/analytics/AnalyticsResponseHeader.js +7 -5
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
- package/build/es/api/dimensions.js +149 -119
- package/build/es/api/organisationUnits.js +35 -23
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +17 -10
- package/build/es/components/CachedDataQueryProvider.js +6 -5
- package/build/es/components/DataDimension/DataDimension.js +8 -6
- package/build/es/components/DataDimension/DataTypeSelector.js +6 -5
- package/build/es/components/DataDimension/DetailSelector.js +6 -5
- package/build/es/components/DataDimension/GroupSelector.js +10 -9
- package/build/es/components/DataDimension/ItemSelector.js +85 -71
- package/build/es/components/DataDimension/MetricSelector.js +6 -5
- package/build/es/components/DimensionMenu.js +14 -13
- package/build/es/components/DimensionsPanel/DimensionsPanel.js +2 -2
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +2 -2
- package/build/es/components/DimensionsPanel/List/DimensionLabel.js +2 -2
- package/build/es/components/DimensionsPanel/List/DimensionList.js +2 -2
- package/build/es/components/DimensionsPanel/List/OptionsButton.js +10 -7
- package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
- package/build/es/components/DynamicDimension/DynamicDimension.js +9 -8
- package/build/es/components/DynamicDimension/ItemSelector.js +56 -42
- package/build/es/components/FileMenu/DeleteDialog.js +14 -10
- package/build/es/components/FileMenu/FileMenu.js +17 -16
- package/build/es/components/FileMenu/GetLinkDialog.js +6 -5
- package/build/es/components/FileMenu/RenameDialog.js +36 -23
- package/build/es/components/FileMenu/SaveAsDialog.js +19 -12
- package/build/es/components/Filter/Filter.js +22 -19
- package/build/es/components/LegendKey/LegendKey.js +4 -3
- package/build/es/components/OpenFileDialog/CreatedByFilter.js +26 -20
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +26 -23
- package/build/es/components/OpenFileDialog/DateField.js +4 -3
- package/build/es/components/OpenFileDialog/FileList.js +22 -19
- package/build/es/components/OpenFileDialog/NameFilter.js +21 -15
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +41 -33
- package/build/es/components/OpenFileDialog/PaginationControls.js +28 -22
- package/build/es/components/OpenFileDialog/VisTypeFilter.js +37 -28
- package/build/es/components/Options/VisualizationOptions.js +43 -33
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +48 -32
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +22 -15
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +17 -12
- package/build/es/components/PeriodDimension/PeriodDimension.js +8 -6
- package/build/es/components/PeriodDimension/PeriodTransfer.js +22 -17
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +30 -24
- package/build/es/components/PeriodDimension/utils/index.js +5 -1
- package/build/es/components/PivotTable/PivotTable.js +8 -7
- package/build/es/components/PivotTable/PivotTableBody.js +29 -20
- package/build/es/components/PivotTable/PivotTableCell.js +9 -8
- package/build/es/components/PivotTable/PivotTableClippedAxis.js +17 -14
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
- package/build/es/components/PivotTable/PivotTableColumnHeaders.js +29 -22
- package/build/es/components/PivotTable/PivotTableContainer.js +6 -5
- package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
- package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -2
- package/build/es/components/PivotTable/PivotTableEmptyRow.js +5 -4
- package/build/es/components/PivotTable/PivotTableEngineContext.js +5 -4
- package/build/es/components/PivotTable/PivotTableHead.js +16 -13
- package/build/es/components/PivotTable/PivotTableHeaderCell.js +9 -8
- package/build/es/components/PivotTable/PivotTableRow.js +27 -20
- package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
- package/build/es/components/PivotTable/PivotTableSortIcon.js +5 -4
- package/build/es/components/PivotTable/PivotTableTitleRow.js +7 -6
- package/build/es/components/PivotTable/PivotTableTitleRows.js +5 -4
- package/build/es/components/PivotTable/PivotTableValueCell.js +6 -5
- package/build/es/components/TransferOption.js +15 -13
- package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
- package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +23 -16
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -6
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
- package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
- package/build/es/components/VisTypeIcon.js +6 -5
- package/build/es/locales/en/translations.json +1 -1
- package/build/es/locales/nl/translations.json +30 -30
- package/build/es/modules/layout/dimensionCreate.js +3 -1
- package/build/es/modules/layout/dimensionIsValid.js +5 -3
- package/build/es/modules/outliers/index.js +3 -1
- package/build/es/modules/outliers/iqr.js +7 -4
- package/build/es/modules/outliers/modZScore.js +14 -6
- package/build/es/modules/outliers/zScore.js +4 -3
- package/build/es/modules/pivotTable/AdaptiveClippingController.js +17 -12
- package/build/es/modules/pivotTable/PivotTableEngine.js +57 -44
- package/build/es/modules/pivotTable/clipAxis.js +8 -7
- package/build/es/modules/pivotTable/clipPartitionedAxis.js +10 -9
- package/build/es/modules/pivotTable/getHeaderForDisplay.js +9 -8
- package/build/es/modules/pivotTable/measureText.js +10 -7
- package/build/es/modules/pivotTable/useParentSize.js +2 -1
- package/build/es/modules/pivotTable/useScrollPosition.js +2 -1
- package/build/es/modules/pivotTable/useTableClipping.js +7 -6
- package/build/es/modules/predefinedDimensions.js +1 -1
- package/build/es/modules/relativeItems/index.js +4 -1
- package/build/es/visualizations/config/adapters/dhis_dhis/index.js +6 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +8 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +4 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +6 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +9 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +23 -19
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
- package/build/es/visualizations/config/generators/dhis/singleValue.js +28 -24
- package/build/es/visualizations/config/generators/highcharts/index.js +5 -1
- package/build/es/visualizations/config/index.js +13 -11
- package/build/es/visualizations/config/validators/dhis/index.js +4 -3
- package/build/es/visualizations/index.js +5 -1
- package/build/es/visualizations/store/adapters/dhis_dhis/index.js +7 -6
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
- package/build/es/visualizations/store/index.js +18 -15
- package/build/es/visualizations/store/validators/dhis/index.js +7 -5
- package/build/es/visualizations/util/getFilterText.js +9 -6
- package/package.json +11 -11
|
@@ -79,9 +79,12 @@ export const getMaxValue = (maxValue, dataValues, outlierLineMax) => {
|
|
|
79
79
|
|
|
80
80
|
return dataValues !== null && dataValues !== void 0 && dataValues.every(value => value < DEFAULT_MIN_VALUE) ? DEFAULT_MIN_VALUE : undefined;
|
|
81
81
|
};
|
|
82
|
-
export const getRegressionLine = (
|
|
82
|
+
export const getRegressionLine = function () {
|
|
83
83
|
var _regressionLine$title, _regressionLine$title2;
|
|
84
84
|
|
|
85
|
+
let regressionLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
86
|
+
let visType = arguments.length > 1 ? arguments[1] : undefined;
|
|
87
|
+
let isVertical = arguments.length > 2 ? arguments[2] : undefined;
|
|
85
88
|
const fontStyle = mergeFontStyleWithDefault((_regressionLine$title = regressionLine.title) === null || _regressionLine$title === void 0 ? void 0 : _regressionLine$title.fontStyle, FONT_STYLE_REGRESSION_LINE_LABEL);
|
|
86
89
|
const plotLineStyle = getPlotLineStyle(fontStyle);
|
|
87
90
|
const plotLineLabelStyle = getPlotLineLabelStyle(fontStyle);
|
|
@@ -11,7 +11,9 @@ export function getIdAxisMap(customAxes) {
|
|
|
11
11
|
return map;
|
|
12
12
|
}, {});
|
|
13
13
|
}
|
|
14
|
-
export function getFullIdAxisMap(
|
|
14
|
+
export function getFullIdAxisMap() {
|
|
15
|
+
let customAxes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
16
|
+
let series = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
15
17
|
const idAxisMap = getIdAxisMap(customAxes.filter(axisItem => series.find(seriesItem => seriesItem.id === axisItem.dimensionItem))); // adds first axis ids to seriesAxisMap
|
|
16
18
|
|
|
17
19
|
series.forEach(s => {
|
|
@@ -28,7 +30,9 @@ export function getFullIdAxisMap(customAxes = [], series = []) {
|
|
|
28
30
|
|
|
29
31
|
export function getAxisIdsMap(customAxes, series) {
|
|
30
32
|
const fullIdAxisMap = getFullIdAxisMap(customAxes, series);
|
|
31
|
-
return Object.entries(fullIdAxisMap).reduce((map,
|
|
33
|
+
return Object.entries(fullIdAxisMap).reduce((map, _ref) => {
|
|
34
|
+
let [id, axis] = _ref;
|
|
35
|
+
|
|
32
36
|
if (!(axis in map)) {
|
|
33
37
|
map[axis] = [];
|
|
34
38
|
}
|
|
@@ -16,9 +16,10 @@ function getEmptySeriesIndexes(series) {
|
|
|
16
16
|
let seriesValues;
|
|
17
17
|
series[0].data.forEach((value, index) => {
|
|
18
18
|
seriesValues = [];
|
|
19
|
-
series.forEach(
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
series.forEach(_ref => {
|
|
20
|
+
let {
|
|
21
|
+
data
|
|
22
|
+
} = _ref;
|
|
22
23
|
// handle undefined values due to empty (or shorter) serie data
|
|
23
24
|
// preserve 0 as valid value
|
|
24
25
|
seriesValues.push(data[index] === undefined ? null : data[index]);
|
|
@@ -30,15 +30,17 @@ const getTransformedExtraOptions = extraOptions => ({ ...extraOptions,
|
|
|
30
30
|
multiAxisTheme: extraOptions.multiAxisTheme || defaultMultiAxisTheme1
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
export default function ({
|
|
34
|
-
store,
|
|
35
|
-
layout,
|
|
36
|
-
el,
|
|
37
|
-
extraConfig,
|
|
38
|
-
extraOptions
|
|
39
|
-
}) {
|
|
33
|
+
export default function (_ref) {
|
|
40
34
|
var _layout$seriesKey, _layout$seriesKey2, _layout$seriesKey2$la, _layout$legend, _config$xAxis;
|
|
41
35
|
|
|
36
|
+
let {
|
|
37
|
+
store,
|
|
38
|
+
layout,
|
|
39
|
+
el,
|
|
40
|
+
extraConfig,
|
|
41
|
+
extraOptions
|
|
42
|
+
} = _ref;
|
|
43
|
+
|
|
42
44
|
const _layout = getTransformedLayout(layout);
|
|
43
45
|
|
|
44
46
|
const _extraOptions = getTransformedExtraOptions(extraOptions);
|
|
@@ -33,11 +33,13 @@ function getLegend(fontStyle, dashboard, visType) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const getLegendSetByDisplayStrategy =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
const getLegendSetByDisplayStrategy = _ref => {
|
|
37
|
+
let {
|
|
38
|
+
displayStrategy,
|
|
39
|
+
legendSets,
|
|
40
|
+
legendSetId
|
|
41
|
+
} = _ref;
|
|
42
|
+
|
|
41
43
|
if (displayStrategy === LEGEND_DISPLAY_STRATEGY_FIXED && legendSets.length) {
|
|
42
44
|
return legendSets[0];
|
|
43
45
|
} else if (displayStrategy === LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM) {
|
|
@@ -47,19 +49,20 @@ const getLegendSetByDisplayStrategy = ({
|
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
51
|
|
|
50
|
-
const formatLabel =
|
|
51
|
-
seriesId,
|
|
52
|
-
seriesColor,
|
|
53
|
-
seriesName,
|
|
54
|
-
seriesType,
|
|
55
|
-
metaData,
|
|
56
|
-
displayStrategy,
|
|
57
|
-
legendSets,
|
|
58
|
-
fontStyle,
|
|
59
|
-
visType
|
|
60
|
-
}) => {
|
|
52
|
+
const formatLabel = _ref2 => {
|
|
61
53
|
var _metaData$seriesId, _legendSet$legends;
|
|
62
54
|
|
|
55
|
+
let {
|
|
56
|
+
seriesId,
|
|
57
|
+
seriesColor,
|
|
58
|
+
seriesName,
|
|
59
|
+
seriesType,
|
|
60
|
+
metaData,
|
|
61
|
+
displayStrategy,
|
|
62
|
+
legendSets,
|
|
63
|
+
fontStyle,
|
|
64
|
+
visType
|
|
65
|
+
} = _ref2;
|
|
63
66
|
const legendSet = getLegendSetByDisplayStrategy({
|
|
64
67
|
displayStrategy,
|
|
65
68
|
legendSets,
|
|
@@ -75,15 +78,15 @@ const formatLabel = ({
|
|
|
75
78
|
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
76
79
|
} else if (legendSet !== null && legendSet !== void 0 && (_legendSet$legends = legendSet.legends) !== null && _legendSet$legends !== void 0 && _legendSet$legends.length && isLegendSetType(visType) && seriesType !== getType(VIS_TYPE_LINE).type) {
|
|
77
80
|
// item with legend set
|
|
78
|
-
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg
|
|
81
|
+
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg width=\"".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" style=\"margin-right:-5px; z-index: ").concat(legendSet.legends.length - index, "\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(legend.color, "\"></circle>\n </svg>")));
|
|
79
82
|
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
80
83
|
} else {
|
|
81
84
|
// regular item (not a trendline, no applied legend set)
|
|
82
85
|
if ((seriesColor === null || seriesColor === void 0 ? void 0 : seriesColor.patternIndex) !== undefined) {
|
|
83
86
|
const pattern = colorSets[COLOR_SET_PATTERNS].patterns[seriesColor.patternIndex];
|
|
84
|
-
result.push("<svg
|
|
87
|
+
result.push("<svg style=\"height: ".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px; width: ").concat(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[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"url(#pattern").concat(seriesColor.patternIndex, ")\"/>\n </svg>"));
|
|
85
88
|
} else {
|
|
86
|
-
result.push("<svg
|
|
89
|
+
result.push("<svg width=\"".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" style=\"margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(seriesColor, "\"></circle>\n </svg>"));
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
result.push("<span class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
@@ -93,15 +96,16 @@ const formatLabel = ({
|
|
|
93
96
|
return result.join('');
|
|
94
97
|
};
|
|
95
98
|
|
|
96
|
-
export default function ({
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
export default function (_ref3) {
|
|
100
|
+
let {
|
|
101
|
+
isHidden,
|
|
102
|
+
fontStyle,
|
|
103
|
+
visType,
|
|
104
|
+
dashboard,
|
|
105
|
+
legendSets = [],
|
|
106
|
+
metaData,
|
|
107
|
+
displayStrategy
|
|
108
|
+
} = _ref3;
|
|
105
109
|
const mergedFontStyle = mergeFontStyleWithDefault(fontStyle, FONT_STYLE_LEGEND);
|
|
106
110
|
return isHidden || visType === VIS_TYPE_SCATTER ? {
|
|
107
111
|
enabled: false
|
|
@@ -5,26 +5,30 @@ const OUT_OF_BOUNDS_COLOR = '#CCCCCC';
|
|
|
5
5
|
|
|
6
6
|
const getLegend = (value, legendSet) => value && legendSet ? getLegendByValueFromLegendSet(legendSet, value) : {};
|
|
7
7
|
|
|
8
|
-
export const applyLegendSet = (
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export const applyLegendSet = function () {
|
|
9
|
+
let seriesObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10
|
+
let legendSet = arguments.length > 1 ? arguments[1] : undefined;
|
|
11
|
+
return !seriesObj.type ? { ...seriesObj,
|
|
12
|
+
data: seriesObj.data.map(value => {
|
|
13
|
+
var _getLegend, _getLegend2, _getLegend3, _getLegend4;
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} : { ...seriesObj
|
|
15
|
+
return isNumeric(value) // Single category pass data as [value1, value2]
|
|
16
|
+
? {
|
|
17
|
+
y: value,
|
|
18
|
+
color: ((_getLegend = getLegend(value, legendSet)) === null || _getLegend === void 0 ? void 0 : _getLegend.color) || OUT_OF_BOUNDS_COLOR,
|
|
19
|
+
legend: ((_getLegend2 = getLegend(value, legendSet)) === null || _getLegend2 === void 0 ? void 0 : _getLegend2.name) || '-',
|
|
20
|
+
legendSet: legendSet.name
|
|
21
|
+
} : Array.isArray(value) // Dual category pass data as [[position1, value1], [position2, value2]]
|
|
22
|
+
? {
|
|
23
|
+
x: value[0],
|
|
24
|
+
y: value[1],
|
|
25
|
+
color: ((_getLegend3 = getLegend(value[1], legendSet)) === null || _getLegend3 === void 0 ? void 0 : _getLegend3.color) || OUT_OF_BOUNDS_COLOR,
|
|
26
|
+
legend: ((_getLegend4 = getLegend(value[1], legendSet)) === null || _getLegend4 === void 0 ? void 0 : _getLegend4.name) || '-',
|
|
27
|
+
legendSet: legendSet.name
|
|
28
|
+
} : value;
|
|
29
|
+
})
|
|
30
|
+
} : { ...seriesObj
|
|
31
|
+
};
|
|
28
32
|
};
|
|
29
33
|
export const getLegendSetTooltip = () => ({
|
|
30
34
|
pointFormatter: function () {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import i18n from '../../../../locales/index.js';
|
|
2
2
|
import { VIS_TYPE_COLUMN, VIS_TYPE_SCATTER, VIS_TYPE_STACKED_COLUMN, VIS_TYPE_BAR, VIS_TYPE_STACKED_BAR } from '../../../../modules/visTypes.js';
|
|
3
3
|
const MAX_LABELS = 10;
|
|
4
|
-
export default (
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
export default (_ref => {
|
|
5
|
+
let {
|
|
6
|
+
visType,
|
|
7
|
+
xAxisName,
|
|
8
|
+
yAxisName,
|
|
9
|
+
showLabels,
|
|
10
|
+
tooltipData,
|
|
11
|
+
onClick
|
|
12
|
+
} = _ref;
|
|
12
13
|
const series = {
|
|
13
14
|
dataLabels: {
|
|
14
15
|
enabled: showLabels,
|
|
@@ -27,9 +27,11 @@ const getLabelOffsetFromTextAlign = textAlign => {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
function getPlotLine(
|
|
30
|
+
function getPlotLine() {
|
|
31
31
|
var _regressionLine$title, _regressionLine$title2;
|
|
32
32
|
|
|
33
|
+
let regressionLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
34
|
+
let defaultLabel = arguments.length > 1 ? arguments[1] : undefined;
|
|
33
35
|
const value = regressionLine.value;
|
|
34
36
|
|
|
35
37
|
if (!isNumber(value)) {
|
|
@@ -3,14 +3,15 @@ import { FONT_STYLE_VISUALIZATION_TITLE, FONT_STYLE_VISUALIZATION_SUBTITLE, FONT
|
|
|
3
3
|
import { getColorByValueFromLegendSet } from '../../../../modules/legends.js';
|
|
4
4
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
5
5
|
|
|
6
|
-
const generateValueSVG =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const generateValueSVG = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
value,
|
|
9
|
+
formattedValue,
|
|
10
|
+
subText,
|
|
11
|
+
legendSet,
|
|
12
|
+
noData,
|
|
13
|
+
y
|
|
14
|
+
} = _ref;
|
|
14
15
|
const textSize = 300;
|
|
15
16
|
const svgValue = document.createElementNS(svgNS, 'svg');
|
|
16
17
|
svgValue.setAttribute('xmlns', svgNS);
|
|
@@ -62,10 +63,11 @@ const generateValueSVG = ({
|
|
|
62
63
|
return svgValue;
|
|
63
64
|
};
|
|
64
65
|
|
|
65
|
-
const generateDashboardItem = (config, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
const generateDashboardItem = (config, _ref2) => {
|
|
67
|
+
let {
|
|
68
|
+
legendSet,
|
|
69
|
+
noData
|
|
70
|
+
} = _ref2;
|
|
69
71
|
const container = document.createElement('div');
|
|
70
72
|
container.setAttribute('style', 'display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%');
|
|
71
73
|
const titleStyle = 'font-size: 12px; color: #666;';
|
|
@@ -124,12 +126,13 @@ const getXFromTextAlign = textAlign => {
|
|
|
124
126
|
}
|
|
125
127
|
};
|
|
126
128
|
|
|
127
|
-
const generateDVItem = (config, {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
const generateDVItem = (config, _ref3) => {
|
|
130
|
+
let {
|
|
131
|
+
legendSet,
|
|
132
|
+
parentEl,
|
|
133
|
+
fontStyle,
|
|
134
|
+
noData
|
|
135
|
+
} = _ref3;
|
|
133
136
|
const parentElBBox = parentEl.getBoundingClientRect();
|
|
134
137
|
const width = parentElBBox.width;
|
|
135
138
|
const height = parentElBBox.height;
|
|
@@ -184,12 +187,13 @@ const generateDVItem = (config, {
|
|
|
184
187
|
return svg;
|
|
185
188
|
};
|
|
186
189
|
|
|
187
|
-
export default function (config, parentEl, {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
export default function (config, parentEl, _ref4) {
|
|
191
|
+
let {
|
|
192
|
+
dashboard,
|
|
193
|
+
legendSets,
|
|
194
|
+
fontStyle,
|
|
195
|
+
noData
|
|
196
|
+
} = _ref4;
|
|
193
197
|
const legendSet = legendSets[0];
|
|
194
198
|
parentEl.style.overflow = 'hidden';
|
|
195
199
|
parentEl.style.display = 'flex';
|
|
@@ -14,7 +14,11 @@ HPF(H);
|
|
|
14
14
|
HB(H);
|
|
15
15
|
export default function (config, el) {
|
|
16
16
|
if (config) {
|
|
17
|
-
config.chart.renderTo = el || config.chart.renderTo;
|
|
17
|
+
config.chart.renderTo = el || config.chart.renderTo; // silence warning about accessibility
|
|
18
|
+
|
|
19
|
+
config.accessibility = {
|
|
20
|
+
enabled: false
|
|
21
|
+
};
|
|
18
22
|
|
|
19
23
|
if (config.lang) {
|
|
20
24
|
H.setOptions({
|
|
@@ -3,17 +3,19 @@ import { theme1 } from '../util/colors/index.js';
|
|
|
3
3
|
import adapters from './adapters/index.js';
|
|
4
4
|
import generators from './generators/index.js';
|
|
5
5
|
import validators from './validators/index.js';
|
|
6
|
-
export default function ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
export default function (_ref) {
|
|
7
|
+
let {
|
|
8
|
+
store,
|
|
9
|
+
layout,
|
|
10
|
+
el,
|
|
11
|
+
inputFormat = 'dhis',
|
|
12
|
+
outputFormat = 'highcharts',
|
|
13
|
+
extraLayout,
|
|
14
|
+
extraOptions,
|
|
15
|
+
onError,
|
|
16
|
+
onWarning
|
|
17
|
+
} = _ref;
|
|
18
|
+
|
|
17
19
|
const _validator = validators[inputFormat] || validators.noValidation;
|
|
18
20
|
|
|
19
21
|
const _adapter = adapters[inputFormat + '_' + outputFormat];
|
|
@@ -10,7 +10,11 @@ const defaultWarning = warning => {
|
|
|
10
10
|
console.log(warning);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
function createVisualization(data, layout, el, extraOptions
|
|
13
|
+
function createVisualization(data, layout, el, extraOptions) {
|
|
14
|
+
let error = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultError;
|
|
15
|
+
let warning = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : defaultWarning;
|
|
16
|
+
let outputFormat = arguments.length > 6 ? arguments[6] : undefined;
|
|
17
|
+
|
|
14
18
|
const _data = isArray(data) ? data : [data];
|
|
15
19
|
|
|
16
20
|
const store = new Store({
|
|
@@ -55,12 +55,13 @@ function getValueFunction(type) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export default function ({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
export default function (_ref) {
|
|
59
|
+
let {
|
|
60
|
+
type,
|
|
61
|
+
data,
|
|
62
|
+
seriesId,
|
|
63
|
+
categoryId
|
|
64
|
+
} = _ref;
|
|
64
65
|
const valueFunction = getValueFunction(type);
|
|
65
66
|
return data.reduce((acc, res) => {
|
|
66
67
|
const headers = res.headers;
|
|
@@ -83,13 +83,14 @@ function getSeriesFunction(type, categoryIds) {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export default function ({
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
export default function (_ref) {
|
|
87
|
+
let {
|
|
88
|
+
type,
|
|
89
|
+
data,
|
|
90
|
+
seriesId,
|
|
91
|
+
categoryIds,
|
|
92
|
+
extraOptions
|
|
93
|
+
} = _ref;
|
|
93
94
|
categoryIds = categoryIds || [];
|
|
94
95
|
const seriesFunction = getSeriesFunction(type, categoryIds);
|
|
95
96
|
return data.reduce((acc, res) => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import adapters from './adapters/index.js';
|
|
2
2
|
import validators from './validators/index.js';
|
|
3
|
-
export default function ({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
export default function (_ref) {
|
|
4
|
+
let {
|
|
5
|
+
data,
|
|
6
|
+
inputFormat = 'dhis',
|
|
7
|
+
outputFormat = 'highcharts',
|
|
8
|
+
seriesId: initialSeriesId,
|
|
9
|
+
categoryId: initialCategoryId,
|
|
10
|
+
error,
|
|
11
|
+
warning
|
|
12
|
+
} = _ref;
|
|
13
|
+
|
|
12
14
|
const _validator = validators[inputFormat] || validators.noValidation;
|
|
13
15
|
|
|
14
16
|
const _adapter = adapters[inputFormat + '_' + outputFormat];
|
|
@@ -23,12 +25,13 @@ export default function ({
|
|
|
23
25
|
|
|
24
26
|
this.data = data;
|
|
25
27
|
|
|
26
|
-
this.generateData =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
this.generateData = _ref2 => {
|
|
29
|
+
let {
|
|
30
|
+
type,
|
|
31
|
+
seriesId = initialSeriesId,
|
|
32
|
+
categoryIds = [initialCategoryId],
|
|
33
|
+
extraOptions = {}
|
|
34
|
+
} = _ref2;
|
|
32
35
|
return _adapter({
|
|
33
36
|
type,
|
|
34
37
|
data: data.map(d => _validator({
|
|
@@ -37,11 +37,13 @@ function validateRow(row, headersLength, error) {
|
|
|
37
37
|
row.forEach(rowValue => validateRowValue(rowValue, error));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export default function ({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export default function (_ref) {
|
|
41
|
+
let {
|
|
42
|
+
data,
|
|
43
|
+
error,
|
|
44
|
+
warning
|
|
45
|
+
} = _ref;
|
|
46
|
+
|
|
45
47
|
if (!isObject(data)) {
|
|
46
48
|
error(getMessage('Data is not an object'));
|
|
47
49
|
} // headers
|
|
@@ -14,9 +14,12 @@ export default function (filters, metaData) {
|
|
|
14
14
|
filters.forEach(filter => {
|
|
15
15
|
const items = dimensionGetItems(filter);
|
|
16
16
|
|
|
17
|
-
if (dimensionIs(filter, DIMENSION_ID_ORGUNIT) && items.some(
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if (dimensionIs(filter, DIMENSION_ID_ORGUNIT) && items.some(_ref => {
|
|
18
|
+
let {
|
|
19
|
+
id
|
|
20
|
+
} = _ref;
|
|
21
|
+
return ouIdHelper.hasGroupPrefix(id) || ouIdHelper.hasLevelPrefix(id);
|
|
22
|
+
})) {
|
|
20
23
|
titleFragments.push(getOuLevelAndGroupText(filter, metaData));
|
|
21
24
|
} else {
|
|
22
25
|
const filterItems = metaData.dimensions[filter.dimension];
|
|
@@ -34,9 +37,9 @@ export default function (filters, metaData) {
|
|
|
34
37
|
} // otherwise use the values directly
|
|
35
38
|
// this is a temporary fix to avoid app crashing when using filters with data items in EV
|
|
36
39
|
else {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
sectionParts.push(metaData.items[filter.dimension].name + ': ' + filterItems.join(', '));
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
titleFragments.push(sectionParts.join(', '));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2/analytics",
|
|
3
|
-
"version": "23.8.
|
|
3
|
+
"version": "23.8.6",
|
|
4
4
|
"main": "./build/cjs/index.js",
|
|
5
5
|
"module": "./build/es/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -31,37 +31,37 @@
|
|
|
31
31
|
"validate-push": "yarn test"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@dhis2/app-runtime": "^
|
|
35
|
-
"@dhis2/cli-app-scripts": "^
|
|
36
|
-
"@dhis2/cli-style": "^10.4.
|
|
34
|
+
"@dhis2/app-runtime": "^3.4.3",
|
|
35
|
+
"@dhis2/cli-app-scripts": "^9.0.0",
|
|
36
|
+
"@dhis2/cli-style": "^10.4.1",
|
|
37
37
|
"@dhis2/d2-i18n": "^1.1.0",
|
|
38
|
-
"@dhis2/ui": "^
|
|
38
|
+
"@dhis2/ui": "^8.2.5",
|
|
39
39
|
"@sambego/storybook-state": "^2.0.1",
|
|
40
40
|
"@storybook/addons": "^6.1.14",
|
|
41
41
|
"@storybook/preset-create-react-app": "^3.1.7",
|
|
42
42
|
"@storybook/react": "^6.1.14",
|
|
43
43
|
"enzyme": "^3.9.0",
|
|
44
44
|
"enzyme-adapter-react-16": "^1.15.6",
|
|
45
|
-
"fs-extra": "^10.
|
|
45
|
+
"fs-extra": "^10.1.0",
|
|
46
46
|
"jest-enzyme": "^7.0.2",
|
|
47
47
|
"prop-types": "^15",
|
|
48
|
-
"styled-jsx": "
|
|
48
|
+
"styled-jsx": "^4.0.1",
|
|
49
49
|
"typeface-roboto": "^0.0.75"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@dhis2/app-runtime": "^
|
|
52
|
+
"@dhis2/app-runtime": "^3",
|
|
53
53
|
"@dhis2/d2-i18n": "^1.1",
|
|
54
|
-
"@dhis2/ui": "^
|
|
54
|
+
"@dhis2/ui": "^8.2.5",
|
|
55
55
|
"prop-types": "^15",
|
|
56
56
|
"react": "^16.3",
|
|
57
57
|
"react-dom": "^16.3",
|
|
58
|
-
"styled-jsx": "^
|
|
58
|
+
"styled-jsx": "^4.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"classnames": "^2.3.1",
|
|
62
62
|
"d2-utilizr": "^0.2.16",
|
|
63
63
|
"d3-color": "^1.2.3",
|
|
64
|
-
"highcharts": "^
|
|
64
|
+
"highcharts": "^10.1.0",
|
|
65
65
|
"lodash": "^4.17.21",
|
|
66
66
|
"mathjs": "^9.4.2",
|
|
67
67
|
"react-beautiful-dnd": "^10.1.1",
|