@dhis2/analytics 23.8.5 → 23.8.6
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 +9 -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 +19 -12
- 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/en/translations.json +1 -1
- package/build/cjs/locales/nl/translations.json +30 -30
- 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 +17 -10
- 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/en/translations.json +1 -1
- package/build/es/locales/nl/translations.json +30 -30
- 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
|
@@ -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)(() => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getPredefinedDimensions = exports.getPredefinedDimensionProp = exports.getFixedDimensions = exports.getDynamicDimensions = exports.getDimensionById = exports.filterOutPredefinedDimensions = exports.DIMENSION_PROP_NO_ITEMS = exports.DIMENSION_ID_PERIOD = exports.DIMENSION_ID_ORGUNIT = exports.DIMENSION_ID_DATA = exports.DIMENSION_ID_ASSIGNED_CATEGORIES = void 0;
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
@@ -39,7 +39,7 @@ const getFixedDimensions = () => ({
|
|
|
39
39
|
},
|
|
40
40
|
[DIMENSION_ID_ORGUNIT]: {
|
|
41
41
|
id: DIMENSION_ID_ORGUNIT,
|
|
42
|
-
name: _index.default.t('Organisation
|
|
42
|
+
name: _index.default.t('Organisation unit'),
|
|
43
43
|
iconName: 'OrgUnitIcon',
|
|
44
44
|
icon: _ui.IconDimensionOrgUnit16
|
|
45
45
|
}
|
|
@@ -11,6 +11,9 @@ var _index = require("../ouIdHelper/index.js");
|
|
|
11
11
|
|
|
12
12
|
var _predefinedDimensions = require("../predefinedDimensions.js");
|
|
13
13
|
|
|
14
|
-
const hasRelativeItems =
|
|
14
|
+
const hasRelativeItems = function (dimension) {
|
|
15
|
+
let itemIds = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
16
|
+
return dimension === _predefinedDimensions.DIMENSION_ID_ASSIGNED_CATEGORIES || dimension === _predefinedDimensions.DIMENSION_ID_ORGUNIT && Array.isArray(itemIds) && itemIds.some(id => _index.ouIdHelper.hasLevelPrefix(id) || _index.ouIdHelper.hasGroupPrefix(id) || [_index.USER_ORG_UNIT, _index.USER_ORG_UNIT_CHILDREN, _index.USER_ORG_UNIT_GRANDCHILDREN].includes(id)) || dimension === _predefinedDimensions.DIMENSION_ID_PERIOD && Array.isArray(itemIds) && itemIds.some(id => (0, _relativePeriods.getRelativePeriodIds)().includes(id));
|
|
17
|
+
};
|
|
15
18
|
|
|
16
19
|
exports.hasRelativeItems = hasRelativeItems;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isNumericValueType = exports.
|
|
6
|
+
exports.isNumericValueType = exports.VALUE_TYPE_USERNAME = exports.VALUE_TYPE_URL = exports.VALUE_TYPE_UNIT_INTERVAL = exports.VALUE_TYPE_TRUE_ONLY = exports.VALUE_TYPE_TIME = exports.VALUE_TYPE_TEXT = exports.VALUE_TYPE_PHONE_NUMBER = exports.VALUE_TYPE_PERCENTAGE = exports.VALUE_TYPE_ORGANISATION_UNIT = exports.VALUE_TYPE_NUMBER = exports.VALUE_TYPE_LONG_TEXT = exports.VALUE_TYPE_LETTER = exports.VALUE_TYPE_INTEGER_ZERO_OR_POSITIVE = exports.VALUE_TYPE_INTEGER_POSITIVE = exports.VALUE_TYPE_INTEGER_NEGATIVE = exports.VALUE_TYPE_INTEGER = exports.VALUE_TYPE_EMAIL = exports.VALUE_TYPE_DATETIME = exports.VALUE_TYPE_DATE = exports.VALUE_TYPE_BOOLEAN = void 0;
|
|
7
7
|
|
|
8
8
|
/* These types match the types in the backend
|
|
9
9
|
https://github.com/dhis2/dhis2-core/blob/master/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/ValueType.java
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.visTypeIcons = exports.visTypeDisplayNames = exports.isYearOverYear = exports.isVerticalType = exports.isTwoCategoryChartType = exports.isStacked = exports.isSingleValue = exports.isMultiType = exports.isLegendSetType = exports.isDualAxisType = exports.isColumnBasedType = exports.getDisplayNameByVisType = exports.defaultVisType = exports.VIS_TYPE_YEAR_OVER_YEAR_LINE = exports.VIS_TYPE_YEAR_OVER_YEAR_COLUMN = exports.VIS_TYPE_STACKED_COLUMN = exports.VIS_TYPE_STACKED_BAR = exports.VIS_TYPE_STACKED_AREA = exports.VIS_TYPE_SINGLE_VALUE = exports.VIS_TYPE_SCATTER = exports.VIS_TYPE_RADAR = exports.VIS_TYPE_PIVOT_TABLE = exports.VIS_TYPE_PIE = exports.VIS_TYPE_LINE_LIST = exports.VIS_TYPE_LINE = exports.VIS_TYPE_GROUP_CHARTS = exports.VIS_TYPE_GROUP_ALL = exports.VIS_TYPE_GAUGE = exports.VIS_TYPE_COLUMN = exports.VIS_TYPE_BUBBLE = exports.VIS_TYPE_BAR = exports.VIS_TYPE_AREA = void 0;
|
|
7
7
|
|
|
8
8
|
var _ui = require("@dhis2/ui");
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = _default;
|
|
7
6
|
exports.INDICATOR_FACTOR_100 = void 0;
|
|
7
|
+
exports.default = _default;
|
|
8
8
|
|
|
9
9
|
var _index = _interopRequireDefault(require("./subtitle/index.js"));
|
|
10
10
|
|
|
@@ -17,11 +17,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
const INDICATOR_FACTOR_100 = 100;
|
|
18
18
|
exports.INDICATOR_FACTOR_100 = INDICATOR_FACTOR_100;
|
|
19
19
|
|
|
20
|
-
function _default({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
function _default(_ref) {
|
|
21
|
+
let {
|
|
22
|
+
store,
|
|
23
|
+
layout,
|
|
24
|
+
extraOptions
|
|
25
|
+
} = _ref;
|
|
25
26
|
const data = store.generateData({
|
|
26
27
|
type: layout.type,
|
|
27
28
|
seriesId: layout.columns && layout.columns.length ? layout.columns[0].dimension : null,
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = _default;
|
|
7
|
-
exports.linear = linear;
|
|
8
7
|
exports.isRegressionIneligible = void 0;
|
|
8
|
+
exports.linear = linear;
|
|
9
9
|
|
|
10
10
|
var _arrayContains = _interopRequireDefault(require("d2-utilizr/lib/arrayContains"));
|
|
11
11
|
|
|
@@ -233,7 +233,8 @@ function gaussianElimination(a, o) {
|
|
|
233
233
|
// correlation = N * Σ(XY) - Σ(X) * Σ (Y) / √ ( N * Σ(X^2) - Σ(X) ) * ( N * Σ(Y^2) - Σ(Y)^2 ) ) )
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
function linear(data
|
|
236
|
+
function linear(data) {
|
|
237
|
+
let decimalPlaces = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
237
238
|
const sum = [0, 0, 0, 0, 0],
|
|
238
239
|
results = [];
|
|
239
240
|
let N = data.length;
|
|
@@ -293,7 +294,10 @@ function linear(data, decimalPlaces = 2) {
|
|
|
293
294
|
} // Code extracted from https://github.com/Tom-Alexander/regression-js/
|
|
294
295
|
|
|
295
296
|
|
|
296
|
-
function polynomial(data
|
|
297
|
+
function polynomial(data) {
|
|
298
|
+
let order = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
299
|
+
let extrapolate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
300
|
+
let decimalPlaces = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 2;
|
|
297
301
|
const lhs = [],
|
|
298
302
|
rhs = [],
|
|
299
303
|
results = [],
|
|
@@ -391,7 +395,8 @@ function polynomial(data, order = 2, extrapolate = 0, decimalPlaces = 2) {
|
|
|
391
395
|
// - https://gist.github.com/avibryant/1151823
|
|
392
396
|
|
|
393
397
|
|
|
394
|
-
function loess(data
|
|
398
|
+
function loess(data) {
|
|
399
|
+
let bandwidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.25;
|
|
395
400
|
const xval = data.map(pair => {
|
|
396
401
|
return pair[0];
|
|
397
402
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getRegressionLine = exports.getMinValue = exports.getMaxValue = exports.getLabels = exports.getGridLineColor = void 0;
|
|
7
7
|
|
|
8
8
|
var _isNumeric = _interopRequireDefault(require("d2-utilizr/lib/isNumeric"));
|
|
9
9
|
|
|
@@ -101,9 +101,12 @@ const getMaxValue = (maxValue, dataValues, outlierLineMax) => {
|
|
|
101
101
|
|
|
102
102
|
exports.getMaxValue = getMaxValue;
|
|
103
103
|
|
|
104
|
-
const getRegressionLine = (
|
|
104
|
+
const getRegressionLine = function () {
|
|
105
105
|
var _regressionLine$title, _regressionLine$title2;
|
|
106
106
|
|
|
107
|
+
let regressionLine = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
108
|
+
let visType = arguments.length > 1 ? arguments[1] : undefined;
|
|
109
|
+
let isVertical = arguments.length > 2 ? arguments[2] : undefined;
|
|
107
110
|
const fontStyle = (0, _fontStyle.mergeFontStyleWithDefault)((_regressionLine$title = regressionLine.title) === null || _regressionLine$title === void 0 ? void 0 : _regressionLine$title.fontStyle, _fontStyle.FONT_STYLE_REGRESSION_LINE_LABEL);
|
|
108
111
|
const plotLineStyle = getPlotLineStyle(fontStyle);
|
|
109
112
|
const plotLineLabelStyle = getPlotLineLabelStyle(fontStyle);
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.getFullIdAxisMap = getFullIdAxisMap;
|
|
6
|
+
exports.CUSTOM_AXES_DIMENSION_ITEM = exports.CUSTOM_AXES_AXIS = void 0;
|
|
8
7
|
exports.getAxisIdsMap = getAxisIdsMap;
|
|
9
|
-
exports.
|
|
8
|
+
exports.getFullIdAxisMap = getFullIdAxisMap;
|
|
9
|
+
exports.getIdAxisMap = getIdAxisMap;
|
|
10
10
|
const CUSTOM_AXES_DIMENSION_ITEM = 'dimensionItem';
|
|
11
11
|
exports.CUSTOM_AXES_DIMENSION_ITEM = CUSTOM_AXES_DIMENSION_ITEM;
|
|
12
12
|
const CUSTOM_AXES_AXIS = 'axis'; // returns:
|
|
@@ -24,7 +24,9 @@ function getIdAxisMap(customAxes) {
|
|
|
24
24
|
}, {});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function getFullIdAxisMap(
|
|
27
|
+
function getFullIdAxisMap() {
|
|
28
|
+
let customAxes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
29
|
+
let series = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
28
30
|
const idAxisMap = getIdAxisMap(customAxes.filter(axisItem => series.find(seriesItem => seriesItem.id === axisItem.dimensionItem))); // adds first axis ids to seriesAxisMap
|
|
29
31
|
|
|
30
32
|
series.forEach(s => {
|
|
@@ -42,7 +44,9 @@ function getFullIdAxisMap(customAxes = [], series = []) {
|
|
|
42
44
|
|
|
43
45
|
function getAxisIdsMap(customAxes, series) {
|
|
44
46
|
const fullIdAxisMap = getFullIdAxisMap(customAxes, series);
|
|
45
|
-
return Object.entries(fullIdAxisMap).reduce((map,
|
|
47
|
+
return Object.entries(fullIdAxisMap).reduce((map, _ref) => {
|
|
48
|
+
let [id, axis] = _ref;
|
|
49
|
+
|
|
46
50
|
if (!(axis in map)) {
|
|
47
51
|
map[axis] = [];
|
|
48
52
|
}
|
|
@@ -28,9 +28,10 @@ function getEmptySeriesIndexes(series) {
|
|
|
28
28
|
let seriesValues;
|
|
29
29
|
series[0].data.forEach((value, index) => {
|
|
30
30
|
seriesValues = [];
|
|
31
|
-
series.forEach(
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
series.forEach(_ref => {
|
|
32
|
+
let {
|
|
33
|
+
data
|
|
34
|
+
} = _ref;
|
|
34
35
|
// handle undefined values due to empty (or shorter) serie data
|
|
35
36
|
// preserve 0 as valid value
|
|
36
37
|
seriesValues.push(data[index] === undefined ? null : data[index]);
|
|
@@ -47,9 +47,9 @@ var _index6 = _interopRequireDefault(require("./xAxis/index.js"));
|
|
|
47
47
|
|
|
48
48
|
var _index7 = _interopRequireDefault(require("./yAxis/index.js"));
|
|
49
49
|
|
|
50
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
50
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
51
|
|
|
52
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
52
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53
53
|
|
|
54
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
55
55
|
|
|
@@ -63,15 +63,17 @@ const getTransformedExtraOptions = extraOptions => ({ ...extraOptions,
|
|
|
63
63
|
multiAxisTheme: extraOptions.multiAxisTheme || _themes.defaultMultiAxisTheme1
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
function _default({
|
|
67
|
-
store,
|
|
68
|
-
layout,
|
|
69
|
-
el,
|
|
70
|
-
extraConfig,
|
|
71
|
-
extraOptions
|
|
72
|
-
}) {
|
|
66
|
+
function _default(_ref) {
|
|
73
67
|
var _layout$seriesKey, _layout$seriesKey2, _layout$seriesKey2$la, _layout$legend, _config$xAxis;
|
|
74
68
|
|
|
69
|
+
let {
|
|
70
|
+
store,
|
|
71
|
+
layout,
|
|
72
|
+
el,
|
|
73
|
+
extraConfig,
|
|
74
|
+
extraOptions
|
|
75
|
+
} = _ref;
|
|
76
|
+
|
|
75
77
|
const _layout = getTransformedLayout(layout);
|
|
76
78
|
|
|
77
79
|
const _extraOptions = getTransformedExtraOptions(extraOptions);
|