@dhis2/analytics 28.0.3 → 28.0.5
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__/OpenFileDialog.stories.js +19 -1
- 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 +12 -11
- package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/cjs/components/DimensionsPanel/List/__tests__/DimensionItem.spec.js +48 -41
- package/build/cjs/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +110 -114
- package/build/cjs/components/DimensionsPanel/__tests__/DimensionsPanel.spec.js +36 -33
- 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__/DeleteDialog.spec.js +24 -27
- package/build/cjs/components/FileMenu/__tests__/FileMenu.spec.js +55 -31
- package/build/cjs/components/FileMenu/__tests__/GetLinkDialog.spec.js +35 -39
- package/build/cjs/components/FileMenu/__tests__/RenameDialog.spec.js +17 -11
- package/build/cjs/components/FileMenu/__tests__/SaveAsDialog.spec.js +44 -37
- package/build/cjs/components/FileMenu/utils.js +10 -12
- package/build/cjs/components/Filter/Filter.js +21 -27
- package/build/cjs/components/Filter/__tests__/Filter.spec.js +29 -34
- 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 +28 -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 +50 -79
- package/build/cjs/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +65 -36
- package/build/cjs/components/OpenFileDialog/__tests__/OpenFileDialog.spec.js +51 -0
- package/build/cjs/components/Options/VisualizationOptions.js +35 -46
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +38 -60
- package/build/cjs/components/OrgUnitDimension/__tests__/OrgUnitDimension.spec.js +78 -44
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +17 -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 +25 -30
- package/build/cjs/components/PeriodDimension/__tests__/FixedPeriodSingleSelect.spec.js +14 -21
- package/build/cjs/components/PeriodDimension/__tests__/PeriodDimension.spec.js +27 -23
- 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/Editor/__tests__/Editor.spec.js +6 -7
- package/build/cjs/components/RichText/Parser/Parser.js +5 -10
- package/build/cjs/components/RichText/Parser/__tests__/MdParser.spec.js +1 -1
- package/build/cjs/components/RichText/Parser/__tests__/Parser.spec.js +22 -23
- 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 +56 -47
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuDropdown.spec.js +8 -8
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +30 -23
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuListItem.spec.js +23 -17
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/__snapshots__/HoverMenuList.spec.js.snap +63 -0
- package/build/cjs/components/Toolbar/InterpretationsAndDetailsToggler.js +17 -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/Toolbar/__tests__/InterpretationsAndDetailsToggler.spec.js +19 -18
- package/build/cjs/components/Toolbar/__tests__/Toolbar.spec.js +8 -8
- package/build/cjs/components/Toolbar/__tests__/ToolbarSidebar.spec.js +14 -11
- package/build/cjs/components/Toolbar/__tests__/UpdateButton.spec.js +16 -14
- 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 +9 -10
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +25 -16
- 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__/OpenFileDialog.stories.js +17 -0
- 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 +11 -9
- package/build/es/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/es/components/DimensionsPanel/List/__tests__/DimensionItem.spec.js +47 -40
- package/build/es/components/DimensionsPanel/List/__tests__/__snapshots__/DimensionItem.spec.js.snap +110 -114
- package/build/es/components/DimensionsPanel/__tests__/DimensionsPanel.spec.js +35 -32
- 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__/DeleteDialog.spec.js +23 -26
- package/build/es/components/FileMenu/__tests__/FileMenu.spec.js +56 -32
- package/build/es/components/FileMenu/__tests__/GetLinkDialog.spec.js +34 -38
- package/build/es/components/FileMenu/__tests__/RenameDialog.spec.js +18 -12
- package/build/es/components/FileMenu/__tests__/SaveAsDialog.spec.js +43 -36
- package/build/es/components/FileMenu/utils.js +10 -12
- package/build/es/components/Filter/Filter.js +21 -27
- package/build/es/components/Filter/__tests__/Filter.spec.js +28 -33
- 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 +26 -25
- 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 +49 -78
- package/build/es/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/es/components/OpenFileDialog/VisTypeFilter.js +64 -36
- package/build/es/components/OpenFileDialog/__tests__/OpenFileDialog.spec.js +49 -0
- package/build/es/components/Options/VisualizationOptions.js +34 -44
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +37 -58
- package/build/es/components/OrgUnitDimension/__tests__/OrgUnitDimension.spec.js +77 -43
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +17 -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 +25 -30
- package/build/es/components/PeriodDimension/__tests__/FixedPeriodSingleSelect.spec.js +13 -20
- package/build/es/components/PeriodDimension/__tests__/PeriodDimension.spec.js +26 -22
- 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/Editor/__tests__/Editor.spec.js +7 -8
- package/build/es/components/RichText/Parser/Parser.js +4 -8
- package/build/es/components/RichText/Parser/__tests__/MdParser.spec.js +1 -1
- package/build/es/components/RichText/Parser/__tests__/Parser.spec.js +21 -22
- 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 +57 -48
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuDropdown.spec.js +7 -7
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +27 -20
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuListItem.spec.js +21 -15
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/__snapshots__/HoverMenuList.spec.js.snap +63 -0
- package/build/es/components/Toolbar/InterpretationsAndDetailsToggler.js +17 -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/Toolbar/__tests__/InterpretationsAndDetailsToggler.spec.js +18 -17
- package/build/es/components/Toolbar/__tests__/Toolbar.spec.js +7 -7
- package/build/es/components/Toolbar/__tests__/ToolbarSidebar.spec.js +13 -10
- package/build/es/components/Toolbar/__tests__/UpdateButton.spec.js +15 -13
- 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 +8 -8
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/es/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +24 -15
- 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 +13 -15
- package/build/cjs/components/OrgUnitDimension/__tests__/__snapshots__/OrgUnitDimension.spec.js.snap +0 -89
- package/build/cjs/components/PeriodDimension/__tests__/PeriodSelector.spec.js +0 -29
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -93
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -17
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/PeriodSelector.spec.js.snap +0 -89
- package/build/es/components/OrgUnitDimension/__tests__/__snapshots__/OrgUnitDimension.spec.js.snap +0 -89
- package/build/es/components/PeriodDimension/__tests__/PeriodSelector.spec.js +0 -26
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -93
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -17
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/PeriodSelector.spec.js.snap +0 -89
|
@@ -12,35 +12,29 @@ var _expressions = require("../../../modules/expressions.js");
|
|
|
12
12
|
var _Operator = _interopRequireDefault(require("./Operator.js"));
|
|
13
13
|
var _MathOperatorSelectorStyle = _interopRequireDefault(require("./styles/MathOperatorSelector.style.js"));
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
const MathOperatorSelector =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onDoubleClick: onDoubleClick
|
|
39
|
-
});
|
|
40
|
-
}))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
41
|
-
id: _MathOperatorSelectorStyle.default.__hash
|
|
42
|
-
}, _MathOperatorSelectorStyle.default));
|
|
43
|
-
};
|
|
15
|
+
const MathOperatorSelector = ({
|
|
16
|
+
onDoubleClick
|
|
17
|
+
}) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: `jsx-${_MathOperatorSelectorStyle.default.__hash}` + " " + "wrapper"
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement("h4", {
|
|
20
|
+
className: `jsx-${_MathOperatorSelectorStyle.default.__hash}` + " " + "sub-header"
|
|
21
|
+
}, _index.default.t('Math operators')), /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
"data-test": "operators-list",
|
|
23
|
+
className: `jsx-${_MathOperatorSelectorStyle.default.__hash}` + " " + "operators"
|
|
24
|
+
}, (0, _expressions.getOperators)().map(({
|
|
25
|
+
label,
|
|
26
|
+
value,
|
|
27
|
+
type
|
|
28
|
+
}, index) => /*#__PURE__*/_react.default.createElement(_Operator.default, {
|
|
29
|
+
key: `${label}-${index}`,
|
|
30
|
+
label: label,
|
|
31
|
+
value: value,
|
|
32
|
+
type: type,
|
|
33
|
+
index: index,
|
|
34
|
+
onDoubleClick: onDoubleClick
|
|
35
|
+
})))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
36
|
+
id: _MathOperatorSelectorStyle.default.__hash
|
|
37
|
+
}, _MathOperatorSelectorStyle.default));
|
|
44
38
|
MathOperatorSelector.propTypes = {
|
|
45
39
|
onDoubleClick: _propTypes.default.func.isRequired
|
|
46
40
|
};
|
|
@@ -15,13 +15,12 @@ var _FormulaItemStyle = _interopRequireDefault(require("./styles/FormulaItem.sty
|
|
|
15
15
|
var _OperatorStyle = _interopRequireDefault(require("./styles/Operator.style.js"));
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
|
-
const Operator =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} = _ref;
|
|
18
|
+
const Operator = ({
|
|
19
|
+
label,
|
|
20
|
+
value,
|
|
21
|
+
type,
|
|
22
|
+
onDoubleClick
|
|
23
|
+
}) => {
|
|
25
24
|
const data = {
|
|
26
25
|
label,
|
|
27
26
|
value,
|
|
@@ -12,42 +12,34 @@ var _predefinedDimensions = require("../../modules/predefinedDimensions.js");
|
|
|
12
12
|
var _InfoPopover = require("./Info/InfoPopover.js");
|
|
13
13
|
var _ItemOptionsSelector = require("./ItemOptionsSelector/ItemOptionsSelector.js");
|
|
14
14
|
var _ItemSelector = _interopRequireDefault(require("./ItemSelector/ItemSelector.js"));
|
|
15
|
-
function
|
|
16
|
-
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; }
|
|
15
|
+
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); }
|
|
17
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
17
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
18
|
const DataDimensionCtx = /*#__PURE__*/(0, _react.createContext)({});
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
const SELECTED_DIMENSIONS_PROP_DEFAULT = [];
|
|
20
|
+
const DataDimension = ({
|
|
21
|
+
currentUser,
|
|
22
|
+
onSelect = Function.prototype,
|
|
23
|
+
selectedDimensions = SELECTED_DIMENSIONS_PROP_DEFAULT,
|
|
24
|
+
displayNameProp,
|
|
25
|
+
enabledDataTypes,
|
|
26
|
+
infoBoxMessage,
|
|
27
|
+
onCalculationSave,
|
|
28
|
+
visType
|
|
29
|
+
}) => {
|
|
31
30
|
const {
|
|
32
31
|
serverVersion
|
|
33
32
|
} = (0, _appRuntime.useConfig)();
|
|
34
33
|
const itemsRef = (0, _react.useRef)(new Map());
|
|
35
|
-
const filterDataTypesByVersion = (0, _react.useCallback)(dataTypes => dataTypes.filter(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// Calculations only available from 2.40
|
|
41
|
-
id !== _dataTypes.DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM || serverVersion.minor >= 40
|
|
42
|
-
);
|
|
43
|
-
}), [serverVersion.minor]);
|
|
34
|
+
const filterDataTypesByVersion = (0, _react.useCallback)(dataTypes => dataTypes.filter(({
|
|
35
|
+
id
|
|
36
|
+
}) =>
|
|
37
|
+
// Calculations only available from 2.40
|
|
38
|
+
id !== _dataTypes.DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM || serverVersion.minor >= 40), [serverVersion.minor]);
|
|
44
39
|
const [dataTypes, setDataTypes] = (0, _react.useState)(filterDataTypesByVersion(enabledDataTypes || Object.values(_dataTypes.dataTypeMap)));
|
|
45
|
-
const supportsEDI = dataTypes.map(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = _ref3;
|
|
49
|
-
return id;
|
|
50
|
-
}).includes(_dataTypes.DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM);
|
|
40
|
+
const supportsEDI = dataTypes.map(({
|
|
41
|
+
id
|
|
42
|
+
}) => id).includes(_dataTypes.DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM);
|
|
51
43
|
const [currentCalculation, setCurrentCalculation] = (0, _react.useState)();
|
|
52
44
|
const [currentDataItem, setCurrentDataItem] = (0, _react.useState)();
|
|
53
45
|
const [infoDataItem, setInfoDataItem] = (0, _react.useState)();
|
|
@@ -144,10 +136,6 @@ DataDimension.propTypes = {
|
|
|
144
136
|
visType: _propTypes.default.string,
|
|
145
137
|
onCalculationSave: _propTypes.default.func
|
|
146
138
|
};
|
|
147
|
-
DataDimension.defaultProps = {
|
|
148
|
-
selectedDimensions: [],
|
|
149
|
-
onSelect: Function.prototype
|
|
150
|
-
};
|
|
151
139
|
const useDataDimensionContext = () => (0, _react.useContext)(DataDimensionCtx);
|
|
152
140
|
exports.useDataDimensionContext = useDataDimensionContext;
|
|
153
141
|
var _default = exports.default = DataDimension;
|
|
@@ -12,34 +12,26 @@ var _expression = require("../../../api/expression.js");
|
|
|
12
12
|
var _index = _interopRequireDefault(require("../../../locales/index.js"));
|
|
13
13
|
var _InfoTable = require("./InfoTable.js");
|
|
14
14
|
var _InfoPopoverStyle = _interopRequireDefault(require("./styles/InfoPopover.style.js"));
|
|
15
|
-
function
|
|
16
|
-
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; }
|
|
15
|
+
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); }
|
|
17
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
17
|
const calculationQuery = {
|
|
19
18
|
calculation: {
|
|
20
19
|
resource: 'expressionDimensionItems',
|
|
21
|
-
id:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
displayNameProp
|
|
30
|
-
} = _ref2;
|
|
31
|
-
return {
|
|
32
|
-
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},expression`
|
|
33
|
-
};
|
|
34
|
-
}
|
|
20
|
+
id: ({
|
|
21
|
+
id
|
|
22
|
+
}) => id,
|
|
23
|
+
params: ({
|
|
24
|
+
displayNameProp
|
|
25
|
+
}) => ({
|
|
26
|
+
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},expression`
|
|
27
|
+
})
|
|
35
28
|
}
|
|
36
29
|
};
|
|
37
|
-
const CalculationInfo =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = _ref3;
|
|
30
|
+
const CalculationInfo = ({
|
|
31
|
+
type,
|
|
32
|
+
id,
|
|
33
|
+
displayNameProp
|
|
34
|
+
}) => {
|
|
43
35
|
const [data, setData] = (0, _react.useState)();
|
|
44
36
|
const [error, setError] = (0, _react.useState)();
|
|
45
37
|
const [expressionError, setExpressionError] = (0, _react.useState)();
|
|
@@ -16,28 +16,21 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
16
16
|
const dataElementQuery = {
|
|
17
17
|
dataElement: {
|
|
18
18
|
resource: 'dataElements',
|
|
19
|
-
id:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
displayNameProp
|
|
28
|
-
} = _ref2;
|
|
29
|
-
return {
|
|
30
|
-
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
31
|
-
};
|
|
32
|
-
}
|
|
19
|
+
id: ({
|
|
20
|
+
id
|
|
21
|
+
}) => id,
|
|
22
|
+
params: ({
|
|
23
|
+
displayNameProp
|
|
24
|
+
}) => ({
|
|
25
|
+
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
26
|
+
})
|
|
33
27
|
}
|
|
34
28
|
};
|
|
35
|
-
const DataElementInfo =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref3;
|
|
29
|
+
const DataElementInfo = ({
|
|
30
|
+
type,
|
|
31
|
+
id,
|
|
32
|
+
displayNameProp
|
|
33
|
+
}) => {
|
|
41
34
|
const {
|
|
42
35
|
loading,
|
|
43
36
|
error,
|
|
@@ -59,12 +52,9 @@ const DataElementInfo = _ref3 => {
|
|
|
59
52
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
60
53
|
}, _index.default.t('Data set(s)')), /*#__PURE__*/_react.default.createElement("td", {
|
|
61
54
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
62
|
-
}, (data === null || data === void 0 ? void 0 : data.dataElement.dataSetElements) && (0, _InfoTable.renderDataSets)(data.dataElement.dataSetElements.map(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} = _ref4;
|
|
66
|
-
return dataSet;
|
|
67
|
-
})))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
55
|
+
}, (data === null || data === void 0 ? void 0 : data.dataElement.dataSetElements) && (0, _InfoTable.renderDataSets)(data.dataElement.dataSetElements.map(({
|
|
56
|
+
dataSet
|
|
57
|
+
}) => dataSet)))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
68
58
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
69
59
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
70
60
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
@@ -96,16 +86,13 @@ const DataElementInfo = _ref3 => {
|
|
|
96
86
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
97
87
|
}, data === null || data === void 0 ? void 0 : data.dataElement.categoryCombo.displayName), /*#__PURE__*/_react.default.createElement("ul", {
|
|
98
88
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
99
|
-
}, data === null || data === void 0 ? void 0 : data.dataElement.categoryCombo.categories.map(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
107
|
-
}, displayName);
|
|
108
|
-
}))))), (data === null || data === void 0 ? void 0 : data.dataElement.optionSet) && /*#__PURE__*/_react.default.createElement("tr", {
|
|
89
|
+
}, data === null || data === void 0 ? void 0 : data.dataElement.categoryCombo.categories.map(({
|
|
90
|
+
id,
|
|
91
|
+
displayName
|
|
92
|
+
}) => /*#__PURE__*/_react.default.createElement("li", {
|
|
93
|
+
key: id,
|
|
94
|
+
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
95
|
+
}, displayName)))))), (data === null || data === void 0 ? void 0 : data.dataElement.optionSet) && /*#__PURE__*/_react.default.createElement("tr", {
|
|
109
96
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
110
97
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
111
98
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
@@ -12,30 +12,25 @@ var _index = _interopRequireDefault(require("../../../locales/index.js"));
|
|
|
12
12
|
var _valueTypes = require("../../../modules/valueTypes.js");
|
|
13
13
|
var _InfoTable = require("./InfoTable.js");
|
|
14
14
|
var _InfoPopoverStyle = _interopRequireDefault(require("./styles/InfoPopover.style.js"));
|
|
15
|
-
function
|
|
16
|
-
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; }
|
|
15
|
+
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); }
|
|
17
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
17
|
const dataElementOperandsQuery = {
|
|
19
18
|
dataElementOperands: {
|
|
20
19
|
resource: 'dataElementOperands',
|
|
21
|
-
params:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
fields: [`${(0, _InfoTable.getCommonFields)(displayNameProp)}`, 'categoryOptionCombo[categoryCombo[categories[displayName,id],displayName],displayName]', `dataElement[${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant]`, 'displayName,id']
|
|
29
|
-
};
|
|
30
|
-
}
|
|
20
|
+
params: ({
|
|
21
|
+
displayNameProp,
|
|
22
|
+
id
|
|
23
|
+
}) => ({
|
|
24
|
+
filter: `id:eq:${id}`,
|
|
25
|
+
fields: [`${(0, _InfoTable.getCommonFields)(displayNameProp)}`, 'categoryOptionCombo[categoryCombo[categories[displayName,id],displayName],displayName]', `dataElement[${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,categoryCombo[displayName,categories[id,displayName]],dataElementGroups[id,displayName],dataSetElements[dataSet[id,displayName]],legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant]`, 'displayName,id']
|
|
26
|
+
})
|
|
31
27
|
}
|
|
32
28
|
};
|
|
33
|
-
const DataElementOperandInfo =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = _ref2;
|
|
29
|
+
const DataElementOperandInfo = ({
|
|
30
|
+
type,
|
|
31
|
+
id,
|
|
32
|
+
displayNameProp
|
|
33
|
+
}) => {
|
|
39
34
|
const [data, setData] = (0, _react.useState)();
|
|
40
35
|
const [error, setError] = (0, _react.useState)();
|
|
41
36
|
const [loading, setLoading] = (0, _react.useState)(true);
|
|
@@ -83,12 +78,9 @@ const DataElementOperandInfo = _ref2 => {
|
|
|
83
78
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
84
79
|
}, _index.default.t('Data set(s)')), /*#__PURE__*/_react.default.createElement("td", {
|
|
85
80
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
86
|
-
}, (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.dataSetElements) && (0, _InfoTable.renderDataSets)(data.dataElementOperand.dataElement.dataSetElements.map(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
} = _ref3;
|
|
90
|
-
return dataSet;
|
|
91
|
-
})))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
81
|
+
}, (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.dataSetElements) && (0, _InfoTable.renderDataSets)(data.dataElementOperand.dataElement.dataSetElements.map(({
|
|
82
|
+
dataSet
|
|
83
|
+
}) => dataSet)))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
92
84
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
93
85
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
94
86
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
@@ -120,16 +112,13 @@ const DataElementOperandInfo = _ref2 => {
|
|
|
120
112
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
121
113
|
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.categoryCombo.displayName), /*#__PURE__*/_react.default.createElement("ul", {
|
|
122
114
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
123
|
-
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.categoryCombo.categories.map(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
131
|
-
}, displayName);
|
|
132
|
-
}))))), (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.optionSet) && /*#__PURE__*/_react.default.createElement("tr", {
|
|
115
|
+
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.categoryCombo.categories.map(({
|
|
116
|
+
id,
|
|
117
|
+
displayName
|
|
118
|
+
}) => /*#__PURE__*/_react.default.createElement("li", {
|
|
119
|
+
key: id,
|
|
120
|
+
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
121
|
+
}, displayName)))))), (data === null || data === void 0 ? void 0 : data.dataElementOperand.dataElement.optionSet) && /*#__PURE__*/_react.default.createElement("tr", {
|
|
133
122
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
134
123
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
135
124
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
@@ -167,16 +156,13 @@ const DataElementOperandInfo = _ref2 => {
|
|
|
167
156
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
168
157
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
169
158
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
170
|
-
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.categoryOptionCombo.categoryCombo.categories.map(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
178
|
-
}, displayName);
|
|
179
|
-
}))))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
159
|
+
}, data === null || data === void 0 ? void 0 : data.dataElementOperand.categoryOptionCombo.categoryCombo.categories.map(({
|
|
160
|
+
id,
|
|
161
|
+
displayName
|
|
162
|
+
}) => /*#__PURE__*/_react.default.createElement("li", {
|
|
163
|
+
key: id,
|
|
164
|
+
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
165
|
+
}, displayName)))))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
180
166
|
id: _InfoPopoverStyle.default.__hash
|
|
181
167
|
}, _InfoPopoverStyle.default));
|
|
182
168
|
};
|
|
@@ -15,28 +15,21 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
15
15
|
const dataSetQuery = {
|
|
16
16
|
dataSet: {
|
|
17
17
|
resource: 'dataSets',
|
|
18
|
-
id:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
displayNameProp
|
|
27
|
-
} = _ref2;
|
|
28
|
-
return {
|
|
29
|
-
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},dataSetElements[dataElement[id,displayName]],expiryDays,indicators[id,displayName],periodType,`
|
|
30
|
-
};
|
|
31
|
-
}
|
|
18
|
+
id: ({
|
|
19
|
+
id
|
|
20
|
+
}) => id,
|
|
21
|
+
params: ({
|
|
22
|
+
displayNameProp
|
|
23
|
+
}) => ({
|
|
24
|
+
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},dataSetElements[dataElement[id,displayName]],expiryDays,indicators[id,displayName],periodType,`
|
|
25
|
+
})
|
|
32
26
|
}
|
|
33
27
|
};
|
|
34
|
-
const DataSetInfo =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} = _ref3;
|
|
28
|
+
const DataSetInfo = ({
|
|
29
|
+
type,
|
|
30
|
+
id,
|
|
31
|
+
displayNameProp
|
|
32
|
+
}) => {
|
|
40
33
|
const {
|
|
41
34
|
loading,
|
|
42
35
|
error,
|
|
@@ -68,15 +61,12 @@ const DataSetInfo = _ref3 => {
|
|
|
68
61
|
className: `jsx-${_InfoPopoverStyle.default.__hash}` + " " + "content-wrap"
|
|
69
62
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
70
63
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
71
|
-
}, data === null || data === void 0 ? void 0 : data.dataSet.dataSetElements.map(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
78
|
-
}, dataElement.displayName);
|
|
79
|
-
}))))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
64
|
+
}, data === null || data === void 0 ? void 0 : data.dataSet.dataSetElements.map(({
|
|
65
|
+
dataElement
|
|
66
|
+
}) => /*#__PURE__*/_react.default.createElement("li", {
|
|
67
|
+
key: dataElement.id,
|
|
68
|
+
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
69
|
+
}, dataElement.displayName)))))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
80
70
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
81
71
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
82
72
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
@@ -86,16 +76,13 @@ const DataSetInfo = _ref3 => {
|
|
|
86
76
|
className: `jsx-${_InfoPopoverStyle.default.__hash}` + " " + "content-wrap"
|
|
87
77
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
88
78
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
89
|
-
}, data.dataSet.indicators.map(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
97
|
-
}, displayName);
|
|
98
|
-
}))) : /*#__PURE__*/_react.default.createElement("span", {
|
|
79
|
+
}, data.dataSet.indicators.map(({
|
|
80
|
+
id,
|
|
81
|
+
displayName
|
|
82
|
+
}) => /*#__PURE__*/_react.default.createElement("li", {
|
|
83
|
+
key: id,
|
|
84
|
+
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
85
|
+
}, displayName)))) : /*#__PURE__*/_react.default.createElement("span", {
|
|
99
86
|
className: `jsx-${_InfoPopoverStyle.default.__hash}` + " " + "none"
|
|
100
87
|
}, _index.default.t('None')))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
101
88
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
@@ -17,47 +17,34 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
17
|
const programDataElementQuery = {
|
|
18
18
|
programDataElement: {
|
|
19
19
|
resource: 'dataElements',
|
|
20
|
-
id:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
displayNameProp
|
|
29
|
-
} = _ref2;
|
|
30
|
-
return {
|
|
31
|
-
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
32
|
-
};
|
|
33
|
-
}
|
|
20
|
+
id: ({
|
|
21
|
+
id
|
|
22
|
+
}) => id,
|
|
23
|
+
params: ({
|
|
24
|
+
displayNameProp
|
|
25
|
+
}) => ({
|
|
26
|
+
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
27
|
+
})
|
|
34
28
|
}
|
|
35
29
|
};
|
|
36
30
|
const programAttributeQuery = {
|
|
37
31
|
programAttribute: {
|
|
38
32
|
resource: 'trackedEntityAttributes',
|
|
39
|
-
id:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
displayNameProp
|
|
48
|
-
} = _ref4;
|
|
49
|
-
return {
|
|
50
|
-
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
51
|
-
};
|
|
52
|
-
}
|
|
33
|
+
id: ({
|
|
34
|
+
id
|
|
35
|
+
}) => id,
|
|
36
|
+
params: ({
|
|
37
|
+
displayNameProp
|
|
38
|
+
}) => ({
|
|
39
|
+
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},aggregationType,dimensionItemType,legendSets[id,displayName],optionSet[displayName],valueType,zeroIsSignificant`
|
|
40
|
+
})
|
|
53
41
|
}
|
|
54
42
|
};
|
|
55
|
-
const EventDataItemInfo =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} = _ref5;
|
|
43
|
+
const EventDataItemInfo = ({
|
|
44
|
+
type,
|
|
45
|
+
id,
|
|
46
|
+
displayNameProp
|
|
47
|
+
}) => {
|
|
61
48
|
const {
|
|
62
49
|
loading,
|
|
63
50
|
error,
|
|
@@ -12,34 +12,26 @@ var _expression = require("../../../api/expression.js");
|
|
|
12
12
|
var _index = _interopRequireDefault(require("../../../locales/index.js"));
|
|
13
13
|
var _InfoTable = require("./InfoTable.js");
|
|
14
14
|
var _InfoPopoverStyle = _interopRequireDefault(require("./styles/InfoPopover.style.js"));
|
|
15
|
-
function
|
|
16
|
-
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; }
|
|
15
|
+
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); }
|
|
17
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
17
|
const indicatorQuery = {
|
|
19
18
|
indicator: {
|
|
20
19
|
resource: 'indicators',
|
|
21
|
-
id:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
displayNameProp
|
|
30
|
-
} = _ref2;
|
|
31
|
-
return {
|
|
32
|
-
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},annualized,dataSets[id,displayName],decimals,denominator,displayDenominatorDescription,displayNumeratorDescription,indicatorGroups[id,displayName],indicatorType[displayName,factor],legendSets[id,displayName],numerator`
|
|
33
|
-
};
|
|
34
|
-
}
|
|
20
|
+
id: ({
|
|
21
|
+
id
|
|
22
|
+
}) => id,
|
|
23
|
+
params: ({
|
|
24
|
+
displayNameProp
|
|
25
|
+
}) => ({
|
|
26
|
+
fields: `${(0, _InfoTable.getCommonFields)(displayNameProp)},annualized,dataSets[id,displayName],decimals,denominator,displayDenominatorDescription,displayNumeratorDescription,indicatorGroups[id,displayName],indicatorType[displayName,factor],legendSets[id,displayName],numerator`
|
|
27
|
+
})
|
|
35
28
|
}
|
|
36
29
|
};
|
|
37
|
-
const IndicatorInfo =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = _ref3;
|
|
30
|
+
const IndicatorInfo = ({
|
|
31
|
+
type,
|
|
32
|
+
id,
|
|
33
|
+
displayNameProp
|
|
34
|
+
}) => {
|
|
43
35
|
const [data, setData] = (0, _react.useState)();
|
|
44
36
|
const [error, setError] = (0, _react.useState)();
|
|
45
37
|
const [loading, setLoading] = (0, _react.useState)(true);
|
|
@@ -146,16 +138,13 @@ const IndicatorInfo = _ref3 => {
|
|
|
146
138
|
className: `jsx-${_InfoPopoverStyle.default.__hash}` + " " + "content-wrap"
|
|
147
139
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
148
140
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
149
|
-
}, data.indicator.dataSets.map(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
157
|
-
}, displayName);
|
|
158
|
-
}))))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
141
|
+
}, data.indicator.dataSets.map(({
|
|
142
|
+
id,
|
|
143
|
+
displayName
|
|
144
|
+
}) => /*#__PURE__*/_react.default.createElement("li", {
|
|
145
|
+
key: id,
|
|
146
|
+
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
147
|
+
}, displayName)))))), /*#__PURE__*/_react.default.createElement("tr", {
|
|
159
148
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|
|
160
149
|
}, /*#__PURE__*/_react.default.createElement("th", {
|
|
161
150
|
className: `jsx-${_InfoPopoverStyle.default.__hash}`
|