@qrvey/utils 1.6.0-2 → 1.6.0-4

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.
Files changed (43) hide show
  1. package/dist/cjs/column_format/helpers/defineTableChartFormat.js +12 -0
  2. package/dist/cjs/dates/adapters/dateToMdyDate.js +1 -1
  3. package/dist/cjs/dates/helpers/adjustTimezone.d.ts +6 -0
  4. package/dist/cjs/dates/helpers/adjustTimezone.js +13 -0
  5. package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +2 -1
  6. package/dist/cjs/dates/helpers/index.d.ts +1 -0
  7. package/dist/cjs/dates/helpers/index.js +1 -0
  8. package/dist/cjs/dates/relative/constants/RELATIVE_DATE_TIME_UNIT_INFO_LIST.d.ts +5 -0
  9. package/dist/cjs/dates/relative/constants/RELATIVE_DATE_TIME_UNIT_INFO_LIST.js +12 -0
  10. package/dist/cjs/dates/relative/constants/RELATIVE_DATE_UNIT_INFO_LIST.d.ts +5 -0
  11. package/dist/cjs/dates/relative/constants/{RELATIVE_UNIT_INFO_LIST.js → RELATIVE_DATE_UNIT_INFO_LIST.js} +3 -3
  12. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO.js +25 -0
  13. package/dist/cjs/dates/relative/constants/index.d.ts +2 -1
  14. package/dist/cjs/dates/relative/constants/index.js +2 -1
  15. package/dist/cjs/dates/relative/interfaces/IRelativeUnit.d.ts +2 -1
  16. package/dist/cjs/format/definition.js +1 -0
  17. package/dist/cjs/globalization/interfaces/common/II18nUnits.d.ts +3 -0
  18. package/dist/cjs/globalization/interfaces/filters/II18nRelativeContainer.d.ts +1 -0
  19. package/dist/cjs/globalization/labels/common/I18N_COMMON.js +3 -0
  20. package/dist/cjs/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -0
  21. package/dist/column_format/helpers/defineTableChartFormat.js +12 -0
  22. package/dist/dates/adapters/dateToMdyDate.js +1 -1
  23. package/dist/dates/helpers/adjustTimezone.d.ts +6 -0
  24. package/dist/dates/helpers/adjustTimezone.js +9 -0
  25. package/dist/dates/helpers/getFormattedDateByFormat.js +2 -1
  26. package/dist/dates/helpers/index.d.ts +1 -0
  27. package/dist/dates/helpers/index.js +1 -0
  28. package/dist/dates/relative/constants/RELATIVE_DATE_TIME_UNIT_INFO_LIST.d.ts +5 -0
  29. package/dist/dates/relative/constants/RELATIVE_DATE_TIME_UNIT_INFO_LIST.js +9 -0
  30. package/dist/dates/relative/constants/RELATIVE_DATE_UNIT_INFO_LIST.d.ts +5 -0
  31. package/dist/dates/relative/constants/{RELATIVE_UNIT_INFO_LIST.js → RELATIVE_DATE_UNIT_INFO_LIST.js} +2 -2
  32. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO.js +25 -0
  33. package/dist/dates/relative/constants/index.d.ts +2 -1
  34. package/dist/dates/relative/constants/index.js +2 -1
  35. package/dist/dates/relative/interfaces/IRelativeUnit.d.ts +2 -1
  36. package/dist/format/definition.js +1 -0
  37. package/dist/globalization/interfaces/common/II18nUnits.d.ts +3 -0
  38. package/dist/globalization/interfaces/filters/II18nRelativeContainer.d.ts +1 -0
  39. package/dist/globalization/labels/common/I18N_COMMON.js +3 -0
  40. package/dist/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -0
  41. package/package.json +1 -1
  42. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.d.ts +0 -5
  43. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.d.ts +0 -5
@@ -58,6 +58,18 @@ const defineTableChartFormat = (column, settings) => {
58
58
  return selectedFormat;
59
59
  return;
60
60
  }
61
+ case COLUMN_1.COLUMN.TIME: {
62
+ if (noFormatSupported)
63
+ return STRING_FORMAT_1.STRING_FORMAT.NONE;
64
+ if (selectedFormat)
65
+ return selectedFormat;
66
+ if (hasDefaultFormat) {
67
+ const columnDefaultFormat = defaultFormat ||
68
+ outputFormat || { type: "TIME", format: "HH:mm:ss" };
69
+ return Object.assign(Object.assign({}, defaultFormat), { format: defaultText, originalFormat: Object.assign({}, columnDefaultFormat), type: "TIME" });
70
+ }
71
+ return;
72
+ }
61
73
  case COLUMN_1.COLUMN.NUMERIC:
62
74
  case COLUMN_1.COLUMN.RATING:
63
75
  case COLUMN_1.COLUMN.SLIDEBAR: {
@@ -10,7 +10,7 @@ const dateToHms_1 = require("./dateToHms");
10
10
  * @param date String, object or millisencond number of the date
11
11
  * @returns string of [mm/dd/yyyy] date format
12
12
  */
13
- function dateToMdyDate(date, includeTime) {
13
+ function dateToMdyDate(date, includeTime = false) {
14
14
  if (!(0, isValidPotentialDate_1.isValidPotentialDate)(date))
15
15
  return date;
16
16
  const dt = new Date(date.valueOf());
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adjusts a Date with the UTC-0 Timezone.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns updated Date object
5
+ */
6
+ export declare function adjustTimezone(date: string | Date | number): Date;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.adjustTimezone = void 0;
4
+ /**
5
+ * Adjusts a Date with the UTC-0 Timezone.
6
+ * @param date String, object or millisencond number of the date
7
+ * @returns updated Date object
8
+ */
9
+ function adjustTimezone(date) {
10
+ const dt = new Date(date.valueOf());
11
+ return new Date(+dt + dt.getTimezoneOffset() * 1000 * 60);
12
+ }
13
+ exports.adjustTimezone = adjustTimezone;
@@ -25,10 +25,11 @@ function getFormattedDateByFormat(date, format) {
25
25
  case DATE_FORMAT_1.DATE_FORMAT.WEEK:
26
26
  return (0, dateToWeekYear_1.dateToWeekYear)(date);
27
27
  case DATE_FORMAT_1.DATE_FORMAT.DAY:
28
+ return (0, dateToMdyDate_1.dateToMdyDate)(date);
28
29
  case DATE_FORMAT_1.DATE_FORMAT.HOUR:
29
30
  case DATE_FORMAT_1.DATE_FORMAT.MINUTE:
30
31
  case DATE_FORMAT_1.DATE_FORMAT.SECOND:
31
- return (0, dateToMdyDate_1.dateToMdyDate)(date);
32
+ return (0, dateToMdyDate_1.dateToMdyDate)(date, true);
32
33
  default:
33
34
  return date;
34
35
  }
@@ -1,3 +1,4 @@
1
+ export * from "./adjustTimezone";
1
2
  export * from "./areIncludedDateTokens";
2
3
  export * from "./getDateByDateFormat";
3
4
  export * from "./getDateFormatByProperty";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./adjustTimezone"), exports);
17
18
  __exportStar(require("./areIncludedDateTokens"), exports);
18
19
  __exportStar(require("./getDateByDateFormat"), exports);
19
20
  __exportStar(require("./getDateFormatByProperty"), exports);
@@ -0,0 +1,5 @@
1
+ import { IRelativeUnitInfo } from "../interfaces/IRelativeUnitInfo";
2
+ /**
3
+ * @description Key/array of compound relative unit info of date-time
4
+ */
5
+ export declare const RELATIVE_DATE_TIME_UNIT_INFO_LIST: IRelativeUnitInfo[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RELATIVE_DATE_TIME_UNIT_INFO_LIST = void 0;
4
+ const RELATIVE_UNIT_INFO_1 = require("./RELATIVE_UNIT_INFO");
5
+ /**
6
+ * @description Key/array of compound relative unit info of date-time
7
+ */
8
+ exports.RELATIVE_DATE_TIME_UNIT_INFO_LIST = [
9
+ RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.HOUR,
10
+ RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MINUTE,
11
+ RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.SECOND,
12
+ ];
@@ -0,0 +1,5 @@
1
+ import { IRelativeUnitInfo } from "../interfaces/IRelativeUnitInfo";
2
+ /**
3
+ * @description Key/array of compound relative unit info of dates
4
+ */
5
+ export declare const RELATIVE_DATE_UNIT_INFO_LIST: IRelativeUnitInfo[];
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RELATIVE_UNIT_INFO_LIST = void 0;
3
+ exports.RELATIVE_DATE_UNIT_INFO_LIST = void 0;
4
4
  const RELATIVE_UNIT_INFO_1 = require("./RELATIVE_UNIT_INFO");
5
5
  /**
6
- * @description Key/array of compound relative cursor info
6
+ * @description Key/array of compound relative unit info of dates
7
7
  */
8
- exports.RELATIVE_UNIT_INFO_LIST = [
8
+ exports.RELATIVE_DATE_UNIT_INFO_LIST = [
9
9
  RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.YEAR,
10
10
  RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.QUARTER,
11
11
  RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MONTH,
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RELATIVE_UNIT_INFO = void 0;
4
4
  const DATE_GROUPING_PROPERTY_1 = require("../../constants/DATE_GROUPING_PROPERTY");
5
+ const DATE_GROUPING_TIME_PROPERTY_1 = require("../../constants/DATE_GROUPING_TIME_PROPERTY");
5
6
  exports.RELATIVE_UNIT_INFO = {
6
7
  DAY: {
7
8
  abbrLabel: "Day",
@@ -43,4 +44,28 @@ exports.RELATIVE_UNIT_INFO = {
43
44
  displayed: true,
44
45
  i18nLabelPath: "common.units.year",
45
46
  },
47
+ HOUR: {
48
+ abbrLabel: "Hour",
49
+ shortLabel: "Hour",
50
+ label: "Hour",
51
+ value: DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.HOUR,
52
+ displayed: true,
53
+ i18nLabelPath: "common.units.hour",
54
+ },
55
+ MINUTE: {
56
+ abbrLabel: "Minute",
57
+ shortLabel: "Minute",
58
+ label: "Minute",
59
+ value: DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.MINUTE,
60
+ displayed: false,
61
+ i18nLabelPath: "common.units.minute",
62
+ },
63
+ SECOND: {
64
+ abbrLabel: "Second",
65
+ shortLabel: "Second",
66
+ label: "Second",
67
+ value: DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.SECOND,
68
+ displayed: false,
69
+ i18nLabelPath: "common.units.second",
70
+ },
46
71
  };
@@ -4,6 +4,7 @@ export * from "./RELATIVE_CURSOR";
4
4
  export * from "./RELATIVE_CURSOR_INFO_LIST";
5
5
  export * from "./RELATIVE_CURSOR_INFO";
6
6
  export * from "./RELATIVE_CURSOR_LABEL";
7
- export * from "./RELATIVE_UNIT_INFO_LIST";
7
+ export * from "./RELATIVE_DATE_TIME_UNIT_INFO_LIST";
8
+ export * from "./RELATIVE_DATE_UNIT_INFO_LIST";
8
9
  export * from "./RELATIVE_UNIT_INFO";
9
10
  export * from "./ui/index";
@@ -20,6 +20,7 @@ __exportStar(require("./RELATIVE_CURSOR"), exports);
20
20
  __exportStar(require("./RELATIVE_CURSOR_INFO_LIST"), exports);
21
21
  __exportStar(require("./RELATIVE_CURSOR_INFO"), exports);
22
22
  __exportStar(require("./RELATIVE_CURSOR_LABEL"), exports);
23
- __exportStar(require("./RELATIVE_UNIT_INFO_LIST"), exports);
23
+ __exportStar(require("./RELATIVE_DATE_TIME_UNIT_INFO_LIST"), exports);
24
+ __exportStar(require("./RELATIVE_DATE_UNIT_INFO_LIST"), exports);
24
25
  __exportStar(require("./RELATIVE_UNIT_INFO"), exports);
25
26
  __exportStar(require("./ui/index"), exports);
@@ -1,2 +1,3 @@
1
+ import { DATE_GROUPING_TIME_PROPERTY } from "../../constants/DATE_GROUPING_TIME_PROPERTY";
1
2
  import { DATE_GROUPING_PROPERTY } from "../../constants/DATE_GROUPING_PROPERTY";
2
- export declare type IRelativeUnit = keyof typeof DATE_GROUPING_PROPERTY;
3
+ export declare type IRelativeUnit = keyof typeof DATE_GROUPING_PROPERTY | keyof typeof DATE_GROUPING_TIME_PROPERTY;
@@ -26,6 +26,7 @@ exports.numericalFields = [
26
26
  ];
27
27
  exports.QUESTION_FORMAT_SUPPORT = [
28
28
  COLUMN_1.COLUMN.DATE,
29
+ COLUMN_1.COLUMN.TIME,
29
30
  COLUMN_1.COLUMN.NUMERIC,
30
31
  COLUMN_1.COLUMN.FILEUPLOAD,
31
32
  COLUMN_1.COLUMN.IMAGEUPLOAD,
@@ -1,7 +1,10 @@
1
1
  export interface II18nUnits {
2
2
  day: string;
3
+ hour: string;
3
4
  month: string;
5
+ minute: string;
4
6
  quarter: string;
7
+ second: string;
5
8
  week: string;
6
9
  year: string;
7
10
  }
@@ -10,4 +10,5 @@ export interface II18nRelativeContainer {
10
10
  starting_date_tooltip: string;
11
11
  starting_from: string;
12
12
  set_current_date: string;
13
+ utc_tooltip: string;
13
14
  }
@@ -37,8 +37,11 @@ exports.I18N_COMMON = {
37
37
  },
38
38
  units: {
39
39
  day: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.DAY.label,
40
+ hour: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.HOUR.label,
41
+ minute: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MINUTE.label,
40
42
  month: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MONTH.label,
41
43
  quarter: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.QUARTER.label,
44
+ second: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.SECOND.label,
42
45
  week: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.WEEK.label,
43
46
  year: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.YEAR.label,
44
47
  },
@@ -13,4 +13,5 @@ exports.I18N_RELATIVE_CONTAINER = {
13
13
  starting_date_tooltip: "The relative date will include the specific starting date and a period of time to show from that date onwards (Inclusive range). <br/> Unchecking this option will exclude the chosen starting date (exclusive range) from the date range.",
14
14
  starting_from: "Starting From",
15
15
  set_current_date: "Set to current date",
16
+ utc_tooltip: "The times displayed are in UTC-0",
16
17
  };
@@ -55,6 +55,18 @@ export const defineTableChartFormat = (column, settings) => {
55
55
  return selectedFormat;
56
56
  return;
57
57
  }
58
+ case COLUMN.TIME: {
59
+ if (noFormatSupported)
60
+ return STRING_FORMAT.NONE;
61
+ if (selectedFormat)
62
+ return selectedFormat;
63
+ if (hasDefaultFormat) {
64
+ const columnDefaultFormat = defaultFormat ||
65
+ outputFormat || { type: "TIME", format: "HH:mm:ss" };
66
+ return Object.assign(Object.assign({}, defaultFormat), { format: defaultText, originalFormat: Object.assign({}, columnDefaultFormat), type: "TIME" });
67
+ }
68
+ return;
69
+ }
58
70
  case COLUMN.NUMERIC:
59
71
  case COLUMN.RATING:
60
72
  case COLUMN.SLIDEBAR: {
@@ -7,7 +7,7 @@ import { dateToHms } from "./dateToHms";
7
7
  * @param date String, object or millisencond number of the date
8
8
  * @returns string of [mm/dd/yyyy] date format
9
9
  */
10
- export function dateToMdyDate(date, includeTime) {
10
+ export function dateToMdyDate(date, includeTime = false) {
11
11
  if (!isValidPotentialDate(date))
12
12
  return date;
13
13
  const dt = new Date(date.valueOf());
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Adjusts a Date with the UTC-0 Timezone.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns updated Date object
5
+ */
6
+ export declare function adjustTimezone(date: string | Date | number): Date;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Adjusts a Date with the UTC-0 Timezone.
3
+ * @param date String, object or millisencond number of the date
4
+ * @returns updated Date object
5
+ */
6
+ export function adjustTimezone(date) {
7
+ const dt = new Date(date.valueOf());
8
+ return new Date(+dt + dt.getTimezoneOffset() * 1000 * 60);
9
+ }
@@ -22,10 +22,11 @@ export function getFormattedDateByFormat(date, format) {
22
22
  case DATE_FORMAT.WEEK:
23
23
  return dateToWeekYear(date);
24
24
  case DATE_FORMAT.DAY:
25
+ return dateToMdyDate(date);
25
26
  case DATE_FORMAT.HOUR:
26
27
  case DATE_FORMAT.MINUTE:
27
28
  case DATE_FORMAT.SECOND:
28
- return dateToMdyDate(date);
29
+ return dateToMdyDate(date, true);
29
30
  default:
30
31
  return date;
31
32
  }
@@ -1,3 +1,4 @@
1
+ export * from "./adjustTimezone";
1
2
  export * from "./areIncludedDateTokens";
2
3
  export * from "./getDateByDateFormat";
3
4
  export * from "./getDateFormatByProperty";
@@ -1,3 +1,4 @@
1
+ export * from "./adjustTimezone";
1
2
  export * from "./areIncludedDateTokens";
2
3
  export * from "./getDateByDateFormat";
3
4
  export * from "./getDateFormatByProperty";
@@ -0,0 +1,5 @@
1
+ import { IRelativeUnitInfo } from "../interfaces/IRelativeUnitInfo";
2
+ /**
3
+ * @description Key/array of compound relative unit info of date-time
4
+ */
5
+ export declare const RELATIVE_DATE_TIME_UNIT_INFO_LIST: IRelativeUnitInfo[];
@@ -0,0 +1,9 @@
1
+ import { RELATIVE_UNIT_INFO } from "./RELATIVE_UNIT_INFO";
2
+ /**
3
+ * @description Key/array of compound relative unit info of date-time
4
+ */
5
+ export const RELATIVE_DATE_TIME_UNIT_INFO_LIST = [
6
+ RELATIVE_UNIT_INFO.HOUR,
7
+ RELATIVE_UNIT_INFO.MINUTE,
8
+ RELATIVE_UNIT_INFO.SECOND,
9
+ ];
@@ -0,0 +1,5 @@
1
+ import { IRelativeUnitInfo } from "../interfaces/IRelativeUnitInfo";
2
+ /**
3
+ * @description Key/array of compound relative unit info of dates
4
+ */
5
+ export declare const RELATIVE_DATE_UNIT_INFO_LIST: IRelativeUnitInfo[];
@@ -1,8 +1,8 @@
1
1
  import { RELATIVE_UNIT_INFO } from "./RELATIVE_UNIT_INFO";
2
2
  /**
3
- * @description Key/array of compound relative cursor info
3
+ * @description Key/array of compound relative unit info of dates
4
4
  */
5
- export const RELATIVE_UNIT_INFO_LIST = [
5
+ export const RELATIVE_DATE_UNIT_INFO_LIST = [
6
6
  RELATIVE_UNIT_INFO.YEAR,
7
7
  RELATIVE_UNIT_INFO.QUARTER,
8
8
  RELATIVE_UNIT_INFO.MONTH,
@@ -1,4 +1,5 @@
1
1
  import { DATE_GROUPING_PROPERTY } from "../../constants/DATE_GROUPING_PROPERTY";
2
+ import { DATE_GROUPING_TIME_PROPERTY } from "../../constants/DATE_GROUPING_TIME_PROPERTY";
2
3
  export const RELATIVE_UNIT_INFO = {
3
4
  DAY: {
4
5
  abbrLabel: "Day",
@@ -40,4 +41,28 @@ export const RELATIVE_UNIT_INFO = {
40
41
  displayed: true,
41
42
  i18nLabelPath: "common.units.year",
42
43
  },
44
+ HOUR: {
45
+ abbrLabel: "Hour",
46
+ shortLabel: "Hour",
47
+ label: "Hour",
48
+ value: DATE_GROUPING_TIME_PROPERTY.HOUR,
49
+ displayed: true,
50
+ i18nLabelPath: "common.units.hour",
51
+ },
52
+ MINUTE: {
53
+ abbrLabel: "Minute",
54
+ shortLabel: "Minute",
55
+ label: "Minute",
56
+ value: DATE_GROUPING_TIME_PROPERTY.MINUTE,
57
+ displayed: false,
58
+ i18nLabelPath: "common.units.minute",
59
+ },
60
+ SECOND: {
61
+ abbrLabel: "Second",
62
+ shortLabel: "Second",
63
+ label: "Second",
64
+ value: DATE_GROUPING_TIME_PROPERTY.SECOND,
65
+ displayed: false,
66
+ i18nLabelPath: "common.units.second",
67
+ },
43
68
  };
@@ -4,6 +4,7 @@ export * from "./RELATIVE_CURSOR";
4
4
  export * from "./RELATIVE_CURSOR_INFO_LIST";
5
5
  export * from "./RELATIVE_CURSOR_INFO";
6
6
  export * from "./RELATIVE_CURSOR_LABEL";
7
- export * from "./RELATIVE_UNIT_INFO_LIST";
7
+ export * from "./RELATIVE_DATE_TIME_UNIT_INFO_LIST";
8
+ export * from "./RELATIVE_DATE_UNIT_INFO_LIST";
8
9
  export * from "./RELATIVE_UNIT_INFO";
9
10
  export * from "./ui/index";
@@ -4,6 +4,7 @@ export * from "./RELATIVE_CURSOR";
4
4
  export * from "./RELATIVE_CURSOR_INFO_LIST";
5
5
  export * from "./RELATIVE_CURSOR_INFO";
6
6
  export * from "./RELATIVE_CURSOR_LABEL";
7
- export * from "./RELATIVE_UNIT_INFO_LIST";
7
+ export * from "./RELATIVE_DATE_TIME_UNIT_INFO_LIST";
8
+ export * from "./RELATIVE_DATE_UNIT_INFO_LIST";
8
9
  export * from "./RELATIVE_UNIT_INFO";
9
10
  export * from "./ui/index";
@@ -1,2 +1,3 @@
1
+ import { DATE_GROUPING_TIME_PROPERTY } from "../../constants/DATE_GROUPING_TIME_PROPERTY";
1
2
  import { DATE_GROUPING_PROPERTY } from "../../constants/DATE_GROUPING_PROPERTY";
2
- export declare type IRelativeUnit = keyof typeof DATE_GROUPING_PROPERTY;
3
+ export declare type IRelativeUnit = keyof typeof DATE_GROUPING_PROPERTY | keyof typeof DATE_GROUPING_TIME_PROPERTY;
@@ -23,6 +23,7 @@ export const numericalFields = [
23
23
  ];
24
24
  export const QUESTION_FORMAT_SUPPORT = [
25
25
  COLUMN.DATE,
26
+ COLUMN.TIME,
26
27
  COLUMN.NUMERIC,
27
28
  COLUMN.FILEUPLOAD,
28
29
  COLUMN.IMAGEUPLOAD,
@@ -1,7 +1,10 @@
1
1
  export interface II18nUnits {
2
2
  day: string;
3
+ hour: string;
3
4
  month: string;
5
+ minute: string;
4
6
  quarter: string;
7
+ second: string;
5
8
  week: string;
6
9
  year: string;
7
10
  }
@@ -10,4 +10,5 @@ export interface II18nRelativeContainer {
10
10
  starting_date_tooltip: string;
11
11
  starting_from: string;
12
12
  set_current_date: string;
13
+ utc_tooltip: string;
13
14
  }
@@ -34,8 +34,11 @@ export const I18N_COMMON = {
34
34
  },
35
35
  units: {
36
36
  day: RELATIVE_UNIT_INFO.DAY.label,
37
+ hour: RELATIVE_UNIT_INFO.HOUR.label,
38
+ minute: RELATIVE_UNIT_INFO.MINUTE.label,
37
39
  month: RELATIVE_UNIT_INFO.MONTH.label,
38
40
  quarter: RELATIVE_UNIT_INFO.QUARTER.label,
41
+ second: RELATIVE_UNIT_INFO.SECOND.label,
39
42
  week: RELATIVE_UNIT_INFO.WEEK.label,
40
43
  year: RELATIVE_UNIT_INFO.YEAR.label,
41
44
  },
@@ -10,4 +10,5 @@ export const I18N_RELATIVE_CONTAINER = {
10
10
  starting_date_tooltip: "The relative date will include the specific starting date and a period of time to show from that date onwards (Inclusive range). <br/> Unchecking this option will exclude the chosen starting date (exclusive range) from the date range.",
11
11
  starting_from: "Starting From",
12
12
  set_current_date: "Set to current date",
13
+ utc_tooltip: "The times displayed are in UTC-0",
13
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.6.0-2",
3
+ "version": "1.6.0-4",
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",
@@ -1,5 +0,0 @@
1
- import { IRelativeUnitInfo } from "../interfaces/IRelativeUnitInfo";
2
- /**
3
- * @description Key/array of compound relative cursor info
4
- */
5
- export declare const RELATIVE_UNIT_INFO_LIST: IRelativeUnitInfo[];
@@ -1,5 +0,0 @@
1
- import { IRelativeUnitInfo } from "../interfaces/IRelativeUnitInfo";
2
- /**
3
- * @description Key/array of compound relative cursor info
4
- */
5
- export declare const RELATIVE_UNIT_INFO_LIST: IRelativeUnitInfo[];