@qrvey/utils 1.16.1-22 → 1.16.1-24
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/dist/charts/adapters/endpointDataGet.d.ts +1 -1
- package/dist/charts/adapters/endpointDataGet.js +2 -2
- package/dist/cjs/charts/adapters/endpointDataGet.d.ts +1 -1
- package/dist/cjs/charts/adapters/endpointDataGet.js +2 -2
- package/dist/cjs/column_format/helpers/defineXYChartFormat.js +1 -1
- package/dist/column_format/helpers/defineXYChartFormat.js +2 -2
- package/package.json +1 -1
|
@@ -10,5 +10,5 @@ export declare function getRefenceBody(layer: any): any;
|
|
|
10
10
|
export declare function getTrendBody(layer: any): any;
|
|
11
11
|
export declare function getRefenceBodyU(layer: any, body: any): any;
|
|
12
12
|
export declare function getLayerBody(layer: any, dateGroup: any, qrveyid: any): any;
|
|
13
|
-
export declare function setDateGroup(column: any, body: any, obj: any): void;
|
|
13
|
+
export declare function setDateGroup(column: any, body: any, obj: any, defaultMaxDataPoints?: number): void;
|
|
14
14
|
export declare function getSummariesBody(layer: any, body: any): any;
|
|
@@ -374,12 +374,12 @@ function getSortOrder(sorting = {}, category = {}, body = {}) {
|
|
|
374
374
|
},
|
|
375
375
|
];
|
|
376
376
|
}
|
|
377
|
-
export function setDateGroup(column, body, obj) {
|
|
377
|
+
export function setDateGroup(column, body, obj, defaultMaxDataPoints = 61) {
|
|
378
378
|
if (isColumnDate(column) && !isEmpty(_get(body, "dateGroup.label"))) {
|
|
379
379
|
obj["groupType"] = COLUMN.DATE;
|
|
380
380
|
obj["groupValue"] = body.dateGroup.label;
|
|
381
381
|
if (_get(body, "dateGroup.datePart", false)) {
|
|
382
|
-
obj["maxDataPoints"] = obj["maxDataPoints"] ||
|
|
382
|
+
obj["maxDataPoints"] = obj["maxDataPoints"] || defaultMaxDataPoints;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -10,5 +10,5 @@ export declare function getRefenceBody(layer: any): any;
|
|
|
10
10
|
export declare function getTrendBody(layer: any): any;
|
|
11
11
|
export declare function getRefenceBodyU(layer: any, body: any): any;
|
|
12
12
|
export declare function getLayerBody(layer: any, dateGroup: any, qrveyid: any): any;
|
|
13
|
-
export declare function setDateGroup(column: any, body: any, obj: any): void;
|
|
13
|
+
export declare function setDateGroup(column: any, body: any, obj: any, defaultMaxDataPoints?: number): void;
|
|
14
14
|
export declare function getSummariesBody(layer: any, body: any): any;
|
|
@@ -388,12 +388,12 @@ function getSortOrder(sorting = {}, category = {}, body = {}) {
|
|
|
388
388
|
},
|
|
389
389
|
];
|
|
390
390
|
}
|
|
391
|
-
function setDateGroup(column, body, obj) {
|
|
391
|
+
function setDateGroup(column, body, obj, defaultMaxDataPoints = 61) {
|
|
392
392
|
if ((0, endpointDataValidators_1.isColumnDate)(column) && !(0, general_1.isEmpty)((0, general_1._get)(body, "dateGroup.label"))) {
|
|
393
393
|
obj["groupType"] = columns_1.COLUMN.DATE;
|
|
394
394
|
obj["groupValue"] = body.dateGroup.label;
|
|
395
395
|
if ((0, general_1._get)(body, "dateGroup.datePart", false)) {
|
|
396
|
-
obj["maxDataPoints"] = obj["maxDataPoints"] ||
|
|
396
|
+
obj["maxDataPoints"] = obj["maxDataPoints"] || defaultMaxDataPoints;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
}
|
|
@@ -95,7 +95,7 @@ const defineXYChartFormat = (column, settings) => {
|
|
|
95
95
|
else if (hasDefaultFormat) {
|
|
96
96
|
if (!(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format))
|
|
97
97
|
return defaultDecimal;
|
|
98
|
-
if (!definition_1.STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)) {
|
|
98
|
+
if (!definition_1.STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) || constants_1.DURATION_PARTS_LIST.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)) {
|
|
99
99
|
return Object.assign(Object.assign({}, outputFormat), { template: outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format, format: "Duration" });
|
|
100
100
|
}
|
|
101
101
|
return Object.assign({}, outputFormat);
|
|
@@ -3,7 +3,7 @@ import { COLUMN } from "../../columns/constants/COLUMN";
|
|
|
3
3
|
import { STANDARD_NUMERIC_FORMATS, } from "../../format/definition";
|
|
4
4
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
5
5
|
import { CALCULATION_LABEL } from "../../qrvey/constants/CALCULATION_LABEL";
|
|
6
|
-
import { SHELF_TYPE } from "../constants";
|
|
6
|
+
import { DURATION_PARTS_LIST, SHELF_TYPE } from "../constants";
|
|
7
7
|
import { CHART_GROUPS } from "../constants/CHART_GROUP";
|
|
8
8
|
import { DATEGROUP_UNSUPPORT_FORMAT } from "../constants/DATEGROUP_UNSUPPORT_FORMAT";
|
|
9
9
|
import { STRING_FORMAT } from "../constants/STRING_FORMAT";
|
|
@@ -92,7 +92,7 @@ export const defineXYChartFormat = (column, settings) => {
|
|
|
92
92
|
else if (hasDefaultFormat) {
|
|
93
93
|
if (!(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format))
|
|
94
94
|
return defaultDecimal;
|
|
95
|
-
if (!STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)) {
|
|
95
|
+
if (!STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) || DURATION_PARTS_LIST.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)) {
|
|
96
96
|
return Object.assign(Object.assign({}, outputFormat), { template: outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format, format: "Duration" });
|
|
97
97
|
}
|
|
98
98
|
return Object.assign({}, outputFormat);
|