@dhis2/analytics 21.0.0-alpha.3 → 21.0.2
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 +2789 -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 +2 -2
- 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 +228 -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 +2 -2
- package/build/cjs/components/FileMenu/FileMenu.js +5 -5
- package/build/cjs/components/FileMenu/FileMenu.styles.js +2 -2
- package/build/cjs/components/FileMenu/GetLinkDialog.js +1 -1
- package/build/cjs/components/FileMenu/RenameDialog.js +2 -2
- package/build/cjs/components/FileMenu/SaveAsDialog.js +2 -2
- 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 +23 -22
- 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 +4 -4
- 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 +5 -5
- 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 +10 -2
- package/build/cjs/locales/en/translations.json +18 -2
- 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/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 +204 -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/FileMenu.js +3 -3
- package/build/es/components/FileMenu/FileMenu.styles.js +2 -2
- package/build/es/components/FileMenu/GetLinkDialog.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 +20 -20
- 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 +2 -1
- package/build/es/locales/en/translations.json +18 -2
- 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 +3 -4
- package/build/cjs/components/OrgUnitDimension/OrgUnitDimensionOld.js +0 -244
- package/build/es/components/OrgUnitDimension/OrgUnitDimensionOld.js +0 -220
|
@@ -50,7 +50,7 @@ const getDailyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
50
50
|
const isFilter = config.filterFuturePeriods;
|
|
51
51
|
const isReverse = config.reversePeriods;
|
|
52
52
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
53
|
-
const date = new Date(
|
|
53
|
+
const date = new Date("01 Jan ".concat(year));
|
|
54
54
|
|
|
55
55
|
while (date.getFullYear() === year) {
|
|
56
56
|
const period = {};
|
|
@@ -99,14 +99,14 @@ const getWeeklyPeriodType = (formatYyyyMmDd, weekObj, fnFilter) => {
|
|
|
99
99
|
while (date.getFullYear() <= year) {
|
|
100
100
|
const period = {};
|
|
101
101
|
period.startDate = formatYyyyMmDd(date);
|
|
102
|
-
period.iso =
|
|
102
|
+
period.iso = "".concat(year).concat(weekObj.shortName, "W").concat(week);
|
|
103
103
|
period.id = period.iso;
|
|
104
104
|
date.setDate(date.getDate() + 6);
|
|
105
105
|
period.endDate = formatYyyyMmDd(date);
|
|
106
106
|
const weekNumber = week;
|
|
107
|
-
period.name =
|
|
107
|
+
period.name = "".concat(i18n.t('Week {{weekNumber}}', {
|
|
108
108
|
weekNumber
|
|
109
|
-
})
|
|
109
|
+
}), " - ").concat(period.startDate, " - ").concat(period.endDate); // if end date is Jan 4th or later, week belongs to next year
|
|
110
110
|
|
|
111
111
|
if (date.getFullYear() > year && date.getDate() >= 4) {
|
|
112
112
|
break;
|
|
@@ -130,7 +130,7 @@ const getBiWeeklyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
130
130
|
const isFilter = config.filterFuturePeriods;
|
|
131
131
|
const isReverse = config.reversePeriods;
|
|
132
132
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
133
|
-
const date = new Date(
|
|
133
|
+
const date = new Date("01 Jan ".concat(year));
|
|
134
134
|
const day = date.getDay();
|
|
135
135
|
let biWeek = 1;
|
|
136
136
|
|
|
@@ -142,15 +142,15 @@ const getBiWeeklyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
142
142
|
|
|
143
143
|
while (date.getFullYear() <= year) {
|
|
144
144
|
const period = {};
|
|
145
|
-
period.iso =
|
|
145
|
+
period.iso = "".concat(year, "BiW").concat(biWeek);
|
|
146
146
|
period.id = period.iso;
|
|
147
147
|
period.startDate = formatYyyyMmDd(date);
|
|
148
148
|
date.setDate(date.getDate() + 13);
|
|
149
149
|
period.endDate = formatYyyyMmDd(date);
|
|
150
150
|
const biWeekNumber = biWeek;
|
|
151
|
-
period.name =
|
|
151
|
+
period.name = "".concat(i18n.t('Bi-Week {{biWeekNumber}}', {
|
|
152
152
|
biWeekNumber
|
|
153
|
-
})
|
|
153
|
+
}), " - ").concat(period.startDate, " - ").concat(period.endDate); // if end date is Jan 4th or later, biweek belongs to next year
|
|
154
154
|
|
|
155
155
|
if (date.getFullYear() > year && date.getDate() >= 4) {
|
|
156
156
|
break;
|
|
@@ -171,7 +171,7 @@ const getMonthlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
171
171
|
const formatIso = date => {
|
|
172
172
|
const y = date.getFullYear();
|
|
173
173
|
let m = String(date.getMonth() + 1);
|
|
174
|
-
m = m.length < 2 ?
|
|
174
|
+
m = m.length < 2 ? "0".concat(m) : m;
|
|
175
175
|
return y + m;
|
|
176
176
|
};
|
|
177
177
|
|
|
@@ -181,7 +181,7 @@ const getMonthlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
181
181
|
const isFilter = config.filterFuturePeriods;
|
|
182
182
|
const isReverse = config.reversePeriods;
|
|
183
183
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
184
|
-
const date = new Date(
|
|
184
|
+
const date = new Date("31 Dec ".concat(year));
|
|
185
185
|
|
|
186
186
|
while (date.getFullYear() === year) {
|
|
187
187
|
const period = {};
|
|
@@ -189,7 +189,7 @@ const getMonthlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
189
189
|
date.setDate(1);
|
|
190
190
|
period.startDate = formatYyyyMmDd(date);
|
|
191
191
|
const monthName = getMonthName(date.getMonth());
|
|
192
|
-
period.name =
|
|
192
|
+
period.name = "".concat(monthName, " ").concat(year);
|
|
193
193
|
period.iso = formatIso(date);
|
|
194
194
|
period.id = period.iso;
|
|
195
195
|
periods.push(period);
|
|
@@ -210,7 +210,7 @@ const getBiMonthlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
210
210
|
const isFilter = config.filterFuturePeriods;
|
|
211
211
|
const isReverse = config.reversePeriods;
|
|
212
212
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
213
|
-
const date = new Date(
|
|
213
|
+
const date = new Date("31 Dec ".concat(year));
|
|
214
214
|
let index = 6;
|
|
215
215
|
|
|
216
216
|
while (date.getFullYear() === year) {
|
|
@@ -222,8 +222,8 @@ const getBiMonthlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
222
222
|
const monthStart = getMonthName(date.getMonth());
|
|
223
223
|
const monthEnd = getMonthName(date.getMonth() + 1);
|
|
224
224
|
const fullYear = date.getFullYear();
|
|
225
|
-
period.name =
|
|
226
|
-
period.iso =
|
|
225
|
+
period.name = "".concat(monthStart, " - ").concat(monthEnd, " ").concat(fullYear);
|
|
226
|
+
period.iso = "".concat(year, "0").concat(index, "B");
|
|
227
227
|
period.id = period.iso;
|
|
228
228
|
periods.push(period);
|
|
229
229
|
date.setDate(0);
|
|
@@ -244,7 +244,7 @@ const getQuarterlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
244
244
|
const isFilter = config.filterFuturePeriods;
|
|
245
245
|
const isReverse = config.reversePeriods;
|
|
246
246
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
247
|
-
const date = new Date(
|
|
247
|
+
const date = new Date("31 Dec ".concat(year));
|
|
248
248
|
let quarter = 4;
|
|
249
249
|
|
|
250
250
|
while (date.getFullYear() === year) {
|
|
@@ -257,8 +257,8 @@ const getQuarterlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
257
257
|
const monthStart = getMonthName(date.getMonth());
|
|
258
258
|
const monthEnd = getMonthName(date.getMonth() + 2);
|
|
259
259
|
const fullYear = date.getFullYear();
|
|
260
|
-
period.name =
|
|
261
|
-
period.iso =
|
|
260
|
+
period.name = "".concat(monthStart, " - ").concat(monthEnd, " ").concat(fullYear);
|
|
261
|
+
period.iso = "".concat(year, "Q").concat(quarter);
|
|
262
262
|
period.id = period.iso;
|
|
263
263
|
periods.push(period);
|
|
264
264
|
date.setDate(0);
|
|
@@ -280,17 +280,17 @@ const getSixMonthlyPeriodType = fnFilter => {
|
|
|
280
280
|
const isReverse = config.reversePeriods;
|
|
281
281
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
282
282
|
let period = {};
|
|
283
|
-
period.startDate =
|
|
284
|
-
period.endDate =
|
|
285
|
-
period.name =
|
|
286
|
-
period.iso =
|
|
283
|
+
period.startDate = "".concat(year, "-01-01");
|
|
284
|
+
period.endDate = "".concat(year, "-06-30");
|
|
285
|
+
period.name = "".concat(getMonthName(0), " - ").concat(getMonthName(5), " ").concat(year);
|
|
286
|
+
period.iso = "".concat(year, "S1");
|
|
287
287
|
period.id = period.iso;
|
|
288
288
|
periods.push(period);
|
|
289
289
|
period = {};
|
|
290
|
-
period.startDate =
|
|
291
|
-
period.endDate =
|
|
292
|
-
period.name =
|
|
293
|
-
period.iso =
|
|
290
|
+
period.startDate = "".concat(year, "-07-01");
|
|
291
|
+
period.endDate = "".concat(year, "-12-31");
|
|
292
|
+
period.name = "".concat(getMonthName(6), " - ").concat(getMonthName(11), " ").concat(year);
|
|
293
|
+
period.iso = "".concat(year, "S2");
|
|
294
294
|
period.id = period.iso;
|
|
295
295
|
periods.push(period);
|
|
296
296
|
periods = isFilter ? fnFilter(periods) : periods;
|
|
@@ -307,17 +307,17 @@ const getSixMonthlyAprilPeriodType = fnFilter => {
|
|
|
307
307
|
const isReverse = config.reversePeriods;
|
|
308
308
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
309
309
|
let period = {};
|
|
310
|
-
period.startDate =
|
|
311
|
-
period.endDate =
|
|
312
|
-
period.name =
|
|
313
|
-
period.iso =
|
|
310
|
+
period.startDate = "".concat(year, "-04-01");
|
|
311
|
+
period.endDate = "".concat(year, "-09-30");
|
|
312
|
+
period.name = "".concat(getMonthName(3), " - ").concat(getMonthName(8), " ").concat(year);
|
|
313
|
+
period.iso = "".concat(year, "AprilS1");
|
|
314
314
|
period.id = period.iso;
|
|
315
315
|
periods.push(period);
|
|
316
316
|
period = {};
|
|
317
|
-
period.startDate =
|
|
318
|
-
period.endDate =
|
|
319
|
-
period.name =
|
|
320
|
-
period.iso =
|
|
317
|
+
period.startDate = "".concat(year, "-10-01");
|
|
318
|
+
period.endDate = "".concat(year + 1, "-03-31");
|
|
319
|
+
period.name = "".concat(getMonthName(9), " ").concat(year, " - ").concat(getMonthName(2), " ").concat(year + 1);
|
|
320
|
+
period.iso = "".concat(year, "AprilS2");
|
|
321
321
|
period.id = period.iso;
|
|
322
322
|
periods.push(period);
|
|
323
323
|
periods = isFilter ? fnFilter(periods) : periods;
|
|
@@ -333,7 +333,7 @@ const getYearlyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
333
333
|
const isFilter = config.filterFuturePeriods;
|
|
334
334
|
const isReverse = config.reversePeriods;
|
|
335
335
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
336
|
-
const date = new Date(
|
|
336
|
+
const date = new Date("31 Dec ".concat(year));
|
|
337
337
|
|
|
338
338
|
while (year - date.getFullYear() < 10) {
|
|
339
339
|
const period = {};
|
|
@@ -362,7 +362,7 @@ const getFinancialOctoberPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
362
362
|
const isFilter = config.filterFuturePeriods;
|
|
363
363
|
const isReverse = config.reversePeriods;
|
|
364
364
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
365
|
-
const date = new Date(
|
|
365
|
+
const date = new Date("30 Sep ".concat(year + 1));
|
|
366
366
|
|
|
367
367
|
for (let i = 0; i < 10; i++) {
|
|
368
368
|
const period = {};
|
|
@@ -372,8 +372,8 @@ const getFinancialOctoberPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
372
372
|
period.startDate = formatYyyyMmDd(date);
|
|
373
373
|
const yearStart = date.getFullYear();
|
|
374
374
|
const yearEnd = date.getFullYear() + 1;
|
|
375
|
-
period.name =
|
|
376
|
-
period.id =
|
|
375
|
+
period.name = "".concat(getMonthName(9), " ").concat(yearStart, " - ").concat(getMonthName(8), " ").concat(yearEnd);
|
|
376
|
+
period.id = "".concat(date.getFullYear(), "Oct");
|
|
377
377
|
periods.push(period);
|
|
378
378
|
date.setDate(date.getDate() - 1);
|
|
379
379
|
}
|
|
@@ -392,7 +392,7 @@ const getFinancialNovemberPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
392
392
|
const isFilter = config.filterFuturePeriods;
|
|
393
393
|
const isReverse = config.reversePeriods;
|
|
394
394
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
395
|
-
const date = new Date(
|
|
395
|
+
const date = new Date("31 Oct ".concat(year + 1));
|
|
396
396
|
|
|
397
397
|
for (let i = 0; i < 10; i++) {
|
|
398
398
|
const period = {};
|
|
@@ -402,8 +402,8 @@ const getFinancialNovemberPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
402
402
|
period.startDate = formatYyyyMmDd(date);
|
|
403
403
|
const yearStart = date.getFullYear();
|
|
404
404
|
const yearEnd = date.getFullYear() + 1;
|
|
405
|
-
period.name =
|
|
406
|
-
period.id =
|
|
405
|
+
period.name = "".concat(getMonthName(10), " ").concat(yearStart, " - ").concat(getMonthName(9), " ").concat(yearEnd);
|
|
406
|
+
period.id = "".concat(date.getFullYear(), "Nov");
|
|
407
407
|
periods.push(period);
|
|
408
408
|
date.setDate(date.getDate() - 1);
|
|
409
409
|
}
|
|
@@ -422,7 +422,7 @@ const getFinancialJulyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
422
422
|
const isFilter = config.filterFuturePeriods;
|
|
423
423
|
const isReverse = config.reversePeriods;
|
|
424
424
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
425
|
-
const date = new Date(
|
|
425
|
+
const date = new Date("30 Jun ".concat(year + 1));
|
|
426
426
|
|
|
427
427
|
for (let i = 0; i < 10; i++) {
|
|
428
428
|
const period = {};
|
|
@@ -432,8 +432,8 @@ const getFinancialJulyPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
432
432
|
period.startDate = formatYyyyMmDd(date);
|
|
433
433
|
const yearStart = date.getFullYear();
|
|
434
434
|
const yearEnd = date.getFullYear() + 1;
|
|
435
|
-
period.name =
|
|
436
|
-
period.id =
|
|
435
|
+
period.name = "".concat(getMonthName(6), " ").concat(yearStart, " - ").concat(getMonthName(5), " ").concat(yearEnd);
|
|
436
|
+
period.id = "".concat(date.getFullYear(), "July");
|
|
437
437
|
periods.push(period);
|
|
438
438
|
date.setDate(date.getDate() - 1);
|
|
439
439
|
}
|
|
@@ -452,7 +452,7 @@ const getFinancialAprilPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
452
452
|
const isFilter = config.filterFuturePeriods;
|
|
453
453
|
const isReverse = config.reversePeriods;
|
|
454
454
|
const year = new Date(Date.now()).getFullYear() + offset;
|
|
455
|
-
const date = new Date(
|
|
455
|
+
const date = new Date("31 Mar ".concat(year + 1));
|
|
456
456
|
|
|
457
457
|
for (let i = 0; i < 10; i++) {
|
|
458
458
|
const period = {};
|
|
@@ -462,8 +462,8 @@ const getFinancialAprilPeriodType = (formatYyyyMmDd, fnFilter) => {
|
|
|
462
462
|
period.startDate = formatYyyyMmDd(date);
|
|
463
463
|
const yearStart = date.getFullYear();
|
|
464
464
|
const yearEnd = date.getFullYear() + 1;
|
|
465
|
-
period.name =
|
|
466
|
-
period.id =
|
|
465
|
+
period.name = "".concat(getMonthName(3), " ").concat(yearStart, " - ").concat(getMonthName(2), " ").concat(yearEnd);
|
|
466
|
+
period.id = "".concat(date.getFullYear(), "April");
|
|
467
467
|
periods.push(period);
|
|
468
468
|
date.setDate(date.getDate() - 1);
|
|
469
469
|
}
|
|
@@ -479,9 +479,9 @@ const formatYyyyMmDd = date => {
|
|
|
479
479
|
const y = date.getFullYear();
|
|
480
480
|
let m = String(date.getMonth() + 1);
|
|
481
481
|
let d = String(date.getDate());
|
|
482
|
-
m = m.length < 2 ?
|
|
483
|
-
d = d.length < 2 ?
|
|
484
|
-
return
|
|
482
|
+
m = m.length < 2 ? "0".concat(m) : m;
|
|
483
|
+
d = d.length < 2 ? "0".concat(d) : d;
|
|
484
|
+
return "".concat(y, "-").concat(m, "-").concat(d);
|
|
485
485
|
};
|
|
486
486
|
|
|
487
487
|
const filterFuturePeriods = periods => {
|
|
@@ -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
2
|
import { Tooltip } from '@dhis2/ui';
|
|
3
3
|
import cx from 'classnames';
|
|
4
|
-
import
|
|
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';
|
|
@@ -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",
|
|
@@ -107,8 +124,7 @@
|
|
|
107
124
|
"{{count}} levels_plural": "{{count}} levels",
|
|
108
125
|
"{{count}} groups": "{{count}} group",
|
|
109
126
|
"{{count}} groups_plural": "{{count}} groups",
|
|
110
|
-
"{{
|
|
111
|
-
"{{count}} user org units_plural": "{{count}} user org units",
|
|
127
|
+
"Selected: {{commaSeparatedListOfOrganisationUnits}}": "Selected: {{commaSeparatedListOfOrganisationUnits}}",
|
|
112
128
|
"Nothing selected": "Nothing selected",
|
|
113
129
|
"User organisation unit": "User organisation unit",
|
|
114
130
|
"User sub-units": "User sub-units",
|
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;
|