@qrvey/utils 1.8.0-5 → 1.8.0-6

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 CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.8.0-5*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.8.0-6*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -56,7 +56,7 @@ const isComparison = (data) => Boolean(data === null || data === void 0 ? void 0
56
56
  export const metricMakeTimeData = (dateColumn, timeData, range) => {
57
57
  const relativObject = getConfigRelativeObjectBytimeLabel(timeData.label, range);
58
58
  if (!isEmpty(relativObject))
59
- return Object.assign(Object.assign({}, relativObject), { questionid: dateColumn.id });
59
+ return Object.assign(Object.assign({}, relativObject), { questionid: dateColumn.id, type: dateColumn === null || dateColumn === void 0 ? void 0 : dateColumn.type });
60
60
  };
61
61
  /**
62
62
  * Given a time label and a custom range, return a relative date config or a metric custom range.
@@ -1,4 +1,4 @@
1
- import { IBColumn } from "../../columns";
1
+ import { IBColumn, IColumnType } from "../../columns";
2
2
  import { IDateGroupingProperty, RelativeCursor } from "../../dates";
3
3
  import { IFBLogic } from "../../filters";
4
4
  import { TimePeriod, TP_CUSTOM_RANGE } from "../../interfaces";
@@ -43,6 +43,7 @@ export declare type RelativeDateConfig = {
43
43
  unit: IDateGroupingProperty;
44
44
  includeCurrent?: boolean;
45
45
  isCalendarDate?: boolean;
46
+ type?: IColumnType;
46
47
  };
47
48
  /**
48
49
  * `MetricCustomRange` is a type that has a property called `customRange` that is of type
@@ -51,6 +52,7 @@ export declare type RelativeDateConfig = {
51
52
  */
52
53
  export declare type MetricCustomRange = {
53
54
  customRange: CustomRange;
55
+ type?: IColumnType;
54
56
  };
55
57
  /**
56
58
  * `CustomRangeConfig` is an object with optional properties `startingDate`, `endDate`, and `label`.
@@ -60,7 +60,7 @@ const isComparison = (data) => Boolean(data === null || data === void 0 ? void 0
60
60
  const metricMakeTimeData = (dateColumn, timeData, range) => {
61
61
  const relativObject = getConfigRelativeObjectBytimeLabel(timeData.label, range);
62
62
  if (!(0, general_1.isEmpty)(relativObject))
63
- return Object.assign(Object.assign({}, relativObject), { questionid: dateColumn.id });
63
+ return Object.assign(Object.assign({}, relativObject), { questionid: dateColumn.id, type: dateColumn === null || dateColumn === void 0 ? void 0 : dateColumn.type });
64
64
  };
65
65
  exports.metricMakeTimeData = metricMakeTimeData;
66
66
  /**
@@ -1,4 +1,4 @@
1
- import { IBColumn } from "../../columns";
1
+ import { IBColumn, IColumnType } from "../../columns";
2
2
  import { IDateGroupingProperty, RelativeCursor } from "../../dates";
3
3
  import { IFBLogic } from "../../filters";
4
4
  import { TimePeriod, TP_CUSTOM_RANGE } from "../../interfaces";
@@ -43,6 +43,7 @@ export declare type RelativeDateConfig = {
43
43
  unit: IDateGroupingProperty;
44
44
  includeCurrent?: boolean;
45
45
  isCalendarDate?: boolean;
46
+ type?: IColumnType;
46
47
  };
47
48
  /**
48
49
  * `MetricCustomRange` is a type that has a property called `customRange` that is of type
@@ -51,6 +52,7 @@ export declare type RelativeDateConfig = {
51
52
  */
52
53
  export declare type MetricCustomRange = {
53
54
  customRange: CustomRange;
55
+ type?: IColumnType;
54
56
  };
55
57
  /**
56
58
  * `CustomRangeConfig` is an object with optional properties `startingDate`, `endDate`, and `label`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.8.0-5",
3
+ "version": "1.8.0-6",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/index.js",