@qrvey/utils 1.5.0-0 → 1.5.0-11

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 (347) hide show
  1. package/README.md +1 -1
  2. package/dist/charts/adapters/endpointData.d.ts +90 -0
  3. package/dist/charts/adapters/endpointData.js +513 -0
  4. package/dist/charts/adapters/endpointDataGet.d.ts +14 -0
  5. package/dist/charts/adapters/endpointDataGet.js +427 -0
  6. package/dist/charts/adapters/endpointDataValidators.d.ts +4 -0
  7. package/dist/charts/adapters/endpointDataValidators.js +54 -0
  8. package/dist/charts/adapters/index.d.ts +3 -0
  9. package/dist/charts/adapters/index.js +3 -0
  10. package/dist/charts/index.d.ts +1 -0
  11. package/dist/charts/index.js +1 -0
  12. package/dist/cjs/charts/adapters/endpointData.d.ts +90 -0
  13. package/dist/cjs/charts/adapters/endpointData.js +519 -0
  14. package/dist/cjs/charts/adapters/endpointDataGet.d.ts +14 -0
  15. package/dist/cjs/charts/adapters/endpointDataGet.js +443 -0
  16. package/dist/cjs/charts/adapters/endpointDataValidators.d.ts +4 -0
  17. package/dist/cjs/charts/adapters/endpointDataValidators.js +61 -0
  18. package/dist/cjs/charts/adapters/index.d.ts +3 -0
  19. package/dist/cjs/{dates/range → charts/adapters}/index.js +3 -1
  20. package/dist/cjs/charts/index.d.ts +1 -0
  21. package/dist/cjs/charts/index.js +1 -0
  22. package/dist/cjs/column_format/constants/DURATION_PARTS_LIST.d.ts +1 -0
  23. package/dist/cjs/column_format/constants/DURATION_PARTS_LIST.js +12 -0
  24. package/dist/cjs/column_format/constants/index.d.ts +1 -0
  25. package/dist/cjs/column_format/constants/index.js +1 -0
  26. package/dist/cjs/column_format/helpers/defineTableChartFormat.js +19 -10
  27. package/dist/cjs/column_format/helpers/defineXYChartFormat.js +11 -13
  28. package/dist/cjs/columns/constants/COLUMN.js +1 -1
  29. package/dist/cjs/columns/constants/COLUMN_PROPERTY.js +2 -2
  30. package/dist/cjs/columns/helpers/getDatasetColumn.d.ts +9 -1
  31. package/dist/cjs/columns/helpers/getDatasetColumn.js +31 -4
  32. package/dist/cjs/columns/helpers/getDatasetColumnByDatasets.d.ts +6 -5
  33. package/dist/cjs/columns/helpers/getDatasetColumnByDatasets.js +22 -8
  34. package/dist/cjs/columns/helpers/getModelColumn.d.ts +4 -4
  35. package/dist/cjs/columns/helpers/getModelColumn.js +9 -19
  36. package/dist/cjs/columns/helpers/isComplexColumn.d.ts +5 -0
  37. package/dist/cjs/columns/helpers/isComplexColumn.js +5 -0
  38. package/dist/cjs/columns/helpers/isDateColumn.d.ts +5 -0
  39. package/dist/cjs/columns/helpers/isDateColumn.js +8 -1
  40. package/dist/cjs/columns/helpers/isNumericalColumn.d.ts +5 -0
  41. package/dist/cjs/columns/helpers/isNumericalColumn.js +7 -1
  42. package/dist/cjs/constants/Charts.Const.d.ts +1 -0
  43. package/dist/cjs/constants/Charts.Const.js +1 -0
  44. package/dist/cjs/dates/adapters/dateToHms.d.ts +1 -1
  45. package/dist/cjs/dates/adapters/dateToHms.js +6 -8
  46. package/dist/cjs/dates/adapters/dateToMdyDate.js +6 -9
  47. package/dist/cjs/dates/adapters/dateToMonthYear.js +6 -4
  48. package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +2 -2
  49. package/dist/cjs/dates/adapters/dateToQuarterYear.js +8 -6
  50. package/dist/cjs/dates/adapters/dateToWeekYear.js +5 -3
  51. package/dist/cjs/dates/adapters/dateToYear.d.ts +1 -1
  52. package/dist/cjs/dates/adapters/dateToYear.js +6 -4
  53. package/dist/cjs/dates/adapters/weekYearToDate.js +1 -6
  54. package/dist/cjs/dates/constants/DATETIME_COLUMN_FORMAT.js +1 -0
  55. package/dist/cjs/dates/constants/DATE_DISTINCT_PROPERTY.js +1 -1
  56. package/dist/cjs/dates/constants/DATE_FORMAT.js +7 -7
  57. package/dist/cjs/dates/constants/DATE_FORMATS.d.ts +1 -0
  58. package/dist/cjs/dates/constants/DATE_FORMATS.js +22 -0
  59. package/dist/cjs/dates/constants/DATE_GROUPING_ALL_PROPERTIES.d.ts +1 -0
  60. package/dist/cjs/dates/constants/DATE_GROUPING_ALL_PROPERTIES.js +9 -0
  61. package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSIONS.d.ts +1 -0
  62. package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSIONS.js +23 -0
  63. package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.d.ts +3 -0
  64. package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.js +40 -0
  65. package/dist/cjs/dates/constants/index.d.ts +4 -0
  66. package/dist/cjs/dates/constants/index.js +4 -0
  67. package/dist/cjs/dates/helpers/{includeDateTokens.d.ts → areIncludedDateTokens.d.ts} +1 -1
  68. package/dist/cjs/dates/helpers/{includeDateTokens.js → areIncludedDateTokens.js} +5 -4
  69. package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +2 -2
  70. package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.js +9 -42
  71. package/dist/{dates/range → cjs/dates/helpers}/getDateRange.d.ts +3 -3
  72. package/dist/cjs/dates/{range → helpers}/getDateRange.js +73 -69
  73. package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +1 -0
  74. package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +17 -17
  75. package/dist/cjs/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
  76. package/dist/cjs/dates/helpers/getSeparatorByDateFormat.js +1 -1
  77. package/dist/cjs/dates/helpers/getWeek.d.ts +6 -4
  78. package/dist/cjs/dates/helpers/getWeek.js +6 -3
  79. package/dist/cjs/dates/helpers/index.d.ts +4 -1
  80. package/dist/cjs/dates/helpers/index.js +4 -1
  81. package/dist/cjs/dates/helpers/isValidPotentialDate.d.ts +6 -0
  82. package/dist/cjs/dates/helpers/isValidPotentialDate.js +18 -0
  83. package/dist/cjs/dates/index.d.ts +0 -1
  84. package/dist/cjs/dates/index.js +0 -1
  85. package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +5 -5
  86. package/dist/cjs/filters/adapters/FDToFlatUI.js +4 -4
  87. package/dist/cjs/filters/adapters/FDToUI.js +3 -3
  88. package/dist/cjs/filters/adapters/UIToFD.js +3 -3
  89. package/dist/cjs/filters/adapters/UIToFlatUI.js +3 -3
  90. package/dist/cjs/filters/adapters/UIToOldLogic.js +6 -6
  91. package/dist/cjs/filters/adapters/adaptFilterData.js +7 -7
  92. package/dist/cjs/filters/adapters/flatUIToFD.js +24 -24
  93. package/dist/cjs/filters/adapters/flatUIToOldLogic.js +42 -49
  94. package/dist/cjs/filters/adapters/flatUIToUI.js +29 -29
  95. package/dist/cjs/filters/adapters/index.d.ts +0 -1
  96. package/dist/cjs/filters/adapters/index.js +0 -1
  97. package/dist/cjs/filters/adapters/logicToFlatUI.js +6 -8
  98. package/dist/cjs/filters/helpers/OLD_getAggFilters.js +5 -4
  99. package/dist/cjs/filters/helpers/backend/buildExpression.js +1 -1
  100. package/dist/cjs/filters/helpers/backend/buildFilters.js +6 -16
  101. package/dist/cjs/filters/helpers/backend/getBackendValidator.js +1 -1
  102. package/dist/cjs/filters/helpers/backend/getBackendValues.js +1 -3
  103. package/dist/cjs/filters/helpers/backend/getLogicByDatasets.js +2 -2
  104. package/dist/cjs/filters/helpers/backend/getLogicByDatasetsColumns.js +2 -2
  105. package/dist/cjs/filters/helpers/backend/getLogicByScopes.js +2 -2
  106. package/dist/cjs/filters/helpers/backend/getLogicByScopesHierarchy.js +0 -2
  107. package/dist/cjs/filters/helpers/common/excludeFiltersByAggregateColumn.js +3 -3
  108. package/dist/cjs/filters/helpers/common/excludeFiltersByParams.js +10 -11
  109. package/dist/cjs/filters/helpers/common/excludeFiltersByScopes.js +3 -3
  110. package/dist/cjs/filters/helpers/common/getFilterLabel.js +1 -1
  111. package/dist/cjs/filters/helpers/common/getFiltersByAggregateColumn.js +3 -3
  112. package/dist/cjs/filters/helpers/common/getFiltersByParams.js +15 -17
  113. package/dist/cjs/filters/helpers/common/getFiltersByScopes.js +3 -3
  114. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +4 -4
  115. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +4 -4
  116. package/dist/cjs/filters/helpers/common/mergeFilters.js +23 -19
  117. package/dist/cjs/filters/helpers/common/mergeValues.js +2 -2
  118. package/dist/cjs/filters/helpers/common/resolveScopeConditions.js +1 -1
  119. package/dist/cjs/filters/helpers/getAggFiltersFromFilterData.js +2 -2
  120. package/dist/cjs/filters/helpers/getTokensFromFilters.js +9 -4
  121. package/dist/cjs/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
  122. package/dist/cjs/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
  123. package/dist/cjs/filters/helpers/ui/getUIFlatFilterByParams.js +3 -3
  124. package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
  125. package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
  126. package/dist/cjs/filters/helpers/ui/getUIValues.js +9 -11
  127. package/dist/cjs/filters/helpers/ui/transformFilterValues.js +1 -3
  128. package/dist/cjs/filters/services/Filters.api.d.ts +4 -4
  129. package/dist/cjs/filters/services/Filters.api.js +7 -7
  130. package/dist/cjs/filters/services/UChartApi.d.ts +11 -11
  131. package/dist/cjs/filters/services/UChartApi.js +176 -185
  132. package/dist/cjs/filters/services/UChartPaginationApi.d.ts +13 -13
  133. package/dist/cjs/filters/services/UChartPaginationApi.js +198 -212
  134. package/dist/cjs/format/definition.d.ts +4 -1
  135. package/dist/cjs/format/definition.js +10 -1
  136. package/dist/cjs/format/duration/addDurationFormat.d.ts +1 -1
  137. package/dist/cjs/format/duration/addDurationFormat.js +2 -2
  138. package/dist/cjs/format/duration/durationFormatter.d.ts +1 -1
  139. package/dist/cjs/format/duration/durationFormatter.js +7 -10
  140. package/dist/cjs/format/format.js +42 -34
  141. package/dist/cjs/format/localization.js +19 -4
  142. package/dist/cjs/general/mix/importScripts.js +8 -14
  143. package/dist/cjs/general/mix/randomId.js +11 -10
  144. package/dist/cjs/general/object/get.js +4 -4
  145. package/dist/cjs/general/object/getAttribute.js +1 -1
  146. package/dist/cjs/general/object/mapValues.js +2 -2
  147. package/dist/cjs/general/object/mergeDeep.js +6 -4
  148. package/dist/cjs/general/object/serialize.js +3 -3
  149. package/dist/cjs/general/string/padLeadingZeros.js +2 -2
  150. package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.js +13 -10
  151. package/dist/cjs/globalization/helpers/getReverseI18nGroupLabel.js +12 -9
  152. package/dist/cjs/globalization/interfaces/II18nResource.d.ts +2 -0
  153. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
  154. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
  155. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.d.ts +10 -0
  156. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.js +2 -0
  157. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderFormatValues.d.ts +1 -0
  158. package/dist/cjs/globalization/interfaces/chart_builder/index.d.ts +1 -0
  159. package/dist/cjs/globalization/interfaces/chart_builder/index.js +1 -0
  160. package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +4 -0
  161. package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +1 -0
  162. package/dist/cjs/globalization/interfaces/panel/II18nPanelMenu.d.ts +1 -0
  163. package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +1 -0
  164. package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.d.ts +4 -0
  165. package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.js +2 -0
  166. package/dist/cjs/globalization/labels/I18N_DEFAULT.js +2 -0
  167. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +10 -0
  168. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +13 -4
  169. package/dist/cjs/globalization/labels/common/I18N_COMMON.js +6 -0
  170. package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +1 -0
  171. package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +1 -0
  172. package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.d.ts +2 -0
  173. package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +7 -0
  174. package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +1 -0
  175. package/dist/cjs/qrvey/helpers/getLookupAnswers.js +4 -6
  176. package/dist/cjs/qrvey/helpers/getValueWithSuffixes.js +1 -1
  177. package/dist/cjs/services/adapters/index.d.ts +2 -1
  178. package/dist/cjs/services/adapters/index.js +2 -1
  179. package/dist/cjs/services/api/getAllDatasets.api.js +6 -8
  180. package/dist/cjs/services/helpers/Request.js +5 -4
  181. package/dist/column_format/constants/DURATION_PARTS_LIST.d.ts +1 -0
  182. package/dist/column_format/constants/DURATION_PARTS_LIST.js +9 -0
  183. package/dist/column_format/constants/index.d.ts +1 -0
  184. package/dist/column_format/constants/index.js +1 -0
  185. package/dist/column_format/helpers/defineTableChartFormat.js +19 -10
  186. package/dist/column_format/helpers/defineXYChartFormat.js +11 -13
  187. package/dist/columns/constants/COLUMN.js +1 -1
  188. package/dist/columns/constants/COLUMN_PROPERTY.js +2 -2
  189. package/dist/columns/helpers/getDatasetColumn.d.ts +9 -1
  190. package/dist/columns/helpers/getDatasetColumn.js +31 -4
  191. package/dist/columns/helpers/getDatasetColumnByDatasets.d.ts +6 -5
  192. package/dist/columns/helpers/getDatasetColumnByDatasets.js +22 -8
  193. package/dist/columns/helpers/getModelColumn.d.ts +4 -4
  194. package/dist/columns/helpers/getModelColumn.js +9 -19
  195. package/dist/columns/helpers/isComplexColumn.d.ts +5 -0
  196. package/dist/columns/helpers/isComplexColumn.js +5 -0
  197. package/dist/columns/helpers/isDateColumn.d.ts +5 -0
  198. package/dist/columns/helpers/isDateColumn.js +8 -1
  199. package/dist/columns/helpers/isNumericalColumn.d.ts +5 -0
  200. package/dist/columns/helpers/isNumericalColumn.js +7 -1
  201. package/dist/constants/Charts.Const.d.ts +1 -0
  202. package/dist/constants/Charts.Const.js +1 -0
  203. package/dist/dates/adapters/dateToHms.d.ts +1 -1
  204. package/dist/dates/adapters/dateToHms.js +6 -8
  205. package/dist/dates/adapters/dateToMdyDate.js +6 -9
  206. package/dist/dates/adapters/dateToMonthYear.js +6 -4
  207. package/dist/dates/adapters/dateToQuarterYear.d.ts +2 -2
  208. package/dist/dates/adapters/dateToQuarterYear.js +8 -6
  209. package/dist/dates/adapters/dateToWeekYear.js +5 -3
  210. package/dist/dates/adapters/dateToYear.d.ts +1 -1
  211. package/dist/dates/adapters/dateToYear.js +6 -4
  212. package/dist/dates/adapters/weekYearToDate.js +1 -6
  213. package/dist/dates/constants/DATETIME_COLUMN_FORMAT.js +1 -0
  214. package/dist/dates/constants/DATE_DISTINCT_PROPERTY.js +1 -1
  215. package/dist/dates/constants/DATE_FORMAT.js +7 -7
  216. package/dist/dates/constants/DATE_FORMATS.d.ts +1 -0
  217. package/dist/dates/constants/DATE_FORMATS.js +19 -0
  218. package/dist/dates/constants/DATE_GROUPING_ALL_PROPERTIES.d.ts +1 -0
  219. package/dist/dates/constants/DATE_GROUPING_ALL_PROPERTIES.js +6 -0
  220. package/dist/dates/constants/DATE_REGULAR_EXPRESSIONS.d.ts +1 -0
  221. package/dist/dates/constants/DATE_REGULAR_EXPRESSIONS.js +20 -0
  222. package/dist/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.d.ts +3 -0
  223. package/dist/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.js +37 -0
  224. package/dist/dates/constants/index.d.ts +4 -0
  225. package/dist/dates/constants/index.js +4 -0
  226. package/dist/dates/helpers/{includeDateTokens.d.ts → areIncludedDateTokens.d.ts} +1 -1
  227. package/dist/dates/helpers/{includeDateTokens.js → areIncludedDateTokens.js} +3 -2
  228. package/dist/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +2 -2
  229. package/dist/dates/helpers/getDateFormatRegularExpressionInArray.js +9 -42
  230. package/dist/{cjs/dates/range → dates/helpers}/getDateRange.d.ts +3 -3
  231. package/dist/dates/{range → helpers}/getDateRange.js +73 -69
  232. package/dist/dates/helpers/getFormattedDateByFormat.d.ts +1 -0
  233. package/dist/dates/helpers/getFormattedDateByFormat.js +17 -17
  234. package/dist/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
  235. package/dist/dates/helpers/getSeparatorByDateFormat.js +1 -1
  236. package/dist/dates/helpers/getWeek.d.ts +6 -4
  237. package/dist/dates/helpers/getWeek.js +6 -3
  238. package/dist/dates/helpers/index.d.ts +4 -1
  239. package/dist/dates/helpers/index.js +4 -1
  240. package/dist/dates/helpers/isValidPotentialDate.d.ts +6 -0
  241. package/dist/dates/helpers/isValidPotentialDate.js +14 -0
  242. package/dist/dates/index.d.ts +0 -1
  243. package/dist/dates/index.js +0 -1
  244. package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +5 -5
  245. package/dist/filters/adapters/FDToFlatUI.js +4 -4
  246. package/dist/filters/adapters/FDToUI.js +3 -3
  247. package/dist/filters/adapters/UIToFD.js +3 -3
  248. package/dist/filters/adapters/UIToFlatUI.js +3 -3
  249. package/dist/filters/adapters/UIToOldLogic.js +6 -6
  250. package/dist/filters/adapters/adaptFilterData.js +7 -7
  251. package/dist/filters/adapters/flatUIToFD.js +24 -24
  252. package/dist/filters/adapters/flatUIToOldLogic.js +42 -49
  253. package/dist/filters/adapters/flatUIToUI.js +29 -29
  254. package/dist/filters/adapters/index.d.ts +0 -1
  255. package/dist/filters/adapters/index.js +0 -1
  256. package/dist/filters/adapters/logicToFlatUI.js +6 -8
  257. package/dist/filters/helpers/OLD_getAggFilters.js +5 -4
  258. package/dist/filters/helpers/backend/buildExpression.js +1 -1
  259. package/dist/filters/helpers/backend/buildFilters.js +6 -16
  260. package/dist/filters/helpers/backend/getBackendValidator.js +1 -1
  261. package/dist/filters/helpers/backend/getBackendValues.js +1 -3
  262. package/dist/filters/helpers/backend/getLogicByDatasets.js +2 -2
  263. package/dist/filters/helpers/backend/getLogicByDatasetsColumns.js +2 -2
  264. package/dist/filters/helpers/backend/getLogicByScopes.js +2 -2
  265. package/dist/filters/helpers/backend/getLogicByScopesHierarchy.js +0 -2
  266. package/dist/filters/helpers/common/excludeFiltersByAggregateColumn.js +3 -3
  267. package/dist/filters/helpers/common/excludeFiltersByParams.js +10 -11
  268. package/dist/filters/helpers/common/excludeFiltersByScopes.js +3 -3
  269. package/dist/filters/helpers/common/getFilterLabel.js +1 -1
  270. package/dist/filters/helpers/common/getFiltersByAggregateColumn.js +3 -3
  271. package/dist/filters/helpers/common/getFiltersByParams.js +15 -17
  272. package/dist/filters/helpers/common/getFiltersByScopes.js +3 -3
  273. package/dist/filters/helpers/common/getFiltersByScopesIds.js +4 -4
  274. package/dist/filters/helpers/common/getFiltersByVisibility.js +4 -4
  275. package/dist/filters/helpers/common/mergeFilters.js +23 -19
  276. package/dist/filters/helpers/common/mergeValues.js +2 -2
  277. package/dist/filters/helpers/common/resolveScopeConditions.js +1 -1
  278. package/dist/filters/helpers/getAggFiltersFromFilterData.js +2 -2
  279. package/dist/filters/helpers/getTokensFromFilters.js +9 -4
  280. package/dist/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
  281. package/dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
  282. package/dist/filters/helpers/ui/getUIFlatFilterByParams.js +3 -3
  283. package/dist/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
  284. package/dist/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
  285. package/dist/filters/helpers/ui/getUIValues.js +9 -11
  286. package/dist/filters/helpers/ui/transformFilterValues.js +1 -3
  287. package/dist/filters/services/Filters.api.d.ts +4 -4
  288. package/dist/filters/services/Filters.api.js +7 -7
  289. package/dist/filters/services/UChartApi.d.ts +11 -11
  290. package/dist/filters/services/UChartApi.js +176 -185
  291. package/dist/filters/services/UChartPaginationApi.d.ts +13 -13
  292. package/dist/filters/services/UChartPaginationApi.js +198 -212
  293. package/dist/format/definition.d.ts +4 -1
  294. package/dist/format/definition.js +9 -0
  295. package/dist/format/duration/addDurationFormat.d.ts +1 -1
  296. package/dist/format/duration/addDurationFormat.js +2 -2
  297. package/dist/format/duration/durationFormatter.d.ts +1 -1
  298. package/dist/format/duration/durationFormatter.js +7 -10
  299. package/dist/format/format.js +42 -34
  300. package/dist/format/localization.js +19 -4
  301. package/dist/general/mix/importScripts.js +8 -14
  302. package/dist/general/mix/randomId.js +11 -10
  303. package/dist/general/object/get.js +4 -4
  304. package/dist/general/object/getAttribute.js +1 -1
  305. package/dist/general/object/mapValues.js +2 -2
  306. package/dist/general/object/mergeDeep.js +6 -4
  307. package/dist/general/object/serialize.js +3 -3
  308. package/dist/general/string/padLeadingZeros.js +2 -2
  309. package/dist/globalization/helpers/getI18nDateGroupLabel.js +13 -10
  310. package/dist/globalization/helpers/getReverseI18nGroupLabel.js +12 -9
  311. package/dist/globalization/interfaces/II18nResource.d.ts +2 -0
  312. package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
  313. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
  314. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.d.ts +10 -0
  315. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.js +1 -0
  316. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderFormatValues.d.ts +1 -0
  317. package/dist/globalization/interfaces/chart_builder/index.d.ts +1 -0
  318. package/dist/globalization/interfaces/chart_builder/index.js +1 -0
  319. package/dist/globalization/interfaces/common/II18nCommon.d.ts +4 -0
  320. package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +1 -0
  321. package/dist/globalization/interfaces/panel/II18nPanelMenu.d.ts +1 -0
  322. package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +1 -0
  323. package/dist/globalization/interfaces/tabular_view/II18nTabularView.d.ts +4 -0
  324. package/dist/globalization/interfaces/tabular_view/II18nTabularView.js +1 -0
  325. package/dist/globalization/labels/I18N_DEFAULT.js +2 -0
  326. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +10 -0
  327. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +13 -4
  328. package/dist/globalization/labels/common/I18N_COMMON.js +6 -0
  329. package/dist/globalization/labels/panel/I18N_PANEL.js +1 -0
  330. package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +1 -0
  331. package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.d.ts +2 -0
  332. package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +4 -0
  333. package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +1 -0
  334. package/dist/qrvey/helpers/getLookupAnswers.js +4 -6
  335. package/dist/qrvey/helpers/getValueWithSuffixes.js +1 -1
  336. package/dist/services/adapters/index.d.ts +2 -1
  337. package/dist/services/adapters/index.js +2 -1
  338. package/dist/services/api/getAllDatasets.api.js +6 -8
  339. package/dist/services/helpers/Request.js +5 -4
  340. package/package.json +5 -5
  341. package/dist/cjs/dates/range/index.d.ts +0 -1
  342. package/dist/cjs/filters/adapters/transformFilters.d.ts +0 -60
  343. package/dist/cjs/filters/adapters/transformFilters.js +0 -427
  344. package/dist/dates/range/index.d.ts +0 -1
  345. package/dist/dates/range/index.js +0 -1
  346. package/dist/filters/adapters/transformFilters.d.ts +0 -60
  347. package/dist/filters/adapters/transformFilters.js +0 -423
@@ -1,6 +1,7 @@
1
1
  import { format as d3Format } from "d3";
2
2
  import dayjs from "dayjs";
3
3
  import { DATEGROUP_FORMATTING_UNSUPPORT, appliesFormatting, hasfileSizeProperty, isTextColumn, } from "./definition";
4
+ import isoWeek from "dayjs/plugin/isoWeek";
4
5
  import advancedFormat from "dayjs/plugin/advancedFormat";
5
6
  import { isEmpty } from "../general/mix/isEmpty";
6
7
  import { _get } from "../general/object/get";
@@ -8,6 +9,9 @@ import { COLUMN } from "../columns/constants/COLUMN";
8
9
  import { FORMULA } from "../formulas/constants/FORMULA";
9
10
  import { formatWithLocale } from "./localization";
10
11
  import { isObject } from "../general/object/isObject";
12
+ import { DURATION_PARTS_LIST } from "../column_format/constants/DURATION_PARTS_LIST";
13
+ import { cloneDeep } from "../general/object/cloneDeep";
14
+ dayjs.extend(isoWeek); // Add support for iso week format https://github.com/iamkun/dayjs/issues/1328
11
15
  dayjs.extend(advancedFormat); // Add support to advanced formats https://day.js.org/docs/en/plugin/advanced-format
12
16
  /**
13
17
  * Apply to the given date format to a date value
@@ -18,60 +22,62 @@ function isValidDateString(dateString = "") {
18
22
  /^\d{4}-\d{2}-\d{2}/.test(dateString)); // YYYY-MM-DD
19
23
  }
20
24
  export function formatDate(dateString, format) {
25
+ let _format = cloneDeep(format);
21
26
  if (isObject(format))
22
- format = format.format || "";
23
- if (isEmpty(dateString) || !isNaN(dateString) || format === "Default")
27
+ _format = _format.format || "";
28
+ if (isEmpty(dateString) || !isNaN(dateString) || _format === "Default")
24
29
  return dateString;
25
30
  if (!isValidDateString(dateString))
26
31
  return dateString;
27
32
  const dateValue = dateString === null || dateString === void 0 ? void 0 : dateString.replace(/Z$/i, "");
28
- return dayjs(dateValue.split(".")[0]).format(format
33
+ return dayjs(dateValue.split(".")[0]).format(_format
29
34
  .replace("HH24:", "HH:")
30
35
  .replace("MI:SS", "mm:ss")
31
36
  .replace("MM:SS", "mm:ss"));
32
37
  }
33
38
  export function formatAbbreviated(num, decimals) {
34
- if (num == 0)
39
+ if (num === 0)
35
40
  return 0;
36
41
  const absValue = Math.abs(num);
37
42
  const exp = Math.floor(Math.log10(absValue));
38
43
  if (exp <= 0 && exp >= -3)
39
44
  return num.toFixed(decimals === 0 ? 2 : decimals);
40
- return d3Format(num > -100 && num < 100 ? "." + (decimals + 2) + "n" : ".3s")(num);
45
+ return d3Format(num > -100 && num < 100 ? `.${decimals + 2}n` : ".3s")(num);
41
46
  }
42
47
  function formatNumber(num, outputFormat, _config) {
48
+ let _num = num;
43
49
  try {
44
- num = +(num || 0);
50
+ _num = +(_num || 0);
45
51
  }
46
52
  catch (e) {
47
- num = 0;
53
+ _num = 0;
48
54
  }
49
- if (isNaN(num))
50
- num = 0;
55
+ if (isNaN(_num))
56
+ _num = 0;
51
57
  const num_decimals = !isEmpty(outputFormat.decimals) && outputFormat.format !== "Abbreviated"
52
58
  ? outputFormat.decimals
53
59
  : 0;
54
60
  switch (outputFormat.format) {
55
61
  case "Abbreviated":
56
- return formatAbbreviated(num, num_decimals);
62
+ return formatAbbreviated(_num, num_decimals);
57
63
  case "Numeric":
58
64
  case "Decimal":
59
- return d3Format(`,.${num_decimals}f`)(num).replace(/\.(%*)$/, "$1");
65
+ return d3Format(`,.${num_decimals}f`)(_num).replace(/\.(%*)$/, "$1");
60
66
  case "Currency": {
61
- const currency = `${num < 0 ? "-" : ""} ${_get(outputFormat, "currency.label", "$")}`;
62
- const absNum = Math.abs(num);
67
+ const currency = `${_num < 0 ? "-" : ""} ${_get(outputFormat, "currency.label", "$")}`;
68
+ const absNum = Math.abs(_num);
63
69
  return (currency +
64
70
  d3Format(`,.${num_decimals}f`)(absNum).replace(/\.(%*)$/, "$1"));
65
71
  }
66
72
  case "Percentage":
67
- return `${d3Format(`,.${num_decimals}f`)(num).replace(/\.(%*)$/, "$1")}%`;
73
+ return `${d3Format(`,.${num_decimals}f`)(_num).replace(/\.(%*)$/, "$1")}%`;
68
74
  case "Scientific":
69
- return Number(num)
75
+ return Number(_num)
70
76
  .toExponential(num_decimals)
71
77
  .replace(".00", "")
72
78
  .replace("e+0", "");
73
79
  default:
74
- return `${num}`;
80
+ return `${_num}`;
75
81
  }
76
82
  }
77
83
  /**
@@ -105,12 +111,16 @@ export const addFormat = (value, outputFormat = "None", config) => {
105
111
  : outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format);
106
112
  case "NUMERIC": {
107
113
  const parse = parseFloat(value);
108
- const withLocale = outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang);
109
- return isNaN(parse)
110
- ? value
111
- : withLocale
112
- ? formatWithLocale(value, outputFormat, config)
113
- : formatNumber(parse, outputFormat, config);
114
+ const withLocale = (outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang)) ||
115
+ (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Duration" ||
116
+ DURATION_PARTS_LIST.includes[outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format];
117
+ if (isNaN(parse)) {
118
+ return value;
119
+ }
120
+ else if (withLocale) {
121
+ return formatWithLocale(value, outputFormat, config);
122
+ }
123
+ return formatNumber(parse, outputFormat, config);
114
124
  }
115
125
  case "IMAGEUPLOAD":
116
126
  case "FILEUPLOAD":
@@ -204,16 +214,16 @@ export const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimen
204
214
  DATEGROUP_FORMATTING_UNSUPPORT.includes(dateGroupLabel))
205
215
  return "None";
206
216
  if ((isCategoryDimension || isTable) &&
207
- selectType == "NUMERIC" &&
217
+ selectType === "NUMERIC" &&
208
218
  dateGroupLabel &&
209
219
  outputType === "DATE")
210
220
  return column.outputFormat;
211
221
  if ((isCategoryDimension || isTable) &&
212
- selectType == "NUMERIC" &&
222
+ selectType === "NUMERIC" &&
213
223
  dateGroupLabel &&
214
224
  outputType === "NUMERIC")
215
225
  return _get(column, "defaultFormat");
216
- if (selectedFormat && selectedFormat != "Default") {
226
+ if (selectedFormat && selectedFormat !== "Default") {
217
227
  if (isNumericDefaultSelected)
218
228
  return defaultAbbreviated;
219
229
  return column.selectedFormat;
@@ -259,7 +269,7 @@ export const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimen
259
269
  return defaultAbbreviated;
260
270
  return _get(column, "defaultFormat");
261
271
  }
262
- if (selectedFormat && selectedFormat != "Default") {
272
+ if (selectedFormat && selectedFormat !== "Default") {
263
273
  if (isNumericDefaultSelected)
264
274
  return defaultAbbreviated;
265
275
  return column.selectedFormat;
@@ -320,14 +330,12 @@ export const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimen
320
330
  format: "fileSize",
321
331
  };
322
332
  }
323
- else {
324
- if (outputFormat !== "Default")
325
- return column.outputFormat;
326
- return {
327
- type: "NUMERIC",
328
- format: "Numeric",
329
- };
330
- }
333
+ if (outputFormat !== "Default")
334
+ return column.outputFormat;
335
+ return {
336
+ type: "NUMERIC",
337
+ format: "Numeric",
338
+ };
331
339
  }
332
340
  if (column.isGroup)
333
341
  return "None";
@@ -1,13 +1,13 @@
1
1
  import { DATETIME_COLUMN_FORMAT } from "../dates/constants/DATETIME_COLUMN_FORMAT";
2
2
  import { isEmpty } from "../general/mix/isEmpty";
3
3
  import { currencyISO, LANG_DEFAULT, CURRENCY_DEFAULT, DATETIME_OPTIONS, } from "./definition";
4
+ import { DurationFormatter } from "./duration/durationFormatter";
4
5
  export const getLang = (locale) => {
5
6
  if (!locale)
6
7
  return;
7
8
  else if (typeof locale === "object")
8
9
  return locale;
9
- else
10
- return { lang: locale === "browser" ? window.navigator.language : locale };
10
+ return { lang: locale === "browser" ? window.navigator.language : locale };
11
11
  };
12
12
  export const chooseLang = (config) => {
13
13
  var _a;
@@ -55,10 +55,20 @@ function formatLocaleNumber(value, outputFormat, config) {
55
55
  const langOpts = options || getLocaleOptions(outputFormat);
56
56
  const valueToFormat = (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Percentage" /* LOCALE_FORMATS.PERCENTAGE */ ? value / 100 : value;
57
57
  try {
58
- const key = lang + JSON.stringify(langOpts);
58
+ const key = (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) +
59
+ lang +
60
+ JSON.stringify(langOpts) +
61
+ ((outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.template) ? outputFormat.template : "");
59
62
  let formatter = NUMBER_FORMAT_CACHE[key];
60
63
  if (!formatter) {
61
- formatter = new Intl.NumberFormat([lang, LANG_DEFAULT], langOpts);
64
+ const intlNumberFormat = new Intl.NumberFormat([lang, LANG_DEFAULT], langOpts);
65
+ formatter =
66
+ (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Duration" /* LOCALE_FORMATS.DURATION */
67
+ ? new DurationFormatter({
68
+ template: outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.template,
69
+ intlNumberFormat,
70
+ })
71
+ : intlNumberFormat;
62
72
  NUMBER_FORMAT_CACHE[key] = formatter;
63
73
  }
64
74
  return formatter.format(valueToFormat);
@@ -107,6 +117,11 @@ function getLocaleOptions(outputFormat) {
107
117
  maximumFractionDigits: decimals,
108
118
  minimumFractionDigits: decimals,
109
119
  };
120
+ case "Duration" /* LOCALE_FORMATS.DURATION */:
121
+ return {
122
+ maximumFractionDigits: 0,
123
+ minimumFractionDigits: 0,
124
+ };
110
125
  default:
111
126
  return {
112
127
  style: "decimal" /* LOCALE_STYLES.DECIMAL */,
@@ -38,22 +38,16 @@ export function importScripts(scripts) {
38
38
  if (typeof script === "string") {
39
39
  return loadScript(script);
40
40
  }
41
- else {
42
- if (script.namespace) {
43
- const exist = typeof script.namespace === "function"
44
- ? script.namespace()
45
- : window[script.namespace];
46
- if (exist) {
47
- return script.dependencies && importScripts(script.dependencies);
48
- }
49
- else {
50
- return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
51
- }
52
- }
53
- else {
54
- return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
41
+ if (script.namespace) {
42
+ const exist = typeof script.namespace === "function"
43
+ ? script.namespace()
44
+ : window[script.namespace];
45
+ if (exist) {
46
+ return script.dependencies && importScripts(script.dependencies);
55
47
  }
48
+ return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
56
49
  }
50
+ return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
57
51
  });
58
52
  return Promise.all(promiseList);
59
53
  }
@@ -9,11 +9,12 @@ import { isNull } from "./isNull";
9
9
  * @return {String} Random string
10
10
  */
11
11
  export function randomId(length = 8, exclude = []) {
12
- if (typeof length !== "number")
13
- length = 8;
14
- if (isNull(exclude) || !Array.isArray(exclude))
15
- exclude = [];
16
- exclude = exclude.filter((e) => typeof e === "string");
12
+ let _length = length, _exclude = exclude;
13
+ if (typeof _length !== "number")
14
+ _length = 8;
15
+ if (isNull(_exclude) || !Array.isArray(_exclude))
16
+ _exclude = [];
17
+ _exclude = _exclude.filter((e) => typeof e === "string");
17
18
  const charSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
18
19
  const blackList = [];
19
20
  let id = "";
@@ -21,14 +22,14 @@ export function randomId(length = 8, exclude = []) {
21
22
  if (!isEmpty(id) && !blackList.includes(id))
22
23
  blackList.push(id);
23
24
  id = "";
24
- for (let i = 0; i < length; i++) {
25
+ for (let i = 0; i < _length; i++) {
25
26
  const randPos = Math.floor(Math.random() * charSet.length);
26
27
  id += charSet[randPos];
27
28
  }
28
- } while (exclude.length > 0 &&
29
- exclude.includes(id) &&
30
- blackList.length < exclude.length);
31
- if (exclude.length > 0 && blackList.length >= exclude.length)
29
+ } while (_exclude.length > 0 &&
30
+ _exclude.includes(id) &&
31
+ blackList.length < _exclude.length);
32
+ if (_exclude.length > 0 && blackList.length >= _exclude.length)
32
33
  id = "";
33
34
  return id;
34
35
  }
@@ -35,11 +35,11 @@ export function _get(baseObject, path, defaultValue) {
35
35
  .replace(/(\[(\d)\])/g, ".$2")
36
36
  .split(".")
37
37
  .filter((k) => k.length);
38
- baseObject = baseObject[keys[0]];
39
- if (baseObject !== undefined && keys.length > 1) {
40
- return _get(baseObject, keys.slice(1), defaultValue);
38
+ const _baseObject = baseObject[keys[0]];
39
+ if (_baseObject !== undefined && keys.length > 1) {
40
+ return _get(_baseObject, keys.slice(1), defaultValue);
41
41
  }
42
- return baseObject === undefined ? defaultValue : baseObject;
42
+ return _baseObject === undefined ? defaultValue : _baseObject;
43
43
  }
44
44
  function validateToReturnDefaultValue(baseObject, path) {
45
45
  return (baseObject == null ||
@@ -28,7 +28,7 @@ export function getAttribute(obj, key) {
28
28
  return ((_e = (_d = (_c = (_b = (_a = obj[key]) !== null && _a !== void 0 ? _a : obj[snake]) !== null && _b !== void 0 ? _b : obj[camel]) !== null && _c !== void 0 ? _c : obj[pascal]) !== null && _d !== void 0 ? _d : obj[lower]) !== null && _e !== void 0 ? _e : obj[upper]);
29
29
  }
30
30
  function getSnakeCase(key) {
31
- return key.replace(/[A-Z]/g, (a, i) => i == 0 ? a.toLowerCase() : "_" + a.toLowerCase());
31
+ return key.replace(/[A-Z]/g, (a, i) => i === 0 ? a.toLowerCase() : `_${a.toLowerCase()}`);
32
32
  }
33
33
  function getCamelCase(key) {
34
34
  return key
@@ -9,8 +9,8 @@ const defaultIteratee = (v) => v;
9
9
  */
10
10
  export function mapValues(baseObject, iteratee) {
11
11
  const newObject = {};
12
- iteratee = typeof iteratee === "function" ? iteratee : defaultIteratee;
12
+ const _iteratee = typeof iteratee === "function" ? iteratee : defaultIteratee;
13
13
  for (const key in baseObject)
14
- newObject[key] = iteratee(baseObject[key], key);
14
+ newObject[key] = _iteratee(baseObject[key], key);
15
15
  return newObject;
16
16
  }
@@ -9,13 +9,13 @@ import { objectCopy } from "./objectCopy";
9
9
  * @returns a new merged object
10
10
  */
11
11
  export function mergeDeep(obj1, obj2, settings) {
12
- settings = getParamsToMergeDeep(settings);
12
+ const defaultSettings = getParamsToMergeDeep(settings);
13
13
  if (!isValid(obj1, obj2))
14
14
  return objectCopy(obj1);
15
15
  const result = {};
16
16
  for (const i in obj1) {
17
17
  if (i != null && i in obj2 && isObject(obj1[i])) {
18
- result[i] = mergeDeep(obj1[i], obj2[i], settings);
18
+ result[i] = mergeDeep(obj1[i], obj2[i], defaultSettings);
19
19
  }
20
20
  else {
21
21
  result[i] = obj1[i];
@@ -23,8 +23,10 @@ export function mergeDeep(obj1, obj2, settings) {
23
23
  }
24
24
  for (const i in obj2) {
25
25
  if (i != null &&
26
- ((!isObject(obj2[i]) && i in result && settings.mergeExistingValues) ||
27
- (!(i in result) && settings.mergeMissingProperties))) {
26
+ ((!isObject(obj2[i]) &&
27
+ i in result &&
28
+ defaultSettings.mergeExistingValues) ||
29
+ (!(i in result) && defaultSettings.mergeMissingProperties))) {
28
30
  result[i] = obj2[i];
29
31
  }
30
32
  }
@@ -13,14 +13,14 @@ export function serialize(obj) {
13
13
  if (Array.isArray(obj[key])) {
14
14
  for (const key2 in obj[key]) {
15
15
  if (_hasProperty(obj[key], key2)) {
16
- str += "&" + key + "=" + encodeURIComponent(obj[key][key2]);
16
+ str += `&${key}=${encodeURIComponent(obj[key][key2])}`;
17
17
  }
18
18
  }
19
19
  }
20
20
  else {
21
- str += "&" + key + "=" + encodeURIComponent(obj[key]);
21
+ str += `&${key}=${encodeURIComponent(obj[key])}`;
22
22
  }
23
23
  }
24
24
  }
25
- return "?" + str.substring(1);
25
+ return `?${str.substring(1)}`;
26
26
  }
@@ -1,8 +1,8 @@
1
1
  export function padLeadingZeros(num, size = 0) {
2
2
  if (isNaN(Number(num)))
3
3
  return String(num);
4
- let s = num + "";
4
+ let s = `${num}`;
5
5
  while (s.length < size)
6
- s = "0" + s;
6
+ s = `0${s}`;
7
7
  return s;
8
8
  }
@@ -24,12 +24,13 @@ function getI18nMonthLabel(label, translate) {
24
24
  return splittedLabel.join(" ");
25
25
  }
26
26
  function getI18nYearMonthLabel(label, translate) {
27
- if (!isTokenLabel(label) && !isEmpty(translate)) {
28
- const month = getI18nMonthPropertyByIndex(DATE_YEAR_MONTHS.findIndex((_month) => _month === label));
27
+ let newLabel = label;
28
+ if (!isTokenLabel(newLabel) && !isEmpty(translate)) {
29
+ const month = getI18nMonthPropertyByIndex(DATE_YEAR_MONTHS.findIndex((_month) => _month === newLabel));
29
30
  if (!isEmpty(month))
30
- label = translate("common.date_grouping." + month + "_mmm");
31
+ newLabel = translate(`common.date_grouping.${month}_mmm`);
31
32
  }
32
- return label;
33
+ return newLabel;
33
34
  }
34
35
  function getI18nMonthPropertyByIndex(index) {
35
36
  const months = [
@@ -54,10 +55,11 @@ function getI18nQuarterLabel(label, translate) {
54
55
  return splittedLabel.join(" ");
55
56
  }
56
57
  function getI18nYearQuarterLabel(label, translate) {
57
- if (!isTokenLabel(label) && !isEmpty(translate)) {
58
- label = label.replace(/Q/i, translate("common.date_grouping.quarter"));
58
+ let newLabel = label;
59
+ if (!isTokenLabel(newLabel) && !isEmpty(translate)) {
60
+ newLabel = newLabel.replace(/Q/i, translate("common.date_grouping.quarter"));
59
61
  }
60
- return label;
62
+ return newLabel;
61
63
  }
62
64
  function getI18nWeekLabel(label, translate) {
63
65
  const splittedLabel = label.split(" ");
@@ -65,8 +67,9 @@ function getI18nWeekLabel(label, translate) {
65
67
  return splittedLabel.join(" ");
66
68
  }
67
69
  function getI18nYearWeekLabel(label, translate) {
68
- if (!isTokenLabel(label) && !isEmpty(translate)) {
69
- label = label.replace(/W/i, translate("common.date_grouping.week"));
70
+ let newLabel = label;
71
+ if (!isTokenLabel(newLabel) && !isEmpty(translate)) {
72
+ newLabel = newLabel.replace(/W/i, translate("common.date_grouping.week"));
70
73
  }
71
- return label;
74
+ return newLabel;
72
75
  }
@@ -25,10 +25,11 @@ function getReverseI18nMonthLabel(label, translate) {
25
25
  return splittedLabel.join(" ");
26
26
  }
27
27
  function getReverseI18nYearMonthLabel(label, translate) {
28
- if (!isTokenLabel(label) && !isEmpty(translate)) {
29
- label = getReverseI18nMonthProperty(label, translate);
28
+ let newLabel = label;
29
+ if (!isTokenLabel(newLabel) && !isEmpty(translate)) {
30
+ newLabel = getReverseI18nMonthProperty(newLabel, translate);
30
31
  }
31
- return label;
32
+ return newLabel;
32
33
  }
33
34
  function getReverseI18nMonthProperty(label, translate) {
34
35
  const translatedMonths = [
@@ -54,10 +55,11 @@ function getReverseI18nQuarterLabel(label, translate) {
54
55
  return splittedLabel.join(" ");
55
56
  }
56
57
  function getReverseI18nYearQuarterLabel(label, translate) {
57
- if (!isTokenLabel(label) && !isEmpty(translate)) {
58
- label = label.replace(new RegExp(translate("common.date_grouping.quarter"), "i"), I18N_COMMON.date_grouping.quarter);
58
+ let newLabel = label;
59
+ if (!isTokenLabel(newLabel) && !isEmpty(translate)) {
60
+ newLabel = newLabel.replace(new RegExp(translate("common.date_grouping.quarter"), "i"), I18N_COMMON.date_grouping.quarter);
59
61
  }
60
- return label;
62
+ return newLabel;
61
63
  }
62
64
  function getReverseI18nWeekLabel(label, translate) {
63
65
  const splittedLabel = label.split(" ");
@@ -65,8 +67,9 @@ function getReverseI18nWeekLabel(label, translate) {
65
67
  return splittedLabel.join(" ");
66
68
  }
67
69
  function getReverseI18nYearWeekLabel(label, translate) {
68
- if (!isTokenLabel(label) && !isEmpty(translate)) {
69
- label = label.replace(new RegExp(translate("common.date_grouping.week"), "i"), I18N_COMMON.date_grouping.week);
70
+ let newLabel = label;
71
+ if (!isTokenLabel(newLabel) && !isEmpty(translate)) {
72
+ newLabel = newLabel.replace(new RegExp(translate("common.date_grouping.week"), "i"), I18N_COMMON.date_grouping.week);
70
73
  }
71
- return label;
74
+ return newLabel;
72
75
  }
@@ -11,6 +11,7 @@ import { II18nBucketBuilder } from "./bucket_builder/II18nBucketBuilder";
11
11
  import { II18nCrossTabs } from "./cross_tabs";
12
12
  import { II18nChartBuilder } from ".";
13
13
  import { II18nStyleThemes } from "./style_themes/II18nStyleThemes";
14
+ import { II18nTabularView } from "./tabular_view/II18nTabularView";
14
15
  export interface II18nResource {
15
16
  bucket_builder?: II18nBucketBuilder;
16
17
  chart_builder?: II18nChartBuilder;
@@ -25,4 +26,5 @@ export interface II18nResource {
25
26
  panel?: II18nPanel;
26
27
  style_themes?: II18nStyleThemes;
27
28
  table_charts?: II18nTableCharts;
29
+ tabular_view?: II18nTabularView;
28
30
  }
@@ -69,6 +69,7 @@ import { II18nChartBuilderTimePeriod } from "./II18nChartBuilderTimePeriod";
69
69
  import { II18nChartBuilderTimePeriodCustomRange } from "./II18nChartBuilderTimePeriodCustomRange";
70
70
  import { II18nChartBuilderWordCloud } from "./II18nChartBuilderWordCloud";
71
71
  import { II18nChartBuilderBoxWhisker } from "./II18nChartBuilderBoxWhisker";
72
+ import { II18nChartBuilderDurationParts } from "./II18nChartBuilderDurationParts";
72
73
  export interface II18nChartBuilder {
73
74
  action_panel: II18nChartBuilderActionPanel;
74
75
  aggregated_formula: II18nChartBuilderAggregatedFormulas;
@@ -141,4 +142,5 @@ export interface II18nChartBuilder {
141
142
  trend_chart: II18nChartBuilderTrendChart;
142
143
  trends_line: II18nChartBuilderTrendsLine;
143
144
  word_cloud: II18nChartBuilderWordCloud;
145
+ duration_parts: II18nChartBuilderDurationParts;
144
146
  }
@@ -26,4 +26,13 @@ export interface II18nChartBuilderAxisStyle {
26
26
  values_rotation_diagonal: string;
27
27
  values_rotation_horizontal: string;
28
28
  values_rotation_vertical: string;
29
+ value_font_type: string;
30
+ value_font_weight: string;
31
+ value_font_size: string;
32
+ value_font_color: string;
33
+ label_check: string;
34
+ label_font_type: string;
35
+ label_font_weight: string;
36
+ label_font_size: string;
37
+ label_font_color: string;
29
38
  }
@@ -0,0 +1,10 @@
1
+ export interface II18nChartBuilderDurationParts {
2
+ full_duration: string;
3
+ hour_minute_seconds: string;
4
+ hour_minutes: string;
5
+ hours: string;
6
+ minutes: string;
7
+ seconds: string;
8
+ milliseconds: string;
9
+ custom: string;
10
+ }
@@ -14,4 +14,5 @@ export interface II18nChartBuilderFormatValues {
14
14
  custom: string;
15
15
  date_format: string;
16
16
  value_format: string;
17
+ duration: string;
17
18
  }
@@ -70,3 +70,4 @@ export * from "./II18nChartBuilderTimePeriod";
70
70
  export * from "./II18nChartBuilderTimePeriodCustomRange";
71
71
  export * from "./II18nChartBuilderWordCloud";
72
72
  export * from "./II18nChartBuilderBoxWhisker";
73
+ export * from "./II18nChartBuilderDurationParts";
@@ -70,3 +70,4 @@ export * from "./II18nChartBuilderTimePeriod";
70
70
  export * from "./II18nChartBuilderTimePeriodCustomRange";
71
71
  export * from "./II18nChartBuilderWordCloud";
72
72
  export * from "./II18nChartBuilderBoxWhisker";
73
+ export * from "./II18nChartBuilderDurationParts";
@@ -6,7 +6,9 @@ import { II18nDateGrouping } from "./II18nDateGrouping";
6
6
  import { II18nDayNames } from "./II18nDayNames";
7
7
  import { II18nUnits } from "./II18nUnits";
8
8
  import { II18nCalendar } from "../calendar/II18nCalendar";
9
+ import { II18nTokenBox } from "../filters/II18nTokenBox";
9
10
  export interface II18nCommon {
11
+ aggregates: string;
10
12
  aggregate_labels: II18nAgreggateLabels;
11
13
  calendar: II18nCalendar;
12
14
  column_types: II18nColumnTypes;
@@ -16,5 +18,7 @@ export interface II18nCommon {
16
18
  no_data_found: string;
17
19
  properties: II18nColumnProperties;
18
20
  search: string;
21
+ sort: string;
22
+ token_box: II18nTokenBox;
19
23
  units: II18nUnits;
20
24
  }
@@ -2,5 +2,6 @@ export interface II18nTokenBox {
2
2
  data_tokens?: string;
3
3
  search?: string;
4
4
  system_tokens?: string;
5
+ language_tokens?: string;
5
6
  user_tokens?: string;
6
7
  }
@@ -12,4 +12,5 @@ export interface II18nPanelMenu {
12
12
  pdf: string;
13
13
  csv: string;
14
14
  csv_summary: string;
15
+ excel: string;
15
16
  }
@@ -9,6 +9,7 @@ export interface II18nStyleThemesTheme {
9
9
  edit_theme: string;
10
10
  generate_new: string;
11
11
  header_font_color: string;
12
+ header_main_color: string;
12
13
  id: string;
13
14
  legends: string;
14
15
  main_color: string;
@@ -0,0 +1,4 @@
1
+ export interface II18nTabularView {
2
+ all: string;
3
+ select_columns: string;
4
+ }
@@ -8,6 +8,7 @@ import { I18N_FORMULA_BUILDER } from "./formula_builder";
8
8
  import { I18N_FILTER_PANEL } from "./filters/I18N_FILTER_PANEL";
9
9
  import { I18N_FILTER_DISPLAY } from "./filters/I18N_FILTER_DISPLAY";
10
10
  import { I18N_BUCKET_BUILDER } from "./bucket_builder/I18N_BUCKET_BUILDER";
11
+ import { I18N_TABULAR_VIEW } from "./tabular_view/I18N_TABULAR_VIEW";
11
12
  import { I18N_CROSS_TABS } from "./cross_tabs";
12
13
  import { I18N_CHART_BUILDER } from "./chart_builder";
13
14
  import { I18N_STYLE_THEMES } from "./style_themes";
@@ -25,4 +26,5 @@ export const I18N_DEFAULT = {
25
26
  panel: I18N_PANEL,
26
27
  style_themes: I18N_STYLE_THEMES,
27
28
  table_charts: I18N_TABLE_CHARTS,
29
+ tabular_view: I18N_TABULAR_VIEW,
28
30
  };