@dhis2/analytics 23.8.4 → 23.8.7
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 +23 -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 +22 -13
- package/build/cjs/components/AboutAOUnit/styles/AboutAOUnit.style.js +2 -2
- 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/ar/translations.json +1 -1
- package/build/cjs/locales/ar_EG/translations.json +1 -1
- package/build/cjs/locales/ar_IQ/translations.json +1 -1
- package/build/cjs/locales/ckb/translations.json +1 -1
- package/build/cjs/locales/cs/translations.json +1 -1
- package/build/cjs/locales/da/translations.json +1 -1
- package/build/cjs/locales/en/translations.json +1 -1
- package/build/cjs/locales/es/translations.json +1 -1
- package/build/cjs/locales/fr/translations.json +1 -1
- package/build/cjs/locales/id/translations.json +1 -1
- package/build/cjs/locales/km/translations.json +1 -1
- package/build/cjs/locales/lo/translations.json +1 -1
- package/build/cjs/locales/my/translations.json +1 -1
- package/build/cjs/locales/nb/translations.json +1 -1
- package/build/cjs/locales/nl/translations.json +30 -30
- package/build/cjs/locales/prs/translations.json +1 -1
- package/build/cjs/locales/ps/translations.json +1 -1
- package/build/cjs/locales/pt/translations.json +1 -1
- package/build/cjs/locales/pt_BR/translations.json +1 -1
- package/build/cjs/locales/ru/translations.json +1 -1
- package/build/cjs/locales/sv/translations.json +1 -1
- package/build/cjs/locales/tet/translations.json +1 -1
- package/build/cjs/locales/tg/translations.json +1 -1
- package/build/cjs/locales/uk/translations.json +1 -1
- package/build/cjs/locales/ur/translations.json +1 -1
- package/build/cjs/locales/uz/translations.json +1 -1
- package/build/cjs/locales/uz_Latn/translations.json +1 -1
- package/build/cjs/locales/vi/translations.json +1 -1
- package/build/cjs/locales/zh/translations.json +1 -1
- package/build/cjs/locales/zh_CN/translations.json +1 -1
- 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 +20 -11
- package/build/es/components/AboutAOUnit/styles/AboutAOUnit.style.js +2 -2
- 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/ar/translations.json +1 -1
- package/build/es/locales/ar_EG/translations.json +1 -1
- package/build/es/locales/ar_IQ/translations.json +1 -1
- package/build/es/locales/ckb/translations.json +1 -1
- package/build/es/locales/cs/translations.json +1 -1
- package/build/es/locales/da/translations.json +1 -1
- package/build/es/locales/en/translations.json +1 -1
- package/build/es/locales/es/translations.json +1 -1
- package/build/es/locales/fr/translations.json +1 -1
- package/build/es/locales/id/translations.json +1 -1
- package/build/es/locales/km/translations.json +1 -1
- package/build/es/locales/lo/translations.json +1 -1
- package/build/es/locales/my/translations.json +1 -1
- package/build/es/locales/nb/translations.json +1 -1
- package/build/es/locales/nl/translations.json +30 -30
- package/build/es/locales/prs/translations.json +1 -1
- package/build/es/locales/ps/translations.json +1 -1
- package/build/es/locales/pt/translations.json +1 -1
- package/build/es/locales/pt_BR/translations.json +1 -1
- package/build/es/locales/ru/translations.json +1 -1
- package/build/es/locales/sv/translations.json +1 -1
- package/build/es/locales/tet/translations.json +1 -1
- package/build/es/locales/tg/translations.json +1 -1
- package/build/es/locales/uk/translations.json +1 -1
- package/build/es/locales/ur/translations.json +1 -1
- package/build/es/locales/uz/translations.json +1 -1
- package/build/es/locales/uz_Latn/translations.json +1 -1
- package/build/es/locales/vi/translations.json +1 -1
- package/build/es/locales/zh/translations.json +1 -1
- package/build/es/locales/zh_CN/translations.json +1 -1
- 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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getPredefinedDimensions = exports.getPredefinedDimensionProp = exports.getFixedDimensions = exports.getDynamicDimensions = exports.getDimensionById = exports.filterOutPredefinedDimensions = exports.DIMENSION_PROP_NO_ITEMS = exports.DIMENSION_ID_PERIOD = exports.DIMENSION_ID_ORGUNIT = exports.DIMENSION_ID_DATA = exports.DIMENSION_ID_ASSIGNED_CATEGORIES = void 0;
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
@@ -39,7 +39,7 @@ const getFixedDimensions = () => ({
|
|
|
39
39
|
},
|
|
40
40
|
[DIMENSION_ID_ORGUNIT]: {
|
|
41
41
|
id: DIMENSION_ID_ORGUNIT,
|
|
42
|
-
name: _index.default.t('Organisation
|
|
42
|
+
name: _index.default.t('Organisation unit'),
|
|
43
43
|
iconName: 'OrgUnitIcon',
|
|
44
44
|
icon: _ui.IconDimensionOrgUnit16
|
|
45
45
|
}
|
|
@@ -11,6 +11,9 @@ var _index = require("../ouIdHelper/index.js");
|
|
|
11
11
|
|
|
12
12
|
var _predefinedDimensions = require("../predefinedDimensions.js");
|
|
13
13
|
|
|
14
|
-
const hasRelativeItems =
|
|
14
|
+
const hasRelativeItems = function (dimension) {
|
|
15
|
+
let itemIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
16
|
+
return dimension === _predefinedDimensions.DIMENSION_ID_ASSIGNED_CATEGORIES || dimension === _predefinedDimensions.DIMENSION_ID_ORGUNIT && Array.isArray(itemIds) && itemIds.some(id => _index.ouIdHelper.hasLevelPrefix(id) || _index.ouIdHelper.hasGroupPrefix(id) || [_index.USER_ORG_UNIT, _index.USER_ORG_UNIT_CHILDREN, _index.USER_ORG_UNIT_GRANDCHILDREN].includes(id)) || dimension === _predefinedDimensions.DIMENSION_ID_PERIOD && Array.isArray(itemIds) && itemIds.some(id => (0, _relativePeriods.getRelativePeriodIds)().includes(id));
|
|
17
|
+
};
|
|
15
18
|
|
|
16
19
|
exports.hasRelativeItems = hasRelativeItems;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isNumericValueType = exports.
|
|
6
|
+
exports.isNumericValueType = exports.VALUE_TYPE_USERNAME = exports.VALUE_TYPE_URL = exports.VALUE_TYPE_UNIT_INTERVAL = exports.VALUE_TYPE_TRUE_ONLY = exports.VALUE_TYPE_TIME = exports.VALUE_TYPE_TEXT = exports.VALUE_TYPE_PHONE_NUMBER = exports.VALUE_TYPE_PERCENTAGE = exports.VALUE_TYPE_ORGANISATION_UNIT = exports.VALUE_TYPE_NUMBER = exports.VALUE_TYPE_LONG_TEXT = exports.VALUE_TYPE_LETTER = exports.VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE = exports.VALUE_TYPE_INTEGER_POSITIVE = exports.VALUE_TYPE_INTEGER_NEGATIVE = exports.VALUE_TYPE_INTEGER = exports.VALUE_TYPE_EMAIL = exports.VALUE_TYPE_DATETIME = exports.VALUE_TYPE_DATE = exports.VALUE_TYPE_BOOLEAN = void 0;
|
|
7
7
|
|
|
8
8
|
/* These types match the types in the backend
|
|
9
9
|
https://github.com/dhis2/dhis2-core/blob/master/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.visTypeIcons = exports.visTypeDisplayNames = exports.isYearOverYear = exports.isVerticalType = exports.isTwoCategoryChartType = exports.isStacked = exports.isSingleValue = exports.isMultiType = exports.isLegendSetType = exports.isDualAxisType = exports.isColumnBasedType = exports.getDisplayNameByVisType = exports.defaultVisType = exports.VIS_TYPE_YEAR_OVER_YEAR_LINE = exports.VIS_TYPE_YEAR_OVER_YEAR_COLUMN = exports.VIS_TYPE_STACKED_COLUMN = exports.VIS_TYPE_STACKED_BAR = exports.VIS_TYPE_STACKED_AREA = exports.VIS_TYPE_SINGLE_VALUE = exports.VIS_TYPE_SCATTER = exports.VIS_TYPE_RADAR = exports.VIS_TYPE_PIVOT_TABLE = exports.VIS_TYPE_PIE = exports.VIS_TYPE_LINE_LIST = exports.VIS_TYPE_LINE = exports.VIS_TYPE_GROUP_CHARTS = exports.VIS_TYPE_GROUP_ALL = exports.VIS_TYPE_GAUGE = exports.VIS_TYPE_COLUMN = exports.VIS_TYPE_BUBBLE = exports.VIS_TYPE_BAR = exports.VIS_TYPE_AREA = void 0;
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = _default;
|
|
7
6
|
exports.INDICATOR_FACTOR_100 = void 0;
|
|
7
|
+
exports.default = _default;
|
|
8
8
|
|
|
9
9
|
var _index = _interopRequireDefault(require("./subtitle/index.js"));
|
|
10
10
|
|
|
@@ -17,11 +17,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
const INDICATOR_FACTOR_100 = 100;
|
|
18
18
|
exports.INDICATOR_FACTOR_100 = INDICATOR_FACTOR_100;
|
|
19
19
|
|
|
20
|
-
function _default({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
function _default(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
store,
|
|
23
|
+
layout,
|
|
24
|
+
extraOptions
|
|
25
|
+
} = _ref;
|
|
25
26
|
const data = store.generateData({
|
|
26
27
|
type: layout.type,
|
|
27
28
|
seriesId: layout.columns && layout.columns.length ? layout.columns[0].dimension : null,
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = _default;
|
|
7
|
-
exports.linear = linear;
|
|
8
7
|
exports.isRegressionIneligible = void 0;
|
|
8
|
+
exports.linear = linear;
|
|
9
9
|
|
|
10
10
|
var _arrayContains = _interopRequireDefault(require("d2-utilizr/lib/arrayContains"));
|
|
11
11
|
|
|
@@ -233,7 +233,8 @@ function gaussianElimination(a, o) {
|
|
|
233
233
|
// correlation = N * Σ(XY) - Σ(X) * Σ (Y) / √ ( N * Σ(X^2) - Σ(X) ) * ( N * Σ(Y^2) - Σ(Y)^2 ) ) )
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
function linear(data
|
|
236
|
+
function linear(data) {
|
|
237
|
+
let decimalPlaces = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
237
238
|
const sum = [0, 0, 0, 0, 0],
|
|
238
239
|
results = [];
|
|
239
240
|
let N = data.length;
|
|
@@ -293,7 +294,10 @@ function linear(data, decimalPlaces = 2) {
|
|
|
293
294
|
} // Code extracted from https://github.com/Tom-Alexander/regression-js/
|
|
294
295
|
|
|
295
296
|
|
|
296
|
-
function polynomial(data
|
|
297
|
+
function polynomial(data) {
|
|
298
|
+
let order = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
299
|
+
let extrapolate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
300
|
+
let decimalPlaces = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;
|
|
297
301
|
const lhs = [],
|
|
298
302
|
rhs = [],
|
|
299
303
|
results = [],
|
|
@@ -391,7 +395,8 @@ function polynomial(data, order = 2, extrapolate = 0, decimalPlaces = 2) {
|
|
|
391
395
|
// - https://gist.github.com/avibryant/1151823
|
|
392
396
|
|
|
393
397
|
|
|
394
|
-
function loess(data
|
|
398
|
+
function loess(data) {
|
|
399
|
+
let bandwidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.25;
|
|
395
400
|
const xval = data.map(pair => {
|
|
396
401
|
return pair[0];
|
|
397
402
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getRegressionLine = exports.getMinValue = exports.getMaxValue = exports.getLabels = exports.getGridLineColor = void 0;
|
|
7
7
|
|
|
8
8
|
var _isNumeric = _interopRequireDefault(require("d2-utilizr/lib/isNumeric"));
|
|
9
9
|
|
|
@@ -101,9 +101,12 @@ const getMaxValue = (maxValue, dataValues, outlierLineMax) => {
|
|
|
101
101
|
|
|
102
102
|
exports.getMaxValue = getMaxValue;
|
|
103
103
|
|
|
104
|
-
const getRegressionLine = (
|
|
104
|
+
const getRegressionLine = function () {
|
|
105
105
|
var _regressionLine$title, _regressionLine$title2;
|
|
106
106
|
|
|
107
|
+
let regressionLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
108
|
+
let visType = arguments.length > 1 ? arguments[1] : undefined;
|
|
109
|
+
let isVertical = arguments.length > 2 ? arguments[2] : undefined;
|
|
107
110
|
const fontStyle = (0, _fontStyle.mergeFontStyleWithDefault)((_regressionLine$title = regressionLine.title) === null || _regressionLine$title === void 0 ? void 0 : _regressionLine$title.fontStyle, _fontStyle.FONT_STYLE_REGRESSION_LINE_LABEL);
|
|
108
111
|
const plotLineStyle = getPlotLineStyle(fontStyle);
|
|
109
112
|
const plotLineLabelStyle = getPlotLineLabelStyle(fontStyle);
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.getFullIdAxisMap = getFullIdAxisMap;
|
|
6
|
+
exports.CUSTOM_AXES_DIMENSION_ITEM = exports.CUSTOM_AXES_AXIS = void 0;
|
|
8
7
|
exports.getAxisIdsMap = getAxisIdsMap;
|
|
9
|
-
exports.
|
|
8
|
+
exports.getFullIdAxisMap = getFullIdAxisMap;
|
|
9
|
+
exports.getIdAxisMap = getIdAxisMap;
|
|
10
10
|
const CUSTOM_AXES_DIMENSION_ITEM = 'dimensionItem';
|
|
11
11
|
exports.CUSTOM_AXES_DIMENSION_ITEM = CUSTOM_AXES_DIMENSION_ITEM;
|
|
12
12
|
const CUSTOM_AXES_AXIS = 'axis'; // returns:
|
|
@@ -24,7 +24,9 @@ function getIdAxisMap(customAxes) {
|
|
|
24
24
|
}, {});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function getFullIdAxisMap(
|
|
27
|
+
function getFullIdAxisMap() {
|
|
28
|
+
let customAxes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
29
|
+
let series = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
28
30
|
const idAxisMap = getIdAxisMap(customAxes.filter(axisItem => series.find(seriesItem => seriesItem.id === axisItem.dimensionItem))); // adds first axis ids to seriesAxisMap
|
|
29
31
|
|
|
30
32
|
series.forEach(s => {
|
|
@@ -42,7 +44,9 @@ function getFullIdAxisMap(customAxes = [], series = []) {
|
|
|
42
44
|
|
|
43
45
|
function getAxisIdsMap(customAxes, series) {
|
|
44
46
|
const fullIdAxisMap = getFullIdAxisMap(customAxes, series);
|
|
45
|
-
return Object.entries(fullIdAxisMap).reduce((map,
|
|
47
|
+
return Object.entries(fullIdAxisMap).reduce((map, _ref) => {
|
|
48
|
+
let [id, axis] = _ref;
|
|
49
|
+
|
|
46
50
|
if (!(axis in map)) {
|
|
47
51
|
map[axis] = [];
|
|
48
52
|
}
|
|
@@ -28,9 +28,10 @@ function getEmptySeriesIndexes(series) {
|
|
|
28
28
|
let seriesValues;
|
|
29
29
|
series[0].data.forEach((value, index) => {
|
|
30
30
|
seriesValues = [];
|
|
31
|
-
series.forEach(
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
series.forEach(_ref => {
|
|
32
|
+
let {
|
|
33
|
+
data
|
|
34
|
+
} = _ref;
|
|
34
35
|
// handle undefined values due to empty (or shorter) serie data
|
|
35
36
|
// preserve 0 as valid value
|
|
36
37
|
seriesValues.push(data[index] === undefined ? null : data[index]);
|
|
@@ -47,9 +47,9 @@ var _index6 = _interopRequireDefault(require("./xAxis/index.js"));
|
|
|
47
47
|
|
|
48
48
|
var _index7 = _interopRequireDefault(require("./yAxis/index.js"));
|
|
49
49
|
|
|
50
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
50
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
51
|
|
|
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; }
|
|
52
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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
|
|
|
@@ -63,15 +63,17 @@ const getTransformedExtraOptions = extraOptions => ({ ...extraOptions,
|
|
|
63
63
|
multiAxisTheme: extraOptions.multiAxisTheme || _themes.defaultMultiAxisTheme1
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
function _default({
|
|
67
|
-
store,
|
|
68
|
-
layout,
|
|
69
|
-
el,
|
|
70
|
-
extraConfig,
|
|
71
|
-
extraOptions
|
|
72
|
-
}) {
|
|
66
|
+
function _default(_ref) {
|
|
73
67
|
var _layout$seriesKey, _layout$seriesKey2, _layout$seriesKey2$la, _layout$legend, _config$xAxis;
|
|
74
68
|
|
|
69
|
+
let {
|
|
70
|
+
store,
|
|
71
|
+
layout,
|
|
72
|
+
el,
|
|
73
|
+
extraConfig,
|
|
74
|
+
extraOptions
|
|
75
|
+
} = _ref;
|
|
76
|
+
|
|
75
77
|
const _layout = getTransformedLayout(layout);
|
|
76
78
|
|
|
77
79
|
const _extraOptions = getTransformedExtraOptions(extraOptions);
|
|
@@ -48,11 +48,13 @@ function getLegend(fontStyle, dashboard, visType) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
const getLegendSetByDisplayStrategy =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
const getLegendSetByDisplayStrategy = _ref => {
|
|
52
|
+
let {
|
|
53
|
+
displayStrategy,
|
|
54
|
+
legendSets,
|
|
55
|
+
legendSetId
|
|
56
|
+
} = _ref;
|
|
57
|
+
|
|
56
58
|
if (displayStrategy === _legends.LEGEND_DISPLAY_STRATEGY_FIXED && legendSets.length) {
|
|
57
59
|
return legendSets[0];
|
|
58
60
|
} else if (displayStrategy === _legends.LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM) {
|
|
@@ -62,19 +64,20 @@ const getLegendSetByDisplayStrategy = ({
|
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
|
|
65
|
-
const formatLabel =
|
|
66
|
-
seriesId,
|
|
67
|
-
seriesColor,
|
|
68
|
-
seriesName,
|
|
69
|
-
seriesType,
|
|
70
|
-
metaData,
|
|
71
|
-
displayStrategy,
|
|
72
|
-
legendSets,
|
|
73
|
-
fontStyle,
|
|
74
|
-
visType
|
|
75
|
-
}) => {
|
|
67
|
+
const formatLabel = _ref2 => {
|
|
76
68
|
var _metaData$seriesId, _legendSet$legends;
|
|
77
69
|
|
|
70
|
+
let {
|
|
71
|
+
seriesId,
|
|
72
|
+
seriesColor,
|
|
73
|
+
seriesName,
|
|
74
|
+
seriesType,
|
|
75
|
+
metaData,
|
|
76
|
+
displayStrategy,
|
|
77
|
+
legendSets,
|
|
78
|
+
fontStyle,
|
|
79
|
+
visType
|
|
80
|
+
} = _ref2;
|
|
78
81
|
const legendSet = getLegendSetByDisplayStrategy({
|
|
79
82
|
displayStrategy,
|
|
80
83
|
legendSets,
|
|
@@ -90,15 +93,15 @@ const formatLabel = ({
|
|
|
90
93
|
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
91
94
|
} 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
95
|
// item with legend set
|
|
93
|
-
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg
|
|
96
|
+
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_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[_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
97
|
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
95
98
|
} else {
|
|
96
99
|
// regular item (not a trendline, no applied legend set)
|
|
97
100
|
if ((seriesColor === null || seriesColor === void 0 ? void 0 : seriesColor.patternIndex) !== undefined) {
|
|
98
101
|
const pattern = _colorSets.colorSets[_colorSets.COLOR_SET_PATTERNS].patterns[seriesColor.patternIndex];
|
|
99
|
-
result.push("<svg
|
|
102
|
+
result.push("<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>"));
|
|
100
103
|
} else {
|
|
101
|
-
result.push("<svg
|
|
104
|
+
result.push("<svg width=\"".concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[_fontStyle.FONT_STYLE_OPTION_FONT_SIZE], "\" 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>"));
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
result.push("<span class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
@@ -108,15 +111,16 @@ const formatLabel = ({
|
|
|
108
111
|
return result.join('');
|
|
109
112
|
};
|
|
110
113
|
|
|
111
|
-
function _default({
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
function _default(_ref3) {
|
|
115
|
+
let {
|
|
116
|
+
isHidden,
|
|
117
|
+
fontStyle,
|
|
118
|
+
visType,
|
|
119
|
+
dashboard,
|
|
120
|
+
legendSets = [],
|
|
121
|
+
metaData,
|
|
122
|
+
displayStrategy
|
|
123
|
+
} = _ref3;
|
|
120
124
|
const mergedFontStyle = (0, _fontStyle.mergeFontStyleWithDefault)(fontStyle, _fontStyle.FONT_STYLE_LEGEND);
|
|
121
125
|
return isHidden || visType === _visTypes.VIS_TYPE_SCATTER ? {
|
|
122
126
|
enabled: false
|
|
@@ -17,26 +17,30 @@ const OUT_OF_BOUNDS_COLOR = '#CCCCCC';
|
|
|
17
17
|
|
|
18
18
|
const getLegend = (value, legendSet) => value && legendSet ? (0, _legends.getLegendByValueFromLegendSet)(legendSet, value) : {};
|
|
19
19
|
|
|
20
|
-
const applyLegendSet = (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
const applyLegendSet = function () {
|
|
21
|
+
let seriesObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22
|
+
let legendSet = arguments.length > 1 ? arguments[1] : undefined;
|
|
23
|
+
return !seriesObj.type ? { ...seriesObj,
|
|
24
|
+
data: seriesObj.data.map(value => {
|
|
25
|
+
var _getLegend, _getLegend2, _getLegend3, _getLegend4;
|
|
26
|
+
|
|
27
|
+
return (0, _isNumeric.default)(value) // Single category pass data as [value1, value2]
|
|
28
|
+
? {
|
|
29
|
+
y: value,
|
|
30
|
+
color: ((_getLegend = getLegend(value, legendSet)) === null || _getLegend === void 0 ? void 0 : _getLegend.color) || OUT_OF_BOUNDS_COLOR,
|
|
31
|
+
legend: ((_getLegend2 = getLegend(value, legendSet)) === null || _getLegend2 === void 0 ? void 0 : _getLegend2.name) || '-',
|
|
32
|
+
legendSet: legendSet.name
|
|
33
|
+
} : Array.isArray(value) // Dual category pass data as [[position1, value1], [position2, value2]]
|
|
34
|
+
? {
|
|
35
|
+
x: value[0],
|
|
36
|
+
y: value[1],
|
|
37
|
+
color: ((_getLegend3 = getLegend(value[1], legendSet)) === null || _getLegend3 === void 0 ? void 0 : _getLegend3.color) || OUT_OF_BOUNDS_COLOR,
|
|
38
|
+
legend: ((_getLegend4 = getLegend(value[1], legendSet)) === null || _getLegend4 === void 0 ? void 0 : _getLegend4.name) || '-',
|
|
39
|
+
legendSet: legendSet.name
|
|
40
|
+
} : value;
|
|
41
|
+
})
|
|
42
|
+
} : { ...seriesObj
|
|
43
|
+
};
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
exports.applyLegendSet = applyLegendSet;
|
|
@@ -13,14 +13,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
|
|
14
14
|
const MAX_LABELS = 10;
|
|
15
15
|
|
|
16
|
-
var _default =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var _default = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
visType,
|
|
19
|
+
xAxisName,
|
|
20
|
+
yAxisName,
|
|
21
|
+
showLabels,
|
|
22
|
+
tooltipData,
|
|
23
|
+
onClick
|
|
24
|
+
} = _ref;
|
|
24
25
|
const series = {
|
|
25
26
|
dataLabels: {
|
|
26
27
|
enabled: showLabels,
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = _default;
|
|
7
|
-
exports.
|
|
7
|
+
exports.getLabels = exports.getDefault = void 0;
|
|
8
8
|
|
|
9
9
|
var _objectClean = _interopRequireDefault(require("d2-utilizr/lib/objectClean"));
|
|
10
10
|
|
|
@@ -48,9 +48,11 @@ const getLabelOffsetFromTextAlign = textAlign => {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
function getPlotLine(
|
|
51
|
+
function getPlotLine() {
|
|
52
52
|
var _regressionLine$title, _regressionLine$title2;
|
|
53
53
|
|
|
54
|
+
let regressionLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
55
|
+
let defaultLabel = arguments.length > 1 ? arguments[1] : undefined;
|
|
54
56
|
const value = regressionLine.value;
|
|
55
57
|
|
|
56
58
|
if (!(0, _isNumber.default)(value)) {
|
|
@@ -13,14 +13,15 @@ var _legends = require("../../../../modules/legends.js");
|
|
|
13
13
|
|
|
14
14
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
15
15
|
|
|
16
|
-
const generateValueSVG =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
const generateValueSVG = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
value,
|
|
19
|
+
formattedValue,
|
|
20
|
+
subText,
|
|
21
|
+
legendSet,
|
|
22
|
+
noData,
|
|
23
|
+
y
|
|
24
|
+
} = _ref;
|
|
24
25
|
const textSize = 300;
|
|
25
26
|
const svgValue = document.createElementNS(svgNS, 'svg');
|
|
26
27
|
svgValue.setAttribute('xmlns', svgNS);
|
|
@@ -72,10 +73,11 @@ const generateValueSVG = ({
|
|
|
72
73
|
return svgValue;
|
|
73
74
|
};
|
|
74
75
|
|
|
75
|
-
const generateDashboardItem = (config, {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
const generateDashboardItem = (config, _ref2) => {
|
|
77
|
+
let {
|
|
78
|
+
legendSet,
|
|
79
|
+
noData
|
|
80
|
+
} = _ref2;
|
|
79
81
|
const container = document.createElement('div');
|
|
80
82
|
container.setAttribute('style', 'display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%');
|
|
81
83
|
const titleStyle = 'font-size: 12px; color: #666;';
|
|
@@ -134,12 +136,13 @@ const getXFromTextAlign = textAlign => {
|
|
|
134
136
|
}
|
|
135
137
|
};
|
|
136
138
|
|
|
137
|
-
const generateDVItem = (config, {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
const generateDVItem = (config, _ref3) => {
|
|
140
|
+
let {
|
|
141
|
+
legendSet,
|
|
142
|
+
parentEl,
|
|
143
|
+
fontStyle,
|
|
144
|
+
noData
|
|
145
|
+
} = _ref3;
|
|
143
146
|
const parentElBBox = parentEl.getBoundingClientRect();
|
|
144
147
|
const width = parentElBBox.width;
|
|
145
148
|
const height = parentElBBox.height;
|
|
@@ -194,12 +197,13 @@ const generateDVItem = (config, {
|
|
|
194
197
|
return svg;
|
|
195
198
|
};
|
|
196
199
|
|
|
197
|
-
function _default(config, parentEl, {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
function _default(config, parentEl, _ref4) {
|
|
201
|
+
let {
|
|
202
|
+
dashboard,
|
|
203
|
+
legendSets,
|
|
204
|
+
fontStyle,
|
|
205
|
+
noData
|
|
206
|
+
} = _ref4;
|
|
203
207
|
const legendSet = legendSets[0];
|
|
204
208
|
parentEl.style.overflow = 'hidden';
|
|
205
209
|
parentEl.style.display = 'flex';
|
|
@@ -31,7 +31,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
31
31
|
|
|
32
32
|
function _default(config, el) {
|
|
33
33
|
if (config) {
|
|
34
|
-
config.chart.renderTo = el || config.chart.renderTo;
|
|
34
|
+
config.chart.renderTo = el || config.chart.renderTo; // silence warning about accessibility
|
|
35
|
+
|
|
36
|
+
config.accessibility = {
|
|
37
|
+
enabled: false
|
|
38
|
+
};
|
|
35
39
|
|
|
36
40
|
if (config.lang) {
|
|
37
41
|
_highcharts.default.setOptions({
|
|
@@ -17,17 +17,19 @@ var _index5 = _interopRequireDefault(require("./validators/index.js"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
function _default({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
function _default(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
store,
|
|
23
|
+
layout,
|
|
24
|
+
el,
|
|
25
|
+
inputFormat = 'dhis',
|
|
26
|
+
outputFormat = 'highcharts',
|
|
27
|
+
extraLayout,
|
|
28
|
+
extraOptions,
|
|
29
|
+
onError,
|
|
30
|
+
onWarning
|
|
31
|
+
} = _ref;
|
|
32
|
+
|
|
31
33
|
const _validator = _index5.default[inputFormat] || _index5.default.noValidation;
|
|
32
34
|
|
|
33
35
|
const _adapter = _index3.default[inputFormat + '_' + outputFormat];
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.createVisualization = createVisualization;
|
|
7
6
|
Object.defineProperty(exports, "Config", {
|
|
8
7
|
enumerable: true,
|
|
9
8
|
get: function () {
|
|
@@ -16,6 +15,7 @@ Object.defineProperty(exports, "Store", {
|
|
|
16
15
|
return _index2.default;
|
|
17
16
|
}
|
|
18
17
|
});
|
|
18
|
+
exports.createVisualization = createVisualization;
|
|
19
19
|
exports.default = void 0;
|
|
20
20
|
|
|
21
21
|
var _isArray = _interopRequireDefault(require("d2-utilizr/lib/isArray"));
|
|
@@ -34,7 +34,11 @@ const defaultWarning = warning => {
|
|
|
34
34
|
console.log(warning);
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
function createVisualization(data, layout, el, extraOptions
|
|
37
|
+
function createVisualization(data, layout, el, extraOptions) {
|
|
38
|
+
let error = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : defaultError;
|
|
39
|
+
let warning = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : defaultWarning;
|
|
40
|
+
let outputFormat = arguments.length > 6 ? arguments[6] : undefined;
|
|
41
|
+
|
|
38
42
|
const _data = (0, _isArray.default)(data) ? data : [data];
|
|
39
43
|
|
|
40
44
|
const store = new _index2.default({
|
|
@@ -66,12 +66,13 @@ function getValueFunction(type) {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
function _default({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
function _default(_ref) {
|
|
70
|
+
let {
|
|
71
|
+
type,
|
|
72
|
+
data,
|
|
73
|
+
seriesId,
|
|
74
|
+
categoryId
|
|
75
|
+
} = _ref;
|
|
75
76
|
const valueFunction = getValueFunction(type);
|
|
76
77
|
return data.reduce((acc, res) => {
|
|
77
78
|
const headers = res.headers;
|