@dhis2/analytics 21.0.0-alpha.1 → 21.0.0
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 +2775 -0
- 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 +1 -1
- package/build/cjs/__demo__/OrgUnitDimension.stories.js +17 -8
- package/build/cjs/__demo__/PivotTable.stories.js +2 -2
- package/build/cjs/api/analytics/AnalyticsBase.js +1 -1
- package/build/cjs/api/analytics/AnalyticsRequest.js +1 -1
- package/build/cjs/api/analytics/AnalyticsRequestBase.js +3 -3
- package/build/cjs/api/analytics/AnalyticsRequestPropertiesMixin.js +7 -7
- package/build/cjs/api/analytics/AnalyticsResponse.js +2 -2
- package/build/cjs/api/analytics/__tests__/AnalyticsAggregate.spec.js +1 -11
- package/build/cjs/api/analytics/__tests__/AnalyticsRequest.spec.js +9 -9
- package/build/cjs/api/analytics/__tests__/AnalyticsRequestBase.spec.js +4 -4
- package/build/cjs/api/analytics/utils.js +1 -1
- package/build/cjs/api/dimensions.js +37 -37
- package/build/cjs/api/organisationUnits.js +5 -5
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +226 -0
- package/build/cjs/components/AboutAOUnit/styles/AboutAOUnit.style.js +13 -0
- package/build/cjs/components/DataDimension/DataTypesSelector.js +3 -3
- package/build/cjs/components/DataDimension/DetailSelector.js +2 -2
- package/build/cjs/components/DataDimension/GroupSelector.js +9 -9
- package/build/cjs/components/DataDimension/ItemSelector.js +19 -19
- package/build/cjs/components/DataDimension/MetricSelector.js +3 -3
- package/build/cjs/components/DataDimension/styles/DataTypesSelector.style.js +1 -1
- package/build/cjs/components/DataDimension/styles/DetailSelector.style.js +1 -1
- package/build/cjs/components/DataDimension/styles/GroupSelector.style.js +1 -1
- package/build/cjs/components/DataDimension/styles/MetricSelector.style.js +1 -1
- package/build/cjs/components/DimensionMenu.js +10 -10
- package/build/cjs/components/DimensionsPanel/DimensionsPanel.js +2 -2
- package/build/cjs/components/DimensionsPanel/List/DimensionItem.js +5 -5
- package/build/cjs/components/DimensionsPanel/List/DimensionLabel.js +2 -2
- package/build/cjs/components/DimensionsPanel/List/DimensionList.js +10 -10
- package/build/cjs/components/DimensionsPanel/List/styles/DimensionList.style.js +1 -1
- package/build/cjs/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
- package/build/cjs/components/DynamicDimension/DynamicDimension.js +4 -4
- package/build/cjs/components/DynamicDimension/ItemSelector.js +8 -8
- package/build/cjs/components/DynamicDimension/styles/DynamicDimension.style.js +1 -1
- package/build/cjs/components/FileMenu/DeleteDialog.js +4 -4
- package/build/cjs/components/FileMenu/FileMenu.js +7 -7
- package/build/cjs/components/FileMenu/FileMenu.styles.js +1 -1
- package/build/cjs/components/FileMenu/GetLinkDialog.js +3 -3
- package/build/cjs/components/FileMenu/RenameDialog.js +4 -4
- package/build/cjs/components/FileMenu/SaveAsDialog.js +4 -4
- package/build/cjs/components/FileMenu/__tests__/DeleteDialog.spec.js +1 -1
- package/build/cjs/components/FileMenu/__tests__/RenameDialog.spec.js +1 -1
- package/build/cjs/components/FileMenu/__tests__/SaveAsDialog.spec.js +1 -1
- package/build/cjs/components/FileMenu/utils.js +3 -3
- package/build/cjs/components/Filter/Filter.js +1 -1
- package/build/cjs/components/Filter/styles/Filter.style.js +1 -1
- package/build/cjs/components/LegendKey/LegendKey.js +9 -9
- package/build/cjs/components/LegendKey/styles/LegendKey.style.js +1 -1
- package/build/cjs/components/OpenFileDialog/CustomSelectOption.js +2 -2
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.js +21 -21
- package/build/cjs/components/OpenFileDialog/OpenFileDialog.styles.js +1 -1
- package/build/cjs/components/OpenFileDialog/styles/CustomSelectOption.style.js +1 -1
- package/build/cjs/components/Options/VisualizationOptions.js +2 -2
- package/build/cjs/components/Options/styles/VisualizationOptions.style.js +10 -10
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimension.js +90 -20
- package/build/cjs/components/OrgUnitDimension/styles/OrgUnitDimension.style.js +2 -2
- package/build/cjs/components/PeriodDimension/FixedPeriodFilter.js +5 -5
- package/build/cjs/components/PeriodDimension/FixedPeriodSelect.js +6 -6
- package/build/cjs/components/PeriodDimension/PeriodTransfer.js +11 -11
- package/build/cjs/components/PeriodDimension/RelativePeriodFilter.js +2 -2
- package/build/cjs/components/PeriodDimension/styles/FixedPeriodSelect.style.js +1 -1
- package/build/cjs/components/PeriodDimension/styles/PeriodFilter.style.js +1 -1
- package/build/cjs/components/PeriodDimension/utils/fixedPeriods.js +49 -49
- package/build/cjs/components/PivotTable/PivotTable.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableCell.js +3 -3
- package/build/cjs/components/PivotTable/PivotTableColumnHeaderCell.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableContainer.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableEngineContext.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableSortIcon.js +2 -2
- package/build/cjs/components/PivotTable/PivotTableTitleRow.js +4 -4
- package/build/cjs/components/PivotTable/PivotTableValueCell.js +2 -2
- package/build/cjs/components/PivotTable/styles/PivotTable.style.js +3 -3
- package/build/cjs/components/TransferOption.js +7 -7
- package/build/cjs/components/styles/DimensionSelector.style.js +1 -1
- package/build/cjs/components/styles/TransferOption.style.js +1 -1
- package/build/cjs/index.js +28 -2
- package/build/cjs/locales/en/translations.json +26 -0
- package/build/cjs/modules/axis.js +1 -1
- package/build/cjs/modules/layoutUiRules/rules.js +1 -1
- package/build/cjs/modules/list.js +25 -0
- package/build/cjs/modules/ouIdHelper/index.js +2 -2
- package/build/cjs/modules/pivotTable/PivotTableEngine.js +3 -3
- package/build/cjs/modules/pivotTable/measureText.js +1 -1
- package/build/cjs/modules/visTypes.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/axis.js +2 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/getAxisTitle.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +2 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legend.js +8 -19
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/legendSet.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/plotOptions.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/title/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/title/scatter.js +1 -1
- 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 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/yAxis/index.js +2 -2
- package/build/cjs/visualizations/config/generators/dhis/singleValue.js +5 -5
- package/build/cjs/visualizations/config/index.js +3 -3
- package/build/cjs/visualizations/store/adapters/dhis_dhis/index.js +1 -1
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/index.js +1 -1
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/twoCategory.js +1 -1
- package/build/cjs/visualizations/store/index.js +2 -2
- package/build/cjs/visualizations/util/__tests__/getFilterText.spec.js +1 -1
- package/build/cjs/visualizations/util/axisId.js +1 -1
- package/build/cjs/visualizations/util/getFilterText.js +4 -12
- package/build/es/__demo__/OpenFileDialog.stories.js +1 -1
- package/build/es/__demo__/OrgUnitDimension.stories.js +15 -6
- package/build/es/api/analytics/AnalyticsBase.js +1 -1
- package/build/es/api/analytics/AnalyticsRequest.js +1 -1
- package/build/es/api/analytics/AnalyticsRequestBase.js +3 -3
- package/build/es/api/analytics/AnalyticsRequestPropertiesMixin.js +7 -7
- package/build/es/api/analytics/AnalyticsResponse.js +2 -2
- package/build/es/api/analytics/__tests__/AnalyticsAggregate.spec.js +1 -11
- package/build/es/api/analytics/__tests__/AnalyticsRequest.spec.js +9 -9
- package/build/es/api/analytics/__tests__/AnalyticsRequestBase.spec.js +4 -4
- package/build/es/api/analytics/utils.js +1 -1
- package/build/es/api/dimensions.js +39 -39
- package/build/es/api/organisationUnits.js +5 -5
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +203 -0
- package/build/es/components/AboutAOUnit/styles/AboutAOUnit.style.js +4 -0
- package/build/es/components/DataDimension/DataTypesSelector.js +3 -3
- package/build/es/components/DataDimension/DetailSelector.js +2 -2
- package/build/es/components/DataDimension/GroupSelector.js +7 -7
- package/build/es/components/DataDimension/ItemSelector.js +17 -17
- package/build/es/components/DataDimension/MetricSelector.js +3 -3
- package/build/es/components/DataDimension/styles/DataTypesSelector.style.js +1 -1
- package/build/es/components/DataDimension/styles/DetailSelector.style.js +1 -1
- package/build/es/components/DataDimension/styles/GroupSelector.style.js +1 -1
- package/build/es/components/DataDimension/styles/MetricSelector.style.js +1 -1
- package/build/es/components/DimensionMenu.js +10 -10
- package/build/es/components/DimensionsPanel/List/DimensionItem.js +3 -3
- package/build/es/components/DimensionsPanel/List/DimensionList.js +8 -8
- package/build/es/components/DimensionsPanel/List/styles/DimensionList.style.js +1 -1
- package/build/es/components/DimensionsPanel/styles/DimensionsPanel.style.js +1 -1
- package/build/es/components/DynamicDimension/DynamicDimension.js +4 -4
- package/build/es/components/DynamicDimension/ItemSelector.js +6 -6
- package/build/es/components/DynamicDimension/styles/DynamicDimension.style.js +1 -1
- package/build/es/components/FileMenu/DeleteDialog.js +1 -1
- package/build/es/components/FileMenu/FileMenu.js +4 -4
- package/build/es/components/FileMenu/FileMenu.styles.js +1 -1
- package/build/es/components/FileMenu/GetLinkDialog.js +2 -2
- package/build/es/components/FileMenu/RenameDialog.js +1 -1
- package/build/es/components/FileMenu/SaveAsDialog.js +1 -1
- package/build/es/components/FileMenu/__tests__/DeleteDialog.spec.js +1 -1
- package/build/es/components/FileMenu/__tests__/RenameDialog.spec.js +1 -1
- package/build/es/components/FileMenu/__tests__/SaveAsDialog.spec.js +1 -1
- package/build/es/components/FileMenu/utils.js +3 -3
- package/build/es/components/Filter/Filter.js +1 -1
- package/build/es/components/Filter/styles/Filter.style.js +1 -1
- package/build/es/components/LegendKey/LegendKey.js +9 -9
- package/build/es/components/LegendKey/styles/LegendKey.style.js +1 -1
- package/build/es/components/OpenFileDialog/CustomSelectOption.js +2 -2
- package/build/es/components/OpenFileDialog/OpenFileDialog.js +19 -19
- package/build/es/components/OpenFileDialog/OpenFileDialog.styles.js +1 -1
- package/build/es/components/OpenFileDialog/styles/CustomSelectOption.style.js +1 -1
- package/build/es/components/Options/styles/VisualizationOptions.style.js +10 -10
- package/build/es/components/OrgUnitDimension/OrgUnitDimension.js +88 -19
- package/build/es/components/OrgUnitDimension/styles/OrgUnitDimension.style.js +2 -2
- package/build/es/components/PeriodDimension/FixedPeriodFilter.js +5 -5
- package/build/es/components/PeriodDimension/FixedPeriodSelect.js +8 -8
- package/build/es/components/PeriodDimension/PeriodTransfer.js +9 -9
- package/build/es/components/PeriodDimension/RelativePeriodFilter.js +2 -2
- package/build/es/components/PeriodDimension/styles/FixedPeriodSelect.style.js +1 -1
- package/build/es/components/PeriodDimension/styles/PeriodFilter.style.js +1 -1
- package/build/es/components/PeriodDimension/utils/fixedPeriods.js +49 -49
- package/build/es/components/PivotTable/PivotTableCell.js +3 -3
- package/build/es/components/PivotTable/PivotTableColumnHeaderCell.js +2 -2
- package/build/es/components/PivotTable/PivotTableContainer.js +2 -2
- package/build/es/components/PivotTable/PivotTableSortIcon.js +2 -2
- package/build/es/components/PivotTable/PivotTableTitleRow.js +2 -2
- package/build/es/components/PivotTable/styles/PivotTable.style.js +3 -3
- package/build/es/components/TransferOption.js +17 -17
- package/build/es/components/styles/DimensionSelector.style.js +1 -1
- package/build/es/components/styles/TransferOption.style.js +1 -1
- package/build/es/index.js +3 -2
- package/build/es/locales/en/translations.json +26 -0
- package/build/es/modules/axis.js +1 -1
- package/build/es/modules/layoutUiRules/rules.js +1 -1
- package/build/es/modules/list.js +13 -0
- package/build/es/modules/ouIdHelper/index.js +2 -2
- package/build/es/modules/pivotTable/PivotTableEngine.js +3 -3
- package/build/es/modules/pivotTable/measureText.js +1 -1
- package/build/es/modules/visTypes.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/addTrendLines.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/axis.js +2 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/getAxisTitle.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/legend.js +8 -19
- package/build/es/visualizations/config/adapters/dhis_highcharts/legendSet.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/plotOptions.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/title/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/title/scatter.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/xAxis/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/gauge.js +3 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/yAxis/index.js +2 -2
- package/build/es/visualizations/config/generators/dhis/singleValue.js +5 -5
- package/build/es/visualizations/config/index.js +3 -3
- package/build/es/visualizations/store/adapters/dhis_dhis/index.js +1 -1
- package/build/es/visualizations/store/adapters/dhis_highcharts/index.js +1 -1
- package/build/es/visualizations/store/adapters/dhis_highcharts/twoCategory.js +1 -1
- package/build/es/visualizations/store/index.js +2 -2
- package/build/es/visualizations/util/__tests__/getFilterText.spec.js +1 -1
- package/build/es/visualizations/util/axisId.js +1 -1
- package/build/es/visualizations/util/getFilterText.js +5 -13
- package/package.json +4 -4
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimensionOld.js +0 -244
- package/build/es/components/OrgUnitDimension/OrgUnitDimensionOld.js +0 -220
|
@@ -18,12 +18,12 @@ export const PivotTableCell = /*#__PURE__*/React.forwardRef(({
|
|
|
18
18
|
const engine = usePivotTableEngine();
|
|
19
19
|
style.width = style.minWidth = style.maxWidth = style.width;
|
|
20
20
|
style.height = style.minHeight = style.maxHeight = style.height || engine.fontSize + engine.cellPadding * 2 + 2;
|
|
21
|
-
const className = classnames(classes,
|
|
21
|
+
const className = classnames(classes, "fontsize-".concat(engine.visualization.fontSize), "displaydensity-".concat(engine.visualization.displayDensity));
|
|
22
22
|
return isHeader ? /*#__PURE__*/React.createElement("th", _extends({
|
|
23
23
|
style: style,
|
|
24
24
|
"data-test": dataTest
|
|
25
25
|
}, props, {
|
|
26
|
-
className:
|
|
26
|
+
className: "jsx-".concat(cellStyle.__hash) + " " + (props && props.className != null && props.className || className || "")
|
|
27
27
|
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
28
28
|
id: cellStyle.__hash
|
|
29
29
|
}, cellStyle), children) : /*#__PURE__*/React.createElement("td", _extends({
|
|
@@ -31,7 +31,7 @@ export const PivotTableCell = /*#__PURE__*/React.forwardRef(({
|
|
|
31
31
|
style: style,
|
|
32
32
|
"data-test": dataTest
|
|
33
33
|
}, props, {
|
|
34
|
-
className:
|
|
34
|
+
className: "jsx-".concat(cellStyle.__hash) + " " + (props && props.className != null && props.className || className || "")
|
|
35
35
|
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
36
36
|
id: cellStyle.__hash
|
|
37
37
|
}, cellStyle), children);
|
|
@@ -52,10 +52,10 @@ export const PivotTableColumnHeaderCell = ({
|
|
|
52
52
|
}, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
53
53
|
id: cellStyle.__hash
|
|
54
54
|
}, cellStyle), /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className:
|
|
55
|
+
className: "jsx-".concat(cellStyle.__hash) + " " + "column-header-inner"
|
|
56
56
|
}, /*#__PURE__*/React.createElement("span", {
|
|
57
57
|
"data-test": "visualization-column-header",
|
|
58
|
-
className:
|
|
58
|
+
className: "jsx-".concat(cellStyle.__hash) + " " + "column-header-label"
|
|
59
59
|
}, header.label), isSortable ? /*#__PURE__*/React.createElement(PivotTableSortIcon, {
|
|
60
60
|
index: index,
|
|
61
61
|
sortBy: sortBy
|
|
@@ -17,11 +17,11 @@ export const PivotTableContainer = /*#__PURE__*/React.forwardRef(({
|
|
|
17
17
|
},
|
|
18
18
|
ref: ref,
|
|
19
19
|
"data-test": "visualization-container",
|
|
20
|
-
className:
|
|
20
|
+
className: "jsx-".concat(tableStyle.__hash) + " " + "pivot-table-container"
|
|
21
21
|
}, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22
22
|
id: tableStyle.__hash
|
|
23
23
|
}, tableStyle), width === 0 || height === 0 ? null : /*#__PURE__*/React.createElement("table", {
|
|
24
|
-
className:
|
|
24
|
+
className: "jsx-".concat(tableStyle.__hash) + " " + (classnames({
|
|
25
25
|
'fixed-headers': engine.options.fixColumnHeaders && engine.options.fixRowHeaders,
|
|
26
26
|
'fixed-column-headers': engine.options.fixColumnHeaders && !engine.options.fixRowHeaders,
|
|
27
27
|
'fixed-row-headers': engine.options.fixRowHeaders && !engine.options.fixColumnHeaders
|
|
@@ -14,11 +14,11 @@ export const PivotTableSortIcon = ({
|
|
|
14
14
|
const engine = usePivotTableEngine();
|
|
15
15
|
const SortIcon = (sortBy === null || sortBy === void 0 ? void 0 : sortBy.column) === index ? sortBy.order === SORT_ORDER_ASCENDING ? SortIconAscending : SortIconDescending : SortIconIdle;
|
|
16
16
|
return /*#__PURE__*/React.createElement("span", {
|
|
17
|
-
className:
|
|
17
|
+
className: "jsx-".concat(sortIconStyle.__hash) + " " + "fontsize-".concat(engine.visualization.fontSize)
|
|
18
18
|
}, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
19
19
|
id: sortIconStyle.__hash
|
|
20
20
|
}, sortIconStyle), /*#__PURE__*/React.createElement(SortIcon, {
|
|
21
|
-
className:
|
|
21
|
+
className: "jsx-".concat(sortIconStyle.__hash)
|
|
22
22
|
}));
|
|
23
23
|
};
|
|
24
24
|
PivotTableSortIcon.propTypes = {
|
|
@@ -17,7 +17,7 @@ export const PivotTableTitleRow = ({
|
|
|
17
17
|
setPosition(Math.max(0, Math.min(scrollPosition.x, totalWidth - containerWidth)));
|
|
18
18
|
}, [containerWidth, scrollPosition.x, totalWidth]);
|
|
19
19
|
return /*#__PURE__*/React.createElement("tr", {
|
|
20
|
-
className:
|
|
20
|
+
className: "jsx-".concat(cellStyle.__hash)
|
|
21
21
|
}, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
22
22
|
id: cellStyle.__hash
|
|
23
23
|
}, cellStyle), /*#__PURE__*/React.createElement(PivotTableCell, {
|
|
@@ -31,7 +31,7 @@ export const PivotTableTitleRow = ({
|
|
|
31
31
|
textAlign: 'center'
|
|
32
32
|
},
|
|
33
33
|
"data-test": "visualization-title",
|
|
34
|
-
className:
|
|
34
|
+
className: "jsx-".concat(cellStyle.__hash)
|
|
35
35
|
}, title)));
|
|
36
36
|
};
|
|
37
37
|
PivotTableTitleRow.propTypes = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { colors } from '@dhis2/ui';
|
|
2
2
|
import { BORDER_COLOR, DISPLAY_DENSITY_PADDING_COMPACT, DISPLAY_DENSITY_PADDING_NORMAL, DISPLAY_DENSITY_PADDING_COMFORTABLE, FONT_SIZE_SMALL, FONT_SIZE_NORMAL, FONT_SIZE_LARGE } from '../../../modules/pivotTable/pivotTableConstants';
|
|
3
|
-
export const table = [
|
|
3
|
+
export const table = ["div.pivot-table-container{font-family:'Roboto',Arial,sans-serif;overflow:auto;color:".concat(colors.grey900, ";}"), "table{border-spacing:0;white-space:nowrap;box-sizing:border-box;text-align:center;border:1px solid ".concat(BORDER_COLOR, ";border-width:1px 1px 0 0;}"), "table.fixed-headers{border-width:0 0 0 1px;}", "table.fixed-headers tr th,table.fixed-headers tr td{border-width:0 1px 1px 0;}", "table.fixed-column-headers{border-width:0 1px 0 0;}", "table.fixed-column-headers tr th,table.fixed-column-headers tr td{border-width:0 0 1px 1px;}", "table.fixed-headers thead tr:first-of-type th,table.fixed-column-headers thead tr:first-of-type th{border-top:1px solid ".concat(BORDER_COLOR, ";}"), "table.fixed-row-headers{border-width:0 0 1px 1px;}", "table.fixed-row-headers tr th,table.fixed-row-headers tr td{border-width:1px 1px 0 0;}"];
|
|
4
4
|
table.__hash = "712241344";
|
|
5
|
-
export const cell = [
|
|
5
|
+
export const cell = ["td.jsx-1789008308,th.jsx-1789008308{box-sizing:border-box;font-weight:normal;overflow:hidden;text-overflow:ellipsis;border:1px solid ".concat(BORDER_COLOR, ";border-width:0 0 1px 1px;cursor:default;}"), "th.fixed-header.jsx-1789008308{position:-webkit-sticky;position:sticky;z-index:1;top:0;left:0;}", ".fontsize-SMALL.jsx-1789008308{font-size:".concat(FONT_SIZE_SMALL, "px;line-height:").concat(FONT_SIZE_SMALL, "px;}"), ".fontsize-NORMAL.jsx-1789008308{font-size:".concat(FONT_SIZE_NORMAL, "px;line-height:").concat(FONT_SIZE_NORMAL, "px;}"), ".fontsize-LARGE.jsx-1789008308{font-size:".concat(FONT_SIZE_LARGE, "px;line-height:").concat(FONT_SIZE_LARGE, "px;}"), ".displaydensity-COMPACT.jsx-1789008308{padding:".concat(DISPLAY_DENSITY_PADDING_COMPACT, "px;}"), ".displaydensity-NORMAL.jsx-1789008308{padding:".concat(DISPLAY_DENSITY_PADDING_NORMAL, "px;}"), ".displaydensity-COMFORTABLE.jsx-1789008308{padding:".concat(DISPLAY_DENSITY_PADDING_COMFORTABLE, "px;}"), ".column-header.jsx-1789008308{background-color:#dae6f8;}", "div.column-header-inner.jsx-1789008308{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}", ".title.jsx-1789008308{font-weight:bold;background-color:#cddaed;}", ".row-header.jsx-1789008308{background-color:#dae6f8;}", ".row-header-hierarchy.jsx-1789008308{text-align:left;}", ".empty-header.jsx-1789008308{background-color:#cddaed;}", ".total-header.jsx-1789008308{background-color:#bac6d8;}", ".value.jsx-1789008308{background-color:#ffffff;}", ".TEXT.jsx-1789008308{text-align:left;}", ".NUMBER.jsx-1789008308{text-align:right;}", ".clickable.jsx-1789008308{cursor:pointer;}", ".value.jsx-1789008308:hover{background-color:#f3f3f3;}", ".subtotal.jsx-1789008308{background-color:#f4f4f4;}", ".total.jsx-1789008308{background-color:#d8d8d8;}", ".column-header-label.jsx-1789008308{overflow:hidden;text-overflow:ellipsis;}"];
|
|
6
6
|
cell.__hash = "1789008308";
|
|
7
|
-
export const sortIcon = [
|
|
7
|
+
export const sortIcon = [".fontsize-SMALL.jsx-2877616992{height:".concat(FONT_SIZE_SMALL, "px;margin-bottom:1px;margin-left:5px;}"), ".fontsize-NORMAL.jsx-2877616992{height:".concat(FONT_SIZE_NORMAL, "px;max-height:11px;margin-bottom:2px;margin-left:6px;}"), ".fontsize-LARGE.jsx-2877616992{height:".concat(FONT_SIZE_LARGE, "px;margin-bottom:2px;margin-left:7px;}")];
|
|
8
8
|
sortIcon.__hash = "2877616992";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _JSXStyle from "styled-jsx/style";
|
|
2
|
-
import propTypes from '@dhis2/prop-types';
|
|
3
2
|
import { Tooltip } from '@dhis2/ui';
|
|
4
3
|
import cx from 'classnames';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import styles from './styles/TransferOption.style';
|
|
7
7
|
export const TransferOption = ({
|
|
@@ -32,17 +32,17 @@ export const TransferOption = ({
|
|
|
32
32
|
value
|
|
33
33
|
}, event);
|
|
34
34
|
},
|
|
35
|
-
"data-test":
|
|
36
|
-
className:
|
|
35
|
+
"data-test": "".concat(dataTest, "-content"),
|
|
36
|
+
className: "jsx-".concat(styles.__hash) + " " + (cx('chip', {
|
|
37
37
|
highlighted,
|
|
38
38
|
disabled,
|
|
39
39
|
selected,
|
|
40
40
|
inactive: active !== undefined && !active
|
|
41
41
|
}) || "")
|
|
42
42
|
}, /*#__PURE__*/React.createElement("span", {
|
|
43
|
-
className:
|
|
43
|
+
className: "jsx-".concat(styles.__hash) + " " + "icon"
|
|
44
44
|
}, icon), /*#__PURE__*/React.createElement("span", {
|
|
45
|
-
className:
|
|
45
|
+
className: "jsx-".concat(styles.__hash) + " " + "label"
|
|
46
46
|
}, label), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
47
47
|
id: styles.__hash
|
|
48
48
|
}, styles));
|
|
@@ -52,7 +52,7 @@ export const TransferOption = ({
|
|
|
52
52
|
"data-test": dataTest,
|
|
53
53
|
className: "wrapper"
|
|
54
54
|
}, tooltipText ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
55
|
-
key:
|
|
55
|
+
key: "".concat(value),
|
|
56
56
|
content: tooltipText,
|
|
57
57
|
placement: 'top',
|
|
58
58
|
openDelay: 750,
|
|
@@ -60,15 +60,15 @@ export const TransferOption = ({
|
|
|
60
60
|
}, renderContent()) : renderContent());
|
|
61
61
|
};
|
|
62
62
|
TransferOption.propTypes = {
|
|
63
|
-
label:
|
|
64
|
-
value:
|
|
65
|
-
active:
|
|
66
|
-
dataTest:
|
|
67
|
-
disabled:
|
|
68
|
-
highlighted:
|
|
69
|
-
icon:
|
|
70
|
-
selected:
|
|
71
|
-
tooltipText:
|
|
72
|
-
onClick:
|
|
73
|
-
onDoubleClick:
|
|
63
|
+
label: PropTypes.string.isRequired,
|
|
64
|
+
value: PropTypes.string.isRequired,
|
|
65
|
+
active: PropTypes.bool,
|
|
66
|
+
dataTest: PropTypes.string,
|
|
67
|
+
disabled: PropTypes.bool,
|
|
68
|
+
highlighted: PropTypes.bool,
|
|
69
|
+
icon: PropTypes.node,
|
|
70
|
+
selected: PropTypes.bool,
|
|
71
|
+
tooltipText: PropTypes.string,
|
|
72
|
+
onClick: PropTypes.func,
|
|
73
|
+
onDoubleClick: PropTypes.func
|
|
74
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { spacers, colors } from '@dhis2/ui';
|
|
2
|
-
const _defaultExport = [
|
|
2
|
+
const _defaultExport = [".filterContainer.jsx-2057111968{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:".concat(spacers.dp12, ";margin-top:").concat(spacers.dp8, ";}"), ".emptyList.jsx-2057111968{text-align:center;font-size:14px;line-height:16px;margin:".concat(spacers.dp24, " 0 0;color:").concat(colors.grey700, ";}"), ".rightHeader.jsx-2057111968{font-size:14px;font-weight:400;}", ".leftHeader.jsx-2057111968{padding:".concat(spacers.dp12, " ").concat(spacers.dp4, ";}"), ".info-container.jsx-2057111968{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:".concat(spacers.dp8, ";padding:").concat(spacers.dp8, ";background-color:").concat(colors.grey200, ";border-radius:3px;}"), ".info-text.jsx-2057111968{padding-left:".concat(spacers.dp8, ";color:").concat(colors.grey900, ";font-size:12px;line-height:16px;}")];
|
|
3
3
|
_defaultExport.__hash = "2057111968";
|
|
4
4
|
export default _defaultExport;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { colors, spacers, theme } from '@dhis2/ui';
|
|
2
|
-
const _defaultExport = [
|
|
2
|
+
const _defaultExport = [".wrapper.jsx-3199850788:last-child{margin-bottom:".concat(spacers.dp4, ";}"), ".chip.jsx-3199850788{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;background:".concat(colors.grey200, ";font-size:14px;line-height:16px;padding:2px ").concat(spacers.dp8, " 2px ").concat(spacers.dp4, ";margin:").concat(spacers.dp4, " ").concat(spacers.dp8, " 0 ").concat(spacers.dp8, ";border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}"), ".chip.jsx-3199850788:hover{background:".concat(colors.grey300, ";}"), ".selected.jsx-3199850788{background:".concat(theme.secondary100, ";color:").concat(theme.secondary900, ";}"), ".selected.jsx-3199850788 .icon path{fill:".concat(theme.secondary700, ";}"), ".selected.jsx-3199850788:hover{background:#c9edeb;}", ".highlighted.jsx-3199850788,.highlighted.jsx-3199850788:hover{background:".concat(theme.secondary800, ";color:").concat(colors.white, ";}"), ".highlighted.jsx-3199850788 .icon path{fill:".concat(colors.white, ";}"), ".disabled.jsx-3199850788{opacity:0.3;cursor:not-allowed;}", ".inactive.jsx-3199850788{opacity:0.3;}", ".icon.jsx-3199850788,.label.jsx-3199850788{line-height:18px;}", ".icon.jsx-3199850788{margin-right:".concat(spacers.dp4, ";display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:text-bottom;padding-top:1px;}"), ".label.jsx-3199850788{font-size:14px;}"];
|
|
3
3
|
_defaultExport.__hash = "3199850788";
|
|
4
4
|
export default _defaultExport;
|
package/build/es/index.js
CHANGED
|
@@ -12,7 +12,8 @@ export { default as DimensionMenu } from './components/DimensionMenu';
|
|
|
12
12
|
export { default as PivotTable } from './components/PivotTable/PivotTable';
|
|
13
13
|
export { default as FileMenu } from './components/FileMenu/FileMenu';
|
|
14
14
|
export { default as VisTypeIcon } from './components/VisTypeIcon';
|
|
15
|
-
export { default as LegendKey } from './components/LegendKey/LegendKey';
|
|
15
|
+
export { default as LegendKey } from './components/LegendKey/LegendKey';
|
|
16
|
+
export { default as AboutAOUnit } from './components/AboutAOUnit/AboutAOUnit'; // Api
|
|
16
17
|
|
|
17
18
|
export { default as Analytics } from './api/analytics/Analytics';
|
|
18
19
|
export { apiFetchDimensions, apiFetchRecommendedIds } from './api/dimensions';
|
|
@@ -22,7 +23,7 @@ export { getAxisName, getAxisNameByLayoutType, hasCustomAxes } from './modules/a
|
|
|
22
23
|
|
|
23
24
|
export { DIMENSION_ID_DATA, DIMENSION_ID_PERIOD, DIMENSION_ID_ORGUNIT, DIMENSION_ID_ASSIGNED_CATEGORIES, DIMENSION_PROP_NO_ITEMS, filterOutPredefinedDimensions, getPredefinedDimensionProp, getDimensionById, getPredefinedDimensions, getFixedDimensions, getDynamicDimensions } from './modules/predefinedDimensions'; // Modules: ou utils
|
|
24
25
|
|
|
25
|
-
export { ouIdHelper } from './modules/ouIdHelper';
|
|
26
|
+
export { ouIdHelper, USER_ORG_UNIT, USER_ORG_UNIT_CHILDREN, USER_ORG_UNIT_GRANDCHILDREN } from './modules/ouIdHelper';
|
|
26
27
|
export { convertOuLevelsToUids } from './modules/ouLevelUtils'; // Modules: adapted ui layout
|
|
27
28
|
|
|
28
29
|
export { getAdaptedUiLayoutByType } from './modules/getAdaptedUiLayoutByType'; // Modules: relativeItems
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"view only": "view only",
|
|
3
|
+
"view and edit": "view and edit",
|
|
4
|
+
"all users ({{accessLevel}})": "all users ({{accessLevel}})",
|
|
5
|
+
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
6
|
+
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "Shared with {{commaSeparatedListOfUsersAndGroups}}",
|
|
7
|
+
"Not shared with any users or groups": "Not shared with any users or groups",
|
|
8
|
+
"About this visualization": "About this visualization",
|
|
9
|
+
"No description": "No description",
|
|
10
|
+
"Last updated {{time}}": "Last updated {{time}}",
|
|
11
|
+
"Created {{time}} by {{author}}": "Created {{time}} by {{author}}",
|
|
12
|
+
"Viewed {{count}} times": "Viewed 1 time",
|
|
13
|
+
"Viewed {{count}} times_plural": "Viewed {{count}} times",
|
|
14
|
+
"Notifications": "Notifications",
|
|
15
|
+
"You're subscribed and getting updates about new interpretations.": "You're subscribed and getting updates about new interpretations.",
|
|
16
|
+
"Unsubscribe": "Unsubscribe",
|
|
17
|
+
"Subscribe to get updates about new interpretations.": "Subscribe to get updates about new interpretations.",
|
|
18
|
+
"Subscribe": "Subscribe",
|
|
2
19
|
"Data Type": "Data Type",
|
|
3
20
|
"All types": "All types",
|
|
4
21
|
"Totals only": "Totals only",
|
|
@@ -101,11 +118,20 @@
|
|
|
101
118
|
"Options": "Options",
|
|
102
119
|
"Hide": "Hide",
|
|
103
120
|
"Update": "Update",
|
|
121
|
+
"{{count}} org units": "{{count}} org unit",
|
|
122
|
+
"{{count}} org units_plural": "{{count}} org units",
|
|
123
|
+
"{{count}} levels": "{{count}} level",
|
|
124
|
+
"{{count}} levels_plural": "{{count}} levels",
|
|
125
|
+
"{{count}} groups": "{{count}} group",
|
|
126
|
+
"{{count}} groups_plural": "{{count}} groups",
|
|
127
|
+
"Selected: {{commaSeparatedListOfOrganisationUnits}}": "Selected: {{commaSeparatedListOfOrganisationUnits}}",
|
|
128
|
+
"Nothing selected": "Nothing selected",
|
|
104
129
|
"User organisation unit": "User organisation unit",
|
|
105
130
|
"User sub-units": "User sub-units",
|
|
106
131
|
"User sub-x2-units": "User sub-x2-units",
|
|
107
132
|
"Select a level": "Select a level",
|
|
108
133
|
"Select a group": "Select a group",
|
|
134
|
+
"Deselect all": "Deselect all",
|
|
109
135
|
"Period type": "Period type",
|
|
110
136
|
"Year": "Year",
|
|
111
137
|
"Select year": "Select year",
|
package/build/es/modules/axis.js
CHANGED
|
@@ -33,7 +33,7 @@ export const getAxisNameByLayoutType = (axisId, layoutType) => {
|
|
|
33
33
|
const name = getAxisNamesByLayoutType(layoutType)[axisId];
|
|
34
34
|
|
|
35
35
|
if (!name) {
|
|
36
|
-
throw new Error(
|
|
36
|
+
throw new Error("".concat(axisId, " is not a valid axis id"));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
return name;
|
|
@@ -101,7 +101,7 @@ const getRulesByVisType = visType => {
|
|
|
101
101
|
const rules = visTypeToRules[visType];
|
|
102
102
|
|
|
103
103
|
if (!rules) {
|
|
104
|
-
throw new Error(
|
|
104
|
+
throw new Error("".concat(visType, " is not a known visualization type"));
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
return rules;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import i18n from '../locales/index.js';
|
|
2
|
+
export const formatList = items => {
|
|
3
|
+
// Wrap Intl.ListFormat in try/catch as DHIS2 locales are not always ISO 639 compliant
|
|
4
|
+
try {
|
|
5
|
+
const formatter = new Intl.ListFormat(i18n.language, {
|
|
6
|
+
style: 'long',
|
|
7
|
+
type: 'conjunction'
|
|
8
|
+
});
|
|
9
|
+
return formatter.format(items);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return items.join(', ');
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -15,8 +15,8 @@ const stripGroupPrefix = id => hasGroupPrefix(id) ? id.substr(GROUP_ID_PREFIX.le
|
|
|
15
15
|
const removePrefix = id => stripGroupPrefix(stripLevelPrefix(id));
|
|
16
16
|
|
|
17
17
|
export const ouIdHelper = Object.freeze({
|
|
18
|
-
addLevelPrefix: id =>
|
|
19
|
-
addGroupPrefix: id =>
|
|
18
|
+
addLevelPrefix: id => "".concat(LEVEL_ID_PREFIX, "-").concat(removePrefix(id)),
|
|
19
|
+
addGroupPrefix: id => "".concat(GROUP_ID_PREFIX, "-").concat(removePrefix(id)),
|
|
20
20
|
removePrefix,
|
|
21
21
|
hasGroupPrefix,
|
|
22
22
|
hasLevelPrefix
|
|
@@ -354,7 +354,7 @@ export class PivotTableEngine {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
if (rowLevel === lastRowLevel && this.dimensionLookup.rows[lastRowLevel] && columnLevel === lastColumnLevel && this.dimensionLookup.columns[lastColumnLevel]) {
|
|
357
|
-
return
|
|
357
|
+
return "".concat(this.dimensionLookup.rows[lastRowLevel].meta.name, " / ").concat(this.dimensionLookup.columns[lastColumnLevel].meta.name);
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
if (lastRowLevel === -1) {
|
|
@@ -948,12 +948,12 @@ export class PivotTableEngine {
|
|
|
948
948
|
|
|
949
949
|
sort(column, order) {
|
|
950
950
|
if (order !== SORT_ORDER_ASCENDING && order !== SORT_ORDER_DESCENDING) {
|
|
951
|
-
console.warn(
|
|
951
|
+
console.warn("Invalid sort order ".concat(order));
|
|
952
952
|
return;
|
|
953
953
|
}
|
|
954
954
|
|
|
955
955
|
if (!this.isSortable(column)) {
|
|
956
|
-
console.warn(
|
|
956
|
+
console.warn("Invalid sort column ".concat(column));
|
|
957
957
|
return;
|
|
958
958
|
}
|
|
959
959
|
|
|
@@ -71,7 +71,7 @@ export const getDisplayNameByVisType = visType => {
|
|
|
71
71
|
const displayName = visTypeDisplayNames[visType];
|
|
72
72
|
|
|
73
73
|
if (!displayName) {
|
|
74
|
-
throw new Error(
|
|
74
|
+
throw new Error("".concat(visType, " is not a valid visualization type"));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
return displayName;
|
|
@@ -76,7 +76,7 @@ function getTwoCategoryTrendLines(layout, series, isStacked) {
|
|
|
76
76
|
});
|
|
77
77
|
} else {
|
|
78
78
|
series.forEach(seriesObj => {
|
|
79
|
-
const trendlineSerieId =
|
|
79
|
+
const trendlineSerieId = "trendline-".concat(seriesObj.id);
|
|
80
80
|
newSeries.push(seriesObj);
|
|
81
81
|
|
|
82
82
|
if (!seriesObj.custom.isTwoCategoryFakeSerie) {
|
|
@@ -18,7 +18,7 @@ const getPlotLineLabelStyle = fontStyle => ({
|
|
|
18
18
|
y: -7,
|
|
19
19
|
style: {
|
|
20
20
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
21
|
-
fontSize:
|
|
21
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
22
22
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
23
23
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
24
24
|
}
|
|
@@ -103,7 +103,7 @@ export const getLabels = axis => {
|
|
|
103
103
|
return {
|
|
104
104
|
style: {
|
|
105
105
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
106
|
-
fontSize:
|
|
106
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
107
107
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
108
108
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
109
109
|
},
|
|
@@ -8,7 +8,7 @@ const getTitleStyle = (fontStyle, titleType, visType) => fontStyle ? {
|
|
|
8
8
|
margin: 15,
|
|
9
9
|
style: {
|
|
10
10
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
11
|
-
fontSize:
|
|
11
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
12
12
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
13
13
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@ function getItemStyle(fontStyle, dashboard) {
|
|
|
20
20
|
fontWeight: 'normal'
|
|
21
21
|
}, dashboard ? DASHBOARD_ITEM_STYLE : {
|
|
22
22
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
23
|
-
fontSize:
|
|
23
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
24
24
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
25
25
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
26
26
|
})
|
|
@@ -71,33 +71,22 @@ const formatLabel = ({
|
|
|
71
71
|
|
|
72
72
|
if ((!seriesId || seriesId.startsWith('trendline')) && seriesType === getType(VIS_TYPE_LINE).type) {
|
|
73
73
|
// trendline
|
|
74
|
-
result.push(
|
|
75
|
-
result.push(
|
|
74
|
+
result.push("<span style=\"height: ".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 6.5, "px; width: ").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px; background-color: ").concat(seriesColor, "; display: inline-block;\"></span>"));
|
|
75
|
+
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
76
76
|
} else if (legendSet !== null && legendSet !== void 0 && (_legendSet$legends = legendSet.legends) !== null && _legendSet$legends !== void 0 && _legendSet$legends.length && isLegendSetType(visType) && seriesType !== getType(VIS_TYPE_LINE).type) {
|
|
77
77
|
// item with legend set
|
|
78
|
-
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push(
|
|
79
|
-
|
|
80
|
-
</svg>`));
|
|
81
|
-
result.push(`<span style="margin-left: 8px" class="data-test-series-key-item-name">${seriesName}</span>`);
|
|
78
|
+
legendSet.legends.sort((a, b) => a.startValue - b.startValue).forEach((legend, index) => result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" version=\"1.1\" style=\"margin-right:-5px; z-index: ").concat(legendSet.legends.length - index, "\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(legend.color, "\"></circle>\n </svg>")));
|
|
79
|
+
result.push("<span style=\"margin-left: 8px\" class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
82
80
|
} else {
|
|
83
81
|
// regular item (not a trendline, no applied legend set)
|
|
84
82
|
if ((seriesColor === null || seriesColor === void 0 ? void 0 : seriesColor.patternIndex) !== undefined) {
|
|
85
83
|
const pattern = colorSets[COLOR_SET_PATTERNS].patterns[seriesColor.patternIndex];
|
|
86
|
-
result.push(
|
|
87
|
-
<defs>
|
|
88
|
-
<pattern id="pattern${seriesColor.patternIndex}" patternUnits="userSpaceOnUse" width="${pattern.width}" height="${pattern.height}">
|
|
89
|
-
<path stroke="${pattern.color}" d="${pattern.path}"/>
|
|
90
|
-
</pattern>
|
|
91
|
-
</defs>
|
|
92
|
-
<circle cx="${fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2}" cy="${fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2}" r="${fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2}" fill="url(#pattern${seriesColor.patternIndex})"/>
|
|
93
|
-
</svg>`);
|
|
84
|
+
result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"height: ".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px; width: ").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px; display: inline-block; margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <defs>\n <pattern id=\"pattern").concat(seriesColor.patternIndex, "\" patternUnits=\"userSpaceOnUse\" width=\"").concat(pattern.width, "\" height=\"").concat(pattern.height, "\">\n <path stroke=\"").concat(pattern.color, "\" d=\"").concat(pattern.path, "\"/>\n </pattern>\n </defs>\n <circle cx=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"url(#pattern").concat(seriesColor.patternIndex, ")\"/>\n </svg>"));
|
|
94
85
|
} else {
|
|
95
|
-
result.push(
|
|
96
|
-
<circle cx="${fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2}" cy="${fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2}" r="${fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2}" fill="${seriesColor}"></circle>
|
|
97
|
-
</svg>`);
|
|
86
|
+
result.push("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" height=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "\" version=\"1.1\" style=\"margin-right:5px\" class=\"data-test-series-key-item-bullet\">\n <circle cx=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" cy=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" r=\"").concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE] / 2, "\" fill=\"").concat(seriesColor, "\"></circle>\n </svg>"));
|
|
98
87
|
}
|
|
99
88
|
|
|
100
|
-
result.push(
|
|
89
|
+
result.push("<span class=\"data-test-series-key-item-name\">".concat(seriesName, "</span>"));
|
|
101
90
|
}
|
|
102
91
|
|
|
103
92
|
result.push('</div>');
|
|
@@ -28,6 +28,6 @@ export const applyLegendSet = (seriesObj = {}, legendSet) => !seriesObj.type ? {
|
|
|
28
28
|
};
|
|
29
29
|
export const getLegendSetTooltip = () => ({
|
|
30
30
|
pointFormatter: function () {
|
|
31
|
-
return
|
|
31
|
+
return "<span style=\"color:".concat(this.color, "\">\u25CF</span> ").concat(this.series.name, ": <b>").concat(this.y, "</b><br>") + (this.legend ? "".concat(this.legendSet, ": <b>").concat(this.legend, "</b>") : "".concat(i18n.t('No legend for this series')));
|
|
32
32
|
}
|
|
33
33
|
});
|
|
@@ -29,7 +29,7 @@ export default (({
|
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
return
|
|
32
|
+
return "".concat(labels.map(label => "<b>".concat(label, "</b><br>")).join('')).concat(yAxisName, ": ").concat(y, "<br>").concat(xAxisName, ": ").concat(x);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
switch (visType) {
|
|
@@ -58,7 +58,7 @@ export default function (series, layout, metaData, dashboard) {
|
|
|
58
58
|
style: {
|
|
59
59
|
// DHIS2-578: dynamically truncate subtitle when it's taking more than 1 line
|
|
60
60
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
61
|
-
fontSize:
|
|
61
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
62
62
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
63
63
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal',
|
|
64
64
|
whiteSpace: 'nowrap',
|
|
@@ -61,7 +61,7 @@ export default function (layout, metaData, dashboard) {
|
|
|
61
61
|
align: getTextAlignOption(fontStyle[FONT_STYLE_OPTION_TEXT_ALIGN], FONT_STYLE_VISUALIZATION_TITLE, isVerticalType(layout.type)),
|
|
62
62
|
style: {
|
|
63
63
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
64
|
-
fontSize:
|
|
64
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
65
65
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
66
66
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal',
|
|
67
67
|
whiteSpace: 'nowrap',
|
|
@@ -4,6 +4,6 @@ export default function (layout, metaData, dashboard) {
|
|
|
4
4
|
|
|
5
5
|
if ((_layout$rows = layout.rows) !== null && _layout$rows !== void 0 && _layout$rows.length && (_layout$columns = layout.columns) !== null && _layout$columns !== void 0 && _layout$columns.length && !dashboard) {
|
|
6
6
|
const columns = getFilterText(layout.columns, metaData).split(', ');
|
|
7
|
-
return
|
|
7
|
+
return "".concat(getFilterText(layout.rows, metaData), ": ").concat(columns[0], " - ").concat(columns[1]);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -23,7 +23,7 @@ export const getLabels = axis => {
|
|
|
23
23
|
return {
|
|
24
24
|
style: {
|
|
25
25
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
26
|
-
fontSize:
|
|
26
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
27
27
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
28
28
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
29
29
|
},
|
|
@@ -47,12 +47,12 @@ function getPlotLine(regressionLine = {}, defaultLabel) {
|
|
|
47
47
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR] || '#000',
|
|
48
48
|
...(label && {
|
|
49
49
|
label: {
|
|
50
|
-
text:
|
|
50
|
+
text: "".concat(label, ": ").concat(value),
|
|
51
51
|
verticalAlign,
|
|
52
52
|
y,
|
|
53
53
|
style: {
|
|
54
54
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
55
|
-
fontSize:
|
|
55
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
56
56
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
57
57
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
58
58
|
}
|
|
@@ -69,7 +69,7 @@ const getLabels = axis => {
|
|
|
69
69
|
y: parseInt(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], 10) + 7,
|
|
70
70
|
style: {
|
|
71
71
|
color: fontStyle[FONT_STYLE_OPTION_TEXT_COLOR],
|
|
72
|
-
fontSize:
|
|
72
|
+
fontSize: "".concat(fontStyle[FONT_STYLE_OPTION_FONT_SIZE], "px"),
|
|
73
73
|
fontWeight: fontStyle[FONT_STYLE_OPTION_BOLD] ? FONT_STYLE_OPTION_BOLD : 'normal',
|
|
74
74
|
fontStyle: fontStyle[FONT_STYLE_OPTION_ITALIC] ? FONT_STYLE_OPTION_ITALIC : 'normal'
|
|
75
75
|
}
|
|
@@ -52,9 +52,9 @@ function getDefault(layout, series, extraOptions) {
|
|
|
52
52
|
var _axis$title;
|
|
53
53
|
|
|
54
54
|
rl.title = { ...rl.title,
|
|
55
|
-
text:
|
|
55
|
+
text: "".concat(rl.title.text, " - ").concat(((_axis$title = axis.title) === null || _axis$title === void 0 ? void 0 : _axis$title.text) || i18n.t('Axis {{axisId}}', {
|
|
56
56
|
axisId: axis.index + 1
|
|
57
|
-
})
|
|
57
|
+
}))
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
});
|