@dhis2/analytics 23.8.4 → 23.8.7
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/CHANGELOG.md +23 -0
- package/build/cjs/__demo__/FileMenu.stories.js +4 -2
- package/build/cjs/__demo__/Filter.stories.js +2 -2
- package/build/cjs/__demo__/FixedPeriodSelect.stories.js +2 -2
- package/build/cjs/__demo__/OpenFileDialog.stories.js +4 -2
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +2 -2
- package/build/cjs/__demo__/PivotTable.stories.js +206 -153
- package/build/cjs/api/__tests__/dimensions.spec.js +2 -1
- package/build/cjs/api/analytics/Analytics.js +8 -7
- package/build/cjs/api/analytics/AnalyticsBase.js +58 -43
- package/build/cjs/api/analytics/AnalyticsRequest.js +2 -1
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +22 -17
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
- package/build/cjs/api/analytics/AnalyticsResponseHeader.js +7 -5
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
- package/build/cjs/api/dimensions.js +150 -120
- package/build/cjs/api/organisationUnits.js +36 -24
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +22 -13
- package/build/cjs/components/AboutAOUnit/styles/AboutAOUnit.style.js +2 -2
- package/build/cjs/components/CachedDataQueryProvider.js +8 -7
- package/build/cjs/components/DataDimension/DataDimension.js +8 -6
- package/build/cjs/components/DataDimension/DataTypeSelector.js +6 -5
- package/build/cjs/components/DataDimension/DetailSelector.js +6 -5
- package/build/cjs/components/DataDimension/GroupSelector.js +12 -11
- package/build/cjs/components/DataDimension/ItemSelector.js +87 -73
- package/build/cjs/components/DataDimension/MetricSelector.js +6 -5
- package/build/cjs/components/DimensionMenu.js +14 -13
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/DimensionLabel.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +4 -4
- package/build/cjs/components/DimensionsPanel/List/OptionsButton.js +10 -7
- package/build/cjs/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +9 -8
- package/build/cjs/components/DynamicDimension/ItemSelector.js +58 -44
- package/build/cjs/components/FileMenu/DeleteDialog.js +16 -12
- package/build/cjs/components/FileMenu/FileMenu.js +19 -18
- package/build/cjs/components/FileMenu/GetLinkDialog.js +6 -5
- package/build/cjs/components/FileMenu/RenameDialog.js +38 -25
- package/build/cjs/components/FileMenu/SaveAsDialog.js +21 -14
- package/build/cjs/components/FileMenu/utils.js +1 -1
- package/build/cjs/components/Filter/Filter.js +22 -19
- package/build/cjs/components/LegendKey/LegendKey.js +4 -3
- package/build/cjs/components/OpenFileDialog/CreatedByFilter.js +26 -20
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +26 -23
- package/build/cjs/components/OpenFileDialog/DateField.js +4 -3
- package/build/cjs/components/OpenFileDialog/FileList.js +22 -19
- package/build/cjs/components/OpenFileDialog/NameFilter.js +21 -15
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +43 -35
- package/build/cjs/components/OpenFileDialog/PaginationControls.js +28 -22
- package/build/cjs/components/OpenFileDialog/VisTypeFilter.js +37 -28
- package/build/cjs/components/OpenFileDialog/utils.js +1 -1
- package/build/cjs/components/Options/VisualizationOptions.js +46 -36
- package/build/cjs/components/Options/styles/VisualizationOptions.style.js +1 -1
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +50 -34
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +22 -15
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +19 -14
- package/build/cjs/components/PeriodDimension/PeriodDimension.js +8 -6
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +24 -19
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +30 -24
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +1 -1
- package/build/cjs/components/PeriodDimension/utils/index.js +6 -2
- package/build/cjs/components/PeriodDimension/utils/relativePeriods.js +1 -1
- package/build/cjs/components/PivotTable/PivotTable.js +10 -9
- package/build/cjs/components/PivotTable/PivotTableBody.js +29 -20
- package/build/cjs/components/PivotTable/PivotTableCell.js +9 -8
- package/build/cjs/components/PivotTable/PivotTableClippedAxis.js +17 -14
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
- package/build/cjs/components/PivotTable/PivotTableColumnHeaders.js +29 -22
- package/build/cjs/components/PivotTable/PivotTableContainer.js +6 -5
- package/build/cjs/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableEmptyCell.js +3 -2
- package/build/cjs/components/PivotTable/PivotTableEmptyRow.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +7 -6
- package/build/cjs/components/PivotTable/PivotTableHead.js +16 -13
- package/build/cjs/components/PivotTable/PivotTableHeaderCell.js +9 -8
- package/build/cjs/components/PivotTable/PivotTableRow.js +27 -20
- package/build/cjs/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +9 -8
- package/build/cjs/components/PivotTable/PivotTableTitleRows.js +5 -4
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +8 -7
- package/build/cjs/components/PivotTable/styles/PivotTable.style.js +1 -1
- package/build/cjs/components/TransferOption.js +15 -13
- package/build/cjs/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationForm.js +25 -18
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModal.js +9 -8
- package/build/cjs/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
- package/build/cjs/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
- package/build/cjs/components/VisTypeIcon.js +6 -5
- package/build/cjs/index.js +464 -464
- package/build/cjs/locales/ar/translations.json +1 -1
- package/build/cjs/locales/ar_EG/translations.json +1 -1
- package/build/cjs/locales/ar_IQ/translations.json +1 -1
- package/build/cjs/locales/ckb/translations.json +1 -1
- package/build/cjs/locales/cs/translations.json +1 -1
- package/build/cjs/locales/da/translations.json +1 -1
- package/build/cjs/locales/en/translations.json +1 -1
- package/build/cjs/locales/es/translations.json +1 -1
- package/build/cjs/locales/fr/translations.json +1 -1
- package/build/cjs/locales/id/translations.json +1 -1
- package/build/cjs/locales/km/translations.json +1 -1
- package/build/cjs/locales/lo/translations.json +1 -1
- package/build/cjs/locales/my/translations.json +1 -1
- package/build/cjs/locales/nb/translations.json +1 -1
- package/build/cjs/locales/nl/translations.json +30 -30
- package/build/cjs/locales/prs/translations.json +1 -1
- package/build/cjs/locales/ps/translations.json +1 -1
- package/build/cjs/locales/pt/translations.json +1 -1
- package/build/cjs/locales/pt_BR/translations.json +1 -1
- package/build/cjs/locales/ru/translations.json +1 -1
- package/build/cjs/locales/sv/translations.json +1 -1
- package/build/cjs/locales/tet/translations.json +1 -1
- package/build/cjs/locales/tg/translations.json +1 -1
- package/build/cjs/locales/uk/translations.json +1 -1
- package/build/cjs/locales/ur/translations.json +1 -1
- package/build/cjs/locales/uz/translations.json +1 -1
- package/build/cjs/locales/uz_Latn/translations.json +1 -1
- package/build/cjs/locales/vi/translations.json +1 -1
- package/build/cjs/locales/zh/translations.json +1 -1
- package/build/cjs/locales/zh_CN/translations.json +1 -1
- package/build/cjs/modules/axis.js +1 -1
- package/build/cjs/modules/dataSets.js +1 -1
- package/build/cjs/modules/dataTypes.js +2 -2
- package/build/cjs/modules/dimensionSelectorHelper.js +1 -1
- package/build/cjs/modules/fontStyle.js +1 -1
- package/build/cjs/modules/layout/axis.js +1 -1
- package/build/cjs/modules/layout/dimension.js +1 -1
- package/build/cjs/modules/layout/dimensionCreate.js +3 -1
- package/build/cjs/modules/layout/dimensionIsValid.js +5 -3
- package/build/cjs/modules/layout/item.js +1 -1
- package/build/cjs/modules/layout/testResources.js +1 -1
- package/build/cjs/modules/layoutTypes.js +1 -1
- package/build/cjs/modules/layoutUiRules/index.js +20 -20
- package/build/cjs/modules/layoutUiRules/rules.js +1 -1
- package/build/cjs/modules/layoutUiRules/rulesHelper.js +2 -1
- package/build/cjs/modules/layoutUiRules/rulesUtils.js +1 -1
- package/build/cjs/modules/legends.js +1 -1
- package/build/cjs/modules/outliers/index.js +4 -2
- package/build/cjs/modules/outliers/iqr.js +8 -5
- package/build/cjs/modules/outliers/modZScore.js +15 -7
- package/build/cjs/modules/outliers/zScore.js +5 -4
- package/build/cjs/modules/pivotTable/AdaptiveClippingController.js +17 -12
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +57 -44
- package/build/cjs/modules/pivotTable/clipAxis.js +8 -7
- package/build/cjs/modules/pivotTable/clipPartitionedAxis.js +10 -9
- package/build/cjs/modules/pivotTable/getHeaderForDisplay.js +9 -8
- package/build/cjs/modules/pivotTable/measureText.js +10 -7
- package/build/cjs/modules/pivotTable/pivotTableConstants.js +1 -1
- package/build/cjs/modules/pivotTable/useParentSize.js +2 -1
- package/build/cjs/modules/pivotTable/useScrollPosition.js +2 -1
- package/build/cjs/modules/pivotTable/useTableClipping.js +7 -6
- package/build/cjs/modules/predefinedDimensions.js +2 -2
- package/build/cjs/modules/relativeItems/index.js +4 -1
- package/build/cjs/modules/valueTypes.js +1 -1
- package/build/cjs/modules/visTypes.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_dhis/index.js +7 -6
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +9 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +5 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/customAxes.js +9 -5
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +11 -9
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +24 -20
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/xAxis/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
- package/build/cjs/visualizations/config/generators/dhis/singleValue.js +28 -24
- package/build/cjs/visualizations/config/generators/highcharts/index.js +5 -1
- package/build/cjs/visualizations/config/index.js +13 -11
- package/build/cjs/visualizations/config/validators/dhis/index.js +4 -3
- package/build/cjs/visualizations/index.js +6 -2
- package/build/cjs/visualizations/store/adapters/dhis_dhis/index.js +7 -6
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
- package/build/cjs/visualizations/store/index.js +18 -15
- package/build/cjs/visualizations/store/validators/dhis/index.js +7 -5
- package/build/cjs/visualizations/util/colors/colorSets.js +1 -1
- package/build/cjs/visualizations/util/colors/themes.js +1 -1
- package/build/cjs/visualizations/util/getFilterText.js +9 -6
- package/build/es/__demo__/FileMenu.stories.js +4 -2
- package/build/es/__demo__/OpenFileDialog.stories.js +4 -2
- package/build/es/__demo__/PivotTable.stories.js +204 -151
- package/build/es/api/__tests__/dimensions.spec.js +2 -1
- package/build/es/api/analytics/Analytics.js +8 -7
- package/build/es/api/analytics/AnalyticsBase.js +58 -43
- package/build/es/api/analytics/AnalyticsRequest.js +2 -1
- package/build/es/api/analytics/AnalyticsRequestBase.js +22 -17
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +38 -19
- package/build/es/api/analytics/AnalyticsResponseHeader.js +7 -5
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +2 -1
- package/build/es/api/dimensions.js +149 -119
- package/build/es/api/organisationUnits.js +35 -23
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +20 -11
- package/build/es/components/AboutAOUnit/styles/AboutAOUnit.style.js +2 -2
- package/build/es/components/CachedDataQueryProvider.js +6 -5
- package/build/es/components/DataDimension/DataDimension.js +8 -6
- package/build/es/components/DataDimension/DataTypeSelector.js +6 -5
- package/build/es/components/DataDimension/DetailSelector.js +6 -5
- package/build/es/components/DataDimension/GroupSelector.js +10 -9
- package/build/es/components/DataDimension/ItemSelector.js +85 -71
- package/build/es/components/DataDimension/MetricSelector.js +6 -5
- package/build/es/components/DimensionMenu.js +14 -13
- package/build/es/components/DimensionsPanel/DimensionsPanel.js +2 -2
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +2 -2
- package/build/es/components/DimensionsPanel/List/DimensionLabel.js +2 -2
- package/build/es/components/DimensionsPanel/List/DimensionList.js +2 -2
- package/build/es/components/DimensionsPanel/List/OptionsButton.js +10 -7
- package/build/es/components/DimensionsPanel/List/RecommendedIcon.js +14 -11
- package/build/es/components/DynamicDimension/DynamicDimension.js +9 -8
- package/build/es/components/DynamicDimension/ItemSelector.js +56 -42
- package/build/es/components/FileMenu/DeleteDialog.js +14 -10
- package/build/es/components/FileMenu/FileMenu.js +17 -16
- package/build/es/components/FileMenu/GetLinkDialog.js +6 -5
- package/build/es/components/FileMenu/RenameDialog.js +36 -23
- package/build/es/components/FileMenu/SaveAsDialog.js +19 -12
- package/build/es/components/Filter/Filter.js +22 -19
- package/build/es/components/LegendKey/LegendKey.js +4 -3
- package/build/es/components/OpenFileDialog/CreatedByFilter.js +26 -20
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +26 -23
- package/build/es/components/OpenFileDialog/DateField.js +4 -3
- package/build/es/components/OpenFileDialog/FileList.js +22 -19
- package/build/es/components/OpenFileDialog/NameFilter.js +21 -15
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +41 -33
- package/build/es/components/OpenFileDialog/PaginationControls.js +28 -22
- package/build/es/components/OpenFileDialog/VisTypeFilter.js +37 -28
- package/build/es/components/Options/VisualizationOptions.js +43 -33
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +48 -32
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +22 -15
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +17 -12
- package/build/es/components/PeriodDimension/PeriodDimension.js +8 -6
- package/build/es/components/PeriodDimension/PeriodTransfer.js +22 -17
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +30 -24
- package/build/es/components/PeriodDimension/utils/index.js +5 -1
- package/build/es/components/PivotTable/PivotTable.js +8 -7
- package/build/es/components/PivotTable/PivotTableBody.js +29 -20
- package/build/es/components/PivotTable/PivotTableCell.js +9 -8
- package/build/es/components/PivotTable/PivotTableClippedAxis.js +17 -14
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +8 -7
- package/build/es/components/PivotTable/PivotTableColumnHeaders.js +29 -22
- package/build/es/components/PivotTable/PivotTableContainer.js +6 -5
- package/build/es/components/PivotTable/PivotTableDimensionLabelCell.js +5 -4
- package/build/es/components/PivotTable/PivotTableEmptyCell.js +3 -2
- package/build/es/components/PivotTable/PivotTableEmptyRow.js +5 -4
- package/build/es/components/PivotTable/PivotTableEngineContext.js +5 -4
- package/build/es/components/PivotTable/PivotTableHead.js +16 -13
- package/build/es/components/PivotTable/PivotTableHeaderCell.js +9 -8
- package/build/es/components/PivotTable/PivotTableRow.js +27 -20
- package/build/es/components/PivotTable/PivotTableRowHeaderCell.js +6 -5
- package/build/es/components/PivotTable/PivotTableSortIcon.js +5 -4
- package/build/es/components/PivotTable/PivotTableTitleRow.js +7 -6
- package/build/es/components/PivotTable/PivotTableTitleRows.js +5 -4
- package/build/es/components/PivotTable/PivotTableValueCell.js +6 -5
- package/build/es/components/TransferOption.js +15 -13
- package/build/es/components/TranslationDialog/TranslationModal/LocalesSelect.js +28 -19
- package/build/es/components/TranslationDialog/TranslationModal/TranslationForm.js +23 -16
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModal.js +7 -6
- package/build/es/components/TranslationDialog/TranslationModal/TranslationModalActions.js +17 -14
- package/build/es/components/TranslationDialog/TranslationModal/useTranslationsResults.js +4 -3
- package/build/es/components/VisTypeIcon.js +6 -5
- package/build/es/locales/ar/translations.json +1 -1
- package/build/es/locales/ar_EG/translations.json +1 -1
- package/build/es/locales/ar_IQ/translations.json +1 -1
- package/build/es/locales/ckb/translations.json +1 -1
- package/build/es/locales/cs/translations.json +1 -1
- package/build/es/locales/da/translations.json +1 -1
- package/build/es/locales/en/translations.json +1 -1
- package/build/es/locales/es/translations.json +1 -1
- package/build/es/locales/fr/translations.json +1 -1
- package/build/es/locales/id/translations.json +1 -1
- package/build/es/locales/km/translations.json +1 -1
- package/build/es/locales/lo/translations.json +1 -1
- package/build/es/locales/my/translations.json +1 -1
- package/build/es/locales/nb/translations.json +1 -1
- package/build/es/locales/nl/translations.json +30 -30
- package/build/es/locales/prs/translations.json +1 -1
- package/build/es/locales/ps/translations.json +1 -1
- package/build/es/locales/pt/translations.json +1 -1
- package/build/es/locales/pt_BR/translations.json +1 -1
- package/build/es/locales/ru/translations.json +1 -1
- package/build/es/locales/sv/translations.json +1 -1
- package/build/es/locales/tet/translations.json +1 -1
- package/build/es/locales/tg/translations.json +1 -1
- package/build/es/locales/uk/translations.json +1 -1
- package/build/es/locales/ur/translations.json +1 -1
- package/build/es/locales/uz/translations.json +1 -1
- package/build/es/locales/uz_Latn/translations.json +1 -1
- package/build/es/locales/vi/translations.json +1 -1
- package/build/es/locales/zh/translations.json +1 -1
- package/build/es/locales/zh_CN/translations.json +1 -1
- package/build/es/modules/layout/dimensionCreate.js +3 -1
- package/build/es/modules/layout/dimensionIsValid.js +5 -3
- package/build/es/modules/outliers/index.js +3 -1
- package/build/es/modules/outliers/iqr.js +7 -4
- package/build/es/modules/outliers/modZScore.js +14 -6
- package/build/es/modules/outliers/zScore.js +4 -3
- package/build/es/modules/pivotTable/AdaptiveClippingController.js +17 -12
- package/build/es/modules/pivotTable/PivotTableEngine.js +57 -44
- package/build/es/modules/pivotTable/clipAxis.js +8 -7
- package/build/es/modules/pivotTable/clipPartitionedAxis.js +10 -9
- package/build/es/modules/pivotTable/getHeaderForDisplay.js +9 -8
- package/build/es/modules/pivotTable/measureText.js +10 -7
- package/build/es/modules/pivotTable/useParentSize.js +2 -1
- package/build/es/modules/pivotTable/useScrollPosition.js +2 -1
- package/build/es/modules/pivotTable/useTableClipping.js +7 -6
- package/build/es/modules/predefinedDimensions.js +1 -1
- package/build/es/modules/relativeItems/index.js +4 -1
- package/build/es/visualizations/config/adapters/dhis_dhis/index.js +6 -5
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +8 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +4 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/customAxes.js +6 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/getTrimmedConfig.js +4 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +9 -7
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +32 -28
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +23 -19
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +9 -8
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -1
- package/build/es/visualizations/config/generators/dhis/singleValue.js +28 -24
- package/build/es/visualizations/config/generators/highcharts/index.js +5 -1
- package/build/es/visualizations/config/index.js +13 -11
- package/build/es/visualizations/config/validators/dhis/index.js +4 -3
- package/build/es/visualizations/index.js +5 -1
- package/build/es/visualizations/store/adapters/dhis_dhis/index.js +7 -6
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +8 -7
- package/build/es/visualizations/store/index.js +18 -15
- package/build/es/visualizations/store/validators/dhis/index.js +7 -5
- package/build/es/visualizations/util/getFilterText.js +9 -6
- package/package.json +11 -11
|
@@ -7,27 +7,34 @@ import { supportedFileTypes, endpointFromFileType, labelForFileType } from './ut
|
|
|
7
7
|
|
|
8
8
|
const getMutation = type => ({
|
|
9
9
|
resource: endpointFromFileType(type),
|
|
10
|
-
id:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
id: _ref => {
|
|
11
|
+
let {
|
|
12
|
+
id
|
|
13
|
+
} = _ref;
|
|
14
|
+
return id;
|
|
15
|
+
},
|
|
13
16
|
type: 'update',
|
|
14
17
|
partial: true,
|
|
15
|
-
data:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
data: _ref2 => {
|
|
19
|
+
let {
|
|
20
|
+
name,
|
|
21
|
+
description
|
|
22
|
+
} = _ref2;
|
|
23
|
+
return {
|
|
24
|
+
name,
|
|
25
|
+
description
|
|
26
|
+
};
|
|
27
|
+
}
|
|
22
28
|
});
|
|
23
29
|
|
|
24
|
-
export const RenameDialog =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
export const RenameDialog = _ref3 => {
|
|
31
|
+
let {
|
|
32
|
+
type,
|
|
33
|
+
object,
|
|
34
|
+
onClose,
|
|
35
|
+
onRename,
|
|
36
|
+
onError
|
|
37
|
+
} = _ref3;
|
|
31
38
|
const [name, setName] = useState(object.name);
|
|
32
39
|
const [description, setDescription] = useState(object.description);
|
|
33
40
|
const mutation = useMemo(() => getMutation(type), []);
|
|
@@ -64,17 +71,23 @@ export const RenameDialog = ({
|
|
|
64
71
|
disabled: loading,
|
|
65
72
|
required: true,
|
|
66
73
|
value: name,
|
|
67
|
-
onChange:
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
onChange: _ref4 => {
|
|
75
|
+
let {
|
|
76
|
+
value
|
|
77
|
+
} = _ref4;
|
|
78
|
+
return setName(value);
|
|
79
|
+
}
|
|
70
80
|
}), /*#__PURE__*/React.createElement(TextAreaField, {
|
|
71
81
|
label: i18n.t('Description'),
|
|
72
82
|
disabled: loading,
|
|
73
83
|
value: description,
|
|
74
84
|
rows: 3,
|
|
75
|
-
onChange:
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
onChange: _ref5 => {
|
|
86
|
+
let {
|
|
87
|
+
value
|
|
88
|
+
} = _ref5;
|
|
89
|
+
return setDescription(value);
|
|
90
|
+
}
|
|
78
91
|
})), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
79
92
|
onClick: onClose,
|
|
80
93
|
disabled: loading,
|
|
@@ -4,12 +4,13 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import i18n from '../../locales/index.js';
|
|
5
5
|
import { supportedFileTypes, labelForFileType } from './utils.js';
|
|
6
6
|
const NAME_MAXLENGTH = 230;
|
|
7
|
-
export const SaveAsDialog =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export const SaveAsDialog = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
type,
|
|
10
|
+
object,
|
|
11
|
+
onClose,
|
|
12
|
+
onSaveAs
|
|
13
|
+
} = _ref;
|
|
13
14
|
const [name, setName] = useState(object === null || object === void 0 ? void 0 : object.name);
|
|
14
15
|
const [description, setDescription] = useState(object === null || object === void 0 ? void 0 : object.description); // the actual API request is done in the app
|
|
15
16
|
|
|
@@ -30,17 +31,23 @@ export const SaveAsDialog = ({
|
|
|
30
31
|
label: i18n.t('Name'),
|
|
31
32
|
required: true,
|
|
32
33
|
value: name,
|
|
33
|
-
onChange:
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
onChange: _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
value
|
|
37
|
+
} = _ref2;
|
|
38
|
+
return setName(value.substring(0, NAME_MAXLENGTH));
|
|
39
|
+
},
|
|
36
40
|
dataTest: "file-menu-saveas-modal-name"
|
|
37
41
|
}), /*#__PURE__*/React.createElement(TextAreaField, {
|
|
38
42
|
label: i18n.t('Description'),
|
|
39
43
|
value: description,
|
|
40
44
|
rows: 3,
|
|
41
|
-
onChange:
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
onChange: _ref3 => {
|
|
46
|
+
let {
|
|
47
|
+
value
|
|
48
|
+
} = _ref3;
|
|
49
|
+
return setDescription(value);
|
|
50
|
+
},
|
|
44
51
|
dataTest: "file-menu-saveas-modal-description"
|
|
45
52
|
})), /*#__PURE__*/React.createElement(ModalActions, null, /*#__PURE__*/React.createElement(ButtonStrip, null, /*#__PURE__*/React.createElement(Button, {
|
|
46
53
|
onClick: onClose,
|
|
@@ -4,25 +4,28 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styles from './styles/Filter.style.js';
|
|
6
6
|
|
|
7
|
-
const Filter =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
7
|
+
const Filter = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
text,
|
|
10
|
+
onChange,
|
|
11
|
+
onClear,
|
|
12
|
+
placeholder,
|
|
13
|
+
type,
|
|
14
|
+
dataTest
|
|
15
|
+
} = _ref;
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "jsx-".concat(styles.__hash) + " " + "container"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(InputField, {
|
|
19
|
+
placeholder: placeholder,
|
|
20
|
+
onChange: ref => ref.value.length ? onChange(ref.value) : onClear(),
|
|
21
|
+
value: text,
|
|
22
|
+
dense: true,
|
|
23
|
+
type: type,
|
|
24
|
+
dataTest: dataTest
|
|
25
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
26
|
+
id: styles.__hash
|
|
27
|
+
}, styles));
|
|
28
|
+
};
|
|
26
29
|
|
|
27
30
|
Filter.propTypes = {
|
|
28
31
|
placeholder: PropTypes.string.isRequired,
|
|
@@ -4,9 +4,10 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styles from './styles/LegendKey.style.js';
|
|
6
6
|
|
|
7
|
-
const LegendKey =
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const LegendKey = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
legendSets
|
|
10
|
+
} = _ref;
|
|
10
11
|
return legendSets.length ? /*#__PURE__*/React.createElement("div", {
|
|
11
12
|
"data-test": 'legend-key-container',
|
|
12
13
|
className: "jsx-".concat(styles.__hash) + " " + "container"
|
|
@@ -6,26 +6,32 @@ import React from 'react'; // TODO change the "Created by" prefix to "Creator" o
|
|
|
6
6
|
export const CREATED_BY_ALL = 'all';
|
|
7
7
|
export const CREATED_BY_ALL_BUT_CURRENT_USER = 'allButCurrentUser';
|
|
8
8
|
export const CREATED_BY_CURRENT_USER = 'currentUser';
|
|
9
|
-
export const CreatedByFilter =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
selected
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
export const CreatedByFilter = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
selected,
|
|
12
|
+
onChange
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement(SingleSelect, {
|
|
15
|
+
selected: selected,
|
|
16
|
+
onChange: _ref2 => {
|
|
17
|
+
let {
|
|
18
|
+
selected
|
|
19
|
+
} = _ref2;
|
|
20
|
+
return onChange(selected);
|
|
21
|
+
},
|
|
22
|
+
prefix: i18n.t('Created by'),
|
|
23
|
+
dense: true
|
|
24
|
+
}, /*#__PURE__*/React.createElement(SingleSelectOption, {
|
|
25
|
+
label: i18n.t('Anyone'),
|
|
26
|
+
value: CREATED_BY_ALL
|
|
27
|
+
}), /*#__PURE__*/React.createElement(SingleSelectOption, {
|
|
28
|
+
label: i18n.t('Only you'),
|
|
29
|
+
value: CREATED_BY_CURRENT_USER
|
|
30
|
+
}), /*#__PURE__*/React.createElement(SingleSelectOption, {
|
|
31
|
+
label: i18n.t('Others'),
|
|
32
|
+
value: CREATED_BY_ALL_BUT_CURRENT_USER
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
29
35
|
CreatedByFilter.propTypes = {
|
|
30
36
|
onChange: PropTypes.func.isRequired,
|
|
31
37
|
selected: PropTypes.string
|
|
@@ -6,31 +6,34 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import styles from './styles/CustomSelectOption.style.js';
|
|
8
8
|
|
|
9
|
-
const CustomSelectOptionItem =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
disabled
|
|
17
|
-
}) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
onClick: e => onClick({}, e),
|
|
19
|
-
"data-value": value,
|
|
20
|
-
"data-label": label,
|
|
21
|
-
className: "jsx-".concat(styles.__hash) + " " + (cx({
|
|
9
|
+
const CustomSelectOptionItem = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
value,
|
|
12
|
+
label,
|
|
13
|
+
icon,
|
|
14
|
+
insertDivider,
|
|
15
|
+
onClick,
|
|
22
16
|
active,
|
|
23
17
|
disabled
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
onClick: e => onClick({}, e),
|
|
21
|
+
"data-value": value,
|
|
22
|
+
"data-label": label,
|
|
23
|
+
className: "jsx-".concat(styles.__hash) + " " + (cx({
|
|
24
|
+
active,
|
|
25
|
+
disabled
|
|
26
|
+
}) || "")
|
|
27
|
+
}, icon, /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
className: "jsx-".concat(styles.__hash) + " " + (cx({
|
|
29
|
+
label: icon
|
|
30
|
+
}) || "")
|
|
31
|
+
}, label), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
32
|
+
id: styles.__hash
|
|
33
|
+
}, styles)), insertDivider && /*#__PURE__*/React.createElement(MenuDivider, {
|
|
34
|
+
dense: true
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
34
37
|
|
|
35
38
|
export const CustomSelectOption = props => props.disabled ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
36
39
|
content: i18n.t('Not supported by this app yet')
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
export const DateField =
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const DateField = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
date
|
|
7
|
+
} = _ref;
|
|
7
8
|
const d = new Date(date);
|
|
8
9
|
return /*#__PURE__*/React.createElement("time", {
|
|
9
10
|
dateTime: d.toISOString()
|
|
@@ -3,25 +3,28 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { VisTypeIcon } from '../VisTypeIcon.js';
|
|
5
5
|
import { DateField } from './DateField.js';
|
|
6
|
-
export const FileList =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
}, /*#__PURE__*/React.createElement(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})), /*#__PURE__*/React.createElement(DataTableCell, null, /*#__PURE__*/React.createElement(DateField, {
|
|
23
|
-
|
|
24
|
-
}))
|
|
6
|
+
export const FileList = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
data,
|
|
9
|
+
onSelect,
|
|
10
|
+
showVisTypeColumn
|
|
11
|
+
} = _ref;
|
|
12
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, data.map(visualization => /*#__PURE__*/React.createElement(DataTableRow, {
|
|
13
|
+
key: visualization.id
|
|
14
|
+
}, /*#__PURE__*/React.createElement(DataTableCell, {
|
|
15
|
+
onClick: () => onSelect(visualization.id)
|
|
16
|
+
}, visualization.displayName), showVisTypeColumn && /*#__PURE__*/React.createElement(DataTableCell, {
|
|
17
|
+
align: "center"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(VisTypeIcon, {
|
|
19
|
+
type: visualization.type,
|
|
20
|
+
useSmall: true,
|
|
21
|
+
color: colors.grey600
|
|
22
|
+
})), /*#__PURE__*/React.createElement(DataTableCell, null, /*#__PURE__*/React.createElement(DateField, {
|
|
23
|
+
date: visualization.created
|
|
24
|
+
})), /*#__PURE__*/React.createElement(DataTableCell, null, /*#__PURE__*/React.createElement(DateField, {
|
|
25
|
+
date: visualization.lastUpdated
|
|
26
|
+
})))));
|
|
27
|
+
};
|
|
25
28
|
FileList.propTypes = {
|
|
26
29
|
data: PropTypes.arrayOf(PropTypes.shape({
|
|
27
30
|
created: PropTypes.string.isRequired,
|
|
@@ -2,21 +2,27 @@ import i18n from '@dhis2/d2-i18n';
|
|
|
2
2
|
import { Input } from '@dhis2/ui';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const NameFilter =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
5
|
+
export const NameFilter = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
dataTest,
|
|
8
|
+
value,
|
|
9
|
+
onChange
|
|
10
|
+
} = _ref;
|
|
11
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
12
|
+
type: "search",
|
|
13
|
+
placeholder: i18n.t('Filter by name'),
|
|
14
|
+
onChange: _ref2 => {
|
|
15
|
+
let {
|
|
16
|
+
value
|
|
17
|
+
} = _ref2;
|
|
18
|
+
return onChange(value);
|
|
19
|
+
},
|
|
20
|
+
value: value,
|
|
21
|
+
initialFocus: true,
|
|
22
|
+
dense: true,
|
|
23
|
+
dataTest: dataTest
|
|
24
|
+
});
|
|
25
|
+
};
|
|
20
26
|
NameFilter.propTypes = {
|
|
21
27
|
onChange: PropTypes.func.isRequired,
|
|
22
28
|
dataTest: PropTypes.string,
|
|
@@ -17,12 +17,13 @@ import { VisTypeFilter } from './VisTypeFilter.js';
|
|
|
17
17
|
const getQuery = type => ({
|
|
18
18
|
files: {
|
|
19
19
|
resource: AOTypeMap[type].apiEndpoint,
|
|
20
|
-
params:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
params: _ref => {
|
|
21
|
+
let {
|
|
22
|
+
sortField = 'displayName',
|
|
23
|
+
sortDirection = 'asc',
|
|
24
|
+
page = 1,
|
|
25
|
+
filters
|
|
26
|
+
} = _ref;
|
|
26
27
|
const queryParams = {
|
|
27
28
|
filter: filters,
|
|
28
29
|
fields: "id,type,displayName,title,displayDescription,created,lastUpdated,user,access,href",
|
|
@@ -40,16 +41,17 @@ const getQuery = type => ({
|
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
|
|
43
|
-
export const OpenFileDialog =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
export const OpenFileDialog = _ref2 => {
|
|
45
|
+
let {
|
|
46
|
+
type,
|
|
47
|
+
open,
|
|
48
|
+
filterVisTypes,
|
|
49
|
+
defaultFilterVisType,
|
|
50
|
+
onClose,
|
|
51
|
+
onFileSelect,
|
|
52
|
+
onNew,
|
|
53
|
+
currentUser
|
|
54
|
+
} = _ref2;
|
|
53
55
|
const filesQuery = useMemo(() => getQuery(type), []);
|
|
54
56
|
const defaultFilters = {
|
|
55
57
|
searchTerm: '',
|
|
@@ -217,23 +219,29 @@ export const OpenFileDialog = ({
|
|
|
217
219
|
className: "jsx-".concat(styles.__hash) + " " + "data-table-wrapper"
|
|
218
220
|
}, /*#__PURE__*/React.createElement(DataTable, {
|
|
219
221
|
layout: "fixed"
|
|
220
|
-
}, /*#__PURE__*/React.createElement(DataTableHead, null, /*#__PURE__*/React.createElement(DataTableRow, null, data !== null && data !== void 0 && data.files[AOTypeMap[type].apiEndpoint].length ? headers.map(
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
name,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
222
|
+
}, /*#__PURE__*/React.createElement(DataTableHead, null, /*#__PURE__*/React.createElement(DataTableRow, null, data !== null && data !== void 0 && data.files[AOTypeMap[type].apiEndpoint].length ? headers.map(_ref3 => {
|
|
223
|
+
let {
|
|
224
|
+
field,
|
|
225
|
+
label,
|
|
226
|
+
width
|
|
227
|
+
} = _ref3;
|
|
228
|
+
return /*#__PURE__*/React.createElement(DataTableColumnHeader, {
|
|
229
|
+
width: width,
|
|
230
|
+
key: field,
|
|
231
|
+
name: field,
|
|
232
|
+
onSortIconClick: _ref4 => {
|
|
233
|
+
let {
|
|
234
|
+
name,
|
|
235
|
+
direction
|
|
236
|
+
} = _ref4;
|
|
237
|
+
return setSorting({
|
|
238
|
+
sortField: name,
|
|
239
|
+
sortDirection: direction
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
sortDirection: getSortDirection(field)
|
|
243
|
+
}, label);
|
|
244
|
+
}) : /*#__PURE__*/React.createElement(DataTableColumnHeader, null))), /*#__PURE__*/React.createElement(DataTableBody, {
|
|
237
245
|
className: "data-table-body"
|
|
238
246
|
}, loading && /*#__PURE__*/React.createElement(DataTableRow, null, /*#__PURE__*/React.createElement(DataTableCell, {
|
|
239
247
|
large: true
|
|
@@ -2,28 +2,34 @@ import i18n from '@dhis2/d2-i18n';
|
|
|
2
2
|
import { Pagination } from '@dhis2/ui';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
export const PaginationControls =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
5
|
+
export const PaginationControls = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
page,
|
|
8
|
+
pager,
|
|
9
|
+
onPageChange
|
|
10
|
+
} = _ref;
|
|
11
|
+
return /*#__PURE__*/React.createElement(Pagination, {
|
|
12
|
+
page: page,
|
|
13
|
+
pageCount: pager.pageCount,
|
|
14
|
+
pageSize: pager.pageSize,
|
|
15
|
+
total: pager.total,
|
|
16
|
+
onPageChange: onPageChange,
|
|
17
|
+
onPageSizeChange: Function.prototype,
|
|
18
|
+
hidePageSizeSelect: true,
|
|
19
|
+
pageSummaryText: _ref2 => {
|
|
20
|
+
let {
|
|
21
|
+
firstItem: firstItemIndex,
|
|
22
|
+
lastItem: lastItemIndex,
|
|
23
|
+
total: totalNumberOfItems
|
|
24
|
+
} = _ref2;
|
|
25
|
+
return i18n.t('{{firstItemIndex}}-{{lastItemIndex}} of {{totalNumberOfItems}}', {
|
|
26
|
+
firstItemIndex,
|
|
27
|
+
lastItemIndex,
|
|
28
|
+
totalNumberOfItems
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
27
33
|
PaginationControls.propTypes = {
|
|
28
34
|
page: PropTypes.number,
|
|
29
35
|
pager: PropTypes.object,
|
|
@@ -5,34 +5,43 @@ import React from 'react';
|
|
|
5
5
|
import { getDisplayNameByVisType, visTypeIcons } from '../../modules/visTypes.js';
|
|
6
6
|
import { VisTypeIcon } from '../VisTypeIcon.js';
|
|
7
7
|
import { CustomSelectOption } from './CustomSelectOption.js';
|
|
8
|
-
export const VisTypeFilter =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
selected
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
export const VisTypeFilter = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
visTypes,
|
|
11
|
+
selected,
|
|
12
|
+
onChange
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement(SingleSelect, {
|
|
15
|
+
selected: selected,
|
|
16
|
+
onChange: _ref2 => {
|
|
17
|
+
let {
|
|
18
|
+
selected
|
|
19
|
+
} = _ref2;
|
|
20
|
+
return onChange(selected);
|
|
21
|
+
},
|
|
22
|
+
prefix: i18n.t('Type'),
|
|
23
|
+
dense: true,
|
|
24
|
+
maxHeight: "400px"
|
|
25
|
+
}, visTypes === null || visTypes === void 0 ? void 0 : visTypes.map(_ref3 => {
|
|
26
|
+
let {
|
|
27
|
+
type,
|
|
28
|
+
disabled,
|
|
29
|
+
insertDivider
|
|
30
|
+
} = _ref3;
|
|
31
|
+
return /*#__PURE__*/React.createElement(CustomSelectOption, {
|
|
32
|
+
key: type,
|
|
33
|
+
disabled: disabled,
|
|
34
|
+
label: getDisplayNameByVisType(type),
|
|
35
|
+
insertDivider: insertDivider,
|
|
36
|
+
value: type,
|
|
37
|
+
icon: visTypeIcons[type] ? /*#__PURE__*/React.createElement(VisTypeIcon, {
|
|
38
|
+
type: type,
|
|
39
|
+
useSmall: true,
|
|
40
|
+
color: colors.grey600
|
|
41
|
+
}) : undefined
|
|
42
|
+
});
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
36
45
|
VisTypeFilter.propTypes = {
|
|
37
46
|
selected: PropTypes.string,
|
|
38
47
|
visTypes: PropTypes.arrayOf(PropTypes.shape({
|