@qrvey/utils 1.12.0-9 → 1.13.0-0

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 (350) hide show
  1. package/README.md +2606 -2130
  2. package/dist/charts/adapters/endpointData.js +4 -5
  3. package/dist/charts/adapters/endpointDataGet.js +3 -3
  4. package/dist/cjs/charts/adapters/endpointData.js +3 -4
  5. package/dist/cjs/charts/adapters/endpointDataGet.js +2 -2
  6. package/dist/cjs/constants/Charts.Const.d.ts +4 -1
  7. package/dist/cjs/constants/Charts.Const.js +3 -0
  8. package/dist/cjs/dates/relative/RelativeStatementAdapter.d.ts +1 -1
  9. package/dist/cjs/dates/relative/RelativeStatementAdapter.js +2 -1
  10. package/dist/cjs/dates/relative/relative.d.ts +3 -4
  11. package/dist/cjs/dates/relative/relative.js +5 -9
  12. package/dist/cjs/filters/adapters/FDToFlatUI.js +2 -2
  13. package/dist/cjs/filters/adapters/FDToUI.js +2 -2
  14. package/dist/cjs/filters/adapters/UIToFD.js +2 -2
  15. package/dist/cjs/filters/adapters/UIToFlatUI.js +2 -2
  16. package/dist/cjs/filters/adapters/UIToOldLogic.js +2 -2
  17. package/dist/cjs/filters/adapters/adaptFilterData.js +2 -2
  18. package/dist/cjs/filters/adapters/flatUIToFD.js +2 -2
  19. package/dist/cjs/filters/adapters/flatUIToOldLogic.js +2 -2
  20. package/dist/cjs/filters/adapters/flatUIToUI.js +2 -2
  21. package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +7 -7
  22. package/dist/cjs/filters/helpers/OLD_getAggFilters.js +2 -2
  23. package/dist/cjs/filters/helpers/backend/getLogicByScopes.js +2 -2
  24. package/dist/cjs/filters/helpers/common/excludeFiltersByAggregateColumn.js +2 -2
  25. package/dist/cjs/filters/helpers/common/excludeFiltersByParams.js +2 -2
  26. package/dist/cjs/filters/helpers/common/excludeFiltersByScopes.js +2 -2
  27. package/dist/cjs/filters/helpers/common/getFiltersByAggregateColumn.js +2 -2
  28. package/dist/cjs/filters/helpers/common/getFiltersByParams.js +2 -2
  29. package/dist/cjs/filters/helpers/common/getFiltersByScopes.js +2 -2
  30. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +2 -2
  31. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +2 -2
  32. package/dist/cjs/filters/helpers/settings/getFilterSettings.js +4 -4
  33. package/dist/cjs/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
  34. package/dist/cjs/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
  35. package/dist/cjs/filters/helpers/ui/getUIFlatFilterByParams.js +2 -2
  36. package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
  37. package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
  38. package/dist/cjs/filters/services/Filters.api.js +4 -7
  39. package/dist/cjs/filters/services/UChartApi.d.ts +1 -1
  40. package/dist/cjs/filters/services/UChartApi.js +4 -3
  41. package/dist/cjs/filters/services/UChartPaginationApi.d.ts +1 -1
  42. package/dist/cjs/filters/services/UChartPaginationApi.js +5 -4
  43. package/dist/cjs/format/format.js +2 -2
  44. package/dist/cjs/general/array/filterNestedTree.js +2 -2
  45. package/dist/cjs/general/object/objectCopy.js +8 -7
  46. package/dist/cjs/globalization/interfaces/II18nResource.d.ts +2 -0
  47. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
  48. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
  49. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
  50. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +2 -0
  51. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMenuActions.d.ts +5 -0
  52. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.d.ts +6 -0
  53. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.js +2 -0
  54. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
  55. package/dist/cjs/globalization/interfaces/dashboard/II18nDashboard.d.ts +1 -0
  56. package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
  57. package/dist/cjs/globalization/interfaces/export/II18nExportingModal.d.ts +67 -0
  58. package/dist/cjs/globalization/interfaces/export/II18nExportingModal.js +2 -0
  59. package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +3 -0
  60. package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.js +2 -0
  61. package/dist/cjs/globalization/interfaces/export/II18nExportingModalErrorMessages.d.ts +3 -0
  62. package/dist/cjs/globalization/interfaces/export/II18nExportingModalErrorMessages.js +2 -0
  63. package/dist/cjs/globalization/interfaces/export/II18nExportingModalRecurrence.d.ts +6 -0
  64. package/dist/cjs/globalization/interfaces/export/II18nExportingModalRecurrence.js +2 -0
  65. package/dist/cjs/globalization/interfaces/export/II18nExportingModalTimeStamp.d.ts +7 -0
  66. package/dist/cjs/globalization/interfaces/export/II18nExportingModalTimeStamp.js +2 -0
  67. package/dist/cjs/globalization/interfaces/export/index.d.ts +5 -0
  68. package/dist/cjs/globalization/interfaces/export/index.js +21 -0
  69. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionHour.d.ts +2 -0
  70. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.d.ts +5 -0
  71. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.js +2 -0
  72. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.d.ts +5 -0
  73. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.js +2 -0
  74. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +4 -0
  75. package/dist/cjs/globalization/interfaces/panel/I18nPanelColumnInteractive.d.ts +5 -0
  76. package/dist/cjs/globalization/interfaces/panel/I18nPanelColumnInteractive.js +2 -0
  77. package/dist/cjs/globalization/interfaces/panel/II18nPanel.d.ts +2 -0
  78. package/dist/cjs/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
  79. package/dist/cjs/globalization/interfaces/panel/II18nPanelTooltips.d.ts +3 -0
  80. package/dist/cjs/globalization/interfaces/panel/index.d.ts +1 -0
  81. package/dist/cjs/globalization/interfaces/panel/index.js +1 -0
  82. package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +4 -1
  83. package/dist/cjs/globalization/labels/I18N_DEFAULT.d.ts +1 -1
  84. package/dist/cjs/globalization/labels/I18N_DEFAULT.js +3 -1
  85. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +7 -0
  86. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
  87. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +7 -2
  88. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +18 -0
  89. package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
  90. package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.d.ts +5 -0
  91. package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.js +78 -0
  92. package/dist/cjs/globalization/labels/export/index.d.ts +1 -0
  93. package/dist/cjs/globalization/labels/export/index.js +17 -0
  94. package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +20 -5
  95. package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +9 -0
  96. package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +4 -1
  97. package/dist/cjs/globalization/service/i18nextBuilder.js +2 -3
  98. package/dist/cjs/index.d.ts +1 -0
  99. package/dist/cjs/index.js +1 -0
  100. package/dist/cjs/services/api/getAllQrveys.api.d.ts +1 -1
  101. package/dist/cjs/services/helpers/Request.js +5 -2
  102. package/dist/cjs/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
  103. package/dist/cjs/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
  104. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.d.ts +6 -0
  105. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.js +10 -0
  106. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.d.ts +6 -0
  107. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.js +10 -0
  108. package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +39 -0
  109. package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.js +22 -0
  110. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +15 -0
  111. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +19 -0
  112. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +15 -0
  113. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +19 -0
  114. package/dist/cjs/themes/constants/CANVAS_CSS_VARIABLES.d.ts +6 -0
  115. package/dist/cjs/themes/constants/CANVAS_CSS_VARIABLES.js +10 -0
  116. package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.d.ts +5 -0
  117. package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.js +12 -0
  118. package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.d.ts +5 -0
  119. package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.js +12 -0
  120. package/dist/cjs/themes/constants/COLOR_NAME.d.ts +154 -0
  121. package/dist/cjs/themes/constants/COLOR_NAME.js +157 -0
  122. package/dist/cjs/themes/constants/COLOR_TYPE.d.ts +7 -0
  123. package/dist/cjs/themes/constants/COLOR_TYPE.js +11 -0
  124. package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +7 -0
  125. package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.js +11 -0
  126. package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +15 -0
  127. package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.js +19 -0
  128. package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +4 -0
  129. package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +7 -0
  130. package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +4 -0
  131. package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.js +7 -0
  132. package/dist/cjs/themes/constants/index.d.ts +14 -0
  133. package/dist/cjs/themes/constants/index.js +30 -0
  134. package/dist/cjs/themes/helpers/calculateHSP.d.ts +8 -0
  135. package/dist/cjs/themes/helpers/calculateHSP.js +20 -0
  136. package/dist/cjs/themes/helpers/getCSSVariablesByDestination.d.ts +40 -0
  137. package/dist/cjs/themes/helpers/getCSSVariablesByDestination.js +18 -0
  138. package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.d.ts +8 -0
  139. package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.js +26 -0
  140. package/dist/cjs/themes/helpers/getChannelsByNameColor.d.ts +8 -0
  141. package/dist/cjs/themes/helpers/getChannelsByNameColor.js +26 -0
  142. package/dist/cjs/themes/helpers/getChannelsByRgbaColor.d.ts +8 -0
  143. package/dist/cjs/themes/helpers/getChannelsByRgbaColor.js +25 -0
  144. package/dist/cjs/themes/helpers/getHexadecimalOpacity.d.ts +7 -0
  145. package/dist/cjs/themes/helpers/getHexadecimalOpacity.js +19 -0
  146. package/dist/cjs/themes/helpers/getRgbaOpacity.d.ts +7 -0
  147. package/dist/cjs/themes/helpers/getRgbaOpacity.js +21 -0
  148. package/dist/cjs/themes/helpers/index.d.ts +12 -0
  149. package/dist/cjs/themes/helpers/index.js +28 -0
  150. package/dist/cjs/themes/helpers/isDarkColor.d.ts +7 -0
  151. package/dist/cjs/themes/helpers/isDarkColor.js +15 -0
  152. package/dist/cjs/themes/helpers/isHexadecimalColor.d.ts +6 -0
  153. package/dist/cjs/themes/helpers/isHexadecimalColor.js +15 -0
  154. package/dist/cjs/themes/helpers/isRGBAColor.d.ts +6 -0
  155. package/dist/cjs/themes/helpers/isRGBAColor.js +15 -0
  156. package/dist/cjs/themes/helpers/lightOrDark.d.ts +9 -0
  157. package/dist/cjs/themes/helpers/lightOrDark.js +40 -0
  158. package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.d.ts +9 -0
  159. package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.js +43 -0
  160. package/dist/cjs/themes/index.d.ts +3 -0
  161. package/dist/cjs/themes/index.js +19 -0
  162. package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.d.ts +5 -0
  163. package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.js +2 -0
  164. package/dist/cjs/themes/interfaces/IColorChannel.d.ts +9 -0
  165. package/dist/cjs/themes/interfaces/IColorChannel.js +2 -0
  166. package/dist/cjs/themes/interfaces/IColorType.d.ts +5 -0
  167. package/dist/cjs/themes/interfaces/IColorType.js +2 -0
  168. package/dist/cjs/themes/interfaces/index.d.ts +3 -0
  169. package/dist/cjs/themes/interfaces/index.js +19 -0
  170. package/dist/cjs/tokens/getCleanCustomTokens.d.ts +9 -0
  171. package/dist/cjs/tokens/getCleanCustomTokens.js +22 -0
  172. package/dist/cjs/tokens/getCustomtonTokens.d.ts +3 -3
  173. package/dist/cjs/tokens/getCustomtonTokens.js +7 -4
  174. package/dist/cjs/tokens/getCustomtonTokensWithKeys.js +1 -1
  175. package/dist/cjs/tokens/index.d.ts +1 -0
  176. package/dist/cjs/tokens/index.js +1 -0
  177. package/dist/constants/Charts.Const.d.ts +4 -1
  178. package/dist/constants/Charts.Const.js +3 -0
  179. package/dist/dates/relative/RelativeStatementAdapter.d.ts +1 -1
  180. package/dist/dates/relative/RelativeStatementAdapter.js +1 -1
  181. package/dist/dates/relative/relative.d.ts +3 -4
  182. package/dist/dates/relative/relative.js +4 -5
  183. package/dist/filters/adapters/FDToFlatUI.js +2 -2
  184. package/dist/filters/adapters/FDToUI.js +2 -2
  185. package/dist/filters/adapters/UIToFD.js +2 -2
  186. package/dist/filters/adapters/UIToFlatUI.js +2 -2
  187. package/dist/filters/adapters/UIToOldLogic.js +2 -2
  188. package/dist/filters/adapters/adaptFilterData.js +2 -2
  189. package/dist/filters/adapters/flatUIToFD.js +2 -2
  190. package/dist/filters/adapters/flatUIToOldLogic.js +2 -2
  191. package/dist/filters/adapters/flatUIToUI.js +2 -2
  192. package/dist/filters/constants/common/FILTER_SCOPE.d.ts +7 -7
  193. package/dist/filters/helpers/OLD_getAggFilters.js +2 -2
  194. package/dist/filters/helpers/backend/getLogicByScopes.js +2 -2
  195. package/dist/filters/helpers/common/excludeFiltersByAggregateColumn.js +2 -2
  196. package/dist/filters/helpers/common/excludeFiltersByParams.js +2 -2
  197. package/dist/filters/helpers/common/excludeFiltersByScopes.js +2 -2
  198. package/dist/filters/helpers/common/getFiltersByAggregateColumn.js +2 -2
  199. package/dist/filters/helpers/common/getFiltersByParams.js +2 -2
  200. package/dist/filters/helpers/common/getFiltersByScopes.js +2 -2
  201. package/dist/filters/helpers/common/getFiltersByScopesIds.js +2 -2
  202. package/dist/filters/helpers/common/getFiltersByVisibility.js +2 -2
  203. package/dist/filters/helpers/settings/getFilterSettings.js +4 -4
  204. package/dist/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
  205. package/dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
  206. package/dist/filters/helpers/ui/getUIFlatFilterByParams.js +2 -2
  207. package/dist/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
  208. package/dist/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
  209. package/dist/filters/services/Filters.api.js +2 -2
  210. package/dist/filters/services/UChartApi.d.ts +1 -1
  211. package/dist/filters/services/UChartApi.js +3 -4
  212. package/dist/filters/services/UChartPaginationApi.d.ts +1 -1
  213. package/dist/filters/services/UChartPaginationApi.js +4 -5
  214. package/dist/format/format.js +2 -2
  215. package/dist/general/array/filterNestedTree.js +2 -2
  216. package/dist/general/object/objectCopy.js +8 -7
  217. package/dist/globalization/interfaces/II18nResource.d.ts +2 -0
  218. package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
  219. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
  220. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
  221. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +2 -0
  222. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMenuActions.d.ts +5 -0
  223. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.d.ts +6 -0
  224. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
  225. package/dist/globalization/interfaces/dashboard/II18nDashboard.d.ts +1 -0
  226. package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
  227. package/dist/globalization/interfaces/export/II18nExportingModal.d.ts +67 -0
  228. package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +3 -0
  229. package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.js +1 -0
  230. package/dist/globalization/interfaces/export/II18nExportingModalErrorMessages.d.ts +3 -0
  231. package/dist/globalization/interfaces/export/II18nExportingModalErrorMessages.js +1 -0
  232. package/dist/globalization/interfaces/export/II18nExportingModalRecurrence.d.ts +6 -0
  233. package/dist/globalization/interfaces/export/II18nExportingModalRecurrence.js +1 -0
  234. package/dist/globalization/interfaces/export/II18nExportingModalTimeStamp.d.ts +7 -0
  235. package/dist/globalization/interfaces/export/II18nExportingModalTimeStamp.js +1 -0
  236. package/dist/globalization/interfaces/export/index.d.ts +5 -0
  237. package/dist/globalization/interfaces/export/index.js +5 -0
  238. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionHour.d.ts +2 -0
  239. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.d.ts +5 -0
  240. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.js +1 -0
  241. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.d.ts +5 -0
  242. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.js +1 -0
  243. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +4 -0
  244. package/dist/globalization/interfaces/panel/I18nPanelColumnInteractive.d.ts +5 -0
  245. package/dist/globalization/interfaces/panel/I18nPanelColumnInteractive.js +1 -0
  246. package/dist/globalization/interfaces/panel/II18nPanel.d.ts +2 -0
  247. package/dist/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
  248. package/dist/globalization/interfaces/panel/II18nPanelTooltips.d.ts +3 -0
  249. package/dist/globalization/interfaces/panel/index.d.ts +1 -0
  250. package/dist/globalization/interfaces/panel/index.js +1 -0
  251. package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +4 -1
  252. package/dist/globalization/labels/I18N_DEFAULT.d.ts +1 -1
  253. package/dist/globalization/labels/I18N_DEFAULT.js +3 -1
  254. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +7 -0
  255. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
  256. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +7 -2
  257. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +18 -0
  258. package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
  259. package/dist/globalization/labels/export/I18N_EXPORT_MODAL.d.ts +5 -0
  260. package/dist/globalization/labels/export/I18N_EXPORT_MODAL.js +75 -0
  261. package/dist/globalization/labels/export/index.d.ts +1 -0
  262. package/dist/globalization/labels/export/index.js +1 -0
  263. package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +20 -5
  264. package/dist/globalization/labels/panel/I18N_PANEL.js +9 -0
  265. package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +4 -1
  266. package/dist/globalization/service/i18nextBuilder.js +3 -4
  267. package/dist/index.d.ts +1 -0
  268. package/dist/index.js +1 -0
  269. package/dist/services/api/getAllQrveys.api.d.ts +1 -1
  270. package/dist/services/helpers/Request.js +5 -2
  271. package/dist/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
  272. package/dist/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
  273. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.d.ts +6 -0
  274. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.js +7 -0
  275. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.d.ts +6 -0
  276. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.js +7 -0
  277. package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +39 -0
  278. package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.js +19 -0
  279. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +15 -0
  280. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +16 -0
  281. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +15 -0
  282. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +16 -0
  283. package/dist/themes/constants/CANVAS_CSS_VARIABLES.d.ts +6 -0
  284. package/dist/themes/constants/CANVAS_CSS_VARIABLES.js +7 -0
  285. package/dist/themes/constants/CHANNEL_BLACK_COLOR.d.ts +5 -0
  286. package/dist/themes/constants/CHANNEL_BLACK_COLOR.js +9 -0
  287. package/dist/themes/constants/CHANNEL_WHITE_COLOR.d.ts +5 -0
  288. package/dist/themes/constants/CHANNEL_WHITE_COLOR.js +9 -0
  289. package/dist/themes/constants/COLOR_NAME.d.ts +154 -0
  290. package/dist/themes/constants/COLOR_NAME.js +154 -0
  291. package/dist/themes/constants/COLOR_TYPE.d.ts +7 -0
  292. package/dist/themes/constants/COLOR_TYPE.js +8 -0
  293. package/dist/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +7 -0
  294. package/dist/themes/constants/CSS_VARIABLE_DESTINATION.js +8 -0
  295. package/dist/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +15 -0
  296. package/dist/themes/constants/GLOBAL_CSS_VARIABLES.js +16 -0
  297. package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +4 -0
  298. package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +4 -0
  299. package/dist/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +4 -0
  300. package/dist/themes/constants/RGBA_REGULAR_EXPRESION.js +4 -0
  301. package/dist/themes/constants/index.d.ts +14 -0
  302. package/dist/themes/constants/index.js +14 -0
  303. package/dist/themes/helpers/calculateHSP.d.ts +8 -0
  304. package/dist/themes/helpers/calculateHSP.js +16 -0
  305. package/dist/themes/helpers/getCSSVariablesByDestination.d.ts +40 -0
  306. package/dist/themes/helpers/getCSSVariablesByDestination.js +14 -0
  307. package/dist/themes/helpers/getChannelsByHexadecimalColor.d.ts +8 -0
  308. package/dist/themes/helpers/getChannelsByHexadecimalColor.js +22 -0
  309. package/dist/themes/helpers/getChannelsByNameColor.d.ts +8 -0
  310. package/dist/themes/helpers/getChannelsByNameColor.js +22 -0
  311. package/dist/themes/helpers/getChannelsByRgbaColor.d.ts +8 -0
  312. package/dist/themes/helpers/getChannelsByRgbaColor.js +21 -0
  313. package/dist/themes/helpers/getHexadecimalOpacity.d.ts +7 -0
  314. package/dist/themes/helpers/getHexadecimalOpacity.js +15 -0
  315. package/dist/themes/helpers/getRgbaOpacity.d.ts +7 -0
  316. package/dist/themes/helpers/getRgbaOpacity.js +17 -0
  317. package/dist/themes/helpers/index.d.ts +12 -0
  318. package/dist/themes/helpers/index.js +12 -0
  319. package/dist/themes/helpers/isDarkColor.d.ts +7 -0
  320. package/dist/themes/helpers/isDarkColor.js +11 -0
  321. package/dist/themes/helpers/isHexadecimalColor.d.ts +6 -0
  322. package/dist/themes/helpers/isHexadecimalColor.js +11 -0
  323. package/dist/themes/helpers/isRGBAColor.d.ts +6 -0
  324. package/dist/themes/helpers/isRGBAColor.js +11 -0
  325. package/dist/themes/helpers/lightOrDark.d.ts +9 -0
  326. package/dist/themes/helpers/lightOrDark.js +36 -0
  327. package/dist/themes/helpers/setAutomaticCSSVariablesForDark.d.ts +9 -0
  328. package/dist/themes/helpers/setAutomaticCSSVariablesForDark.js +39 -0
  329. package/dist/themes/index.d.ts +3 -0
  330. package/dist/themes/index.js +3 -0
  331. package/dist/themes/interfaces/IColorCSSVariableDestination.d.ts +5 -0
  332. package/dist/themes/interfaces/IColorCSSVariableDestination.js +1 -0
  333. package/dist/themes/interfaces/IColorChannel.d.ts +9 -0
  334. package/dist/themes/interfaces/IColorChannel.js +1 -0
  335. package/dist/themes/interfaces/IColorType.d.ts +5 -0
  336. package/dist/themes/interfaces/IColorType.js +1 -0
  337. package/dist/themes/interfaces/index.d.ts +3 -0
  338. package/dist/themes/interfaces/index.js +3 -0
  339. package/dist/tokens/getCleanCustomTokens.d.ts +9 -0
  340. package/dist/tokens/getCleanCustomTokens.js +18 -0
  341. package/dist/tokens/getCustomtonTokens.d.ts +3 -3
  342. package/dist/tokens/getCustomtonTokens.js +8 -5
  343. package/dist/tokens/getCustomtonTokensWithKeys.js +1 -1
  344. package/dist/tokens/index.d.ts +1 -0
  345. package/dist/tokens/index.js +1 -0
  346. package/package.json +20 -17
  347. package/dist/cjs/tokens/getCustomtonTokensWithKeys.test.js +0 -23
  348. package/dist/tokens/getCustomtonTokensWithKeys.test.js +0 -21
  349. /package/dist/{cjs/tokens/getCustomtonTokensWithKeys.test.d.ts → globalization/interfaces/chart_builder/II18nChartBuilderRadarType.js} +0 -0
  350. /package/dist/{tokens/getCustomtonTokensWithKeys.test.d.ts → globalization/interfaces/export/II18nExportingModal.js} +0 -0
@@ -0,0 +1,12 @@
1
+ export * from "./calculateHSP";
2
+ export * from "./getChannelsByHexadecimalColor";
3
+ export * from "./getChannelsByNameColor";
4
+ export * from "./getChannelsByRgbaColor";
5
+ export * from "./getCSSVariablesByDestination";
6
+ export * from "./getHexadecimalOpacity";
7
+ export * from "./getRgbaOpacity";
8
+ export * from "./isDarkColor";
9
+ export * from "./isHexadecimalColor";
10
+ export * from "./isRGBAColor";
11
+ export * from "./lightOrDark";
12
+ export * from "./setAutomaticCSSVariablesForDark";
@@ -0,0 +1,12 @@
1
+ export * from "./calculateHSP";
2
+ export * from "./getChannelsByHexadecimalColor";
3
+ export * from "./getChannelsByNameColor";
4
+ export * from "./getChannelsByRgbaColor";
5
+ export * from "./getCSSVariablesByDestination";
6
+ export * from "./getHexadecimalOpacity";
7
+ export * from "./getRgbaOpacity";
8
+ export * from "./isDarkColor";
9
+ export * from "./isHexadecimalColor";
10
+ export * from "./isRGBAColor";
11
+ export * from "./lightOrDark";
12
+ export * from "./setAutomaticCSSVariablesForDark";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Determines if the Color is dark or light.
3
+ * Uses the lightOrDark module.
4
+ * @param color the string of the color (RGBA, or Hexadecimal)
5
+ * @returns true: the color is dark.
6
+ */
7
+ export declare function isDarkColor(color: string, brightnessThreshold?: number): boolean;
@@ -0,0 +1,11 @@
1
+ import { COLOR_TYPE } from "../constants/COLOR_TYPE";
2
+ import { lightOrDark } from "./lightOrDark";
3
+ /**
4
+ * Determines if the Color is dark or light.
5
+ * Uses the lightOrDark module.
6
+ * @param color the string of the color (RGBA, or Hexadecimal)
7
+ * @returns true: the color is dark.
8
+ */
9
+ export function isDarkColor(color, brightnessThreshold = 127.5) {
10
+ return lightOrDark(color, brightnessThreshold) === COLOR_TYPE.DARK;
11
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Validates if the given color is an hexadecimal structure
3
+ * @param color the string of the color
4
+ * @returns true: the color is an hexadecimal type
5
+ */
6
+ export declare function isHexadecimalColor(color?: string): boolean;
@@ -0,0 +1,11 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { HEXADECIMAL_REGULAR_EXPRESSION } from "../constants/HEXADECIMAL_REGULAR_EXPRESSION";
3
+ /**
4
+ * Validates if the given color is an hexadecimal structure
5
+ * @param color the string of the color
6
+ * @returns true: the color is an hexadecimal type
7
+ */
8
+ export function isHexadecimalColor(color = "") {
9
+ return (typeof color === "string" &&
10
+ !isEmpty(color.match(HEXADECIMAL_REGULAR_EXPRESSION)));
11
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Validates if the given color is an RGBA structure
3
+ * @param color the string of the color
4
+ * @returns true: the color is an RGBA type
5
+ */
6
+ export declare function isRGBAColor(color?: string): boolean;
@@ -0,0 +1,11 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { RGBA_REGULAR_EXPRESSION } from "../constants/RGBA_REGULAR_EXPRESION";
3
+ /**
4
+ * Validates if the given color is an RGBA structure
5
+ * @param color the string of the color
6
+ * @returns true: the color is an RGBA type
7
+ */
8
+ export function isRGBAColor(color = "") {
9
+ return (typeof color === "string" &&
10
+ !isEmpty(color.toLowerCase().match(RGBA_REGULAR_EXPRESSION)));
11
+ }
@@ -0,0 +1,9 @@
1
+ import { IColorType } from "../interfaces/IColorType";
2
+ /**
3
+ * Validates if the given color is light or dark
4
+ * The module extracts the rgba channels and calculate the brightness or darkness by a threshold
5
+ * - If there is not color provided, the returning will be Light
6
+ * @param color the string of the color.
7
+ * @returns the color type (Dark or Light)
8
+ */
9
+ export declare function lightOrDark(color: string, brightnessThreshold?: number, opacityThreshold?: number): IColorType;
@@ -0,0 +1,36 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { COLOR_TYPE } from "../constants/COLOR_TYPE";
3
+ import { calculateHSP } from "./calculateHSP";
4
+ import { getChannelsByHexadecimalColor } from "./getChannelsByHexadecimalColor";
5
+ import { getChannelsByNameColor } from "./getChannelsByNameColor";
6
+ import { getChannelsByRgbaColor } from "./getChannelsByRgbaColor";
7
+ import { isHexadecimalColor } from "./isHexadecimalColor";
8
+ import { isRGBAColor } from "./isRGBAColor";
9
+ /**
10
+ * Validates if the given color is light or dark
11
+ * The module extracts the rgba channels and calculate the brightness or darkness by a threshold
12
+ * - If there is not color provided, the returning will be Light
13
+ * @param color the string of the color.
14
+ * @returns the color type (Dark or Light)
15
+ */
16
+ export function lightOrDark(color, brightnessThreshold = 127.5, opacityThreshold = 0.5) {
17
+ if (isEmpty(color) || typeof color !== "string")
18
+ return COLOR_TYPE.LIGHT;
19
+ let rgbaChannel = { r: 0, g: 0, b: 0, a: 1 };
20
+ const rgbaColor = isRGBAColor(color);
21
+ const hexadecimalColor = isHexadecimalColor(color);
22
+ if (rgbaColor) {
23
+ rgbaChannel = getChannelsByRgbaColor(color);
24
+ }
25
+ else if (hexadecimalColor) {
26
+ rgbaChannel = getChannelsByHexadecimalColor(color);
27
+ }
28
+ else {
29
+ rgbaChannel = getChannelsByNameColor(color);
30
+ }
31
+ const hsp = calculateHSP(rgbaChannel);
32
+ if (hsp > brightnessThreshold || rgbaChannel.a < opacityThreshold) {
33
+ return COLOR_TYPE.LIGHT;
34
+ }
35
+ return COLOR_TYPE.DARK;
36
+ }
@@ -0,0 +1,9 @@
1
+ import { IColorCSSVariableDestination } from "../interfaces/IColorCSSVariableDestination";
2
+ import { IColorType } from "../interfaces/IColorType";
3
+ /**
4
+ * Sets CSS Variables into a given wrapper collection.
5
+ * For the Dark Theme feature.
6
+ * @param colorType the color type
7
+ * @param wrapperTags the html elements to set the CSS variables
8
+ */
9
+ export declare function setAutomaticCSSVariablesForDark(colorType: IColorType, wrapperTags: string[], destination?: IColorCSSVariableDestination): void;
@@ -0,0 +1,39 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
3
+ import { getCSSVariablesByDestination } from "./getCSSVariablesByDestination";
4
+ /**
5
+ * Sets CSS Variables into a given wrapper collection.
6
+ * For the Dark Theme feature.
7
+ * @param colorType the color type
8
+ * @param wrapperTags the html elements to set the CSS variables
9
+ */
10
+ export function setAutomaticCSSVariablesForDark(colorType, wrapperTags, destination = CSS_VARIABLE_DESTINATION.GLOBAL) {
11
+ if (isEmpty(colorType) || !Array.isArray(wrapperTags))
12
+ return;
13
+ const cssVariables = getCSSVariablesByDestination(destination);
14
+ const cssVariablesKeys = Object.keys(cssVariables[colorType] || {});
15
+ wrapperTags.forEach((wrapperTag) => {
16
+ const wrapperElement = document.querySelector(wrapperTag);
17
+ setCSSVariable(wrapperElement, cssVariablesKeys, cssVariables[colorType]);
18
+ });
19
+ }
20
+ /**
21
+ * Sets CSS Variables into a given wrapper collection.
22
+ * For the Dark Theme feature.
23
+ * @param colorType the color type
24
+ * @param wrapper the html element to set the CSS variables
25
+ * @param cssVariables the CSS variables name to apply the style property
26
+ */
27
+ function setCSSVariable(wrapper, cssVariables, cssProperties) {
28
+ if (isEmpty(wrapper) || isEmpty(cssVariables))
29
+ return;
30
+ cssVariables.forEach((cssVariable) => {
31
+ const cssProperty = cssProperties[cssVariable];
32
+ if (isEmpty(cssProperty)) {
33
+ wrapper.style.removeProperty(cssVariable);
34
+ }
35
+ else {
36
+ wrapper.style.setProperty(cssVariable, cssProperty);
37
+ }
38
+ });
39
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./interfaces";
3
+ export * from "./helpers";
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./interfaces";
3
+ export * from "./helpers";
@@ -0,0 +1,5 @@
1
+ import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
2
+ /**
3
+ * CSS Variable Destination types
4
+ */
5
+ export type IColorCSSVariableDestination = CSS_VARIABLE_DESTINATION;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Structure for the RGBA Color channels
3
+ */
4
+ export interface IColorChannel {
5
+ a?: number;
6
+ b: number;
7
+ g: number;
8
+ r: number;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { COLOR_TYPE } from "../constants/COLOR_TYPE";
2
+ /**
3
+ * Color types
4
+ */
5
+ export type IColorType = COLOR_TYPE;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./IColorChannel";
2
+ export * from "./IColorCSSVariableDestination";
3
+ export * from "./IColorType";
@@ -0,0 +1,3 @@
1
+ export * from "./IColorChannel";
2
+ export * from "./IColorCSSVariableDestination";
3
+ export * from "./IColorType";
@@ -0,0 +1,9 @@
1
+ import { ICustomTokensComplex } from "../interfaces";
2
+ /**
3
+ * The function `getCleanCustomTokens` takes an object `customTokens` and returns a new object
4
+ * `cleanTokens` with filtered values based on certain conditions.
5
+ * @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object of type
6
+ * `ICustomTokensComplex`.
7
+ * @returns a cleaned version of the customTokens object.
8
+ */
9
+ export declare function getCleanCustomTokens(customTokens?: ICustomTokensComplex): ICustomTokensComplex;
@@ -0,0 +1,18 @@
1
+ import { _hasProperty, isEmpty } from "../general";
2
+ /**
3
+ * The function `getCleanCustomTokens` takes an object `customTokens` and returns a new object
4
+ * `cleanTokens` with filtered values based on certain conditions.
5
+ * @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object of type
6
+ * `ICustomTokensComplex`.
7
+ * @returns a cleaned version of the customTokens object.
8
+ */
9
+ export function getCleanCustomTokens(customTokens = {}) {
10
+ const cleanTokens = {};
11
+ for (const tokenKey in customTokens) {
12
+ if (_hasProperty(customTokens, tokenKey)) {
13
+ const tokensGroup = customTokens[tokenKey];
14
+ cleanTokens[tokenKey] = tokensGroup.filter((token) => !isEmpty(token.value) && (token.label || token.key));
15
+ }
16
+ }
17
+ return cleanTokens;
18
+ }
@@ -1,10 +1,10 @@
1
1
  import { ICustomTokensComplex, ICustomTokensSimple } from "../interfaces";
2
2
  /**
3
3
  * The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
4
- * custom tokens.
4
+ * custom tokens, with keys and values appropriately formatted.
5
5
  * @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
6
- * `customtonTokensConfig` parameter is an object that can be either of type `ICustomTokensSimple` or
7
- * `ICustomTokensComplex`.
6
+ * `customtonTokensConfig` parameter is an object that can have two possible types:
7
+ * `ICustomTokensSimple` or `ICustomTokensComplex`.
8
8
  * @returns an object of type `ICustomTokensComplex`.
9
9
  */
10
10
  export declare function getCustomtonTokens(customtonTokensConfig: ICustomTokensSimple | ICustomTokensComplex): ICustomTokensComplex;
@@ -1,12 +1,13 @@
1
1
  import { CUSTOM_TOKEN_DEFAULT_KEY } from "../constants";
2
- import { camelize } from "../general";
2
+ import { camelize, isEmpty } from "../general";
3
+ import { getCleanCustomTokens } from "./getCleanCustomTokens";
3
4
  import { getCustomtonTokensWithKeys } from "./getCustomtonTokensWithKeys";
4
5
  /**
5
6
  * The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
6
- * custom tokens.
7
+ * custom tokens, with keys and values appropriately formatted.
7
8
  * @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
8
- * `customtonTokensConfig` parameter is an object that can be either of type `ICustomTokensSimple` or
9
- * `ICustomTokensComplex`.
9
+ * `customtonTokensConfig` parameter is an object that can have two possible types:
10
+ * `ICustomTokensSimple` or `ICustomTokensComplex`.
10
11
  * @returns an object of type `ICustomTokensComplex`.
11
12
  */
12
13
  export function getCustomtonTokens(customtonTokensConfig) {
@@ -34,5 +35,7 @@ export function getCustomtonTokens(customtonTokensConfig) {
34
35
  }
35
36
  }
36
37
  }
37
- return customTokensparsed;
38
+ if (isEmpty(customTokensparsed[CUSTOM_TOKEN_DEFAULT_KEY]))
39
+ delete customTokensparsed[CUSTOM_TOKEN_DEFAULT_KEY];
40
+ return getCleanCustomTokens(customTokensparsed);
38
41
  }
@@ -10,5 +10,5 @@ import { camelize } from "../general";
10
10
  * `CustomTokens` object.
11
11
  */
12
12
  export function getCustomtonTokensWithKeys(customTokens) {
13
- return customTokens.map((token) => (Object.assign(Object.assign({}, token), { key: camelize((token === null || token === void 0 ? void 0 : token.key) || token.label) })));
13
+ return customTokens.map((token) => (Object.assign(Object.assign({}, token), { label: token.label || token.key, key: camelize((token === null || token === void 0 ? void 0 : token.key) || token.label) })));
14
14
  }
@@ -2,3 +2,4 @@ export * from "./isTokenLabel";
2
2
  export * from "./getCustomtonTokensWithKeys";
3
3
  export * from "./getCustomtonTokens";
4
4
  export * from "./getCustomTokenBoxParse";
5
+ export * from "./getCleanCustomTokens";
@@ -2,3 +2,4 @@ export * from "./isTokenLabel";
2
2
  export * from "./getCustomtonTokensWithKeys";
3
3
  export * from "./getCustomtonTokens";
4
4
  export * from "./getCustomTokenBoxParse";
5
+ export * from "./getCleanCustomTokens";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.12.0-9",
3
+ "version": "1.13.0-0",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  "lint.dev": "eslint . --debug --ext .ts,.tsx",
14
14
  "prepare": "husky install",
15
15
  "publishing.beta.1": "node ./scripts/publishing --np-new-version=$npm_config_np_new_version --np-any-branch=$npm_config_np_any_branch --np-tag=$npm_config_np_tag",
16
- "publishing": "node ./scripts/clean-build && np $npm_config_np_new_version --any-branch --tag=$npm_config_np_tag",
16
+ "publishing": "node ./scripts/clean-build && np $npm_config_np_new_version --any-branch --tag=$npm_config_np_tag --no-yarn",
17
17
  "publishing.win": "node ./scripts/clean-build && np %npm_config_np_new_version% --any-branch --tag=%npm_config_np_tag%",
18
18
  "test": "jest test --verbose",
19
19
  "test.coverage": "jest test --collect-coverage",
@@ -23,30 +23,33 @@
23
23
  "author": "Qrvey Inc",
24
24
  "license": "MIT",
25
25
  "engines": {
26
- "node": ">=14 <=18"
26
+ "node": ">=18 <=20"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/jest": "29.5.3",
30
- "@types/responselike": "1.0.0",
31
- "@typescript-eslint/eslint-plugin": "6.2.1",
32
- "@typescript-eslint/parser": "6.2.1",
29
+ "@types/jest": "29.5.11",
30
+ "@typescript-eslint/eslint-plugin": "6.19.0",
31
+ "@typescript-eslint/parser": "6.19.0",
33
32
  "auto-changelog": "2.4.0",
34
- "eslint": "8.46.0",
35
- "eslint-config-prettier": "8.9.0",
36
- "eslint-plugin-prettier": "5.0.0",
37
- "eslint-plugin-sonarjs": "0.19.0",
33
+ "eslint": "8.56.0",
34
+ "eslint-config-prettier": "9.1.0",
35
+ "eslint-import-resolver-typescript": "3.6.1",
36
+ "eslint-plugin-import": "2.29.1",
37
+ "eslint-plugin-jsdoc": "48.0.2",
38
+ "eslint-plugin-prettier": "5.1.3",
39
+ "eslint-plugin-sonarjs": "0.23.0",
38
40
  "husky": "8.0.3",
39
- "jest": "29.6.2",
40
- "lint-staged": "13.2.3",
41
+ "jest": "29.7.0",
42
+ "jest-environment-jsdom": "29.7.0",
43
+ "lint-staged": "15.2.0",
41
44
  "np": "8.0.4",
42
- "prettier": "3.0.0",
45
+ "prettier": "3.2.4",
43
46
  "ts-jest": "29.1.1",
44
- "typescript": "5.1.6"
47
+ "typescript": "5.3.3"
45
48
  },
46
49
  "dependencies": {
47
50
  "d3-format": "2.0.0",
48
- "dayjs": "1.11.9",
49
- "i18next": "22.4.9"
51
+ "dayjs": "1.11.10",
52
+ "i18next": "23.7.16"
50
53
  },
51
54
  "files": [
52
55
  "dist/**/*"
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const getCustomtonTokensWithKeys_1 = require("../../src/tokens/getCustomtonTokensWithKeys");
4
- describe("getCustomtonTokensWithKeys", () => {
5
- test("should add camelized key to custom tokens", () => {
6
- const customTokens = [
7
- { label: "token one", value: "value1" },
8
- { label: "Token 2", value: "value2", key: "{{token dos}}" },
9
- { label: "3rd token", value: "value3" },
10
- ];
11
- const result = (0, getCustomtonTokensWithKeys_1.getCustomtonTokensWithKeys)(customTokens);
12
- expect(result).toEqual([
13
- { label: "token one", value: "value1", key: "tokenOne" },
14
- { label: "Token 2", value: "value2", key: "tokenDos" },
15
- { label: "3rd token", value: "value3", key: "3rdToken" },
16
- ]);
17
- });
18
- test("should handle empty array", () => {
19
- const emptyTokens = [];
20
- const result = (0, getCustomtonTokensWithKeys_1.getCustomtonTokensWithKeys)(emptyTokens);
21
- expect(result).toEqual([]);
22
- });
23
- });
@@ -1,21 +0,0 @@
1
- import { getCustomtonTokensWithKeys } from "../../src/tokens/getCustomtonTokensWithKeys";
2
- describe("getCustomtonTokensWithKeys", () => {
3
- test("should add camelized key to custom tokens", () => {
4
- const customTokens = [
5
- { label: "token one", value: "value1" },
6
- { label: "Token 2", value: "value2", key: "{{token dos}}" },
7
- { label: "3rd token", value: "value3" },
8
- ];
9
- const result = getCustomtonTokensWithKeys(customTokens);
10
- expect(result).toEqual([
11
- { label: "token one", value: "value1", key: "tokenOne" },
12
- { label: "Token 2", value: "value2", key: "tokenDos" },
13
- { label: "3rd token", value: "value3", key: "3rdToken" },
14
- ]);
15
- });
16
- test("should handle empty array", () => {
17
- const emptyTokens = [];
18
- const result = getCustomtonTokensWithKeys(emptyTokens);
19
- expect(result).toEqual([]);
20
- });
21
- });