@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.
- package/README.md +2173 -2649
- package/dist/charts/adapters/endpointData.js +1 -1
- package/dist/charts/adapters/endpointDataGet.js +1 -1
- package/dist/cjs/charts/adapters/endpointData.js +1 -1
- package/dist/cjs/charts/adapters/endpointDataGet.js +1 -1
- package/dist/cjs/dates/adapters/dateToMonthYear.js +1 -3
- package/dist/cjs/dates/constants/index.d.ts +0 -1
- package/dist/cjs/dates/constants/index.js +0 -1
- package/dist/cjs/dates/relative/RelativeStatementAdapter.d.ts +1 -1
- package/dist/cjs/dates/relative/RelativeStatementAdapter.js +1 -2
- package/dist/cjs/dates/relative/relative.d.ts +4 -3
- package/dist/cjs/dates/relative/relative.js +9 -5
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +8 -8
- package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
- package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +3 -3
- package/dist/cjs/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
- package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +1 -1
- package/dist/cjs/filters/services/Filters.api.js +7 -4
- package/dist/cjs/filters/services/UChartApi.d.ts +1 -1
- package/dist/cjs/filters/services/UChartApi.js +1 -2
- package/dist/cjs/filters/services/UChartPaginationApi.d.ts +1 -1
- package/dist/cjs/filters/services/UChartPaginationApi.js +2 -3
- package/dist/cjs/general/object/objectCopy.d.ts +5 -4
- package/dist/cjs/general/object/objectCopy.js +26 -16
- package/dist/cjs/services/api/Charts.api.d.ts +0 -2
- package/dist/cjs/services/api/Charts.api.js +0 -22
- package/dist/cjs/services/api/getAllQrveys.api.d.ts +1 -1
- package/dist/cjs/services/api/getModel.api.d.ts +1 -1
- package/dist/cjs/services/api/getModel.api.js +2 -1
- package/dist/cjs/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
- package/dist/cjs/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
- package/dist/cjs/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +0 -2
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +0 -1
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +0 -1
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +0 -1
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +0 -1
- package/dist/cjs/themes/constants/COLOR_TYPE.d.ts +0 -3
- package/dist/cjs/themes/constants/COLOR_TYPE.js +0 -3
- package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +0 -3
- package/dist/cjs/themes/constants/CSS_VARIABLE_DESTINATION.js +0 -3
- package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +1 -2
- package/dist/cjs/themes/constants/GLOBAL_CSS_VARIABLES.js +0 -1
- package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +0 -3
- package/dist/cjs/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +0 -3
- package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +0 -3
- package/dist/cjs/themes/constants/RGBA_REGULAR_EXPRESION.js +0 -3
- package/dist/cjs/themes/constants/index.d.ts +0 -4
- package/dist/cjs/themes/constants/index.js +0 -4
- package/dist/cjs/themes/helpers/getCSSVariablesByDestination.d.ts +6 -3
- package/dist/cjs/themes/helpers/getCSSVariablesByDestination.js +0 -3
- package/dist/cjs/themes/helpers/index.d.ts +1 -6
- package/dist/cjs/themes/helpers/index.js +1 -6
- package/dist/cjs/themes/helpers/isHexadecimalColor.js +1 -2
- package/dist/cjs/themes/helpers/isRGBAColor.js +1 -2
- package/dist/cjs/themes/helpers/lightOrDark.js +30 -14
- package/dist/cjs/themes/helpers/setAutomaticCSSVariablesForDark.js +1 -1
- package/dist/cjs/themes/interfaces/IColorCSSVariableDestination.d.ts +0 -3
- package/dist/cjs/themes/interfaces/IColorType.d.ts +0 -3
- package/dist/cjs/themes/interfaces/index.d.ts +0 -1
- package/dist/cjs/themes/interfaces/index.js +0 -1
- package/dist/dates/adapters/dateToMonthYear.js +1 -3
- package/dist/dates/constants/index.d.ts +0 -1
- package/dist/dates/constants/index.js +0 -1
- package/dist/dates/relative/RelativeStatementAdapter.d.ts +1 -1
- package/dist/dates/relative/RelativeStatementAdapter.js +1 -1
- package/dist/dates/relative/relative.d.ts +4 -3
- package/dist/dates/relative/relative.js +5 -4
- package/dist/filters/constants/common/FILTER_SCOPE.d.ts +8 -8
- package/dist/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
- package/dist/filters/helpers/common/getFiltersByScopesIds.js +3 -3
- package/dist/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
- package/dist/filters/helpers/common/getFiltersByVisibility.js +1 -1
- package/dist/filters/services/Filters.api.js +2 -2
- package/dist/filters/services/UChartApi.d.ts +1 -1
- package/dist/filters/services/UChartApi.js +2 -1
- package/dist/filters/services/UChartPaginationApi.d.ts +1 -1
- package/dist/filters/services/UChartPaginationApi.js +3 -2
- package/dist/general/object/objectCopy.d.ts +5 -4
- package/dist/general/object/objectCopy.js +26 -16
- package/dist/services/api/Charts.api.d.ts +0 -2
- package/dist/services/api/Charts.api.js +0 -22
- package/dist/services/api/getAllQrveys.api.d.ts +1 -1
- package/dist/services/api/getModel.api.d.ts +1 -1
- package/dist/services/api/getModel.api.js +2 -1
- package/dist/services/helpers/getDefaultQuestionListOptionsAttributes.js +7 -7
- package/dist/services/interfaces/IPayloadQrveyAll.d.ts +1 -1
- package/dist/themes/constants/AUTOMATIC_CSS_VARIABLES.d.ts +0 -2
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.d.ts +0 -1
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_DARK.js +0 -1
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.d.ts +0 -1
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +0 -1
- package/dist/themes/constants/COLOR_TYPE.d.ts +0 -3
- package/dist/themes/constants/COLOR_TYPE.js +0 -3
- package/dist/themes/constants/CSS_VARIABLE_DESTINATION.d.ts +0 -3
- package/dist/themes/constants/CSS_VARIABLE_DESTINATION.js +0 -3
- package/dist/themes/constants/GLOBAL_CSS_VARIABLES.d.ts +1 -2
- package/dist/themes/constants/GLOBAL_CSS_VARIABLES.js +0 -1
- package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.d.ts +0 -3
- package/dist/themes/constants/HEXADECIMAL_REGULAR_EXPRESSION.js +0 -3
- package/dist/themes/constants/RGBA_REGULAR_EXPRESION.d.ts +0 -3
- package/dist/themes/constants/RGBA_REGULAR_EXPRESION.js +0 -3
- package/dist/themes/constants/index.d.ts +0 -4
- package/dist/themes/constants/index.js +0 -4
- package/dist/themes/helpers/getCSSVariablesByDestination.d.ts +6 -3
- package/dist/themes/helpers/getCSSVariablesByDestination.js +0 -3
- package/dist/themes/helpers/index.d.ts +1 -6
- package/dist/themes/helpers/index.js +1 -6
- package/dist/themes/helpers/isHexadecimalColor.js +1 -2
- package/dist/themes/helpers/isRGBAColor.js +1 -2
- package/dist/themes/helpers/lightOrDark.js +30 -14
- package/dist/themes/helpers/setAutomaticCSSVariablesForDark.js +1 -1
- package/dist/themes/interfaces/IColorCSSVariableDestination.d.ts +0 -3
- package/dist/themes/interfaces/IColorType.d.ts +0 -3
- package/dist/themes/interfaces/index.d.ts +0 -1
- package/dist/themes/interfaces/index.js +0 -1
- package/package.json +17 -21
- package/dist/cache-managers/cache-chart-manager.d.ts +0 -34
- package/dist/cache-managers/cache-chart-manager.js +0 -43
- package/dist/cache-managers/cache-manager.d.ts +0 -27
- package/dist/cache-managers/cache-manager.js +0 -39
- package/dist/cache-managers/cache-metric-manager.d.ts +0 -34
- package/dist/cache-managers/cache-metric-manager.js +0 -43
- package/dist/cache-managers/cache-model-manager.d.ts +0 -29
- package/dist/cache-managers/cache-model-manager.js +0 -40
- package/dist/cache-managers/cache-permissions-manager.d.ts +0 -26
- package/dist/cache-managers/cache-permissions-manager.js +0 -39
- package/dist/cjs/cache-managers/cache-chart-manager.d.ts +0 -34
- package/dist/cjs/cache-managers/cache-chart-manager.js +0 -50
- package/dist/cjs/cache-managers/cache-manager.d.ts +0 -27
- package/dist/cjs/cache-managers/cache-manager.js +0 -43
- package/dist/cjs/cache-managers/cache-metric-manager.d.ts +0 -34
- package/dist/cjs/cache-managers/cache-metric-manager.js +0 -50
- package/dist/cjs/cache-managers/cache-model-manager.d.ts +0 -29
- package/dist/cjs/cache-managers/cache-model-manager.js +0 -44
- package/dist/cjs/cache-managers/cache-permissions-manager.d.ts +0 -26
- package/dist/cjs/cache-managers/cache-permissions-manager.js +0 -43
- package/dist/cjs/dates/constants/INTL_DATE_FORMATS.d.ts +0 -1
- package/dist/cjs/dates/constants/INTL_DATE_FORMATS.js +0 -8
- package/dist/cjs/interfaces/AdminPermissions.interface.d.ts +0 -53
- package/dist/cjs/interfaces/AdminPermissions.interface.js +0 -7
- package/dist/cjs/services/api/adminPermissions.api.d.ts +0 -2
- package/dist/cjs/services/api/adminPermissions.api.js +0 -20
- package/dist/cjs/services/api/metrics.api.d.ts +0 -4
- package/dist/cjs/services/api/metrics.api.js +0 -19
- package/dist/cjs/services/constants/METRIC_ENDPOINT.d.ts +0 -2
- package/dist/cjs/services/constants/METRIC_ENDPOINT.js +0 -7
- package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.d.ts +0 -5
- package/dist/cjs/themes/constants/CHANNEL_BLACK_COLOR.js +0 -12
- package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.d.ts +0 -5
- package/dist/cjs/themes/constants/CHANNEL_WHITE_COLOR.js +0 -12
- package/dist/cjs/themes/constants/COLOR_NAME.d.ts +0 -154
- package/dist/cjs/themes/constants/COLOR_NAME.js +0 -157
- package/dist/cjs/themes/helpers/calculateHSP.d.ts +0 -8
- package/dist/cjs/themes/helpers/calculateHSP.js +0 -20
- package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.d.ts +0 -8
- package/dist/cjs/themes/helpers/getChannelsByHexadecimalColor.js +0 -26
- package/dist/cjs/themes/helpers/getChannelsByNameColor.d.ts +0 -8
- package/dist/cjs/themes/helpers/getChannelsByNameColor.js +0 -26
- package/dist/cjs/themes/helpers/getChannelsByRgbaColor.d.ts +0 -8
- package/dist/cjs/themes/helpers/getChannelsByRgbaColor.js +0 -25
- package/dist/cjs/themes/helpers/getHexadecimalOpacity.d.ts +0 -7
- package/dist/cjs/themes/helpers/getHexadecimalOpacity.js +0 -19
- package/dist/cjs/themes/helpers/getRgbaOpacity.d.ts +0 -7
- package/dist/cjs/themes/helpers/getRgbaOpacity.js +0 -21
- package/dist/cjs/themes/interfaces/IColorChannel.d.ts +0 -9
- package/dist/cjs/themes/interfaces/IColorChannel.js +0 -2
- package/dist/dates/constants/INTL_DATE_FORMATS.d.ts +0 -1
- package/dist/dates/constants/INTL_DATE_FORMATS.js +0 -5
- package/dist/interfaces/AdminPermissions.interface.d.ts +0 -53
- package/dist/interfaces/AdminPermissions.interface.js +0 -4
- package/dist/services/api/adminPermissions.api.d.ts +0 -2
- package/dist/services/api/adminPermissions.api.js +0 -16
- package/dist/services/api/metrics.api.d.ts +0 -4
- package/dist/services/api/metrics.api.js +0 -16
- package/dist/services/constants/METRIC_ENDPOINT.d.ts +0 -2
- package/dist/services/constants/METRIC_ENDPOINT.js +0 -4
- package/dist/themes/constants/CHANNEL_BLACK_COLOR.d.ts +0 -5
- package/dist/themes/constants/CHANNEL_BLACK_COLOR.js +0 -9
- package/dist/themes/constants/CHANNEL_WHITE_COLOR.d.ts +0 -5
- package/dist/themes/constants/CHANNEL_WHITE_COLOR.js +0 -9
- package/dist/themes/constants/COLOR_NAME.d.ts +0 -154
- package/dist/themes/constants/COLOR_NAME.js +0 -154
- package/dist/themes/helpers/calculateHSP.d.ts +0 -8
- package/dist/themes/helpers/calculateHSP.js +0 -16
- package/dist/themes/helpers/getChannelsByHexadecimalColor.d.ts +0 -8
- package/dist/themes/helpers/getChannelsByHexadecimalColor.js +0 -22
- package/dist/themes/helpers/getChannelsByNameColor.d.ts +0 -8
- package/dist/themes/helpers/getChannelsByNameColor.js +0 -22
- package/dist/themes/helpers/getChannelsByRgbaColor.d.ts +0 -8
- package/dist/themes/helpers/getChannelsByRgbaColor.js +0 -21
- package/dist/themes/helpers/getHexadecimalOpacity.d.ts +0 -7
- package/dist/themes/helpers/getHexadecimalOpacity.js +0 -15
- package/dist/themes/helpers/getRgbaOpacity.d.ts +0 -7
- package/dist/themes/helpers/getRgbaOpacity.js +0 -17
- package/dist/themes/interfaces/IColorChannel.d.ts +0 -9
- 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 "./
|
|
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("./
|
|
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 (
|
|
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 (
|
|
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
|
|
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)
|
|
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
|
-
|
|
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
|
-
|
|
29
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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) ||
|
|
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] || {});
|
|
@@ -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
|
-
|
|
22
|
-
return `${DATE_YEAR_MONTHS[dt.getMonth()]} ${year}`;
|
|
20
|
+
return `${DATE_YEAR_MONTHS[dt.getMonth()]} ${dt.getFullYear()}`;
|
|
23
21
|
}
|
|
@@ -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
|
|
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
|
-
*
|
|
18
|
-
* @param
|
|
19
|
-
* @
|
|
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
|
|
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
|
-
*
|
|
18
|
-
* @param
|
|
19
|
-
* @
|
|
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"
|
|
3
|
-
DATA = "DATA"
|
|
4
|
-
GLOBAL = "GLOBAL"
|
|
5
|
-
PAGE = "PAGE"
|
|
6
|
-
TAB = "TAB"
|
|
7
|
-
DEFAULT = "DEFAULT"
|
|
8
|
-
CHART = "CHART"
|
|
9
|
-
ACTION = "ACTION"
|
|
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
|
|
11
|
-
import
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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), {
|
|
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
|
-
*
|
|
3
|
-
* @param
|
|
4
|
-
* @
|
|
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>(
|
|
7
|
+
export declare function objectCopy<T = any>(entity: T, cache?: WeakMap<object, any>): T;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param
|
|
4
|
-
* @
|
|
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(
|
|
7
|
-
if (
|
|
8
|
-
return
|
|
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 (
|
|
11
|
-
|
|
12
|
-
return newArray;
|
|
19
|
+
if (entity instanceof Set) {
|
|
20
|
+
entity.forEach((value) => c.add(objectCopy(value, newCache)));
|
|
13
21
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
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<
|
|
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",
|
|
14
|
-
"imageUploadOption",
|
|
15
|
-
"sliderVal",
|
|
16
|
-
"value",
|
|
17
|
-
"activeCat",
|
|
18
|
-
"words",
|
|
19
|
-
"negative",
|
|
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
|
}
|
|
@@ -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: {
|