@dhis2/analytics 28.0.3 → 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 +1 -2
- package/build/cjs/__demo__/Filter.stories.js +1 -2
- package/build/cjs/__demo__/FixedPeriodSelect.stories.js +1 -2
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +1 -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 +7 -9
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- 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__/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 +6 -7
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- 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
|
@@ -11,24 +11,20 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
11
11
|
// Query definitions
|
|
12
12
|
const dimensionsQuery = exports.dimensionsQuery = {
|
|
13
13
|
resource: 'dimensions',
|
|
14
|
-
params:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
paging: false
|
|
22
|
-
};
|
|
23
|
-
}
|
|
14
|
+
params: ({
|
|
15
|
+
nameProp
|
|
16
|
+
}) => ({
|
|
17
|
+
fields: `id,${nameProp}~rename(name),dimensionType,dataDimensionType`,
|
|
18
|
+
order: `${nameProp}:asc`,
|
|
19
|
+
paging: false
|
|
20
|
+
})
|
|
24
21
|
};
|
|
25
22
|
const recommendedDimensionsQuery = {
|
|
26
23
|
resource: 'dimensions/recommendations',
|
|
27
|
-
params:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = _ref2;
|
|
24
|
+
params: ({
|
|
25
|
+
dxIds,
|
|
26
|
+
ouIds
|
|
27
|
+
}) => {
|
|
32
28
|
const dimensions = [];
|
|
33
29
|
if (dxIds.length) {
|
|
34
30
|
dimensions.push(`dx:${dxIds.join(';')}`);
|
|
@@ -44,13 +40,12 @@ const recommendedDimensionsQuery = {
|
|
|
44
40
|
};
|
|
45
41
|
const dataItemsQuery = exports.dataItemsQuery = {
|
|
46
42
|
resource: 'dataItems',
|
|
47
|
-
params:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} = _ref3;
|
|
43
|
+
params: ({
|
|
44
|
+
nameProp,
|
|
45
|
+
filter,
|
|
46
|
+
searchTerm,
|
|
47
|
+
page
|
|
48
|
+
}) => {
|
|
54
49
|
let fields = `id,${nameProp}~rename(name),dimensionItemType,expression,optionSetId`;
|
|
55
50
|
const filters = [];
|
|
56
51
|
|
|
@@ -86,13 +81,12 @@ const dataItemsQuery = exports.dataItemsQuery = {
|
|
|
86
81
|
};
|
|
87
82
|
const indicatorsQuery = exports.indicatorsQuery = {
|
|
88
83
|
resource: 'indicators',
|
|
89
|
-
params:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
} = _ref4;
|
|
84
|
+
params: ({
|
|
85
|
+
nameProp,
|
|
86
|
+
filter,
|
|
87
|
+
searchTerm,
|
|
88
|
+
page
|
|
89
|
+
}) => {
|
|
96
90
|
const filters = [];
|
|
97
91
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== _dataTypes.DIMENSION_TYPE_ALL) {
|
|
98
92
|
filters.push(`indicatorGroups.id:eq:${filter.group}`);
|
|
@@ -111,26 +105,22 @@ const indicatorsQuery = exports.indicatorsQuery = {
|
|
|
111
105
|
};
|
|
112
106
|
const indicatorGroupsQuery = exports.indicatorGroupsQuery = {
|
|
113
107
|
resource: 'indicatorGroups',
|
|
114
|
-
params:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
paging: false
|
|
122
|
-
};
|
|
123
|
-
}
|
|
108
|
+
params: ({
|
|
109
|
+
nameProp
|
|
110
|
+
}) => ({
|
|
111
|
+
fields: `id,${nameProp}~rename(name)`,
|
|
112
|
+
order: `${nameProp}:asc`,
|
|
113
|
+
paging: false
|
|
114
|
+
})
|
|
124
115
|
};
|
|
125
116
|
const dataElementsQuery = exports.dataElementsQuery = {
|
|
126
117
|
resource: 'dataElements',
|
|
127
|
-
params:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
} = _ref6;
|
|
118
|
+
params: ({
|
|
119
|
+
nameProp,
|
|
120
|
+
filter,
|
|
121
|
+
searchTerm,
|
|
122
|
+
page
|
|
123
|
+
}) => {
|
|
134
124
|
const idField = (filter === null || filter === void 0 ? void 0 : filter.group) === _dataTypes.DIMENSION_TYPE_ALL ? 'id' : 'dimensionItem~rename(id)';
|
|
135
125
|
const filters = ['domainType:eq:AGGREGATE'];
|
|
136
126
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== _dataTypes.DIMENSION_TYPE_ALL) {
|
|
@@ -150,31 +140,24 @@ const dataElementsQuery = exports.dataElementsQuery = {
|
|
|
150
140
|
};
|
|
151
141
|
const dataElementGroupsQuery = exports.dataElementGroupsQuery = {
|
|
152
142
|
resource: 'dataElementGroups',
|
|
153
|
-
params:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
paging: false
|
|
161
|
-
};
|
|
162
|
-
}
|
|
143
|
+
params: ({
|
|
144
|
+
nameProp
|
|
145
|
+
}) => ({
|
|
146
|
+
fields: `id,${nameProp}~rename(name)`,
|
|
147
|
+
order: `${nameProp}:asc`,
|
|
148
|
+
paging: false
|
|
149
|
+
})
|
|
163
150
|
};
|
|
164
151
|
const itemsByDimensionQuery = exports.itemsByDimensionQuery = {
|
|
165
152
|
resource: `dimensions`,
|
|
166
|
-
id:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
searchTerm,
|
|
175
|
-
page,
|
|
176
|
-
nameProp
|
|
177
|
-
} = _ref9;
|
|
153
|
+
id: ({
|
|
154
|
+
id
|
|
155
|
+
}) => `${id}/items`,
|
|
156
|
+
params: ({
|
|
157
|
+
searchTerm,
|
|
158
|
+
page,
|
|
159
|
+
nameProp
|
|
160
|
+
}) => {
|
|
178
161
|
const filters = [];
|
|
179
162
|
if (searchTerm) {
|
|
180
163
|
filters.push(`${nameProp}:ilike:${searchTerm}`);
|
|
@@ -190,13 +173,12 @@ const itemsByDimensionQuery = exports.itemsByDimensionQuery = {
|
|
|
190
173
|
};
|
|
191
174
|
const dataElementOperandsQuery = exports.dataElementOperandsQuery = {
|
|
192
175
|
resource: 'dataElementOperands',
|
|
193
|
-
params:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
} = _ref10;
|
|
176
|
+
params: ({
|
|
177
|
+
nameProp,
|
|
178
|
+
filter,
|
|
179
|
+
searchTerm,
|
|
180
|
+
page
|
|
181
|
+
}) => {
|
|
200
182
|
const idField = (filter === null || filter === void 0 ? void 0 : filter.group) === _dataTypes.DIMENSION_TYPE_ALL ? 'id' : 'dimensionItem~rename(id)';
|
|
201
183
|
const filters = ['categoryOptionCombo.name:ne:default'];
|
|
202
184
|
if (filter !== null && filter !== void 0 && filter.group && filter.group !== _dataTypes.DIMENSION_TYPE_ALL) {
|
|
@@ -216,13 +198,12 @@ const dataElementOperandsQuery = exports.dataElementOperandsQuery = {
|
|
|
216
198
|
};
|
|
217
199
|
const dataSetsQuery = exports.dataSetsQuery = {
|
|
218
200
|
resource: 'dataSets',
|
|
219
|
-
params:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
} = _ref11;
|
|
201
|
+
params: ({
|
|
202
|
+
nameProp,
|
|
203
|
+
searchTerm,
|
|
204
|
+
filter,
|
|
205
|
+
page
|
|
206
|
+
}) => {
|
|
226
207
|
const filters = [];
|
|
227
208
|
if (searchTerm) {
|
|
228
209
|
filters.push(`${nameProp}:ilike:${searchTerm}`);
|
|
@@ -245,16 +226,13 @@ const dataSetsQuery = exports.dataSetsQuery = {
|
|
|
245
226
|
};
|
|
246
227
|
const programsQuery = exports.programsQuery = {
|
|
247
228
|
resource: 'programs',
|
|
248
|
-
params:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
paging: false
|
|
256
|
-
};
|
|
257
|
-
}
|
|
229
|
+
params: ({
|
|
230
|
+
nameProp
|
|
231
|
+
}) => ({
|
|
232
|
+
fields: `id,${nameProp}~rename(name)`,
|
|
233
|
+
order: `${nameProp}:asc`,
|
|
234
|
+
paging: false
|
|
235
|
+
})
|
|
258
236
|
};
|
|
259
237
|
|
|
260
238
|
// Fetch functions
|
|
@@ -283,14 +261,13 @@ const apiFetchRecommendedIds = async (dataEngine, dxIds, ouIds) => {
|
|
|
283
261
|
return recommendedDimensionsData.recommendedDimensions.dimensions.map(item => item.id);
|
|
284
262
|
};
|
|
285
263
|
exports.apiFetchRecommendedIds = apiFetchRecommendedIds;
|
|
286
|
-
const apiFetchOptions =
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
} = _ref13;
|
|
264
|
+
const apiFetchOptions = ({
|
|
265
|
+
dataEngine,
|
|
266
|
+
nameProp,
|
|
267
|
+
filter,
|
|
268
|
+
searchTerm,
|
|
269
|
+
page
|
|
270
|
+
}) => {
|
|
294
271
|
switch (filter === null || filter === void 0 ? void 0 : filter.dataType) {
|
|
295
272
|
case _dataTypes.DIMENSION_TYPE_INDICATOR:
|
|
296
273
|
{
|
|
@@ -401,14 +378,13 @@ const apiFetchGroups = async (dataEngine, dataType, nameProp) => {
|
|
|
401
378
|
}
|
|
402
379
|
};
|
|
403
380
|
exports.apiFetchGroups = apiFetchGroups;
|
|
404
|
-
const fetchIndicators = async
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
} = _ref14;
|
|
381
|
+
const fetchIndicators = async ({
|
|
382
|
+
dataEngine,
|
|
383
|
+
nameProp,
|
|
384
|
+
filter,
|
|
385
|
+
searchTerm,
|
|
386
|
+
page
|
|
387
|
+
}) => {
|
|
412
388
|
const indicatorsData = await dataEngine.query({
|
|
413
389
|
indicators: indicatorsQuery
|
|
414
390
|
}, {
|
|
@@ -423,14 +399,13 @@ const fetchIndicators = async _ref14 => {
|
|
|
423
399
|
const response = indicatorsData.indicators;
|
|
424
400
|
return formatResponse(response.indicators, response.pager);
|
|
425
401
|
};
|
|
426
|
-
const fetchDataItems = async
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
} = _ref15;
|
|
402
|
+
const fetchDataItems = async ({
|
|
403
|
+
dataEngine,
|
|
404
|
+
nameProp,
|
|
405
|
+
filter,
|
|
406
|
+
searchTerm,
|
|
407
|
+
page
|
|
408
|
+
}) => {
|
|
434
409
|
const dataItemsData = await dataEngine.query({
|
|
435
410
|
dataItems: dataItemsQuery
|
|
436
411
|
}, {
|
|
@@ -449,14 +424,13 @@ const formatResponse = (dimensionItems, pager) => ({
|
|
|
449
424
|
dimensionItems,
|
|
450
425
|
nextPage: pager.nextPage ? pager.page + 1 : null
|
|
451
426
|
});
|
|
452
|
-
const fetchDataElements = async
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
} = _ref16;
|
|
427
|
+
const fetchDataElements = async ({
|
|
428
|
+
dataEngine,
|
|
429
|
+
nameProp,
|
|
430
|
+
filter,
|
|
431
|
+
searchTerm,
|
|
432
|
+
page
|
|
433
|
+
}) => {
|
|
460
434
|
const dataElementsData = await dataEngine.query({
|
|
461
435
|
dataElements: dataElementsQuery
|
|
462
436
|
}, {
|
|
@@ -471,14 +445,13 @@ const fetchDataElements = async _ref16 => {
|
|
|
471
445
|
const response = dataElementsData.dataElements;
|
|
472
446
|
return formatResponse(response.dataElements, response.pager);
|
|
473
447
|
};
|
|
474
|
-
const apiFetchItemsByDimension = async
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
} = _ref17;
|
|
448
|
+
const apiFetchItemsByDimension = async ({
|
|
449
|
+
dataEngine,
|
|
450
|
+
dimensionId,
|
|
451
|
+
searchTerm,
|
|
452
|
+
page,
|
|
453
|
+
nameProp
|
|
454
|
+
}) => {
|
|
482
455
|
const itemsByDimensionData = await dataEngine.query({
|
|
483
456
|
itemsByDimensions: itemsByDimensionQuery
|
|
484
457
|
}, {
|
|
@@ -494,14 +467,13 @@ const apiFetchItemsByDimension = async _ref17 => {
|
|
|
494
467
|
return formatResponse(response.items, response.pager);
|
|
495
468
|
};
|
|
496
469
|
exports.apiFetchItemsByDimension = apiFetchItemsByDimension;
|
|
497
|
-
const fetchDataElementOperands = async
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
} = _ref18;
|
|
470
|
+
const fetchDataElementOperands = async ({
|
|
471
|
+
dataEngine,
|
|
472
|
+
nameProp,
|
|
473
|
+
filter,
|
|
474
|
+
searchTerm,
|
|
475
|
+
page
|
|
476
|
+
}) => {
|
|
505
477
|
const dataElementOperandsData = await dataEngine.query({
|
|
506
478
|
dataElementOperands: dataElementOperandsQuery
|
|
507
479
|
}, {
|
|
@@ -516,14 +488,13 @@ const fetchDataElementOperands = async _ref18 => {
|
|
|
516
488
|
const response = dataElementOperandsData.dataElementOperands;
|
|
517
489
|
return formatResponse(response.dataElementOperands, response.pager);
|
|
518
490
|
};
|
|
519
|
-
const fetchDataSets = async
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
} = _ref19;
|
|
491
|
+
const fetchDataSets = async ({
|
|
492
|
+
dataEngine,
|
|
493
|
+
nameProp,
|
|
494
|
+
searchTerm,
|
|
495
|
+
filter,
|
|
496
|
+
page
|
|
497
|
+
}) => {
|
|
527
498
|
const dataSetsData = await dataEngine.query({
|
|
528
499
|
dataSets: dataSetsQuery
|
|
529
500
|
}, {
|
|
@@ -7,84 +7,63 @@ exports.validateProgramIndicatorFilterMutation = exports.validateProgramIndicato
|
|
|
7
7
|
const validateIndicatorExpressionMutation = exports.validateIndicatorExpressionMutation = {
|
|
8
8
|
type: 'create',
|
|
9
9
|
resource: 'indicators/expression/description',
|
|
10
|
-
data:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} = _ref;
|
|
14
|
-
return expression;
|
|
15
|
-
}
|
|
10
|
+
data: ({
|
|
11
|
+
expression
|
|
12
|
+
}) => expression
|
|
16
13
|
};
|
|
17
14
|
const validateProgramIndicatorExpressionMutation = exports.validateProgramIndicatorExpressionMutation = {
|
|
18
15
|
type: 'create',
|
|
19
16
|
resource: 'programIndicators/expression/description',
|
|
20
|
-
data:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref2;
|
|
24
|
-
return expression;
|
|
25
|
-
}
|
|
17
|
+
data: ({
|
|
18
|
+
expression
|
|
19
|
+
}) => expression
|
|
26
20
|
};
|
|
27
21
|
const validateProgramIndicatorFilterMutation = exports.validateProgramIndicatorFilterMutation = {
|
|
28
22
|
type: 'create',
|
|
29
23
|
resource: 'programIndicators/filter/description',
|
|
30
|
-
data:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref3;
|
|
34
|
-
return filter;
|
|
35
|
-
}
|
|
24
|
+
data: ({
|
|
25
|
+
filter
|
|
26
|
+
}) => filter
|
|
36
27
|
};
|
|
37
28
|
const createCalculationMutation = exports.createCalculationMutation = {
|
|
38
29
|
type: 'create',
|
|
39
30
|
resource: 'expressionDimensionItems',
|
|
40
|
-
data:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
expression
|
|
49
|
-
};
|
|
50
|
-
}
|
|
31
|
+
data: ({
|
|
32
|
+
name,
|
|
33
|
+
expression
|
|
34
|
+
}) => ({
|
|
35
|
+
name,
|
|
36
|
+
shortName: name,
|
|
37
|
+
expression
|
|
38
|
+
})
|
|
51
39
|
};
|
|
52
40
|
const updateCalculationMutation = exports.updateCalculationMutation = {
|
|
53
41
|
type: 'json-patch',
|
|
54
42
|
resource: 'expressionDimensionItems',
|
|
55
|
-
id:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}, {
|
|
75
|
-
op: 'add',
|
|
76
|
-
path: '/expression',
|
|
77
|
-
value: expression
|
|
78
|
-
}];
|
|
79
|
-
}
|
|
43
|
+
id: ({
|
|
44
|
+
id
|
|
45
|
+
}) => id,
|
|
46
|
+
data: ({
|
|
47
|
+
name,
|
|
48
|
+
expression
|
|
49
|
+
}) => [{
|
|
50
|
+
op: 'add',
|
|
51
|
+
path: '/name',
|
|
52
|
+
value: name
|
|
53
|
+
}, {
|
|
54
|
+
op: 'add',
|
|
55
|
+
path: '/shortName',
|
|
56
|
+
value: name
|
|
57
|
+
}, {
|
|
58
|
+
op: 'add',
|
|
59
|
+
path: '/expression',
|
|
60
|
+
value: expression
|
|
61
|
+
}]
|
|
80
62
|
};
|
|
81
63
|
const deleteCalculationMutation = exports.deleteCalculationMutation = {
|
|
82
64
|
type: 'delete',
|
|
83
65
|
resource: 'expressionDimensionItems',
|
|
84
|
-
id:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
} = _ref7;
|
|
88
|
-
return id;
|
|
89
|
-
}
|
|
66
|
+
id: ({
|
|
67
|
+
id
|
|
68
|
+
}) => id
|
|
90
69
|
};
|
|
@@ -7,27 +7,21 @@ exports.apiFetchOrganisationUnits = exports.apiFetchOrganisationUnitRoots = expo
|
|
|
7
7
|
var _index = require("./index.js");
|
|
8
8
|
const orgUnitLevelsQuery = {
|
|
9
9
|
resource: 'organisationUnitLevels',
|
|
10
|
-
params:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
paging: false
|
|
17
|
-
};
|
|
18
|
-
}
|
|
10
|
+
params: ({
|
|
11
|
+
displayNameProp = 'displayName'
|
|
12
|
+
} = {}) => ({
|
|
13
|
+
fields: `id,level,${displayNameProp}~rename(displayName),name`,
|
|
14
|
+
paging: false
|
|
15
|
+
})
|
|
19
16
|
};
|
|
20
17
|
const orgUnitGroupsQuery = {
|
|
21
18
|
resource: 'organisationUnitGroups',
|
|
22
|
-
params:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
paging: false
|
|
29
|
-
};
|
|
30
|
-
}
|
|
19
|
+
params: ({
|
|
20
|
+
displayNameProp = 'displayName'
|
|
21
|
+
} = {}) => ({
|
|
22
|
+
fields: `id,${displayNameProp}~rename(displayName),name`,
|
|
23
|
+
paging: false
|
|
24
|
+
})
|
|
31
25
|
};
|
|
32
26
|
const orgUnitRootsQuery = {
|
|
33
27
|
resource: 'organisationUnits',
|
|
@@ -39,26 +33,20 @@ const orgUnitRootsQuery = {
|
|
|
39
33
|
};
|
|
40
34
|
const orgUnitsQuery = {
|
|
41
35
|
resource: 'organisationUnits',
|
|
42
|
-
params:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
paging: false
|
|
51
|
-
};
|
|
52
|
-
}
|
|
36
|
+
params: ({
|
|
37
|
+
displayNameProp
|
|
38
|
+
}) => ({
|
|
39
|
+
fields: `id,path,${displayNameProp}~rename(displayName),children::isNotEmpty`,
|
|
40
|
+
level: 1,
|
|
41
|
+
userDataViewFallback: true,
|
|
42
|
+
paging: false
|
|
43
|
+
})
|
|
53
44
|
};
|
|
54
45
|
const orgUnitQuery = {
|
|
55
46
|
resource: 'organisationUnits',
|
|
56
|
-
id:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} = _ref2;
|
|
60
|
-
return id;
|
|
61
|
-
},
|
|
47
|
+
id: ({
|
|
48
|
+
id
|
|
49
|
+
}) => id,
|
|
62
50
|
params: {
|
|
63
51
|
fields: 'id,level,displayName~rename(name),path,parent[id,displayName~rename(name)],children[level]',
|
|
64
52
|
userDataViewFallback: true,
|
|
@@ -16,32 +16,25 @@ var _list = require("../../modules/list.js");
|
|
|
16
16
|
var _index = require("../RichText/index.js");
|
|
17
17
|
var _AboutAOUnitStyle = _interopRequireDefault(require("./styles/AboutAOUnit.style.js"));
|
|
18
18
|
var _utils = require("./utils.js");
|
|
19
|
-
function
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
21
|
const READ_ONLY = 'r';
|
|
23
22
|
const READ_AND_WRITE = 'rw';
|
|
24
23
|
const getQueries = type => ({
|
|
25
24
|
ao: {
|
|
26
25
|
resource: _utils.AOTypeMap[type].apiEndpoint,
|
|
27
|
-
id:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
31
|
-
return id;
|
|
32
|
-
},
|
|
26
|
+
id: ({
|
|
27
|
+
id
|
|
28
|
+
}) => id,
|
|
33
29
|
params: {
|
|
34
30
|
fields: 'id,displayDescription,created,createdBy[displayName],lastUpdated,subscribed,sharing'
|
|
35
31
|
}
|
|
36
32
|
},
|
|
37
33
|
dataStatistics: {
|
|
38
34
|
resource: 'dataStatistics/favorites',
|
|
39
|
-
id:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = _ref2;
|
|
43
|
-
return id;
|
|
44
|
-
}
|
|
35
|
+
id: ({
|
|
36
|
+
id
|
|
37
|
+
}) => id
|
|
45
38
|
}
|
|
46
39
|
});
|
|
47
40
|
const getSubscribeMutation = (type, id) => ({
|
|
@@ -52,13 +45,12 @@ const getUnsubscribeMutation = (type, id) => ({
|
|
|
52
45
|
resource: `${_utils.AOTypeMap[type].apiEndpoint}/${id}/subscriber`,
|
|
53
46
|
type: 'delete'
|
|
54
47
|
});
|
|
55
|
-
const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)((
|
|
48
|
+
const AboutAOUnit = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
49
|
+
type,
|
|
50
|
+
id,
|
|
51
|
+
renderId
|
|
52
|
+
}, ref) => {
|
|
56
53
|
var _data$ao$createdBy;
|
|
57
|
-
let {
|
|
58
|
-
type,
|
|
59
|
-
id,
|
|
60
|
-
renderId
|
|
61
|
-
} = _ref3;
|
|
62
54
|
const [isExpanded, setIsExpanded] = (0, _react.useState)(true);
|
|
63
55
|
const {
|
|
64
56
|
fromServerDate
|
|
@@ -9,17 +9,15 @@ var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
|
9
9
|
var _ui = require("@dhis2/ui");
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
function
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
const CachedDataQueryCtx = /*#__PURE__*/(0, _react.createContext)({});
|
|
16
|
-
const CachedDataQueryProvider =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
15
|
+
const CachedDataQueryProvider = ({
|
|
16
|
+
query,
|
|
17
|
+
dataTransformation,
|
|
18
|
+
children,
|
|
19
|
+
translucent = true
|
|
20
|
+
}) => {
|
|
23
21
|
const {
|
|
24
22
|
data: rawData,
|
|
25
23
|
...rest
|