@qrvey/utils 1.10.0-0 → 1.10.0-10

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 (231) hide show
  1. package/dist/charts/adapters/endpointData.js +0 -3
  2. package/dist/cjs/charts/adapters/endpointData.js +0 -3
  3. package/dist/cjs/columns/constants/COLUMN_PROPERTIES.d.ts +1 -1
  4. package/dist/cjs/columns/helpers/isNumericalColumn.js +3 -1
  5. package/dist/cjs/dates/adapters/ISOToNumericOffset.d.ts +6 -0
  6. package/dist/cjs/dates/adapters/ISOToNumericOffset.js +21 -0
  7. package/dist/cjs/dates/adapters/dateToHms.js +8 -10
  8. package/dist/cjs/dates/adapters/dateToMdyDate.d.ts +2 -1
  9. package/dist/cjs/dates/adapters/dateToMdyDate.js +9 -3
  10. package/dist/cjs/dates/adapters/dateToMonthYear.d.ts +2 -1
  11. package/dist/cjs/dates/adapters/dateToMonthYear.js +7 -3
  12. package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +2 -1
  13. package/dist/cjs/dates/adapters/dateToQuarterYear.js +8 -4
  14. package/dist/cjs/dates/adapters/dateToWeekYear.d.ts +2 -1
  15. package/dist/cjs/dates/adapters/dateToWeekYear.js +6 -2
  16. package/dist/cjs/dates/adapters/dateToYear.d.ts +2 -1
  17. package/dist/cjs/dates/adapters/dateToYear.js +7 -3
  18. package/dist/cjs/dates/adapters/hmsToDate.d.ts +2 -1
  19. package/dist/cjs/dates/adapters/hmsToDate.js +6 -2
  20. package/dist/cjs/dates/adapters/index.d.ts +2 -0
  21. package/dist/cjs/dates/adapters/index.js +2 -0
  22. package/dist/cjs/dates/adapters/mdyDateToDate.d.ts +2 -1
  23. package/dist/cjs/dates/adapters/mdyDateToDate.js +7 -2
  24. package/dist/cjs/dates/adapters/monthYearToDate.d.ts +2 -1
  25. package/dist/cjs/dates/adapters/monthYearToDate.js +6 -2
  26. package/dist/cjs/dates/adapters/numericOffsetToISO.d.ts +6 -0
  27. package/dist/cjs/dates/adapters/numericOffsetToISO.js +34 -0
  28. package/dist/cjs/dates/adapters/quarterYearToDate.d.ts +2 -1
  29. package/dist/cjs/dates/adapters/quarterYearToDate.js +6 -2
  30. package/dist/cjs/dates/adapters/weekYearToDate.d.ts +2 -1
  31. package/dist/cjs/dates/adapters/weekYearToDate.js +10 -6
  32. package/dist/cjs/dates/adapters/yearToDate.d.ts +2 -1
  33. package/dist/cjs/dates/adapters/yearToDate.js +6 -2
  34. package/dist/cjs/dates/constants/ISO_8601_REGEX.d.ts +1 -0
  35. package/dist/cjs/dates/constants/ISO_8601_REGEX.js +4 -0
  36. package/dist/cjs/dates/constants/TIMEZONE_TYPE.d.ts +5 -0
  37. package/dist/cjs/dates/constants/TIMEZONE_TYPE.js +9 -0
  38. package/dist/cjs/dates/constants/index.d.ts +1 -0
  39. package/dist/cjs/dates/constants/index.js +1 -0
  40. package/dist/cjs/dates/helpers/getDateByDateFormat.d.ts +2 -1
  41. package/dist/cjs/dates/helpers/getDateByDateFormat.js +6 -6
  42. package/dist/cjs/dates/helpers/getDateByTimezone.d.ts +8 -0
  43. package/dist/cjs/dates/helpers/getDateByTimezone.js +24 -0
  44. package/dist/cjs/dates/helpers/getDateByTimezoneOffset.d.ts +7 -0
  45. package/dist/cjs/dates/helpers/getDateByTimezoneOffset.js +33 -0
  46. package/dist/cjs/dates/helpers/getDefaultDateSettings.d.ts +7 -0
  47. package/dist/cjs/dates/helpers/getDefaultDateSettings.js +17 -0
  48. package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +2 -1
  49. package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +7 -7
  50. package/dist/cjs/dates/helpers/getTimezoneObject.d.ts +11 -0
  51. package/dist/cjs/dates/helpers/getTimezoneObject.js +107 -0
  52. package/dist/cjs/dates/helpers/getTimezoneOffsetByType.d.ts +13 -0
  53. package/dist/cjs/dates/helpers/getTimezoneOffsetByType.js +27 -0
  54. package/dist/cjs/dates/helpers/getUTCFormatByOffset.d.ts +7 -0
  55. package/dist/cjs/dates/helpers/getUTCFormatByOffset.js +17 -0
  56. package/dist/cjs/dates/helpers/getWeek.js +6 -6
  57. package/dist/cjs/dates/helpers/index.d.ts +6 -1
  58. package/dist/cjs/dates/helpers/index.js +6 -1
  59. package/dist/cjs/dates/helpers/isValidISOOffset.d.ts +7 -0
  60. package/dist/cjs/dates/helpers/isValidISOOffset.js +17 -0
  61. package/dist/cjs/dates/interfaces/IBTimezone.d.ts +7 -0
  62. package/dist/cjs/dates/interfaces/IBTimezone.js +2 -0
  63. package/dist/cjs/dates/interfaces/IBTimezoneType.d.ts +2 -0
  64. package/dist/cjs/dates/interfaces/IBTimezoneType.js +2 -0
  65. package/dist/cjs/dates/interfaces/IDFDateToHmsSettings.d.ts +2 -1
  66. package/dist/cjs/dates/interfaces/IDTimezone.d.ts +7 -0
  67. package/dist/cjs/dates/interfaces/IDTimezone.js +2 -0
  68. package/dist/cjs/dates/interfaces/IDTimezoneOffset.d.ts +1 -0
  69. package/dist/cjs/dates/interfaces/IDTimezoneOffset.js +2 -0
  70. package/dist/cjs/dates/interfaces/IDTimezoneType.d.ts +2 -0
  71. package/dist/cjs/dates/interfaces/IDTimezoneType.js +2 -0
  72. package/dist/cjs/dates/interfaces/IDateSettings.d.ts +5 -0
  73. package/dist/cjs/dates/interfaces/IDateSettings.js +2 -0
  74. package/dist/cjs/dates/interfaces/index.d.ts +6 -0
  75. package/dist/cjs/dates/interfaces/index.js +6 -0
  76. package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -1
  77. package/dist/cjs/filters/helpers/common/getFiltersByTimezone.d.ts +10 -0
  78. package/dist/cjs/filters/helpers/common/getFiltersByTimezone.js +26 -0
  79. package/dist/cjs/filters/helpers/common/index.d.ts +1 -0
  80. package/dist/cjs/filters/helpers/common/index.js +1 -0
  81. package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
  82. package/dist/cjs/filters/services/Filters.api.js +1 -1
  83. package/dist/cjs/format/format.d.ts +1 -1
  84. package/dist/cjs/format/format.js +21 -4
  85. package/dist/cjs/format/localization.js +10 -1
  86. package/dist/cjs/general/index.d.ts +1 -0
  87. package/dist/cjs/general/index.js +1 -0
  88. package/dist/cjs/general/numeric/getSign.d.ts +6 -0
  89. package/dist/cjs/general/numeric/getSign.js +12 -0
  90. package/dist/cjs/general/numeric/index.d.ts +1 -0
  91. package/dist/cjs/general/numeric/index.js +17 -0
  92. package/dist/cjs/general/object/applyTimezoneDeep.d.ts +8 -0
  93. package/dist/cjs/general/object/applyTimezoneDeep.js +44 -0
  94. package/dist/cjs/general/object/index.d.ts +1 -0
  95. package/dist/cjs/general/object/index.js +1 -0
  96. package/dist/cjs/general/object/mergeDeep.d.ts +6 -0
  97. package/dist/cjs/general/object/mergeDeep.js +12 -10
  98. package/dist/cjs/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -1
  99. package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +3 -3
  100. package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +1 -1
  101. package/dist/cjs/interfaces/format/IFormatConfig.Interface.d.ts +1 -0
  102. package/dist/cjs/interfaces/general/IWidgetConfig.d.ts +2 -1
  103. package/dist/cjs/qrvey/helpers/transformValue.js +31 -6
  104. package/dist/cjs/qrvey/interfaces/IBDataset.d.ts +2 -0
  105. package/dist/cjs/qrvey/interfaces/IBModel.d.ts +5 -0
  106. package/dist/cjs/qrvey/interfaces/IDataset.d.ts +3 -1
  107. package/dist/cjs/qrvey/interfaces/IModel.d.ts +3 -1
  108. package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +6 -0
  109. package/dist/cjs/services/adapters/BDatasetsToUIDatasets.adapter.js +2 -0
  110. package/dist/cjs/services/adapters/BModelToUIModel.adapter.js +2 -0
  111. package/dist/cjs/services/adapters/BTimezoneToUITimezone.d.ts +8 -0
  112. package/dist/cjs/services/adapters/BTimezoneToUITimezone.js +18 -0
  113. package/dist/cjs/services/helpers/Request.d.ts +1 -1
  114. package/dist/cjs/services/helpers/Request.js +11 -5
  115. package/dist/columns/constants/COLUMN_PROPERTIES.d.ts +1 -1
  116. package/dist/columns/helpers/isNumericalColumn.js +3 -1
  117. package/dist/dates/adapters/ISOToNumericOffset.d.ts +6 -0
  118. package/dist/dates/adapters/ISOToNumericOffset.js +17 -0
  119. package/dist/dates/adapters/dateToHms.js +8 -10
  120. package/dist/dates/adapters/dateToMdyDate.d.ts +2 -1
  121. package/dist/dates/adapters/dateToMdyDate.js +9 -3
  122. package/dist/dates/adapters/dateToMonthYear.d.ts +2 -1
  123. package/dist/dates/adapters/dateToMonthYear.js +7 -3
  124. package/dist/dates/adapters/dateToQuarterYear.d.ts +2 -1
  125. package/dist/dates/adapters/dateToQuarterYear.js +8 -4
  126. package/dist/dates/adapters/dateToWeekYear.d.ts +2 -1
  127. package/dist/dates/adapters/dateToWeekYear.js +6 -2
  128. package/dist/dates/adapters/dateToYear.d.ts +2 -1
  129. package/dist/dates/adapters/dateToYear.js +7 -3
  130. package/dist/dates/adapters/hmsToDate.d.ts +2 -1
  131. package/dist/dates/adapters/hmsToDate.js +6 -2
  132. package/dist/dates/adapters/index.d.ts +2 -0
  133. package/dist/dates/adapters/index.js +2 -0
  134. package/dist/dates/adapters/mdyDateToDate.d.ts +2 -1
  135. package/dist/dates/adapters/mdyDateToDate.js +7 -2
  136. package/dist/dates/adapters/monthYearToDate.d.ts +2 -1
  137. package/dist/dates/adapters/monthYearToDate.js +6 -2
  138. package/dist/dates/adapters/numericOffsetToISO.d.ts +6 -0
  139. package/dist/dates/adapters/numericOffsetToISO.js +30 -0
  140. package/dist/dates/adapters/quarterYearToDate.d.ts +2 -1
  141. package/dist/dates/adapters/quarterYearToDate.js +6 -2
  142. package/dist/dates/adapters/weekYearToDate.d.ts +2 -1
  143. package/dist/dates/adapters/weekYearToDate.js +10 -6
  144. package/dist/dates/adapters/yearToDate.d.ts +2 -1
  145. package/dist/dates/adapters/yearToDate.js +6 -2
  146. package/dist/dates/constants/ISO_8601_REGEX.d.ts +1 -0
  147. package/dist/dates/constants/ISO_8601_REGEX.js +1 -0
  148. package/dist/dates/constants/TIMEZONE_TYPE.d.ts +5 -0
  149. package/dist/dates/constants/TIMEZONE_TYPE.js +6 -0
  150. package/dist/dates/constants/index.d.ts +1 -0
  151. package/dist/dates/constants/index.js +1 -0
  152. package/dist/dates/helpers/getDateByDateFormat.d.ts +2 -1
  153. package/dist/dates/helpers/getDateByDateFormat.js +6 -6
  154. package/dist/dates/helpers/getDateByTimezone.d.ts +8 -0
  155. package/dist/dates/helpers/getDateByTimezone.js +20 -0
  156. package/dist/dates/helpers/getDateByTimezoneOffset.d.ts +7 -0
  157. package/dist/dates/helpers/getDateByTimezoneOffset.js +26 -0
  158. package/dist/dates/helpers/getDefaultDateSettings.d.ts +7 -0
  159. package/dist/dates/helpers/getDefaultDateSettings.js +13 -0
  160. package/dist/dates/helpers/getFormattedDateByFormat.d.ts +2 -1
  161. package/dist/dates/helpers/getFormattedDateByFormat.js +7 -7
  162. package/dist/dates/helpers/getTimezoneObject.d.ts +11 -0
  163. package/dist/dates/helpers/getTimezoneObject.js +103 -0
  164. package/dist/dates/helpers/getTimezoneOffsetByType.d.ts +13 -0
  165. package/dist/dates/helpers/getTimezoneOffsetByType.js +23 -0
  166. package/dist/dates/helpers/getUTCFormatByOffset.d.ts +7 -0
  167. package/dist/dates/helpers/getUTCFormatByOffset.js +13 -0
  168. package/dist/dates/helpers/getWeek.js +6 -6
  169. package/dist/dates/helpers/index.d.ts +6 -1
  170. package/dist/dates/helpers/index.js +6 -1
  171. package/dist/dates/helpers/isValidISOOffset.d.ts +7 -0
  172. package/dist/dates/helpers/isValidISOOffset.js +13 -0
  173. package/dist/dates/interfaces/IBTimezone.d.ts +7 -0
  174. package/dist/dates/interfaces/IBTimezone.js +1 -0
  175. package/dist/dates/interfaces/IBTimezoneType.d.ts +2 -0
  176. package/dist/dates/interfaces/IBTimezoneType.js +1 -0
  177. package/dist/dates/interfaces/IDFDateToHmsSettings.d.ts +2 -1
  178. package/dist/dates/interfaces/IDTimezone.d.ts +7 -0
  179. package/dist/dates/interfaces/IDTimezone.js +1 -0
  180. package/dist/dates/interfaces/IDTimezoneOffset.d.ts +1 -0
  181. package/dist/dates/interfaces/IDTimezoneOffset.js +1 -0
  182. package/dist/dates/interfaces/IDTimezoneType.d.ts +2 -0
  183. package/dist/dates/interfaces/IDTimezoneType.js +1 -0
  184. package/dist/dates/interfaces/IDateSettings.d.ts +5 -0
  185. package/dist/dates/interfaces/IDateSettings.js +1 -0
  186. package/dist/dates/interfaces/index.d.ts +6 -0
  187. package/dist/dates/interfaces/index.js +6 -0
  188. package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -1
  189. package/dist/filters/helpers/common/getFiltersByTimezone.d.ts +10 -0
  190. package/dist/filters/helpers/common/getFiltersByTimezone.js +22 -0
  191. package/dist/filters/helpers/common/index.d.ts +1 -0
  192. package/dist/filters/helpers/common/index.js +1 -0
  193. package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
  194. package/dist/filters/services/Filters.api.js +1 -1
  195. package/dist/format/format.d.ts +1 -1
  196. package/dist/format/format.js +21 -4
  197. package/dist/format/localization.js +10 -1
  198. package/dist/general/index.d.ts +1 -0
  199. package/dist/general/index.js +1 -0
  200. package/dist/general/numeric/getSign.d.ts +6 -0
  201. package/dist/general/numeric/getSign.js +8 -0
  202. package/dist/general/numeric/index.d.ts +1 -0
  203. package/dist/general/numeric/index.js +1 -0
  204. package/dist/general/object/applyTimezoneDeep.d.ts +8 -0
  205. package/dist/general/object/applyTimezoneDeep.js +40 -0
  206. package/dist/general/object/index.d.ts +1 -0
  207. package/dist/general/object/index.js +1 -0
  208. package/dist/general/object/mergeDeep.d.ts +6 -0
  209. package/dist/general/object/mergeDeep.js +12 -10
  210. package/dist/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -1
  211. package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +3 -3
  212. package/dist/globalization/labels/panel/I18N_PANEL.js +1 -1
  213. package/dist/interfaces/format/IFormatConfig.Interface.d.ts +1 -0
  214. package/dist/interfaces/general/IWidgetConfig.d.ts +2 -1
  215. package/dist/qrvey/helpers/transformValue.js +31 -6
  216. package/dist/qrvey/interfaces/IBDataset.d.ts +2 -0
  217. package/dist/qrvey/interfaces/IBModel.d.ts +5 -0
  218. package/dist/qrvey/interfaces/IDataset.d.ts +3 -1
  219. package/dist/qrvey/interfaces/IModel.d.ts +3 -1
  220. package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +6 -0
  221. package/dist/services/adapters/BDatasetsToUIDatasets.adapter.js +2 -0
  222. package/dist/services/adapters/BModelToUIModel.adapter.js +2 -0
  223. package/dist/services/adapters/BTimezoneToUITimezone.d.ts +8 -0
  224. package/dist/services/adapters/BTimezoneToUITimezone.js +14 -0
  225. package/dist/services/helpers/Request.d.ts +1 -1
  226. package/dist/services/helpers/Request.js +11 -5
  227. package/package.json +5 -5
  228. package/dist/cjs/dates/helpers/adjustTimezone.d.ts +0 -6
  229. package/dist/cjs/dates/helpers/adjustTimezone.js +0 -19
  230. package/dist/dates/helpers/adjustTimezone.d.ts +0 -6
  231. package/dist/dates/helpers/adjustTimezone.js +0 -15
@@ -1,3 +1,9 @@
1
+ export * from "./IBTimezone";
2
+ export * from "./IBTimezoneType";
1
3
  export * from "./IDateFormat";
2
4
  export * from "./IDateGroupingProperty";
5
+ export * from "./IDateSettings";
3
6
  export * from "./IDFDateToHmsSettings";
7
+ export * from "./IDTimezone";
8
+ export * from "./IDTimezoneOffset";
9
+ export * from "./IDTimezoneType";
@@ -14,6 +14,12 @@ 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("./IBTimezone"), exports);
18
+ __exportStar(require("./IBTimezoneType"), exports);
17
19
  __exportStar(require("./IDateFormat"), exports);
18
20
  __exportStar(require("./IDateGroupingProperty"), exports);
21
+ __exportStar(require("./IDateSettings"), exports);
19
22
  __exportStar(require("./IDFDateToHmsSettings"), exports);
23
+ __exportStar(require("./IDTimezone"), exports);
24
+ __exportStar(require("./IDTimezoneOffset"), exports);
25
+ __exportStar(require("./IDTimezoneType"), exports);
@@ -14,7 +14,7 @@ function getFilterBuilderGeneralConfig(config = {}) {
14
14
  domain: config.domain,
15
15
  i18n: config.i18n,
16
16
  qv_token: config.qv_token,
17
- timezoneControl: (0, getAttribute_1.getAttribute)(config, "timezone_control") || config.timezoneControl,
17
+ timezone: config.timezone,
18
18
  userid: (0, getAttribute_1.getAttribute)(config, "user_id") || config.userid,
19
19
  };
20
20
  }
@@ -0,0 +1,10 @@
1
+ import { IDTimezone } from "../../../dates/interfaces/IDTimezone";
2
+ import { IFSData } from "../../interfaces/common/IFSData";
3
+ import { IFUData } from "../../interfaces/ui/IFUData";
4
+ /**
5
+ * Gets and transforms the Filter Data by the Timezone object
6
+ * @param {IFSData | IFUData} filterData the filter data
7
+ * @param {IDTimezone} timezone the timezone object
8
+ * @returns {IFSData | IFUData} the new filter data with the transformed datetime values
9
+ */
10
+ export declare function getFiltersByTimezone(filterData: IFSData | IFUData, timezone: IDTimezone): IFUData | IFSData;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFiltersByTimezone = void 0;
4
+ const isEmpty_1 = require("../../../general/mix/isEmpty");
5
+ const transformFilterValues_1 = require("../ui/transformFilterValues");
6
+ /**
7
+ * Gets and transforms the Filter Data by the Timezone object
8
+ * @param {IFSData | IFUData} filterData the filter data
9
+ * @param {IDTimezone} timezone the timezone object
10
+ * @returns {IFSData | IFUData} the new filter data with the transformed datetime values
11
+ */
12
+ function getFiltersByTimezone(filterData, timezone) {
13
+ if ((0, isEmpty_1.isEmpty)(filterData) ||
14
+ (0, isEmpty_1.isEmpty)(filterData.scopes) ||
15
+ !Array.isArray(filterData.scopes))
16
+ return filterData;
17
+ return Object.assign(Object.assign({}, filterData), { scopes: filterData.scopes.map((scope) => (Object.assign(Object.assign({}, scope), { datasets: scope.datasets.map((dataset) => (Object.assign(Object.assign({}, dataset), { filters: dataset.filters.map((filter) => (Object.assign(Object.assign({}, filter), { values: (0, transformFilterValues_1.transformFilterValues)(filter, {
18
+ timezone,
19
+ translate: undefined,
20
+ i18n: undefined,
21
+ noLocale: true,
22
+ noSuffix: true,
23
+ noTranslate: true,
24
+ }) }))) }))) }))) });
25
+ }
26
+ exports.getFiltersByTimezone = getFiltersByTimezone;
@@ -10,6 +10,7 @@ export * from "./getFiltersByDatasetsColumns";
10
10
  export * from "./getFiltersByParams";
11
11
  export * from "./getFiltersByScopes";
12
12
  export * from "./getFiltersByScopesIds";
13
+ export * from "./getFiltersByTimezone";
13
14
  export * from "./getFiltersByVisibility";
14
15
  export * from "./getMergeFiltersSettings";
15
16
  export * from "./getParamsToGetFilterSettings";
@@ -26,6 +26,7 @@ __exportStar(require("./getFiltersByDatasetsColumns"), exports);
26
26
  __exportStar(require("./getFiltersByParams"), exports);
27
27
  __exportStar(require("./getFiltersByScopes"), exports);
28
28
  __exportStar(require("./getFiltersByScopesIds"), exports);
29
+ __exportStar(require("./getFiltersByTimezone"), exports);
29
30
  __exportStar(require("./getFiltersByVisibility"), exports);
30
31
  __exportStar(require("./getMergeFiltersSettings"), exports);
31
32
  __exportStar(require("./getParamsToGetFilterSettings"), exports);
@@ -1,7 +1,13 @@
1
+ import { IDTimezone } from "../../../dates/interfaces/IDTimezone";
1
2
  import { II18nConfig } from "../../../globalization/interfaces/II18nConfig";
2
3
  import { II18nServiceTranslate } from "../../../globalization/interfaces/II18nServiceTranslate";
3
4
  export interface IFUTransformFilterValuesSettings {
5
+ timezone?: IDTimezone;
4
6
  translate: II18nServiceTranslate;
5
7
  i18n: II18nConfig;
6
8
  suffixTranslateLabel?: string;
9
+ noLocale?: boolean;
10
+ noTranslate?: boolean;
11
+ noSuffix?: boolean;
12
+ noTimezone?: boolean;
7
13
  }
@@ -103,7 +103,7 @@ class FiltersApi {
103
103
  else {
104
104
  api = this.chartPaginationApi;
105
105
  }
106
- return api.getChartResult(this.config, FiltersApi.getFilter(config), FiltersApi.getLogic(config), FiltersApi.getChartRequest(config), resetApi);
106
+ return api.getChartResult(Object.assign(Object.assign({}, this.config), { timezone: config.widgetConfig.timezone }), FiltersApi.getFilter(config), FiltersApi.getLogic(config), FiltersApi.getChartRequest(config), resetApi);
107
107
  });
108
108
  }
109
109
  static getLogic(config) {
@@ -1,5 +1,5 @@
1
1
  import { IFormatConfig } from "../interfaces/format/IFormatConfig.Interface";
2
- export declare function formatDate(dateString: any, format: any): any;
2
+ export declare function formatDate(dateString: any, format: any, offset: any): any;
3
3
  export declare function formatAbbreviated(num: any, decimals: any): any;
4
4
  /**
5
5
  * Set convert Bytes into MB
@@ -7,8 +7,14 @@ exports.defineFormat = exports.validateColumnType = exports.parseFormulaType = e
7
7
  const d3_format_1 = require("d3-format");
8
8
  const dayjs_1 = __importDefault(require("dayjs"));
9
9
  const definition_1 = require("./definition");
10
+ //* *dayjs plugins */
10
11
  const isoWeek_1 = __importDefault(require("dayjs/plugin/isoWeek"));
11
12
  const advancedFormat_1 = __importDefault(require("dayjs/plugin/advancedFormat"));
13
+ const utc_1 = __importDefault(require("dayjs/plugin/utc"));
14
+ const weekYear_1 = __importDefault(require("dayjs/plugin/weekYear"));
15
+ const weekOfYear_1 = __importDefault(require("dayjs/plugin/weekOfYear"));
16
+ const updateLocale_1 = __importDefault(require("dayjs/plugin/updateLocale"));
17
+ //* * end dayjs plugin imports */
12
18
  const isEmpty_1 = require("../general/mix/isEmpty");
13
19
  const get_1 = require("../general/object/get");
14
20
  const COLUMN_1 = require("../columns/constants/COLUMN");
@@ -17,8 +23,15 @@ const localization_1 = require("./localization");
17
23
  const isObject_1 = require("../general/object/isObject");
18
24
  const DURATION_PARTS_LIST_1 = require("../column_format/constants/DURATION_PARTS_LIST");
19
25
  const cloneDeep_1 = require("../general/object/cloneDeep");
26
+ dayjs_1.default.extend(updateLocale_1.default);
27
+ dayjs_1.default.updateLocale("en", {
28
+ yearStart: 4,
29
+ });
20
30
  dayjs_1.default.extend(isoWeek_1.default); // Add support for iso week format https://github.com/iamkun/dayjs/issues/1328
21
31
  dayjs_1.default.extend(advancedFormat_1.default); // Add support to advanced formats https://day.js.org/docs/en/plugin/advanced-format
32
+ dayjs_1.default.extend(utc_1.default);
33
+ dayjs_1.default.extend(weekYear_1.default);
34
+ dayjs_1.default.extend(weekOfYear_1.default);
22
35
  /**
23
36
  * Apply to the given date format to a date value
24
37
  * @param bytes type number
@@ -27,7 +40,7 @@ function isValidDateString(dateString = "") {
27
40
  return (/^\d{2}\/\d{2}\/\d{4}/.test(dateString) || // MM/DD/YYY OR DD/MM/YYYY
28
41
  /^\d{4}-\d{2}-\d{2}/.test(dateString)); // YYYY-MM-DD
29
42
  }
30
- function formatDate(dateString, format) {
43
+ function formatDate(dateString, format, offset) {
31
44
  let _format = (0, cloneDeep_1.cloneDeep)(format);
32
45
  if ((0, isObject_1.isObject)(format))
33
46
  _format = _format.format || "";
@@ -35,8 +48,12 @@ function formatDate(dateString, format) {
35
48
  return dateString;
36
49
  if (!isValidDateString(dateString))
37
50
  return dateString;
38
- const dateValue = dateString === null || dateString === void 0 ? void 0 : dateString.replace(/Z$/i, "");
39
- return (0, dayjs_1.default)(dateValue.split(".")[0]).format(_format
51
+ const dateStringCleaned = dateString === null || dateString === void 0 ? void 0 : dateString.replace(/Z$/i, "");
52
+ const firstPartOfDateString = (0, dayjs_1.default)(dateStringCleaned.split(".")[0]);
53
+ const newDateValue = !(0, isEmpty_1.isEmpty)(offset)
54
+ ? firstPartOfDateString.utcOffset(offset)
55
+ : firstPartOfDateString;
56
+ return newDateValue.format(_format
40
57
  .replace("HH24:", "HH:")
41
58
  .replace("MI:SS", "mm:ss")
42
59
  .replace("MM:SS", "mm:ss"));
@@ -146,7 +163,7 @@ const addFormat = (value, outputFormat = "None", config) => {
146
163
  : formatDate(value, (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Default" &&
147
164
  ((_c = outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.originalFormat) === null || _c === void 0 ? void 0 : _c.format)
148
165
  ? (_d = outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.originalFormat) === null || _d === void 0 ? void 0 : _d.format
149
- : outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format);
166
+ : outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format, config === null || config === void 0 ? void 0 : config.offset);
150
167
  case "NUMERIC": {
151
168
  const parse = parseFloat(value);
152
169
  const withLocale = (outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang)) ||
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatWithLocale = exports.chooseLang = exports.getLang = void 0;
4
+ const dates_1 = require("../dates");
4
5
  const isEmpty_1 = require("../general/mix/isEmpty");
5
6
  const definition_1 = require("./definition");
6
7
  const durationFormatter_1 = require("./duration/durationFormatter");
@@ -29,11 +30,19 @@ const formatWithLocale = (value, outputFormat, config = {}) => {
29
30
  }
30
31
  };
31
32
  exports.formatWithLocale = formatWithLocale;
33
+ function getDateWithOffset(dateValue, offset) {
34
+ const targetTime = new Date(dateValue);
35
+ if (!(0, isEmpty_1.isEmpty)(offset))
36
+ targetTime.setUTCMinutes(targetTime.getUTCMinutes() +
37
+ targetTime.getTimezoneOffset() +
38
+ (0, dates_1.ISOToNumericOffset)(offset));
39
+ return targetTime;
40
+ }
32
41
  const DATE_FORMAT_CACHE = [];
33
42
  function formatLocaleDate(value, outputFormat, config) {
34
43
  const { lang = definition_1.LANG_DEFAULT, options } = config;
35
44
  const dateValue = value === null || value === void 0 ? void 0 : value.replace(/Z$/i, "");
36
- const dateParam = new Date(dateValue);
45
+ const dateParam = getDateWithOffset(dateValue, config === null || config === void 0 ? void 0 : config.offset);
37
46
  let langOpts = options;
38
47
  if (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.originalFormat) {
39
48
  if ((0, isDateTimeFormat_1.isDateTimeFormat)(outputFormat))
@@ -1,5 +1,6 @@
1
1
  export * from "./array/index";
2
2
  export * from "./function/index";
3
3
  export * from "./mix/index";
4
+ export * from "./numeric/index";
4
5
  export * from "./object/index";
5
6
  export * from "./string/index";
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./array/index"), exports);
18
18
  __exportStar(require("./function/index"), exports);
19
19
  __exportStar(require("./mix/index"), exports);
20
+ __exportStar(require("./numeric/index"), exports);
20
21
  __exportStar(require("./object/index"), exports);
21
22
  __exportStar(require("./string/index"), exports);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gets the numeric sign of a given number
3
+ * @param {number} num the number
4
+ * @returns {string} an string with the sign
5
+ */
6
+ export declare function getSign(num: number): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSign = void 0;
4
+ /**
5
+ * Gets the numeric sign of a given number
6
+ * @param {number} num the number
7
+ * @returns {string} an string with the sign
8
+ */
9
+ function getSign(num) {
10
+ return Math.sign(num) > -1 ? "+" : "-";
11
+ }
12
+ exports.getSign = getSign;
@@ -0,0 +1 @@
1
+ export * from "./getSign";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./getSign"), exports);
@@ -0,0 +1,8 @@
1
+ import { IDTimezone } from "../../dates/interfaces/IDTimezone";
2
+ /**
3
+ * Transforms the date+times propertiesof the given object by the Timezone object
4
+ * @param {any} obj the object
5
+ * @param {IDTimezone} timezone the timezone object
6
+ * @returns {IFSData | IFUData} the new filter data with the transformed datetime values
7
+ */
8
+ export declare function applyTimezoneDeep(obj: any, timezone: IDTimezone): any;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.applyTimezoneDeep = void 0;
4
+ const DATE_FORMAT_1 = require("../../dates/constants/DATE_FORMAT");
5
+ const getDateByTimezone_1 = require("../../dates/helpers/getDateByTimezone");
6
+ const validateDate_1 = require("../../dates/helpers/validateDate");
7
+ const isEmpty_1 = require("../mix/isEmpty");
8
+ const isObject_1 = require("./isObject");
9
+ /**
10
+ * Transforms the date+times propertiesof the given object by the Timezone object
11
+ * @param {any} obj the object
12
+ * @param {IDTimezone} timezone the timezone object
13
+ * @returns {IFSData | IFUData} the new filter data with the transformed datetime values
14
+ */
15
+ function applyTimezoneDeep(obj, timezone) {
16
+ if ((0, isEmpty_1.isEmpty)(obj))
17
+ return obj;
18
+ let result;
19
+ if ((0, isObject_1.isObject)(obj)) {
20
+ result = {};
21
+ }
22
+ else if (Array.isArray(obj)) {
23
+ result = [];
24
+ }
25
+ try {
26
+ for (const i in obj) {
27
+ if ((0, isObject_1.isObject)(obj[i]) || Array.isArray(obj[i])) {
28
+ result[i] = applyTimezoneDeep(obj[i], timezone);
29
+ }
30
+ else if (obj[i] instanceof Date ||
31
+ (0, validateDate_1.validateDate)(obj[i], DATE_FORMAT_1.DATE_FORMAT.HOUR)) {
32
+ result[i] = (0, getDateByTimezone_1.getDateByTimezone)(obj[i], timezone);
33
+ }
34
+ else {
35
+ result[i] = obj[i];
36
+ }
37
+ }
38
+ return result;
39
+ }
40
+ catch (_a) {
41
+ return obj;
42
+ }
43
+ }
44
+ exports.applyTimezoneDeep = applyTimezoneDeep;
@@ -1,3 +1,4 @@
1
+ export * from "./applyTimezoneDeep";
1
2
  export * from "./cloneDeep";
2
3
  export * from "./get";
3
4
  export * from "./getAttribute";
@@ -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("./applyTimezoneDeep"), exports);
17
18
  __exportStar(require("./cloneDeep"), exports);
18
19
  __exportStar(require("./get"), exports);
19
20
  __exportStar(require("./getAttribute"), exports);
@@ -2,7 +2,13 @@
2
2
  * Settings structure of the Merge Deep helper
3
3
  */
4
4
  interface IMergeDeepSettings {
5
+ /**
6
+ * Merging properties that exists in object 2 but not in object 1
7
+ */
5
8
  mergeMissingProperties?: boolean;
9
+ /**
10
+ * Merging values on matched object properties. If false, the object 1 values remains as equal.
11
+ */
6
12
  mergeExistingValues?: boolean;
7
13
  }
8
14
  /**
@@ -15,22 +15,23 @@ function mergeDeep(obj1, obj2, settings) {
15
15
  const defaultSettings = getParamsToMergeDeep(settings);
16
16
  if (!isValid(obj1, obj2))
17
17
  return (0, objectCopy_1.objectCopy)(obj1);
18
- const result = {};
18
+ const result = Array.isArray(obj1) ? [] : {};
19
19
  for (const i in obj1) {
20
- if (i != null && i in obj2 && (0, isObject_1.isObject)(obj1[i])) {
20
+ if ((0, isObject_1.isObject)(obj1[i]) || Array.isArray(obj1[i])) {
21
21
  result[i] = mergeDeep(obj1[i], obj2[i], defaultSettings);
22
22
  }
23
+ else if (i in obj2 && defaultSettings.mergeExistingValues) {
24
+ result[i] = obj2[i];
25
+ }
23
26
  else {
24
27
  result[i] = obj1[i];
25
28
  }
26
29
  }
27
- for (const i in obj2) {
28
- if (i != null &&
29
- ((!(0, isObject_1.isObject)(obj2[i]) &&
30
- i in result &&
31
- defaultSettings.mergeExistingValues) ||
32
- (!(i in result) && defaultSettings.mergeMissingProperties))) {
33
- result[i] = obj2[i];
30
+ if (defaultSettings.mergeMissingProperties) {
31
+ for (const i in obj2) {
32
+ if (!(i in result)) {
33
+ result[i] = obj2[i];
34
+ }
34
35
  }
35
36
  }
36
37
  return result;
@@ -43,7 +44,8 @@ exports.mergeDeep = mergeDeep;
43
44
  * @returns true: they are valid; false: they are not
44
45
  */
45
46
  function isValid(obj1, obj2) {
46
- return (0, isObject_1.isObject)(obj1) && (0, isObject_1.isObject)(obj2);
47
+ return (((0, isObject_1.isObject)(obj1) && (0, isObject_1.isObject)(obj2)) ||
48
+ (Array.isArray(obj1) && Array.isArray(obj2)));
47
49
  }
48
50
  /**
49
51
  * Validates and gets the settings with all set parameters.
@@ -13,5 +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
+ utc_tooltip: "The times displayed are in {{utc}}",
17
17
  };
@@ -362,7 +362,7 @@ exports.I18N_FORMULA_BUILDER = {
362
362
  },
363
363
  function_date_add: {
364
364
  description: "Given a Date or a Column, add the specific value to the specific part.",
365
- function_placeholder: "dateAdd(date, date_part, interval_value)",
365
+ function_placeholder: "dateAdd(date, 'date_part', interval_value)",
366
366
  param_date_name: "date",
367
367
  param_date_description: "This is the Date or Column to which you want to add.",
368
368
  param_part_name: "date_part",
@@ -372,7 +372,7 @@ exports.I18N_FORMULA_BUILDER = {
372
372
  },
373
373
  function_date_subtract: {
374
374
  description: "Given a Date or a Column, subtract the specific value to the specific part.",
375
- function_placeholder: "dateSubtract(date, date_part, interval_value)",
375
+ function_placeholder: "dateSubtract(date, 'date_part', interval_value)",
376
376
  param_date_name: "date",
377
377
  param_date_description: "This is the Date or Column to which you want to subtract.",
378
378
  param_part_name: "date_part",
@@ -382,7 +382,7 @@ exports.I18N_FORMULA_BUILDER = {
382
382
  },
383
383
  function_date_diff: {
384
384
  description: "Calculates the difference between two dates based on the date part requested.",
385
- function_placeholder: "dateDiff(date_value1, date_value2, date_part)",
385
+ function_placeholder: "dateDiff(date_value1, date_value2, 'date_part')",
386
386
  param_date_value_one_name: "date_value1",
387
387
  param_date_value_one_description: "The first date value.",
388
388
  param_date_value_two_name: "date_value2",
@@ -18,7 +18,7 @@ exports.I18N_PANEL = {
18
18
  invalid_data_for_chart: "No valid data for this chart",
19
19
  longer_available_panel: "This panel is no longer available",
20
20
  long_text: "long-text",
21
- max_buckets_limit: "The combination of data used in this chart exceeds the maximum number of data points that the system can return.<br><br>We recommend you try:<br>• Refining your data with <i>Max Data Points</i> or <i>Filters</i><br>• Using a <i>Date Grouping</i> that returns less data<br>• Using another chart visualization",
21
+ max_buckets_limit: "The combination of data used in this chart exceeds the maximum number of aggregation buckets allowed in a single response.<br><br>To fix this issue, try the following:<br>• <i>Filter</i> your data<br>• Apply a <i>Date Grouping</i> that returns less data<br>• Use another chart visualization",
22
22
  missing_column: "Missing Column.",
23
23
  missing_bucket_column: "Missing bucket column.",
24
24
  missing_formula_column: "Missing formula column.",
@@ -1,5 +1,6 @@
1
1
  export interface IFormatConfig {
2
2
  lang?: string;
3
+ offset?: number | string;
3
4
  options?: object;
4
5
  isMultiplied?: boolean;
5
6
  }
@@ -1,3 +1,4 @@
1
+ import { IDTimezone } from "../../dates/interfaces/IDTimezone";
1
2
  import { II18nConfig } from "../../globalization/interfaces/II18nConfig";
2
3
  export interface IWidgetConfig {
3
4
  appid?: string;
@@ -5,6 +6,6 @@ export interface IWidgetConfig {
5
6
  domain: string;
6
7
  i18n?: II18nConfig;
7
8
  qv_token?: string;
8
- timezoneControl?: string;
9
+ timezone?: IDTimezone;
9
10
  userid?: string;
10
11
  }
@@ -10,6 +10,7 @@ const format_1 = require("../../format/format");
10
10
  const isEmpty_1 = require("../../general/mix/isEmpty");
11
11
  const getI18nDateGroupLabel_1 = require("../../globalization/helpers/getI18nDateGroupLabel");
12
12
  const getValueWithSuffixes_1 = require("./getValueWithSuffixes");
13
+ const getDateByTimezone_1 = require("../../dates/helpers/getDateByTimezone");
13
14
  /**
14
15
  * Transforms a value depending of localization/globalization and extras settings.
15
16
  * @param value A value to transform
@@ -19,14 +20,38 @@ const getValueWithSuffixes_1 = require("./getValueWithSuffixes");
19
20
  function transformValue(value, settings) {
20
21
  if ((0, isEmpty_1.isEmpty)(value))
21
22
  return value;
22
- const valueWithI18n = (0, getI18nDateGroupLabel_1.getI18nDateGroupLabel)(value, settings.property, settings.translate);
23
- const valueWithLocalization = (0, format_1.addFormat)(valueWithI18n, getOutputFormat(settings), getFormatConfig(settings));
24
- return (0, getValueWithSuffixes_1.getValueWithSuffixes)(valueWithLocalization, {
25
- suffixTranslateLabel: settings.suffixTranslateLabel,
26
- translate: settings.translate,
27
- });
23
+ const defaultSettings = getDefaultSettings(settings);
24
+ let timezonedValue = value;
25
+ if (!defaultSettings.noTimezone) {
26
+ timezonedValue = (0, getDateByTimezone_1.getDateByTimezone)(value, defaultSettings.timezone);
27
+ }
28
+ let valueWithI18n = timezonedValue;
29
+ if (!defaultSettings.noTranslate) {
30
+ valueWithI18n = (0, getI18nDateGroupLabel_1.getI18nDateGroupLabel)(timezonedValue, defaultSettings.property, defaultSettings.translate);
31
+ }
32
+ let valueWithLocalization = valueWithI18n;
33
+ if (!defaultSettings.noLocale) {
34
+ valueWithLocalization = (0, format_1.addFormat)(valueWithI18n, getOutputFormat(settings), getFormatConfig(settings));
35
+ }
36
+ let valueWithSuffix = valueWithI18n;
37
+ if (!defaultSettings.noSuffix) {
38
+ valueWithSuffix = (0, getValueWithSuffixes_1.getValueWithSuffixes)(valueWithLocalization, {
39
+ suffixTranslateLabel: defaultSettings.suffixTranslateLabel,
40
+ translate: defaultSettings.translate,
41
+ });
42
+ }
43
+ return valueWithSuffix;
28
44
  }
29
45
  exports.transformValue = transformValue;
46
+ /**
47
+ * Gets the default settings properties
48
+ * @param {ITransformValueSettings} settings the given settings
49
+ * @returns {ITransformValueSettings} the settings with default properties
50
+ */
51
+ function getDefaultSettings(settings) {
52
+ var _a, _b, _c, _d;
53
+ return Object.assign(Object.assign({}, settings), { noLocale: (_a = settings === null || settings === void 0 ? void 0 : settings.noLocale) !== null && _a !== void 0 ? _a : false, noSuffix: (_b = settings === null || settings === void 0 ? void 0 : settings.noSuffix) !== null && _b !== void 0 ? _b : false, noTimezone: (_c = settings === null || settings === void 0 ? void 0 : settings.noTimezone) !== null && _c !== void 0 ? _c : false, noTranslate: (_d = settings === null || settings === void 0 ? void 0 : settings.noTranslate) !== null && _d !== void 0 ? _d : false });
54
+ }
30
55
  /**
31
56
  * Gets the outputformat settings
32
57
  * @param settings The settings of the transformValue function
@@ -1,4 +1,5 @@
1
1
  import { IBColumn } from "../../columns/interfaces/IBColumn";
2
+ import { IBTimezone } from "../../dates/interfaces/IBTimezone";
2
3
  /**
3
4
  * Structure for Dataset in the frontend side of Qrvey App
4
5
  */
@@ -7,4 +8,5 @@ export interface IBDataset {
7
8
  name?: string;
8
9
  options?: IBColumn[];
9
10
  qrveyid: string;
11
+ timezone?: IBTimezone;
10
12
  }
@@ -2,11 +2,15 @@ import { IAppStatus } from "./IAppStatus";
2
2
  import { IBModelBranchesMap } from "./IBModelBranchesMap";
3
3
  import { IBModelData } from "./IBModelData";
4
4
  import { IAppType } from "./IAppType";
5
+ import { IBTimezone } from "../../dates/interfaces/IBTimezone";
5
6
  export interface IBModel {
6
7
  appType: IAppType;
7
8
  appid: string;
8
9
  branchesMap?: IBModelBranchesMap[];
9
10
  createDate: string;
11
+ /**
12
+ * @deprecated Data Link feature is not longer supported
13
+ */
10
14
  datalinkInfo?: any[];
11
15
  geoGroups?: any[];
12
16
  modifyDate: string;
@@ -16,5 +20,6 @@ export interface IBModel {
16
20
  questionOrder: string[];
17
21
  questions: IBModelData;
18
22
  status: IAppStatus;
23
+ timezone: IBTimezone;
19
24
  userid: string;
20
25
  }
@@ -1,9 +1,11 @@
1
1
  import { IColumn } from "../../columns/interfaces/IColumn";
2
+ import { IDTimezone } from "../../dates/interfaces/IDTimezone";
2
3
  import { IBDataset } from "./IBDataset";
3
4
  /**
4
5
  * Structure for Dataset in the frontend side of Qrvey App
5
6
  */
6
- export interface IDataset extends Omit<IBDataset, "name" | "options"> {
7
+ export interface IDataset extends Omit<IBDataset, "name" | "options" | "timezone"> {
7
8
  label?: string;
8
9
  options?: IColumn[];
10
+ timezone?: IDTimezone;
9
11
  }
@@ -1,10 +1,12 @@
1
1
  import { IColumn } from "../../columns/interfaces/IColumn";
2
+ import { IDTimezone } from "../../dates/interfaces/IDTimezone";
2
3
  import { IBModel } from "./IBModel";
3
4
  import { IModelBranchesMap } from "./IModelBranchesMap";
4
- export interface IModel extends Omit<IBModel, "questions" | "branchesMap" | "name" | "numResponses" | "questionOrder"> {
5
+ export interface IModel extends Omit<IBModel, "questions" | "branchesMap" | "name" | "numResponses" | "questionOrder" | "timezone"> {
5
6
  columns: IColumn[];
6
7
  columnOrder: string[];
7
8
  branchesMap: IModelBranchesMap[];
8
9
  label: string;
10
+ timezone: IDTimezone;
9
11
  totalRecords: number;
10
12
  }
@@ -1,11 +1,17 @@
1
1
  import { IColumn } from "../../columns/interfaces/IColumn";
2
2
  import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyType";
3
+ import { IDTimezone } from "../../dates/interfaces/IDTimezone";
3
4
  import { II18nConfig } from "../../globalization/interfaces/II18nConfig";
4
5
  import { II18nServiceTranslate } from "../../globalization/interfaces/II18nServiceTranslate";
5
6
  export interface ITransformValueSettings {
6
7
  column: IColumn;
7
8
  property: IColumnPropertyType;
9
+ timezone?: IDTimezone;
8
10
  translate: II18nServiceTranslate;
9
11
  i18n: II18nConfig;
10
12
  suffixTranslateLabel?: string;
13
+ noLocale?: boolean;
14
+ noTranslate?: boolean;
15
+ noSuffix?: boolean;
16
+ noTimezone?: boolean;
11
17
  }
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BDatasetsToUIDatasets = void 0;
4
4
  const getAttribute_1 = require("../../general/object/getAttribute");
5
5
  const BColumnsToUIColumns_adapter_1 = require("./BColumnsToUIColumns.adapter");
6
+ const BTimezoneToUITimezone_1 = require("./BTimezoneToUITimezone");
6
7
  function BDatasetsToUIDatasets(datasets = []) {
7
8
  return datasets.map((dataset) => ({
8
9
  qrveyid: (0, getAttribute_1.getAttribute)(dataset, "qrvey_id"),
9
10
  label: dataset.name,
10
11
  options: (0, BColumnsToUIColumns_adapter_1.BColumnsToUIColumns)(dataset.options, dataset),
12
+ timezone: (0, BTimezoneToUITimezone_1.BTimezoneToUITimezone)(dataset.timezone),
11
13
  }));
12
14
  }
13
15
  exports.BDatasetsToUIDatasets = BDatasetsToUIDatasets;