@dhis2/analytics 28.0.2 → 28.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/__demo__/DataDimension.stories.js +3 -4
- package/build/cjs/__demo__/Filter.stories.js +1 -2
- package/build/cjs/__demo__/FixedPeriodSelect.stories.js +1 -2
- package/build/cjs/__demo__/OpenFileDialog.stories.js +2 -2
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +3 -4
- package/build/cjs/__demo__/PeriodDimension.stories.js +2 -2
- package/build/cjs/__demo__/PivotTable.stories.js +166 -224
- package/build/cjs/__demo__/ScatterPlotPdfExport.stories.js +1 -2
- package/build/cjs/__demo__/SingleValue.stories.js +1 -2
- package/build/cjs/__demo__/Toolbar.stories.js +1 -2
- package/build/cjs/api/__tests__/dimensions.spec.js +1 -2
- package/build/cjs/api/analytics/Analytics.js +8 -9
- package/build/cjs/api/analytics/AnalyticsBase.js +58 -77
- package/build/cjs/api/analytics/AnalyticsRequest.js +1 -2
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +18 -21
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
- package/build/cjs/api/analytics/AnalyticsResponseHeader.js +5 -7
- package/build/cjs/api/analytics/__tests__/AnalyticsBase.spec.js +9 -12
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
- package/build/cjs/api/analytics/utils.js +11 -17
- package/build/cjs/api/dimensions.js +119 -148
- package/build/cjs/api/expression.js +39 -60
- package/build/cjs/api/organisationUnits.js +23 -35
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +12 -20
- package/build/cjs/components/CachedDataQueryProvider.js +7 -9
- package/build/cjs/components/DashboardPluginWrapper/DashboardPluginWrapper.js +18 -22
- package/build/cjs/components/DataDimension/Calculation/CalculationModal.js +44 -61
- package/build/cjs/components/DataDimension/Calculation/DataElementOption.js +5 -6
- package/build/cjs/components/DataDimension/Calculation/DataElementSelector.js +29 -38
- package/build/cjs/components/DataDimension/Calculation/DndContext.js +29 -37
- package/build/cjs/components/DataDimension/Calculation/DraggingItem.js +5 -6
- package/build/cjs/components/DataDimension/Calculation/DropZone.js +4 -5
- package/build/cjs/components/DataDimension/Calculation/FormulaField.js +29 -32
- package/build/cjs/components/DataDimension/Calculation/FormulaItem.js +14 -16
- package/build/cjs/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
- package/build/cjs/components/DataDimension/Calculation/Operator.js +6 -7
- package/build/cjs/components/DataDimension/DataDimension.js +20 -32
- package/build/cjs/components/DataDimension/Info/CalculationInfo.js +14 -22
- package/build/cjs/components/DataDimension/Info/DataElementInfo.js +23 -36
- package/build/cjs/components/DataDimension/Info/DataElementOperandInfo.js +30 -44
- package/build/cjs/components/DataDimension/Info/DataSetInfo.js +26 -39
- package/build/cjs/components/DataDimension/Info/EventDataItemInfo.js +21 -34
- package/build/cjs/components/DataDimension/Info/IndicatorInfo.js +21 -32
- package/build/cjs/components/DataDimension/Info/InfoPopover.js +6 -7
- package/build/cjs/components/DataDimension/Info/InfoTable.js +39 -52
- package/build/cjs/components/DataDimension/Info/OptionInfo.js +13 -20
- package/build/cjs/components/DataDimension/Info/ProgramIndicatorInfo.js +46 -58
- package/build/cjs/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +22 -32
- package/build/cjs/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
- package/build/cjs/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
- package/build/cjs/components/DataDimension/ItemSelector/GroupSelector.js +10 -12
- package/build/cjs/components/DataDimension/ItemSelector/ItemSelector.js +86 -104
- package/build/cjs/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
- package/build/cjs/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
- package/build/cjs/components/DataDimension/TransferOption.js +35 -39
- package/build/cjs/components/DimensionMenu.js +13 -14
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +8 -9
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +12 -13
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +9 -10
- package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -13
- package/build/cjs/components/DynamicDimension/ItemSelector.js +25 -38
- package/build/cjs/components/FileMenu/DeleteDialog.js +11 -16
- package/build/cjs/components/FileMenu/FileMenu.js +19 -30
- package/build/cjs/components/FileMenu/GetLinkDialog.js +7 -7
- package/build/cjs/components/FileMenu/RenameDialog.js +13 -21
- package/build/cjs/components/FileMenu/SaveAsDialog.js +13 -21
- package/build/cjs/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
- package/build/cjs/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
- package/build/cjs/components/FileMenu/utils.js +10 -12
- package/build/cjs/components/Filter/Filter.js +21 -27
- package/build/cjs/components/Interpretations/InterpretationModal/Comment.js +8 -10
- package/build/cjs/components/Interpretations/InterpretationModal/CommentAddForm.js +10 -15
- package/build/cjs/components/Interpretations/InterpretationModal/CommentDeleteButton.js +10 -15
- package/build/cjs/components/Interpretations/InterpretationModal/CommentUpdateForm.js +12 -17
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationModal.js +19 -25
- package/build/cjs/components/Interpretations/InterpretationModal/InterpretationThread.js +12 -14
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationForm.js +12 -17
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
- package/build/cjs/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +23 -33
- package/build/cjs/components/Interpretations/common/Interpretation/Interpretation.js +13 -15
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +5 -7
- package/build/cjs/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +15 -23
- package/build/cjs/components/Interpretations/common/Interpretation/useLike.js +5 -6
- package/build/cjs/components/Interpretations/common/Message/Message.js +6 -7
- package/build/cjs/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
- package/build/cjs/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
- package/build/cjs/components/Interpretations/common/Message/MessageIconButton.js +34 -40
- package/build/cjs/components/Interpretations/common/Message/MessageInput.js +1 -2
- package/build/cjs/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
- package/build/cjs/components/LegendKey/LegendKey.js +3 -4
- package/build/cjs/components/OfflineTooltip.js +18 -26
- package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +20 -26
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +23 -26
- package/build/cjs/components/OpenFileDialog/DateField.js +3 -4
- package/build/cjs/components/OpenFileDialog/FileList.js +19 -22
- package/build/cjs/components/OpenFileDialog/NameFilter.js +15 -21
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +36 -45
- package/build/cjs/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +28 -37
- package/build/cjs/components/Options/VisualizationOptions.js +35 -46
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +38 -60
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +16 -25
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +15 -21
- package/build/cjs/components/PeriodDimension/PeriodDimension.js +9 -12
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +49 -63
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +24 -30
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
- package/build/cjs/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +6 -7
- package/build/cjs/components/PeriodDimension/utils/index.js +1 -5
- package/build/cjs/components/PivotTable/PivotTable.js +8 -10
- package/build/cjs/components/PivotTable/PivotTableBody.js +20 -29
- package/build/cjs/components/PivotTable/PivotTableCell.js +8 -12
- package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +14 -17
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
- package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +22 -29
- package/build/cjs/components/PivotTable/PivotTableContainer.js +5 -6
- package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -4
- package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +5 -7
- package/build/cjs/components/PivotTable/PivotTableHead.js +13 -16
- package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +8 -9
- package/build/cjs/components/PivotTable/PivotTableRow.js +20 -27
- package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +19 -24
- package/build/cjs/components/PivotTable/PivotTableTitleRows.js +4 -5
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +6 -8
- package/build/cjs/components/RichText/Editor/Editor.js +70 -85
- package/build/cjs/components/RichText/Parser/Parser.js +5 -10
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -24
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +8 -13
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuList.js +9 -17
- package/build/cjs/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +11 -16
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
- package/build/cjs/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +13 -11
- package/build/cjs/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
- package/build/cjs/components/Toolbar/Toolbar.js +10 -16
- package/build/cjs/components/Toolbar/ToolbarSidebar.js +12 -18
- package/build/cjs/components/Toolbar/UpdateButton.js +18 -24
- package/build/cjs/components/TransferOption.js +14 -15
- package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +17 -25
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +8 -10
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/cjs/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +52 -0
- package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
- package/build/cjs/components/UserMention/UserList.js +6 -7
- package/build/cjs/components/UserMention/UserMentionWrapper.js +13 -20
- package/build/cjs/components/UserMention/useUserSearchResults.js +12 -16
- package/build/cjs/components/VisTypeIcon.js +5 -6
- package/build/cjs/index.js +38 -39
- package/build/cjs/locales/ar_IQ/translations.json +20 -11
- package/build/cjs/locales/cs/translations.json +2 -0
- package/build/cjs/locales/en/translations.json +1 -0
- package/build/cjs/locales/es/translations.json +2 -0
- package/build/cjs/locales/fr/translations.json +2 -0
- package/build/cjs/locales/id/translations.json +20 -11
- package/build/cjs/locales/index.js +62 -62
- package/build/cjs/locales/lo/translations.json +2 -0
- package/build/cjs/locales/nb/translations.json +2 -0
- package/build/cjs/locales/prs/translations.json +2 -0
- package/build/cjs/locales/ps/translations.json +2 -0
- package/build/cjs/locales/pt/translations.json +2 -0
- package/build/cjs/locales/pt_BR/translations.json +2 -0
- package/build/cjs/locales/ru/translations.json +2 -0
- package/build/cjs/locales/si/translations.json +20 -11
- package/build/cjs/locales/sv/translations.json +20 -11
- package/build/cjs/locales/tet/translations.json +20 -11
- package/build/cjs/locales/tg/translations.json +2 -0
- package/build/cjs/locales/uk/translations.json +2 -0
- package/build/cjs/locales/ur/translations.json +2 -0
- package/build/cjs/locales/uz_UZ_Cyrl/translations.json +2 -0
- package/build/cjs/locales/uz_UZ_Latn/translations.json +4 -2
- package/build/cjs/locales/vi/translations.json +2 -0
- package/build/cjs/locales/zh/translations.json +2 -0
- package/build/cjs/locales/zh_CN/translations.json +17 -15
- package/build/cjs/modules/__tests__/expressions.spec.js +4 -5
- package/build/cjs/modules/__tests__/isNumeric.spec.js +33 -0
- package/build/cjs/modules/dimensionListItem.js +4 -5
- package/build/cjs/modules/expressions.js +3 -9
- package/build/cjs/modules/getPWAInstallationStatus.js +7 -9
- package/build/cjs/modules/layout/dimensionCreate.js +1 -3
- package/build/cjs/modules/layout/dimensionIsValid.js +3 -4
- package/build/cjs/modules/legends.js +5 -6
- package/build/cjs/modules/outliers/index.js +5 -6
- package/build/cjs/modules/outliers/iqr.js +4 -6
- package/build/cjs/modules/outliers/modZScore.js +6 -14
- package/build/cjs/modules/outliers/zScore.js +3 -4
- package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +12 -16
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +48 -59
- package/build/cjs/modules/pivotTable/clipAxis.js +7 -8
- package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +9 -10
- package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +8 -9
- package/build/cjs/modules/pivotTable/measureText.js +7 -9
- package/build/cjs/modules/pivotTable/useParentSize.js +1 -2
- package/build/cjs/modules/pivotTable/useScrollPosition.js +1 -2
- package/build/cjs/modules/pivotTable/useTableClipping.js +6 -7
- package/build/cjs/modules/relativeItems/index.js +1 -4
- package/build/cjs/modules/renderValue.js +1 -2
- package/build/cjs/modules/utils.js +11 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +7 -10
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getFormatter.js +2 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getSteps.js +2 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +8 -10
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
- package/build/cjs/visualizations/config/index.js +11 -12
- package/build/cjs/visualizations/config/validators/dhis/index.js +3 -4
- package/build/cjs/visualizations/index.js +1 -4
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
- package/build/cjs/visualizations/store/index.js +15 -17
- package/build/cjs/visualizations/store/validators/dhis/index.js +5 -6
- package/build/cjs/visualizations/util/getFilterText.js +3 -6
- package/build/cjs/visualizations/util/shouldUseContrastColor.js +1 -2
- package/build/es/__demo__/DataDimension.stories.js +2 -2
- package/build/es/__demo__/OpenFileDialog.stories.js +2 -2
- package/build/es/__demo__/OrgUnitDimension.stories.js +2 -2
- package/build/es/__demo__/PeriodDimension.stories.js +2 -2
- package/build/es/__demo__/PivotTable.stories.js +165 -222
- package/build/es/api/__tests__/dimensions.spec.js +1 -2
- package/build/es/api/analytics/Analytics.js +8 -9
- package/build/es/api/analytics/AnalyticsBase.js +58 -77
- package/build/es/api/analytics/AnalyticsRequest.js +1 -2
- package/build/es/api/analytics/AnalyticsRequestBase.js +18 -21
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +19 -38
- package/build/es/api/analytics/AnalyticsResponseHeader.js +5 -7
- package/build/es/api/analytics/__tests__/AnalyticsBase.spec.js +8 -10
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +8 -2
- package/build/es/api/analytics/utils.js +11 -17
- package/build/es/api/dimensions.js +119 -148
- package/build/es/api/expression.js +39 -60
- package/build/es/api/organisationUnits.js +23 -35
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +11 -18
- package/build/es/components/CachedDataQueryProvider.js +6 -7
- package/build/es/components/DashboardPluginWrapper/DashboardPluginWrapper.js +17 -20
- package/build/es/components/DataDimension/Calculation/CalculationModal.js +43 -59
- package/build/es/components/DataDimension/Calculation/DataElementOption.js +5 -6
- package/build/es/components/DataDimension/Calculation/DataElementSelector.js +28 -36
- package/build/es/components/DataDimension/Calculation/DndContext.js +28 -35
- package/build/es/components/DataDimension/Calculation/DraggingItem.js +5 -6
- package/build/es/components/DataDimension/Calculation/DropZone.js +4 -5
- package/build/es/components/DataDimension/Calculation/FormulaField.js +29 -32
- package/build/es/components/DataDimension/Calculation/FormulaItem.js +13 -14
- package/build/es/components/DataDimension/Calculation/MathOperatorSelector.js +23 -29
- package/build/es/components/DataDimension/Calculation/Operator.js +6 -7
- package/build/es/components/DataDimension/DataDimension.js +19 -30
- package/build/es/components/DataDimension/Info/CalculationInfo.js +13 -20
- package/build/es/components/DataDimension/Info/DataElementInfo.js +23 -36
- package/build/es/components/DataDimension/Info/DataElementOperandInfo.js +29 -42
- package/build/es/components/DataDimension/Info/DataSetInfo.js +26 -39
- package/build/es/components/DataDimension/Info/EventDataItemInfo.js +21 -34
- package/build/es/components/DataDimension/Info/IndicatorInfo.js +20 -30
- package/build/es/components/DataDimension/Info/InfoPopover.js +6 -7
- package/build/es/components/DataDimension/Info/InfoTable.js +39 -52
- package/build/es/components/DataDimension/Info/OptionInfo.js +13 -20
- package/build/es/components/DataDimension/Info/ProgramIndicatorInfo.js +45 -56
- package/build/es/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +21 -30
- package/build/es/components/DataDimension/ItemSelector/DataTypeSelector.js +6 -7
- package/build/es/components/DataDimension/ItemSelector/DetailSelector.js +5 -6
- package/build/es/components/DataDimension/ItemSelector/GroupSelector.js +9 -10
- package/build/es/components/DataDimension/ItemSelector/ItemSelector.js +85 -102
- package/build/es/components/DataDimension/ItemSelector/MetricSelector.js +5 -6
- package/build/es/components/DataDimension/SourceEmptyPlaceholder.js +10 -13
- package/build/es/components/DataDimension/TransferOption.js +35 -39
- package/build/es/components/DimensionMenu.js +13 -14
- package/build/es/components/DimensionsPanel/DimensionsPanel.js +7 -7
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +11 -11
- package/build/es/components/DimensionsPanel/List/DimensionList.js +8 -8
- package/build/es/components/DimensionsPanel/List/OptionsButton.js +8 -11
- package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +10 -13
- package/build/es/components/DynamicDimension/DynamicDimension.js +9 -13
- package/build/es/components/DynamicDimension/ItemSelector.js +24 -36
- package/build/es/components/FileMenu/DeleteDialog.js +10 -14
- package/build/es/components/FileMenu/FileMenu.js +18 -28
- package/build/es/components/FileMenu/GetLinkDialog.js +7 -7
- package/build/es/components/FileMenu/RenameDialog.js +12 -19
- package/build/es/components/FileMenu/SaveAsDialog.js +12 -19
- package/build/es/components/FileMenu/__tests__/FileMenu.spec.js +6 -2
- package/build/es/components/FileMenu/__tests__/GetLinkDialog.spec.js +7 -8
- package/build/es/components/FileMenu/utils.js +10 -12
- package/build/es/components/Filter/Filter.js +21 -27
- package/build/es/components/Interpretations/InterpretationModal/Comment.js +7 -8
- package/build/es/components/Interpretations/InterpretationModal/CommentAddForm.js +9 -13
- package/build/es/components/Interpretations/InterpretationModal/CommentDeleteButton.js +9 -13
- package/build/es/components/Interpretations/InterpretationModal/CommentUpdateForm.js +11 -15
- package/build/es/components/Interpretations/InterpretationModal/InterpretationModal.js +18 -23
- package/build/es/components/Interpretations/InterpretationModal/InterpretationThread.js +11 -12
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationForm.js +11 -15
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationList.js +10 -11
- package/build/es/components/Interpretations/InterpretationsUnit/InterpretationsUnit.js +22 -31
- package/build/es/components/Interpretations/common/Interpretation/Interpretation.js +12 -13
- package/build/es/components/Interpretations/common/Interpretation/InterpretationDeleteButton.js +7 -11
- package/build/es/components/Interpretations/common/Interpretation/InterpretationSharingLink.js +4 -5
- package/build/es/components/Interpretations/common/Interpretation/InterpretationUpdateForm.js +14 -21
- package/build/es/components/Interpretations/common/Interpretation/useLike.js +5 -6
- package/build/es/components/Interpretations/common/Message/Message.js +6 -7
- package/build/es/components/Interpretations/common/Message/MessageButtonStrip.js +8 -11
- package/build/es/components/Interpretations/common/Message/MessageEditorContainer.js +18 -21
- package/build/es/components/Interpretations/common/Message/MessageIconButton.js +34 -40
- package/build/es/components/Interpretations/common/Message/MessageStatsBar.js +8 -11
- package/build/es/components/LegendKey/LegendKey.js +3 -4
- package/build/es/components/OfflineTooltip.js +18 -26
- package/build/es/components/OpenFileDialog/CreatedByFilter.js +20 -26
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +23 -26
- package/build/es/components/OpenFileDialog/DateField.js +3 -4
- package/build/es/components/OpenFileDialog/FileList.js +19 -22
- package/build/es/components/OpenFileDialog/NameFilter.js +15 -21
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +35 -43
- package/build/es/components/OpenFileDialog/PaginationControls.js +22 -28
- package/build/es/components/OpenFileDialog/VisTypeFilter.js +28 -37
- package/build/es/components/Options/VisualizationOptions.js +34 -44
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +37 -58
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +16 -25
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +14 -19
- package/build/es/components/PeriodDimension/PeriodDimension.js +9 -12
- package/build/es/components/PeriodDimension/PeriodTransfer.js +48 -61
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +24 -30
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/FixedPeriodSingleSelect.spec.js.snap +0 -1
- package/build/es/components/PeriodDimension/__tests__/__snapshots__/PeriodDimension.spec.js.snap +0 -1
- package/build/es/components/PeriodDimension/utils/fixedPeriods.js +6 -7
- package/build/es/components/PeriodDimension/utils/index.js +1 -5
- package/build/es/components/PivotTable/PivotTable.js +7 -8
- package/build/es/components/PivotTable/PivotTableBody.js +20 -29
- package/build/es/components/PivotTable/PivotTableCell.js +8 -12
- package/build/es/components/PivotTable/PivotTableClippedAxis.js +14 -17
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +7 -8
- package/build/es/components/PivotTable/PivotTableColumnHeaders.js +22 -29
- package/build/es/components/PivotTable/PivotTableContainer.js +5 -6
- package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +4 -5
- package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -4
- package/build/es/components/PivotTable/PivotTableEmptyRow.js +4 -5
- package/build/es/components/PivotTable/PivotTableEngineContext.js +4 -5
- package/build/es/components/PivotTable/PivotTableHead.js +13 -16
- package/build/es/components/PivotTable/PivotTableHeaderCell.js +8 -9
- package/build/es/components/PivotTable/PivotTableRow.js +20 -27
- package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +5 -6
- package/build/es/components/PivotTable/PivotTableSortIcon.js +4 -5
- package/build/es/components/PivotTable/PivotTableTitleRow.js +18 -22
- package/build/es/components/PivotTable/PivotTableTitleRows.js +4 -5
- package/build/es/components/PivotTable/PivotTableValueCell.js +5 -6
- package/build/es/components/RichText/Editor/Editor.js +69 -83
- package/build/es/components/RichText/Parser/Parser.js +4 -8
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuBar.js +20 -23
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuDropdown.js +7 -11
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuList.js +8 -15
- package/build/es/components/Toolbar/HoverMenuBar/HoverMenuListItem.js +10 -14
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuBar.spec.js +4 -5
- package/build/es/components/Toolbar/HoverMenuBar/__tests__/HoverMenuList.spec.js +6 -4
- package/build/es/components/Toolbar/InterpretationsAndDetailsToggler.js +15 -21
- package/build/es/components/Toolbar/Toolbar.js +10 -16
- package/build/es/components/Toolbar/ToolbarSidebar.js +12 -18
- package/build/es/components/Toolbar/UpdateButton.js +18 -24
- package/build/es/components/TransferOption.js +14 -15
- package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +19 -27
- package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +16 -23
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -8
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +18 -27
- package/build/es/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js +49 -0
- package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +3 -4
- package/build/es/components/UserMention/UserList.js +6 -7
- package/build/es/components/UserMention/UserMentionWrapper.js +12 -18
- package/build/es/components/UserMention/useUserSearchResults.js +12 -16
- package/build/es/components/VisTypeIcon.js +5 -6
- package/build/es/locales/ar_IQ/translations.json +20 -11
- package/build/es/locales/cs/translations.json +2 -0
- package/build/es/locales/en/translations.json +1 -0
- package/build/es/locales/es/translations.json +2 -0
- package/build/es/locales/fr/translations.json +2 -0
- package/build/es/locales/id/translations.json +20 -11
- package/build/es/locales/lo/translations.json +2 -0
- package/build/es/locales/nb/translations.json +2 -0
- package/build/es/locales/prs/translations.json +2 -0
- package/build/es/locales/ps/translations.json +2 -0
- package/build/es/locales/pt/translations.json +2 -0
- package/build/es/locales/pt_BR/translations.json +2 -0
- package/build/es/locales/ru/translations.json +2 -0
- package/build/es/locales/si/translations.json +20 -11
- package/build/es/locales/sv/translations.json +20 -11
- package/build/es/locales/tet/translations.json +20 -11
- package/build/es/locales/tg/translations.json +2 -0
- package/build/es/locales/uk/translations.json +2 -0
- package/build/es/locales/ur/translations.json +2 -0
- package/build/es/locales/uz_UZ_Cyrl/translations.json +2 -0
- package/build/es/locales/uz_UZ_Latn/translations.json +4 -2
- package/build/es/locales/vi/translations.json +2 -0
- package/build/es/locales/zh/translations.json +2 -0
- package/build/es/locales/zh_CN/translations.json +17 -15
- package/build/es/modules/__tests__/expressions.spec.js +4 -5
- package/build/es/modules/__tests__/isNumeric.spec.js +31 -0
- package/build/es/modules/dimensionListItem.js +4 -5
- package/build/es/modules/expressions.js +3 -9
- package/build/es/modules/getPWAInstallationStatus.js +7 -9
- package/build/es/modules/layout/dimensionCreate.js +1 -3
- package/build/es/modules/layout/dimensionIsValid.js +3 -4
- package/build/es/modules/legends.js +5 -6
- package/build/es/modules/outliers/index.js +2 -3
- package/build/es/modules/outliers/iqr.js +4 -6
- package/build/es/modules/outliers/modZScore.js +6 -14
- package/build/es/modules/outliers/zScore.js +3 -4
- package/build/es/modules/pivotTable/AdaptiveClippingController.js +12 -16
- package/build/es/modules/pivotTable/PivotTableEngine.js +48 -59
- package/build/es/modules/pivotTable/clipAxis.js +7 -8
- package/build/es/modules/pivotTable/clipPartitionedAxis.js +9 -10
- package/build/es/modules/pivotTable/getHeaderForDisplay.js +8 -9
- package/build/es/modules/pivotTable/measureText.js +7 -9
- package/build/es/modules/pivotTable/useParentSize.js +1 -2
- package/build/es/modules/pivotTable/useScrollPosition.js +1 -2
- package/build/es/modules/pivotTable/useTableClipping.js +6 -7
- package/build/es/modules/relativeItems/index.js +1 -4
- package/build/es/modules/renderValue.js +1 -2
- package/build/es/modules/utils.js +9 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +3 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +2 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +2 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/index.js +7 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/getSingleValueBackgroundColor.js +1 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/customSVGOptions/singleValue/index.js +6 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/getFormatter.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/getSteps.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +3 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +7 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +6 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +22 -26
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +8 -9
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/index.js +18 -20
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/pie.js +1 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +1 -3
- package/build/es/visualizations/config/index.js +11 -12
- package/build/es/visualizations/config/validators/dhis/index.js +3 -4
- package/build/es/visualizations/index.js +1 -4
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +7 -8
- package/build/es/visualizations/store/index.js +15 -17
- package/build/es/visualizations/store/validators/dhis/index.js +5 -6
- package/build/es/visualizations/util/getFilterText.js +3 -6
- package/build/es/visualizations/util/shouldUseContrastColor.js +1 -2
- package/package.json +12 -12
|
@@ -11,28 +11,22 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _MenuButtonStyles = _interopRequireDefault(require("./MenuButton.styles.js"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const InterpretationsAndDetailsToggler =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
id: "1238484262"
|
|
30
|
-
}, ["button.jsx-1238484262{gap:8px;}"]));
|
|
31
|
-
};
|
|
14
|
+
const InterpretationsAndDetailsToggler = ({
|
|
15
|
+
onClick,
|
|
16
|
+
dataTest = 'dhis2-analytics-interpretationsanddetailstoggler',
|
|
17
|
+
disabled,
|
|
18
|
+
isShowing
|
|
19
|
+
}) => /*#__PURE__*/_react.default.createElement("button", {
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
disabled: disabled,
|
|
22
|
+
"data-test": dataTest,
|
|
23
|
+
className: "jsx-1238484262 " + `jsx-${_MenuButtonStyles.default.__hash}`
|
|
24
|
+
}, isShowing ? /*#__PURE__*/_react.default.createElement(_ui.IconChevronRight24, null) : /*#__PURE__*/_react.default.createElement(_ui.IconChevronLeft24, null), _d2I18n.default.t('Interpretations and details'), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
25
|
+
id: _MenuButtonStyles.default.__hash
|
|
26
|
+
}, _MenuButtonStyles.default), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
27
|
+
id: "1238484262"
|
|
28
|
+
}, ["button.jsx-1238484262{gap:8px;}"]));
|
|
32
29
|
exports.InterpretationsAndDetailsToggler = InterpretationsAndDetailsToggler;
|
|
33
|
-
InterpretationsAndDetailsToggler.defaultProps = {
|
|
34
|
-
dataTest: 'dhis2-analytics-interpretationsanddetailstoggler'
|
|
35
|
-
};
|
|
36
30
|
InterpretationsAndDetailsToggler.propTypes = {
|
|
37
31
|
onClick: _propTypes.default.func.isRequired,
|
|
38
32
|
dataTest: _propTypes.default.string,
|
|
@@ -9,23 +9,17 @@ var _ui = require("@dhis2/ui");
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const Toolbar =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
dynamic: [_ui.colors.grey400, _ui.colors.white]
|
|
23
|
-
}, [`div.__jsx-style-dynamic-selector{box-sizing:border-box;min-height:32px;max-height:32px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;border-bottom:1px solid ${_ui.colors.grey400};background-color:${_ui.colors.white};}`]));
|
|
24
|
-
};
|
|
12
|
+
const Toolbar = ({
|
|
13
|
+
children,
|
|
14
|
+
dataTest = 'dhis2-analytics-toolbar'
|
|
15
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
16
|
+
"data-test": dataTest,
|
|
17
|
+
className: _style.default.dynamic([["2617706539", [_ui.colors.grey400, _ui.colors.white]]])
|
|
18
|
+
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
19
|
+
id: "2617706539",
|
|
20
|
+
dynamic: [_ui.colors.grey400, _ui.colors.white]
|
|
21
|
+
}, [`div.__jsx-style-dynamic-selector{box-sizing:border-box;min-height:32px;max-height:32px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;border-bottom:1px solid ${_ui.colors.grey400};background-color:${_ui.colors.white};}`]));
|
|
25
22
|
exports.Toolbar = Toolbar;
|
|
26
|
-
Toolbar.defaultProps = {
|
|
27
|
-
dataTest: 'dhis2-analytics-toolbar'
|
|
28
|
-
};
|
|
29
23
|
Toolbar.propTypes = {
|
|
30
24
|
children: _propTypes.default.node,
|
|
31
25
|
dataTest: _propTypes.default.string
|
|
@@ -10,26 +10,20 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
const ToolbarSidebar =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const ToolbarSidebar = ({
|
|
14
|
+
children,
|
|
15
|
+
dataTest = 'dhis2-analytics-toolbarsidebar',
|
|
16
|
+
isHidden
|
|
17
|
+
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
"data-test": dataTest,
|
|
19
|
+
className: _style.default.dynamic([["1150014343", [_ui.colors.grey400]]]) + " " + ((0, _classnames.default)('container', {
|
|
17
20
|
isHidden
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}) || "")
|
|
24
|
-
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
25
|
-
id: "1150014343",
|
|
26
|
-
dynamic: [_ui.colors.grey400]
|
|
27
|
-
}, [`div.__jsx-style-dynamic-selector{width:260px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;border-right:1px solid ${_ui.colors.grey400};}`, "div.isHidden.__jsx-style-dynamic-selector{display:none;}"]));
|
|
28
|
-
};
|
|
21
|
+
}) || "")
|
|
22
|
+
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
23
|
+
id: "1150014343",
|
|
24
|
+
dynamic: [_ui.colors.grey400]
|
|
25
|
+
}, [`div.__jsx-style-dynamic-selector{width:260px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;border-right:1px solid ${_ui.colors.grey400};}`, "div.isHidden.__jsx-style-dynamic-selector{display:none;}"]));
|
|
29
26
|
exports.ToolbarSidebar = ToolbarSidebar;
|
|
30
|
-
ToolbarSidebar.defaultProps = {
|
|
31
|
-
dataTest: 'dhis2-analytics-toolbarsidebar'
|
|
32
|
-
};
|
|
33
27
|
ToolbarSidebar.propTypes = {
|
|
34
28
|
children: _propTypes.default.node,
|
|
35
29
|
dataTest: _propTypes.default.string,
|
|
@@ -11,31 +11,25 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _MenuButtonStyles = _interopRequireDefault(require("./MenuButton.styles.js"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const UpdateButton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
dynamic: [_ui.colors.blue700, _ui.colors.blue100, _ui.colors.blue200]
|
|
33
|
-
}, [`button.__jsx-style-dynamic-selector{gap:8px;color:${_ui.colors.blue700};font-weight:500;}`, `button.__jsx-style-dynamic-selector:hover.__jsx-style-dynamic-selector:enabled{background:${_ui.colors.blue100};}`, `button.__jsx-style-dynamic-selector:active{background:${_ui.colors.blue200};}`]));
|
|
34
|
-
};
|
|
14
|
+
const UpdateButton = ({
|
|
15
|
+
onClick,
|
|
16
|
+
disabled,
|
|
17
|
+
loading,
|
|
18
|
+
dataTest = 'dhis2-analytics-updatebutton'
|
|
19
|
+
}) => /*#__PURE__*/_react.default.createElement("button", {
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
disabled: disabled,
|
|
22
|
+
"data-test": dataTest,
|
|
23
|
+
className: `jsx-${_MenuButtonStyles.default.__hash}` + " " + _style.default.dynamic([["2364287882", [_ui.colors.blue700, _ui.colors.blue100, _ui.colors.blue200]]])
|
|
24
|
+
}, loading ? /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, {
|
|
25
|
+
extrasmall: true
|
|
26
|
+
}) : /*#__PURE__*/_react.default.createElement(_ui.IconSync16, null), _d2I18n.default.t('Update'), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
27
|
+
id: _MenuButtonStyles.default.__hash
|
|
28
|
+
}, _MenuButtonStyles.default), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
29
|
+
id: "2364287882",
|
|
30
|
+
dynamic: [_ui.colors.blue700, _ui.colors.blue100, _ui.colors.blue200]
|
|
31
|
+
}, [`button.__jsx-style-dynamic-selector{gap:8px;color:${_ui.colors.blue700};font-weight:500;}`, `button.__jsx-style-dynamic-selector:hover.__jsx-style-dynamic-selector:enabled{background:${_ui.colors.blue100};}`, `button.__jsx-style-dynamic-selector:active{background:${_ui.colors.blue200};}`]));
|
|
35
32
|
exports.UpdateButton = UpdateButton;
|
|
36
|
-
UpdateButton.defaultProps = {
|
|
37
|
-
dataTest: 'dhis2-analytics-updatebutton'
|
|
38
|
-
};
|
|
39
33
|
UpdateButton.propTypes = {
|
|
40
34
|
onClick: _propTypes.default.func.isRequired,
|
|
41
35
|
dataTest: _propTypes.default.string,
|
|
@@ -11,21 +11,20 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _TransferOptionStyle = _interopRequireDefault(require("./styles/TransferOption.style.js"));
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const TransferOption =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
14
|
+
const TransferOption = ({
|
|
15
|
+
disabled,
|
|
16
|
+
label,
|
|
17
|
+
highlighted,
|
|
18
|
+
selected,
|
|
19
|
+
onClick,
|
|
20
|
+
onDoubleClick,
|
|
21
|
+
value,
|
|
22
|
+
icon,
|
|
23
|
+
active,
|
|
24
|
+
tooltipText,
|
|
25
|
+
dataTest,
|
|
26
|
+
onEditClick
|
|
27
|
+
}) => {
|
|
29
28
|
const renderContent = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
30
29
|
"data-test": `${dataTest}-content`,
|
|
31
30
|
onClick: event => {
|
|
@@ -15,33 +15,28 @@ const query = {
|
|
|
15
15
|
resource: 'locales/db'
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
const LocalesSelect =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
18
|
+
const LocalesSelect = ({
|
|
19
|
+
onChange,
|
|
20
|
+
selected
|
|
21
|
+
}) => {
|
|
23
22
|
const {
|
|
24
23
|
data,
|
|
25
24
|
fetching
|
|
26
25
|
} = (0, _appRuntime.useDataQuery)(query);
|
|
27
26
|
return /*#__PURE__*/_react.default.createElement(_ui.SingleSelect, {
|
|
28
27
|
prefix: selected ? _d2I18n.default.t('Translating to') : _d2I18n.default.t('Choose a locale'),
|
|
29
|
-
onChange:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref2;
|
|
33
|
-
return onChange(selected);
|
|
34
|
-
},
|
|
28
|
+
onChange: ({
|
|
29
|
+
selected
|
|
30
|
+
}) => onChange(selected),
|
|
35
31
|
loading: fetching,
|
|
36
32
|
selected: data && selected ? selected : '',
|
|
37
33
|
dense: true
|
|
38
34
|
}, data && data.locales
|
|
39
35
|
// XXX remove duplicates ?! fr_SN - French (Senegal)
|
|
40
|
-
.reduce((locales,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = _ref3;
|
|
36
|
+
.reduce((locales, {
|
|
37
|
+
locale,
|
|
38
|
+
name
|
|
39
|
+
}) => {
|
|
45
40
|
if (!locales.find(entry => entry.locale === locale)) {
|
|
46
41
|
locales.push({
|
|
47
42
|
locale,
|
|
@@ -49,17 +44,14 @@ const LocalesSelect = _ref => {
|
|
|
49
44
|
});
|
|
50
45
|
}
|
|
51
46
|
return locales;
|
|
52
|
-
}, []).map(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
label: name
|
|
61
|
-
});
|
|
62
|
-
}));
|
|
47
|
+
}, []).map(({
|
|
48
|
+
locale,
|
|
49
|
+
name
|
|
50
|
+
}) => /*#__PURE__*/_react.default.createElement(_ui.SingleSelectOption, {
|
|
51
|
+
key: locale,
|
|
52
|
+
value: locale,
|
|
53
|
+
label: name
|
|
54
|
+
})));
|
|
63
55
|
};
|
|
64
56
|
exports.LocalesSelect = LocalesSelect;
|
|
65
57
|
LocalesSelect.propTypes = {
|
|
@@ -11,20 +11,18 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _LocalesSelect = require("./LocalesSelect.js");
|
|
13
13
|
var _TranslationModalActions = require("./TranslationModalActions.js");
|
|
14
|
-
function
|
|
15
|
-
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; }
|
|
14
|
+
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); }
|
|
16
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
16
|
const SESSION_STORAGE_TRANSLATION_LOCALE_KEY = 'translation-dialog-selected-locale';
|
|
18
17
|
const camelCaseToUnderscores = field => field.replace(/[a-z][A-Z]/g, match => [match.charAt(0), match.charAt(1)].join('_')).toLowerCase();
|
|
19
|
-
const TranslationForm =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref;
|
|
18
|
+
const TranslationForm = ({
|
|
19
|
+
fieldsToTranslate,
|
|
20
|
+
objectToTranslate,
|
|
21
|
+
translations,
|
|
22
|
+
resource,
|
|
23
|
+
onTranslationSaved,
|
|
24
|
+
onClose
|
|
25
|
+
}) => {
|
|
28
26
|
const [newTranslations, setNewTranslations] = (0, _react.useState)();
|
|
29
27
|
const [translationLocale, setTranslationLocale] = (0, _react.useState)();
|
|
30
28
|
const [fieldsTranslations, setFieldsTranslations] = (0, _react.useState)({});
|
|
@@ -77,14 +75,11 @@ const TranslationForm = _ref => {
|
|
|
77
75
|
const translationsMutationRef = (0, _react.useRef)({
|
|
78
76
|
resource: `${resource}/translations`,
|
|
79
77
|
type: 'update',
|
|
80
|
-
data:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
translations
|
|
86
|
-
};
|
|
87
|
-
}
|
|
78
|
+
data: ({
|
|
79
|
+
translations
|
|
80
|
+
}) => ({
|
|
81
|
+
translations
|
|
82
|
+
})
|
|
88
83
|
});
|
|
89
84
|
const [saveTranslations, {
|
|
90
85
|
loading: saveInProgress
|
|
@@ -128,12 +123,9 @@ const TranslationForm = _ref => {
|
|
|
128
123
|
})), translationLocale && /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, null, /*#__PURE__*/_react.default.createElement(_ui.TextAreaField, {
|
|
129
124
|
label: fieldsTranslations[field],
|
|
130
125
|
value: getTranslationForField(field),
|
|
131
|
-
onChange:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
} = _ref3;
|
|
135
|
-
return setTranslationForField(field, value);
|
|
136
|
-
},
|
|
126
|
+
onChange: ({
|
|
127
|
+
value
|
|
128
|
+
}) => setTranslationForField(field, value),
|
|
137
129
|
rows: 3
|
|
138
130
|
})), !translationLocale && index === 0 && /*#__PURE__*/_react.default.createElement(_ui.DataTableCell, {
|
|
139
131
|
rowSpan: String(fieldsToTranslate.length)
|
|
@@ -11,19 +11,17 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _TranslationForm = require("./TranslationForm.js");
|
|
12
12
|
var _TranslationModalActions = require("./TranslationModalActions.js");
|
|
13
13
|
var _useTranslationsResults = require("./useTranslationsResults.js");
|
|
14
|
-
function
|
|
15
|
-
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; }
|
|
14
|
+
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); }
|
|
16
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
const TranslationModal =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} = _ref;
|
|
16
|
+
const TranslationModal = ({
|
|
17
|
+
objectToTranslate,
|
|
18
|
+
fieldsToTranslate,
|
|
19
|
+
onClose,
|
|
20
|
+
onTranslationSaved
|
|
21
|
+
}) => {
|
|
24
22
|
const [translations, setTranslations] = (0, _react.useState)([]);
|
|
25
23
|
const endpointPath = new URL(objectToTranslate.href).pathname;
|
|
26
|
-
const endpointPathMatch = endpointPath.match(/api
|
|
24
|
+
const endpointPathMatch = endpointPath.match(/api\/(?:\d+\/)?(?<resource>.+)/);
|
|
27
25
|
const resource = endpointPathMatch !== null && endpointPathMatch !== void 0 && endpointPathMatch.groups ? endpointPathMatch.groups.resource : null;
|
|
28
26
|
const {
|
|
29
27
|
translationsData,
|
|
@@ -11,36 +11,27 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _OfflineTooltip = require("../../OfflineTooltip.js");
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
const SaveButton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
disabled: disabled
|
|
25
|
-
}, _d2I18n.default.t('Save translations'));
|
|
26
|
-
};
|
|
27
|
-
SaveButton.defaultProps = {
|
|
28
|
-
disabled: false,
|
|
29
|
-
loading: false,
|
|
30
|
-
onClick: Function.prototype
|
|
31
|
-
};
|
|
14
|
+
const SaveButton = ({
|
|
15
|
+
disabled = false,
|
|
16
|
+
loading = false,
|
|
17
|
+
onClick = Function.prototype
|
|
18
|
+
}) => /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
19
|
+
primary: true,
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
loading: loading,
|
|
22
|
+
disabled: disabled
|
|
23
|
+
}, _d2I18n.default.t('Save translations'));
|
|
32
24
|
SaveButton.propTypes = {
|
|
33
25
|
disabled: _propTypes.default.bool.isRequired,
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
onClick: _propTypes.default.func.isRequired,
|
|
27
|
+
loading: _propTypes.default.bool
|
|
36
28
|
};
|
|
37
|
-
const TranslationModalActions =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} = _ref2;
|
|
29
|
+
const TranslationModalActions = ({
|
|
30
|
+
onClose,
|
|
31
|
+
onSave = Function.prototype,
|
|
32
|
+
saveInProgress,
|
|
33
|
+
saveButtonDisabled
|
|
34
|
+
}) => {
|
|
44
35
|
const {
|
|
45
36
|
isDisconnected: offline
|
|
46
37
|
} = (0, _appRuntime.useDhis2ConnectionStatus)();
|
package/build/cjs/components/TranslationDialog/TranslationModal/__tests__/TranslationModal.spec.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ui = require("@dhis2/ui");
|
|
4
|
+
var _enzyme = require("enzyme");
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
var _TranslationModal = require("../TranslationModal.js");
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
const mockUseTranslationResults = jest.fn(() => ({
|
|
9
|
+
translationsData: undefined,
|
|
10
|
+
fetching: false
|
|
11
|
+
}));
|
|
12
|
+
jest.mock('../useTranslationsResults.js', () => ({
|
|
13
|
+
useTranslationsResults: args => mockUseTranslationResults(args)
|
|
14
|
+
}));
|
|
15
|
+
describe('The Translation Dialog component', () => {
|
|
16
|
+
let shallowTranslationModal;
|
|
17
|
+
let props;
|
|
18
|
+
const onClose = jest.fn();
|
|
19
|
+
const onTranslationSaved = jest.fn();
|
|
20
|
+
const getTranslationModalComponent = props => {
|
|
21
|
+
if (!shallowTranslationModal) {
|
|
22
|
+
shallowTranslationModal = (0, _enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_TranslationModal.TranslationModal, props));
|
|
23
|
+
}
|
|
24
|
+
return shallowTranslationModal;
|
|
25
|
+
};
|
|
26
|
+
beforeEach(() => {
|
|
27
|
+
shallowTranslationModal = undefined;
|
|
28
|
+
props = {
|
|
29
|
+
fieldsToTranslate: ['name', 'description'],
|
|
30
|
+
objectToTranslate: {
|
|
31
|
+
name: 'Test object',
|
|
32
|
+
href: 'https://dhis2.tld/path/api/visualization/object-id'
|
|
33
|
+
},
|
|
34
|
+
onClose,
|
|
35
|
+
onTranslationSaved
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
it('renders a Modal component', () => {
|
|
39
|
+
expect(getTranslationModalComponent(props).find(_ui.Modal)).toHaveLength(1);
|
|
40
|
+
});
|
|
41
|
+
it("renders a ModalTitle containing the object's name", () => {
|
|
42
|
+
expect(getTranslationModalComponent(props).find(_ui.ModalTitle).childAt(0).text()).toEqual(`Translate: ${props.objectToTranslate.name}`);
|
|
43
|
+
});
|
|
44
|
+
test.each(['https://dhis2.tld/path/api/visualization/object-id', 'https://dhis2.tld/path/api/42/visualization/object-id'])('uses the correct resource for the translation endpoint', href => {
|
|
45
|
+
props.objectToTranslate.href = href;
|
|
46
|
+
getTranslationModalComponent(props);
|
|
47
|
+
expect(mockUseTranslationResults).toHaveBeenCalled();
|
|
48
|
+
expect(mockUseTranslationResults).toHaveBeenCalledWith({
|
|
49
|
+
resource: 'visualization/object-id'
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -8,10 +8,9 @@ var _appRuntime = require("@dhis2/app-runtime");
|
|
|
8
8
|
var _d2I18n = _interopRequireDefault(require("@dhis2/d2-i18n"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
const useTranslationsResults =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
11
|
+
const useTranslationsResults = ({
|
|
12
|
+
resource
|
|
13
|
+
}) => {
|
|
15
14
|
const translationsQueryRef = (0, _react.useRef)({
|
|
16
15
|
translations: {
|
|
17
16
|
resource: `${resource}/translations`
|
|
@@ -9,13 +9,12 @@ var _ui = require("@dhis2/ui");
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const UserList =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
12
|
+
const UserList = ({
|
|
13
|
+
users,
|
|
14
|
+
selectedUserIndex,
|
|
15
|
+
onUserClick,
|
|
16
|
+
pager
|
|
17
|
+
}) => {
|
|
19
18
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, users.map(u => {
|
|
20
19
|
var _users$selectedUserIn;
|
|
21
20
|
return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, {
|
|
@@ -12,8 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _UserMentionWrapperStyle = require("./styles/UserMentionWrapper.style.js");
|
|
13
13
|
var _UserList = require("./UserList.js");
|
|
14
14
|
var _useUserSearchResults = require("./useUserSearchResults.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 AT_SYMBOL_WIDTH = 14;
|
|
19
18
|
const getVirtualPopperReference = ref => {
|
|
@@ -32,12 +31,11 @@ const getVirtualPopperReference = ref => {
|
|
|
32
31
|
})
|
|
33
32
|
};
|
|
34
33
|
};
|
|
35
|
-
const UserMentionWrapper =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref;
|
|
34
|
+
const UserMentionWrapper = ({
|
|
35
|
+
children,
|
|
36
|
+
inputReference,
|
|
37
|
+
onUserSelect = Function.prototype
|
|
38
|
+
}) => {
|
|
41
39
|
const [listIsOpen, setListIsOpen] = (0, _react.useState)(false);
|
|
42
40
|
const [captureText, setCaptureText] = (0, _react.useState)(false);
|
|
43
41
|
const [capturedText, setCapturedText] = (0, _react.useState)('');
|
|
@@ -70,10 +68,9 @@ const UserMentionWrapper = _ref => {
|
|
|
70
68
|
const onUserListClose = () => reset();
|
|
71
69
|
|
|
72
70
|
// event bubbles up from the input/textarea
|
|
73
|
-
const onInput =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
} = _ref2;
|
|
71
|
+
const onInput = ({
|
|
72
|
+
target
|
|
73
|
+
}) => {
|
|
77
74
|
const {
|
|
78
75
|
selectionEnd,
|
|
79
76
|
value
|
|
@@ -92,11 +89,10 @@ const UserMentionWrapper = _ref => {
|
|
|
92
89
|
};
|
|
93
90
|
|
|
94
91
|
// event bubbles up from the wrapped input/textarea
|
|
95
|
-
const onKeyDown =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
} = _ref3;
|
|
92
|
+
const onKeyDown = ({
|
|
93
|
+
key,
|
|
94
|
+
target
|
|
95
|
+
}) => {
|
|
100
96
|
const {
|
|
101
97
|
selectionStart
|
|
102
98
|
} = target;
|
|
@@ -197,9 +193,6 @@ const UserMentionWrapper = _ref => {
|
|
|
197
193
|
}, _UserMentionWrapperStyle.userMentionWrapperClasses), _UserMentionWrapperStyle.resolvedHeaderStyle.styles);
|
|
198
194
|
};
|
|
199
195
|
exports.UserMentionWrapper = UserMentionWrapper;
|
|
200
|
-
UserMentionWrapper.defaultProps = {
|
|
201
|
-
onUserSelect: Function.prototype
|
|
202
|
-
};
|
|
203
196
|
UserMentionWrapper.propTypes = {
|
|
204
197
|
inputReference: _propTypes.default.object.isRequired,
|
|
205
198
|
onUserSelect: _propTypes.default.func.isRequired,
|
|
@@ -11,24 +11,20 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
11
11
|
const usersQuery = {
|
|
12
12
|
users: {
|
|
13
13
|
resource: 'users/gist',
|
|
14
|
-
params:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
rootJunction: 'OR'
|
|
24
|
-
};
|
|
25
|
-
}
|
|
14
|
+
params: ({
|
|
15
|
+
searchText
|
|
16
|
+
}) => ({
|
|
17
|
+
fields: 'id,displayName,username',
|
|
18
|
+
order: 'firstName,surname',
|
|
19
|
+
total: true,
|
|
20
|
+
filter: `username:ilike:${searchText},firstName:ilike:${searchText},surname:ilike:${searchText},email:ilike:${searchText}`,
|
|
21
|
+
rootJunction: 'OR'
|
|
22
|
+
})
|
|
26
23
|
}
|
|
27
24
|
};
|
|
28
|
-
const useUserSearchResults =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = _ref2;
|
|
25
|
+
const useUserSearchResults = ({
|
|
26
|
+
searchText
|
|
27
|
+
}) => {
|
|
32
28
|
const [{
|
|
33
29
|
users,
|
|
34
30
|
pager
|