@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
|
@@ -8,37 +8,30 @@ import { InfoPopover } from './Info/InfoPopover.js';
|
|
|
8
8
|
import { ItemOptionsSelector } from './ItemOptionsSelector/ItemOptionsSelector.js';
|
|
9
9
|
import ItemSelector from './ItemSelector/ItemSelector.js';
|
|
10
10
|
const DataDimensionCtx = /*#__PURE__*/createContext({});
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
const SELECTED_DIMENSIONS_PROP_DEFAULT = [];
|
|
12
|
+
const DataDimension = ({
|
|
13
|
+
currentUser,
|
|
14
|
+
onSelect = Function.prototype,
|
|
15
|
+
selectedDimensions = SELECTED_DIMENSIONS_PROP_DEFAULT,
|
|
16
|
+
displayNameProp,
|
|
17
|
+
enabledDataTypes,
|
|
18
|
+
infoBoxMessage,
|
|
19
|
+
onCalculationSave,
|
|
20
|
+
visType
|
|
21
|
+
}) => {
|
|
22
22
|
const {
|
|
23
23
|
serverVersion
|
|
24
24
|
} = useConfig();
|
|
25
25
|
const itemsRef = useRef(new Map());
|
|
26
|
-
const filterDataTypesByVersion = useCallback(dataTypes => dataTypes.filter(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// Calculations only available from 2.40
|
|
32
|
-
id !== DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM || serverVersion.minor >= 40
|
|
33
|
-
);
|
|
34
|
-
}), [serverVersion.minor]);
|
|
26
|
+
const filterDataTypesByVersion = useCallback(dataTypes => dataTypes.filter(({
|
|
27
|
+
id
|
|
28
|
+
}) =>
|
|
29
|
+
// Calculations only available from 2.40
|
|
30
|
+
id !== DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM || serverVersion.minor >= 40), [serverVersion.minor]);
|
|
35
31
|
const [dataTypes, setDataTypes] = useState(filterDataTypesByVersion(enabledDataTypes || Object.values(dataTypeMap)));
|
|
36
|
-
const supportsEDI = dataTypes.map(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} = _ref3;
|
|
40
|
-
return id;
|
|
41
|
-
}).includes(DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM);
|
|
32
|
+
const supportsEDI = dataTypes.map(({
|
|
33
|
+
id
|
|
34
|
+
}) => id).includes(DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM);
|
|
42
35
|
const [currentCalculation, setCurrentCalculation] = useState();
|
|
43
36
|
const [currentDataItem, setCurrentDataItem] = useState();
|
|
44
37
|
const [infoDataItem, setInfoDataItem] = useState();
|
|
@@ -135,9 +128,5 @@ DataDimension.propTypes = {
|
|
|
135
128
|
visType: PropTypes.string,
|
|
136
129
|
onCalculationSave: PropTypes.func
|
|
137
130
|
};
|
|
138
|
-
DataDimension.defaultProps = {
|
|
139
|
-
selectedDimensions: [],
|
|
140
|
-
onSelect: Function.prototype
|
|
141
|
-
};
|
|
142
131
|
export const useDataDimensionContext = () => useContext(DataDimensionCtx);
|
|
143
132
|
export default DataDimension;
|
|
@@ -9,28 +9,21 @@ import styles from './styles/InfoPopover.style.js';
|
|
|
9
9
|
const calculationQuery = {
|
|
10
10
|
calculation: {
|
|
11
11
|
resource: 'expressionDimensionItems',
|
|
12
|
-
id:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
displayNameProp
|
|
21
|
-
} = _ref2;
|
|
22
|
-
return {
|
|
23
|
-
fields: `${getCommonFields(displayNameProp)},expression`
|
|
24
|
-
};
|
|
25
|
-
}
|
|
12
|
+
id: ({
|
|
13
|
+
id
|
|
14
|
+
}) => id,
|
|
15
|
+
params: ({
|
|
16
|
+
displayNameProp
|
|
17
|
+
}) => ({
|
|
18
|
+
fields: `${getCommonFields(displayNameProp)},expression`
|
|
19
|
+
})
|
|
26
20
|
}
|
|
27
21
|
};
|
|
28
|
-
export const CalculationInfo =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref3;
|
|
22
|
+
export const CalculationInfo = ({
|
|
23
|
+
type,
|
|
24
|
+
id,
|
|
25
|
+
displayNameProp
|
|
26
|
+
}) => {
|
|
34
27
|
const [data, setData] = useState();
|
|
35
28
|
const [error, setError] = useState();
|
|
36
29
|
const [expressionError, setExpressionError] = useState();
|
|
@@ -9,28 +9,21 @@ import styles from './styles/InfoPopover.style.js';
|
|
|
9
9
|
const dataElementQuery = {
|
|
10
10
|
dataElement: {
|
|
11
11
|
resource: 'dataElements',
|
|
12
|
-
id:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
displayNameProp
|
|
21
|
-
} = _ref2;
|
|
22
|
-
return {
|
|
23
|
-
fields: `${getCommonFields(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
24
|
-
};
|
|
25
|
-
}
|
|
12
|
+
id: ({
|
|
13
|
+
id
|
|
14
|
+
}) => id,
|
|
15
|
+
params: ({
|
|
16
|
+
displayNameProp
|
|
17
|
+
}) => ({
|
|
18
|
+
fields: `${getCommonFields(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
19
|
+
})
|
|
26
20
|
}
|
|
27
21
|
};
|
|
28
|
-
export const DataElementInfo =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref3;
|
|
22
|
+
export const DataElementInfo = ({
|
|
23
|
+
type,
|
|
24
|
+
id,
|
|
25
|
+
displayNameProp
|
|
26
|
+
}) => {
|
|
34
27
|
const {
|
|
35
28
|
loading,
|
|
36
29
|
error,
|
|
@@ -52,12 +45,9 @@ export const DataElementInfo = _ref3 => {
|
|
|
52
45
|
className: `jsx-${styles.__hash}`
|
|
53
46
|
}, i18n.t('Data set(s)')), /*#__PURE__*/React.createElement("td", {
|
|
54
47
|
className: `jsx-${styles.__hash}`
|
|
55
|
-
}, (data === null || data === void 0 ? void 0 : data.dataElement.dataSetElements) && renderDataSets(data.dataElement.dataSetElements.map(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
} = _ref4;
|
|
59
|
-
return dataSet;
|
|
60
|
-
})))), /*#__PURE__*/React.createElement("tr", {
|
|
48
|
+
}, (data === null || data === void 0 ? void 0 : data.dataElement.dataSetElements) && renderDataSets(data.dataElement.dataSetElements.map(({
|
|
49
|
+
dataSet
|
|
50
|
+
}) => dataSet)))), /*#__PURE__*/React.createElement("tr", {
|
|
61
51
|
className: `jsx-${styles.__hash}`
|
|
62
52
|
}, /*#__PURE__*/React.createElement("th", {
|
|
63
53
|
className: `jsx-${styles.__hash}`
|
|
@@ -89,16 +79,13 @@ export const DataElementInfo = _ref3 => {
|
|
|
89
79
|
className: `jsx-${styles.__hash}`
|
|
90
80
|
}, data === null || data === void 0 ? void 0 : data.dataElement.categoryCombo.displayName), /*#__PURE__*/React.createElement("ul", {
|
|
91
81
|
className: `jsx-${styles.__hash}`
|
|
92
|
-
}, data === null || data === void 0 ? void 0 : data.dataElement.categoryCombo.categories.map(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
className: `jsx-${styles.__hash}`
|
|
100
|
-
}, displayName);
|
|
101
|
-
}))))), (data === null || data === void 0 ? void 0 : data.dataElement.optionSet) && /*#__PURE__*/React.createElement("tr", {
|
|
82
|
+
}, data === null || data === void 0 ? void 0 : data.dataElement.categoryCombo.categories.map(({
|
|
83
|
+
id,
|
|
84
|
+
displayName
|
|
85
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
86
|
+
key: id,
|
|
87
|
+
className: `jsx-${styles.__hash}`
|
|
88
|
+
}, displayName)))))), (data === null || data === void 0 ? void 0 : data.dataElement.optionSet) && /*#__PURE__*/React.createElement("tr", {
|
|
102
89
|
className: `jsx-${styles.__hash}`
|
|
103
90
|
}, /*#__PURE__*/React.createElement("th", {
|
|
104
91
|
className: `jsx-${styles.__hash}`
|
|
@@ -9,24 +9,20 @@ import styles from './styles/InfoPopover.style.js';
|
|
|
9
9
|
const dataElementOperandsQuery = {
|
|
10
10
|
dataElementOperands: {
|
|
11
11
|
resource: 'dataElementOperands',
|
|
12
|
-
params:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fields: [`${getCommonFields(displayNameProp)}`, 'categoryOptionCombo[categoryCombo[categories[displayName,id],displayName],displayName]', `dataElement[${getCommonFields(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant]`, 'displayName,id']
|
|
20
|
-
};
|
|
21
|
-
}
|
|
12
|
+
params: ({
|
|
13
|
+
displayNameProp,
|
|
14
|
+
id
|
|
15
|
+
}) => ({
|
|
16
|
+
filter: `id:eq:${id}`,
|
|
17
|
+
fields: [`${getCommonFields(displayNameProp)}`, 'categoryOptionCombo[categoryCombo[categories[displayName,id],displayName],displayName]', `dataElement[${getCommonFields(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant]`, 'displayName,id']
|
|
18
|
+
})
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
|
-
export const DataElementOperandInfo =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref2;
|
|
21
|
+
export const DataElementOperandInfo = ({
|
|
22
|
+
type,
|
|
23
|
+
id,
|
|
24
|
+
displayNameProp
|
|
25
|
+
}) => {
|
|
30
26
|
const [data, setData] = useState();
|
|
31
27
|
const [error, setError] = useState();
|
|
32
28
|
const [loading, setLoading] = useState(true);
|
|
@@ -74,12 +70,9 @@ export const DataElementOperandInfo = _ref2 => {
|
|
|
74
70
|
className: `jsx-${styles.__hash}`
|
|
75
71
|
}, i18n.t('Data set(s)')), /*#__PURE__*/React.createElement("td", {
|
|
76
72
|
className: `jsx-${styles.__hash}`
|
|
77
|
-
}, (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.dataSetElements) && renderDataSets(data.dataElementOperand.dataElement.dataSetElements.map(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} = _ref3;
|
|
81
|
-
return dataSet;
|
|
82
|
-
})))), /*#__PURE__*/React.createElement("tr", {
|
|
73
|
+
}, (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.dataSetElements) && renderDataSets(data.dataElementOperand.dataElement.dataSetElements.map(({
|
|
74
|
+
dataSet
|
|
75
|
+
}) => dataSet)))), /*#__PURE__*/React.createElement("tr", {
|
|
83
76
|
className: `jsx-${styles.__hash}`
|
|
84
77
|
}, /*#__PURE__*/React.createElement("th", {
|
|
85
78
|
className: `jsx-${styles.__hash}`
|
|
@@ -111,16 +104,13 @@ export const DataElementOperandInfo = _ref2 => {
|
|
|
111
104
|
className: `jsx-${styles.__hash}`
|
|
112
105
|
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.categoryCombo.displayName), /*#__PURE__*/React.createElement("ul", {
|
|
113
106
|
className: `jsx-${styles.__hash}`
|
|
114
|
-
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.categoryCombo.categories.map(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
className: `jsx-${styles.__hash}`
|
|
122
|
-
}, displayName);
|
|
123
|
-
}))))), (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.optionSet) && /*#__PURE__*/React.createElement("tr", {
|
|
107
|
+
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.categoryCombo.categories.map(({
|
|
108
|
+
id,
|
|
109
|
+
displayName
|
|
110
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
111
|
+
key: id,
|
|
112
|
+
className: `jsx-${styles.__hash}`
|
|
113
|
+
}, displayName)))))), (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.optionSet) && /*#__PURE__*/React.createElement("tr", {
|
|
124
114
|
className: `jsx-${styles.__hash}`
|
|
125
115
|
}, /*#__PURE__*/React.createElement("th", {
|
|
126
116
|
className: `jsx-${styles.__hash}`
|
|
@@ -158,16 +148,13 @@ export const DataElementOperandInfo = _ref2 => {
|
|
|
158
148
|
className: `jsx-${styles.__hash}`
|
|
159
149
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
160
150
|
className: `jsx-${styles.__hash}`
|
|
161
|
-
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.categoryOptionCombo.categoryCombo.categories.map(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
className: `jsx-${styles.__hash}`
|
|
169
|
-
}, displayName);
|
|
170
|
-
}))))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
151
|
+
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.categoryOptionCombo.categoryCombo.categories.map(({
|
|
152
|
+
id,
|
|
153
|
+
displayName
|
|
154
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
155
|
+
key: id,
|
|
156
|
+
className: `jsx-${styles.__hash}`
|
|
157
|
+
}, displayName)))))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
171
158
|
id: styles.__hash
|
|
172
159
|
}, styles));
|
|
173
160
|
};
|
|
@@ -8,28 +8,21 @@ import styles from './styles/InfoPopover.style.js';
|
|
|
8
8
|
const dataSetQuery = {
|
|
9
9
|
dataSet: {
|
|
10
10
|
resource: 'dataSets',
|
|
11
|
-
id:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
displayNameProp
|
|
20
|
-
} = _ref2;
|
|
21
|
-
return {
|
|
22
|
-
fields: `${getCommonFields(displayNameProp)},dataSetElements[dataElement[id,displayName]],expiryDays,indicators[id,displayName],periodType,`
|
|
23
|
-
};
|
|
24
|
-
}
|
|
11
|
+
id: ({
|
|
12
|
+
id
|
|
13
|
+
}) => id,
|
|
14
|
+
params: ({
|
|
15
|
+
displayNameProp
|
|
16
|
+
}) => ({
|
|
17
|
+
fields: `${getCommonFields(displayNameProp)},dataSetElements[dataElement[id,displayName]],expiryDays,indicators[id,displayName],periodType,`
|
|
18
|
+
})
|
|
25
19
|
}
|
|
26
20
|
};
|
|
27
|
-
export const DataSetInfo =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref3;
|
|
21
|
+
export const DataSetInfo = ({
|
|
22
|
+
type,
|
|
23
|
+
id,
|
|
24
|
+
displayNameProp
|
|
25
|
+
}) => {
|
|
33
26
|
const {
|
|
34
27
|
loading,
|
|
35
28
|
error,
|
|
@@ -61,15 +54,12 @@ export const DataSetInfo = _ref3 => {
|
|
|
61
54
|
className: `jsx-${styles.__hash}` + " " + "content-wrap"
|
|
62
55
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
63
56
|
className: `jsx-${styles.__hash}`
|
|
64
|
-
}, data === null || data === void 0 ? void 0 : data.dataSet.dataSetElements.map(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
className: `jsx-${styles.__hash}`
|
|
71
|
-
}, dataElement.displayName);
|
|
72
|
-
}))))), /*#__PURE__*/React.createElement("tr", {
|
|
57
|
+
}, data === null || data === void 0 ? void 0 : data.dataSet.dataSetElements.map(({
|
|
58
|
+
dataElement
|
|
59
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
60
|
+
key: dataElement.id,
|
|
61
|
+
className: `jsx-${styles.__hash}`
|
|
62
|
+
}, dataElement.displayName)))))), /*#__PURE__*/React.createElement("tr", {
|
|
73
63
|
className: `jsx-${styles.__hash}`
|
|
74
64
|
}, /*#__PURE__*/React.createElement("th", {
|
|
75
65
|
className: `jsx-${styles.__hash}`
|
|
@@ -79,16 +69,13 @@ export const DataSetInfo = _ref3 => {
|
|
|
79
69
|
className: `jsx-${styles.__hash}` + " " + "content-wrap"
|
|
80
70
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
81
71
|
className: `jsx-${styles.__hash}`
|
|
82
|
-
}, data.dataSet.indicators.map(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
className: `jsx-${styles.__hash}`
|
|
90
|
-
}, displayName);
|
|
91
|
-
}))) : /*#__PURE__*/React.createElement("span", {
|
|
72
|
+
}, data.dataSet.indicators.map(({
|
|
73
|
+
id,
|
|
74
|
+
displayName
|
|
75
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
76
|
+
key: id,
|
|
77
|
+
className: `jsx-${styles.__hash}`
|
|
78
|
+
}, displayName)))) : /*#__PURE__*/React.createElement("span", {
|
|
92
79
|
className: `jsx-${styles.__hash}` + " " + "none"
|
|
93
80
|
}, i18n.t('None')))), /*#__PURE__*/React.createElement("tr", {
|
|
94
81
|
className: `jsx-${styles.__hash}`
|
|
@@ -10,47 +10,34 @@ import styles from './styles/InfoPopover.style.js';
|
|
|
10
10
|
const programDataElementQuery = {
|
|
11
11
|
programDataElement: {
|
|
12
12
|
resource: 'dataElements',
|
|
13
|
-
id:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
displayNameProp
|
|
22
|
-
} = _ref2;
|
|
23
|
-
return {
|
|
24
|
-
fields: `${getCommonFields(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
25
|
-
};
|
|
26
|
-
}
|
|
13
|
+
id: ({
|
|
14
|
+
id
|
|
15
|
+
}) => id,
|
|
16
|
+
params: ({
|
|
17
|
+
displayNameProp
|
|
18
|
+
}) => ({
|
|
19
|
+
fields: `${getCommonFields(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
20
|
+
})
|
|
27
21
|
}
|
|
28
22
|
};
|
|
29
23
|
const programAttributeQuery = {
|
|
30
24
|
programAttribute: {
|
|
31
25
|
resource: 'trackedEntityAttributes',
|
|
32
|
-
id:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
displayNameProp
|
|
41
|
-
} = _ref4;
|
|
42
|
-
return {
|
|
43
|
-
fields: `${getCommonFields(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
44
|
-
};
|
|
45
|
-
}
|
|
26
|
+
id: ({
|
|
27
|
+
id
|
|
28
|
+
}) => id,
|
|
29
|
+
params: ({
|
|
30
|
+
displayNameProp
|
|
31
|
+
}) => ({
|
|
32
|
+
fields: `${getCommonFields(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
33
|
+
})
|
|
46
34
|
}
|
|
47
35
|
};
|
|
48
|
-
export const EventDataItemInfo =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} = _ref5;
|
|
36
|
+
export const EventDataItemInfo = ({
|
|
37
|
+
type,
|
|
38
|
+
id,
|
|
39
|
+
displayNameProp
|
|
40
|
+
}) => {
|
|
54
41
|
const {
|
|
55
42
|
loading,
|
|
56
43
|
error,
|
|
@@ -9,28 +9,21 @@ import styles from './styles/InfoPopover.style.js';
|
|
|
9
9
|
const indicatorQuery = {
|
|
10
10
|
indicator: {
|
|
11
11
|
resource: 'indicators',
|
|
12
|
-
id:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
displayNameProp
|
|
21
|
-
} = _ref2;
|
|
22
|
-
return {
|
|
23
|
-
fields: `${getCommonFields(displayNameProp)},annualized,dataSets[id,displayName],decimals,denominator,displayDenominatorDescription,displayNumeratorDescription,indicatorGroups[id,displayName],indicatorType[displayName,factor],legendSets[id,displayName],numerator`
|
|
24
|
-
};
|
|
25
|
-
}
|
|
12
|
+
id: ({
|
|
13
|
+
id
|
|
14
|
+
}) => id,
|
|
15
|
+
params: ({
|
|
16
|
+
displayNameProp
|
|
17
|
+
}) => ({
|
|
18
|
+
fields: `${getCommonFields(displayNameProp)},annualized,dataSets[id,displayName],decimals,denominator,displayDenominatorDescription,displayNumeratorDescription,indicatorGroups[id,displayName],indicatorType[displayName,factor],legendSets[id,displayName],numerator`
|
|
19
|
+
})
|
|
26
20
|
}
|
|
27
21
|
};
|
|
28
|
-
export const IndicatorInfo =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref3;
|
|
22
|
+
export const IndicatorInfo = ({
|
|
23
|
+
type,
|
|
24
|
+
id,
|
|
25
|
+
displayNameProp
|
|
26
|
+
}) => {
|
|
34
27
|
const [data, setData] = useState();
|
|
35
28
|
const [error, setError] = useState();
|
|
36
29
|
const [loading, setLoading] = useState(true);
|
|
@@ -137,16 +130,13 @@ export const IndicatorInfo = _ref3 => {
|
|
|
137
130
|
className: `jsx-${styles.__hash}` + " " + "content-wrap"
|
|
138
131
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
139
132
|
className: `jsx-${styles.__hash}`
|
|
140
|
-
}, data.indicator.dataSets.map(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
className: `jsx-${styles.__hash}`
|
|
148
|
-
}, displayName);
|
|
149
|
-
}))))), /*#__PURE__*/React.createElement("tr", {
|
|
133
|
+
}, data.indicator.dataSets.map(({
|
|
134
|
+
id,
|
|
135
|
+
displayName
|
|
136
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
137
|
+
key: id,
|
|
138
|
+
className: `jsx-${styles.__hash}`
|
|
139
|
+
}, displayName)))))), /*#__PURE__*/React.createElement("tr", {
|
|
150
140
|
className: `jsx-${styles.__hash}`
|
|
151
141
|
}, /*#__PURE__*/React.createElement("th", {
|
|
152
142
|
className: `jsx-${styles.__hash}`
|
|
@@ -19,13 +19,12 @@ import { IndicatorInfo } from './IndicatorInfo.js';
|
|
|
19
19
|
import { OptionInfo } from './OptionInfo.js';
|
|
20
20
|
import { ProgramIndicatorInfo } from './ProgramIndicatorInfo.js';
|
|
21
21
|
import styles from './styles/InfoPopover.style.js';
|
|
22
|
-
export const InfoPopover =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
22
|
+
export const InfoPopover = ({
|
|
23
|
+
reference,
|
|
24
|
+
onClose,
|
|
25
|
+
dataTest,
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
29
28
|
const type = props.item.type;
|
|
30
29
|
const infoProps = {
|
|
31
30
|
type,
|
|
@@ -25,16 +25,13 @@ export const renderDataSets = dataSets => {
|
|
|
25
25
|
className: `jsx-${styles.__hash}` + " " + "content-wrap"
|
|
26
26
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
27
27
|
className: `jsx-${styles.__hash}`
|
|
28
|
-
}, dataSets.map(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
className: `jsx-${styles.__hash}`
|
|
36
|
-
}, displayName);
|
|
37
|
-
}))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
28
|
+
}, dataSets.map(({
|
|
29
|
+
id,
|
|
30
|
+
displayName
|
|
31
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
32
|
+
key: id,
|
|
33
|
+
className: `jsx-${styles.__hash}`
|
|
34
|
+
}, displayName)))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
38
35
|
id: styles.__hash
|
|
39
36
|
}, styles));
|
|
40
37
|
}
|
|
@@ -53,16 +50,13 @@ export const renderGroupMemberships = groups => {
|
|
|
53
50
|
className: `jsx-${styles.__hash}` + " " + "content-wrap"
|
|
54
51
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
55
52
|
className: `jsx-${styles.__hash}`
|
|
56
|
-
}, groups.map(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
className: `jsx-${styles.__hash}`
|
|
64
|
-
}, displayName);
|
|
65
|
-
}))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
53
|
+
}, groups.map(({
|
|
54
|
+
id,
|
|
55
|
+
displayName
|
|
56
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
57
|
+
key: id,
|
|
58
|
+
className: `jsx-${styles.__hash}`
|
|
59
|
+
}, displayName)))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
66
60
|
id: styles.__hash
|
|
67
61
|
}, styles));
|
|
68
62
|
}
|
|
@@ -79,27 +73,23 @@ export const renderLegendSets = legendSets => {
|
|
|
79
73
|
className: `jsx-${styles.__hash}` + " " + "content-wrap"
|
|
80
74
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
81
75
|
className: `jsx-${styles.__hash}`
|
|
82
|
-
}, legendSets.map(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
className: `jsx-${styles.__hash}`
|
|
90
|
-
}, displayName);
|
|
91
|
-
}))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
76
|
+
}, legendSets.map(({
|
|
77
|
+
id,
|
|
78
|
+
displayName
|
|
79
|
+
}) => /*#__PURE__*/React.createElement("li", {
|
|
80
|
+
key: id,
|
|
81
|
+
className: `jsx-${styles.__hash}`
|
|
82
|
+
}, displayName)))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
92
83
|
id: styles.__hash
|
|
93
84
|
}, styles));
|
|
94
85
|
};
|
|
95
|
-
export const InfoTable =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} = _ref4;
|
|
86
|
+
export const InfoTable = ({
|
|
87
|
+
dataType,
|
|
88
|
+
data,
|
|
89
|
+
error,
|
|
90
|
+
loading,
|
|
91
|
+
children
|
|
92
|
+
}) => {
|
|
103
93
|
const {
|
|
104
94
|
fromServerDate
|
|
105
95
|
} = useTimeZoneConversion();
|
|
@@ -179,20 +169,17 @@ export const InfoTable = _ref4 => {
|
|
|
179
169
|
className: `jsx-${styles.__hash}`
|
|
180
170
|
}, i18n.t('Created by')), /*#__PURE__*/React.createElement("td", {
|
|
181
171
|
className: `jsx-${styles.__hash}`
|
|
182
|
-
}, `${data.createdBy.displayName}, ${data.createdBy.username}`)), data.attributeValues.map(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
className: `jsx-${styles.__hash}`
|
|
194
|
-
}, value));
|
|
195
|
-
})))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
172
|
+
}, `${data.createdBy.displayName}, ${data.createdBy.username}`)), data.attributeValues.map(({
|
|
173
|
+
attribute,
|
|
174
|
+
value
|
|
175
|
+
}) => /*#__PURE__*/React.createElement("tr", {
|
|
176
|
+
key: attribute.id,
|
|
177
|
+
className: `jsx-${styles.__hash}`
|
|
178
|
+
}, /*#__PURE__*/React.createElement("th", {
|
|
179
|
+
className: `jsx-${styles.__hash}`
|
|
180
|
+
}, attribute.displayName), /*#__PURE__*/React.createElement("td", {
|
|
181
|
+
className: `jsx-${styles.__hash}`
|
|
182
|
+
}, value)))))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
196
183
|
id: styles.__hash
|
|
197
184
|
}, styles));
|
|
198
185
|
};
|