@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
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "canDimensionBeAddedToAxis", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _rulesUtils.canDimensionBeAddedToAxisByVisType;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "getAllLockedDimensionIds", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return _rulesHelper.
|
|
15
|
+
return _rulesHelper.getAllLockedDimIdsByVisType;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
18
|
+
Object.defineProperty(exports, "getAvailableAxes", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return _rulesHelper.
|
|
21
|
+
return _rulesHelper.getAvailableAxesByVisType;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "getAxisMaxNumberOfDimensions", {
|
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "getAxisMaxNumberOfDimensions", {
|
|
|
27
27
|
return _rulesHelper.getAxisMaxNumberOfDimsByVisType;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "getAxisMaxNumberOfItems", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _rulesHelper.getAxisMaxNumberOfItemsByVisType;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
Object.defineProperty(exports, "getAxisMinNumberOfDimensions", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function () {
|
|
@@ -39,22 +45,22 @@ Object.defineProperty(exports, "getAxisPerLockedDimension", {
|
|
|
39
45
|
return _rulesHelper.getAxisPerLockedDimByVisType;
|
|
40
46
|
}
|
|
41
47
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
48
|
+
Object.defineProperty(exports, "getDisallowedDimensions", {
|
|
43
49
|
enumerable: true,
|
|
44
50
|
get: function () {
|
|
45
|
-
return _rulesHelper.
|
|
51
|
+
return _rulesHelper.getDisallowedDimsByVisType;
|
|
46
52
|
}
|
|
47
53
|
});
|
|
48
|
-
Object.defineProperty(exports, "
|
|
54
|
+
Object.defineProperty(exports, "getTransferableDimension", {
|
|
49
55
|
enumerable: true,
|
|
50
56
|
get: function () {
|
|
51
|
-
return _rulesUtils.
|
|
57
|
+
return _rulesUtils.getTransferableDimensionPerAxisByVisType;
|
|
52
58
|
}
|
|
53
59
|
});
|
|
54
|
-
Object.defineProperty(exports, "
|
|
60
|
+
Object.defineProperty(exports, "hasAxisTooManyItems", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function () {
|
|
57
|
-
return _rulesUtils.
|
|
63
|
+
return _rulesUtils.hasAxisTooManyItemsByVisType;
|
|
58
64
|
}
|
|
59
65
|
});
|
|
60
66
|
Object.defineProperty(exports, "isAxisFull", {
|
|
@@ -63,16 +69,10 @@ Object.defineProperty(exports, "isAxisFull", {
|
|
|
63
69
|
return _rulesUtils.isAxisFullByVisType;
|
|
64
70
|
}
|
|
65
71
|
});
|
|
66
|
-
Object.defineProperty(exports, "
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _rulesUtils.canDimensionBeAddedToAxisByVisType;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "getTransferableDimension", {
|
|
72
|
+
Object.defineProperty(exports, "isDimensionLocked", {
|
|
73
73
|
enumerable: true,
|
|
74
74
|
get: function () {
|
|
75
|
-
return _rulesUtils.
|
|
75
|
+
return _rulesUtils.isDimensionLockedByVisType;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.testResourceRules = exports.testResourceRequiredProps = exports.testResourceAllRuleProps = exports.getMinNumberOfDimsPerAxisByVisType = exports.getMaxNumberOfItemsPerAxisByVisType = exports.getMaxNumberOfDimsPerAxisByVisType = exports.getLockedDimsByVisType = exports.getDisallowedDimsByVisType = exports.getAvailableAxesByVisType = void 0;
|
|
7
7
|
|
|
8
8
|
var _axis = require("../layout/axis.js");
|
|
9
9
|
|
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getAllLockedDimIdsByVisType = void 0;
|
|
6
7
|
Object.defineProperty(exports, "getAvailableAxesByVisType", {
|
|
7
8
|
enumerable: true,
|
|
8
9
|
get: function () {
|
|
9
10
|
return _rules.getAvailableAxesByVisType;
|
|
10
11
|
}
|
|
11
12
|
});
|
|
13
|
+
exports.getAxisPerLockedDimByVisType = exports.getAxisMinNumberOfDimsByVisType = exports.getAxisMaxNumberOfItemsByVisType = exports.getAxisMaxNumberOfDimsByVisType = void 0;
|
|
12
14
|
Object.defineProperty(exports, "getDisallowedDimsByVisType", {
|
|
13
15
|
enumerable: true,
|
|
14
16
|
get: function () {
|
|
15
17
|
return _rules.getDisallowedDimsByVisType;
|
|
16
18
|
}
|
|
17
19
|
});
|
|
18
|
-
exports.getAllLockedDimIdsByVisType = exports.getAxisPerLockedDimByVisType = exports.getAxisMinNumberOfDimsByVisType = exports.getAxisMaxNumberOfDimsByVisType = exports.getAxisMaxNumberOfItemsByVisType = void 0;
|
|
19
20
|
|
|
20
21
|
var _rules = require("./rules.js");
|
|
21
22
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.isDimensionLockedByVisType = exports.isAxisFullByVisType = exports.hasAxisTooManyItemsByVisType = exports.getTransferableDimensionPerAxisByVisType = exports.canDimensionBeAddedToAxisByVisType = void 0;
|
|
7
7
|
|
|
8
8
|
var _rules = require("./rules.js");
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getLegendByValueFromLegendSet = exports.getColorByValueFromLegendSet = exports.LEGEND_DISPLAY_STYLE_TEXT = exports.LEGEND_DISPLAY_STYLE_FILL = exports.LEGEND_DISPLAY_STRATEGY_FIXED = exports.LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM = void 0;
|
|
7
7
|
const LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM = 'BY_DATA_ITEM';
|
|
8
8
|
exports.LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM = LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM;
|
|
9
9
|
const LEGEND_DISPLAY_STRATEGY_FIXED = 'FIXED';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getOutlierHelper = exports.defaultConfig = exports.
|
|
6
|
+
exports.getOutlierHelper = exports.defaultConfig = exports.PROP_THRESHOLD_FACTOR = exports.PROP_OUTLIER_METHOD = exports.PROP_NORMALIZATION_METHOD = exports.PROP_EXTREME_LINES_VALUE = exports.PROP_EXTREME_LINES = exports.PROP_ENABLED = exports.DEFAULT_THRESHOLD_FACTOR = exports.DEFAULT_OUTLIER_METHOD = exports.DEFAULT_NORMALIZATION_METHOD = exports.DEFAULT_EXTREME_LINES_VALUE = exports.DEFAULT_ENABLED = void 0;
|
|
7
7
|
|
|
8
8
|
var _isNumber = _interopRequireDefault(require("d2-utilizr/lib/isNumber"));
|
|
9
9
|
|
|
@@ -89,7 +89,9 @@ const getMinMaxValue = (outlierHelper, isVertical, isMax) => {
|
|
|
89
89
|
return [...outlierHelper.thresholds.map(t => (0, _xyStats.getXYStats)([t.line[0], t.line[t.line.length - 1]])[prop]), extremeFactor].filter(_isNumeric.default).sort(isMax ? (a, b) => b - a : (a, b) => a - b)[0];
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
const getOutlierHelper = (data
|
|
92
|
+
const getOutlierHelper = function (data) {
|
|
93
|
+
let userConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
94
|
+
|
|
93
95
|
if (data.length < 3) {
|
|
94
96
|
return null;
|
|
95
97
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getQuartileValue = exports.getQuartilePosition = exports.getIQRHelper = exports.Q3 = exports.Q2 = exports.Q1 = exports.IQR = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = _interopRequireDefault(require("../../locales/index.js"));
|
|
9
9
|
|
|
@@ -38,7 +38,9 @@ const getQuartilePosition = (data, quartile) => {
|
|
|
38
38
|
|
|
39
39
|
exports.getQuartilePosition = getQuartilePosition;
|
|
40
40
|
|
|
41
|
-
const getQuartileValue = (data
|
|
41
|
+
const getQuartileValue = function (data) {
|
|
42
|
+
let quartile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Q1;
|
|
43
|
+
|
|
42
44
|
if (data.length < 3) {
|
|
43
45
|
return;
|
|
44
46
|
}
|
|
@@ -57,9 +59,10 @@ const getQuartileValue = (data, quartile = Q1) => {
|
|
|
57
59
|
|
|
58
60
|
exports.getQuartileValue = getQuartileValue;
|
|
59
61
|
|
|
60
|
-
const getIQRHelper = (normalizationHelper, config, {
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
const getIQRHelper = (normalizationHelper, config, _ref) => {
|
|
63
|
+
let {
|
|
64
|
+
xyStats
|
|
65
|
+
} = _ref;
|
|
63
66
|
const sortedNormalized = normalizationHelper.normalized.slice().sort((a, b) => a - b);
|
|
64
67
|
const q1 = getQuartileValue(sortedNormalized, Q1);
|
|
65
68
|
const q3 = getQuartileValue(sortedNormalized, Q3);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getModZScoreThresholds = exports.getModZScoreMAD0Thresholds = exports.getModZScoreMAD0 = exports.getModZScoreHelper = exports.getModZScore = exports.getMedianAbsoluteDeviation = exports.getMedian = exports.getMeanAbsoluteDeviation = exports.getMean = exports.getDataWithZScore = exports.MODIFIED_Z_SCORE = void 0;
|
|
7
7
|
|
|
8
8
|
var _isNumber = _interopRequireDefault(require("d2-utilizr/lib/isNumber"));
|
|
9
9
|
|
|
@@ -30,11 +30,17 @@ const getMedian = values => {
|
|
|
30
30
|
|
|
31
31
|
exports.getMedian = getMedian;
|
|
32
32
|
|
|
33
|
-
const getMedianAbsoluteDeviation =
|
|
33
|
+
const getMedianAbsoluteDeviation = function (values) {
|
|
34
|
+
let median = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMedian(values);
|
|
35
|
+
return getMedian(values.map(value => Math.abs(value - median)).sort((a, b) => a - b));
|
|
36
|
+
};
|
|
34
37
|
|
|
35
38
|
exports.getMedianAbsoluteDeviation = getMedianAbsoluteDeviation;
|
|
36
39
|
|
|
37
|
-
const getMeanAbsoluteDeviation =
|
|
40
|
+
const getMeanAbsoluteDeviation = function (values) {
|
|
41
|
+
let mean = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getMean(values);
|
|
42
|
+
return getMean(values.map(value => Math.abs(value - mean)));
|
|
43
|
+
}; // Modified z-scores
|
|
38
44
|
|
|
39
45
|
|
|
40
46
|
exports.getMeanAbsoluteDeviation = getMeanAbsoluteDeviation;
|
|
@@ -56,7 +62,8 @@ const getModZScoreMAD0Thresholds = (thresholdFactor, meanAD, median) => [median
|
|
|
56
62
|
|
|
57
63
|
exports.getModZScoreMAD0Thresholds = getModZScoreMAD0Thresholds;
|
|
58
64
|
|
|
59
|
-
const getDataWithZScore = (dataWithNormalization
|
|
65
|
+
const getDataWithZScore = function (dataWithNormalization) {
|
|
66
|
+
let cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
60
67
|
const normalizedData = cache.normalizedData || dataWithNormalization.map(obj => obj.normalized);
|
|
61
68
|
const median = (0, _isNumber.default)(cache.median) ? cache.median : getMedian(normalizedData);
|
|
62
69
|
const medianAD = (0, _isNumber.default)(cache.medianAD) ? cache.medianAD : getMedianAbsoluteDeviation();
|
|
@@ -78,9 +85,10 @@ const getDataWithZScore = (dataWithNormalization, cache = {}) => {
|
|
|
78
85
|
|
|
79
86
|
exports.getDataWithZScore = getDataWithZScore;
|
|
80
87
|
|
|
81
|
-
const getModZScoreHelper = (normalizationHelper, config, {
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
const getModZScoreHelper = (normalizationHelper, config, _ref) => {
|
|
89
|
+
let {
|
|
90
|
+
xyStats
|
|
91
|
+
} = _ref;
|
|
84
92
|
const sortedNormalized = normalizationHelper.normalized.slice().sort((a, b) => a - b);
|
|
85
93
|
const median = getMedian(sortedNormalized);
|
|
86
94
|
const medianAD = getMedianAbsoluteDeviation(sortedNormalized, median);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getZScoreHelper = exports.
|
|
6
|
+
exports.getZScoreHelper = exports.getStdDev = exports.getMean = exports.STANDARD_Z_SCORE = void 0;
|
|
7
7
|
|
|
8
8
|
var _mathjs = require("mathjs");
|
|
9
9
|
|
|
@@ -24,9 +24,10 @@ const getMean = data => (0, _mathjs.mean)(data);
|
|
|
24
24
|
|
|
25
25
|
exports.getMean = getMean;
|
|
26
26
|
|
|
27
|
-
const getZScoreHelper = (normalizationHelper, config, {
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
const getZScoreHelper = (normalizationHelper, config, _ref) => {
|
|
28
|
+
let {
|
|
29
|
+
xyStats
|
|
30
|
+
} = _ref;
|
|
30
31
|
const sortedNormalized = normalizationHelper.normalized.slice().sort((a, b) => a - b);
|
|
31
32
|
const stdDev = getStdDev(sortedNormalized);
|
|
32
33
|
const zScoreThreshold = stdDev * config[_index2.PROP_THRESHOLD_FACTOR];
|
|
@@ -23,13 +23,16 @@ class AdaptiveClippingController {
|
|
|
23
23
|
this.reset();
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
addSize({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
addSize(_ref, _ref2) {
|
|
27
|
+
let {
|
|
28
|
+
row,
|
|
29
|
+
column
|
|
30
|
+
} = _ref;
|
|
31
|
+
let {
|
|
32
|
+
width,
|
|
33
|
+
height
|
|
34
|
+
} = _ref2;
|
|
35
|
+
|
|
33
36
|
if (column >= 0) {
|
|
34
37
|
const columnSize = this.columns.sizes[column] || {
|
|
35
38
|
pre: 0,
|
|
@@ -55,17 +58,19 @@ class AdaptiveClippingController {
|
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
add({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
add(_ref3, renderedValue) {
|
|
62
|
+
let {
|
|
63
|
+
row,
|
|
64
|
+
column
|
|
65
|
+
} = _ref3;
|
|
62
66
|
this.addSize({
|
|
63
67
|
row,
|
|
64
68
|
column
|
|
65
69
|
}, this.measureText(renderedValue));
|
|
66
70
|
}
|
|
67
71
|
|
|
68
|
-
measureText(renderedValue
|
|
72
|
+
measureText(renderedValue) {
|
|
73
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
69
74
|
return (0, _measureText.measureTextWithWrapping)(renderedValue, {
|
|
70
75
|
fontSize: this.engine.fontSize,
|
|
71
76
|
...options
|
|
@@ -131,10 +131,11 @@ const buildDimensionLookup = (visualization, metadata, headers) => {
|
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
const lookup = (dataRow, dimensionLookup, {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
const lookup = (dataRow, dimensionLookup, _ref) => {
|
|
135
|
+
let {
|
|
136
|
+
doColumnSubtotals,
|
|
137
|
+
doRowSubtotals
|
|
138
|
+
} = _ref;
|
|
138
139
|
let row = 0;
|
|
139
140
|
|
|
140
141
|
for (const headerIndex of dimensionLookup.rowHeaders) {
|
|
@@ -175,14 +176,16 @@ const lookup = (dataRow, dimensionLookup, {
|
|
|
175
176
|
};
|
|
176
177
|
};
|
|
177
178
|
|
|
178
|
-
const applyTotalAggregationType = ({
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
179
|
+
const applyTotalAggregationType = (_ref2, overrideTotalAggregationType) => {
|
|
180
|
+
let {
|
|
181
|
+
totalAggregationType,
|
|
182
|
+
value,
|
|
183
|
+
numerator,
|
|
184
|
+
denominator,
|
|
185
|
+
multiplier,
|
|
186
|
+
divisor
|
|
187
|
+
} = _ref2;
|
|
188
|
+
|
|
186
189
|
switch (overrideTotalAggregationType || totalAggregationType) {
|
|
187
190
|
case _pivotTableConstants.AGGREGATE_TYPE_NA:
|
|
188
191
|
return 'N/A';
|
|
@@ -253,12 +256,13 @@ class PivotTableEngine {
|
|
|
253
256
|
this.buildMatrix();
|
|
254
257
|
}
|
|
255
258
|
|
|
256
|
-
getRaw({
|
|
257
|
-
row,
|
|
258
|
-
column
|
|
259
|
-
}) {
|
|
259
|
+
getRaw(_ref3) {
|
|
260
260
|
var _headers$find, _headers$find2;
|
|
261
261
|
|
|
262
|
+
let {
|
|
263
|
+
row,
|
|
264
|
+
column
|
|
265
|
+
} = _ref3;
|
|
262
266
|
const cellType = this.getRawCellType({
|
|
263
267
|
row,
|
|
264
268
|
column
|
|
@@ -315,10 +319,11 @@ class PivotTableEngine {
|
|
|
315
319
|
};
|
|
316
320
|
}
|
|
317
321
|
|
|
318
|
-
get({
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
+
get(_ref4) {
|
|
323
|
+
let {
|
|
324
|
+
row,
|
|
325
|
+
column
|
|
326
|
+
} = _ref4;
|
|
322
327
|
const mappedRow = this.rowMap[row],
|
|
323
328
|
mappedColumn = this.columnMap[column];
|
|
324
329
|
|
|
@@ -332,10 +337,11 @@ class PivotTableEngine {
|
|
|
332
337
|
});
|
|
333
338
|
}
|
|
334
339
|
|
|
335
|
-
getRawCellType({
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
340
|
+
getRawCellType(_ref5) {
|
|
341
|
+
let {
|
|
342
|
+
row,
|
|
343
|
+
column
|
|
344
|
+
} = _ref5;
|
|
339
345
|
const isRowTotal = this.doRowTotals && column === this.dataWidth - 1;
|
|
340
346
|
const isColumnTotal = this.doColumnTotals && row === this.dataHeight - 1;
|
|
341
347
|
|
|
@@ -353,10 +359,11 @@ class PivotTableEngine {
|
|
|
353
359
|
return _pivotTableConstants.CELL_TYPE_VALUE;
|
|
354
360
|
}
|
|
355
361
|
|
|
356
|
-
getCellType({
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
362
|
+
getCellType(_ref6) {
|
|
363
|
+
let {
|
|
364
|
+
row,
|
|
365
|
+
column
|
|
366
|
+
} = _ref6;
|
|
360
367
|
row = this.rowMap[row];
|
|
361
368
|
column = this.columnMap[column];
|
|
362
369
|
return this.getRawCellType({
|
|
@@ -394,20 +401,23 @@ class PivotTableEngine {
|
|
|
394
401
|
}
|
|
395
402
|
}
|
|
396
403
|
|
|
397
|
-
getCellDxDimension({
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
404
|
+
getCellDxDimension(_ref7) {
|
|
405
|
+
let {
|
|
406
|
+
row,
|
|
407
|
+
column
|
|
408
|
+
} = _ref7;
|
|
401
409
|
return this.getRawCellDxDimension({
|
|
402
410
|
row: this.rowMap[row],
|
|
403
411
|
column: this.columnMap[column]
|
|
404
412
|
});
|
|
405
413
|
}
|
|
406
414
|
|
|
407
|
-
getRawCellDxDimension({
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
415
|
+
getRawCellDxDimension(_ref8) {
|
|
416
|
+
let {
|
|
417
|
+
row,
|
|
418
|
+
column
|
|
419
|
+
} = _ref8;
|
|
420
|
+
|
|
411
421
|
if (!this.data[row]) {
|
|
412
422
|
return undefined;
|
|
413
423
|
}
|
|
@@ -519,12 +529,13 @@ class PivotTableEngine {
|
|
|
519
529
|
return this.getRawRowHeader(this.rowMap[row]);
|
|
520
530
|
}
|
|
521
531
|
|
|
522
|
-
getDependantTotalCells({
|
|
523
|
-
row,
|
|
524
|
-
column
|
|
525
|
-
}) {
|
|
532
|
+
getDependantTotalCells(_ref9) {
|
|
526
533
|
var _this$dimensionLookup, _this$dimensionLookup2;
|
|
527
534
|
|
|
535
|
+
let {
|
|
536
|
+
row,
|
|
537
|
+
column
|
|
538
|
+
} = _ref9;
|
|
528
539
|
const rowSubtotalSize = ((_this$dimensionLookup = this.dimensionLookup.columns[0]) === null || _this$dimensionLookup === void 0 ? void 0 : _this$dimensionLookup.size) + 1;
|
|
529
540
|
const rowSubtotal = rowSubtotalSize && this.doRowSubtotals && {
|
|
530
541
|
row,
|
|
@@ -740,10 +751,12 @@ class PivotTableEngine {
|
|
|
740
751
|
}
|
|
741
752
|
}
|
|
742
753
|
|
|
743
|
-
finalizeTotal({
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
754
|
+
finalizeTotal(_ref10) {
|
|
755
|
+
let {
|
|
756
|
+
row,
|
|
757
|
+
column
|
|
758
|
+
} = _ref10;
|
|
759
|
+
|
|
747
760
|
if (!this.data[row]) {
|
|
748
761
|
return;
|
|
749
762
|
}
|
|
@@ -9,13 +9,14 @@ var _times = _interopRequireDefault(require("lodash/times"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
-
const clipAxis =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const clipAxis = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
position,
|
|
15
|
+
size,
|
|
16
|
+
step,
|
|
17
|
+
totalCount,
|
|
18
|
+
headerCount
|
|
19
|
+
} = _ref;
|
|
19
20
|
// position: scroll Y position
|
|
20
21
|
// size: height of table container
|
|
21
22
|
// step: height of cell in px
|
|
@@ -5,15 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.clipPartitionedAxis = void 0;
|
|
7
7
|
|
|
8
|
-
const clipPartitionedAxis =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const clipPartitionedAxis = _ref => {
|
|
9
|
+
let {
|
|
10
|
+
partitionSize,
|
|
11
|
+
partitions,
|
|
12
|
+
axisMap,
|
|
13
|
+
widthMap,
|
|
14
|
+
viewportWidth,
|
|
15
|
+
viewportPosition,
|
|
16
|
+
totalWidth
|
|
17
|
+
} = _ref;
|
|
17
18
|
const partition = Math.floor(viewportPosition / partitionSize);
|
|
18
19
|
|
|
19
20
|
if (partitions[partition] === undefined) {
|
|
@@ -15,14 +15,15 @@ const headerStacksAreEqual = (a, b, limit) => {
|
|
|
15
15
|
return true;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
const getHeaderForDisplay =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const getHeaderForDisplay = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
start,
|
|
21
|
+
count,
|
|
22
|
+
index,
|
|
23
|
+
dimensionLevel,
|
|
24
|
+
getHeader,
|
|
25
|
+
showHierarchy
|
|
26
|
+
} = _ref;
|
|
26
27
|
const header = getHeader(index);
|
|
27
28
|
const showHeader = index === start || !headerStacksAreEqual(header, getHeader(index - 1), dimensionLevel);
|
|
28
29
|
|
|
@@ -19,18 +19,21 @@ const getContext = fontSize => {
|
|
|
19
19
|
return ctx;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const measureText = (text
|
|
22
|
+
const measureText = function (text) {
|
|
23
|
+
let fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 11;
|
|
23
24
|
const ctx = getContext(fontSize);
|
|
24
25
|
const textMetrics = ctx.measureText(text);
|
|
25
26
|
return textMetrics.width;
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
const measureTextWithWrapping = (text, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
const measureTextWithWrapping = (text, _ref) => {
|
|
30
|
+
let {
|
|
31
|
+
fontSize = 11,
|
|
32
|
+
maxWidth = _pivotTableConstants.CLIPPED_CELL_MAX_SIZE,
|
|
33
|
+
justifyBuffer = _pivotTableConstants.WRAPPED_TEXT_JUSTIFY_BUFFER,
|
|
34
|
+
lineHeight = _pivotTableConstants.WRAPPED_TEXT_LINE_HEIGHT
|
|
35
|
+
} = _ref;
|
|
36
|
+
|
|
34
37
|
if (!text) {
|
|
35
38
|
return {
|
|
36
39
|
width: 0,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.WRAPPED_TEXT_LINE_HEIGHT = exports.WRAPPED_TEXT_JUSTIFY_BUFFER = exports.SORT_ORDER_DESCENDING = exports.SORT_ORDER_ASCENDING = exports.NUMBER_TYPE_VALUE = exports.NUMBER_TYPE_ROW_PERCENTAGE = exports.NUMBER_TYPE_COLUMN_PERCENTAGE = exports.FONT_SIZE_SMALL = exports.FONT_SIZE_OPTION_SMALL = exports.FONT_SIZE_OPTION_NORMAL = exports.FONT_SIZE_OPTION_LARGE = exports.FONT_SIZE_NORMAL = exports.FONT_SIZE_LARGE = exports.DISPLAY_DENSITY_PADDING_NORMAL = exports.DISPLAY_DENSITY_PADDING_COMPACT = exports.DISPLAY_DENSITY_PADDING_COMFORTABLE = exports.DISPLAY_DENSITY_OPTION_NORMAL = exports.DISPLAY_DENSITY_OPTION_COMPACT = exports.DISPLAY_DENSITY_OPTION_COMFORTABLE = exports.CLIPPED_CELL_MIN_SIZE = exports.CLIPPED_CELL_MAX_SIZE = exports.CLIPPED_AXIS_PARTITION_SIZE_PX = exports.CELL_TYPE_VALUE = exports.CELL_TYPE_TOTAL = exports.CELL_TYPE_SUBTOTAL = exports.BORDER_COLOR = exports.AGGREGATE_TYPE_SUM = exports.AGGREGATE_TYPE_NA = exports.AGGREGATE_TYPE_AVERAGE = void 0;
|
|
7
7
|
const SORT_ORDER_ASCENDING = 1;
|
|
8
8
|
exports.SORT_ORDER_ASCENDING = SORT_ORDER_ASCENDING;
|
|
9
9
|
const SORT_ORDER_DESCENDING = -1;
|
|
@@ -16,7 +16,8 @@ const initialState = {
|
|
|
16
16
|
height: 0
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const useParentSize = (elementRef, renderCounter
|
|
19
|
+
const useParentSize = function (elementRef, renderCounter) {
|
|
20
|
+
let initialSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : initialState;
|
|
20
21
|
const [size, setSize] = (0, _react.useState)({
|
|
21
22
|
width: initialSize.width || 0,
|
|
22
23
|
height: initialSize.height || 0
|
|
@@ -11,7 +11,8 @@ var _react = require("react");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
const useScrollPosition = (containerRef
|
|
14
|
+
const useScrollPosition = function (containerRef) {
|
|
15
|
+
let debounceWait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10;
|
|
15
16
|
const [scrollPosition, setScrollPosition] = (0, _react.useState)({
|
|
16
17
|
x: 0,
|
|
17
18
|
y: 0
|
|
@@ -13,12 +13,13 @@ var _pivotTableConstants = require("./pivotTableConstants.js");
|
|
|
13
13
|
|
|
14
14
|
var _useScrollPosition = require("./useScrollPosition.js");
|
|
15
15
|
|
|
16
|
-
const useTableClipping =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const useTableClipping = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
containerRef,
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
engine
|
|
22
|
+
} = _ref;
|
|
22
23
|
const scrollPosition = (0, _useScrollPosition.useScrollPosition)(containerRef);
|
|
23
24
|
const lineHeight = engine.fontSize + engine.cellPadding * 2 + 2;
|
|
24
25
|
const rows = (0, _react.useMemo)(() => {
|