@dhis2/analytics 28.0.3 → 28.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/__demo__/DataDimension.stories.js +1 -2
- package/build/cjs/__demo__/Filter.stories.js +1 -2
- package/build/cjs/__demo__/FixedPeriodSelect.stories.js +1 -2
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +1 -2
- package/build/cjs/__demo__/PivotTable.stories.js +166 -224
- package/build/cjs/__demo__/ScatterPlotPdfExport.stories.js +1 -2
- package/build/cjs/__demo__/SingleValue.stories.js +1 -2
- package/build/cjs/__demo__/Toolbar.stories.js +1 -2
- package/build/cjs/api/__tests__/dimensions.spec.js +1 -2
- package/build/cjs/api/analytics/Analytics.js +8 -9
- package/build/cjs/api/analytics/AnalyticsBase.js +58 -77
- package/build/cjs/api/analytics/AnalyticsRequest.js +1 -2
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +18 -21
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
- package/build/cjs/api/analytics/AnalyticsResponseHeader.js +5 -7
- package/build/cjs/api/analytics/__tests__/AnalyticsBase.spec.js +9 -12
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
- package/build/cjs/api/analytics/utils.js +11 -17
- package/build/cjs/api/dimensions.js +119 -148
- package/build/cjs/api/expression.js +39 -60
- package/build/cjs/api/organisationUnits.js +23 -35
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +12 -20
- package/build/cjs/components/CachedDataQueryProvider.js +7 -9
- package/build/cjs/components/DashboardPluginWrapper/DashboardPluginWrapper.js +18 -22
- package/build/cjs/components/DataDimension/Calculation/CalculationModal.js +44 -61
- package/build/cjs/components/DataDimension/Calculation/DataElementOption.js +5 -6
- package/build/cjs/components/DataDimension/Calculation/DataElementSelector.js +29 -38
- package/build/cjs/components/DataDimension/Calculation/DndContext.js +29 -37
- package/build/cjs/components/DataDimension/Calculation/DraggingItem.js +5 -6
- package/build/cjs/components/DataDimension/Calculation/DropZone.js +4 -5
- package/build/cjs/components/DataDimension/Calculation/FormulaField.js +29 -32
- package/build/cjs/components/DataDimension/Calculation/FormulaItem.js +14 -16
- package/build/cjs/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
- package/build/cjs/components/DataDimension/Calculation/Operator.js +6 -7
- package/build/cjs/components/DataDimension/DataDimension.js +20 -32
- package/build/cjs/components/DataDimension/Info/CalculationInfo.js +14 -22
- package/build/cjs/components/DataDimension/Info/DataElementInfo.js +23 -36
- package/build/cjs/components/DataDimension/Info/DataElementOperandInfo.js +30 -44
- package/build/cjs/components/DataDimension/Info/DataSetInfo.js +26 -39
- package/build/cjs/components/DataDimension/Info/EventDataItemInfo.js +21 -34
- package/build/cjs/components/DataDimension/Info/IndicatorInfo.js +21 -32
- package/build/cjs/components/DataDimension/Info/InfoPopover.js +6 -7
- package/build/cjs/components/DataDimension/Info/InfoTable.js +39 -52
- package/build/cjs/components/DataDimension/Info/OptionInfo.js +13 -20
- package/build/cjs/components/DataDimension/Info/ProgramIndicatorInfo.js +46 -58
- package/build/cjs/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +22 -32
- package/build/cjs/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
- package/build/cjs/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
- package/build/cjs/components/DataDimension/ItemSelector/GroupSelector.js +10 -12
- package/build/cjs/components/DataDimension/ItemSelector/ItemSelector.js +86 -104
- package/build/cjs/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
- package/build/cjs/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
- package/build/cjs/components/DataDimension/TransferOption.js +35 -39
- package/build/cjs/components/DimensionMenu.js +13 -14
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +8 -9
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +12 -13
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +9 -10
- package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -13
- package/build/cjs/components/DynamicDimension/ItemSelector.js +25 -38
- package/build/cjs/components/FileMenu/DeleteDialog.js +11 -16
- package/build/cjs/components/FileMenu/FileMenu.js +19 -30
- package/build/cjs/components/FileMenu/GetLinkDialog.js +7 -7
- package/build/cjs/components/FileMenu/RenameDialog.js +13 -21
- package/build/cjs/components/FileMenu/SaveAsDialog.js +13 -21
- package/build/cjs/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
- package/build/cjs/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
- package/build/cjs/components/FileMenu/utils.js +10 -12
- package/build/cjs/components/Filter/Filter.js +21 -27
- package/build/cjs/components/Interpretations/InterpretationModal/Comment.js +8 -10
- package/build/cjs/components/Interpretations/InterpretationModal/CommentAddForm.js +10 -15
- package/build/cjs/components/Interpretations/InterpretationModal/CommentDeleteButton.js +10 -15
- package/build/cjs/components/Interpretations/InterpretationModal/CommentUpdateForm.js +12 -17
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationModal.js +19 -25
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationThread.js +12 -14
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationForm.js +12 -17
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +23 -33
- package/build/cjs/components/Interpretations/common/Interpretation/Interpretation.js +13 -15
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +5 -7
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +15 -23
- package/build/cjs/components/Interpretations/common/Interpretation/useLike.js +5 -6
- package/build/cjs/components/Interpretations/common/Message/Message.js +6 -7
- package/build/cjs/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
- package/build/cjs/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
- package/build/cjs/components/Interpretations/common/Message/MessageIconButton.js +34 -40
- package/build/cjs/components/Interpretations/common/Message/MessageInput.js +1 -2
- package/build/cjs/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
- package/build/cjs/components/LegendKey/LegendKey.js +3 -4
- package/build/cjs/components/OfflineTooltip.js +18 -26
- package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +20 -26
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +23 -26
- package/build/cjs/components/OpenFileDialog/DateField.js +3 -4
- package/build/cjs/components/OpenFileDialog/FileList.js +19 -22
- package/build/cjs/components/OpenFileDialog/NameFilter.js +15 -21
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +36 -45
- package/build/cjs/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +28 -37
- package/build/cjs/components/Options/VisualizationOptions.js +35 -46
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +38 -60
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +16 -25
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +15 -21
- package/build/cjs/components/PeriodDimension/PeriodDimension.js +9 -12
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +49 -63
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +24 -30
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +6 -7
- package/build/cjs/components/PeriodDimension/utils/index.js +1 -5
- package/build/cjs/components/PivotTable/PivotTable.js +8 -10
- package/build/cjs/components/PivotTable/PivotTableBody.js +20 -29
- package/build/cjs/components/PivotTable/PivotTableCell.js +8 -12
- package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +14 -17
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
- package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +22 -29
- package/build/cjs/components/PivotTable/PivotTableContainer.js +5 -6
- package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -4
- package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +5 -7
- package/build/cjs/components/PivotTable/PivotTableHead.js +13 -16
- package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +8 -9
- package/build/cjs/components/PivotTable/PivotTableRow.js +20 -27
- package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +19 -24
- package/build/cjs/components/PivotTable/PivotTableTitleRows.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +6 -8
- package/build/cjs/components/RichText/Editor/Editor.js +70 -85
- package/build/cjs/components/RichText/Parser/Parser.js +5 -10
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -24
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +8 -13
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuList.js +9 -17
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +11 -16
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +13 -11
- package/build/cjs/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
- package/build/cjs/components/Toolbar/Toolbar.js +10 -16
- package/build/cjs/components/Toolbar/ToolbarSidebar.js +12 -18
- package/build/cjs/components/Toolbar/UpdateButton.js +18 -24
- package/build/cjs/components/TransferOption.js +14 -15
- package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +17 -25
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -9
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
- package/build/cjs/components/UserMention/UserList.js +6 -7
- package/build/cjs/components/UserMention/UserMentionWrapper.js +13 -20
- package/build/cjs/components/UserMention/useUserSearchResults.js +12 -16
- package/build/cjs/components/VisTypeIcon.js +5 -6
- package/build/cjs/index.js +38 -39
- package/build/cjs/locales/ar_IQ/translations.json +20 -11
- package/build/cjs/locales/cs/translations.json +2 -0
- package/build/cjs/locales/en/translations.json +1 -0
- package/build/cjs/locales/es/translations.json +2 -0
- package/build/cjs/locales/fr/translations.json +2 -0
- package/build/cjs/locales/id/translations.json +20 -11
- package/build/cjs/locales/index.js +62 -62
- package/build/cjs/locales/lo/translations.json +2 -0
- package/build/cjs/locales/nb/translations.json +2 -0
- package/build/cjs/locales/prs/translations.json +2 -0
- package/build/cjs/locales/ps/translations.json +2 -0
- package/build/cjs/locales/pt/translations.json +2 -0
- package/build/cjs/locales/pt_BR/translations.json +2 -0
- package/build/cjs/locales/ru/translations.json +2 -0
- package/build/cjs/locales/si/translations.json +20 -11
- package/build/cjs/locales/sv/translations.json +20 -11
- package/build/cjs/locales/tet/translations.json +20 -11
- package/build/cjs/locales/tg/translations.json +2 -0
- package/build/cjs/locales/uk/translations.json +2 -0
- package/build/cjs/locales/ur/translations.json +2 -0
- package/build/cjs/locales/uz_UZ_Cyrl/translations.json +2 -0
- package/build/cjs/locales/uz_UZ_Latn/translations.json +4 -2
- package/build/cjs/locales/vi/translations.json +2 -0
- package/build/cjs/locales/zh/translations.json +2 -0
- package/build/cjs/locales/zh_CN/translations.json +17 -15
- package/build/cjs/modules/__tests__/expressions.spec.js +4 -5
- package/build/cjs/modules/__tests__/isNumeric.spec.js +33 -0
- package/build/cjs/modules/dimensionListItem.js +4 -5
- package/build/cjs/modules/expressions.js +3 -9
- package/build/cjs/modules/getPWAInstallationStatus.js +7 -9
- package/build/cjs/modules/layout/dimensionCreate.js +1 -3
- package/build/cjs/modules/layout/dimensionIsValid.js +3 -4
- package/build/cjs/modules/legends.js +5 -6
- package/build/cjs/modules/outliers/index.js +5 -6
- package/build/cjs/modules/outliers/iqr.js +4 -6
- package/build/cjs/modules/outliers/modZScore.js +6 -14
- package/build/cjs/modules/outliers/zScore.js +3 -4
- package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +12 -16
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +48 -59
- package/build/cjs/modules/pivotTable/clipAxis.js +7 -8
- package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +9 -10
- package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +8 -9
- package/build/cjs/modules/pivotTable/measureText.js +7 -9
- package/build/cjs/modules/pivotTable/useParentSize.js +1 -2
- package/build/cjs/modules/pivotTable/useScrollPosition.js +1 -2
- package/build/cjs/modules/pivotTable/useTableClipping.js +6 -7
- package/build/cjs/modules/relativeItems/index.js +1 -4
- package/build/cjs/modules/renderValue.js +1 -2
- package/build/cjs/modules/utils.js +11 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +7 -10
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getFormatter.js +2 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getSteps.js +2 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +8 -10
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
- package/build/cjs/visualizations/config/index.js +11 -12
- package/build/cjs/visualizations/config/validators/dhis/index.js +3 -4
- package/build/cjs/visualizations/index.js +1 -4
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
- package/build/cjs/visualizations/store/index.js +15 -17
- package/build/cjs/visualizations/store/validators/dhis/index.js +5 -6
- package/build/cjs/visualizations/util/getFilterText.js +3 -6
- package/build/cjs/visualizations/util/shouldUseContrastColor.js +1 -2
- package/build/es/__demo__/PivotTable.stories.js +165 -222
- package/build/es/api/__tests__/dimensions.spec.js +1 -2
- package/build/es/api/analytics/Analytics.js +8 -9
- package/build/es/api/analytics/AnalyticsBase.js +58 -77
- package/build/es/api/analytics/AnalyticsRequest.js +1 -2
- package/build/es/api/analytics/AnalyticsRequestBase.js +18 -21
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
- package/build/es/api/analytics/AnalyticsResponseHeader.js +5 -7
- package/build/es/api/analytics/__tests__/AnalyticsBase.spec.js +8 -10
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
- package/build/es/api/analytics/utils.js +11 -17
- package/build/es/api/dimensions.js +119 -148
- package/build/es/api/expression.js +39 -60
- package/build/es/api/organisationUnits.js +23 -35
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +11 -18
- package/build/es/components/CachedDataQueryProvider.js +6 -7
- package/build/es/components/DashboardPluginWrapper/DashboardPluginWrapper.js +17 -20
- package/build/es/components/DataDimension/Calculation/CalculationModal.js +43 -59
- package/build/es/components/DataDimension/Calculation/DataElementOption.js +5 -6
- package/build/es/components/DataDimension/Calculation/DataElementSelector.js +28 -36
- package/build/es/components/DataDimension/Calculation/DndContext.js +28 -35
- package/build/es/components/DataDimension/Calculation/DraggingItem.js +5 -6
- package/build/es/components/DataDimension/Calculation/DropZone.js +4 -5
- package/build/es/components/DataDimension/Calculation/FormulaField.js +29 -32
- package/build/es/components/DataDimension/Calculation/FormulaItem.js +13 -14
- package/build/es/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
- package/build/es/components/DataDimension/Calculation/Operator.js +6 -7
- package/build/es/components/DataDimension/DataDimension.js +19 -30
- package/build/es/components/DataDimension/Info/CalculationInfo.js +13 -20
- package/build/es/components/DataDimension/Info/DataElementInfo.js +23 -36
- package/build/es/components/DataDimension/Info/DataElementOperandInfo.js +29 -42
- package/build/es/components/DataDimension/Info/DataSetInfo.js +26 -39
- package/build/es/components/DataDimension/Info/EventDataItemInfo.js +21 -34
- package/build/es/components/DataDimension/Info/IndicatorInfo.js +20 -30
- package/build/es/components/DataDimension/Info/InfoPopover.js +6 -7
- package/build/es/components/DataDimension/Info/InfoTable.js +39 -52
- package/build/es/components/DataDimension/Info/OptionInfo.js +13 -20
- package/build/es/components/DataDimension/Info/ProgramIndicatorInfo.js +45 -56
- package/build/es/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +21 -30
- package/build/es/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
- package/build/es/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
- package/build/es/components/DataDimension/ItemSelector/GroupSelector.js +9 -10
- package/build/es/components/DataDimension/ItemSelector/ItemSelector.js +85 -102
- package/build/es/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
- package/build/es/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
- package/build/es/components/DataDimension/TransferOption.js +35 -39
- package/build/es/components/DimensionMenu.js +13 -14
- package/build/es/components/DimensionsPanel/DimensionsPanel.js +7 -7
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +11 -11
- package/build/es/components/DimensionsPanel/List/DimensionList.js +8 -8
- package/build/es/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/es/components/DynamicDimension/DynamicDimension.js +9 -13
- package/build/es/components/DynamicDimension/ItemSelector.js +24 -36
- package/build/es/components/FileMenu/DeleteDialog.js +10 -14
- package/build/es/components/FileMenu/FileMenu.js +18 -28
- package/build/es/components/FileMenu/GetLinkDialog.js +7 -7
- package/build/es/components/FileMenu/RenameDialog.js +12 -19
- package/build/es/components/FileMenu/SaveAsDialog.js +12 -19
- package/build/es/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
- package/build/es/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
- package/build/es/components/FileMenu/utils.js +10 -12
- package/build/es/components/Filter/Filter.js +21 -27
- package/build/es/components/Interpretations/InterpretationModal/Comment.js +7 -8
- package/build/es/components/Interpretations/InterpretationModal/CommentAddForm.js +9 -13
- package/build/es/components/Interpretations/InterpretationModal/CommentDeleteButton.js +9 -13
- package/build/es/components/Interpretations/InterpretationModal/CommentUpdateForm.js +11 -15
- package/build/es/components/Interpretations/InterpretationModal/InterpretationModal.js +18 -23
- package/build/es/components/Interpretations/InterpretationModal/InterpretationThread.js +11 -12
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationForm.js +11 -15
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +22 -31
- package/build/es/components/Interpretations/common/Interpretation/Interpretation.js +12 -13
- package/build/es/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
- package/build/es/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +4 -5
- package/build/es/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +14 -21
- package/build/es/components/Interpretations/common/Interpretation/useLike.js +5 -6
- package/build/es/components/Interpretations/common/Message/Message.js +6 -7
- package/build/es/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
- package/build/es/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
- package/build/es/components/Interpretations/common/Message/MessageIconButton.js +34 -40
- package/build/es/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
- package/build/es/components/LegendKey/LegendKey.js +3 -4
- package/build/es/components/OfflineTooltip.js +18 -26
- package/build/es/components/OpenFileDialog/CreatedByFilter.js +20 -26
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +23 -26
- package/build/es/components/OpenFileDialog/DateField.js +3 -4
- package/build/es/components/OpenFileDialog/FileList.js +19 -22
- package/build/es/components/OpenFileDialog/NameFilter.js +15 -21
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +35 -43
- package/build/es/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/es/components/OpenFileDialog/VisTypeFilter.js +28 -37
- package/build/es/components/Options/VisualizationOptions.js +34 -44
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +37 -58
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +16 -25
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +14 -19
- package/build/es/components/PeriodDimension/PeriodDimension.js +9 -12
- package/build/es/components/PeriodDimension/PeriodTransfer.js +48 -61
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +24 -30
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
- package/build/es/components/PeriodDimension/utils/fixedPeriods.js +6 -7
- package/build/es/components/PeriodDimension/utils/index.js +1 -5
- package/build/es/components/PivotTable/PivotTable.js +7 -8
- package/build/es/components/PivotTable/PivotTableBody.js +20 -29
- package/build/es/components/PivotTable/PivotTableCell.js +8 -12
- package/build/es/components/PivotTable/PivotTableClippedAxis.js +14 -17
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
- package/build/es/components/PivotTable/PivotTableColumnHeaders.js +22 -29
- package/build/es/components/PivotTable/PivotTableContainer.js +5 -6
- package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
- package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -4
- package/build/es/components/PivotTable/PivotTableEmptyRow.js +4 -5
- package/build/es/components/PivotTable/PivotTableEngineContext.js +4 -5
- package/build/es/components/PivotTable/PivotTableHead.js +13 -16
- package/build/es/components/PivotTable/PivotTableHeaderCell.js +8 -9
- package/build/es/components/PivotTable/PivotTableRow.js +20 -27
- package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
- package/build/es/components/PivotTable/PivotTableSortIcon.js +4 -5
- package/build/es/components/PivotTable/PivotTableTitleRow.js +18 -22
- package/build/es/components/PivotTable/PivotTableTitleRows.js +4 -5
- package/build/es/components/PivotTable/PivotTableValueCell.js +5 -6
- package/build/es/components/RichText/Editor/Editor.js +69 -83
- package/build/es/components/RichText/Parser/Parser.js +4 -8
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -23
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +7 -11
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuList.js +8 -15
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +10 -14
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +6 -4
- package/build/es/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
- package/build/es/components/Toolbar/Toolbar.js +10 -16
- package/build/es/components/Toolbar/ToolbarSidebar.js +12 -18
- package/build/es/components/Toolbar/UpdateButton.js +18 -24
- package/build/es/components/TransferOption.js +14 -15
- package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
- package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +16 -23
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +6 -7
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
- package/build/es/components/UserMention/UserList.js +6 -7
- package/build/es/components/UserMention/UserMentionWrapper.js +12 -18
- package/build/es/components/UserMention/useUserSearchResults.js +12 -16
- package/build/es/components/VisTypeIcon.js +5 -6
- package/build/es/locales/ar_IQ/translations.json +20 -11
- package/build/es/locales/cs/translations.json +2 -0
- package/build/es/locales/en/translations.json +1 -0
- package/build/es/locales/es/translations.json +2 -0
- package/build/es/locales/fr/translations.json +2 -0
- package/build/es/locales/id/translations.json +20 -11
- package/build/es/locales/lo/translations.json +2 -0
- package/build/es/locales/nb/translations.json +2 -0
- package/build/es/locales/prs/translations.json +2 -0
- package/build/es/locales/ps/translations.json +2 -0
- package/build/es/locales/pt/translations.json +2 -0
- package/build/es/locales/pt_BR/translations.json +2 -0
- package/build/es/locales/ru/translations.json +2 -0
- package/build/es/locales/si/translations.json +20 -11
- package/build/es/locales/sv/translations.json +20 -11
- package/build/es/locales/tet/translations.json +20 -11
- package/build/es/locales/tg/translations.json +2 -0
- package/build/es/locales/uk/translations.json +2 -0
- package/build/es/locales/ur/translations.json +2 -0
- package/build/es/locales/uz_UZ_Cyrl/translations.json +2 -0
- package/build/es/locales/uz_UZ_Latn/translations.json +4 -2
- package/build/es/locales/vi/translations.json +2 -0
- package/build/es/locales/zh/translations.json +2 -0
- package/build/es/locales/zh_CN/translations.json +17 -15
- package/build/es/modules/__tests__/expressions.spec.js +4 -5
- package/build/es/modules/__tests__/isNumeric.spec.js +31 -0
- package/build/es/modules/dimensionListItem.js +4 -5
- package/build/es/modules/expressions.js +3 -9
- package/build/es/modules/getPWAInstallationStatus.js +7 -9
- package/build/es/modules/layout/dimensionCreate.js +1 -3
- package/build/es/modules/layout/dimensionIsValid.js +3 -4
- package/build/es/modules/legends.js +5 -6
- package/build/es/modules/outliers/index.js +2 -3
- package/build/es/modules/outliers/iqr.js +4 -6
- package/build/es/modules/outliers/modZScore.js +6 -14
- package/build/es/modules/outliers/zScore.js +3 -4
- package/build/es/modules/pivotTable/AdaptiveClippingController.js +12 -16
- package/build/es/modules/pivotTable/PivotTableEngine.js +48 -59
- package/build/es/modules/pivotTable/clipAxis.js +7 -8
- package/build/es/modules/pivotTable/clipPartitionedAxis.js +9 -10
- package/build/es/modules/pivotTable/getHeaderForDisplay.js +8 -9
- package/build/es/modules/pivotTable/measureText.js +7 -9
- package/build/es/modules/pivotTable/useParentSize.js +1 -2
- package/build/es/modules/pivotTable/useScrollPosition.js +1 -2
- package/build/es/modules/pivotTable/useTableClipping.js +6 -7
- package/build/es/modules/relativeItems/index.js +1 -4
- package/build/es/modules/renderValue.js +1 -2
- package/build/es/modules/utils.js +9 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +2 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/getFormatter.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/getSteps.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +7 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
- package/build/es/visualizations/config/index.js +11 -12
- package/build/es/visualizations/config/validators/dhis/index.js +3 -4
- package/build/es/visualizations/index.js +1 -4
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
- package/build/es/visualizations/store/index.js +15 -17
- package/build/es/visualizations/store/validators/dhis/index.js +5 -6
- package/build/es/visualizations/util/getFilterText.js +3 -6
- package/build/es/visualizations/util/shouldUseContrastColor.js +1 -2
- package/package.json +12 -12
|
@@ -6,26 +6,25 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { DIMENSION_TYPE_EXPRESSION_DIMENSION_ITEM, DIMENSION_TYPE_PROGRAM_ATTRIBUTE, DIMENSION_TYPE_PROGRAM_DATA_ELEMENT } from '../../modules/dataTypes.js';
|
|
8
8
|
import styles from './styles/TransferOption.style.js';
|
|
9
|
-
export const TransferOption =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
9
|
+
export const TransferOption = ({
|
|
10
|
+
disabled,
|
|
11
|
+
label,
|
|
12
|
+
highlighted,
|
|
13
|
+
selected,
|
|
14
|
+
onClick,
|
|
15
|
+
onDoubleClick,
|
|
16
|
+
value,
|
|
17
|
+
icon,
|
|
18
|
+
active,
|
|
19
|
+
dataItemType,
|
|
20
|
+
dimensionType,
|
|
21
|
+
dataTest,
|
|
22
|
+
optionSetId,
|
|
23
|
+
itemsRef,
|
|
24
|
+
showingInfo,
|
|
25
|
+
onEditClick,
|
|
26
|
+
onInfoClick
|
|
27
|
+
}) => {
|
|
29
28
|
const renderContent = () => /*#__PURE__*/React.createElement("div", {
|
|
30
29
|
"data-test": `${dataTest}-content`,
|
|
31
30
|
onClick: event => {
|
|
@@ -72,25 +71,22 @@ export const TransferOption = _ref => {
|
|
|
72
71
|
content: i18n.t('Click to choose from available options'),
|
|
73
72
|
openDelay: 500,
|
|
74
73
|
closeDelay: 0
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
className: `jsx-${styles.__hash}` + " " + "option-set-button"
|
|
92
|
-
}, /*#__PURE__*/React.createElement(IconList16, null));
|
|
93
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
}, ({
|
|
75
|
+
ref,
|
|
76
|
+
onMouseOver,
|
|
77
|
+
onMouseOut
|
|
78
|
+
}) => /*#__PURE__*/React.createElement("span", {
|
|
79
|
+
ref: ref,
|
|
80
|
+
onMouseOver: onMouseOver,
|
|
81
|
+
onMouseOut: onMouseOut,
|
|
82
|
+
onClick: e => {
|
|
83
|
+
e.stopPropagation();
|
|
84
|
+
onMouseOut();
|
|
85
|
+
onEditClick();
|
|
86
|
+
},
|
|
87
|
+
"data-test": `${dataTest}-option-set-button`,
|
|
88
|
+
className: `jsx-${styles.__hash}` + " " + "option-set-button"
|
|
89
|
+
}, /*#__PURE__*/React.createElement(IconList16, null)))), /*#__PURE__*/React.createElement("div", {
|
|
94
90
|
className: `jsx-${styles.__hash}` + " " + (cx('group', 'nowrap', 'typeGroup') || "")
|
|
95
91
|
}, /*#__PURE__*/React.createElement("span", {
|
|
96
92
|
className: `jsx-${styles.__hash}` + " " + "type"
|
|
@@ -20,20 +20,19 @@ const getDividerItem = key => /*#__PURE__*/React.createElement(MenuDivider, {
|
|
|
20
20
|
const getUnavailableLabel = visType => i18n.t('Not available for {{visualizationType}}', {
|
|
21
21
|
visualizationType: getDisplayNameByVisType(visType)
|
|
22
22
|
});
|
|
23
|
-
const DimensionMenu =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = _ref;
|
|
23
|
+
const DimensionMenu = ({
|
|
24
|
+
dimensionId,
|
|
25
|
+
currentAxisId,
|
|
26
|
+
visType,
|
|
27
|
+
numberOfDimensionItems,
|
|
28
|
+
assignedCategoriesItemHandler,
|
|
29
|
+
isAssignedCategoriesInLayout,
|
|
30
|
+
axisItemHandler,
|
|
31
|
+
removeItemHandler,
|
|
32
|
+
classes,
|
|
33
|
+
onClose,
|
|
34
|
+
dataTest
|
|
35
|
+
}) => {
|
|
37
36
|
const menuItems = [];
|
|
38
37
|
const isDimensionInLayout = !!currentAxisId;
|
|
39
38
|
|
|
@@ -8,8 +8,8 @@ import Filter from '../Filter/Filter.js';
|
|
|
8
8
|
import DimensionList from './List/DimensionList.js';
|
|
9
9
|
import { styles } from './styles/DimensionsPanel.style.js';
|
|
10
10
|
class DimensionsPanel extends Component {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...
|
|
11
|
+
constructor(...args) {
|
|
12
|
+
super(...args);
|
|
13
13
|
_defineProperty(this, "state", {
|
|
14
14
|
filterText: ''
|
|
15
15
|
});
|
|
@@ -60,6 +60,11 @@ class DimensionsPanel extends Component {
|
|
|
60
60
|
}));
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
_defineProperty(DimensionsPanel, "defaultProps", {
|
|
64
|
+
selectedIds: [],
|
|
65
|
+
style: {},
|
|
66
|
+
onDimensionClick: Function.prototype
|
|
67
|
+
});
|
|
63
68
|
DimensionsPanel.propTypes = {
|
|
64
69
|
dimensions: PropTypes.array.isRequired,
|
|
65
70
|
disabledDimension: PropTypes.func,
|
|
@@ -71,9 +76,4 @@ DimensionsPanel.propTypes = {
|
|
|
71
76
|
onDimensionDragStart: PropTypes.func,
|
|
72
77
|
onDimensionOptionsClick: PropTypes.func
|
|
73
78
|
};
|
|
74
|
-
DimensionsPanel.defaultProps = {
|
|
75
|
-
selectedIds: [],
|
|
76
|
-
style: {},
|
|
77
|
-
onDimensionClick: Function.prototype
|
|
78
|
-
};
|
|
79
79
|
export default DimensionsPanel;
|
|
@@ -13,8 +13,8 @@ import OptionsButton from './OptionsButton.js';
|
|
|
13
13
|
import RecommendedIcon from './RecommendedIcon.js';
|
|
14
14
|
import styles from './styles/DimensionItem.style.js';
|
|
15
15
|
class DimensionItem extends Component {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...
|
|
16
|
+
constructor(...args) {
|
|
17
|
+
super(...args);
|
|
18
18
|
_defineProperty(this, "state", {
|
|
19
19
|
mouseOver: false
|
|
20
20
|
});
|
|
@@ -123,6 +123,15 @@ class DimensionItem extends Component {
|
|
|
123
123
|
}, styles));
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
+
_defineProperty(DimensionItem, "defaultProps", {
|
|
127
|
+
isDeactivated: false,
|
|
128
|
+
isRecommended: false,
|
|
129
|
+
isSelected: false,
|
|
130
|
+
isLocked: false,
|
|
131
|
+
onClick: Function.prototype,
|
|
132
|
+
innerRef: Function.prototype,
|
|
133
|
+
style: {}
|
|
134
|
+
});
|
|
126
135
|
DimensionItem.propTypes = {
|
|
127
136
|
id: PropTypes.string.isRequired,
|
|
128
137
|
isSelected: PropTypes.bool.isRequired,
|
|
@@ -137,13 +146,4 @@ DimensionItem.propTypes = {
|
|
|
137
146
|
onClick: PropTypes.func,
|
|
138
147
|
onOptionsClick: PropTypes.func
|
|
139
148
|
};
|
|
140
|
-
DimensionItem.defaultProps = {
|
|
141
|
-
isDeactivated: false,
|
|
142
|
-
isRecommended: false,
|
|
143
|
-
isSelected: false,
|
|
144
|
-
isLocked: false,
|
|
145
|
-
onClick: Function.prototype,
|
|
146
|
-
innerRef: Function.prototype,
|
|
147
|
-
style: {}
|
|
148
|
-
};
|
|
149
149
|
export default DimensionItem;
|
|
@@ -9,8 +9,8 @@ import { getPredefinedDimensions, getFixedDimensions } from '../../../modules/pr
|
|
|
9
9
|
import DimensionItem from './DimensionItem.js';
|
|
10
10
|
import styles from './styles/DimensionList.style.js';
|
|
11
11
|
class DimensionList extends Component {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...
|
|
12
|
+
constructor(...args) {
|
|
13
|
+
super(...args);
|
|
14
14
|
_defineProperty(this, "nameContainsFilterText", dimension => dimension.name.toLowerCase().includes(this.props.filterText.toLowerCase()));
|
|
15
15
|
_defineProperty(this, "isDisabled", dimensionId => this.props.disabledDimension(dimensionId) || false);
|
|
16
16
|
_defineProperty(this, "isRecommended", dimensionId => this.props.recommendedDimension(dimensionId) || false);
|
|
@@ -53,6 +53,12 @@ class DimensionList extends Component {
|
|
|
53
53
|
}, styles));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
_defineProperty(DimensionList, "defaultProps", {
|
|
57
|
+
selectedIds: [],
|
|
58
|
+
disabledDimension: Function.prototype,
|
|
59
|
+
lockedDimension: Function.prototype,
|
|
60
|
+
recommendedDimension: Function.prototype
|
|
61
|
+
});
|
|
56
62
|
DimensionList.propTypes = {
|
|
57
63
|
dimensions: PropTypes.array.isRequired,
|
|
58
64
|
filterText: PropTypes.string.isRequired,
|
|
@@ -64,10 +70,4 @@ DimensionList.propTypes = {
|
|
|
64
70
|
onDimensionDragStart: PropTypes.func,
|
|
65
71
|
onDimensionOptionsClick: PropTypes.func
|
|
66
72
|
};
|
|
67
|
-
DimensionList.defaultProps = {
|
|
68
|
-
selectedIds: [],
|
|
69
|
-
disabledDimension: Function.prototype,
|
|
70
|
-
lockedDimension: Function.prototype,
|
|
71
|
-
recommendedDimension: Function.prototype
|
|
72
|
-
};
|
|
73
73
|
export default DimensionList;
|
|
@@ -2,17 +2,14 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { IconMore16 } from '@dhis2/ui';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
const OptionsButton =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
id: "2074438274"
|
|
14
|
-
}, ["button.jsx-2074438274{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2074438274:hover{background-color:rgba(33,41,52,0.08);}", "button.jsx-2074438274:active{background-color:rgba(33,41,52,0.13);}"]));
|
|
15
|
-
};
|
|
5
|
+
const OptionsButton = ({
|
|
6
|
+
onClick
|
|
7
|
+
}) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
8
|
+
onClick: onClick,
|
|
9
|
+
className: "jsx-2074438274"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(IconMore16, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
11
|
+
id: "2074438274"
|
|
12
|
+
}, ["button.jsx-2074438274{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;width:20px;padding:0;border:none;background:none;outline:none;cursor:pointer;border-top-right-radius:2px;border-bottom-left-radius:2px;}", "button.jsx-2074438274:hover{background-color:rgba(33,41,52,0.08);}", "button.jsx-2074438274:active{background-color:rgba(33,41,52,0.13);}"]));
|
|
16
13
|
OptionsButton.propTypes = {
|
|
17
14
|
onClick: PropTypes.func
|
|
18
15
|
};
|
|
@@ -3,19 +3,16 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import i18n from '../../../locales/index.js';
|
|
5
5
|
import { styles } from './styles/RecommendedIcon.style.js';
|
|
6
|
-
const RecommendedIcon =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"data-test": dataTest
|
|
17
|
-
})) : null;
|
|
18
|
-
};
|
|
6
|
+
const RecommendedIcon = ({
|
|
7
|
+
isRecommended,
|
|
8
|
+
dataTest
|
|
9
|
+
}) => isRecommended ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
10
|
+
content: i18n.t('Dimension recommended with selected data'),
|
|
11
|
+
placement: "bottom"
|
|
12
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
style: styles.recommendedIcon,
|
|
14
|
+
"data-test": dataTest
|
|
15
|
+
})) : null;
|
|
19
16
|
RecommendedIcon.propTypes = {
|
|
20
17
|
isRecommended: PropTypes.bool.isRequired,
|
|
21
18
|
dataTest: PropTypes.string
|
|
@@ -8,15 +8,15 @@ import i18n from '../../locales/index.js';
|
|
|
8
8
|
import ItemSelector from './ItemSelector.js';
|
|
9
9
|
import styles from './styles/DynamicDimension.style.js';
|
|
10
10
|
export const ALL_DYNAMIC_DIMENSION_ITEMS = 'ALL_ITEMS';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
const SELECTED_ITEMS_PROP_DEFAULT = [];
|
|
12
|
+
export const DynamicDimension = ({
|
|
13
|
+
dimensionId,
|
|
14
|
+
onSelect = Function.prototype,
|
|
15
|
+
selectedItems = SELECTED_ITEMS_PROP_DEFAULT,
|
|
16
|
+
rightFooter,
|
|
17
|
+
dimensionTitle,
|
|
18
|
+
displayNameProp
|
|
19
|
+
}) => {
|
|
20
20
|
const dataEngine = useDataEngine();
|
|
21
21
|
const fetchItems = (page, searchTerm) => apiFetchItemsByDimension({
|
|
22
22
|
dataEngine,
|
|
@@ -96,8 +96,4 @@ DynamicDimension.propTypes = {
|
|
|
96
96
|
onSelect: PropTypes.func.isRequired,
|
|
97
97
|
rightFooter: PropTypes.node
|
|
98
98
|
};
|
|
99
|
-
DynamicDimension.defaultProps = {
|
|
100
|
-
selectedItems: [],
|
|
101
|
-
onSelect: Function.prototype
|
|
102
|
-
};
|
|
103
99
|
export default DynamicDimension;
|
|
@@ -11,15 +11,15 @@ import { SelectedEmptyPlaceholder } from '../DataDimension/SelectedEmptyPlacehol
|
|
|
11
11
|
import { SourceEmptyPlaceholder } from '../DataDimension/SourceEmptyPlaceholder.js';
|
|
12
12
|
import styles from '../styles/DimensionSelector.style.js';
|
|
13
13
|
import { TransferOption } from '../TransferOption.js';
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
const SELECTED_ITEMS_PROP_DEFAULT = [];
|
|
15
|
+
const ItemSelector = ({
|
|
16
|
+
selectedItems = SELECTED_ITEMS_PROP_DEFAULT,
|
|
17
|
+
noItemsMessage,
|
|
18
|
+
onFetch,
|
|
19
|
+
onSelect,
|
|
20
|
+
rightFooter,
|
|
21
|
+
dataTest
|
|
22
|
+
}) => {
|
|
23
23
|
const [state, setState] = useState({
|
|
24
24
|
searchTerm: '',
|
|
25
25
|
options: [],
|
|
@@ -39,18 +39,15 @@ const ItemSelector = _ref => {
|
|
|
39
39
|
loading: true
|
|
40
40
|
}));
|
|
41
41
|
const result = await onFetch(page, state.searchTerm);
|
|
42
|
-
const newOptions = (_result$dimensionItem = result.dimensionItems) === null || _result$dimensionItem === void 0 ? void 0 : _result$dimensionItem.map(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
disabled
|
|
52
|
-
};
|
|
53
|
-
});
|
|
42
|
+
const newOptions = (_result$dimensionItem = result.dimensionItems) === null || _result$dimensionItem === void 0 ? void 0 : _result$dimensionItem.map(({
|
|
43
|
+
id,
|
|
44
|
+
name,
|
|
45
|
+
disabled
|
|
46
|
+
}) => ({
|
|
47
|
+
label: name,
|
|
48
|
+
value: id,
|
|
49
|
+
disabled
|
|
50
|
+
}));
|
|
54
51
|
setState(state => ({
|
|
55
52
|
...state,
|
|
56
53
|
loading: false,
|
|
@@ -86,12 +83,9 @@ const ItemSelector = _ref => {
|
|
|
86
83
|
}
|
|
87
84
|
};
|
|
88
85
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Transfer, {
|
|
89
|
-
onChange:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} = _ref3;
|
|
93
|
-
return onChange(selected);
|
|
94
|
-
},
|
|
86
|
+
onChange: ({
|
|
87
|
+
selected
|
|
88
|
+
}) => onChange(selected),
|
|
95
89
|
selected: selectedItems.map(item => item.value),
|
|
96
90
|
options: [...state.options, ...selectedItems],
|
|
97
91
|
loading: state.loading,
|
|
@@ -107,12 +101,9 @@ const ItemSelector = _ref => {
|
|
|
107
101
|
filterPlaceholder: i18n.t('Search'),
|
|
108
102
|
filterablePicked: false,
|
|
109
103
|
searchTerm: state.searchTerm,
|
|
110
|
-
onFilterChange:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} = _ref4;
|
|
114
|
-
return setSearchTerm(value);
|
|
115
|
-
},
|
|
104
|
+
onFilterChange: ({
|
|
105
|
+
value
|
|
106
|
+
}) => setSearchTerm(value),
|
|
116
107
|
enableOrderChange: true,
|
|
117
108
|
height: TRANSFER_HEIGHT,
|
|
118
109
|
optionsWidth: TRANSFER_OPTIONS_WIDTH,
|
|
@@ -142,7 +133,4 @@ ItemSelector.propTypes = {
|
|
|
142
133
|
value: PropTypes.string.isRequired
|
|
143
134
|
}))
|
|
144
135
|
};
|
|
145
|
-
ItemSelector.defaultProps = {
|
|
146
|
-
selectedItems: []
|
|
147
|
-
};
|
|
148
136
|
export default ItemSelector;
|
|
@@ -6,22 +6,18 @@ import i18n from '../../locales/index.js';
|
|
|
6
6
|
import { supportedFileTypes, endpointFromFileType, labelForFileType } from './utils.js';
|
|
7
7
|
const getMutation = type => ({
|
|
8
8
|
resource: endpointFromFileType(type),
|
|
9
|
-
id:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} = _ref;
|
|
13
|
-
return id;
|
|
14
|
-
},
|
|
9
|
+
id: ({
|
|
10
|
+
id
|
|
11
|
+
}) => id,
|
|
15
12
|
type: 'delete'
|
|
16
13
|
});
|
|
17
|
-
export const DeleteDialog =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} = _ref2;
|
|
14
|
+
export const DeleteDialog = ({
|
|
15
|
+
type,
|
|
16
|
+
id,
|
|
17
|
+
onClose,
|
|
18
|
+
onDelete,
|
|
19
|
+
onError
|
|
20
|
+
}) => {
|
|
25
21
|
const mutation = useMemo(() => getMutation(type), []);
|
|
26
22
|
const [mutate] = useDataMutation(mutation, {
|
|
27
23
|
variables: {
|
|
@@ -10,24 +10,23 @@ import { GetLinkDialog } from './GetLinkDialog.js';
|
|
|
10
10
|
import { RenameDialog } from './RenameDialog.js';
|
|
11
11
|
import { SaveAsDialog } from './SaveAsDialog.js';
|
|
12
12
|
import { supportedFileTypes } from './utils.js';
|
|
13
|
-
export const FileMenu =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = _ref;
|
|
13
|
+
export const FileMenu = ({
|
|
14
|
+
currentUser,
|
|
15
|
+
defaultFilterVisType,
|
|
16
|
+
fileType,
|
|
17
|
+
fileObject,
|
|
18
|
+
filterVisTypes,
|
|
19
|
+
onNew = Function.prototype,
|
|
20
|
+
onOpen = Function.prototype,
|
|
21
|
+
onSave,
|
|
22
|
+
onSaveAs,
|
|
23
|
+
onRename = Function.prototype,
|
|
24
|
+
onShare = Function.prototype,
|
|
25
|
+
onDelete = Function.prototype,
|
|
26
|
+
onError = Function.prototype,
|
|
27
|
+
onTranslate = Function.prototype
|
|
28
|
+
}) => {
|
|
29
|
+
var _fileObject$access, _fileObject$access2, _fileObject$access3, _fileObject$access4, _fileObject$access5, _fileObject$access6, _fileObject$access7, _fileObject$access8, _fileObject$access9, _fileObject$access0;
|
|
31
30
|
const [currentDialog, setCurrentDialog] = useState(null);
|
|
32
31
|
const onMenuItemClick = dialogToOpen => () => {
|
|
33
32
|
setCurrentDialog(dialogToOpen);
|
|
@@ -184,20 +183,11 @@ export const FileMenu = _ref => {
|
|
|
184
183
|
icon: /*#__PURE__*/React.createElement(IconDelete24, {
|
|
185
184
|
color: fileObject !== null && fileObject !== void 0 && fileObject.id && fileObject !== null && fileObject !== void 0 && (_fileObject$access9 = fileObject.access) !== null && _fileObject$access9 !== void 0 && _fileObject$access9.delete ? colors.red700 : iconInactiveColor
|
|
186
185
|
}),
|
|
187
|
-
disabled: !(fileObject !== null && fileObject !== void 0 && fileObject.id && fileObject !== null && fileObject !== void 0 && (_fileObject$
|
|
186
|
+
disabled: !(fileObject !== null && fileObject !== void 0 && fileObject.id && fileObject !== null && fileObject !== void 0 && (_fileObject$access0 = fileObject.access) !== null && _fileObject$access0 !== void 0 && _fileObject$access0.delete),
|
|
188
187
|
onClick: onMenuItemClick('delete'),
|
|
189
188
|
dataTest: "file-menu-delete"
|
|
190
189
|
}))), renderDialog());
|
|
191
190
|
};
|
|
192
|
-
FileMenu.defaultProps = {
|
|
193
|
-
onDelete: Function.prototype,
|
|
194
|
-
onError: Function.prototype,
|
|
195
|
-
onNew: Function.prototype,
|
|
196
|
-
onOpen: Function.prototype,
|
|
197
|
-
onRename: Function.prototype,
|
|
198
|
-
onShare: Function.prototype,
|
|
199
|
-
onTranslate: Function.prototype
|
|
200
|
-
};
|
|
201
191
|
FileMenu.propTypes = {
|
|
202
192
|
currentUser: PropTypes.object,
|
|
203
193
|
defaultFilterVisType: PropTypes.string,
|
|
@@ -6,12 +6,11 @@ import React from 'react';
|
|
|
6
6
|
import i18n from '../../locales/index.js';
|
|
7
7
|
import { styles } from './GetLinkDialog.styles.js';
|
|
8
8
|
import { supportedFileTypes, appPathFor } from './utils.js';
|
|
9
|
-
export const GetLinkDialog =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
9
|
+
export const GetLinkDialog = ({
|
|
10
|
+
type,
|
|
11
|
+
id,
|
|
12
|
+
onClose
|
|
13
|
+
}) => {
|
|
15
14
|
const {
|
|
16
15
|
apiVersion,
|
|
17
16
|
baseUrl
|
|
@@ -32,7 +31,8 @@ export const GetLinkDialog = _ref => {
|
|
|
32
31
|
}, appUrl), /*#__PURE__*/React.createElement(Button, {
|
|
33
32
|
icon: /*#__PURE__*/React.createElement(IconCopy24, null),
|
|
34
33
|
small: true,
|
|
35
|
-
onClick: () => navigator.clipboard.writeText(appUrl)
|
|
34
|
+
onClick: () => navigator.clipboard.writeText(appUrl),
|
|
35
|
+
"aria-label": i18n.t('Copy to clipboard')
|
|
36
36
|
}))), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
37
37
|
onClick: onClose,
|
|
38
38
|
secondary: true
|
|
@@ -5,13 +5,12 @@ import React, { useState } from 'react';
|
|
|
5
5
|
import i18n from '../../locales/index.js';
|
|
6
6
|
import { modalStyles } from './FileMenu.styles.js';
|
|
7
7
|
import { supportedFileTypes, labelForFileType } from './utils.js';
|
|
8
|
-
export const RenameDialog =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
8
|
+
export const RenameDialog = ({
|
|
9
|
+
type,
|
|
10
|
+
object,
|
|
11
|
+
onClose,
|
|
12
|
+
onRename
|
|
13
|
+
}) => {
|
|
15
14
|
const [name, setName] = useState(object.name);
|
|
16
15
|
const [description, setDescription] = useState(object.description);
|
|
17
16
|
const renameObject = () => {
|
|
@@ -34,23 +33,17 @@ export const RenameDialog = _ref => {
|
|
|
34
33
|
label: i18n.t('Name'),
|
|
35
34
|
required: true,
|
|
36
35
|
value: name,
|
|
37
|
-
onChange:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref2;
|
|
41
|
-
return setName(value);
|
|
42
|
-
},
|
|
36
|
+
onChange: ({
|
|
37
|
+
value
|
|
38
|
+
}) => setName(value),
|
|
43
39
|
dataTest: "file-menu-rename-modal-name"
|
|
44
40
|
}), /*#__PURE__*/React.createElement(TextAreaField, {
|
|
45
41
|
label: i18n.t('Description'),
|
|
46
42
|
value: description,
|
|
47
43
|
rows: 3,
|
|
48
|
-
onChange:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} = _ref3;
|
|
52
|
-
return setDescription(value);
|
|
53
|
-
},
|
|
44
|
+
onChange: ({
|
|
45
|
+
value
|
|
46
|
+
}) => setDescription(value),
|
|
54
47
|
dataTest: "file-menu-rename-modal-description"
|
|
55
48
|
}))), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
56
49
|
onClick: onClose,
|
|
@@ -6,13 +6,12 @@ import i18n from '../../locales/index.js';
|
|
|
6
6
|
import { modalStyles } from './FileMenu.styles.js';
|
|
7
7
|
import { supportedFileTypes, labelForFileType } from './utils.js';
|
|
8
8
|
const NAME_MAXLENGTH = 230;
|
|
9
|
-
export const SaveAsDialog =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
9
|
+
export const SaveAsDialog = ({
|
|
10
|
+
type,
|
|
11
|
+
object,
|
|
12
|
+
onClose,
|
|
13
|
+
onSaveAs
|
|
14
|
+
}) => {
|
|
16
15
|
const [name, setName] = useState(object !== null && object !== void 0 && object.displayName || object !== null && object !== void 0 && object.name ? i18n.t('{{- objectName}} (copy)', {
|
|
17
16
|
objectName: object.name
|
|
18
17
|
}) : '');
|
|
@@ -38,23 +37,17 @@ export const SaveAsDialog = _ref => {
|
|
|
38
37
|
}, /*#__PURE__*/React.createElement(InputField, {
|
|
39
38
|
label: i18n.t('Name'),
|
|
40
39
|
value: name,
|
|
41
|
-
onChange:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = _ref2;
|
|
45
|
-
return setName(value.substring(0, NAME_MAXLENGTH));
|
|
46
|
-
},
|
|
40
|
+
onChange: ({
|
|
41
|
+
value
|
|
42
|
+
}) => setName(value.substring(0, NAME_MAXLENGTH)),
|
|
47
43
|
dataTest: "file-menu-saveas-modal-name"
|
|
48
44
|
}), /*#__PURE__*/React.createElement(TextAreaField, {
|
|
49
45
|
label: i18n.t('Description'),
|
|
50
46
|
value: description,
|
|
51
47
|
rows: 3,
|
|
52
|
-
onChange:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} = _ref3;
|
|
56
|
-
return setDescription(value);
|
|
57
|
-
},
|
|
48
|
+
onChange: ({
|
|
49
|
+
value
|
|
50
|
+
}) => setDescription(value),
|
|
58
51
|
dataTest: "file-menu-saveas-modal-description"
|
|
59
52
|
}))), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
60
53
|
onClick: onClose,
|