@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
@@ -7,6 +7,7 @@ exports.defineFormat = exports.validateColumnType = exports.parseFormulaType = e
7
7
  const d3_1 = require("d3");
8
8
  const dayjs_1 = __importDefault(require("dayjs"));
9
9
  const definition_1 = require("./definition");
10
+ const isoWeek_1 = __importDefault(require("dayjs/plugin/isoWeek"));
10
11
  const advancedFormat_1 = __importDefault(require("dayjs/plugin/advancedFormat"));
11
12
  const isEmpty_1 = require("../general/mix/isEmpty");
12
13
  const get_1 = require("../general/object/get");
@@ -14,6 +15,9 @@ const COLUMN_1 = require("../columns/constants/COLUMN");
14
15
  const FORMULA_1 = require("../formulas/constants/FORMULA");
15
16
  const localization_1 = require("./localization");
16
17
  const isObject_1 = require("../general/object/isObject");
18
+ const DURATION_PARTS_LIST_1 = require("../column_format/constants/DURATION_PARTS_LIST");
19
+ const cloneDeep_1 = require("../general/object/cloneDeep");
20
+ dayjs_1.default.extend(isoWeek_1.default); // Add support for iso week format https://github.com/iamkun/dayjs/issues/1328
17
21
  dayjs_1.default.extend(advancedFormat_1.default); // Add support to advanced formats https://day.js.org/docs/en/plugin/advanced-format
18
22
  /**
19
23
  * Apply to the given date format to a date value
@@ -24,62 +28,64 @@ function isValidDateString(dateString = "") {
24
28
  /^\d{4}-\d{2}-\d{2}/.test(dateString)); // YYYY-MM-DD
25
29
  }
26
30
  function formatDate(dateString, format) {
31
+ let _format = (0, cloneDeep_1.cloneDeep)(format);
27
32
  if ((0, isObject_1.isObject)(format))
28
- format = format.format || "";
29
- if ((0, isEmpty_1.isEmpty)(dateString) || !isNaN(dateString) || format === "Default")
33
+ _format = _format.format || "";
34
+ if ((0, isEmpty_1.isEmpty)(dateString) || !isNaN(dateString) || _format === "Default")
30
35
  return dateString;
31
36
  if (!isValidDateString(dateString))
32
37
  return dateString;
33
38
  const dateValue = dateString === null || dateString === void 0 ? void 0 : dateString.replace(/Z$/i, "");
34
- return (0, dayjs_1.default)(dateValue.split(".")[0]).format(format
39
+ return (0, dayjs_1.default)(dateValue.split(".")[0]).format(_format
35
40
  .replace("HH24:", "HH:")
36
41
  .replace("MI:SS", "mm:ss")
37
42
  .replace("MM:SS", "mm:ss"));
38
43
  }
39
44
  exports.formatDate = formatDate;
40
45
  function formatAbbreviated(num, decimals) {
41
- if (num == 0)
46
+ if (num === 0)
42
47
  return 0;
43
48
  const absValue = Math.abs(num);
44
49
  const exp = Math.floor(Math.log10(absValue));
45
50
  if (exp <= 0 && exp >= -3)
46
51
  return num.toFixed(decimals === 0 ? 2 : decimals);
47
- return (0, d3_1.format)(num > -100 && num < 100 ? "." + (decimals + 2) + "n" : ".3s")(num);
52
+ return (0, d3_1.format)(num > -100 && num < 100 ? `.${decimals + 2}n` : ".3s")(num);
48
53
  }
49
54
  exports.formatAbbreviated = formatAbbreviated;
50
55
  function formatNumber(num, outputFormat, _config) {
56
+ let _num = num;
51
57
  try {
52
- num = +(num || 0);
58
+ _num = +(_num || 0);
53
59
  }
54
60
  catch (e) {
55
- num = 0;
61
+ _num = 0;
56
62
  }
57
- if (isNaN(num))
58
- num = 0;
63
+ if (isNaN(_num))
64
+ _num = 0;
59
65
  const num_decimals = !(0, isEmpty_1.isEmpty)(outputFormat.decimals) && outputFormat.format !== "Abbreviated"
60
66
  ? outputFormat.decimals
61
67
  : 0;
62
68
  switch (outputFormat.format) {
63
69
  case "Abbreviated":
64
- return formatAbbreviated(num, num_decimals);
70
+ return formatAbbreviated(_num, num_decimals);
65
71
  case "Numeric":
66
72
  case "Decimal":
67
- return (0, d3_1.format)(`,.${num_decimals}f`)(num).replace(/\.(%*)$/, "$1");
73
+ return (0, d3_1.format)(`,.${num_decimals}f`)(_num).replace(/\.(%*)$/, "$1");
68
74
  case "Currency": {
69
- const currency = `${num < 0 ? "-" : ""} ${(0, get_1._get)(outputFormat, "currency.label", "$")}`;
70
- const absNum = Math.abs(num);
75
+ const currency = `${_num < 0 ? "-" : ""} ${(0, get_1._get)(outputFormat, "currency.label", "$")}`;
76
+ const absNum = Math.abs(_num);
71
77
  return (currency +
72
78
  (0, d3_1.format)(`,.${num_decimals}f`)(absNum).replace(/\.(%*)$/, "$1"));
73
79
  }
74
80
  case "Percentage":
75
- return `${(0, d3_1.format)(`,.${num_decimals}f`)(num).replace(/\.(%*)$/, "$1")}%`;
81
+ return `${(0, d3_1.format)(`,.${num_decimals}f`)(_num).replace(/\.(%*)$/, "$1")}%`;
76
82
  case "Scientific":
77
- return Number(num)
83
+ return Number(_num)
78
84
  .toExponential(num_decimals)
79
85
  .replace(".00", "")
80
86
  .replace("e+0", "");
81
87
  default:
82
- return `${num}`;
88
+ return `${_num}`;
83
89
  }
84
90
  }
85
91
  /**
@@ -114,12 +120,16 @@ const addFormat = (value, outputFormat = "None", config) => {
114
120
  : outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format);
115
121
  case "NUMERIC": {
116
122
  const parse = parseFloat(value);
117
- const withLocale = outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang);
118
- return isNaN(parse)
119
- ? value
120
- : withLocale
121
- ? (0, localization_1.formatWithLocale)(value, outputFormat, config)
122
- : formatNumber(parse, outputFormat, config);
123
+ const withLocale = (outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang)) ||
124
+ (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Duration" ||
125
+ DURATION_PARTS_LIST_1.DURATION_PARTS_LIST.includes[outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format];
126
+ if (isNaN(parse)) {
127
+ return value;
128
+ }
129
+ else if (withLocale) {
130
+ return (0, localization_1.formatWithLocale)(value, outputFormat, config);
131
+ }
132
+ return formatNumber(parse, outputFormat, config);
123
133
  }
124
134
  case "IMAGEUPLOAD":
125
135
  case "FILEUPLOAD":
@@ -216,16 +226,16 @@ const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimension) =
216
226
  definition_1.DATEGROUP_FORMATTING_UNSUPPORT.includes(dateGroupLabel))
217
227
  return "None";
218
228
  if ((isCategoryDimension || isTable) &&
219
- selectType == "NUMERIC" &&
229
+ selectType === "NUMERIC" &&
220
230
  dateGroupLabel &&
221
231
  outputType === "DATE")
222
232
  return column.outputFormat;
223
233
  if ((isCategoryDimension || isTable) &&
224
- selectType == "NUMERIC" &&
234
+ selectType === "NUMERIC" &&
225
235
  dateGroupLabel &&
226
236
  outputType === "NUMERIC")
227
237
  return (0, get_1._get)(column, "defaultFormat");
228
- if (selectedFormat && selectedFormat != "Default") {
238
+ if (selectedFormat && selectedFormat !== "Default") {
229
239
  if (isNumericDefaultSelected)
230
240
  return defaultAbbreviated;
231
241
  return column.selectedFormat;
@@ -271,7 +281,7 @@ const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimension) =
271
281
  return defaultAbbreviated;
272
282
  return (0, get_1._get)(column, "defaultFormat");
273
283
  }
274
- if (selectedFormat && selectedFormat != "Default") {
284
+ if (selectedFormat && selectedFormat !== "Default") {
275
285
  if (isNumericDefaultSelected)
276
286
  return defaultAbbreviated;
277
287
  return column.selectedFormat;
@@ -332,14 +342,12 @@ const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimension) =
332
342
  format: "fileSize",
333
343
  };
334
344
  }
335
- else {
336
- if (outputFormat !== "Default")
337
- return column.outputFormat;
338
- return {
339
- type: "NUMERIC",
340
- format: "Numeric",
341
- };
342
- }
345
+ if (outputFormat !== "Default")
346
+ return column.outputFormat;
347
+ return {
348
+ type: "NUMERIC",
349
+ format: "Numeric",
350
+ };
343
351
  }
344
352
  if (column.isGroup)
345
353
  return "None";
@@ -4,13 +4,13 @@ exports.formatWithLocale = exports.chooseLang = exports.getLang = void 0;
4
4
  const DATETIME_COLUMN_FORMAT_1 = require("../dates/constants/DATETIME_COLUMN_FORMAT");
5
5
  const isEmpty_1 = require("../general/mix/isEmpty");
6
6
  const definition_1 = require("./definition");
7
+ const durationFormatter_1 = require("./duration/durationFormatter");
7
8
  const getLang = (locale) => {
8
9
  if (!locale)
9
10
  return;
10
11
  else if (typeof locale === "object")
11
12
  return locale;
12
- else
13
- return { lang: locale === "browser" ? window.navigator.language : locale };
13
+ return { lang: locale === "browser" ? window.navigator.language : locale };
14
14
  };
15
15
  exports.getLang = getLang;
16
16
  const chooseLang = (config) => {
@@ -61,10 +61,20 @@ function formatLocaleNumber(value, outputFormat, config) {
61
61
  const langOpts = options || getLocaleOptions(outputFormat);
62
62
  const valueToFormat = (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Percentage" /* LOCALE_FORMATS.PERCENTAGE */ ? value / 100 : value;
63
63
  try {
64
- const key = lang + JSON.stringify(langOpts);
64
+ const key = (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) +
65
+ lang +
66
+ JSON.stringify(langOpts) +
67
+ ((outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.template) ? outputFormat.template : "");
65
68
  let formatter = NUMBER_FORMAT_CACHE[key];
66
69
  if (!formatter) {
67
- formatter = new Intl.NumberFormat([lang, definition_1.LANG_DEFAULT], langOpts);
70
+ const intlNumberFormat = new Intl.NumberFormat([lang, definition_1.LANG_DEFAULT], langOpts);
71
+ formatter =
72
+ (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Duration" /* LOCALE_FORMATS.DURATION */
73
+ ? new durationFormatter_1.DurationFormatter({
74
+ template: outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.template,
75
+ intlNumberFormat,
76
+ })
77
+ : intlNumberFormat;
68
78
  NUMBER_FORMAT_CACHE[key] = formatter;
69
79
  }
70
80
  return formatter.format(valueToFormat);
@@ -113,6 +123,11 @@ function getLocaleOptions(outputFormat) {
113
123
  maximumFractionDigits: decimals,
114
124
  minimumFractionDigits: decimals,
115
125
  };
126
+ case "Duration" /* LOCALE_FORMATS.DURATION */:
127
+ return {
128
+ maximumFractionDigits: 0,
129
+ minimumFractionDigits: 0,
130
+ };
116
131
  default:
117
132
  return {
118
133
  style: "decimal" /* LOCALE_STYLES.DECIMAL */,
@@ -41,22 +41,16 @@ function importScripts(scripts) {
41
41
  if (typeof script === "string") {
42
42
  return loadScript(script);
43
43
  }
44
- else {
45
- if (script.namespace) {
46
- const exist = typeof script.namespace === "function"
47
- ? script.namespace()
48
- : window[script.namespace];
49
- if (exist) {
50
- return script.dependencies && importScripts(script.dependencies);
51
- }
52
- else {
53
- return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
54
- }
55
- }
56
- else {
57
- return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
44
+ if (script.namespace) {
45
+ const exist = typeof script.namespace === "function"
46
+ ? script.namespace()
47
+ : window[script.namespace];
48
+ if (exist) {
49
+ return script.dependencies && importScripts(script.dependencies);
58
50
  }
51
+ return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
59
52
  }
53
+ return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
60
54
  });
61
55
  return Promise.all(promiseList);
62
56
  }
@@ -12,11 +12,12 @@ const isNull_1 = require("./isNull");
12
12
  * @return {String} Random string
13
13
  */
14
14
  function randomId(length = 8, exclude = []) {
15
- if (typeof length !== "number")
16
- length = 8;
17
- if ((0, isNull_1.isNull)(exclude) || !Array.isArray(exclude))
18
- exclude = [];
19
- exclude = exclude.filter((e) => typeof e === "string");
15
+ let _length = length, _exclude = exclude;
16
+ if (typeof _length !== "number")
17
+ _length = 8;
18
+ if ((0, isNull_1.isNull)(_exclude) || !Array.isArray(_exclude))
19
+ _exclude = [];
20
+ _exclude = _exclude.filter((e) => typeof e === "string");
20
21
  const charSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
21
22
  const blackList = [];
22
23
  let id = "";
@@ -24,14 +25,14 @@ function randomId(length = 8, exclude = []) {
24
25
  if (!(0, isEmpty_1.isEmpty)(id) && !blackList.includes(id))
25
26
  blackList.push(id);
26
27
  id = "";
27
- for (let i = 0; i < length; i++) {
28
+ for (let i = 0; i < _length; i++) {
28
29
  const randPos = Math.floor(Math.random() * charSet.length);
29
30
  id += charSet[randPos];
30
31
  }
31
- } while (exclude.length > 0 &&
32
- exclude.includes(id) &&
33
- blackList.length < exclude.length);
34
- if (exclude.length > 0 && blackList.length >= exclude.length)
32
+ } while (_exclude.length > 0 &&
33
+ _exclude.includes(id) &&
34
+ blackList.length < _exclude.length);
35
+ if (_exclude.length > 0 && blackList.length >= _exclude.length)
35
36
  id = "";
36
37
  return id;
37
38
  }
@@ -38,11 +38,11 @@ function _get(baseObject, path, defaultValue) {
38
38
  .replace(/(\[(\d)\])/g, ".$2")
39
39
  .split(".")
40
40
  .filter((k) => k.length);
41
- baseObject = baseObject[keys[0]];
42
- if (baseObject !== undefined && keys.length > 1) {
43
- return _get(baseObject, keys.slice(1), defaultValue);
41
+ const _baseObject = baseObject[keys[0]];
42
+ if (_baseObject !== undefined && keys.length > 1) {
43
+ return _get(_baseObject, keys.slice(1), defaultValue);
44
44
  }
45
- return baseObject === undefined ? defaultValue : baseObject;
45
+ return _baseObject === undefined ? defaultValue : _baseObject;
46
46
  }
47
47
  exports._get = _get;
48
48
  function validateToReturnDefaultValue(baseObject, path) {
@@ -32,7 +32,7 @@ function getAttribute(obj, key) {
32
32
  }
33
33
  exports.getAttribute = getAttribute;
34
34
  function getSnakeCase(key) {
35
- return key.replace(/[A-Z]/g, (a, i) => i == 0 ? a.toLowerCase() : "_" + a.toLowerCase());
35
+ return key.replace(/[A-Z]/g, (a, i) => i === 0 ? a.toLowerCase() : `_${a.toLowerCase()}`);
36
36
  }
37
37
  function getCamelCase(key) {
38
38
  return key
@@ -12,9 +12,9 @@ const defaultIteratee = (v) => v;
12
12
  */
13
13
  function mapValues(baseObject, iteratee) {
14
14
  const newObject = {};
15
- iteratee = typeof iteratee === "function" ? iteratee : defaultIteratee;
15
+ const _iteratee = typeof iteratee === "function" ? iteratee : defaultIteratee;
16
16
  for (const key in baseObject)
17
- newObject[key] = iteratee(baseObject[key], key);
17
+ newObject[key] = _iteratee(baseObject[key], key);
18
18
  return newObject;
19
19
  }
20
20
  exports.mapValues = mapValues;
@@ -12,13 +12,13 @@ const objectCopy_1 = require("./objectCopy");
12
12
  * @returns a new merged object
13
13
  */
14
14
  function mergeDeep(obj1, obj2, settings) {
15
- settings = getParamsToMergeDeep(settings);
15
+ const defaultSettings = getParamsToMergeDeep(settings);
16
16
  if (!isValid(obj1, obj2))
17
17
  return (0, objectCopy_1.objectCopy)(obj1);
18
18
  const result = {};
19
19
  for (const i in obj1) {
20
20
  if (i != null && i in obj2 && (0, isObject_1.isObject)(obj1[i])) {
21
- result[i] = mergeDeep(obj1[i], obj2[i], settings);
21
+ result[i] = mergeDeep(obj1[i], obj2[i], defaultSettings);
22
22
  }
23
23
  else {
24
24
  result[i] = obj1[i];
@@ -26,8 +26,10 @@ function mergeDeep(obj1, obj2, settings) {
26
26
  }
27
27
  for (const i in obj2) {
28
28
  if (i != null &&
29
- ((!(0, isObject_1.isObject)(obj2[i]) && i in result && settings.mergeExistingValues) ||
30
- (!(i in result) && settings.mergeMissingProperties))) {
29
+ ((!(0, isObject_1.isObject)(obj2[i]) &&
30
+ i in result &&
31
+ defaultSettings.mergeExistingValues) ||
32
+ (!(i in result) && defaultSettings.mergeMissingProperties))) {
31
33
  result[i] = obj2[i];
32
34
  }
33
35
  }
@@ -16,15 +16,15 @@ function serialize(obj) {
16
16
  if (Array.isArray(obj[key])) {
17
17
  for (const key2 in obj[key]) {
18
18
  if ((0, hasProperty_1._hasProperty)(obj[key], key2)) {
19
- str += "&" + key + "=" + encodeURIComponent(obj[key][key2]);
19
+ str += `&${key}=${encodeURIComponent(obj[key][key2])}`;
20
20
  }
21
21
  }
22
22
  }
23
23
  else {
24
- str += "&" + key + "=" + encodeURIComponent(obj[key]);
24
+ str += `&${key}=${encodeURIComponent(obj[key])}`;
25
25
  }
26
26
  }
27
27
  }
28
- return "?" + str.substring(1);
28
+ return `?${str.substring(1)}`;
29
29
  }
30
30
  exports.serialize = serialize;
@@ -4,9 +4,9 @@ exports.padLeadingZeros = void 0;
4
4
  function padLeadingZeros(num, size = 0) {
5
5
  if (isNaN(Number(num)))
6
6
  return String(num);
7
- let s = num + "";
7
+ let s = `${num}`;
8
8
  while (s.length < size)
9
- s = "0" + s;
9
+ s = `0${s}`;
10
10
  return s;
11
11
  }
12
12
  exports.padLeadingZeros = padLeadingZeros;
@@ -28,12 +28,13 @@ function getI18nMonthLabel(label, translate) {
28
28
  return splittedLabel.join(" ");
29
29
  }
30
30
  function getI18nYearMonthLabel(label, translate) {
31
- if (!(0, isTokenLabel_1.isTokenLabel)(label) && !(0, isEmpty_1.isEmpty)(translate)) {
32
- const month = getI18nMonthPropertyByIndex(DATE_YEAR_MONTHS_1.DATE_YEAR_MONTHS.findIndex((_month) => _month === label));
31
+ let newLabel = label;
32
+ if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
33
+ const month = getI18nMonthPropertyByIndex(DATE_YEAR_MONTHS_1.DATE_YEAR_MONTHS.findIndex((_month) => _month === newLabel));
33
34
  if (!(0, isEmpty_1.isEmpty)(month))
34
- label = translate("common.date_grouping." + month + "_mmm");
35
+ newLabel = translate(`common.date_grouping.${month}_mmm`);
35
36
  }
36
- return label;
37
+ return newLabel;
37
38
  }
38
39
  function getI18nMonthPropertyByIndex(index) {
39
40
  const months = [
@@ -58,10 +59,11 @@ function getI18nQuarterLabel(label, translate) {
58
59
  return splittedLabel.join(" ");
59
60
  }
60
61
  function getI18nYearQuarterLabel(label, translate) {
61
- if (!(0, isTokenLabel_1.isTokenLabel)(label) && !(0, isEmpty_1.isEmpty)(translate)) {
62
- label = label.replace(/Q/i, translate("common.date_grouping.quarter"));
62
+ let newLabel = label;
63
+ if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
64
+ newLabel = newLabel.replace(/Q/i, translate("common.date_grouping.quarter"));
63
65
  }
64
- return label;
66
+ return newLabel;
65
67
  }
66
68
  function getI18nWeekLabel(label, translate) {
67
69
  const splittedLabel = label.split(" ");
@@ -69,8 +71,9 @@ function getI18nWeekLabel(label, translate) {
69
71
  return splittedLabel.join(" ");
70
72
  }
71
73
  function getI18nYearWeekLabel(label, translate) {
72
- if (!(0, isTokenLabel_1.isTokenLabel)(label) && !(0, isEmpty_1.isEmpty)(translate)) {
73
- label = label.replace(/W/i, translate("common.date_grouping.week"));
74
+ let newLabel = label;
75
+ if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
76
+ newLabel = newLabel.replace(/W/i, translate("common.date_grouping.week"));
74
77
  }
75
- return label;
78
+ return newLabel;
76
79
  }
@@ -29,10 +29,11 @@ function getReverseI18nMonthLabel(label, translate) {
29
29
  return splittedLabel.join(" ");
30
30
  }
31
31
  function getReverseI18nYearMonthLabel(label, translate) {
32
- if (!(0, isTokenLabel_1.isTokenLabel)(label) && !(0, isEmpty_1.isEmpty)(translate)) {
33
- label = getReverseI18nMonthProperty(label, translate);
32
+ let newLabel = label;
33
+ if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
34
+ newLabel = getReverseI18nMonthProperty(newLabel, translate);
34
35
  }
35
- return label;
36
+ return newLabel;
36
37
  }
37
38
  function getReverseI18nMonthProperty(label, translate) {
38
39
  const translatedMonths = [
@@ -58,10 +59,11 @@ function getReverseI18nQuarterLabel(label, translate) {
58
59
  return splittedLabel.join(" ");
59
60
  }
60
61
  function getReverseI18nYearQuarterLabel(label, translate) {
61
- if (!(0, isTokenLabel_1.isTokenLabel)(label) && !(0, isEmpty_1.isEmpty)(translate)) {
62
- label = label.replace(new RegExp(translate("common.date_grouping.quarter"), "i"), __1.I18N_COMMON.date_grouping.quarter);
62
+ let newLabel = label;
63
+ if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
64
+ newLabel = newLabel.replace(new RegExp(translate("common.date_grouping.quarter"), "i"), __1.I18N_COMMON.date_grouping.quarter);
63
65
  }
64
- return label;
66
+ return newLabel;
65
67
  }
66
68
  function getReverseI18nWeekLabel(label, translate) {
67
69
  const splittedLabel = label.split(" ");
@@ -69,8 +71,9 @@ function getReverseI18nWeekLabel(label, translate) {
69
71
  return splittedLabel.join(" ");
70
72
  }
71
73
  function getReverseI18nYearWeekLabel(label, translate) {
72
- if (!(0, isTokenLabel_1.isTokenLabel)(label) && !(0, isEmpty_1.isEmpty)(translate)) {
73
- label = label.replace(new RegExp(translate("common.date_grouping.week"), "i"), __1.I18N_COMMON.date_grouping.week);
74
+ let newLabel = label;
75
+ if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
76
+ newLabel = newLabel.replace(new RegExp(translate("common.date_grouping.week"), "i"), __1.I18N_COMMON.date_grouping.week);
74
77
  }
75
- return label;
78
+ return newLabel;
76
79
  }
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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";
@@ -86,3 +86,4 @@ __exportStar(require("./II18nChartBuilderTimePeriod"), exports);
86
86
  __exportStar(require("./II18nChartBuilderTimePeriodCustomRange"), exports);
87
87
  __exportStar(require("./II18nChartBuilderWordCloud"), exports);
88
88
  __exportStar(require("./II18nChartBuilderBoxWhisker"), exports);
89
+ __exportStar(require("./II18nChartBuilderDurationParts"), exports);
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,6 +11,7 @@ const formula_builder_1 = require("./formula_builder");
11
11
  const I18N_FILTER_PANEL_1 = require("./filters/I18N_FILTER_PANEL");
12
12
  const I18N_FILTER_DISPLAY_1 = require("./filters/I18N_FILTER_DISPLAY");
13
13
  const I18N_BUCKET_BUILDER_1 = require("./bucket_builder/I18N_BUCKET_BUILDER");
14
+ const I18N_TABULAR_VIEW_1 = require("./tabular_view/I18N_TABULAR_VIEW");
14
15
  const cross_tabs_1 = require("./cross_tabs");
15
16
  const chart_builder_1 = require("./chart_builder");
16
17
  const style_themes_1 = require("./style_themes");
@@ -28,4 +29,5 @@ exports.I18N_DEFAULT = {
28
29
  panel: I18N_PANEL_1.I18N_PANEL,
29
30
  style_themes: style_themes_1.I18N_STYLE_THEMES,
30
31
  table_charts: table_charts_1.I18N_TABLE_CHARTS,
32
+ tabular_view: I18N_TABULAR_VIEW_1.I18N_TABULAR_VIEW,
31
33
  };