@dhis2/analytics 28.0.2 → 28.0.4
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/build/cjs/__demo__/DataDimension.stories.js +3 -4
- package/build/cjs/__demo__/Filter.stories.js +1 -2
- package/build/cjs/__demo__/FixedPeriodSelect.stories.js +1 -2
- package/build/cjs/__demo__/OpenFileDialog.stories.js +2 -2
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +3 -4
- package/build/cjs/__demo__/PeriodDimension.stories.js +2 -2
- package/build/cjs/__demo__/PivotTable.stories.js +166 -224
- package/build/cjs/__demo__/ScatterPlotPdfExport.stories.js +1 -2
- package/build/cjs/__demo__/SingleValue.stories.js +1 -2
- package/build/cjs/__demo__/Toolbar.stories.js +1 -2
- package/build/cjs/api/__tests__/dimensions.spec.js +1 -2
- package/build/cjs/api/analytics/Analytics.js +8 -9
- package/build/cjs/api/analytics/AnalyticsBase.js +58 -77
- package/build/cjs/api/analytics/AnalyticsRequest.js +1 -2
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +18 -21
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
- package/build/cjs/api/analytics/AnalyticsResponseHeader.js +5 -7
- package/build/cjs/api/analytics/__tests__/AnalyticsBase.spec.js +9 -12
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
- package/build/cjs/api/analytics/utils.js +11 -17
- package/build/cjs/api/dimensions.js +119 -148
- package/build/cjs/api/expression.js +39 -60
- package/build/cjs/api/organisationUnits.js +23 -35
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +12 -20
- package/build/cjs/components/CachedDataQueryProvider.js +7 -9
- package/build/cjs/components/DashboardPluginWrapper/DashboardPluginWrapper.js +18 -22
- package/build/cjs/components/DataDimension/Calculation/CalculationModal.js +44 -61
- package/build/cjs/components/DataDimension/Calculation/DataElementOption.js +5 -6
- package/build/cjs/components/DataDimension/Calculation/DataElementSelector.js +29 -38
- package/build/cjs/components/DataDimension/Calculation/DndContext.js +29 -37
- package/build/cjs/components/DataDimension/Calculation/DraggingItem.js +5 -6
- package/build/cjs/components/DataDimension/Calculation/DropZone.js +4 -5
- package/build/cjs/components/DataDimension/Calculation/FormulaField.js +29 -32
- package/build/cjs/components/DataDimension/Calculation/FormulaItem.js +14 -16
- package/build/cjs/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
- package/build/cjs/components/DataDimension/Calculation/Operator.js +6 -7
- package/build/cjs/components/DataDimension/DataDimension.js +20 -32
- package/build/cjs/components/DataDimension/Info/CalculationInfo.js +14 -22
- package/build/cjs/components/DataDimension/Info/DataElementInfo.js +23 -36
- package/build/cjs/components/DataDimension/Info/DataElementOperandInfo.js +30 -44
- package/build/cjs/components/DataDimension/Info/DataSetInfo.js +26 -39
- package/build/cjs/components/DataDimension/Info/EventDataItemInfo.js +21 -34
- package/build/cjs/components/DataDimension/Info/IndicatorInfo.js +21 -32
- package/build/cjs/components/DataDimension/Info/InfoPopover.js +6 -7
- package/build/cjs/components/DataDimension/Info/InfoTable.js +39 -52
- package/build/cjs/components/DataDimension/Info/OptionInfo.js +13 -20
- package/build/cjs/components/DataDimension/Info/ProgramIndicatorInfo.js +46 -58
- package/build/cjs/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +22 -32
- package/build/cjs/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
- package/build/cjs/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
- package/build/cjs/components/DataDimension/ItemSelector/GroupSelector.js +10 -12
- package/build/cjs/components/DataDimension/ItemSelector/ItemSelector.js +86 -104
- package/build/cjs/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
- package/build/cjs/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
- package/build/cjs/components/DataDimension/TransferOption.js +35 -39
- package/build/cjs/components/DimensionMenu.js +13 -14
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +8 -9
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +12 -13
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +9 -10
- package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -13
- package/build/cjs/components/DynamicDimension/ItemSelector.js +25 -38
- package/build/cjs/components/FileMenu/DeleteDialog.js +11 -16
- package/build/cjs/components/FileMenu/FileMenu.js +19 -30
- package/build/cjs/components/FileMenu/GetLinkDialog.js +7 -7
- package/build/cjs/components/FileMenu/RenameDialog.js +13 -21
- package/build/cjs/components/FileMenu/SaveAsDialog.js +13 -21
- package/build/cjs/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
- package/build/cjs/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
- package/build/cjs/components/FileMenu/utils.js +10 -12
- package/build/cjs/components/Filter/Filter.js +21 -27
- package/build/cjs/components/Interpretations/InterpretationModal/Comment.js +8 -10
- package/build/cjs/components/Interpretations/InterpretationModal/CommentAddForm.js +10 -15
- package/build/cjs/components/Interpretations/InterpretationModal/CommentDeleteButton.js +10 -15
- package/build/cjs/components/Interpretations/InterpretationModal/CommentUpdateForm.js +12 -17
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationModal.js +19 -25
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationThread.js +12 -14
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationForm.js +12 -17
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +23 -33
- package/build/cjs/components/Interpretations/common/Interpretation/Interpretation.js +13 -15
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +5 -7
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +15 -23
- package/build/cjs/components/Interpretations/common/Interpretation/useLike.js +5 -6
- package/build/cjs/components/Interpretations/common/Message/Message.js +6 -7
- package/build/cjs/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
- package/build/cjs/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
- package/build/cjs/components/Interpretations/common/Message/MessageIconButton.js +34 -40
- package/build/cjs/components/Interpretations/common/Message/MessageInput.js +1 -2
- package/build/cjs/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
- package/build/cjs/components/LegendKey/LegendKey.js +3 -4
- package/build/cjs/components/OfflineTooltip.js +18 -26
- package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +20 -26
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +23 -26
- package/build/cjs/components/OpenFileDialog/DateField.js +3 -4
- package/build/cjs/components/OpenFileDialog/FileList.js +19 -22
- package/build/cjs/components/OpenFileDialog/NameFilter.js +15 -21
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +36 -45
- package/build/cjs/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +28 -37
- package/build/cjs/components/Options/VisualizationOptions.js +35 -46
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +38 -60
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +16 -25
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +15 -21
- package/build/cjs/components/PeriodDimension/PeriodDimension.js +9 -12
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +49 -63
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +24 -30
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +6 -7
- package/build/cjs/components/PeriodDimension/utils/index.js +1 -5
- package/build/cjs/components/PivotTable/PivotTable.js +8 -10
- package/build/cjs/components/PivotTable/PivotTableBody.js +20 -29
- package/build/cjs/components/PivotTable/PivotTableCell.js +8 -12
- package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +14 -17
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
- package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +22 -29
- package/build/cjs/components/PivotTable/PivotTableContainer.js +5 -6
- package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -4
- package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +5 -7
- package/build/cjs/components/PivotTable/PivotTableHead.js +13 -16
- package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +8 -9
- package/build/cjs/components/PivotTable/PivotTableRow.js +20 -27
- package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +19 -24
- package/build/cjs/components/PivotTable/PivotTableTitleRows.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +6 -8
- package/build/cjs/components/RichText/Editor/Editor.js +70 -85
- package/build/cjs/components/RichText/Parser/Parser.js +5 -10
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -24
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +8 -13
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuList.js +9 -17
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +11 -16
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +13 -11
- package/build/cjs/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
- package/build/cjs/components/Toolbar/Toolbar.js +10 -16
- package/build/cjs/components/Toolbar/ToolbarSidebar.js +12 -18
- package/build/cjs/components/Toolbar/UpdateButton.js +18 -24
- package/build/cjs/components/TransferOption.js +14 -15
- package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +17 -25
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +8 -10
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +52 -0
- package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
- package/build/cjs/components/UserMention/UserList.js +6 -7
- package/build/cjs/components/UserMention/UserMentionWrapper.js +13 -20
- package/build/cjs/components/UserMention/useUserSearchResults.js +12 -16
- package/build/cjs/components/VisTypeIcon.js +5 -6
- package/build/cjs/index.js +38 -39
- package/build/cjs/locales/ar_IQ/translations.json +20 -11
- package/build/cjs/locales/cs/translations.json +2 -0
- package/build/cjs/locales/en/translations.json +1 -0
- package/build/cjs/locales/es/translations.json +2 -0
- package/build/cjs/locales/fr/translations.json +2 -0
- package/build/cjs/locales/id/translations.json +20 -11
- package/build/cjs/locales/index.js +62 -62
- package/build/cjs/locales/lo/translations.json +2 -0
- package/build/cjs/locales/nb/translations.json +2 -0
- package/build/cjs/locales/prs/translations.json +2 -0
- package/build/cjs/locales/ps/translations.json +2 -0
- package/build/cjs/locales/pt/translations.json +2 -0
- package/build/cjs/locales/pt_BR/translations.json +2 -0
- package/build/cjs/locales/ru/translations.json +2 -0
- package/build/cjs/locales/si/translations.json +20 -11
- package/build/cjs/locales/sv/translations.json +20 -11
- package/build/cjs/locales/tet/translations.json +20 -11
- package/build/cjs/locales/tg/translations.json +2 -0
- package/build/cjs/locales/uk/translations.json +2 -0
- package/build/cjs/locales/ur/translations.json +2 -0
- package/build/cjs/locales/uz_UZ_Cyrl/translations.json +2 -0
- package/build/cjs/locales/uz_UZ_Latn/translations.json +4 -2
- package/build/cjs/locales/vi/translations.json +2 -0
- package/build/cjs/locales/zh/translations.json +2 -0
- package/build/cjs/locales/zh_CN/translations.json +17 -15
- package/build/cjs/modules/__tests__/expressions.spec.js +4 -5
- package/build/cjs/modules/__tests__/isNumeric.spec.js +33 -0
- package/build/cjs/modules/dimensionListItem.js +4 -5
- package/build/cjs/modules/expressions.js +3 -9
- package/build/cjs/modules/getPWAInstallationStatus.js +7 -9
- package/build/cjs/modules/layout/dimensionCreate.js +1 -3
- package/build/cjs/modules/layout/dimensionIsValid.js +3 -4
- package/build/cjs/modules/legends.js +5 -6
- package/build/cjs/modules/outliers/index.js +5 -6
- package/build/cjs/modules/outliers/iqr.js +4 -6
- package/build/cjs/modules/outliers/modZScore.js +6 -14
- package/build/cjs/modules/outliers/zScore.js +3 -4
- package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +12 -16
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +48 -59
- package/build/cjs/modules/pivotTable/clipAxis.js +7 -8
- package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +9 -10
- package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +8 -9
- package/build/cjs/modules/pivotTable/measureText.js +7 -9
- package/build/cjs/modules/pivotTable/useParentSize.js +1 -2
- package/build/cjs/modules/pivotTable/useScrollPosition.js +1 -2
- package/build/cjs/modules/pivotTable/useTableClipping.js +6 -7
- package/build/cjs/modules/relativeItems/index.js +1 -4
- package/build/cjs/modules/renderValue.js +1 -2
- package/build/cjs/modules/utils.js +11 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +7 -10
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getFormatter.js +2 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getSteps.js +2 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +8 -10
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
- package/build/cjs/visualizations/config/index.js +11 -12
- package/build/cjs/visualizations/config/validators/dhis/index.js +3 -4
- package/build/cjs/visualizations/index.js +1 -4
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
- package/build/cjs/visualizations/store/index.js +15 -17
- package/build/cjs/visualizations/store/validators/dhis/index.js +5 -6
- package/build/cjs/visualizations/util/getFilterText.js +3 -6
- package/build/cjs/visualizations/util/shouldUseContrastColor.js +1 -2
- package/build/es/__demo__/DataDimension.stories.js +2 -2
- package/build/es/__demo__/OpenFileDialog.stories.js +2 -2
- package/build/es/__demo__/OrgUnitDimension.stories.js +2 -2
- package/build/es/__demo__/PeriodDimension.stories.js +2 -2
- package/build/es/__demo__/PivotTable.stories.js +165 -222
- package/build/es/api/__tests__/dimensions.spec.js +1 -2
- package/build/es/api/analytics/Analytics.js +8 -9
- package/build/es/api/analytics/AnalyticsBase.js +58 -77
- package/build/es/api/analytics/AnalyticsRequest.js +1 -2
- package/build/es/api/analytics/AnalyticsRequestBase.js +18 -21
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
- package/build/es/api/analytics/AnalyticsResponseHeader.js +5 -7
- package/build/es/api/analytics/__tests__/AnalyticsBase.spec.js +8 -10
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
- package/build/es/api/analytics/utils.js +11 -17
- package/build/es/api/dimensions.js +119 -148
- package/build/es/api/expression.js +39 -60
- package/build/es/api/organisationUnits.js +23 -35
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +11 -18
- package/build/es/components/CachedDataQueryProvider.js +6 -7
- package/build/es/components/DashboardPluginWrapper/DashboardPluginWrapper.js +17 -20
- package/build/es/components/DataDimension/Calculation/CalculationModal.js +43 -59
- package/build/es/components/DataDimension/Calculation/DataElementOption.js +5 -6
- package/build/es/components/DataDimension/Calculation/DataElementSelector.js +28 -36
- package/build/es/components/DataDimension/Calculation/DndContext.js +28 -35
- package/build/es/components/DataDimension/Calculation/DraggingItem.js +5 -6
- package/build/es/components/DataDimension/Calculation/DropZone.js +4 -5
- package/build/es/components/DataDimension/Calculation/FormulaField.js +29 -32
- package/build/es/components/DataDimension/Calculation/FormulaItem.js +13 -14
- package/build/es/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
- package/build/es/components/DataDimension/Calculation/Operator.js +6 -7
- package/build/es/components/DataDimension/DataDimension.js +19 -30
- package/build/es/components/DataDimension/Info/CalculationInfo.js +13 -20
- package/build/es/components/DataDimension/Info/DataElementInfo.js +23 -36
- package/build/es/components/DataDimension/Info/DataElementOperandInfo.js +29 -42
- package/build/es/components/DataDimension/Info/DataSetInfo.js +26 -39
- package/build/es/components/DataDimension/Info/EventDataItemInfo.js +21 -34
- package/build/es/components/DataDimension/Info/IndicatorInfo.js +20 -30
- package/build/es/components/DataDimension/Info/InfoPopover.js +6 -7
- package/build/es/components/DataDimension/Info/InfoTable.js +39 -52
- package/build/es/components/DataDimension/Info/OptionInfo.js +13 -20
- package/build/es/components/DataDimension/Info/ProgramIndicatorInfo.js +45 -56
- package/build/es/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +21 -30
- package/build/es/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
- package/build/es/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
- package/build/es/components/DataDimension/ItemSelector/GroupSelector.js +9 -10
- package/build/es/components/DataDimension/ItemSelector/ItemSelector.js +85 -102
- package/build/es/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
- package/build/es/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
- package/build/es/components/DataDimension/TransferOption.js +35 -39
- package/build/es/components/DimensionMenu.js +13 -14
- package/build/es/components/DimensionsPanel/DimensionsPanel.js +7 -7
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +11 -11
- package/build/es/components/DimensionsPanel/List/DimensionList.js +8 -8
- package/build/es/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/es/components/DynamicDimension/DynamicDimension.js +9 -13
- package/build/es/components/DynamicDimension/ItemSelector.js +24 -36
- package/build/es/components/FileMenu/DeleteDialog.js +10 -14
- package/build/es/components/FileMenu/FileMenu.js +18 -28
- package/build/es/components/FileMenu/GetLinkDialog.js +7 -7
- package/build/es/components/FileMenu/RenameDialog.js +12 -19
- package/build/es/components/FileMenu/SaveAsDialog.js +12 -19
- package/build/es/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
- package/build/es/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
- package/build/es/components/FileMenu/utils.js +10 -12
- package/build/es/components/Filter/Filter.js +21 -27
- package/build/es/components/Interpretations/InterpretationModal/Comment.js +7 -8
- package/build/es/components/Interpretations/InterpretationModal/CommentAddForm.js +9 -13
- package/build/es/components/Interpretations/InterpretationModal/CommentDeleteButton.js +9 -13
- package/build/es/components/Interpretations/InterpretationModal/CommentUpdateForm.js +11 -15
- package/build/es/components/Interpretations/InterpretationModal/InterpretationModal.js +18 -23
- package/build/es/components/Interpretations/InterpretationModal/InterpretationThread.js +11 -12
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationForm.js +11 -15
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +22 -31
- package/build/es/components/Interpretations/common/Interpretation/Interpretation.js +12 -13
- package/build/es/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
- package/build/es/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +4 -5
- package/build/es/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +14 -21
- package/build/es/components/Interpretations/common/Interpretation/useLike.js +5 -6
- package/build/es/components/Interpretations/common/Message/Message.js +6 -7
- package/build/es/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
- package/build/es/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
- package/build/es/components/Interpretations/common/Message/MessageIconButton.js +34 -40
- package/build/es/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
- package/build/es/components/LegendKey/LegendKey.js +3 -4
- package/build/es/components/OfflineTooltip.js +18 -26
- package/build/es/components/OpenFileDialog/CreatedByFilter.js +20 -26
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +23 -26
- package/build/es/components/OpenFileDialog/DateField.js +3 -4
- package/build/es/components/OpenFileDialog/FileList.js +19 -22
- package/build/es/components/OpenFileDialog/NameFilter.js +15 -21
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +35 -43
- package/build/es/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/es/components/OpenFileDialog/VisTypeFilter.js +28 -37
- package/build/es/components/Options/VisualizationOptions.js +34 -44
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +37 -58
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +16 -25
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +14 -19
- package/build/es/components/PeriodDimension/PeriodDimension.js +9 -12
- package/build/es/components/PeriodDimension/PeriodTransfer.js +48 -61
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +24 -30
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
- package/build/es/components/PeriodDimension/utils/fixedPeriods.js +6 -7
- package/build/es/components/PeriodDimension/utils/index.js +1 -5
- package/build/es/components/PivotTable/PivotTable.js +7 -8
- package/build/es/components/PivotTable/PivotTableBody.js +20 -29
- package/build/es/components/PivotTable/PivotTableCell.js +8 -12
- package/build/es/components/PivotTable/PivotTableClippedAxis.js +14 -17
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
- package/build/es/components/PivotTable/PivotTableColumnHeaders.js +22 -29
- package/build/es/components/PivotTable/PivotTableContainer.js +5 -6
- package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
- package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -4
- package/build/es/components/PivotTable/PivotTableEmptyRow.js +4 -5
- package/build/es/components/PivotTable/PivotTableEngineContext.js +4 -5
- package/build/es/components/PivotTable/PivotTableHead.js +13 -16
- package/build/es/components/PivotTable/PivotTableHeaderCell.js +8 -9
- package/build/es/components/PivotTable/PivotTableRow.js +20 -27
- package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
- package/build/es/components/PivotTable/PivotTableSortIcon.js +4 -5
- package/build/es/components/PivotTable/PivotTableTitleRow.js +18 -22
- package/build/es/components/PivotTable/PivotTableTitleRows.js +4 -5
- package/build/es/components/PivotTable/PivotTableValueCell.js +5 -6
- package/build/es/components/RichText/Editor/Editor.js +69 -83
- package/build/es/components/RichText/Parser/Parser.js +4 -8
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -23
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +7 -11
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuList.js +8 -15
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +10 -14
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +6 -4
- package/build/es/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
- package/build/es/components/Toolbar/Toolbar.js +10 -16
- package/build/es/components/Toolbar/ToolbarSidebar.js +12 -18
- package/build/es/components/Toolbar/UpdateButton.js +18 -24
- package/build/es/components/TransferOption.js +14 -15
- package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
- package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +16 -23
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -8
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/es/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +49 -0
- package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
- package/build/es/components/UserMention/UserList.js +6 -7
- package/build/es/components/UserMention/UserMentionWrapper.js +12 -18
- package/build/es/components/UserMention/useUserSearchResults.js +12 -16
- package/build/es/components/VisTypeIcon.js +5 -6
- package/build/es/locales/ar_IQ/translations.json +20 -11
- package/build/es/locales/cs/translations.json +2 -0
- package/build/es/locales/en/translations.json +1 -0
- package/build/es/locales/es/translations.json +2 -0
- package/build/es/locales/fr/translations.json +2 -0
- package/build/es/locales/id/translations.json +20 -11
- package/build/es/locales/lo/translations.json +2 -0
- package/build/es/locales/nb/translations.json +2 -0
- package/build/es/locales/prs/translations.json +2 -0
- package/build/es/locales/ps/translations.json +2 -0
- package/build/es/locales/pt/translations.json +2 -0
- package/build/es/locales/pt_BR/translations.json +2 -0
- package/build/es/locales/ru/translations.json +2 -0
- package/build/es/locales/si/translations.json +20 -11
- package/build/es/locales/sv/translations.json +20 -11
- package/build/es/locales/tet/translations.json +20 -11
- package/build/es/locales/tg/translations.json +2 -0
- package/build/es/locales/uk/translations.json +2 -0
- package/build/es/locales/ur/translations.json +2 -0
- package/build/es/locales/uz_UZ_Cyrl/translations.json +2 -0
- package/build/es/locales/uz_UZ_Latn/translations.json +4 -2
- package/build/es/locales/vi/translations.json +2 -0
- package/build/es/locales/zh/translations.json +2 -0
- package/build/es/locales/zh_CN/translations.json +17 -15
- package/build/es/modules/__tests__/expressions.spec.js +4 -5
- package/build/es/modules/__tests__/isNumeric.spec.js +31 -0
- package/build/es/modules/dimensionListItem.js +4 -5
- package/build/es/modules/expressions.js +3 -9
- package/build/es/modules/getPWAInstallationStatus.js +7 -9
- package/build/es/modules/layout/dimensionCreate.js +1 -3
- package/build/es/modules/layout/dimensionIsValid.js +3 -4
- package/build/es/modules/legends.js +5 -6
- package/build/es/modules/outliers/index.js +2 -3
- package/build/es/modules/outliers/iqr.js +4 -6
- package/build/es/modules/outliers/modZScore.js +6 -14
- package/build/es/modules/outliers/zScore.js +3 -4
- package/build/es/modules/pivotTable/AdaptiveClippingController.js +12 -16
- package/build/es/modules/pivotTable/PivotTableEngine.js +48 -59
- package/build/es/modules/pivotTable/clipAxis.js +7 -8
- package/build/es/modules/pivotTable/clipPartitionedAxis.js +9 -10
- package/build/es/modules/pivotTable/getHeaderForDisplay.js +8 -9
- package/build/es/modules/pivotTable/measureText.js +7 -9
- package/build/es/modules/pivotTable/useParentSize.js +1 -2
- package/build/es/modules/pivotTable/useScrollPosition.js +1 -2
- package/build/es/modules/pivotTable/useTableClipping.js +6 -7
- package/build/es/modules/relativeItems/index.js +1 -4
- package/build/es/modules/renderValue.js +1 -2
- package/build/es/modules/utils.js +9 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +2 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/getFormatter.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/getSteps.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +7 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
- package/build/es/visualizations/config/index.js +11 -12
- package/build/es/visualizations/config/validators/dhis/index.js +3 -4
- package/build/es/visualizations/index.js +1 -4
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
- package/build/es/visualizations/store/index.js +15 -17
- package/build/es/visualizations/store/validators/dhis/index.js +5 -6
- package/build/es/visualizations/util/getFilterText.js +3 -6
- package/build/es/visualizations/util/shouldUseContrastColor.js +1 -2
- package/package.json +12 -12
|
@@ -5,24 +5,20 @@ import { onError } from './index.js';
|
|
|
5
5
|
// Query definitions
|
|
6
6
|
export const dimensionsQuery = {
|
|
7
7
|
resource: 'dimensions',
|
|
8
|
-
params:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
paging: false
|
|
16
|
-
};
|
|
17
|
-
}
|
|
8
|
+
params: ({
|
|
9
|
+
nameProp
|
|
10
|
+
}) => ({
|
|
11
|
+
fields: `id,${nameProp}~rename(name),dimensionType,dataDimensionType`,
|
|
12
|
+
order: `${nameProp}:asc`,
|
|
13
|
+
paging: false
|
|
14
|
+
})
|
|
18
15
|
};
|
|
19
16
|
const recommendedDimensionsQuery = {
|
|
20
17
|
resource: 'dimensions/recommendations',
|
|
21
|
-
params:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref2;
|
|
18
|
+
params: ({
|
|
19
|
+
dxIds,
|
|
20
|
+
ouIds
|
|
21
|
+
}) => {
|
|
26
22
|
const dimensions = [];
|
|
27
23
|
if (dxIds.length) {
|
|
28
24
|
dimensions.push(`dx:${dxIds.join(';')}`);
|
|
@@ -38,13 +34,12 @@ const recommendedDimensionsQuery = {
|
|
|
38
34
|
};
|
|
39
35
|
export const dataItemsQuery = {
|
|
40
36
|
resource: 'dataItems',
|
|
41
|
-
params:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} = _ref3;
|
|
37
|
+
params: ({
|
|
38
|
+
nameProp,
|
|
39
|
+
filter,
|
|
40
|
+
searchTerm,
|
|
41
|
+
page
|
|
42
|
+
}) => {
|
|
48
43
|
let fields = `id,${nameProp}~rename(name),dimensionItemType,expression,optionSetId`;
|
|
49
44
|
const filters = [];
|
|
50
45
|
|
|
@@ -80,13 +75,12 @@ export const dataItemsQuery = {
|
|
|
80
75
|
};
|
|
81
76
|
export const indicatorsQuery = {
|
|
82
77
|
resource: 'indicators',
|
|
83
|
-
params:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
} = _ref4;
|
|
78
|
+
params: ({
|
|
79
|
+
nameProp,
|
|
80
|
+
filter,
|
|
81
|
+
searchTerm,
|
|
82
|
+
page
|
|
83
|
+
}) => {
|
|
90
84
|
const filters = [];
|
|
91
85
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== DIMENSION_TYPE_ALL) {
|
|
92
86
|
filters.push(`indicatorGroups.id:eq:${filter.group}`);
|
|
@@ -105,26 +99,22 @@ export const indicatorsQuery = {
|
|
|
105
99
|
};
|
|
106
100
|
export const indicatorGroupsQuery = {
|
|
107
101
|
resource: 'indicatorGroups',
|
|
108
|
-
params:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
paging: false
|
|
116
|
-
};
|
|
117
|
-
}
|
|
102
|
+
params: ({
|
|
103
|
+
nameProp
|
|
104
|
+
}) => ({
|
|
105
|
+
fields: `id,${nameProp}~rename(name)`,
|
|
106
|
+
order: `${nameProp}:asc`,
|
|
107
|
+
paging: false
|
|
108
|
+
})
|
|
118
109
|
};
|
|
119
110
|
export const dataElementsQuery = {
|
|
120
111
|
resource: 'dataElements',
|
|
121
|
-
params:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} = _ref6;
|
|
112
|
+
params: ({
|
|
113
|
+
nameProp,
|
|
114
|
+
filter,
|
|
115
|
+
searchTerm,
|
|
116
|
+
page
|
|
117
|
+
}) => {
|
|
128
118
|
const idField = (filter === null || filter === void 0 ? void 0 : filter.group) === DIMENSION_TYPE_ALL ? 'id' : 'dimensionItem~rename(id)';
|
|
129
119
|
const filters = ['domainType:eq:AGGREGATE'];
|
|
130
120
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== DIMENSION_TYPE_ALL) {
|
|
@@ -144,31 +134,24 @@ export const dataElementsQuery = {
|
|
|
144
134
|
};
|
|
145
135
|
export const dataElementGroupsQuery = {
|
|
146
136
|
resource: 'dataElementGroups',
|
|
147
|
-
params:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
paging: false
|
|
155
|
-
};
|
|
156
|
-
}
|
|
137
|
+
params: ({
|
|
138
|
+
nameProp
|
|
139
|
+
}) => ({
|
|
140
|
+
fields: `id,${nameProp}~rename(name)`,
|
|
141
|
+
order: `${nameProp}:asc`,
|
|
142
|
+
paging: false
|
|
143
|
+
})
|
|
157
144
|
};
|
|
158
145
|
export const itemsByDimensionQuery = {
|
|
159
146
|
resource: `dimensions`,
|
|
160
|
-
id:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
searchTerm,
|
|
169
|
-
page,
|
|
170
|
-
nameProp
|
|
171
|
-
} = _ref9;
|
|
147
|
+
id: ({
|
|
148
|
+
id
|
|
149
|
+
}) => `${id}/items`,
|
|
150
|
+
params: ({
|
|
151
|
+
searchTerm,
|
|
152
|
+
page,
|
|
153
|
+
nameProp
|
|
154
|
+
}) => {
|
|
172
155
|
const filters = [];
|
|
173
156
|
if (searchTerm) {
|
|
174
157
|
filters.push(`${nameProp}:ilike:${searchTerm}`);
|
|
@@ -184,13 +167,12 @@ export const itemsByDimensionQuery = {
|
|
|
184
167
|
};
|
|
185
168
|
export const dataElementOperandsQuery = {
|
|
186
169
|
resource: 'dataElementOperands',
|
|
187
|
-
params:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
} = _ref10;
|
|
170
|
+
params: ({
|
|
171
|
+
nameProp,
|
|
172
|
+
filter,
|
|
173
|
+
searchTerm,
|
|
174
|
+
page
|
|
175
|
+
}) => {
|
|
194
176
|
const idField = (filter === null || filter === void 0 ? void 0 : filter.group) === DIMENSION_TYPE_ALL ? 'id' : 'dimensionItem~rename(id)';
|
|
195
177
|
const filters = ['categoryOptionCombo.name:ne:default'];
|
|
196
178
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== DIMENSION_TYPE_ALL) {
|
|
@@ -210,13 +192,12 @@ export const dataElementOperandsQuery = {
|
|
|
210
192
|
};
|
|
211
193
|
export const dataSetsQuery = {
|
|
212
194
|
resource: 'dataSets',
|
|
213
|
-
params:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
} = _ref11;
|
|
195
|
+
params: ({
|
|
196
|
+
nameProp,
|
|
197
|
+
searchTerm,
|
|
198
|
+
filter,
|
|
199
|
+
page
|
|
200
|
+
}) => {
|
|
220
201
|
const filters = [];
|
|
221
202
|
if (searchTerm) {
|
|
222
203
|
filters.push(`${nameProp}:ilike:${searchTerm}`);
|
|
@@ -239,16 +220,13 @@ export const dataSetsQuery = {
|
|
|
239
220
|
};
|
|
240
221
|
export const programsQuery = {
|
|
241
222
|
resource: 'programs',
|
|
242
|
-
params:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
paging: false
|
|
250
|
-
};
|
|
251
|
-
}
|
|
223
|
+
params: ({
|
|
224
|
+
nameProp
|
|
225
|
+
}) => ({
|
|
226
|
+
fields: `id,${nameProp}~rename(name)`,
|
|
227
|
+
order: `${nameProp}:asc`,
|
|
228
|
+
paging: false
|
|
229
|
+
})
|
|
252
230
|
};
|
|
253
231
|
|
|
254
232
|
// Fetch functions
|
|
@@ -275,14 +253,13 @@ export const apiFetchRecommendedIds = async (dataEngine, dxIds, ouIds) => {
|
|
|
275
253
|
});
|
|
276
254
|
return recommendedDimensionsData.recommendedDimensions.dimensions.map(item => item.id);
|
|
277
255
|
};
|
|
278
|
-
export const apiFetchOptions =
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
} = _ref13;
|
|
256
|
+
export const apiFetchOptions = ({
|
|
257
|
+
dataEngine,
|
|
258
|
+
nameProp,
|
|
259
|
+
filter,
|
|
260
|
+
searchTerm,
|
|
261
|
+
page
|
|
262
|
+
}) => {
|
|
286
263
|
switch (filter === null || filter === void 0 ? void 0 : filter.dataType) {
|
|
287
264
|
case DIMENSION_TYPE_INDICATOR:
|
|
288
265
|
{
|
|
@@ -391,14 +368,13 @@ export const apiFetchGroups = async (dataEngine, dataType, nameProp) => {
|
|
|
391
368
|
return null;
|
|
392
369
|
}
|
|
393
370
|
};
|
|
394
|
-
const fetchIndicators = async
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
} = _ref14;
|
|
371
|
+
const fetchIndicators = async ({
|
|
372
|
+
dataEngine,
|
|
373
|
+
nameProp,
|
|
374
|
+
filter,
|
|
375
|
+
searchTerm,
|
|
376
|
+
page
|
|
377
|
+
}) => {
|
|
402
378
|
const indicatorsData = await dataEngine.query({
|
|
403
379
|
indicators: indicatorsQuery
|
|
404
380
|
}, {
|
|
@@ -413,14 +389,13 @@ const fetchIndicators = async _ref14 => {
|
|
|
413
389
|
const response = indicatorsData.indicators;
|
|
414
390
|
return formatResponse(response.indicators, response.pager);
|
|
415
391
|
};
|
|
416
|
-
const fetchDataItems = async
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
} = _ref15;
|
|
392
|
+
const fetchDataItems = async ({
|
|
393
|
+
dataEngine,
|
|
394
|
+
nameProp,
|
|
395
|
+
filter,
|
|
396
|
+
searchTerm,
|
|
397
|
+
page
|
|
398
|
+
}) => {
|
|
424
399
|
const dataItemsData = await dataEngine.query({
|
|
425
400
|
dataItems: dataItemsQuery
|
|
426
401
|
}, {
|
|
@@ -439,14 +414,13 @@ const formatResponse = (dimensionItems, pager) => ({
|
|
|
439
414
|
dimensionItems,
|
|
440
415
|
nextPage: pager.nextPage ? pager.page + 1 : null
|
|
441
416
|
});
|
|
442
|
-
const fetchDataElements = async
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
} = _ref16;
|
|
417
|
+
const fetchDataElements = async ({
|
|
418
|
+
dataEngine,
|
|
419
|
+
nameProp,
|
|
420
|
+
filter,
|
|
421
|
+
searchTerm,
|
|
422
|
+
page
|
|
423
|
+
}) => {
|
|
450
424
|
const dataElementsData = await dataEngine.query({
|
|
451
425
|
dataElements: dataElementsQuery
|
|
452
426
|
}, {
|
|
@@ -461,14 +435,13 @@ const fetchDataElements = async _ref16 => {
|
|
|
461
435
|
const response = dataElementsData.dataElements;
|
|
462
436
|
return formatResponse(response.dataElements, response.pager);
|
|
463
437
|
};
|
|
464
|
-
export const apiFetchItemsByDimension = async
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
} = _ref17;
|
|
438
|
+
export const apiFetchItemsByDimension = async ({
|
|
439
|
+
dataEngine,
|
|
440
|
+
dimensionId,
|
|
441
|
+
searchTerm,
|
|
442
|
+
page,
|
|
443
|
+
nameProp
|
|
444
|
+
}) => {
|
|
472
445
|
const itemsByDimensionData = await dataEngine.query({
|
|
473
446
|
itemsByDimensions: itemsByDimensionQuery
|
|
474
447
|
}, {
|
|
@@ -483,14 +456,13 @@ export const apiFetchItemsByDimension = async _ref17 => {
|
|
|
483
456
|
const response = itemsByDimensionData.itemsByDimensions;
|
|
484
457
|
return formatResponse(response.items, response.pager);
|
|
485
458
|
};
|
|
486
|
-
const fetchDataElementOperands = async
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
} = _ref18;
|
|
459
|
+
const fetchDataElementOperands = async ({
|
|
460
|
+
dataEngine,
|
|
461
|
+
nameProp,
|
|
462
|
+
filter,
|
|
463
|
+
searchTerm,
|
|
464
|
+
page
|
|
465
|
+
}) => {
|
|
494
466
|
const dataElementOperandsData = await dataEngine.query({
|
|
495
467
|
dataElementOperands: dataElementOperandsQuery
|
|
496
468
|
}, {
|
|
@@ -505,14 +477,13 @@ const fetchDataElementOperands = async _ref18 => {
|
|
|
505
477
|
const response = dataElementOperandsData.dataElementOperands;
|
|
506
478
|
return formatResponse(response.dataElementOperands, response.pager);
|
|
507
479
|
};
|
|
508
|
-
const fetchDataSets = async
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
} = _ref19;
|
|
480
|
+
const fetchDataSets = async ({
|
|
481
|
+
dataEngine,
|
|
482
|
+
nameProp,
|
|
483
|
+
searchTerm,
|
|
484
|
+
filter,
|
|
485
|
+
page
|
|
486
|
+
}) => {
|
|
516
487
|
const dataSetsData = await dataEngine.query({
|
|
517
488
|
dataSets: dataSetsQuery
|
|
518
489
|
}, {
|
|
@@ -1,84 +1,63 @@
|
|
|
1
1
|
export const validateIndicatorExpressionMutation = {
|
|
2
2
|
type: 'create',
|
|
3
3
|
resource: 'indicators/expression/description',
|
|
4
|
-
data:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} = _ref;
|
|
8
|
-
return expression;
|
|
9
|
-
}
|
|
4
|
+
data: ({
|
|
5
|
+
expression
|
|
6
|
+
}) => expression
|
|
10
7
|
};
|
|
11
8
|
export const validateProgramIndicatorExpressionMutation = {
|
|
12
9
|
type: 'create',
|
|
13
10
|
resource: 'programIndicators/expression/description',
|
|
14
|
-
data:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref2;
|
|
18
|
-
return expression;
|
|
19
|
-
}
|
|
11
|
+
data: ({
|
|
12
|
+
expression
|
|
13
|
+
}) => expression
|
|
20
14
|
};
|
|
21
15
|
export const validateProgramIndicatorFilterMutation = {
|
|
22
16
|
type: 'create',
|
|
23
17
|
resource: 'programIndicators/filter/description',
|
|
24
|
-
data:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref3;
|
|
28
|
-
return filter;
|
|
29
|
-
}
|
|
18
|
+
data: ({
|
|
19
|
+
filter
|
|
20
|
+
}) => filter
|
|
30
21
|
};
|
|
31
22
|
export const createCalculationMutation = {
|
|
32
23
|
type: 'create',
|
|
33
24
|
resource: 'expressionDimensionItems',
|
|
34
|
-
data:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
expression
|
|
43
|
-
};
|
|
44
|
-
}
|
|
25
|
+
data: ({
|
|
26
|
+
name,
|
|
27
|
+
expression
|
|
28
|
+
}) => ({
|
|
29
|
+
name,
|
|
30
|
+
shortName: name,
|
|
31
|
+
expression
|
|
32
|
+
})
|
|
45
33
|
};
|
|
46
34
|
export const updateCalculationMutation = {
|
|
47
35
|
type: 'json-patch',
|
|
48
36
|
resource: 'expressionDimensionItems',
|
|
49
|
-
id:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, {
|
|
69
|
-
op: 'add',
|
|
70
|
-
path: '/expression',
|
|
71
|
-
value: expression
|
|
72
|
-
}];
|
|
73
|
-
}
|
|
37
|
+
id: ({
|
|
38
|
+
id
|
|
39
|
+
}) => id,
|
|
40
|
+
data: ({
|
|
41
|
+
name,
|
|
42
|
+
expression
|
|
43
|
+
}) => [{
|
|
44
|
+
op: 'add',
|
|
45
|
+
path: '/name',
|
|
46
|
+
value: name
|
|
47
|
+
}, {
|
|
48
|
+
op: 'add',
|
|
49
|
+
path: '/shortName',
|
|
50
|
+
value: name
|
|
51
|
+
}, {
|
|
52
|
+
op: 'add',
|
|
53
|
+
path: '/expression',
|
|
54
|
+
value: expression
|
|
55
|
+
}]
|
|
74
56
|
};
|
|
75
57
|
export const deleteCalculationMutation = {
|
|
76
58
|
type: 'delete',
|
|
77
59
|
resource: 'expressionDimensionItems',
|
|
78
|
-
id:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
} = _ref7;
|
|
82
|
-
return id;
|
|
83
|
-
}
|
|
60
|
+
id: ({
|
|
61
|
+
id
|
|
62
|
+
}) => id
|
|
84
63
|
};
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import { onError } from './index.js';
|
|
2
2
|
const orgUnitLevelsQuery = {
|
|
3
3
|
resource: 'organisationUnitLevels',
|
|
4
|
-
params:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
paging: false
|
|
11
|
-
};
|
|
12
|
-
}
|
|
4
|
+
params: ({
|
|
5
|
+
displayNameProp = 'displayName'
|
|
6
|
+
} = {}) => ({
|
|
7
|
+
fields: `id,level,${displayNameProp}~rename(displayName),name`,
|
|
8
|
+
paging: false
|
|
9
|
+
})
|
|
13
10
|
};
|
|
14
11
|
const orgUnitGroupsQuery = {
|
|
15
12
|
resource: 'organisationUnitGroups',
|
|
16
|
-
params:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
paging: false
|
|
23
|
-
};
|
|
24
|
-
}
|
|
13
|
+
params: ({
|
|
14
|
+
displayNameProp = 'displayName'
|
|
15
|
+
} = {}) => ({
|
|
16
|
+
fields: `id,${displayNameProp}~rename(displayName),name`,
|
|
17
|
+
paging: false
|
|
18
|
+
})
|
|
25
19
|
};
|
|
26
20
|
const orgUnitRootsQuery = {
|
|
27
21
|
resource: 'organisationUnits',
|
|
@@ -33,26 +27,20 @@ const orgUnitRootsQuery = {
|
|
|
33
27
|
};
|
|
34
28
|
const orgUnitsQuery = {
|
|
35
29
|
resource: 'organisationUnits',
|
|
36
|
-
params:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
paging: false
|
|
45
|
-
};
|
|
46
|
-
}
|
|
30
|
+
params: ({
|
|
31
|
+
displayNameProp
|
|
32
|
+
}) => ({
|
|
33
|
+
fields: `id,path,${displayNameProp}~rename(displayName),children::isNotEmpty`,
|
|
34
|
+
level: 1,
|
|
35
|
+
userDataViewFallback: true,
|
|
36
|
+
paging: false
|
|
37
|
+
})
|
|
47
38
|
};
|
|
48
39
|
const orgUnitQuery = {
|
|
49
40
|
resource: 'organisationUnits',
|
|
50
|
-
id:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} = _ref2;
|
|
54
|
-
return id;
|
|
55
|
-
},
|
|
41
|
+
id: ({
|
|
42
|
+
id
|
|
43
|
+
}) => id,
|
|
56
44
|
params: {
|
|
57
45
|
fields: 'id,level,displayName~rename(name),path,parent[id,displayName~rename(name)],children[level]',
|
|
58
46
|
userDataViewFallback: true,
|
|
@@ -15,24 +15,18 @@ const READ_AND_WRITE = 'rw';
|
|
|
15
15
|
const getQueries = type => ({
|
|
16
16
|
ao: {
|
|
17
17
|
resource: AOTypeMap[type].apiEndpoint,
|
|
18
|
-
id:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
22
|
-
return id;
|
|
23
|
-
},
|
|
18
|
+
id: ({
|
|
19
|
+
id
|
|
20
|
+
}) => id,
|
|
24
21
|
params: {
|
|
25
22
|
fields: 'id,displayDescription,created,createdBy[displayName],lastUpdated,subscribed,sharing'
|
|
26
23
|
}
|
|
27
24
|
},
|
|
28
25
|
dataStatistics: {
|
|
29
26
|
resource: 'dataStatistics/favorites',
|
|
30
|
-
id:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref2;
|
|
34
|
-
return id;
|
|
35
|
-
}
|
|
27
|
+
id: ({
|
|
28
|
+
id
|
|
29
|
+
}) => id
|
|
36
30
|
}
|
|
37
31
|
});
|
|
38
32
|
const getSubscribeMutation = (type, id) => ({
|
|
@@ -43,13 +37,12 @@ const getUnsubscribeMutation = (type, id) => ({
|
|
|
43
37
|
resource: `${AOTypeMap[type].apiEndpoint}/${id}/subscriber`,
|
|
44
38
|
type: 'delete'
|
|
45
39
|
});
|
|
46
|
-
const AboutAOUnit = /*#__PURE__*/forwardRef((
|
|
40
|
+
const AboutAOUnit = /*#__PURE__*/forwardRef(({
|
|
41
|
+
type,
|
|
42
|
+
id,
|
|
43
|
+
renderId
|
|
44
|
+
}, ref) => {
|
|
47
45
|
var _data$ao$createdBy;
|
|
48
|
-
let {
|
|
49
|
-
type,
|
|
50
|
-
id,
|
|
51
|
-
renderId
|
|
52
|
-
} = _ref3;
|
|
53
46
|
const [isExpanded, setIsExpanded] = useState(true);
|
|
54
47
|
const {
|
|
55
48
|
fromServerDate
|
|
@@ -4,13 +4,12 @@ import { Layer, CenteredContent, CircularLoader, NoticeBox } from '@dhis2/ui';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React, { createContext, useContext } from 'react';
|
|
6
6
|
const CachedDataQueryCtx = /*#__PURE__*/createContext({});
|
|
7
|
-
const CachedDataQueryProvider =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
7
|
+
const CachedDataQueryProvider = ({
|
|
8
|
+
query,
|
|
9
|
+
dataTransformation,
|
|
10
|
+
children,
|
|
11
|
+
translucent = true
|
|
12
|
+
}) => {
|
|
14
13
|
const {
|
|
15
14
|
data: rawData,
|
|
16
15
|
...rest
|