@dhis2/analytics 29.3.3 → 29.4.1
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/build/cjs/api/analytics/AnalyticsRequest.js +4 -4
- package/build/cjs/components/DataDimension/Calculation/CalculationModal.js +6 -3
- package/build/cjs/components/DataDimension/Calculation/DataElementSelector.js +8 -2
- package/build/cjs/components/DataDimension/Calculation/DndContext.js +4 -4
- package/build/cjs/components/DataDimension/Calculation/styles/DataElementSelector.style.js +2 -2
- package/build/cjs/components/DataDimension/DataDimension.js +14 -3
- package/build/cjs/components/DataDimension/Info/DataElementOperandInfo.js +1 -1
- package/build/cjs/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +9 -4
- package/build/cjs/components/DataDimension/ItemSelector/ItemSelector.js +13 -5
- package/build/cjs/components/RichText/Editor/Editor.js +2 -2
- package/build/cjs/locales/index.js +86 -41
- package/build/cjs/modules/legends.js +1 -1
- package/build/cjs/modules/pivotTable/applyLegendSet.js +4 -4
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/events/loadCustomSVG/singleValue/index.js +3 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/index.js +2 -2
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/series/index.js +1 -1
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +3 -3
- package/build/cjs/visualizations/config/adapters/dhis_highcharts/title/index.js +3 -3
- package/build/cjs/visualizations/config/generators/highcharts/index.js +2 -2
- package/build/cjs/visualizations/store/adapters/dhis_highcharts/yearOnYear.js +1 -1
- package/build/es/api/analytics/AnalyticsRequest.js +4 -4
- package/build/es/components/DataDimension/Calculation/CalculationModal.js +6 -3
- package/build/es/components/DataDimension/Calculation/DataElementSelector.js +8 -2
- package/build/es/components/DataDimension/Calculation/DndContext.js +4 -4
- package/build/es/components/DataDimension/Calculation/styles/DataElementSelector.style.js +2 -2
- package/build/es/components/DataDimension/DataDimension.js +14 -3
- package/build/es/components/DataDimension/Info/DataElementOperandInfo.js +1 -1
- package/build/es/components/DataDimension/ItemOptionsSelector/ItemOptionsSelector.js +9 -4
- package/build/es/components/DataDimension/ItemSelector/ItemSelector.js +13 -5
- package/build/es/components/RichText/Editor/Editor.js +2 -2
- package/build/es/locales/index.js +86 -41
- package/build/es/modules/legends.js +1 -1
- package/build/es/modules/pivotTable/applyLegendSet.js +4 -4
- package/build/es/visualizations/config/adapters/dhis_highcharts/events/loadCustomSVG/singleValue/index.js +3 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/index.js +2 -2
- package/build/es/visualizations/config/adapters/dhis_highcharts/series/index.js +1 -1
- package/build/es/visualizations/config/adapters/dhis_highcharts/subtitle/index.js +3 -3
- package/build/es/visualizations/config/adapters/dhis_highcharts/title/index.js +3 -3
- package/build/es/visualizations/config/generators/highcharts/index.js +2 -2
- package/build/es/visualizations/store/adapters/dhis_highcharts/yearOnYear.js +1 -1
- package/package.json +2 -2
|
@@ -53,7 +53,7 @@ class AnalyticsRequest extends (0, _AnalyticsRequestDimensionsMixin.default)((0,
|
|
|
53
53
|
const columns = visualization.columns || [];
|
|
54
54
|
const rows = visualization.rows || [];
|
|
55
55
|
columns.concat(rows).forEach(d => {
|
|
56
|
-
var _d$legendSet, _d$programStage, _d$repetition
|
|
56
|
+
var _d$legendSet, _d$programStage, _d$repetition;
|
|
57
57
|
let dimension = d.dimension;
|
|
58
58
|
if ((_d$legendSet = d.legendSet) !== null && _d$legendSet !== void 0 && _d$legendSet.id) {
|
|
59
59
|
dimension += `-${d.legendSet.id}`;
|
|
@@ -62,7 +62,7 @@ class AnalyticsRequest extends (0, _AnalyticsRequestDimensionsMixin.default)((0,
|
|
|
62
62
|
dimension += `:${d.filter}`;
|
|
63
63
|
}
|
|
64
64
|
const programStageId = (_d$programStage = d.programStage) === null || _d$programStage === void 0 ? void 0 : _d$programStage.id;
|
|
65
|
-
if ((_d$repetition = d.repetition) !== null && _d$repetition !== void 0 && (_d$repetition
|
|
65
|
+
if ((_d$repetition = d.repetition) !== null && _d$repetition !== void 0 && (_d$repetition = _d$repetition.indexes) !== null && _d$repetition !== void 0 && _d$repetition.length) {
|
|
66
66
|
d.repetition.indexes.forEach(index => {
|
|
67
67
|
var _d$program;
|
|
68
68
|
request = request.addDimension((0, _utils.formatDimension)({
|
|
@@ -93,13 +93,13 @@ class AnalyticsRequest extends (0, _AnalyticsRequestDimensionsMixin.default)((0,
|
|
|
93
93
|
var _f$items;
|
|
94
94
|
request = request.addDimension(f.dimension, (_f$items = f.items) === null || _f$items === void 0 ? void 0 : _f$items.map(item => item.id));
|
|
95
95
|
} else {
|
|
96
|
-
var _f$programStage, _f$repetition
|
|
96
|
+
var _f$programStage, _f$repetition;
|
|
97
97
|
let filterString = f.dimension;
|
|
98
98
|
if (f.filter) {
|
|
99
99
|
filterString += `:${f.filter}`;
|
|
100
100
|
}
|
|
101
101
|
const programStageId = (_f$programStage = f.programStage) === null || _f$programStage === void 0 ? void 0 : _f$programStage.id;
|
|
102
|
-
if ((_f$repetition = f.repetition) !== null && _f$repetition !== void 0 && (_f$repetition
|
|
102
|
+
if ((_f$repetition = f.repetition) !== null && _f$repetition !== void 0 && (_f$repetition = _f$repetition.indexes) !== null && _f$repetition !== void 0 && _f$repetition.length) {
|
|
103
103
|
f.repetition.indexes.forEach(index => {
|
|
104
104
|
var _f$program;
|
|
105
105
|
request = request.addFilter((0, _utils.formatDimension)({
|
|
@@ -29,7 +29,8 @@ const CalculationModal = ({
|
|
|
29
29
|
onSave,
|
|
30
30
|
onClose,
|
|
31
31
|
onDelete,
|
|
32
|
-
displayNameProp
|
|
32
|
+
displayNameProp,
|
|
33
|
+
height
|
|
33
34
|
}) => {
|
|
34
35
|
const {
|
|
35
36
|
show: showError
|
|
@@ -277,7 +278,8 @@ const CalculationModal = ({
|
|
|
277
278
|
className: `jsx-${_CalculationModalStyle.default.__hash}` + " " + "left-section"
|
|
278
279
|
}, /*#__PURE__*/_react.default.createElement(_DataElementSelector.default, {
|
|
279
280
|
displayNameProp: displayNameProp,
|
|
280
|
-
onDoubleClick: addItem
|
|
281
|
+
onDoubleClick: addItem,
|
|
282
|
+
height: height
|
|
281
283
|
}), /*#__PURE__*/_react.default.createElement(_MathOperatorSelector.default, {
|
|
282
284
|
onDoubleClick: addItem
|
|
283
285
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -378,6 +380,7 @@ CalculationModal.propTypes = {
|
|
|
378
380
|
expression: _propTypes.default.string,
|
|
379
381
|
id: _propTypes.default.string,
|
|
380
382
|
name: _propTypes.default.string
|
|
381
|
-
})
|
|
383
|
+
}),
|
|
384
|
+
height: _propTypes.default.string
|
|
382
385
|
};
|
|
383
386
|
var _default = exports.default = CalculationModal;
|
|
@@ -19,6 +19,7 @@ var _DataElementOption = _interopRequireDefault(require("./DataElementOption.js"
|
|
|
19
19
|
var _DataElementSelectorStyle = _interopRequireDefault(require("./styles/DataElementSelector.style.js"));
|
|
20
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
const SCROLLBOX_HEIGHT = '337px';
|
|
22
23
|
const getOptions = () => ({
|
|
23
24
|
[_dataTypes.TOTALS]: _index.default.t('Totals only'),
|
|
24
25
|
[_dataTypes.DETAIL]: _index.default.t('Details only')
|
|
@@ -97,7 +98,8 @@ DisaggregationSelector.propTypes = {
|
|
|
97
98
|
};
|
|
98
99
|
const DataElementSelector = ({
|
|
99
100
|
displayNameProp,
|
|
100
|
-
onDoubleClick
|
|
101
|
+
onDoubleClick,
|
|
102
|
+
height = SCROLLBOX_HEIGHT
|
|
101
103
|
}) => {
|
|
102
104
|
const dataEngine = (0, _appRuntime.useDataEngine)();
|
|
103
105
|
const [searchTerm, setSearchTerm] = (0, _react.useState)('');
|
|
@@ -223,6 +225,9 @@ const DataElementSelector = ({
|
|
|
223
225
|
className: `jsx-${_DataElementSelectorStyle.default.__hash}` + " " + "dimension-list-overlay"
|
|
224
226
|
}, /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
225
227
|
ref: rootRef,
|
|
228
|
+
style: {
|
|
229
|
+
height
|
|
230
|
+
},
|
|
226
231
|
onScroll: () => {
|
|
227
232
|
if (isSorting) {
|
|
228
233
|
rootRef.current.scrollTo({
|
|
@@ -259,6 +264,7 @@ const DataElementSelector = ({
|
|
|
259
264
|
};
|
|
260
265
|
DataElementSelector.propTypes = {
|
|
261
266
|
displayNameProp: _propTypes.default.string.isRequired,
|
|
262
|
-
onDoubleClick: _propTypes.default.func.isRequired
|
|
267
|
+
onDoubleClick: _propTypes.default.func.isRequired,
|
|
268
|
+
height: _propTypes.default.string
|
|
263
269
|
};
|
|
264
270
|
var _default = exports.default = DataElementSelector;
|
|
@@ -127,8 +127,8 @@ const OuterDndContext = ({
|
|
|
127
127
|
active,
|
|
128
128
|
over
|
|
129
129
|
}) => {
|
|
130
|
-
var _over$data, _over$data$current, _over$data$
|
|
131
|
-
if (!(over !== null && over !== void 0 && over.id) || (over === null || over === void 0
|
|
130
|
+
var _over$data, _over$data$current, _over$data$current2;
|
|
131
|
+
if (!(over !== null && over !== void 0 && over.id) || (over === null || over === void 0 || (_over$data = over.data) === null || _over$data === void 0 || (_over$data = _over$data.current) === null || _over$data === void 0 || (_over$data = _over$data.sortable) === null || _over$data === void 0 ? void 0 : _over$data.containerId) === OPTIONS_PANEL || !active.data.current) {
|
|
132
132
|
// dropped over non-droppable or over options panel
|
|
133
133
|
handleDragCancel();
|
|
134
134
|
return;
|
|
@@ -144,8 +144,8 @@ const OuterDndContext = ({
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
const destination = {
|
|
147
|
-
containerId: ((_over$data$
|
|
148
|
-
index: (_over$data$
|
|
147
|
+
containerId: ((_over$data$current = over.data.current) === null || _over$data$current === void 0 ? void 0 : _over$data$current.sortable.containerId) || over.id,
|
|
148
|
+
index: (_over$data$current2 = over.data.current) === null || _over$data$current2 === void 0 ? void 0 : _over$data$current2.sortable.index
|
|
149
149
|
};
|
|
150
150
|
onDragEnd({
|
|
151
151
|
item,
|
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _ui = require("@dhis2/ui");
|
|
8
|
-
const _defaultExport = [".dimension-list-container.jsx-
|
|
9
|
-
_defaultExport.__hash = "
|
|
8
|
+
const _defaultExport = [".dimension-list-container.jsx-1805862671{position:relative;}", `.dimension-list-scrollbox.jsx-1805862671{position:relative;width:100%;overflow:hidden;overflow-y:auto;border:1px solid ${_ui.colors.grey400};}`, `.dimension-list-scroller.jsx-1805862671{position:relative;min-height:1px;padding:0 ${_ui.spacers.dp4};}`, ".dimension-list-scroller.loading.jsx-1805862671{-webkit-filter:blur(2px);filter:blur(2px);}", ".scroll-detector.jsx-1805862671{boxsizing:border-box;width:100%;height:100px;position:absolute;bottom:0;left:0;z-index:-1;}", ".dimension-list-overlay.jsx-1805862671{position:absolute;width:100%;height:100%;z-index:2;top:0;left:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-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;}", `.filter-wrapper.jsx-1805862671{padding:${_ui.spacers.dp8};border:1px solid ${_ui.colors.grey400};border-bottom:0;}`, `.selector-wrapper.jsx-1805862671{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:${_ui.spacers.dp4};}`, `.sub-header.jsx-1805862671{font-size:14px;font-weight:normal;margin:0 0 ${_ui.spacers.dp4};}`, `.group-select.jsx-1805862671{width:50%;margin-top:${_ui.spacers.dp4};}`, `.empty-list.jsx-1805862671{text-align:center;font-size:14px;line-height:16px;margin:${_ui.spacers.dp24} 0 0;color:${_ui.colors.grey700};}`];
|
|
9
|
+
_defaultExport.__hash = "1805862671";
|
|
10
10
|
var _default = exports.default = _defaultExport;
|
|
@@ -25,7 +25,10 @@ const DataDimension = ({
|
|
|
25
25
|
enabledDataTypes,
|
|
26
26
|
infoBoxMessage,
|
|
27
27
|
onCalculationSave,
|
|
28
|
-
visType
|
|
28
|
+
visType,
|
|
29
|
+
height,
|
|
30
|
+
heightCalculation,
|
|
31
|
+
maxSelections
|
|
29
32
|
}) => {
|
|
30
33
|
const {
|
|
31
34
|
serverVersion
|
|
@@ -101,7 +104,10 @@ const DataDimension = ({
|
|
|
101
104
|
setCurrentCalculation: setCurrentCalculation,
|
|
102
105
|
infoDataItem: infoDataItem,
|
|
103
106
|
setInfoDataItem: setInfoDataItem,
|
|
104
|
-
onEditClick: onEditClick
|
|
107
|
+
onEditClick: onEditClick,
|
|
108
|
+
height: height,
|
|
109
|
+
heightCalculation: heightCalculation,
|
|
110
|
+
maxSelections: maxSelections
|
|
105
111
|
}), currentDataItem && /*#__PURE__*/_react.default.createElement(_ItemOptionsSelector.ItemOptionsSelector, _extends({}, currentDataItem, {
|
|
106
112
|
selectedItems: selectedItems,
|
|
107
113
|
onSelect: onSelectItems,
|
|
@@ -111,7 +117,9 @@ const DataDimension = ({
|
|
|
111
117
|
infoDataItem: infoDataItem,
|
|
112
118
|
setInfoDataItem: setInfoDataItem,
|
|
113
119
|
onClose: () => setCurrentDataItem(),
|
|
114
|
-
onEditClick: onEditClick
|
|
120
|
+
onEditClick: onEditClick,
|
|
121
|
+
height: height,
|
|
122
|
+
maxSelections: maxSelections
|
|
115
123
|
})), infoDataItem && /*#__PURE__*/_react.default.createElement(_InfoPopover.InfoPopover, {
|
|
116
124
|
dataTest: 'data-dimension-info',
|
|
117
125
|
item: infoDataItem,
|
|
@@ -132,7 +140,10 @@ DataDimension.propTypes = {
|
|
|
132
140
|
onSelect: _propTypes.default.func.isRequired,
|
|
133
141
|
currentUser: _propTypes.default.object,
|
|
134
142
|
enabledDataTypes: _propTypes.default.array,
|
|
143
|
+
height: _propTypes.default.string,
|
|
144
|
+
heightCalculation: _propTypes.default.string,
|
|
135
145
|
infoBoxMessage: _propTypes.default.string,
|
|
146
|
+
maxSelections: _propTypes.default.number,
|
|
136
147
|
visType: _propTypes.default.string,
|
|
137
148
|
onCalculationSave: _propTypes.default.func
|
|
138
149
|
};
|
|
@@ -52,7 +52,7 @@ const DataElementOperandInfo = ({
|
|
|
52
52
|
const dataElementOperand = dataElementOperands.dataElementOperands[0]
|
|
53
53
|
|
|
54
54
|
// copy some common fields from dataElement
|
|
55
|
-
|
|
55
|
+
;
|
|
56
56
|
['code', 'created', 'createdBy', 'displayDescription', 'lastUpdated'].forEach(key => dataElementOperand[key] = dataElementOperand.dataElement[key]);
|
|
57
57
|
|
|
58
58
|
// inject href as it is not returned from the API
|
|
@@ -47,7 +47,9 @@ const ItemOptionsSelector = ({
|
|
|
47
47
|
onEditClick,
|
|
48
48
|
onSelect,
|
|
49
49
|
onClose,
|
|
50
|
-
dataTest
|
|
50
|
+
dataTest,
|
|
51
|
+
height = _dimensionSelectorHelper.TRANSFER_HEIGHT,
|
|
52
|
+
maxSelections
|
|
51
53
|
}) => {
|
|
52
54
|
var _state$filter;
|
|
53
55
|
const [state, setState] = (0, _react.useState)({
|
|
@@ -78,7 +80,7 @@ const ItemOptionsSelector = ({
|
|
|
78
80
|
searchTerm: state.searchTerm
|
|
79
81
|
});
|
|
80
82
|
const newOptions = [];
|
|
81
|
-
(_result$dimensionItem = result.dimensionItems) === null || _result$dimensionItem === void 0
|
|
83
|
+
(_result$dimensionItem = result.dimensionItems) === null || _result$dimensionItem === void 0 || _result$dimensionItem.forEach(item => {
|
|
82
84
|
newOptions.push({
|
|
83
85
|
label: item.name,
|
|
84
86
|
value: item.id,
|
|
@@ -189,8 +191,8 @@ const ItemOptionsSelector = ({
|
|
|
189
191
|
rightHeader: /*#__PURE__*/_react.default.createElement("p", {
|
|
190
192
|
className: `jsx-${_DimensionSelectorStyle.default.__hash} jsx-${_ItemOptionSelectorStyle.default.__hash}` + " " + "rightHeader"
|
|
191
193
|
}, _index.default.t('Selected items')),
|
|
192
|
-
enableOrderChange:
|
|
193
|
-
height:
|
|
194
|
+
enableOrderChange: !maxSelections || maxSelections > 1,
|
|
195
|
+
height: height,
|
|
194
196
|
optionsWidth: _dimensionSelectorHelper.TRANSFER_OPTIONS_WIDTH,
|
|
195
197
|
selectedWidth: _dimensionSelectorHelper.TRANSFER_SELECTED_WIDTH,
|
|
196
198
|
selectedEmptyComponent: /*#__PURE__*/_react.default.createElement(_SelectedEmptyPlaceholder.SelectedEmptyPlaceholder, null),
|
|
@@ -215,6 +217,7 @@ const ItemOptionsSelector = ({
|
|
|
215
217
|
/* eslint-enable react/prop-types */
|
|
216
218
|
}));
|
|
217
219
|
},
|
|
220
|
+
maxSelections: maxSelections,
|
|
218
221
|
dataTest: `${dataTest}-option-view-mode-transfer`
|
|
219
222
|
}), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
220
223
|
id: _DimensionSelectorStyle.default.__hash
|
|
@@ -231,8 +234,10 @@ ItemOptionsSelector.propTypes = {
|
|
|
231
234
|
onClose: _propTypes.default.func.isRequired,
|
|
232
235
|
onSelect: _propTypes.default.func.isRequired,
|
|
233
236
|
dataTest: _propTypes.default.string,
|
|
237
|
+
height: _propTypes.default.string,
|
|
234
238
|
infoDataItem: _propTypes.default.object,
|
|
235
239
|
itemsRef: _propTypes.default.object,
|
|
240
|
+
maxSelections: _propTypes.default.number,
|
|
236
241
|
selectedItems: _propTypes.default.arrayOf(_propTypes.default.exact({
|
|
237
242
|
label: _propTypes.default.string.isRequired,
|
|
238
243
|
value: _propTypes.default.string.isRequired,
|
|
@@ -114,7 +114,10 @@ const ItemSelector = ({
|
|
|
114
114
|
onEDISave,
|
|
115
115
|
onEditClick,
|
|
116
116
|
isOptionViewMode,
|
|
117
|
-
supportsEDI
|
|
117
|
+
supportsEDI,
|
|
118
|
+
height = _dimensionSelectorHelper.TRANSFER_HEIGHT,
|
|
119
|
+
heightCalculation,
|
|
120
|
+
maxSelections
|
|
118
121
|
}) => {
|
|
119
122
|
const [state, setState] = (0, _react.useState)({
|
|
120
123
|
searchTerm: '',
|
|
@@ -149,7 +152,7 @@ const ItemSelector = ({
|
|
|
149
152
|
searchTerm: state.searchTerm
|
|
150
153
|
});
|
|
151
154
|
const newOptions = [];
|
|
152
|
-
(_result$dimensionItem = result.dimensionItems) === null || _result$dimensionItem === void 0
|
|
155
|
+
(_result$dimensionItem = result.dimensionItems) === null || _result$dimensionItem === void 0 || _result$dimensionItem.forEach(item => {
|
|
153
156
|
if (item.dimensionItemType === _dataSets.REPORTING_RATE) {
|
|
154
157
|
if (state.filter.subGroup && state.filter.subGroup !== _dataTypes.DIMENSION_TYPE_ALL) {
|
|
155
158
|
const metric = _dataSets.DATA_SETS_CONSTANTS.find(item => item.id === state.filter.subGroup);
|
|
@@ -342,8 +345,8 @@ const ItemSelector = ({
|
|
|
342
345
|
onClick: () => setCurrentCalculation({}),
|
|
343
346
|
small: true
|
|
344
347
|
}, _index.default.t('Calculation'))) : undefined,
|
|
345
|
-
enableOrderChange:
|
|
346
|
-
height:
|
|
348
|
+
enableOrderChange: !maxSelections || maxSelections > 1,
|
|
349
|
+
height: height,
|
|
347
350
|
optionsWidth: _dimensionSelectorHelper.TRANSFER_OPTIONS_WIDTH,
|
|
348
351
|
selectedWidth: _dimensionSelectorHelper.TRANSFER_SELECTED_WIDTH,
|
|
349
352
|
selectedEmptyComponent: /*#__PURE__*/_react.default.createElement(_SelectedEmptyPlaceholder.SelectedEmptyPlaceholder, null),
|
|
@@ -370,13 +373,15 @@ const ItemSelector = ({
|
|
|
370
373
|
})
|
|
371
374
|
/* eslint-enable react/prop-types */
|
|
372
375
|
})),
|
|
376
|
+
maxSelections: maxSelections,
|
|
373
377
|
dataTest: `${dataTest}-transfer`
|
|
374
378
|
}), currentCalculation && supportsEDI && /*#__PURE__*/_react.default.createElement(_CalculationModal.default, {
|
|
375
379
|
calculation: currentCalculation,
|
|
376
380
|
onSave: onSaveCalculation,
|
|
377
381
|
onClose: () => setCurrentCalculation(),
|
|
378
382
|
onDelete: onDeleteCalculation,
|
|
379
|
-
displayNameProp: displayNameProp
|
|
383
|
+
displayNameProp: displayNameProp,
|
|
384
|
+
height: heightCalculation
|
|
380
385
|
}), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
381
386
|
id: _DimensionSelectorStyle.default.__hash
|
|
382
387
|
}, _DimensionSelectorStyle.default));
|
|
@@ -387,10 +392,13 @@ ItemSelector.propTypes = {
|
|
|
387
392
|
currentCalculation: _propTypes.default.object,
|
|
388
393
|
dataTest: _propTypes.default.string,
|
|
389
394
|
dataTypes: _propTypes.default.array,
|
|
395
|
+
height: _propTypes.default.string,
|
|
396
|
+
heightCalculation: _propTypes.default.string,
|
|
390
397
|
infoBoxMessage: _propTypes.default.string,
|
|
391
398
|
infoDataItem: _propTypes.default.object,
|
|
392
399
|
isOptionViewMode: _propTypes.default.bool,
|
|
393
400
|
itemsRef: _propTypes.default.object,
|
|
401
|
+
maxSelections: _propTypes.default.number,
|
|
394
402
|
noItemsMessage: _propTypes.default.string,
|
|
395
403
|
rightFooter: _propTypes.default.node,
|
|
396
404
|
selectedItems: _propTypes.default.arrayOf(_propTypes.default.exact({
|
|
@@ -189,13 +189,13 @@ const Editor = exports.Editor = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
189
189
|
(0, _react.useEffect)(() => {
|
|
190
190
|
if (initialFocus) {
|
|
191
191
|
var _textareaRef$current;
|
|
192
|
-
(_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0
|
|
192
|
+
(_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 || _textareaRef$current.focus();
|
|
193
193
|
}
|
|
194
194
|
}, [initialFocus, textareaRef]);
|
|
195
195
|
(0, _react.useEffect)(() => {
|
|
196
196
|
if (caretPosRef.current) {
|
|
197
197
|
var _textareaRef$current2;
|
|
198
|
-
(_textareaRef$current2 = textareaRef.current) === null || _textareaRef$current2 === void 0
|
|
198
|
+
(_textareaRef$current2 = textareaRef.current) === null || _textareaRef$current2 === void 0 || _textareaRef$current2.setSelectionRange(caretPosRef.current, caretPosRef.current);
|
|
199
199
|
caretPosRef.current = undefined;
|
|
200
200
|
}
|
|
201
201
|
}, [value, textareaRef]);
|
|
@@ -57,45 +57,90 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
57
57
|
//------------------------------------------------------------------------------
|
|
58
58
|
|
|
59
59
|
const namespace = 'default';
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_d2I18n.default.
|
|
65
|
-
_d2I18n.default.
|
|
66
|
-
_d2I18n.default.
|
|
67
|
-
_d2I18n.default.
|
|
68
|
-
_d2I18n.default.
|
|
69
|
-
_d2I18n.default.
|
|
70
|
-
_d2I18n.default.
|
|
71
|
-
_d2I18n.default.
|
|
72
|
-
_d2I18n.default.
|
|
73
|
-
_d2I18n.default.
|
|
74
|
-
_d2I18n.default.
|
|
75
|
-
_d2I18n.default.
|
|
76
|
-
_d2I18n.default.
|
|
77
|
-
_d2I18n.default.
|
|
78
|
-
_d2I18n.default.
|
|
79
|
-
_d2I18n.default.
|
|
80
|
-
_d2I18n.default.
|
|
81
|
-
_d2I18n.default.
|
|
82
|
-
_d2I18n.default.
|
|
83
|
-
_d2I18n.default.
|
|
84
|
-
_d2I18n.default.
|
|
85
|
-
_d2I18n.default.
|
|
86
|
-
_d2I18n.default.
|
|
87
|
-
_d2I18n.default.
|
|
88
|
-
_d2I18n.default.
|
|
89
|
-
_d2I18n.default.
|
|
90
|
-
_d2I18n.default.
|
|
91
|
-
_d2I18n.default.
|
|
92
|
-
_d2I18n.default.
|
|
93
|
-
_d2I18n.default.
|
|
94
|
-
_d2I18n.default.
|
|
95
|
-
_d2I18n.default.
|
|
96
|
-
_d2I18n.default.
|
|
97
|
-
_d2I18n.default.
|
|
98
|
-
_d2I18n.default.
|
|
99
|
-
_d2I18n.default.
|
|
100
|
-
_d2I18n.default.
|
|
60
|
+
|
|
61
|
+
// Use 'deep' = true and 'overwrite' = false to add to, but not overwrite,
|
|
62
|
+
// custom translations from the datastore (added by the app adapter)
|
|
63
|
+
|
|
64
|
+
_d2I18n.default.addResourceBundle('ar', namespace, _translations.default, true, false);
|
|
65
|
+
_d2I18n.default.addResourceBundle('ar', namespace, _translations.default, true, false);
|
|
66
|
+
_d2I18n.default.addResourceBundle('ar_EG', namespace, _translations2.default, true, false);
|
|
67
|
+
_d2I18n.default.addResourceBundle('ar-EG', namespace, _translations2.default, true, false);
|
|
68
|
+
_d2I18n.default.addResourceBundle('ar_IQ', namespace, _translations3.default, true, false);
|
|
69
|
+
_d2I18n.default.addResourceBundle('ar-IQ', namespace, _translations3.default, true, false);
|
|
70
|
+
_d2I18n.default.addResourceBundle('bn', namespace, _translations4.default, true, false);
|
|
71
|
+
_d2I18n.default.addResourceBundle('bn', namespace, _translations4.default, true, false);
|
|
72
|
+
_d2I18n.default.addResourceBundle('ckb', namespace, _translations5.default, true, false);
|
|
73
|
+
_d2I18n.default.addResourceBundle('ckb', namespace, _translations5.default, true, false);
|
|
74
|
+
_d2I18n.default.addResourceBundle('cs', namespace, _translations6.default, true, false);
|
|
75
|
+
_d2I18n.default.addResourceBundle('cs', namespace, _translations6.default, true, false);
|
|
76
|
+
_d2I18n.default.addResourceBundle('da', namespace, _translations7.default, true, false);
|
|
77
|
+
_d2I18n.default.addResourceBundle('da', namespace, _translations7.default, true, false);
|
|
78
|
+
_d2I18n.default.addResourceBundle('en', namespace, _translations8.default, true, false);
|
|
79
|
+
_d2I18n.default.addResourceBundle('en', namespace, _translations8.default, true, false);
|
|
80
|
+
_d2I18n.default.addResourceBundle('en_US', namespace, _translations9.default, true, false);
|
|
81
|
+
_d2I18n.default.addResourceBundle('en-US', namespace, _translations9.default, true, false);
|
|
82
|
+
_d2I18n.default.addResourceBundle('es', namespace, _translations0.default, true, false);
|
|
83
|
+
_d2I18n.default.addResourceBundle('es', namespace, _translations0.default, true, false);
|
|
84
|
+
_d2I18n.default.addResourceBundle('es_419', namespace, _translations1.default, true, false);
|
|
85
|
+
_d2I18n.default.addResourceBundle('es-419', namespace, _translations1.default, true, false);
|
|
86
|
+
_d2I18n.default.addResourceBundle('fr', namespace, _translations10.default, true, false);
|
|
87
|
+
_d2I18n.default.addResourceBundle('fr', namespace, _translations10.default, true, false);
|
|
88
|
+
_d2I18n.default.addResourceBundle('hi_IN', namespace, _translations11.default, true, false);
|
|
89
|
+
_d2I18n.default.addResourceBundle('hi-IN', namespace, _translations11.default, true, false);
|
|
90
|
+
_d2I18n.default.addResourceBundle('id', namespace, _translations12.default, true, false);
|
|
91
|
+
_d2I18n.default.addResourceBundle('id', namespace, _translations12.default, true, false);
|
|
92
|
+
_d2I18n.default.addResourceBundle('km', namespace, _translations13.default, true, false);
|
|
93
|
+
_d2I18n.default.addResourceBundle('km', namespace, _translations13.default, true, false);
|
|
94
|
+
_d2I18n.default.addResourceBundle('lo', namespace, _translations14.default, true, false);
|
|
95
|
+
_d2I18n.default.addResourceBundle('lo', namespace, _translations14.default, true, false);
|
|
96
|
+
_d2I18n.default.addResourceBundle('my', namespace, _translations15.default, true, false);
|
|
97
|
+
_d2I18n.default.addResourceBundle('my', namespace, _translations15.default, true, false);
|
|
98
|
+
_d2I18n.default.addResourceBundle('nb', namespace, _translations16.default, true, false);
|
|
99
|
+
_d2I18n.default.addResourceBundle('nb', namespace, _translations16.default, true, false);
|
|
100
|
+
_d2I18n.default.addResourceBundle('ne', namespace, _translations17.default, true, false);
|
|
101
|
+
_d2I18n.default.addResourceBundle('ne', namespace, _translations17.default, true, false);
|
|
102
|
+
_d2I18n.default.addResourceBundle('nl', namespace, _translations18.default, true, false);
|
|
103
|
+
_d2I18n.default.addResourceBundle('nl', namespace, _translations18.default, true, false);
|
|
104
|
+
_d2I18n.default.addResourceBundle('or', namespace, _translations19.default, true, false);
|
|
105
|
+
_d2I18n.default.addResourceBundle('or', namespace, _translations19.default, true, false);
|
|
106
|
+
_d2I18n.default.addResourceBundle('prs', namespace, _translations20.default, true, false);
|
|
107
|
+
_d2I18n.default.addResourceBundle('prs', namespace, _translations20.default, true, false);
|
|
108
|
+
_d2I18n.default.addResourceBundle('ps', namespace, _translations21.default, true, false);
|
|
109
|
+
_d2I18n.default.addResourceBundle('ps', namespace, _translations21.default, true, false);
|
|
110
|
+
_d2I18n.default.addResourceBundle('pt', namespace, _translations22.default, true, false);
|
|
111
|
+
_d2I18n.default.addResourceBundle('pt', namespace, _translations22.default, true, false);
|
|
112
|
+
_d2I18n.default.addResourceBundle('pt_BR', namespace, _translations23.default, true, false);
|
|
113
|
+
_d2I18n.default.addResourceBundle('pt-BR', namespace, _translations23.default, true, false);
|
|
114
|
+
_d2I18n.default.addResourceBundle('ro', namespace, _translations24.default, true, false);
|
|
115
|
+
_d2I18n.default.addResourceBundle('ro', namespace, _translations24.default, true, false);
|
|
116
|
+
_d2I18n.default.addResourceBundle('ru', namespace, _translations25.default, true, false);
|
|
117
|
+
_d2I18n.default.addResourceBundle('ru', namespace, _translations25.default, true, false);
|
|
118
|
+
_d2I18n.default.addResourceBundle('si', namespace, _translations26.default, true, false);
|
|
119
|
+
_d2I18n.default.addResourceBundle('si', namespace, _translations26.default, true, false);
|
|
120
|
+
_d2I18n.default.addResourceBundle('sv', namespace, _translations27.default, true, false);
|
|
121
|
+
_d2I18n.default.addResourceBundle('sv', namespace, _translations27.default, true, false);
|
|
122
|
+
_d2I18n.default.addResourceBundle('tet', namespace, _translations28.default, true, false);
|
|
123
|
+
_d2I18n.default.addResourceBundle('tet', namespace, _translations28.default, true, false);
|
|
124
|
+
_d2I18n.default.addResourceBundle('tg', namespace, _translations29.default, true, false);
|
|
125
|
+
_d2I18n.default.addResourceBundle('tg', namespace, _translations29.default, true, false);
|
|
126
|
+
_d2I18n.default.addResourceBundle('th', namespace, _translations30.default, true, false);
|
|
127
|
+
_d2I18n.default.addResourceBundle('th', namespace, _translations30.default, true, false);
|
|
128
|
+
_d2I18n.default.addResourceBundle('uk', namespace, _translations31.default, true, false);
|
|
129
|
+
_d2I18n.default.addResourceBundle('uk', namespace, _translations31.default, true, false);
|
|
130
|
+
_d2I18n.default.addResourceBundle('ur', namespace, _translations32.default, true, false);
|
|
131
|
+
_d2I18n.default.addResourceBundle('ur', namespace, _translations32.default, true, false);
|
|
132
|
+
_d2I18n.default.addResourceBundle('uz_Cyrl', namespace, _translations33.default, true, false);
|
|
133
|
+
_d2I18n.default.addResourceBundle('uz-Cyrl', namespace, _translations33.default, true, false);
|
|
134
|
+
_d2I18n.default.addResourceBundle('uz_Latn', namespace, _translations34.default, true, false);
|
|
135
|
+
_d2I18n.default.addResourceBundle('uz-Latn', namespace, _translations34.default, true, false);
|
|
136
|
+
_d2I18n.default.addResourceBundle('uz_UZ_Cyrl', namespace, _translations35.default, true, false);
|
|
137
|
+
_d2I18n.default.addResourceBundle('uz-Cyrl-UZ', namespace, _translations35.default, true, false);
|
|
138
|
+
_d2I18n.default.addResourceBundle('uz_UZ_Latn', namespace, _translations36.default, true, false);
|
|
139
|
+
_d2I18n.default.addResourceBundle('uz-Latn-UZ', namespace, _translations36.default, true, false);
|
|
140
|
+
_d2I18n.default.addResourceBundle('vi', namespace, _translations37.default, true, false);
|
|
141
|
+
_d2I18n.default.addResourceBundle('vi', namespace, _translations37.default, true, false);
|
|
142
|
+
_d2I18n.default.addResourceBundle('zh', namespace, _translations38.default, true, false);
|
|
143
|
+
_d2I18n.default.addResourceBundle('zh', namespace, _translations38.default, true, false);
|
|
144
|
+
_d2I18n.default.addResourceBundle('zh_CN', namespace, _translations39.default, true, false);
|
|
145
|
+
_d2I18n.default.addResourceBundle('zh-CN', namespace, _translations39.default, true, false);
|
|
101
146
|
var _default = exports.default = _d2I18n.default;
|
|
@@ -10,7 +10,7 @@ const LEGEND_DISPLAY_STYLE_FILL = exports.LEGEND_DISPLAY_STYLE_FILL = 'FILL';
|
|
|
10
10
|
const LEGEND_DISPLAY_STYLE_TEXT = exports.LEGEND_DISPLAY_STYLE_TEXT = 'TEXT';
|
|
11
11
|
const getLegendByValueFromLegendSet = (legendSet, value) => {
|
|
12
12
|
var _legendSet$legends;
|
|
13
|
-
return Number.isInteger(parseInt(value)) ? legendSet === null || legendSet === void 0
|
|
13
|
+
return Number.isInteger(parseInt(value)) ? legendSet === null || legendSet === void 0 || (_legendSet$legends = legendSet.legends) === null || _legendSet$legends === void 0 ? void 0 : _legendSet$legends.find(legend => value >= legend.startValue && value < legend.endValue // TODO: Confirm inclusive/exclusive bounds
|
|
14
14
|
) : null;
|
|
15
15
|
};
|
|
16
16
|
exports.getLegendByValueFromLegendSet = getLegendByValueFromLegendSet;
|
|
@@ -8,7 +8,7 @@ var _ui = require("@dhis2/ui");
|
|
|
8
8
|
var _legends = require("../legends.js");
|
|
9
9
|
var _isColorBright = require("./isColorBright.js");
|
|
10
10
|
const getLegendSet = (engine, dxDimension) => {
|
|
11
|
-
var _engine$visualization, _engine$visualization2
|
|
11
|
+
var _engine$visualization, _engine$visualization2;
|
|
12
12
|
let legendSetId;
|
|
13
13
|
switch ((_engine$visualization = engine.visualization.legend) === null || _engine$visualization === void 0 ? void 0 : _engine$visualization.strategy) {
|
|
14
14
|
case _legends.LEGEND_DISPLAY_STRATEGY_BY_DATA_ITEM:
|
|
@@ -18,15 +18,15 @@ const getLegendSet = (engine, dxDimension) => {
|
|
|
18
18
|
break;
|
|
19
19
|
case _legends.LEGEND_DISPLAY_STRATEGY_FIXED:
|
|
20
20
|
default:
|
|
21
|
-
legendSetId = (_engine$visualization2 = engine.visualization.legend) === null || _engine$visualization2 === void 0
|
|
21
|
+
legendSetId = (_engine$visualization2 = engine.visualization.legend) === null || _engine$visualization2 === void 0 || (_engine$visualization2 = _engine$visualization2.set) === null || _engine$visualization2 === void 0 ? void 0 : _engine$visualization2.id;
|
|
22
22
|
break;
|
|
23
23
|
}
|
|
24
24
|
return engine.legendSets[legendSetId];
|
|
25
25
|
};
|
|
26
26
|
const buildStyleObject = (legendColor, engine) => {
|
|
27
|
-
var _engine$
|
|
27
|
+
var _engine$visualization3;
|
|
28
28
|
const style = {};
|
|
29
|
-
switch ((_engine$
|
|
29
|
+
switch ((_engine$visualization3 = engine.visualization.legend) === null || _engine$visualization3 === void 0 ? void 0 : _engine$visualization3.style) {
|
|
30
30
|
case _legends.LEGEND_DISPLAY_STYLE_TEXT:
|
|
31
31
|
style.color = legendColor;
|
|
32
32
|
break;
|
|
@@ -34,11 +34,11 @@ function loadSingleValueSVG() {
|
|
|
34
34
|
while (!fitsWithinContainer && dynamicStyles.hasNext()) {
|
|
35
35
|
styles = dynamicStyles.next();
|
|
36
36
|
valueElement.attr(styles.value);
|
|
37
|
-
subTextElement === null || subTextElement === void 0
|
|
37
|
+
subTextElement === null || subTextElement === void 0 || subTextElement.attr(styles.subText);
|
|
38
38
|
fitsWithinContainer = (0, _checkIfFitsWithinContainer.checkIfFitsWithinContainer)(_getAvailableSpace.getAvailableSpace.call(this, styles.spacing.valueTop), valueElement, subTextElement, icon, subText, styles.spacing);
|
|
39
39
|
}
|
|
40
40
|
_positionElements.positionElements.call(this, valueElement, subTextElement, iconElement, styles.spacing);
|
|
41
41
|
valueElement.attr('visibility', 'visible');
|
|
42
|
-
iconElement === null || iconElement === void 0
|
|
43
|
-
subTextElement === null || subTextElement === void 0
|
|
42
|
+
iconElement === null || iconElement === void 0 || iconElement.attr('visibility', 'visible');
|
|
43
|
+
subTextElement === null || subTextElement === void 0 || subTextElement.attr('visibility', 'visible');
|
|
44
44
|
}
|
|
@@ -48,7 +48,7 @@ function _default({
|
|
|
48
48
|
extraConfig,
|
|
49
49
|
extraOptions
|
|
50
50
|
}) {
|
|
51
|
-
var _layout$legend, _layout$seriesKey, _layout$seriesKey2,
|
|
51
|
+
var _layout$legend, _layout$seriesKey, _layout$seriesKey2, _config$xAxis;
|
|
52
52
|
const _layout = getTransformedLayout(layout);
|
|
53
53
|
const _extraOptions = getTransformedExtraOptions(extraOptions);
|
|
54
54
|
const stacked = (0, _visTypes.isStacked)(_layout.type);
|
|
@@ -91,7 +91,7 @@ function _default({
|
|
|
91
91
|
// legend
|
|
92
92
|
legend: (0, _legend.default)({
|
|
93
93
|
isHidden: (_layout$seriesKey = _layout.seriesKey) === null || _layout$seriesKey === void 0 ? void 0 : _layout$seriesKey.hidden,
|
|
94
|
-
fontStyle: (_layout$seriesKey2 = _layout.seriesKey) === null || _layout$seriesKey2 === void 0
|
|
94
|
+
fontStyle: (_layout$seriesKey2 = _layout.seriesKey) === null || _layout$seriesKey2 === void 0 || (_layout$seriesKey2 = _layout$seriesKey2.label) === null || _layout$seriesKey2 === void 0 ? void 0 : _layout$seriesKey2.fontStyle,
|
|
95
95
|
visType: _layout.type,
|
|
96
96
|
dashboard: _extraOptions.dashboard
|
|
97
97
|
}),
|
|
@@ -192,7 +192,7 @@ function _default({
|
|
|
192
192
|
displayStrategy
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
(_series = series) === null || _series === void 0
|
|
195
|
+
(_series = series) === null || _series === void 0 || _series.forEach(seriesObj => {
|
|
196
196
|
// animation
|
|
197
197
|
seriesObj.animation = extraOptions.dashboard ? false : {
|
|
198
198
|
duration: getAnimation(extraOptions.animation, DEFAULT_ANIMATION_DURATION)
|
|
@@ -77,9 +77,9 @@ function subtitle(series, layout, metaData, extraOptions) {
|
|
|
77
77
|
switch (layout.type) {
|
|
78
78
|
case _visTypes.VIS_TYPE_SINGLE_VALUE:
|
|
79
79
|
{
|
|
80
|
-
var _defaultFontStyle$FON, _layout$fontStyle
|
|
81
|
-
const defaultColor = _fontStyle.defaultFontStyle === null || _fontStyle.defaultFontStyle === void 0
|
|
82
|
-
const customColor = layout === null || layout === void 0
|
|
80
|
+
var _defaultFontStyle$FON, _layout$fontStyle;
|
|
81
|
+
const defaultColor = _fontStyle.defaultFontStyle === null || _fontStyle.defaultFontStyle === void 0 || (_defaultFontStyle$FON = _fontStyle.defaultFontStyle[_fontStyle.FONT_STYLE_VISUALIZATION_SUBTITLE]) === null || _defaultFontStyle$FON === void 0 ? void 0 : _defaultFontStyle$FON[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR];
|
|
82
|
+
const customColor = layout === null || layout === void 0 || (_layout$fontStyle = layout.fontStyle) === null || _layout$fontStyle === void 0 || (_layout$fontStyle = _layout$fontStyle[_fontStyle.FONT_STYLE_VISUALIZATION_SUBTITLE]) === null || _layout$fontStyle === void 0 ? void 0 : _layout$fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR];
|
|
83
83
|
subtitle.style.color = (0, _singleValue.getSingleValueSubtitleColor)(customColor, defaultColor, series[0], legendOptions, legendSets);
|
|
84
84
|
if (dashboard) {
|
|
85
85
|
// Single value subtitle text should be multiline
|
|
@@ -83,9 +83,9 @@ function _default(layout, metaData, extraOptions, series) {
|
|
|
83
83
|
switch (layout.type) {
|
|
84
84
|
case _visTypes.VIS_TYPE_SINGLE_VALUE:
|
|
85
85
|
{
|
|
86
|
-
var _defaultFontStyle$FON, _layout$fontStyle
|
|
87
|
-
const defaultColor = _fontStyle.defaultFontStyle === null || _fontStyle.defaultFontStyle === void 0
|
|
88
|
-
const customColor = layout === null || layout === void 0
|
|
86
|
+
var _defaultFontStyle$FON, _layout$fontStyle;
|
|
87
|
+
const defaultColor = _fontStyle.defaultFontStyle === null || _fontStyle.defaultFontStyle === void 0 || (_defaultFontStyle$FON = _fontStyle.defaultFontStyle[_fontStyle.FONT_STYLE_VISUALIZATION_TITLE]) === null || _defaultFontStyle$FON === void 0 ? void 0 : _defaultFontStyle$FON[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR];
|
|
88
|
+
const customColor = layout === null || layout === void 0 || (_layout$fontStyle = layout.fontStyle) === null || _layout$fontStyle === void 0 || (_layout$fontStyle = _layout$fontStyle[_fontStyle.FONT_STYLE_VISUALIZATION_TITLE]) === null || _layout$fontStyle === void 0 ? void 0 : _layout$fontStyle[_fontStyle.FONT_STYLE_OPTION_TEXT_COLOR];
|
|
89
89
|
title.style.color = (0, _singleValue.getSingleValueTitleColor)(customColor, defaultColor, series[0], legendOptions, legendSets);
|
|
90
90
|
if (dashboard) {
|
|
91
91
|
// TODO: is this always what we want?
|
|
@@ -40,9 +40,9 @@ _highcharts.default.patterns.forEach((pattern, i) => {
|
|
|
40
40
|
function drawLegendSymbolWrap() {
|
|
41
41
|
const pick = _highcharts.default.pick;
|
|
42
42
|
_highcharts.default.wrap(_highcharts.default.seriesTypes.column.prototype, 'drawLegendSymbol', function (proceed, legend, item) {
|
|
43
|
-
var _this$options$legendS
|
|
43
|
+
var _this$options$legendS;
|
|
44
44
|
const legendItem = item.legendItem;
|
|
45
|
-
if ((_this$options$legendS = this.options.legendSet) !== null && _this$options$legendS !== void 0 && (_this$options$
|
|
45
|
+
if ((_this$options$legendS = this.options.legendSet) !== null && _this$options$legendS !== void 0 && (_this$options$legendS = _this$options$legendS.legends) !== null && _this$options$legendS !== void 0 && _this$options$legendS.length) {
|
|
46
46
|
const ys = legend.baseline - legend.symbolHeight + 1,
|
|
47
47
|
// y start
|
|
48
48
|
x = legend.symbolWidth / 2 > 8 ? legend.symbolWidth / 2 : 8,
|
|
@@ -7,7 +7,7 @@ exports.default = _default;
|
|
|
7
7
|
function _default(acc, series, categories, idValueMap, metaData, extraOptions) {
|
|
8
8
|
var _extraOptions$xAxisLa;
|
|
9
9
|
const seriesData = Array.from({
|
|
10
|
-
length: (extraOptions === null || extraOptions === void 0
|
|
10
|
+
length: (extraOptions === null || extraOptions === void 0 || (_extraOptions$xAxisLa = extraOptions.xAxisLabels) === null || _extraOptions$xAxisLa === void 0 ? void 0 : _extraOptions$xAxisLa.length) || 0
|
|
11
11
|
}, () => null);
|
|
12
12
|
categories[0].forEach(categoryItemId => {
|
|
13
13
|
const position = extraOptions.periodKeyAxisIndexMap[categoryItemId];
|