@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.programsQuery = exports.itemsByDimensionQuery = exports.indicatorsQuery = exports.indicatorGroupsQuery = exports.dimensionsQuery = exports.dataSetsQuery = exports.dataItemsQuery = exports.dataElementsQuery = exports.dataElementOperandsQuery = exports.dataElementGroupsQuery = exports.apiFetchRecommendedIds = exports.apiFetchOptions = exports.apiFetchItemsByDimension = exports.apiFetchGroups = exports.apiFetchDimensions = void 0;
|
|
7
7
|
|
|
8
8
|
var _objectClean = _interopRequireDefault(require("d2-utilizr/lib/objectClean"));
|
|
9
9
|
|
|
@@ -16,21 +16,25 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
16
16
|
// Query definitions
|
|
17
17
|
const dimensionsQuery = {
|
|
18
18
|
resource: 'dimensions',
|
|
19
|
-
params:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
params: _ref => {
|
|
20
|
+
let {
|
|
21
|
+
nameProp
|
|
22
|
+
} = _ref;
|
|
23
|
+
return {
|
|
24
|
+
fields: "id,".concat(nameProp, "~rename(name),dimensionType,dataDimensionType"),
|
|
25
|
+
order: "".concat(nameProp, ":asc"),
|
|
26
|
+
paging: false
|
|
27
|
+
};
|
|
28
|
+
}
|
|
26
29
|
};
|
|
27
30
|
exports.dimensionsQuery = dimensionsQuery;
|
|
28
31
|
const recommendedDimensionsQuery = {
|
|
29
32
|
resource: 'dimensions/recommendations',
|
|
30
|
-
params:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
params: _ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
dxIds,
|
|
36
|
+
ouIds
|
|
37
|
+
} = _ref2;
|
|
34
38
|
const dimensions = [];
|
|
35
39
|
|
|
36
40
|
if (dxIds.length) {
|
|
@@ -49,12 +53,13 @@ const recommendedDimensionsQuery = {
|
|
|
49
53
|
};
|
|
50
54
|
const dataItemsQuery = {
|
|
51
55
|
resource: 'dataItems',
|
|
52
|
-
params:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
params: _ref3 => {
|
|
57
|
+
let {
|
|
58
|
+
nameProp,
|
|
59
|
+
filter,
|
|
60
|
+
searchTerm,
|
|
61
|
+
page
|
|
62
|
+
} = _ref3;
|
|
58
63
|
const filters = []; // TODO: Extract all of this logic out of the query?
|
|
59
64
|
|
|
60
65
|
if ((filter === null || filter === void 0 ? void 0 : filter.dataType) === _dataTypes.DIMENSION_TYPE_EVENT_DATA_ITEM) {
|
|
@@ -83,12 +88,13 @@ const dataItemsQuery = {
|
|
|
83
88
|
exports.dataItemsQuery = dataItemsQuery;
|
|
84
89
|
const indicatorsQuery = {
|
|
85
90
|
resource: 'indicators',
|
|
86
|
-
params:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
params: _ref4 => {
|
|
92
|
+
let {
|
|
93
|
+
nameProp,
|
|
94
|
+
filter,
|
|
95
|
+
searchTerm,
|
|
96
|
+
page
|
|
97
|
+
} = _ref4;
|
|
92
98
|
const filters = [];
|
|
93
99
|
|
|
94
100
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== _dataTypes.DIMENSION_TYPE_ALL) {
|
|
@@ -111,23 +117,27 @@ const indicatorsQuery = {
|
|
|
111
117
|
exports.indicatorsQuery = indicatorsQuery;
|
|
112
118
|
const indicatorGroupsQuery = {
|
|
113
119
|
resource: 'indicatorGroups',
|
|
114
|
-
params:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
params: _ref5 => {
|
|
121
|
+
let {
|
|
122
|
+
nameProp
|
|
123
|
+
} = _ref5;
|
|
124
|
+
return {
|
|
125
|
+
fields: "id,".concat(nameProp, "~rename(name)"),
|
|
126
|
+
order: "".concat(nameProp, ":asc"),
|
|
127
|
+
paging: false
|
|
128
|
+
};
|
|
129
|
+
}
|
|
121
130
|
};
|
|
122
131
|
exports.indicatorGroupsQuery = indicatorGroupsQuery;
|
|
123
132
|
const dataElementsQuery = {
|
|
124
133
|
resource: 'dataElements',
|
|
125
|
-
params:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
134
|
+
params: _ref6 => {
|
|
135
|
+
let {
|
|
136
|
+
nameProp,
|
|
137
|
+
filter,
|
|
138
|
+
searchTerm,
|
|
139
|
+
page
|
|
140
|
+
} = _ref6;
|
|
131
141
|
const idField = (filter === null || filter === void 0 ? void 0 : filter.group) === _dataTypes.DIMENSION_TYPE_ALL ? 'id' : 'dimensionItem~rename(id)';
|
|
132
142
|
const filters = ['domainType:eq:AGGREGATE'];
|
|
133
143
|
|
|
@@ -151,25 +161,32 @@ const dataElementsQuery = {
|
|
|
151
161
|
exports.dataElementsQuery = dataElementsQuery;
|
|
152
162
|
const dataElementGroupsQuery = {
|
|
153
163
|
resource: 'dataElementGroups',
|
|
154
|
-
params:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
164
|
+
params: _ref7 => {
|
|
165
|
+
let {
|
|
166
|
+
nameProp
|
|
167
|
+
} = _ref7;
|
|
168
|
+
return {
|
|
169
|
+
fields: "id,".concat(nameProp, "~rename(name)"),
|
|
170
|
+
order: "".concat(nameProp, ":asc"),
|
|
171
|
+
paging: false
|
|
172
|
+
};
|
|
173
|
+
}
|
|
161
174
|
};
|
|
162
175
|
exports.dataElementGroupsQuery = dataElementGroupsQuery;
|
|
163
176
|
const itemsByDimensionQuery = {
|
|
164
177
|
resource: "dimensions",
|
|
165
|
-
id:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
178
|
+
id: _ref8 => {
|
|
179
|
+
let {
|
|
180
|
+
id
|
|
181
|
+
} = _ref8;
|
|
182
|
+
return "".concat(id, "/items");
|
|
183
|
+
},
|
|
184
|
+
params: _ref9 => {
|
|
185
|
+
let {
|
|
186
|
+
searchTerm,
|
|
187
|
+
page,
|
|
188
|
+
nameProp
|
|
189
|
+
} = _ref9;
|
|
173
190
|
const filters = [];
|
|
174
191
|
|
|
175
192
|
if (searchTerm) {
|
|
@@ -188,12 +205,13 @@ const itemsByDimensionQuery = {
|
|
|
188
205
|
exports.itemsByDimensionQuery = itemsByDimensionQuery;
|
|
189
206
|
const dataElementOperandsQuery = {
|
|
190
207
|
resource: 'dataElementOperands',
|
|
191
|
-
params:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
208
|
+
params: _ref10 => {
|
|
209
|
+
let {
|
|
210
|
+
nameProp,
|
|
211
|
+
filter,
|
|
212
|
+
searchTerm,
|
|
213
|
+
page
|
|
214
|
+
} = _ref10;
|
|
197
215
|
const idField = (filter === null || filter === void 0 ? void 0 : filter.group) === _dataTypes.DIMENSION_TYPE_ALL ? 'id' : 'dimensionItem~rename(id)';
|
|
198
216
|
const filters = [];
|
|
199
217
|
|
|
@@ -217,12 +235,13 @@ const dataElementOperandsQuery = {
|
|
|
217
235
|
exports.dataElementOperandsQuery = dataElementOperandsQuery;
|
|
218
236
|
const dataSetsQuery = {
|
|
219
237
|
resource: 'dataSets',
|
|
220
|
-
params:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
238
|
+
params: _ref11 => {
|
|
239
|
+
let {
|
|
240
|
+
nameProp,
|
|
241
|
+
searchTerm,
|
|
242
|
+
filter,
|
|
243
|
+
page
|
|
244
|
+
} = _ref11;
|
|
226
245
|
const filters = [];
|
|
227
246
|
|
|
228
247
|
if (searchTerm) {
|
|
@@ -251,13 +270,16 @@ const dataSetsQuery = {
|
|
|
251
270
|
exports.dataSetsQuery = dataSetsQuery;
|
|
252
271
|
const programsQuery = {
|
|
253
272
|
resource: 'programs',
|
|
254
|
-
params:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
273
|
+
params: _ref12 => {
|
|
274
|
+
let {
|
|
275
|
+
nameProp
|
|
276
|
+
} = _ref12;
|
|
277
|
+
return {
|
|
278
|
+
fields: "id,".concat(nameProp, "~rename(name)"),
|
|
279
|
+
order: "".concat(nameProp, ":asc"),
|
|
280
|
+
paging: false
|
|
281
|
+
};
|
|
282
|
+
}
|
|
261
283
|
}; // Fetch functions
|
|
262
284
|
|
|
263
285
|
exports.programsQuery = programsQuery;
|
|
@@ -291,13 +313,15 @@ const apiFetchRecommendedIds = async (dataEngine, dxIds, ouIds) => {
|
|
|
291
313
|
|
|
292
314
|
exports.apiFetchRecommendedIds = apiFetchRecommendedIds;
|
|
293
315
|
|
|
294
|
-
const apiFetchOptions =
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
316
|
+
const apiFetchOptions = _ref13 => {
|
|
317
|
+
let {
|
|
318
|
+
dataEngine,
|
|
319
|
+
nameProp,
|
|
320
|
+
filter,
|
|
321
|
+
searchTerm,
|
|
322
|
+
page
|
|
323
|
+
} = _ref13;
|
|
324
|
+
|
|
301
325
|
switch (filter === null || filter === void 0 ? void 0 : filter.dataType) {
|
|
302
326
|
case _dataTypes.DIMENSION_TYPE_INDICATOR:
|
|
303
327
|
{
|
|
@@ -420,13 +444,14 @@ const apiFetchGroups = async (dataEngine, dataType, nameProp) => {
|
|
|
420
444
|
|
|
421
445
|
exports.apiFetchGroups = apiFetchGroups;
|
|
422
446
|
|
|
423
|
-
const fetchIndicators = async
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
447
|
+
const fetchIndicators = async _ref14 => {
|
|
448
|
+
let {
|
|
449
|
+
dataEngine,
|
|
450
|
+
nameProp,
|
|
451
|
+
filter,
|
|
452
|
+
searchTerm,
|
|
453
|
+
page
|
|
454
|
+
} = _ref14;
|
|
430
455
|
const indicatorsData = await dataEngine.query({
|
|
431
456
|
indicators: indicatorsQuery
|
|
432
457
|
}, {
|
|
@@ -442,13 +467,14 @@ const fetchIndicators = async ({
|
|
|
442
467
|
return formatResponse(response.indicators, response.pager);
|
|
443
468
|
};
|
|
444
469
|
|
|
445
|
-
const fetchDataItems = async
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
470
|
+
const fetchDataItems = async _ref15 => {
|
|
471
|
+
let {
|
|
472
|
+
dataEngine,
|
|
473
|
+
nameProp,
|
|
474
|
+
filter,
|
|
475
|
+
searchTerm,
|
|
476
|
+
page
|
|
477
|
+
} = _ref15;
|
|
452
478
|
const dataItemsData = await dataEngine.query({
|
|
453
479
|
dataItems: dataItemsQuery
|
|
454
480
|
}, {
|
|
@@ -469,13 +495,14 @@ const formatResponse = (dimensionItems, pager) => ({
|
|
|
469
495
|
nextPage: pager.nextPage ? pager.page + 1 : null
|
|
470
496
|
});
|
|
471
497
|
|
|
472
|
-
const fetchDataElements = async
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
498
|
+
const fetchDataElements = async _ref16 => {
|
|
499
|
+
let {
|
|
500
|
+
dataEngine,
|
|
501
|
+
nameProp,
|
|
502
|
+
filter,
|
|
503
|
+
searchTerm,
|
|
504
|
+
page
|
|
505
|
+
} = _ref16;
|
|
479
506
|
const dataElementsData = await dataEngine.query({
|
|
480
507
|
dataElements: dataElementsQuery
|
|
481
508
|
}, {
|
|
@@ -491,13 +518,14 @@ const fetchDataElements = async ({
|
|
|
491
518
|
return formatResponse(response.dataElements, response.pager);
|
|
492
519
|
};
|
|
493
520
|
|
|
494
|
-
const apiFetchItemsByDimension = async
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
521
|
+
const apiFetchItemsByDimension = async _ref17 => {
|
|
522
|
+
let {
|
|
523
|
+
dataEngine,
|
|
524
|
+
dimensionId,
|
|
525
|
+
searchTerm,
|
|
526
|
+
page,
|
|
527
|
+
nameProp
|
|
528
|
+
} = _ref17;
|
|
501
529
|
const itemsByDimensionData = await dataEngine.query({
|
|
502
530
|
itemsByDimensions: itemsByDimensionQuery
|
|
503
531
|
}, {
|
|
@@ -515,13 +543,14 @@ const apiFetchItemsByDimension = async ({
|
|
|
515
543
|
|
|
516
544
|
exports.apiFetchItemsByDimension = apiFetchItemsByDimension;
|
|
517
545
|
|
|
518
|
-
const fetchDataElementOperands = async
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
546
|
+
const fetchDataElementOperands = async _ref18 => {
|
|
547
|
+
let {
|
|
548
|
+
dataEngine,
|
|
549
|
+
nameProp,
|
|
550
|
+
filter,
|
|
551
|
+
searchTerm,
|
|
552
|
+
page
|
|
553
|
+
} = _ref18;
|
|
525
554
|
const dataElementOperandsData = await dataEngine.query({
|
|
526
555
|
dataElementOperands: dataElementOperandsQuery
|
|
527
556
|
}, {
|
|
@@ -537,13 +566,14 @@ const fetchDataElementOperands = async ({
|
|
|
537
566
|
return formatResponse(response.dataElementOperands, response.pager);
|
|
538
567
|
};
|
|
539
568
|
|
|
540
|
-
const fetchDataSets = async
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
569
|
+
const fetchDataSets = async _ref19 => {
|
|
570
|
+
let {
|
|
571
|
+
dataEngine,
|
|
572
|
+
nameProp,
|
|
573
|
+
searchTerm,
|
|
574
|
+
filter,
|
|
575
|
+
page
|
|
576
|
+
} = _ref19;
|
|
547
577
|
const dataSetsData = await dataEngine.query({
|
|
548
578
|
dataSets: dataSetsQuery
|
|
549
579
|
}, {
|
|
@@ -3,27 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.apiFetchOrganisationUnits = exports.apiFetchOrganisationUnitRoots = exports.apiFetchOrganisationUnitLevels = exports.apiFetchOrganisationUnitGroups = exports.apiFetchOrganisationUnit = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = require("./index.js");
|
|
9
9
|
|
|
10
10
|
const orgUnitLevelsQuery = {
|
|
11
11
|
resource: 'organisationUnitLevels',
|
|
12
|
-
params: ({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
params: function () {
|
|
13
|
+
let {
|
|
14
|
+
displayNameProp = 'displayName'
|
|
15
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
+
return {
|
|
17
|
+
fields: "id,level,".concat(displayNameProp, "~rename(displayName),name"),
|
|
18
|
+
paging: false
|
|
19
|
+
};
|
|
20
|
+
}
|
|
18
21
|
};
|
|
19
22
|
const orgUnitGroupsQuery = {
|
|
20
23
|
resource: 'organisationUnitGroups',
|
|
21
|
-
params: ({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
params: function () {
|
|
25
|
+
let {
|
|
26
|
+
displayNameProp = 'displayName'
|
|
27
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28
|
+
return {
|
|
29
|
+
fields: "id,".concat(displayNameProp, "~rename(displayName),name"),
|
|
30
|
+
paging: false
|
|
31
|
+
};
|
|
32
|
+
}
|
|
27
33
|
};
|
|
28
34
|
const orgUnitRootsQuery = {
|
|
29
35
|
resource: 'organisationUnits',
|
|
@@ -35,20 +41,26 @@ const orgUnitRootsQuery = {
|
|
|
35
41
|
};
|
|
36
42
|
const orgUnitsQuery = {
|
|
37
43
|
resource: 'organisationUnits',
|
|
38
|
-
params:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
params: _ref => {
|
|
45
|
+
let {
|
|
46
|
+
displayNameProp
|
|
47
|
+
} = _ref;
|
|
48
|
+
return {
|
|
49
|
+
fields: "id,path,".concat(displayNameProp, "~rename(displayName),children::isNotEmpty"),
|
|
50
|
+
level: 1,
|
|
51
|
+
userDataViewFallback: true,
|
|
52
|
+
paging: false
|
|
53
|
+
};
|
|
54
|
+
}
|
|
46
55
|
};
|
|
47
56
|
const orgUnitQuery = {
|
|
48
57
|
resource: 'organisationUnits',
|
|
49
|
-
id:
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
id: _ref2 => {
|
|
59
|
+
let {
|
|
60
|
+
id
|
|
61
|
+
} = _ref2;
|
|
62
|
+
return id;
|
|
63
|
+
},
|
|
52
64
|
params: {
|
|
53
65
|
fields: 'id,level,displayName~rename(name),path,parent[id,displayName~rename(name)],children[level]',
|
|
54
66
|
userDataViewFallback: true,
|
|
@@ -25,9 +25,9 @@ var _list = require("../../modules/list.js");
|
|
|
25
25
|
|
|
26
26
|
var _AboutAOUnitStyle = _interopRequireDefault(require("./styles/AboutAOUnit.style.js"));
|
|
27
27
|
|
|
28
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
28
|
+
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); }
|
|
29
29
|
|
|
30
|
-
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; }
|
|
30
|
+
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; }
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
@@ -37,18 +37,24 @@ const READ_AND_WRITE = 'rw';
|
|
|
37
37
|
const getQueries = type => ({
|
|
38
38
|
ao: {
|
|
39
39
|
resource: type,
|
|
40
|
-
id:
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
id: _ref => {
|
|
41
|
+
let {
|
|
42
|
+
id
|
|
43
|
+
} = _ref;
|
|
44
|
+
return id;
|
|
45
|
+
},
|
|
43
46
|
params: {
|
|
44
47
|
fields: 'id,displayDescription,created,createdBy[displayName],lastUpdated,subscribed,publicAccess,userAccesses[displayName,access],userGroupAccesses[displayName,access]'
|
|
45
48
|
}
|
|
46
49
|
},
|
|
47
50
|
dataStatistics: {
|
|
48
51
|
resource: 'dataStatistics/favorites',
|
|
49
|
-
id:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
id: _ref2 => {
|
|
53
|
+
let {
|
|
54
|
+
id
|
|
55
|
+
} = _ref2;
|
|
56
|
+
return id;
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
});
|
|
54
60
|
|
|
@@ -62,10 +68,11 @@ const getUnsubscribeMutation = (type, id) => ({
|
|
|
62
68
|
type: 'delete'
|
|
63
69
|
});
|
|
64
70
|
|
|
65
|
-
const AboutAOUnit =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
const AboutAOUnit = _ref3 => {
|
|
72
|
+
let {
|
|
73
|
+
type,
|
|
74
|
+
id
|
|
75
|
+
} = _ref3;
|
|
69
76
|
const [isExpanded, setIsExpanded] = (0, _react.useState)(true);
|
|
70
77
|
const queries = (0, _react.useMemo)(() => getQueries(type), []);
|
|
71
78
|
const {
|
|
@@ -150,7 +157,9 @@ const AboutAOUnit = ({
|
|
|
150
157
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
151
158
|
onClick: () => setIsExpanded(!isExpanded),
|
|
152
159
|
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "header"
|
|
153
|
-
},
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
161
|
+
className: "jsx-".concat(_AboutAOUnitStyle.default.__hash) + " " + "title"
|
|
162
|
+
}, _d2I18n.default.t('About this visualization')), isExpanded ? /*#__PURE__*/_react.default.createElement(_ui.IconChevronUp24, {
|
|
154
163
|
color: _ui.colors.grey700
|
|
155
164
|
}) : /*#__PURE__*/_react.default.createElement(_ui.IconChevronDown24, {
|
|
156
165
|
color: _ui.colors.grey700
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
10
|
-
const _defaultExport = [".container.jsx-
|
|
11
|
-
_defaultExport.__hash = "
|
|
10
|
+
const _defaultExport = [".container.jsx-1596217846{position:relative;padding:".concat(_ui.spacers.dp16, ";border-bottom:1px solid ").concat(_ui.colors.grey400, ";background-color:").concat(_ui.colors.white, ";}"), ".expanded.jsx-1596217846{padding-bottom:".concat(_ui.spacers.dp32, ";}"), ".loader.jsx-1596217846{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".header.jsx-1596217846{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;}", ".title.jsx-1596217846{font-size:16px;font-weight:500;line-height:21px;color:".concat(_ui.colors.grey900, ";}"), ".content.jsx-1596217846{font-size:14px;line-height:18px;color:".concat(_ui.colors.grey900, ";}"), ".detailLine.jsx-1596217846{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:0;padding:".concat(_ui.spacers.dp12, " 0 0 0;gap:").concat(_ui.spacers.dp8, ";}"), ".detailLine.jsx-1596217846 svg.jsx-1596217846{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".noDescription.jsx-1596217846{color:".concat(_ui.colors.grey600, ";}"), ".subsection.jsx-1596217846{margin-top:".concat(_ui.spacers.dp24, ";}"), ".subsectionTitle.jsx-1596217846{color:".concat(_ui.colors.grey700, ";font-weight:500;}"), ".subscriptionLabel.jsx-1596217846{margin:".concat(_ui.spacers.dp12, " 0 ").concat(_ui.spacers.dp8, " 0;}"), ".subsection.jsx-1596217846 button.jsx-1596217846{margin-top:".concat(_ui.spacers.dp8, ";}")];
|
|
11
|
+
_defaultExport.__hash = "1596217846";
|
|
12
12
|
var _default = _defaultExport;
|
|
13
13
|
exports.default = _default;
|
|
@@ -15,19 +15,20 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
18
|
+
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); }
|
|
19
19
|
|
|
20
|
-
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; }
|
|
20
|
+
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; }
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
24
|
const CachedDataQueryCtx = /*#__PURE__*/(0, _react.createContext)({});
|
|
25
25
|
|
|
26
|
-
const CachedDataQueryProvider =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const CachedDataQueryProvider = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
query,
|
|
29
|
+
dataTransformation,
|
|
30
|
+
children
|
|
31
|
+
} = _ref;
|
|
31
32
|
const {
|
|
32
33
|
data: rawData,
|
|
33
34
|
...rest
|
|
@@ -15,12 +15,14 @@ var _ItemSelector = _interopRequireDefault(require("./ItemSelector.js"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const DataDimension =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const DataDimension = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
onSelect,
|
|
21
|
+
selectedDimensions,
|
|
22
|
+
displayNameProp,
|
|
23
|
+
infoBoxMessage
|
|
24
|
+
} = _ref;
|
|
25
|
+
|
|
24
26
|
const onSelectItems = selectedItem => onSelect({
|
|
25
27
|
dimensionId: _predefinedDimensions.DIMENSION_ID_DATA,
|
|
26
28
|
items: selectedItem.map(item => ({
|
|
@@ -21,13 +21,14 @@ var _DataTypeSelectorStyle = _interopRequireDefault(require("./styles/DataTypeSe
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
const DataTypeSelector =
|
|
25
|
-
currentDataType,
|
|
26
|
-
onChange,
|
|
27
|
-
dataTest
|
|
28
|
-
}) => {
|
|
24
|
+
const DataTypeSelector = _ref => {
|
|
29
25
|
var _dataTypes$currentDat;
|
|
30
26
|
|
|
27
|
+
let {
|
|
28
|
+
currentDataType,
|
|
29
|
+
onChange,
|
|
30
|
+
dataTest
|
|
31
|
+
} = _ref;
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
33
|
className: "jsx-".concat(_DataTypeSelectorStyle.default.__hash) + " " + "container"
|
|
33
34
|
}, /*#__PURE__*/_react.default.createElement(_ui.SingleSelectField, {
|
|
@@ -26,11 +26,12 @@ const getOptions = () => ({
|
|
|
26
26
|
[_dataTypes.DETAIL]: _index.default.t('Details only')
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
const DetailSelector =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
const DetailSelector = _ref => {
|
|
30
|
+
let {
|
|
31
|
+
currentValue,
|
|
32
|
+
onChange,
|
|
33
|
+
dataTest
|
|
34
|
+
} = _ref;
|
|
34
35
|
const options = getOptions();
|
|
35
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
37
|
className: "jsx-".concat(_DetailSelectorStyle.default.__hash) + " " + "detail-container"
|