@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
|
@@ -23,30 +23,36 @@ var _relativePeriods = require("./utils/relativePeriods.js");
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
const RelativePeriodFilter =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}))), /*#__PURE__*/_react.default.createElement(
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
const RelativePeriodFilter = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
currentFilter,
|
|
29
|
+
onSelectFilter,
|
|
30
|
+
dataTest,
|
|
31
|
+
excludedPeriodTypes
|
|
32
|
+
} = _ref;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: "jsx-".concat(_PeriodFilterStyle.default.__hash) + " " + "leftSection"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.SingleSelectField, {
|
|
36
|
+
label: _index.default.t('Period type'),
|
|
37
|
+
onChange: _ref2 => {
|
|
38
|
+
let {
|
|
39
|
+
selected
|
|
40
|
+
} = _ref2;
|
|
41
|
+
return onSelectFilter(selected);
|
|
42
|
+
},
|
|
43
|
+
dense: true,
|
|
44
|
+
selected: currentFilter,
|
|
45
|
+
className: "filterElement",
|
|
46
|
+
dataTest: dataTest
|
|
47
|
+
}, (0, _index2.filterPeriodTypesById)((0, _relativePeriods.getRelativePeriodsOptions)(), excludedPeriodTypes).map(option => /*#__PURE__*/_react.default.createElement(_ui.SingleSelectOption, {
|
|
48
|
+
key: option.id,
|
|
49
|
+
value: option.id,
|
|
50
|
+
label: option.name,
|
|
51
|
+
dataTest: "".concat(dataTest, "-option-").concat(option.id)
|
|
52
|
+
}))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
53
|
+
id: _PeriodFilterStyle.default.__hash
|
|
54
|
+
}, _PeriodFilterStyle.default));
|
|
55
|
+
};
|
|
50
56
|
|
|
51
57
|
RelativePeriodFilter.propTypes = {
|
|
52
58
|
currentFilter: _propTypes.default.string.isRequired,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.parsePeriodCode = exports.getYearOffsetFromNow = exports.
|
|
6
|
+
exports.parsePeriodCode = exports.getYearOffsetFromNow = exports.getFixedPeriodsOptionsById = exports.getFixedPeriodsOptions = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = _interopRequireDefault(require("../../../locales/index.js"));
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.filterPeriodTypesById = exports.
|
|
6
|
+
exports.filterPeriodTypesById = exports.YEARLY = exports.WEEKLYWED = exports.WEEKLYTHU = exports.WEEKLYSUN = exports.WEEKLYSAT = exports.WEEKLY = exports.SIXMONTHLYAPR = exports.SIXMONTHLY = exports.QUARTERLY = exports.MONTHLY = exports.FYOCT = exports.FYNOV = exports.FYJUL = exports.FYAPR = exports.FINANCIAL = exports.DAILY = exports.BIWEEKLY = exports.BIMONTHLY = void 0;
|
|
7
7
|
const DAILY = 'DAILY';
|
|
8
8
|
exports.DAILY = DAILY;
|
|
9
9
|
const WEEKLY = 'WEEKLY';
|
|
@@ -41,6 +41,10 @@ exports.FYJUL = FYJUL;
|
|
|
41
41
|
const FYAPR = 'FYAPR';
|
|
42
42
|
exports.FYAPR = FYAPR;
|
|
43
43
|
|
|
44
|
-
const filterPeriodTypesById = (
|
|
44
|
+
const filterPeriodTypesById = function () {
|
|
45
|
+
let allPeriodTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
46
|
+
let excludedPeriodTypes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
47
|
+
return allPeriodTypes.filter(period => !excludedPeriodTypes.includes(period.id));
|
|
48
|
+
};
|
|
45
49
|
|
|
46
50
|
exports.filterPeriodTypesById = filterPeriodTypesById;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getRelativePeriodsOptionsById = exports.getRelativePeriodsOptions = exports.getRelativePeriodIds = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = _interopRequireDefault(require("../../../locales/index.js"));
|
|
9
9
|
|
|
@@ -25,19 +25,20 @@ var _PivotTableEngineContext = require("./PivotTableEngineContext.js");
|
|
|
25
25
|
|
|
26
26
|
var _PivotTableHead = require("./PivotTableHead.js");
|
|
27
27
|
|
|
28
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
28
|
+
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); }
|
|
29
29
|
|
|
30
|
-
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; }
|
|
30
|
+
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; }
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
34
|
-
const PivotTable =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const PivotTable = _ref => {
|
|
35
|
+
let {
|
|
36
|
+
visualization,
|
|
37
|
+
data,
|
|
38
|
+
legendSets,
|
|
39
|
+
renderCounter,
|
|
40
|
+
onToggleContextualMenu
|
|
41
|
+
} = _ref;
|
|
41
42
|
const containerRef = (0, _react.useRef)(undefined);
|
|
42
43
|
const {
|
|
43
44
|
width,
|
|
@@ -17,26 +17,35 @@ var _PivotTableRow = require("./PivotTableRow.js");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
const PivotTableBody =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
20
|
+
const PivotTableBody = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
clippingResult,
|
|
23
|
+
onToggleContextualMenu
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement(_PivotTableClippedAxis.PivotTableClippedAxis, {
|
|
26
|
+
axisClippingResult: clippingResult.rows,
|
|
27
|
+
EmptyComponent: _ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
size
|
|
30
|
+
} = _ref2;
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_PivotTableEmptyRow.PivotTableEmptyRow, {
|
|
32
|
+
height: size,
|
|
33
|
+
columns: clippingResult.columns.indices
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
ItemComponent: _ref3 => {
|
|
37
|
+
let {
|
|
38
|
+
index
|
|
39
|
+
} = _ref3;
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_PivotTableRow.PivotTableRow, {
|
|
41
|
+
key: index,
|
|
42
|
+
clippingResult: clippingResult,
|
|
43
|
+
rowIndex: index,
|
|
44
|
+
onToggleContextualMenu: onToggleContextualMenu
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
40
49
|
|
|
41
50
|
exports.PivotTableBody = PivotTableBody;
|
|
42
51
|
PivotTableBody.propTypes = {
|
|
@@ -21,14 +21,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
21
|
|
|
22
22
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
23
|
|
|
24
|
-
const PivotTableCell = /*#__PURE__*/_react.default.forwardRef(({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
const PivotTableCell = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
25
|
+
let {
|
|
26
|
+
classes,
|
|
27
|
+
isHeader,
|
|
28
|
+
children,
|
|
29
|
+
dataTest,
|
|
30
|
+
style = {},
|
|
31
|
+
...props
|
|
32
|
+
} = _ref;
|
|
32
33
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
33
34
|
style.width = style.minWidth = style.maxWidth = style.width;
|
|
34
35
|
style.height = style.minHeight = style.maxHeight = style.height || engine.fontSize + engine.cellPadding * 2 + 2;
|
|
@@ -11,20 +11,23 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
const PivotTableClippedAxis =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
const PivotTableClippedAxis = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
axisClippingResult,
|
|
17
|
+
EmptyComponent,
|
|
18
|
+
ItemComponent
|
|
19
|
+
} = _ref;
|
|
20
|
+
return [axisClippingResult.pre ? /*#__PURE__*/_react.default.createElement(EmptyComponent, {
|
|
21
|
+
key: "pre",
|
|
22
|
+
size: axisClippingResult.pre
|
|
23
|
+
}) : null, axisClippingResult.indices.map(index => /*#__PURE__*/_react.default.createElement(ItemComponent, {
|
|
24
|
+
key: index,
|
|
25
|
+
index: index
|
|
26
|
+
})), axisClippingResult.post ? /*#__PURE__*/_react.default.createElement(EmptyComponent, {
|
|
27
|
+
key: "post",
|
|
28
|
+
size: axisClippingResult.post
|
|
29
|
+
}) : null];
|
|
30
|
+
};
|
|
28
31
|
|
|
29
32
|
exports.PivotTableClippedAxis = PivotTableClippedAxis;
|
|
30
33
|
PivotTableClippedAxis.propTypes = {
|
|
@@ -23,15 +23,16 @@ var _PivotTableStyle = require("./styles/PivotTable.style.js");
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
const PivotTableColumnHeaderCell =
|
|
27
|
-
clippingResult,
|
|
28
|
-
index,
|
|
29
|
-
level,
|
|
30
|
-
onSortByColumn,
|
|
31
|
-
sortBy
|
|
32
|
-
}) => {
|
|
26
|
+
const PivotTableColumnHeaderCell = _ref => {
|
|
33
27
|
var _engine$adaptiveClipp;
|
|
34
28
|
|
|
29
|
+
let {
|
|
30
|
+
clippingResult,
|
|
31
|
+
index,
|
|
32
|
+
level,
|
|
33
|
+
onSortByColumn,
|
|
34
|
+
sortBy
|
|
35
|
+
} = _ref;
|
|
35
36
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
36
37
|
const width = (_engine$adaptiveClipp = engine.adaptiveClippingController.columns.sizes[engine.columnMap[index]]) === null || _engine$adaptiveClipp === void 0 ? void 0 : _engine$adaptiveClipp.size;
|
|
37
38
|
const height = engine.adaptiveClippingController.rows.headerSizes[level];
|
|
@@ -23,11 +23,12 @@ var _PivotTableEngineContext = require("./PivotTableEngineContext.js");
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
const PivotTableColumnHeaders =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const PivotTableColumnHeaders = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
clippingResult,
|
|
29
|
+
onSortByColumn,
|
|
30
|
+
sortBy
|
|
31
|
+
} = _ref;
|
|
31
32
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
32
33
|
const columns = (0, _times.default)(engine.columnDepth, x => x);
|
|
33
34
|
const rows = (0, _times.default)(engine.rowDepth, x => x);
|
|
@@ -39,23 +40,29 @@ const PivotTableColumnHeaders = ({
|
|
|
39
40
|
columnLevel: columnLevel
|
|
40
41
|
})), /*#__PURE__*/_react.default.createElement(_PivotTableClippedAxis.PivotTableClippedAxis, {
|
|
41
42
|
axisClippingResult: clippingResult.columns,
|
|
42
|
-
EmptyComponent:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
EmptyComponent: _ref2 => {
|
|
44
|
+
let {
|
|
45
|
+
size
|
|
46
|
+
} = _ref2;
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_PivotTableEmptyCell.PivotTableEmptyCell, {
|
|
48
|
+
classes: "column-header",
|
|
49
|
+
style: {
|
|
50
|
+
minWidth: size
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
ItemComponent: _ref3 => {
|
|
55
|
+
let {
|
|
56
|
+
index
|
|
57
|
+
} = _ref3;
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(_PivotTableColumnHeaderCell.PivotTableColumnHeaderCell, {
|
|
59
|
+
clippingResult: clippingResult,
|
|
60
|
+
index: index,
|
|
61
|
+
level: columnLevel,
|
|
62
|
+
onSortByColumn: onSortByColumn,
|
|
63
|
+
sortBy: sortBy
|
|
64
|
+
});
|
|
65
|
+
}
|
|
59
66
|
})));
|
|
60
67
|
};
|
|
61
68
|
|
|
@@ -19,11 +19,12 @@ var _PivotTableStyle = require("./styles/PivotTable.style.js");
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
const PivotTableContainer = /*#__PURE__*/_react.default.forwardRef(({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const PivotTableContainer = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
23
|
+
let {
|
|
24
|
+
width,
|
|
25
|
+
height,
|
|
26
|
+
children
|
|
27
|
+
} = _ref;
|
|
27
28
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
28
29
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
30
|
style: {
|
|
@@ -15,10 +15,11 @@ var _PivotTableEngineContext = require("./PivotTableEngineContext.js");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const PivotTableDimensionLabelCell =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const PivotTableDimensionLabelCell = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
rowLevel,
|
|
21
|
+
columnLevel
|
|
22
|
+
} = _ref;
|
|
22
23
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
23
24
|
const colCount = engine.rowDepth;
|
|
24
25
|
const rowCount = engine.columnDepth;
|
|
@@ -17,8 +17,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
const PivotTableEmptyCell = /*#__PURE__*/_react.default.forwardRef(({
|
|
21
|
-
|
|
20
|
+
const PivotTableEmptyCell = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
21
|
+
let { ...props
|
|
22
|
+
} = _ref;
|
|
22
23
|
return /*#__PURE__*/_react.default.createElement(_PivotTableCell.PivotTableCell, _extends({
|
|
23
24
|
ref: ref
|
|
24
25
|
}, props), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
@@ -15,10 +15,11 @@ var _PivotTableEngineContext = require("./PivotTableEngineContext.js");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const PivotTableEmptyRow =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const PivotTableEmptyRow = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
height,
|
|
21
|
+
columns
|
|
22
|
+
} = _ref;
|
|
22
23
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
23
24
|
return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement(_PivotTableCell.PivotTableCell, {
|
|
24
25
|
isHeader: true,
|
|
@@ -9,19 +9,20 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
12
|
+
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); }
|
|
13
13
|
|
|
14
|
-
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; }
|
|
14
|
+
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; }
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
18
|
const PivotTableEngineContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
19
19
|
exports.PivotTableEngineContext = PivotTableEngineContext;
|
|
20
20
|
|
|
21
|
-
const Provider =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
const Provider = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
engine,
|
|
24
|
+
children
|
|
25
|
+
} = _ref;
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement(PivotTableEngineContext.Provider, {
|
|
26
27
|
value: engine
|
|
27
28
|
}, children);
|
|
@@ -15,19 +15,22 @@ var _PivotTableTitleRows = require("./PivotTableTitleRows.js");
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const PivotTableHead =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
const PivotTableHead = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
clippingResult,
|
|
21
|
+
width,
|
|
22
|
+
sortBy,
|
|
23
|
+
onSortByColumn
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("thead", null, /*#__PURE__*/_react.default.createElement(_PivotTableTitleRows.PivotTableTitleRows, {
|
|
26
|
+
clippingResult: clippingResult,
|
|
27
|
+
width: width
|
|
28
|
+
}), /*#__PURE__*/_react.default.createElement(_PivotTableColumnHeaders.PivotTableColumnHeaders, {
|
|
29
|
+
clippingResult: clippingResult,
|
|
30
|
+
sortBy: sortBy,
|
|
31
|
+
onSortByColumn: onSortByColumn
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
31
34
|
|
|
32
35
|
exports.PivotTableHead = PivotTableHead;
|
|
33
36
|
PivotTableHead.propTypes = {
|
|
@@ -11,14 +11,15 @@ var _getHeaderForDisplay = require("../../modules/pivotTable/getHeaderForDisplay
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
const PivotTableHeaderCell =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const PivotTableHeaderCell = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
axisClippingResult,
|
|
17
|
+
index,
|
|
18
|
+
level,
|
|
19
|
+
getHeader,
|
|
20
|
+
render,
|
|
21
|
+
showHierarchy
|
|
22
|
+
} = _ref;
|
|
22
23
|
const header = (0, _getHeaderForDisplay.getHeaderForDisplay)({
|
|
23
24
|
start: axisClippingResult.indices[0],
|
|
24
25
|
count: axisClippingResult.indices.length,
|
|
@@ -23,11 +23,12 @@ var _PivotTableValueCell = require("./PivotTableValueCell.js");
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
const PivotTableRow =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const PivotTableRow = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
clippingResult,
|
|
29
|
+
rowIndex,
|
|
30
|
+
onToggleContextualMenu
|
|
31
|
+
} = _ref;
|
|
31
32
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
32
33
|
return /*#__PURE__*/_react.default.createElement("tr", null, (0, _times.default)(engine.rowDepth, x => x).map(rowLevel => /*#__PURE__*/_react.default.createElement(_PivotTableRowHeaderCell.PivotTableRowHeaderCell, {
|
|
33
34
|
key: rowLevel,
|
|
@@ -36,21 +37,27 @@ const PivotTableRow = ({
|
|
|
36
37
|
rowLevel: rowLevel
|
|
37
38
|
})), /*#__PURE__*/_react.default.createElement(_PivotTableClippedAxis.PivotTableClippedAxis, {
|
|
38
39
|
axisClippingResult: clippingResult.columns,
|
|
39
|
-
EmptyComponent:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
EmptyComponent: _ref2 => {
|
|
41
|
+
let {
|
|
42
|
+
size
|
|
43
|
+
} = _ref2;
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_PivotTableEmptyCell.PivotTableEmptyCell, {
|
|
45
|
+
classes: "value",
|
|
46
|
+
style: {
|
|
47
|
+
width: size
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
ItemComponent: _ref3 => {
|
|
52
|
+
let {
|
|
53
|
+
index: columnIndex
|
|
54
|
+
} = _ref3;
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_PivotTableValueCell.PivotTableValueCell, {
|
|
56
|
+
row: rowIndex,
|
|
57
|
+
column: columnIndex,
|
|
58
|
+
onToggleContextualMenu: onToggleContextualMenu
|
|
59
|
+
});
|
|
60
|
+
}
|
|
54
61
|
}));
|
|
55
62
|
};
|
|
56
63
|
|
|
@@ -17,13 +17,14 @@ var _PivotTableHeaderCell = require("./PivotTableHeaderCell.js");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
const PivotTableRowHeaderCell =
|
|
21
|
-
clippingResult,
|
|
22
|
-
rowIndex,
|
|
23
|
-
rowLevel
|
|
24
|
-
}) => {
|
|
20
|
+
const PivotTableRowHeaderCell = _ref => {
|
|
25
21
|
var _engine$adaptiveClipp;
|
|
26
22
|
|
|
23
|
+
let {
|
|
24
|
+
clippingResult,
|
|
25
|
+
rowIndex,
|
|
26
|
+
rowLevel
|
|
27
|
+
} = _ref;
|
|
27
28
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
28
29
|
const width = engine.adaptiveClippingController.columns.headerSizes[rowLevel];
|
|
29
30
|
const height = (_engine$adaptiveClipp = engine.adaptiveClippingController.rows.sizes[engine.rowMap[rowIndex]]) === null || _engine$adaptiveClipp === void 0 ? void 0 : _engine$adaptiveClipp.size;
|
|
@@ -25,10 +25,11 @@ var _PivotTableStyle = require("./styles/PivotTable.style.js");
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
const PivotTableSortIcon =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const PivotTableSortIcon = _ref => {
|
|
29
|
+
let {
|
|
30
|
+
index,
|
|
31
|
+
sortBy
|
|
32
|
+
} = _ref;
|
|
32
33
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
33
34
|
const SortIcon = (sortBy === null || sortBy === void 0 ? void 0 : sortBy.column) === index ? sortBy.order === _pivotTableConstants.SORT_ORDER_ASCENDING ? _SortIconAscending.SortIconAscending : _SortIconDescending.SortIconDescending : _SortIconIdle.SortIconIdle;
|
|
34
35
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -17,18 +17,19 @@ var _PivotTableEngineContext = require("./PivotTableEngineContext.js");
|
|
|
17
17
|
|
|
18
18
|
var _PivotTableStyle = require("./styles/PivotTable.style.js");
|
|
19
19
|
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
20
|
+
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); }
|
|
21
21
|
|
|
22
|
-
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; }
|
|
22
|
+
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; }
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
const PivotTableTitleRow =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
const PivotTableTitleRow = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
title,
|
|
29
|
+
scrollPosition,
|
|
30
|
+
containerWidth,
|
|
31
|
+
totalWidth
|
|
32
|
+
} = _ref;
|
|
32
33
|
const engine = (0, _PivotTableEngineContext.usePivotTableEngine)();
|
|
33
34
|
const columnCount = engine.width + engine.rowDepth;
|
|
34
35
|
const [position, setPosition] = (0, _react.useState)(scrollPosition.x);
|