@qrvey/utils 1.13.0-6.performance.1 → 1.112.2

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 (196) hide show
  1. package/README.md +2173 -2649
  2. package/dist/charts/adapters/endpointData.js +1 -1
  3. package/dist/charts/adapters/endpointDataGet.js +1 -1
  4. package/dist/cjs/charts/adapters/endpointData.js +1 -1
  5. package/dist/cjs/charts/adapters/endpointDataGet.js +1 -1
  6. package/dist/cjs/dates/adapters/dateToMonthYear.js +1 -3
  7. package/dist/cjs/dates/constants/index.d.ts +0 -1
  8. package/dist/cjs/dates/constants/index.js +0 -1
  9. package/dist/cjs/dates/relative/RelativeStatementAdapter.d.ts +1 -1
  10. package/dist/cjs/dates/relative/RelativeStatementAdapter.js +1 -2
  11. package/dist/cjs/dates/relative/relative.d.ts +4 -3
  12. package/dist/cjs/dates/relative/relative.js +9 -5
  13. package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +8 -8
  14. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
  15. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +3 -3
  16. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
  17. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +1 -1
  18. package/dist/cjs/filters/services/Filters.api.js +7 -4
  19. package/dist/cjs/filters/services/UChartApi.d.ts +1 -1
  20. package/dist/cjs/filters/services/UChartApi.js +1 -2
  21. package/dist/cjs/filters/services/UChartPaginationApi.d.ts +1 -1
  22. package/dist/cjs/filters/services/UChartPaginationApi.js +2 -3
  23. package/dist/cjs/general/object/objectCopy.d.ts +5 -4
  24. package/dist/cjs/general/object/objectCopy.js +26 -16
  25. package/dist/cjs/services/api/Charts.api.d.ts +0 -2
  26. package/dist/cjs/services/api/Charts.api.js +0 -22
  27. package/dist/cjs/services/api/getAllQrveys.api.d.ts +1 -1
  28. package/dist/cjs/services/api/getModel.api.d.ts +1 -1
  29. package/dist/cjs/services/api/getModel.api.js +2 -1
  30. package/dist/cjs/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
  31. package/dist/cjs/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
  32. package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +0 -2
  33. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +0 -1
  34. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +0 -1
  35. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +0 -1
  36. package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +0 -1
  37. package/dist/cjs/themes/constants/COLOR_TYPE.d.ts +0 -3
  38. package/dist/cjs/themes/constants/COLOR_TYPE.js +0 -3
  39. package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +0 -3
  40. package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.js +0 -3
  41. package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +1 -2
  42. package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.js +0 -1
  43. package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +0 -3
  44. package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +0 -3
  45. package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +0 -3
  46. package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.js +0 -3
  47. package/dist/cjs/themes/constants/index.d.ts +0 -4
  48. package/dist/cjs/themes/constants/index.js +0 -4
  49. package/dist/cjs/themes/helpers/getCSSVariablesByDestination.d.ts +6 -3
  50. package/dist/cjs/themes/helpers/getCSSVariablesByDestination.js +0 -3
  51. package/dist/cjs/themes/helpers/index.d.ts +1 -6
  52. package/dist/cjs/themes/helpers/index.js +1 -6
  53. package/dist/cjs/themes/helpers/isHexadecimalColor.js +1 -2
  54. package/dist/cjs/themes/helpers/isRGBAColor.js +1 -2
  55. package/dist/cjs/themes/helpers/lightOrDark.js +30 -14
  56. package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.js +1 -1
  57. package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.d.ts +0 -3
  58. package/dist/cjs/themes/interfaces/IColorType.d.ts +0 -3
  59. package/dist/cjs/themes/interfaces/index.d.ts +0 -1
  60. package/dist/cjs/themes/interfaces/index.js +0 -1
  61. package/dist/dates/adapters/dateToMonthYear.js +1 -3
  62. package/dist/dates/constants/index.d.ts +0 -1
  63. package/dist/dates/constants/index.js +0 -1
  64. package/dist/dates/relative/RelativeStatementAdapter.d.ts +1 -1
  65. package/dist/dates/relative/RelativeStatementAdapter.js +1 -1
  66. package/dist/dates/relative/relative.d.ts +4 -3
  67. package/dist/dates/relative/relative.js +5 -4
  68. package/dist/filters/constants/common/FILTER_SCOPE.d.ts +8 -8
  69. package/dist/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
  70. package/dist/filters/helpers/common/getFiltersByScopesIds.js +3 -3
  71. package/dist/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
  72. package/dist/filters/helpers/common/getFiltersByVisibility.js +1 -1
  73. package/dist/filters/services/Filters.api.js +2 -2
  74. package/dist/filters/services/UChartApi.d.ts +1 -1
  75. package/dist/filters/services/UChartApi.js +2 -1
  76. package/dist/filters/services/UChartPaginationApi.d.ts +1 -1
  77. package/dist/filters/services/UChartPaginationApi.js +3 -2
  78. package/dist/general/object/objectCopy.d.ts +5 -4
  79. package/dist/general/object/objectCopy.js +26 -16
  80. package/dist/services/api/Charts.api.d.ts +0 -2
  81. package/dist/services/api/Charts.api.js +0 -22
  82. package/dist/services/api/getAllQrveys.api.d.ts +1 -1
  83. package/dist/services/api/getModel.api.d.ts +1 -1
  84. package/dist/services/api/getModel.api.js +2 -1
  85. package/dist/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
  86. package/dist/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
  87. package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +0 -2
  88. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +0 -1
  89. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +0 -1
  90. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +0 -1
  91. package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +0 -1
  92. package/dist/themes/constants/COLOR_TYPE.d.ts +0 -3
  93. package/dist/themes/constants/COLOR_TYPE.js +0 -3
  94. package/dist/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +0 -3
  95. package/dist/themes/constants/CSS_VARIABLE_DESTINATION.js +0 -3
  96. package/dist/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +1 -2
  97. package/dist/themes/constants/GLOBAL_CSS_VARIABLES.js +0 -1
  98. package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +0 -3
  99. package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +0 -3
  100. package/dist/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +0 -3
  101. package/dist/themes/constants/RGBA_REGULAR_EXPRESION.js +0 -3
  102. package/dist/themes/constants/index.d.ts +0 -4
  103. package/dist/themes/constants/index.js +0 -4
  104. package/dist/themes/helpers/getCSSVariablesByDestination.d.ts +6 -3
  105. package/dist/themes/helpers/getCSSVariablesByDestination.js +0 -3
  106. package/dist/themes/helpers/index.d.ts +1 -6
  107. package/dist/themes/helpers/index.js +1 -6
  108. package/dist/themes/helpers/isHexadecimalColor.js +1 -2
  109. package/dist/themes/helpers/isRGBAColor.js +1 -2
  110. package/dist/themes/helpers/lightOrDark.js +30 -14
  111. package/dist/themes/helpers/setAutomaticCSSVariablesForDark.js +1 -1
  112. package/dist/themes/interfaces/IColorCSSVariableDestination.d.ts +0 -3
  113. package/dist/themes/interfaces/IColorType.d.ts +0 -3
  114. package/dist/themes/interfaces/index.d.ts +0 -1
  115. package/dist/themes/interfaces/index.js +0 -1
  116. package/package.json +17 -21
  117. package/dist/cache-managers/cache-chart-manager.d.ts +0 -34
  118. package/dist/cache-managers/cache-chart-manager.js +0 -43
  119. package/dist/cache-managers/cache-manager.d.ts +0 -27
  120. package/dist/cache-managers/cache-manager.js +0 -39
  121. package/dist/cache-managers/cache-metric-manager.d.ts +0 -34
  122. package/dist/cache-managers/cache-metric-manager.js +0 -43
  123. package/dist/cache-managers/cache-model-manager.d.ts +0 -29
  124. package/dist/cache-managers/cache-model-manager.js +0 -40
  125. package/dist/cache-managers/cache-permissions-manager.d.ts +0 -26
  126. package/dist/cache-managers/cache-permissions-manager.js +0 -39
  127. package/dist/cjs/cache-managers/cache-chart-manager.d.ts +0 -34
  128. package/dist/cjs/cache-managers/cache-chart-manager.js +0 -50
  129. package/dist/cjs/cache-managers/cache-manager.d.ts +0 -27
  130. package/dist/cjs/cache-managers/cache-manager.js +0 -43
  131. package/dist/cjs/cache-managers/cache-metric-manager.d.ts +0 -34
  132. package/dist/cjs/cache-managers/cache-metric-manager.js +0 -50
  133. package/dist/cjs/cache-managers/cache-model-manager.d.ts +0 -29
  134. package/dist/cjs/cache-managers/cache-model-manager.js +0 -44
  135. package/dist/cjs/cache-managers/cache-permissions-manager.d.ts +0 -26
  136. package/dist/cjs/cache-managers/cache-permissions-manager.js +0 -43
  137. package/dist/cjs/dates/constants/INTL_DATE_FORMATS.d.ts +0 -1
  138. package/dist/cjs/dates/constants/INTL_DATE_FORMATS.js +0 -8
  139. package/dist/cjs/interfaces/AdminPermissions.interface.d.ts +0 -53
  140. package/dist/cjs/interfaces/AdminPermissions.interface.js +0 -7
  141. package/dist/cjs/services/api/adminPermissions.api.d.ts +0 -2
  142. package/dist/cjs/services/api/adminPermissions.api.js +0 -20
  143. package/dist/cjs/services/api/metrics.api.d.ts +0 -4
  144. package/dist/cjs/services/api/metrics.api.js +0 -19
  145. package/dist/cjs/services/constants/METRIC_ENDPOINT.d.ts +0 -2
  146. package/dist/cjs/services/constants/METRIC_ENDPOINT.js +0 -7
  147. package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.d.ts +0 -5
  148. package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.js +0 -12
  149. package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.d.ts +0 -5
  150. package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.js +0 -12
  151. package/dist/cjs/themes/constants/COLOR_NAME.d.ts +0 -154
  152. package/dist/cjs/themes/constants/COLOR_NAME.js +0 -157
  153. package/dist/cjs/themes/helpers/calculateHSP.d.ts +0 -8
  154. package/dist/cjs/themes/helpers/calculateHSP.js +0 -20
  155. package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.d.ts +0 -8
  156. package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.js +0 -26
  157. package/dist/cjs/themes/helpers/getChannelsByNameColor.d.ts +0 -8
  158. package/dist/cjs/themes/helpers/getChannelsByNameColor.js +0 -26
  159. package/dist/cjs/themes/helpers/getChannelsByRgbaColor.d.ts +0 -8
  160. package/dist/cjs/themes/helpers/getChannelsByRgbaColor.js +0 -25
  161. package/dist/cjs/themes/helpers/getHexadecimalOpacity.d.ts +0 -7
  162. package/dist/cjs/themes/helpers/getHexadecimalOpacity.js +0 -19
  163. package/dist/cjs/themes/helpers/getRgbaOpacity.d.ts +0 -7
  164. package/dist/cjs/themes/helpers/getRgbaOpacity.js +0 -21
  165. package/dist/cjs/themes/interfaces/IColorChannel.d.ts +0 -9
  166. package/dist/cjs/themes/interfaces/IColorChannel.js +0 -2
  167. package/dist/dates/constants/INTL_DATE_FORMATS.d.ts +0 -1
  168. package/dist/dates/constants/INTL_DATE_FORMATS.js +0 -5
  169. package/dist/interfaces/AdminPermissions.interface.d.ts +0 -53
  170. package/dist/interfaces/AdminPermissions.interface.js +0 -4
  171. package/dist/services/api/adminPermissions.api.d.ts +0 -2
  172. package/dist/services/api/adminPermissions.api.js +0 -16
  173. package/dist/services/api/metrics.api.d.ts +0 -4
  174. package/dist/services/api/metrics.api.js +0 -16
  175. package/dist/services/constants/METRIC_ENDPOINT.d.ts +0 -2
  176. package/dist/services/constants/METRIC_ENDPOINT.js +0 -4
  177. package/dist/themes/constants/CHANNEL_BLACK_COLOR.d.ts +0 -5
  178. package/dist/themes/constants/CHANNEL_BLACK_COLOR.js +0 -9
  179. package/dist/themes/constants/CHANNEL_WHITE_COLOR.d.ts +0 -5
  180. package/dist/themes/constants/CHANNEL_WHITE_COLOR.js +0 -9
  181. package/dist/themes/constants/COLOR_NAME.d.ts +0 -154
  182. package/dist/themes/constants/COLOR_NAME.js +0 -154
  183. package/dist/themes/helpers/calculateHSP.d.ts +0 -8
  184. package/dist/themes/helpers/calculateHSP.js +0 -16
  185. package/dist/themes/helpers/getChannelsByHexadecimalColor.d.ts +0 -8
  186. package/dist/themes/helpers/getChannelsByHexadecimalColor.js +0 -22
  187. package/dist/themes/helpers/getChannelsByNameColor.d.ts +0 -8
  188. package/dist/themes/helpers/getChannelsByNameColor.js +0 -22
  189. package/dist/themes/helpers/getChannelsByRgbaColor.d.ts +0 -8
  190. package/dist/themes/helpers/getChannelsByRgbaColor.js +0 -21
  191. package/dist/themes/helpers/getHexadecimalOpacity.d.ts +0 -7
  192. package/dist/themes/helpers/getHexadecimalOpacity.js +0 -15
  193. package/dist/themes/helpers/getRgbaOpacity.d.ts +0 -7
  194. package/dist/themes/helpers/getRgbaOpacity.js +0 -17
  195. package/dist/themes/interfaces/IColorChannel.d.ts +0 -9
  196. package/dist/themes/interfaces/IColorChannel.js +0 -1
@@ -19,10 +19,6 @@ __exportStar(require("./AUTOMATIC_CANVAS_CSS_VARIABLES_FOR_LIGHT"), exports);
19
19
  __exportStar(require("./AUTOMATIC_CSS_VARIABLES"), exports);
20
20
  __exportStar(require("./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK"), exports);
21
21
  __exportStar(require("./AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT"), exports);
22
- __exportStar(require("./CANVAS_CSS_VARIABLES"), exports);
23
- __exportStar(require("./CHANNEL_BLACK_COLOR"), exports);
24
- __exportStar(require("./CHANNEL_WHITE_COLOR"), exports);
25
- __exportStar(require("./COLOR_NAME"), exports);
26
22
  __exportStar(require("./COLOR_TYPE"), exports);
27
23
  __exportStar(require("./CSS_VARIABLE_DESTINATION"), exports);
28
24
  __exportStar(require("./GLOBAL_CSS_VARIABLES"), exports);
@@ -7,7 +7,12 @@ import { IColorCSSVariableDestination } from "../interfaces/IColorCSSVariableDes
7
7
  */
8
8
  export declare function getCSSVariablesByDestination(destination?: IColorCSSVariableDestination): {
9
9
  DARK: {
10
- "--qv-global-header-background-color": string;
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
+ */
11
16
  "--qv-global-opacity-black-color": string;
12
17
  "--qv-global-border-color": string;
13
18
  "--qv-global-divider-color": string;
@@ -17,7 +22,6 @@ export declare function getCSSVariablesByDestination(destination?: IColorCSSVari
17
22
  "--qv-global-text-color": string;
18
23
  "--qv-global-text-secondary-color": string;
19
24
  "--qv-global-text-tertiary-color": string;
20
- "--qv-global-info-color": string;
21
25
  };
22
26
  LIGHT: {
23
27
  "--qv-global-header-background-color": string;
@@ -30,7 +34,6 @@ export declare function getCSSVariablesByDestination(destination?: IColorCSSVari
30
34
  "--qv-global-text-color": any;
31
35
  "--qv-global-text-secondary-color": string;
32
36
  "--qv-global-text-tertiary-color": string;
33
- "--qv-global-info-color": any;
34
37
  };
35
38
  } | {
36
39
  DARK: {
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCSSVariablesByDestination = void 0;
4
- const isEmpty_1 = require("../../general/mix/isEmpty");
5
4
  const AUTOMATIC_CSS_VARIABLES_1 = require("../constants/AUTOMATIC_CSS_VARIABLES");
6
5
  const CSS_VARIABLE_DESTINATION_1 = require("../constants/CSS_VARIABLE_DESTINATION");
7
6
  /**
@@ -11,8 +10,6 @@ const CSS_VARIABLE_DESTINATION_1 = require("../constants/CSS_VARIABLE_DESTINATIO
11
10
  * @returns the CSS variables and their values.
12
11
  */
13
12
  function getCSSVariablesByDestination(destination = CSS_VARIABLE_DESTINATION_1.CSS_VARIABLE_DESTINATION.GLOBAL) {
14
- if ((0, isEmpty_1.isEmpty)(destination))
15
- return AUTOMATIC_CSS_VARIABLES_1.AUTOMATIC_CANVAS_CSS_VARIABLES[CSS_VARIABLE_DESTINATION_1.CSS_VARIABLE_DESTINATION.GLOBAL];
16
13
  return AUTOMATIC_CSS_VARIABLES_1.AUTOMATIC_CANVAS_CSS_VARIABLES[destination];
17
14
  }
18
15
  exports.getCSSVariablesByDestination = getCSSVariablesByDestination;
@@ -1,10 +1,5 @@
1
- export * from "./calculateHSP";
2
- export * from "./getChannelsByHexadecimalColor";
3
- export * from "./getChannelsByNameColor";
4
- export * from "./getChannelsByRgbaColor";
5
1
  export * from "./getCSSVariablesByDestination";
6
- export * from "./getHexadecimalOpacity";
7
- export * from "./getRgbaOpacity";
2
+ export * from "./lightOrDark";
8
3
  export * from "./isDarkColor";
9
4
  export * from "./isHexadecimalColor";
10
5
  export * from "./isRGBAColor";
@@ -14,13 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./calculateHSP"), exports);
18
- __exportStar(require("./getChannelsByHexadecimalColor"), exports);
19
- __exportStar(require("./getChannelsByNameColor"), exports);
20
- __exportStar(require("./getChannelsByRgbaColor"), exports);
21
17
  __exportStar(require("./getCSSVariablesByDestination"), exports);
22
- __exportStar(require("./getHexadecimalOpacity"), exports);
23
- __exportStar(require("./getRgbaOpacity"), exports);
18
+ __exportStar(require("./lightOrDark"), exports);
24
19
  __exportStar(require("./isDarkColor"), exports);
25
20
  __exportStar(require("./isHexadecimalColor"), exports);
26
21
  __exportStar(require("./isRGBAColor"), exports);
@@ -9,7 +9,6 @@ const HEXADECIMAL_REGULAR_EXPRESSION_1 = require("../constants/HEXADECIMAL_REGUL
9
9
  * @returns true: the color is an hexadecimal type
10
10
  */
11
11
  function isHexadecimalColor(color = "") {
12
- return (typeof color === "string" &&
13
- !(0, isEmpty_1.isEmpty)(color.match(HEXADECIMAL_REGULAR_EXPRESSION_1.HEXADECIMAL_REGULAR_EXPRESSION)));
12
+ return !(0, isEmpty_1.isEmpty)(color === null || color === void 0 ? void 0 : color.match(HEXADECIMAL_REGULAR_EXPRESSION_1.HEXADECIMAL_REGULAR_EXPRESSION));
14
13
  }
15
14
  exports.isHexadecimalColor = isHexadecimalColor;
@@ -9,7 +9,6 @@ const RGBA_REGULAR_EXPRESION_1 = require("../constants/RGBA_REGULAR_EXPRESION");
9
9
  * @returns true: the color is an RGBA type
10
10
  */
11
11
  function isRGBAColor(color = "") {
12
- return (typeof color === "string" &&
13
- !(0, isEmpty_1.isEmpty)(color.toLowerCase().match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION)));
12
+ return !(0, isEmpty_1.isEmpty)(color === null || color === void 0 ? void 0 : color.match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION));
14
13
  }
15
14
  exports.isRGBAColor = isRGBAColor;
@@ -3,10 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lightOrDark = void 0;
4
4
  const isEmpty_1 = require("../../general/mix/isEmpty");
5
5
  const COLOR_TYPE_1 = require("../constants/COLOR_TYPE");
6
- const calculateHSP_1 = require("./calculateHSP");
7
- const getChannelsByHexadecimalColor_1 = require("./getChannelsByHexadecimalColor");
8
- const getChannelsByNameColor_1 = require("./getChannelsByNameColor");
9
- const getChannelsByRgbaColor_1 = require("./getChannelsByRgbaColor");
6
+ const RGBA_REGULAR_EXPRESION_1 = require("../constants/RGBA_REGULAR_EXPRESION");
10
7
  const isHexadecimalColor_1 = require("./isHexadecimalColor");
11
8
  const isRGBAColor_1 = require("./isRGBAColor");
12
9
  /**
@@ -17,24 +14,43 @@ const isRGBAColor_1 = require("./isRGBAColor");
17
14
  * @returns the color type (Dark or Light)
18
15
  */
19
16
  function lightOrDark(color, brightnessThreshold = 127.5, opacityThreshold = 0.5) {
20
- if ((0, isEmpty_1.isEmpty)(color) || typeof color !== "string")
17
+ if ((0, isEmpty_1.isEmpty)(color))
21
18
  return COLOR_TYPE_1.COLOR_TYPE.LIGHT;
22
- let rgbaChannel = { r: 0, g: 0, b: 0, a: 1 };
23
19
  const rgbaColor = (0, isRGBAColor_1.isRGBAColor)(color);
24
20
  const hexadecimalColor = (0, isHexadecimalColor_1.isHexadecimalColor)(color);
21
+ if (!rgbaColor && !hexadecimalColor)
22
+ return;
23
+ let r, g, b, a;
25
24
  if (rgbaColor) {
26
- rgbaChannel = (0, getChannelsByRgbaColor_1.getChannelsByRgbaColor)(color);
25
+ const colors = color.match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION);
26
+ r = Number(colors[1]);
27
+ g = Number(colors[2]);
28
+ b = Number(colors[3]);
29
+ a = rgbaOpacity(color);
27
30
  }
28
- else if (hexadecimalColor) {
29
- rgbaChannel = (0, getChannelsByHexadecimalColor_1.getChannelsByHexadecimalColor)(color);
31
+ if (hexadecimalColor) {
32
+ const colorCode = +`0x${color
33
+ .slice(1)
34
+ .replace(color.length < 5 && /./g, "$&$&")}`;
35
+ r = colorCode >> 16;
36
+ g = (colorCode >> 8) & 255;
37
+ b = colorCode & 255;
38
+ a = hexadecimalOpacity(color);
30
39
  }
31
- else {
32
- rgbaChannel = (0, getChannelsByNameColor_1.getChannelsByNameColor)(color);
33
- }
34
- const hsp = (0, calculateHSP_1.calculateHSP)(rgbaChannel);
35
- if (hsp > brightnessThreshold || rgbaChannel.a < opacityThreshold) {
40
+ // HSP equation from http://alienryderflex.com/hsp.html
41
+ const hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));
42
+ if (hsp > brightnessThreshold || a < opacityThreshold) {
36
43
  return COLOR_TYPE_1.COLOR_TYPE.LIGHT;
37
44
  }
38
45
  return COLOR_TYPE_1.COLOR_TYPE.DARK;
39
46
  }
40
47
  exports.lightOrDark = lightOrDark;
48
+ function hexadecimalOpacity(hexadecimal) {
49
+ const opacityHexa = hexadecimal.slice(7) || "FF";
50
+ return parseInt(opacityHexa, 16) / 255;
51
+ }
52
+ function rgbaOpacity(rgba) {
53
+ var _a;
54
+ const colors = rgba.match(RGBA_REGULAR_EXPRESION_1.RGBA_REGULAR_EXPRESSION);
55
+ return (_a = Number(colors[4])) !== null && _a !== void 0 ? _a : 1;
56
+ }
@@ -11,7 +11,7 @@ const getCSSVariablesByDestination_1 = require("./getCSSVariablesByDestination")
11
11
  * @param wrapperTags the html elements to set the CSS variables
12
12
  */
13
13
  function setAutomaticCSSVariablesForDark(colorType, wrapperTags, destination = CSS_VARIABLE_DESTINATION_1.CSS_VARIABLE_DESTINATION.GLOBAL) {
14
- if ((0, isEmpty_1.isEmpty)(colorType) || !Array.isArray(wrapperTags))
14
+ if ((0, isEmpty_1.isEmpty)(colorType) || (0, isEmpty_1.isEmpty)(wrapperTags))
15
15
  return;
16
16
  const cssVariables = (0, getCSSVariablesByDestination_1.getCSSVariablesByDestination)(destination);
17
17
  const cssVariablesKeys = Object.keys(cssVariables[colorType] || {});
@@ -1,5 +1,2 @@
1
1
  import { CSS_VARIABLE_DESTINATION } from "../constants/CSS_VARIABLE_DESTINATION";
2
- /**
3
- * CSS Variable Destination types
4
- */
5
2
  export type IColorCSSVariableDestination = CSS_VARIABLE_DESTINATION;
@@ -1,5 +1,2 @@
1
1
  import { COLOR_TYPE } from "../constants/COLOR_TYPE";
2
- /**
3
- * Color types
4
- */
5
2
  export type IColorType = COLOR_TYPE;
@@ -1,3 +1,2 @@
1
- export * from "./IColorChannel";
2
1
  export * from "./IColorCSSVariableDestination";
3
2
  export * from "./IColorType";
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./IColorChannel"), exports);
18
17
  __exportStar(require("./IColorCSSVariableDestination"), exports);
19
18
  __exportStar(require("./IColorType"), exports);
@@ -1,5 +1,4 @@
1
1
  import { DATE_YEAR_MONTHS } from "../constants/DATE_YEAR_MONTHS";
2
- import { INTL_YEAR_FORMAT } from "../constants/INTL_DATE_FORMATS";
3
2
  import { getDateByTimezone } from "../helpers/getDateByTimezone";
4
3
  import { getDefaultDateSettings } from "../helpers/getDefaultDateSettings";
5
4
  import { isValidDateObject } from "../helpers/isValidDateObject";
@@ -18,6 +17,5 @@ export function dateToMonthYear(date, settings) {
18
17
  const dt = new Date(timezonedDate.valueOf());
19
18
  if (!isValidDateObject(dt))
20
19
  return date;
21
- const year = INTL_YEAR_FORMAT.format(dt.getFullYear());
22
- return `${DATE_YEAR_MONTHS[dt.getMonth()]} ${year}`;
20
+ return `${DATE_YEAR_MONTHS[dt.getMonth()]} ${dt.getFullYear()}`;
23
21
  }
@@ -42,4 +42,3 @@ export * from "./ISO_8601_REGEX";
42
42
  export * from "./TIME_GROUPING_PROPERTY_INFO_LIST";
43
43
  export * from "./TIME_GROUPING_PROPERTY_INFO";
44
44
  export * from "./TIME_GROUPING_PROPERTY_LABEL";
45
- export * from "./INTL_DATE_FORMATS";
@@ -42,4 +42,3 @@ export * from "./ISO_8601_REGEX";
42
42
  export * from "./TIME_GROUPING_PROPERTY_INFO_LIST";
43
43
  export * from "./TIME_GROUPING_PROPERTY_INFO";
44
44
  export * from "./TIME_GROUPING_PROPERTY_LABEL";
45
- export * from "./INTL_DATE_FORMATS";
@@ -1,7 +1,7 @@
1
1
  import { AbsoluteStatement } from "./interfaces/AbsoluteStatement";
2
2
  import { RelativeInput } from "./interfaces/RelativeInput";
3
3
  import { RelativeToAbsoluteStruct } from "./interfaces/RelativeToAbsoluteStruct";
4
- export declare class RelativeStatementAdapter {
4
+ export default class RelativeStatementAdapter {
5
5
  statement: RelativeInput;
6
6
  now: Date;
7
7
  constructor(statement: RelativeInput, now?: Date);
@@ -6,7 +6,7 @@ import { getStatementCase } from "./helpers/getStatementCase";
6
6
  import { DATE_GROUPING_PROPERTY } from "../constants/DATE_GROUPING_PROPERTY";
7
7
  import { parseDate } from "./helpers/parseDate";
8
8
  import { DATETIME_FORMAT } from "./constants/DATE_FORMATS";
9
- export class RelativeStatementAdapter {
9
+ export default class RelativeStatementAdapter {
10
10
  constructor(statement, now = new Date()) {
11
11
  this.statement =
12
12
  typeof statement === "string" ? statement : formatStatement(statement);
@@ -14,8 +14,9 @@ import { RelativeStatement } from "./interfaces/RelativeStatement";
14
14
  *
15
15
  * Output:
16
16
  * { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
17
- * @param statements - Raw statements/values
18
- * @param clock - Clock/time reference for relative date resolution
19
- * @returns
17
+ *
18
+ * @param {RelativeStatement[]|string[]} statements - Raw statements/values
19
+ * @param {Date} clock - Clock/time reference for relative date resolution
20
+ * @returns {AbsoluteRange[]|string[]}
20
21
  */
21
22
  export declare function resolveRelative(statements: RelativeStatement[], clock?: Date): (string | import("./interfaces").AbsoluteStatement)[];
@@ -1,4 +1,4 @@
1
- import { RelativeStatementAdapter } from "./RelativeStatementAdapter";
1
+ import RelativeStatementAdapter from "./RelativeStatementAdapter";
2
2
  /**
3
3
  * Resolve a list of relative statements according to operator
4
4
  * @example
@@ -14,9 +14,10 @@ import { RelativeStatementAdapter } from "./RelativeStatementAdapter";
14
14
  *
15
15
  * Output:
16
16
  * { gte: "03/06/2021 00:00:00", lte: "03/05/2022 23:59:59" }
17
- * @param statements - Raw statements/values
18
- * @param clock - Clock/time reference for relative date resolution
19
- * @returns
17
+ *
18
+ * @param {RelativeStatement[]|string[]} statements - Raw statements/values
19
+ * @param {Date} clock - Clock/time reference for relative date resolution
20
+ * @returns {AbsoluteRange[]|string[]}
20
21
  */
21
22
  export function resolveRelative(statements, clock = new Date()) {
22
23
  return statements.map((s) => new RelativeStatementAdapter(s, clock).value());
@@ -1,11 +1,11 @@
1
1
  export declare enum FILTER_SCOPE {
2
- ADMIN = "ADMIN",// Admin filters (TBD)
3
- DATA = "DATA",// User Management Filters a.k.a. Super Filters
4
- GLOBAL = "GLOBAL",// Analyze Filters | Filters for all pages on PB/EU
5
- PAGE = "PAGE",// PB/EU Filters for a single page
6
- TAB = "TAB",// PB/EU Filters for a single tab
7
- DEFAULT = "DEFAULT",// Filters created on Chart Builder
8
- CHART = "CHART",// PB/EU Filters for panels inside a page/tab
9
- ACTION = "ACTION",// Filters created with FilterBY or other actions
2
+ ADMIN = "ADMIN",
3
+ DATA = "DATA",
4
+ GLOBAL = "GLOBAL",
5
+ PAGE = "PAGE",
6
+ TAB = "TAB",
7
+ DEFAULT = "DEFAULT",
8
+ CHART = "CHART",
9
+ ACTION = "ACTION",
10
10
  FLOW = "FLOW"
11
11
  }
@@ -3,6 +3,7 @@ import { IFSScopeID } from "../../interfaces/common/IFSScopeID";
3
3
  import { IFUData } from "../../interfaces/ui/IFUData";
4
4
  /**
5
5
  * Gets filters from Filter Data by Scopes/Scope IDs.
6
+ * If some scope Id property is not recieved into the collection, the filter is skipped.
6
7
  * @param filterData The filter data
7
8
  * @param scopes The collection of Scopes/Scope IDs
8
9
  * @returns a new Filter Data
@@ -1,8 +1,9 @@
1
1
  import { isEmpty } from "../../../general/mix/isEmpty";
2
+ import { _hasProperty } from "../../../general/object/hasProperty";
2
3
  import { objectCopy } from "../../../general/object/objectCopy";
3
- import { FILTER_SCOPE } from "../../constants/common/FILTER_SCOPE";
4
4
  /**
5
5
  * Gets filters from Filter Data by Scopes/Scope IDs.
6
+ * If some scope Id property is not recieved into the collection, the filter is skipped.
6
7
  * @param filterData The filter data
7
8
  * @param scopes The collection of Scopes/Scope IDs
8
9
  * @returns a new Filter Data
@@ -13,8 +14,7 @@ export function getFiltersByScopesIds(filterData, scopes = []) {
13
14
  const _filterData = objectCopy(filterData);
14
15
  _filterData.scopes = scopes.reduce((newScopes, scope) => {
15
16
  const filteredScopes = _filterData.scopes.filter((fScope) => scope.label === fScope.scope &&
16
- (scope.id === fScope.scopeid ||
17
- (fScope.scope === FILTER_SCOPE.GLOBAL && fScope.scopeid == null)) &&
17
+ (scope.id === fScope.scopeid || !_hasProperty(scope, "id")) &&
18
18
  fScope.datasets.length > 0);
19
19
  return newScopes.concat(filteredScopes);
20
20
  }, []);
@@ -1,6 +1,6 @@
1
1
  import { IFSData } from "../../interfaces/common/IFSData";
2
- import { IFUData } from "../../interfaces/ui/IFUData";
3
2
  import { IFSScopeID } from "../../interfaces/common/IFSScopeID";
3
+ import { IFUData } from "../../interfaces/ui/IFUData";
4
4
  /**
5
5
  * Get a new Filter Data by filtering scopes/scope IDs and enabled flags
6
6
  * @param filterData a Filter Data or UI Filter Data
@@ -1,5 +1,5 @@
1
- import { getFiltersByScopesIds } from "./getFiltersByScopesIds";
2
1
  import { getFiltersByParams } from "./getFiltersByParams";
2
+ import { getFiltersByScopesIds } from "./getFiltersByScopesIds";
3
3
  import { isEmpty } from "../../../general/mix/isEmpty";
4
4
  import { objectCopy } from "../../../general/object/objectCopy";
5
5
  /**
@@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { UChartPaginationApi } from "./UChartPaginationApi";
11
- import { UChartApi } from "./UChartApi";
10
+ import UChartPaginationApi from "./UChartPaginationApi";
11
+ import UChartApi from "./UChartApi";
12
12
  import { isRangeValidator } from "../helpers/common/isRangeValidator";
13
13
  import { getFiltersByVisibility } from "../helpers/common/getFiltersByVisibility";
14
14
  import { excludeFiltersByAggregateColumn } from "../helpers/common/excludeFiltersByAggregateColumn";
@@ -3,7 +3,7 @@ import { IFilterConfig } from "../interfaces/common/IFilterConfig";
3
3
  import { IFUFlattenedFilter } from "../interfaces/ui/IFUFlattenedFilter";
4
4
  import { IFBLogic } from "../interfaces/backend/IFBLogic";
5
5
  import { IFUChartSettings } from "../interfaces/ui/IFUChartSettings";
6
- export declare class UChartApi {
6
+ export default class UChartApi {
7
7
  /**
8
8
  * Gets a promise with a resulting data
9
9
  * @param config the config
@@ -11,7 +11,7 @@ import { FILTER_VALIDATOR } from "../constants/common/FILTER_VALIDATOR";
11
11
  import { flatUIToOldLogic } from "../adapters/flatUIToOldLogic";
12
12
  import ChartsApi from "../../services/api/Charts.api";
13
13
  import { getAggFilters } from "../helpers/OLD_getAggFilters";
14
- export class UChartApi {
14
+ class UChartApi {
15
15
  constructor() {
16
16
  /**
17
17
  * Gets a promise with a resulting data
@@ -294,3 +294,4 @@ UChartApi.isResultEmpty = (resultObject, validateNesteddata = false) => {
294
294
  }
295
295
  return validation;
296
296
  };
297
+ export default UChartApi;
@@ -4,7 +4,7 @@ import { IFUFlattenedFilter } from "../interfaces/ui/IFUFlattenedFilter";
4
4
  import { IFBLogic } from "../interfaces/backend/IFBLogic";
5
5
  import { IFUChartSettings } from "../interfaces/ui/IFUChartSettings";
6
6
  import { IFUColumn } from "../interfaces/ui/IFUColumn";
7
- export declare class UChartPaginationApi {
7
+ export default class UChartPaginationApi {
8
8
  afterKey: any;
9
9
  uFilter: IFUFlattenedFilter;
10
10
  /**
@@ -12,7 +12,7 @@ import { AGGREGATE } from "../../charts/constants/AGGREGATE";
12
12
  import { objectCopy } from "../../general/object/objectCopy";
13
13
  import { FILTER_VALIDATOR } from "../constants/common/FILTER_VALIDATOR";
14
14
  import { flatUIToOldLogic } from "../adapters/flatUIToOldLogic";
15
- export class UChartPaginationApi {
15
+ class UChartPaginationApi {
16
16
  constructor() {
17
17
  /**
18
18
  * Gets afterKey object
@@ -97,7 +97,7 @@ export class UChartPaginationApi {
97
97
  let searchLogic;
98
98
  if (!isEmpty(uFilter.values)) {
99
99
  searchLogic = flatUIToOldLogic([
100
- Object.assign(Object.assign({}, uFilter), { enabled: true, validator: UChartPaginationApi._getValidationType(uFilter.column, uFilter.validator), column: Object.assign({}, uFilter.column) }),
100
+ Object.assign(Object.assign({}, uFilter), { validator: UChartPaginationApi._getValidationType(uFilter.column, uFilter.validator), column: Object.assign({}, uFilter.column) }),
101
101
  ]);
102
102
  }
103
103
  return searchLogic;
@@ -326,3 +326,4 @@ UChartPaginationApi.isResultPaginationEmpty = (resultObject) => {
326
326
  const result = _get(resultObject, "data");
327
327
  return isEmpty(result);
328
328
  };
329
+ export default UChartPaginationApi;
@@ -1,6 +1,7 @@
1
1
  /**
2
- * The `objectCopy` function is a TypeScript function that creates a deep copy of an object or array.
3
- * @param {T} obj - The `obj` parameter is the object that you want to make a copy of.
4
- * @returns The function `objectCopy` returns a deep copy of the input object `obj`.
2
+ * Created a new reference of the given argument
3
+ * @param entity The variable to be copied
4
+ * @param cache
5
+ * @returns A new reference of the given argument
5
6
  */
6
- export declare function objectCopy<T = any>(obj: T): T;
7
+ export declare function objectCopy<T = any>(entity: T, cache?: WeakMap<object, any>): T;
@@ -1,21 +1,31 @@
1
1
  /**
2
- * The `objectCopy` function is a TypeScript function that creates a deep copy of an object or array.
3
- * @param {T} obj - The `obj` parameter is the object that you want to make a copy of.
4
- * @returns The function `objectCopy` returns a deep copy of the input object `obj`.
2
+ * Created a new reference of the given argument
3
+ * @param entity The variable to be copied
4
+ * @param cache
5
+ * @returns A new reference of the given argument
5
6
  */
6
- export function objectCopy(obj) {
7
- if (obj === null || typeof obj !== "object") {
8
- return obj;
7
+ export function objectCopy(entity, cache) {
8
+ if (!isClonable(entity))
9
+ return entity;
10
+ const newCache = cache ? cache : new WeakMap();
11
+ if (newCache.has(entity))
12
+ return newCache.get(entity);
13
+ const c = new entity.constructor();
14
+ if (c.name === "Date")
15
+ return new Date(entity);
16
+ if (entity instanceof Map) {
17
+ entity.forEach((value, key) => c.set(objectCopy(key, newCache), objectCopy(value, newCache)));
9
18
  }
10
- if (Array.isArray(obj)) {
11
- const newArray = obj.map((item) => objectCopy(item));
12
- return newArray;
19
+ if (entity instanceof Set) {
20
+ entity.forEach((value) => c.add(objectCopy(value, newCache)));
13
21
  }
14
- const clonedObj = {};
15
- for (const key in obj) {
16
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
17
- clonedObj[key] = objectCopy(obj[key]);
18
- }
19
- }
20
- return clonedObj;
22
+ newCache.set(entity, c);
23
+ return Object.assign(c, ...Object.keys(entity).map((prop) => ({
24
+ [prop]: objectCopy(entity[prop], newCache),
25
+ })));
26
+ }
27
+ function isClonable(entity) {
28
+ const referenceTypes = ["Array", "Object", "Map", "Set", "Date"];
29
+ const entityName = entity && entity.constructor.name;
30
+ return referenceTypes.includes(entityName);
21
31
  }
@@ -12,6 +12,4 @@ export default class ChartsApi {
12
12
  createSignal(): AbortSignal;
13
13
  getResults(data: any, ignoreSignal?: boolean, newEndpoint?: boolean): Promise<any>;
14
14
  getResultsPagination(data: any, ignoreSignal?: boolean): Promise<any>;
15
- getChart(config: any): Promise<any>;
16
- static transformDataByTimezone(data: any, config: any): any;
17
15
  }
@@ -2,8 +2,6 @@ import { Request } from "../helpers/Request";
2
2
  import { CHART_ENDPOINT } from "../constants/CHART_ENDPOINT";
3
3
  import { UCHART_ENDPOINT } from "../constants/UCHART_ENDPOINT";
4
4
  import { UCHART_PAGINATION_ENDPOINT } from "../constants/UCHART_PAGINATION_ENDPOINT";
5
- import { _get, isEmpty } from "../../general";
6
- import { getFiltersByTimezone } from "../../filters";
7
5
  export default class ChartsApi {
8
6
  constructor(config) {
9
7
  this.config = config;
@@ -30,24 +28,4 @@ export default class ChartsApi {
30
28
  }
31
29
  return Request.post(Object.assign(Object.assign({}, this.config), { endpoint: UCHART_PAGINATION_ENDPOINT, signal }), "", data);
32
30
  }
33
- getChart(config) {
34
- const translated = isEmpty(config.translated) ? true : config.translated;
35
- const lang = _get(this.config, "lang");
36
- const timezone = _get(this.config, "timezone");
37
- const connector = lang ? "&" : "?";
38
- let params = lang ? `?lang=${lang}` : "";
39
- params += `${connector}translated=${translated}`;
40
- params += (timezone === null || timezone === void 0 ? void 0 : timezone.offset) ? `&tzoffset=${timezone.offset}` : "";
41
- return Request.get(Object.assign(Object.assign({}, this.config), config), "/:chart_id" + params).then((response) => ChartsApi.transformDataByTimezone(response, this.config));
42
- }
43
- static transformDataByTimezone(data, config) {
44
- var _a, _b, _c;
45
- if (!isEmpty((_b = (_a = data === null || data === void 0 ? void 0 : data.v2) === null || _a === void 0 ? void 0 : _a.defaultFilters) === null || _b === void 0 ? void 0 : _b.data)) {
46
- data.v2.defaultFilters = Object.assign(Object.assign({}, data.v2.defaultFilters), { data: getFiltersByTimezone(data.v2.defaultFilters.data, config.timezone) });
47
- }
48
- if (!isEmpty((_c = data === null || data === void 0 ? void 0 : data.defaultFilters) === null || _c === void 0 ? void 0 : _c.data)) {
49
- data.defaultFilters = Object.assign(Object.assign({}, data.defaultFilters), { data: getFiltersByTimezone(data.defaultFilters.data, config.timezone) });
50
- }
51
- return data;
52
- }
53
31
  }
@@ -1,4 +1,4 @@
1
- import { IPayloadQrveyAll } from "../interfaces/IPayloadQrveyAll";
1
+ import IPayloadQrveyAll from "../interfaces/IPayloadQrveyAll";
2
2
  /**
3
3
  * Request function for getting Qrveys such as Web Forms and Datasets. Use params for getting precise data
4
4
  * @param config Configuration
@@ -1 +1 @@
1
- export declare function getModel(config: any, params?: any): Promise<any>;
1
+ export declare function getModel(config: any, params?: any): Promise<import("../..").IModel>;
@@ -1,8 +1,9 @@
1
1
  import { Request } from "../helpers/Request";
2
2
  import { chooseLang } from "../../format/localization";
3
3
  import { ANALYTIQ_ENDPOINT } from "../constants/MODEL_ENDPOINT";
4
+ import { BModelToUIModel } from "../adapters/BModelToUIModel.adapter";
4
5
  export function getModel(config, params) {
5
6
  const lang = chooseLang(config);
6
7
  const data = { lang, logic: config.logic || [] };
7
- return Request.post(Object.assign(Object.assign({}, config), { endpoint: ANALYTIQ_ENDPOINT }), "", data, Object.assign(Object.assign({}, params), { lang }));
8
+ return Request.post(Object.assign(Object.assign({}, config), { endpoint: ANALYTIQ_ENDPOINT }), "", data, Object.assign(Object.assign({}, params), { lang })).then(BModelToUIModel);
8
9
  }
@@ -10,13 +10,13 @@ export function getDefaultQuestionListOptionsAttributes() {
10
10
  "formulaType",
11
11
  "geogroup",
12
12
  "outputFormat",
13
- "answers", // For multiples webform column types
14
- "imageUploadOption", // For Image upload
15
- "sliderVal", // For slidebar
16
- "value", // For lookup
17
- "activeCat", // For Expressions
18
- "words", // For Expressions with disabled categories
19
- "negative", // For Expressions with enabled categories
13
+ "answers",
14
+ "imageUploadOption",
15
+ "sliderVal",
16
+ "value",
17
+ "activeCat",
18
+ "words",
19
+ "negative",
20
20
  "positive", // For Expressions with enabled categories
21
21
  ];
22
22
  }
@@ -1,4 +1,4 @@
1
- export interface IPayloadQrveyAll {
1
+ export default interface IPayloadQrveyAll {
2
2
  sortby?: string;
3
3
  sortdir?: string;
4
4
  status: string | string[];
@@ -14,7 +14,6 @@ export declare const AUTOMATIC_CANVAS_CSS_VARIABLES: {
14
14
  "--qv-global-text-color": string;
15
15
  "--qv-global-text-secondary-color": string;
16
16
  "--qv-global-text-tertiary-color": string;
17
- "--qv-global-info-color": string;
18
17
  };
19
18
  LIGHT: {
20
19
  "--qv-global-header-background-color": string;
@@ -27,7 +26,6 @@ export declare const AUTOMATIC_CANVAS_CSS_VARIABLES: {
27
26
  "--qv-global-text-color": any;
28
27
  "--qv-global-text-secondary-color": string;
29
28
  "--qv-global-text-tertiary-color": string;
30
- "--qv-global-info-color": any;
31
29
  };
32
30
  };
33
31
  CANVAS: {
@@ -12,5 +12,4 @@ export declare const AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK: {
12
12
  "--qv-global-text-color": string;
13
13
  "--qv-global-text-secondary-color": string;
14
14
  "--qv-global-text-tertiary-color": string;
15
- "--qv-global-info-color": string;
16
15
  };