@qrvey/utils 1.9.0-8 → 1.9.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/README.md +1 -1
- package/dist/cjs/filters/services/UChartApi.js +6 -3
- package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.d.ts +2 -0
- package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +3 -1
- package/dist/cjs/qrvey/helpers/transformValue.js +4 -1
- package/dist/filters/services/UChartApi.js +6 -3
- package/dist/globalization/interfaces/tabular_view/II18nTabularView.d.ts +2 -0
- package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +3 -1
- package/dist/qrvey/helpers/transformValue.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,9 +46,12 @@ class UChartApi {
|
|
|
46
46
|
const data = { data: [] };
|
|
47
47
|
if ((0, isRangeValidator_1.isRangeValidator)(uFilter.validator)) {
|
|
48
48
|
data.data = (0, isEmpty_1.isEmpty)(uFilter.column.aggregate)
|
|
49
|
-
? (0, get_1._get)(response, "[0].summary", [])
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
? (0, get_1._get)(response, "[0].summary", [])
|
|
50
|
+
.map((summary) => {
|
|
51
|
+
if (!(0, isEmpty_1.isEmpty)(summary))
|
|
52
|
+
return { value: summary };
|
|
53
|
+
})
|
|
54
|
+
.filter(Boolean)
|
|
52
55
|
: [
|
|
53
56
|
{ value: (0, get_1._get)(response, "[0].extras.summary.min") },
|
|
54
57
|
{ value: (0, get_1._get)(response, "[0].extras.summary.max") },
|
|
@@ -16,6 +16,8 @@ export interface II18nTabularView {
|
|
|
16
16
|
filter_access_point: string;
|
|
17
17
|
no_records_found_message: string;
|
|
18
18
|
select_columns_all_option: string;
|
|
19
|
+
select_columns_date_option: string;
|
|
20
|
+
select_columns_time_option: string;
|
|
19
21
|
select_columns: string;
|
|
20
22
|
sort_access_point: string;
|
|
21
23
|
}
|
|
@@ -15,10 +15,12 @@ exports.I18N_TABULAR_VIEW = {
|
|
|
15
15
|
edit_access_point: "Edit",
|
|
16
16
|
edit_modal_title: "Edit Record",
|
|
17
17
|
edit_modal_edit_option: "Update",
|
|
18
|
-
edit_modal_cancel_option: "
|
|
18
|
+
edit_modal_cancel_option: "Cancel",
|
|
19
19
|
filter_access_point: "Filter",
|
|
20
20
|
no_records_found_message: "No Records Found",
|
|
21
21
|
select_columns_all_option: "All",
|
|
22
|
+
select_columns_date_option: "Date",
|
|
23
|
+
select_columns_time_option: "Time",
|
|
22
24
|
select_columns: "Select Columns",
|
|
23
25
|
sort_access_point: "Sort",
|
|
24
26
|
};
|
|
@@ -33,7 +33,8 @@ exports.transformValue = transformValue;
|
|
|
33
33
|
* @returns the outputformat settings
|
|
34
34
|
*/
|
|
35
35
|
function getOutputFormat(settings) {
|
|
36
|
-
|
|
36
|
+
var _a, _b;
|
|
37
|
+
let type, format, decimals;
|
|
37
38
|
const isDateTime = [
|
|
38
39
|
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.HOUR,
|
|
39
40
|
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.MINUTE,
|
|
@@ -52,10 +53,12 @@ function getOutputFormat(settings) {
|
|
|
52
53
|
else if ((0, isNumericalColumn_1.isNumericalColumn)(settings.column)) {
|
|
53
54
|
type = "NUMERIC";
|
|
54
55
|
format = "Default";
|
|
56
|
+
decimals = (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.column) === null || _a === void 0 ? void 0 : _a.outputFormat) === null || _b === void 0 ? void 0 : _b.decimals;
|
|
55
57
|
}
|
|
56
58
|
return {
|
|
57
59
|
type,
|
|
58
60
|
format,
|
|
61
|
+
decimals,
|
|
59
62
|
originalFormat: isDateTime ? settings.column.outputFormat : undefined,
|
|
60
63
|
};
|
|
61
64
|
}
|
|
@@ -41,9 +41,12 @@ export default class UChartApi {
|
|
|
41
41
|
const data = { data: [] };
|
|
42
42
|
if (isRangeValidator(uFilter.validator)) {
|
|
43
43
|
data.data = isEmpty(uFilter.column.aggregate)
|
|
44
|
-
? _get(response, "[0].summary", [])
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
? _get(response, "[0].summary", [])
|
|
45
|
+
.map((summary) => {
|
|
46
|
+
if (!isEmpty(summary))
|
|
47
|
+
return { value: summary };
|
|
48
|
+
})
|
|
49
|
+
.filter(Boolean)
|
|
47
50
|
: [
|
|
48
51
|
{ value: _get(response, "[0].extras.summary.min") },
|
|
49
52
|
{ value: _get(response, "[0].extras.summary.max") },
|
|
@@ -16,6 +16,8 @@ export interface II18nTabularView {
|
|
|
16
16
|
filter_access_point: string;
|
|
17
17
|
no_records_found_message: string;
|
|
18
18
|
select_columns_all_option: string;
|
|
19
|
+
select_columns_date_option: string;
|
|
20
|
+
select_columns_time_option: string;
|
|
19
21
|
select_columns: string;
|
|
20
22
|
sort_access_point: string;
|
|
21
23
|
}
|
|
@@ -12,10 +12,12 @@ export const I18N_TABULAR_VIEW = {
|
|
|
12
12
|
edit_access_point: "Edit",
|
|
13
13
|
edit_modal_title: "Edit Record",
|
|
14
14
|
edit_modal_edit_option: "Update",
|
|
15
|
-
edit_modal_cancel_option: "
|
|
15
|
+
edit_modal_cancel_option: "Cancel",
|
|
16
16
|
filter_access_point: "Filter",
|
|
17
17
|
no_records_found_message: "No Records Found",
|
|
18
18
|
select_columns_all_option: "All",
|
|
19
|
+
select_columns_date_option: "Date",
|
|
20
|
+
select_columns_time_option: "Time",
|
|
19
21
|
select_columns: "Select Columns",
|
|
20
22
|
sort_access_point: "Sort",
|
|
21
23
|
};
|
|
@@ -29,7 +29,8 @@ export function transformValue(value, settings) {
|
|
|
29
29
|
* @returns the outputformat settings
|
|
30
30
|
*/
|
|
31
31
|
function getOutputFormat(settings) {
|
|
32
|
-
|
|
32
|
+
var _a, _b;
|
|
33
|
+
let type, format, decimals;
|
|
33
34
|
const isDateTime = [
|
|
34
35
|
DATE_GROUPING_TIME_PROPERTY.HOUR,
|
|
35
36
|
DATE_GROUPING_TIME_PROPERTY.MINUTE,
|
|
@@ -48,10 +49,12 @@ function getOutputFormat(settings) {
|
|
|
48
49
|
else if (isNumericalColumn(settings.column)) {
|
|
49
50
|
type = "NUMERIC";
|
|
50
51
|
format = "Default";
|
|
52
|
+
decimals = (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.column) === null || _a === void 0 ? void 0 : _a.outputFormat) === null || _b === void 0 ? void 0 : _b.decimals;
|
|
51
53
|
}
|
|
52
54
|
return {
|
|
53
55
|
type,
|
|
54
56
|
format,
|
|
57
|
+
decimals,
|
|
55
58
|
originalFormat: isDateTime ? settings.column.outputFormat : undefined,
|
|
56
59
|
};
|
|
57
60
|
}
|