@qrvey/utils 1.12.0-8 → 1.12.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 (301) hide show
  1. package/dist/charts/adapters/endpointData.js +3 -4
  2. package/dist/charts/adapters/endpointDataGet.js +2 -2
  3. package/dist/cjs/charts/adapters/endpointData.js +2 -3
  4. package/dist/cjs/charts/adapters/endpointDataGet.js +1 -1
  5. package/dist/cjs/constants/Charts.Const.d.ts +4 -1
  6. package/dist/cjs/constants/Charts.Const.js +3 -0
  7. package/dist/cjs/filters/adapters/FDToFlatUI.js +2 -2
  8. package/dist/cjs/filters/adapters/FDToUI.js +2 -2
  9. package/dist/cjs/filters/adapters/UIToFD.js +2 -2
  10. package/dist/cjs/filters/adapters/UIToFlatUI.js +2 -2
  11. package/dist/cjs/filters/adapters/UIToOldLogic.js +2 -2
  12. package/dist/cjs/filters/adapters/adaptFilterData.js +2 -2
  13. package/dist/cjs/filters/adapters/flatUIToFD.js +2 -2
  14. package/dist/cjs/filters/adapters/flatUIToOldLogic.js +2 -2
  15. package/dist/cjs/filters/adapters/flatUIToUI.js +2 -2
  16. package/dist/cjs/filters/helpers/OLD_getAggFilters.js +2 -2
  17. package/dist/cjs/filters/helpers/backend/getLogicByScopes.js +2 -2
  18. package/dist/cjs/filters/helpers/common/excludeFiltersByAggregateColumn.js +2 -2
  19. package/dist/cjs/filters/helpers/common/excludeFiltersByParams.js +2 -2
  20. package/dist/cjs/filters/helpers/common/excludeFiltersByScopes.js +2 -2
  21. package/dist/cjs/filters/helpers/common/getFiltersByAggregateColumn.js +2 -2
  22. package/dist/cjs/filters/helpers/common/getFiltersByParams.js +2 -2
  23. package/dist/cjs/filters/helpers/common/getFiltersByScopes.js +2 -2
  24. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +2 -2
  25. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +2 -2
  26. package/dist/cjs/filters/helpers/settings/getFilterSettings.js +4 -4
  27. package/dist/cjs/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
  28. package/dist/cjs/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
  29. package/dist/cjs/filters/helpers/ui/getUIFlatFilterByParams.js +2 -2
  30. package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
  31. package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
  32. package/dist/cjs/filters/interfaces/builder/IFilterBuilderDisplayEvent.d.ts +4 -0
  33. package/dist/cjs/filters/interfaces/builder/IFilterBuilderDisplayEvent.js +2 -0
  34. package/dist/cjs/filters/interfaces/builder/index.d.ts +1 -0
  35. package/dist/cjs/filters/interfaces/builder/index.js +1 -0
  36. package/dist/cjs/filters/services/UChartApi.js +2 -2
  37. package/dist/cjs/filters/services/UChartPaginationApi.js +3 -3
  38. package/dist/cjs/format/format.js +2 -2
  39. package/dist/cjs/general/array/filterNestedTree.js +2 -2
  40. package/dist/cjs/general/object/objectCopy.js +8 -7
  41. package/dist/cjs/globalization/interfaces/II18nResource.d.ts +2 -0
  42. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
  43. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
  44. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
  45. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +2 -0
  46. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMenuActions.d.ts +5 -0
  47. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.d.ts +6 -0
  48. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.js +2 -0
  49. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
  50. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderThreshold.d.ts +2 -0
  51. package/dist/cjs/globalization/interfaces/dashboard/II18nDashboard.d.ts +1 -0
  52. package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
  53. package/dist/cjs/globalization/interfaces/export/II18nExportingModal.d.ts +67 -0
  54. package/dist/cjs/globalization/interfaces/export/II18nExportingModal.js +2 -0
  55. package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +3 -0
  56. package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.js +2 -0
  57. package/dist/cjs/globalization/interfaces/export/II18nExportingModalErrorMessages.d.ts +3 -0
  58. package/dist/cjs/globalization/interfaces/export/II18nExportingModalErrorMessages.js +2 -0
  59. package/dist/cjs/globalization/interfaces/export/II18nExportingModalRecurrence.d.ts +6 -0
  60. package/dist/cjs/globalization/interfaces/export/II18nExportingModalRecurrence.js +2 -0
  61. package/dist/cjs/globalization/interfaces/export/II18nExportingModalTimeStamp.d.ts +7 -0
  62. package/dist/cjs/globalization/interfaces/export/II18nExportingModalTimeStamp.js +2 -0
  63. package/dist/cjs/globalization/interfaces/export/index.d.ts +5 -0
  64. package/dist/cjs/globalization/interfaces/export/index.js +21 -0
  65. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionHour.d.ts +2 -0
  66. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.d.ts +5 -0
  67. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.js +2 -0
  68. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.d.ts +5 -0
  69. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.js +2 -0
  70. package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +4 -0
  71. package/dist/cjs/globalization/interfaces/panel/I18nPanelColumnInteractive.d.ts +5 -0
  72. package/dist/cjs/globalization/interfaces/panel/I18nPanelColumnInteractive.js +2 -0
  73. package/dist/cjs/globalization/interfaces/panel/II18nPanel.d.ts +2 -0
  74. package/dist/cjs/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
  75. package/dist/cjs/globalization/interfaces/panel/II18nPanelTooltips.d.ts +3 -0
  76. package/dist/cjs/globalization/interfaces/panel/index.d.ts +1 -0
  77. package/dist/cjs/globalization/interfaces/panel/index.js +1 -0
  78. package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +4 -1
  79. package/dist/cjs/globalization/labels/I18N_DEFAULT.d.ts +1 -1
  80. package/dist/cjs/globalization/labels/I18N_DEFAULT.js +3 -1
  81. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +7 -0
  82. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
  83. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +7 -2
  84. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +18 -0
  85. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD.js +2 -0
  86. package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
  87. package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.d.ts +5 -0
  88. package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.js +78 -0
  89. package/dist/cjs/globalization/labels/export/index.d.ts +1 -0
  90. package/dist/cjs/globalization/labels/export/index.js +17 -0
  91. package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +20 -5
  92. package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +9 -0
  93. package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +4 -1
  94. package/dist/cjs/globalization/service/i18nextBuilder.js +2 -3
  95. package/dist/cjs/index.d.ts +1 -0
  96. package/dist/cjs/index.js +1 -0
  97. package/dist/cjs/interfaces/CustomTokens.interface.d.ts +7 -0
  98. package/dist/cjs/services/helpers/Request.js +5 -2
  99. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.d.ts +6 -0
  100. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.js +10 -0
  101. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.d.ts +6 -0
  102. package/dist/cjs/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.js +10 -0
  103. package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +39 -0
  104. package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.js +22 -0
  105. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +15 -0
  106. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +19 -0
  107. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +15 -0
  108. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +19 -0
  109. package/dist/cjs/themes/constants/CANVAS_CSS_VARIABLES.d.ts +6 -0
  110. package/dist/cjs/themes/constants/CANVAS_CSS_VARIABLES.js +10 -0
  111. package/dist/cjs/themes/constants/COLOR_TYPE.d.ts +4 -0
  112. package/dist/cjs/themes/constants/COLOR_TYPE.js +8 -0
  113. package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +4 -0
  114. package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.js +8 -0
  115. package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +15 -0
  116. package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.js +19 -0
  117. package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +1 -0
  118. package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +4 -0
  119. package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +1 -0
  120. package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.js +4 -0
  121. package/dist/cjs/themes/constants/index.d.ts +10 -0
  122. package/dist/cjs/themes/constants/index.js +26 -0
  123. package/dist/cjs/themes/helpers/getCSSVariablesByDestination.d.ts +45 -0
  124. package/dist/cjs/themes/helpers/getCSSVariablesByDestination.js +15 -0
  125. package/dist/cjs/themes/helpers/index.d.ts +7 -0
  126. package/dist/cjs/themes/helpers/index.js +23 -0
  127. package/dist/cjs/themes/helpers/isDarkColor.d.ts +7 -0
  128. package/dist/cjs/themes/helpers/isDarkColor.js +15 -0
  129. package/dist/cjs/themes/helpers/isHexadecimalColor.d.ts +6 -0
  130. package/dist/cjs/themes/helpers/isHexadecimalColor.js +14 -0
  131. package/dist/cjs/themes/helpers/isRGBAColor.d.ts +6 -0
  132. package/dist/cjs/themes/helpers/isRGBAColor.js +14 -0
  133. package/dist/cjs/themes/helpers/lightOrDark.d.ts +9 -0
  134. package/dist/cjs/themes/helpers/lightOrDark.js +56 -0
  135. package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.d.ts +9 -0
  136. package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.js +43 -0
  137. package/dist/cjs/themes/index.d.ts +3 -0
  138. package/dist/cjs/themes/index.js +19 -0
  139. package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.d.ts +2 -0
  140. package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.js +2 -0
  141. package/dist/cjs/themes/interfaces/IColorType.d.ts +2 -0
  142. package/dist/cjs/themes/interfaces/IColorType.js +2 -0
  143. package/dist/cjs/themes/interfaces/index.d.ts +2 -0
  144. package/dist/cjs/themes/interfaces/index.js +18 -0
  145. package/dist/cjs/tokens/getCleanCustomTokens.d.ts +9 -0
  146. package/dist/cjs/tokens/getCleanCustomTokens.js +22 -0
  147. package/dist/cjs/tokens/getCustomTokenBoxParse.d.ts +2 -2
  148. package/dist/cjs/tokens/getCustomtonTokens.d.ts +3 -3
  149. package/dist/cjs/tokens/getCustomtonTokens.js +7 -4
  150. package/dist/cjs/tokens/getCustomtonTokensWithKeys.js +1 -1
  151. package/dist/cjs/tokens/index.d.ts +1 -0
  152. package/dist/cjs/tokens/index.js +1 -0
  153. package/dist/constants/Charts.Const.d.ts +4 -1
  154. package/dist/constants/Charts.Const.js +3 -0
  155. package/dist/filters/adapters/FDToFlatUI.js +2 -2
  156. package/dist/filters/adapters/FDToUI.js +2 -2
  157. package/dist/filters/adapters/UIToFD.js +2 -2
  158. package/dist/filters/adapters/UIToFlatUI.js +2 -2
  159. package/dist/filters/adapters/UIToOldLogic.js +2 -2
  160. package/dist/filters/adapters/adaptFilterData.js +2 -2
  161. package/dist/filters/adapters/flatUIToFD.js +2 -2
  162. package/dist/filters/adapters/flatUIToOldLogic.js +2 -2
  163. package/dist/filters/adapters/flatUIToUI.js +2 -2
  164. package/dist/filters/helpers/OLD_getAggFilters.js +2 -2
  165. package/dist/filters/helpers/backend/getLogicByScopes.js +2 -2
  166. package/dist/filters/helpers/common/excludeFiltersByAggregateColumn.js +2 -2
  167. package/dist/filters/helpers/common/excludeFiltersByParams.js +2 -2
  168. package/dist/filters/helpers/common/excludeFiltersByScopes.js +2 -2
  169. package/dist/filters/helpers/common/getFiltersByAggregateColumn.js +2 -2
  170. package/dist/filters/helpers/common/getFiltersByParams.js +2 -2
  171. package/dist/filters/helpers/common/getFiltersByScopes.js +2 -2
  172. package/dist/filters/helpers/common/getFiltersByScopesIds.js +2 -2
  173. package/dist/filters/helpers/common/getFiltersByVisibility.js +2 -2
  174. package/dist/filters/helpers/settings/getFilterSettings.js +4 -4
  175. package/dist/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
  176. package/dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
  177. package/dist/filters/helpers/ui/getUIFlatFilterByParams.js +2 -2
  178. package/dist/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
  179. package/dist/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
  180. package/dist/filters/interfaces/builder/IFilterBuilderDisplayEvent.d.ts +4 -0
  181. package/dist/filters/interfaces/builder/IFilterBuilderDisplayEvent.js +1 -0
  182. package/dist/filters/interfaces/builder/index.d.ts +1 -0
  183. package/dist/filters/interfaces/builder/index.js +1 -0
  184. package/dist/filters/services/UChartApi.js +2 -2
  185. package/dist/filters/services/UChartPaginationApi.js +3 -3
  186. package/dist/format/format.js +2 -2
  187. package/dist/general/array/filterNestedTree.js +2 -2
  188. package/dist/general/object/objectCopy.js +8 -7
  189. package/dist/globalization/interfaces/II18nResource.d.ts +2 -0
  190. package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
  191. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
  192. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
  193. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +2 -0
  194. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMenuActions.d.ts +5 -0
  195. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.d.ts +6 -0
  196. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderRadarType.js +1 -0
  197. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +9 -0
  198. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderThreshold.d.ts +2 -0
  199. package/dist/globalization/interfaces/dashboard/II18nDashboard.d.ts +1 -0
  200. package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
  201. package/dist/globalization/interfaces/export/II18nExportingModal.d.ts +67 -0
  202. package/dist/globalization/interfaces/export/II18nExportingModal.js +1 -0
  203. package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +3 -0
  204. package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.js +1 -0
  205. package/dist/globalization/interfaces/export/II18nExportingModalErrorMessages.d.ts +3 -0
  206. package/dist/globalization/interfaces/export/II18nExportingModalErrorMessages.js +1 -0
  207. package/dist/globalization/interfaces/export/II18nExportingModalRecurrence.d.ts +6 -0
  208. package/dist/globalization/interfaces/export/II18nExportingModalRecurrence.js +1 -0
  209. package/dist/globalization/interfaces/export/II18nExportingModalTimeStamp.d.ts +7 -0
  210. package/dist/globalization/interfaces/export/II18nExportingModalTimeStamp.js +1 -0
  211. package/dist/globalization/interfaces/export/index.d.ts +5 -0
  212. package/dist/globalization/interfaces/export/index.js +5 -0
  213. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionHour.d.ts +2 -0
  214. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.d.ts +5 -0
  215. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionMillisecond.js +1 -0
  216. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.d.ts +5 -0
  217. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionText.js +1 -0
  218. package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +4 -0
  219. package/dist/globalization/interfaces/panel/I18nPanelColumnInteractive.d.ts +5 -0
  220. package/dist/globalization/interfaces/panel/I18nPanelColumnInteractive.js +1 -0
  221. package/dist/globalization/interfaces/panel/II18nPanel.d.ts +2 -0
  222. package/dist/globalization/interfaces/panel/II18nPanelErrors.d.ts +1 -0
  223. package/dist/globalization/interfaces/panel/II18nPanelTooltips.d.ts +3 -0
  224. package/dist/globalization/interfaces/panel/index.d.ts +1 -0
  225. package/dist/globalization/interfaces/panel/index.js +1 -0
  226. package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +4 -1
  227. package/dist/globalization/labels/I18N_DEFAULT.d.ts +1 -1
  228. package/dist/globalization/labels/I18N_DEFAULT.js +3 -1
  229. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +7 -0
  230. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
  231. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +7 -2
  232. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +18 -0
  233. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD.js +2 -0
  234. package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
  235. package/dist/globalization/labels/export/I18N_EXPORT_MODAL.d.ts +5 -0
  236. package/dist/globalization/labels/export/I18N_EXPORT_MODAL.js +75 -0
  237. package/dist/globalization/labels/export/index.d.ts +1 -0
  238. package/dist/globalization/labels/export/index.js +1 -0
  239. package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +20 -5
  240. package/dist/globalization/labels/panel/I18N_PANEL.js +9 -0
  241. package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +4 -1
  242. package/dist/globalization/service/i18nextBuilder.js +3 -4
  243. package/dist/index.d.ts +1 -0
  244. package/dist/index.js +1 -0
  245. package/dist/interfaces/CustomTokens.interface.d.ts +7 -0
  246. package/dist/services/helpers/Request.js +5 -2
  247. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.d.ts +6 -0
  248. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK.js +7 -0
  249. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.d.ts +6 -0
  250. package/dist/themes/constants/AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT.js +7 -0
  251. package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +39 -0
  252. package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.js +19 -0
  253. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +15 -0
  254. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +16 -0
  255. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +15 -0
  256. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +16 -0
  257. package/dist/themes/constants/CANVAS_CSS_VARIABLES.d.ts +6 -0
  258. package/dist/themes/constants/CANVAS_CSS_VARIABLES.js +7 -0
  259. package/dist/themes/constants/COLOR_TYPE.d.ts +4 -0
  260. package/dist/themes/constants/COLOR_TYPE.js +5 -0
  261. package/dist/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +4 -0
  262. package/dist/themes/constants/CSS_VARIABLE_DESTINATION.js +5 -0
  263. package/dist/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +15 -0
  264. package/dist/themes/constants/GLOBAL_CSS_VARIABLES.js +16 -0
  265. package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +1 -0
  266. package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +1 -0
  267. package/dist/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +1 -0
  268. package/dist/themes/constants/RGBA_REGULAR_EXPRESION.js +1 -0
  269. package/dist/themes/constants/index.d.ts +10 -0
  270. package/dist/themes/constants/index.js +10 -0
  271. package/dist/themes/helpers/getCSSVariablesByDestination.d.ts +45 -0
  272. package/dist/themes/helpers/getCSSVariablesByDestination.js +11 -0
  273. package/dist/themes/helpers/index.d.ts +7 -0
  274. package/dist/themes/helpers/index.js +7 -0
  275. package/dist/themes/helpers/isDarkColor.d.ts +7 -0
  276. package/dist/themes/helpers/isDarkColor.js +11 -0
  277. package/dist/themes/helpers/isHexadecimalColor.d.ts +6 -0
  278. package/dist/themes/helpers/isHexadecimalColor.js +10 -0
  279. package/dist/themes/helpers/isRGBAColor.d.ts +6 -0
  280. package/dist/themes/helpers/isRGBAColor.js +10 -0
  281. package/dist/themes/helpers/lightOrDark.d.ts +9 -0
  282. package/dist/themes/helpers/lightOrDark.js +52 -0
  283. package/dist/themes/helpers/setAutomaticCSSVariablesForDark.d.ts +9 -0
  284. package/dist/themes/helpers/setAutomaticCSSVariablesForDark.js +39 -0
  285. package/dist/themes/index.d.ts +3 -0
  286. package/dist/themes/index.js +3 -0
  287. package/dist/themes/interfaces/IColorCSSVariableDestination.d.ts +2 -0
  288. package/dist/themes/interfaces/IColorCSSVariableDestination.js +1 -0
  289. package/dist/themes/interfaces/IColorType.d.ts +2 -0
  290. package/dist/themes/interfaces/IColorType.js +1 -0
  291. package/dist/themes/interfaces/index.d.ts +2 -0
  292. package/dist/themes/interfaces/index.js +2 -0
  293. package/dist/tokens/getCleanCustomTokens.d.ts +9 -0
  294. package/dist/tokens/getCleanCustomTokens.js +18 -0
  295. package/dist/tokens/getCustomTokenBoxParse.d.ts +2 -2
  296. package/dist/tokens/getCustomtonTokens.d.ts +3 -3
  297. package/dist/tokens/getCustomtonTokens.js +8 -5
  298. package/dist/tokens/getCustomtonTokensWithKeys.js +1 -1
  299. package/dist/tokens/index.d.ts +1 -0
  300. package/dist/tokens/index.js +1 -0
  301. package/package.json +1 -1
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import i18next from "i18next";
11
- import { _get } from "../../general";
11
+ import { isEmpty } from "../../general";
12
12
  import { mergeDeep } from "../../general/object/mergeDeep";
13
13
  export class I18nServiceBuilder {
14
14
  static buildI18n(i18nResource, i18nDefault) {
@@ -16,9 +16,8 @@ export class I18nServiceBuilder {
16
16
  }
17
17
  static _initI18n(i18nResource = {}, i18nDefault = {}) {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
- if (!i18next.isInitialized ||
20
- _get(i18next, "store.data.en.translation.common.aggregates") !==
21
- _get(i18nResource, "common.aggregates")) {
19
+ //Temporarily we meed to review this code
20
+ if (!i18next.isInitialized || !isEmpty(i18nResource)) {
22
21
  yield this.getI18nInstance(i18nResource, i18nDefault, i18next);
23
22
  }
24
23
  return new I18nServiceConcrete(i18next);
package/dist/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from "./services/index";
14
14
  export * from "./typescript/index";
15
15
  export * from "./tokens/index";
16
16
  export * from "./column_format/index";
17
+ export * from "./themes";
package/dist/index.js CHANGED
@@ -14,3 +14,4 @@ export * from "./services/index";
14
14
  export * from "./typescript/index";
15
15
  export * from "./tokens/index";
16
16
  export * from "./column_format/index";
17
+ export * from "./themes";
@@ -9,3 +9,10 @@ export interface ICustomTokensSimple {
9
9
  export interface ICustomTokensComplex {
10
10
  [key: string]: CustomTokens[];
11
11
  }
12
+ export interface ICustomTokensBoxDetail {
13
+ alias: string;
14
+ label: string;
15
+ }
16
+ export interface ICustomTokensBox {
17
+ [key: string]: ICustomTokensBoxDetail[];
18
+ }
@@ -107,9 +107,12 @@ export class Request {
107
107
  static resolveRequest(reqData) {
108
108
  const url = this.makeUrl(reqData.config, reqData.url, reqData.params);
109
109
  const config = this.requestConfig(reqData);
110
- return fetch(url, config)
110
+ const controller = new AbortController();
111
+ const { signal } = controller;
112
+ return fetch(url, Object.assign(Object.assign({}, config), { signal }))
111
113
  .then((res) => this.checkStatus(res))
112
- .then((res) => res.json());
114
+ .then((res) => res.json())
115
+ .finally(() => signal.aborted && controller.abort());
113
116
  }
114
117
  static get(config, url = "", params) {
115
118
  return this.resolveRequest({ config, url, type: "GET", params });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Collection of CSS Variables for Dark Theme and its assigned values. Canvas porpuses
3
+ */
4
+ export declare const AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK: {
5
+ "--qv-canvas-border-color": string;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { CANVAS_CSS_VARIABLES } from "./CANVAS_CSS_VARIABLES";
2
+ /**
3
+ * Collection of CSS Variables for Dark Theme and its assigned values. Canvas porpuses
4
+ */
5
+ export const AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK = {
6
+ [CANVAS_CSS_VARIABLES.BORDER]: "#FFFFFF20",
7
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Collection of CSS Variables for Light Theme and its assigned values. Canvas porpuses
3
+ */
4
+ export declare const AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT: {
5
+ "--qv-canvas-border-color": string;
6
+ };
@@ -0,0 +1,7 @@
1
+ import { CANVAS_CSS_VARIABLES } from "./CANVAS_CSS_VARIABLES";
2
+ /**
3
+ * Collection of CSS Variables for Light Theme and its assigned values. Canvas porpuses
4
+ */
5
+ export const AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT = {
6
+ [CANVAS_CSS_VARIABLES.BORDER]: "#00000010",
7
+ };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Collection of CSS Variables for the theme and its assigned values.
3
+ */
4
+ export declare const AUTOMATIC_CANVAS_CSS_VARIABLES: {
5
+ GLOBAL: {
6
+ DARK: {
7
+ "--qv-global-header-background-color": string;
8
+ "--qv-global-opacity-black-color": string;
9
+ "--qv-global-border-color": string;
10
+ "--qv-global-divider-color": string;
11
+ "--qv-global-hover-color": string;
12
+ "--qv-global-placeholder-color": string;
13
+ "--qv-pills-background-color": string;
14
+ "--qv-global-text-color": string;
15
+ "--qv-global-text-secondary-color": string;
16
+ "--qv-global-text-tertiary-color": string;
17
+ };
18
+ LIGHT: {
19
+ "--qv-global-header-background-color": string;
20
+ "--qv-global-opacity-black-color": string;
21
+ "--qv-global-border-color": string;
22
+ "--qv-global-divider-color": string;
23
+ "--qv-global-hover-color": string;
24
+ "--qv-global-placeholder-color": string;
25
+ "--qv-pills-background-color": string;
26
+ "--qv-global-text-color": any;
27
+ "--qv-global-text-secondary-color": string;
28
+ "--qv-global-text-tertiary-color": string;
29
+ };
30
+ };
31
+ CANVAS: {
32
+ DARK: {
33
+ "--qv-canvas-border-color": string;
34
+ };
35
+ LIGHT: {
36
+ "--qv-canvas-border-color": string;
37
+ };
38
+ };
39
+ };
@@ -0,0 +1,19 @@
1
+ import { AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK } from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK";
2
+ import { AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT } from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT";
3
+ import { AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK } from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK";
4
+ import { AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT } from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT";
5
+ import { COLOR_TYPE } from "./COLOR_TYPE";
6
+ import { CSS_VARIABLE_DESTINATION } from "./CSS_VARIABLE_DESTINATION";
7
+ /**
8
+ * Collection of CSS Variables for the theme and its assigned values.
9
+ */
10
+ export const AUTOMATIC_CANVAS_CSS_VARIABLES = {
11
+ [CSS_VARIABLE_DESTINATION.GLOBAL]: {
12
+ [COLOR_TYPE.DARK]: AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK,
13
+ [COLOR_TYPE.LIGHT]: AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT,
14
+ },
15
+ [CSS_VARIABLE_DESTINATION.CANVAS]: {
16
+ [COLOR_TYPE.DARK]: AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK,
17
+ [COLOR_TYPE.LIGHT]: AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT,
18
+ },
19
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Collection of CSS Variables for Dark Theme and its assigned values.
3
+ */
4
+ export declare const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK: {
5
+ "--qv-global-header-background-color": string;
6
+ "--qv-global-opacity-black-color": string;
7
+ "--qv-global-border-color": string;
8
+ "--qv-global-divider-color": string;
9
+ "--qv-global-hover-color": string;
10
+ "--qv-global-placeholder-color": string;
11
+ "--qv-pills-background-color": string;
12
+ "--qv-global-text-color": string;
13
+ "--qv-global-text-secondary-color": string;
14
+ "--qv-global-text-tertiary-color": string;
15
+ };
@@ -0,0 +1,16 @@
1
+ import { GLOBAL_CSS_VARIABLES } from "./GLOBAL_CSS_VARIABLES";
2
+ /**
3
+ * Collection of CSS Variables for Dark Theme and its assigned values.
4
+ */
5
+ export const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK = {
6
+ [GLOBAL_CSS_VARIABLES.HEADER_BACKGROUND_COLOR]: "#FFFFFF20",
7
+ [GLOBAL_CSS_VARIABLES.BACKGROUND_OPACITY_BLACK_COLOR]: "#00000010",
8
+ [GLOBAL_CSS_VARIABLES.BORDER_COLOR]: "#FFFFFF20",
9
+ [GLOBAL_CSS_VARIABLES.DIVIDER_COLOR]: "#FFFFFF20",
10
+ [GLOBAL_CSS_VARIABLES.HOVER_COLOR]: "#FFFFFF10",
11
+ [GLOBAL_CSS_VARIABLES.PLACEHOLDER_COLOR]: "#FFFFFF90",
12
+ [GLOBAL_CSS_VARIABLES.PILLS_BACKGROUND_COLOR]: "#00000020",
13
+ [GLOBAL_CSS_VARIABLES.TEXT_COLOR]: "#FFFFFF",
14
+ [GLOBAL_CSS_VARIABLES.TEXT_SECONDARY_COLOR]: "#FFFFFF90",
15
+ [GLOBAL_CSS_VARIABLES.TEXT_TERTIARY_COLOR]: "#FFFFFF80",
16
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Collection of CSS Variables for Light Themes and its assigned values.
3
+ */
4
+ export declare const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT: {
5
+ "--qv-global-header-background-color": string;
6
+ "--qv-global-opacity-black-color": string;
7
+ "--qv-global-border-color": string;
8
+ "--qv-global-divider-color": string;
9
+ "--qv-global-hover-color": string;
10
+ "--qv-global-placeholder-color": string;
11
+ "--qv-pills-background-color": string;
12
+ "--qv-global-text-color": any;
13
+ "--qv-global-text-secondary-color": string;
14
+ "--qv-global-text-tertiary-color": string;
15
+ };
@@ -0,0 +1,16 @@
1
+ import { GLOBAL_CSS_VARIABLES } from "./GLOBAL_CSS_VARIABLES";
2
+ /**
3
+ * Collection of CSS Variables for Light Themes and its assigned values.
4
+ */
5
+ export const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT = {
6
+ [GLOBAL_CSS_VARIABLES.HEADER_BACKGROUND_COLOR]: "#00000009",
7
+ [GLOBAL_CSS_VARIABLES.BACKGROUND_OPACITY_BLACK_COLOR]: "#FFFFFF10",
8
+ [GLOBAL_CSS_VARIABLES.BORDER_COLOR]: "#00000020",
9
+ [GLOBAL_CSS_VARIABLES.DIVIDER_COLOR]: "#00000020",
10
+ [GLOBAL_CSS_VARIABLES.HOVER_COLOR]: "#00000010",
11
+ [GLOBAL_CSS_VARIABLES.PLACEHOLDER_COLOR]: "#00000070",
12
+ [GLOBAL_CSS_VARIABLES.PILLS_BACKGROUND_COLOR]: "#FFFFFF40",
13
+ [GLOBAL_CSS_VARIABLES.TEXT_COLOR]: undefined,
14
+ [GLOBAL_CSS_VARIABLES.TEXT_SECONDARY_COLOR]: "#00000080",
15
+ [GLOBAL_CSS_VARIABLES.TEXT_TERTIARY_COLOR]: "#00000070",
16
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Collection of CSS Variables to apply for Dark Theme
3
+ */
4
+ export declare enum CANVAS_CSS_VARIABLES {
5
+ BORDER = "--qv-canvas-border-color"
6
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Collection of CSS Variables to apply for Dark Theme
3
+ */
4
+ export var CANVAS_CSS_VARIABLES;
5
+ (function (CANVAS_CSS_VARIABLES) {
6
+ CANVAS_CSS_VARIABLES["BORDER"] = "--qv-canvas-border-color";
7
+ })(CANVAS_CSS_VARIABLES || (CANVAS_CSS_VARIABLES = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum COLOR_TYPE {
2
+ DARK = "DARK",
3
+ LIGHT = "LIGHT"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var COLOR_TYPE;
2
+ (function (COLOR_TYPE) {
3
+ COLOR_TYPE["DARK"] = "DARK";
4
+ COLOR_TYPE["LIGHT"] = "LIGHT";
5
+ })(COLOR_TYPE || (COLOR_TYPE = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum CSS_VARIABLE_DESTINATION {
2
+ CANVAS = "CANVAS",
3
+ GLOBAL = "GLOBAL"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var CSS_VARIABLE_DESTINATION;
2
+ (function (CSS_VARIABLE_DESTINATION) {
3
+ CSS_VARIABLE_DESTINATION["CANVAS"] = "CANVAS";
4
+ CSS_VARIABLE_DESTINATION["GLOBAL"] = "GLOBAL";
5
+ })(CSS_VARIABLE_DESTINATION || (CSS_VARIABLE_DESTINATION = {}));
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Collection of CSS Variables to apply for Dark Theme
3
+ */
4
+ export declare enum GLOBAL_CSS_VARIABLES {
5
+ BACKGROUND_OPACITY_BLACK_COLOR = "--qv-global-opacity-black-color",
6
+ HEADER_BACKGROUND_COLOR = "--qv-global-header-background-color",
7
+ BORDER_COLOR = "--qv-global-border-color",
8
+ DIVIDER_COLOR = "--qv-global-divider-color",
9
+ HOVER_COLOR = "--qv-global-hover-color",
10
+ PLACEHOLDER_COLOR = "--qv-global-placeholder-color",
11
+ PILLS_BACKGROUND_COLOR = "--qv-pills-background-color",
12
+ TEXT_COLOR = "--qv-global-text-color",
13
+ TEXT_SECONDARY_COLOR = "--qv-global-text-secondary-color",
14
+ TEXT_TERTIARY_COLOR = "--qv-global-text-tertiary-color"
15
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Collection of CSS Variables to apply for Dark Theme
3
+ */
4
+ export var GLOBAL_CSS_VARIABLES;
5
+ (function (GLOBAL_CSS_VARIABLES) {
6
+ GLOBAL_CSS_VARIABLES["BACKGROUND_OPACITY_BLACK_COLOR"] = "--qv-global-opacity-black-color";
7
+ GLOBAL_CSS_VARIABLES["HEADER_BACKGROUND_COLOR"] = "--qv-global-header-background-color";
8
+ GLOBAL_CSS_VARIABLES["BORDER_COLOR"] = "--qv-global-border-color";
9
+ GLOBAL_CSS_VARIABLES["DIVIDER_COLOR"] = "--qv-global-divider-color";
10
+ GLOBAL_CSS_VARIABLES["HOVER_COLOR"] = "--qv-global-hover-color";
11
+ GLOBAL_CSS_VARIABLES["PLACEHOLDER_COLOR"] = "--qv-global-placeholder-color";
12
+ GLOBAL_CSS_VARIABLES["PILLS_BACKGROUND_COLOR"] = "--qv-pills-background-color";
13
+ GLOBAL_CSS_VARIABLES["TEXT_COLOR"] = "--qv-global-text-color";
14
+ GLOBAL_CSS_VARIABLES["TEXT_SECONDARY_COLOR"] = "--qv-global-text-secondary-color";
15
+ GLOBAL_CSS_VARIABLES["TEXT_TERTIARY_COLOR"] = "--qv-global-text-tertiary-color";
16
+ })(GLOBAL_CSS_VARIABLES || (GLOBAL_CSS_VARIABLES = {}));
@@ -0,0 +1 @@
1
+ export declare const HEXADECIMAL_REGULAR_EXPRESSION: RegExp;
@@ -0,0 +1 @@
1
+ export const HEXADECIMAL_REGULAR_EXPRESSION = /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
@@ -0,0 +1 @@
1
+ export declare const RGBA_REGULAR_EXPRESSION: RegExp;
@@ -0,0 +1 @@
1
+ export const RGBA_REGULAR_EXPRESSION = /^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/;
@@ -0,0 +1,10 @@
1
+ export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK";
2
+ export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT";
3
+ export * from "./AUTOMATIC_CSS_VARIABLES";
4
+ export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK";
5
+ export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT";
6
+ export * from "./COLOR_TYPE";
7
+ export * from "./CSS_VARIABLE_DESTINATION";
8
+ export * from "./GLOBAL_CSS_VARIABLES";
9
+ export * from "./HEXADECIMAL_REGULAR_EXPRESSION";
10
+ export * from "./RGBA_REGULAR_EXPRESION";
@@ -0,0 +1,10 @@
1
+ export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_DARK";
2
+ export * from "./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT";
3
+ export * from "./AUTOMATIC_CSS_VARIABLES";
4
+ export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK";
5
+ export * from "./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT";
6
+ export * from "./COLOR_TYPE";
7
+ export * from "./CSS_VARIABLE_DESTINATION";
8
+ export * from "./GLOBAL_CSS_VARIABLES";
9
+ export * from "./HEXADECIMAL_REGULAR_EXPRESSION";
10
+ export * from "./RGBA_REGULAR_EXPRESION";
@@ -0,0 +1,45 @@
1
+ import { IColorCSSVariableDestination } from "../interfaces/IColorCSSVariableDestination";
2
+ /**
3
+ * Gets CSS variables depending on the destination of them.
4
+ * - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
5
+ * @param destination the string of the destination.
6
+ * @returns the CSS variables and their values.
7
+ */
8
+ export declare function getCSSVariablesByDestination(destination?: IColorCSSVariableDestination): {
9
+ DARK: {
10
+ "--qv-global-header-background-color": string; /**
11
+ * Gets CSS variables depending on the destination of them.
12
+ * - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
13
+ * @param destination the string of the destination.
14
+ * @returns the CSS variables and their values.
15
+ */
16
+ "--qv-global-opacity-black-color": string;
17
+ "--qv-global-border-color": string;
18
+ "--qv-global-divider-color": string;
19
+ "--qv-global-hover-color": string;
20
+ "--qv-global-placeholder-color": string;
21
+ "--qv-pills-background-color": string;
22
+ "--qv-global-text-color": string;
23
+ "--qv-global-text-secondary-color": string;
24
+ "--qv-global-text-tertiary-color": string;
25
+ };
26
+ LIGHT: {
27
+ "--qv-global-header-background-color": string;
28
+ "--qv-global-opacity-black-color": string;
29
+ "--qv-global-border-color": string;
30
+ "--qv-global-divider-color": string;
31
+ "--qv-global-hover-color": string;
32
+ "--qv-global-placeholder-color": string;
33
+ "--qv-pills-background-color": string;
34
+ "--qv-global-text-color": any;
35
+ "--qv-global-text-secondary-color": string;
36
+ "--qv-global-text-tertiary-color": string;
37
+ };
38
+ } | {
39
+ DARK: {
40
+ "--qv-canvas-border-color": string;
41
+ };
42
+ LIGHT: {
43
+ "--qv-canvas-border-color": string;
44
+ };
45
+ };
@@ -0,0 +1,11 @@
1
+ import { AUTOMATIC_CANVAS_CSS_VARIABLES } from "../constants/AUTOMATIC_CSS_VARIABLES";
2
+ import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
3
+ /**
4
+ * Gets CSS variables depending on the destination of them.
5
+ * - Destination is the place where the CSS variables are going to be applied. With this, the right CSS variables are searched and set.
6
+ * @param destination the string of the destination.
7
+ * @returns the CSS variables and their values.
8
+ */
9
+ export function getCSSVariablesByDestination(destination = CSS_VARIABLE_DESTINATION.GLOBAL) {
10
+ return AUTOMATIC_CANVAS_CSS_VARIABLES[destination];
11
+ }
@@ -0,0 +1,7 @@
1
+ export * from "./getCSSVariablesByDestination";
2
+ export * from "./lightOrDark";
3
+ export * from "./isDarkColor";
4
+ export * from "./isHexadecimalColor";
5
+ export * from "./isRGBAColor";
6
+ export * from "./lightOrDark";
7
+ export * from "./setAutomaticCSSVariablesForDark";
@@ -0,0 +1,7 @@
1
+ export * from "./getCSSVariablesByDestination";
2
+ export * from "./lightOrDark";
3
+ export * from "./isDarkColor";
4
+ export * from "./isHexadecimalColor";
5
+ export * from "./isRGBAColor";
6
+ export * from "./lightOrDark";
7
+ 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,10 @@
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 !isEmpty(color === null || color === void 0 ? void 0 : color.match(HEXADECIMAL_REGULAR_EXPRESSION));
10
+ }
@@ -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,10 @@
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 !isEmpty(color === null || color === void 0 ? void 0 : color.match(RGBA_REGULAR_EXPRESSION));
10
+ }
@@ -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,52 @@
1
+ import { isEmpty } from "../../general/mix/isEmpty";
2
+ import { COLOR_TYPE } from "../constants/COLOR_TYPE";
3
+ import { RGBA_REGULAR_EXPRESSION } from "../constants/RGBA_REGULAR_EXPRESION";
4
+ import { isHexadecimalColor } from "./isHexadecimalColor";
5
+ import { isRGBAColor } from "./isRGBAColor";
6
+ /**
7
+ * Validates if the given color is light or dark
8
+ * The module extracts the rgba channels and calculate the brightness or darkness by a threshold
9
+ * - If there is not color provided, the returning will be Light
10
+ * @param color the string of the color.
11
+ * @returns the color type (Dark or Light)
12
+ */
13
+ export function lightOrDark(color, brightnessThreshold = 127.5, opacityThreshold = 0.5) {
14
+ if (isEmpty(color))
15
+ return COLOR_TYPE.LIGHT;
16
+ const rgbaColor = isRGBAColor(color);
17
+ const hexadecimalColor = isHexadecimalColor(color);
18
+ if (!rgbaColor && !hexadecimalColor)
19
+ return;
20
+ let r, g, b, a;
21
+ if (rgbaColor) {
22
+ const colors = color.match(RGBA_REGULAR_EXPRESSION);
23
+ r = Number(colors[1]);
24
+ g = Number(colors[2]);
25
+ b = Number(colors[3]);
26
+ a = rgbaOpacity(color);
27
+ }
28
+ if (hexadecimalColor) {
29
+ const colorCode = +`0x${color
30
+ .slice(1)
31
+ .replace(color.length < 5 && /./g, "$&$&")}`;
32
+ r = colorCode >> 16;
33
+ g = (colorCode >> 8) & 255;
34
+ b = colorCode & 255;
35
+ a = hexadecimalOpacity(color);
36
+ }
37
+ // HSP equation from http://alienryderflex.com/hsp.html
38
+ const hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));
39
+ if (hsp > brightnessThreshold || a < opacityThreshold) {
40
+ return COLOR_TYPE.LIGHT;
41
+ }
42
+ return COLOR_TYPE.DARK;
43
+ }
44
+ function hexadecimalOpacity(hexadecimal) {
45
+ const opacityHexa = hexadecimal.slice(7) || "FF";
46
+ return parseInt(opacityHexa, 16) / 255;
47
+ }
48
+ function rgbaOpacity(rgba) {
49
+ var _a;
50
+ const colors = rgba.match(RGBA_REGULAR_EXPRESSION);
51
+ return (_a = Number(colors[4])) !== null && _a !== void 0 ? _a : 1;
52
+ }
@@ -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) || isEmpty(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,2 @@
1
+ import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
2
+ export type IColorCSSVariableDestination = CSS_VARIABLE_DESTINATION;
@@ -0,0 +1,2 @@
1
+ import { COLOR_TYPE } from "../constants/COLOR_TYPE";
2
+ export type IColorType = COLOR_TYPE;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./IColorCSSVariableDestination";
2
+ export * from "./IColorType";
@@ -0,0 +1,2 @@
1
+ export * from "./IColorCSSVariableDestination";
2
+ export * from "./IColorType";