@qrvey/utils 1.12.0-6 → 1.12.0-8
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/dist/cjs/constants/Tokens.Const.d.ts +1 -0
- package/dist/cjs/constants/Tokens.Const.js +4 -0
- package/dist/cjs/constants/index.d.ts +1 -0
- package/dist/cjs/constants/index.js +1 -0
- package/dist/cjs/general/string/camelize.d.ts +7 -0
- package/dist/cjs/general/string/camelize.js +26 -0
- package/dist/cjs/general/string/index.d.ts +1 -0
- package/dist/cjs/general/string/index.js +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderThresholdDynamic.d.ts +20 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderThresholdDynamic.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderCreateModal.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderErrorMessage.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionEven.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionEven.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionLog.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionLog.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionOdd.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionOdd.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionPower.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionPower.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionRound.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionRound.js +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +14 -0
- package/dist/cjs/globalization/interfaces/formula_builder/index.d.ts +5 -0
- package/dist/cjs/globalization/interfaces/formula_builder/index.js +5 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +3 -2
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD_DYNAMIC.d.ts +4 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD_DYNAMIC.js +25 -0
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +65 -1
- package/dist/cjs/globalization/service/initI18n.js +2 -1
- package/dist/cjs/interfaces/CustomTokens.interface.d.ts +11 -0
- package/dist/cjs/interfaces/CustomTokens.interface.js +2 -0
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/index.js +1 -0
- package/dist/cjs/tokens/getCustomTokenBoxParse.d.ts +10 -0
- package/dist/cjs/tokens/getCustomTokenBoxParse.js +27 -0
- package/dist/cjs/tokens/getCustomtonTokens.d.ts +10 -0
- package/dist/cjs/tokens/getCustomtonTokens.js +42 -0
- package/dist/cjs/tokens/getCustomtonTokensWithKeys.d.ts +12 -0
- package/dist/cjs/tokens/getCustomtonTokensWithKeys.js +18 -0
- package/dist/cjs/tokens/index.d.ts +3 -0
- package/dist/cjs/tokens/index.js +3 -0
- package/dist/constants/Tokens.Const.d.ts +1 -0
- package/dist/constants/Tokens.Const.js +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/general/string/camelize.d.ts +7 -0
- package/dist/general/string/camelize.js +22 -0
- package/dist/general/string/index.d.ts +1 -0
- package/dist/general/string/index.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderThresholdDynamic.d.ts +20 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderThresholdDynamic.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderCreateModal.d.ts +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderErrorMessage.d.ts +4 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionEven.d.ts +5 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionEven.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionLog.d.ts +7 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionLog.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionOdd.d.ts +5 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionOdd.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionPower.d.ts +7 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionPower.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionRound.d.ts +7 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionRound.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +14 -0
- package/dist/globalization/interfaces/formula_builder/index.d.ts +5 -0
- package/dist/globalization/interfaces/formula_builder/index.js +5 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +3 -2
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD_DYNAMIC.d.ts +4 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD_DYNAMIC.js +22 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +65 -1
- package/dist/globalization/service/initI18n.js +2 -1
- package/dist/interfaces/CustomTokens.interface.d.ts +11 -0
- package/dist/interfaces/CustomTokens.interface.js +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/tokens/getCustomTokenBoxParse.d.ts +10 -0
- package/dist/tokens/getCustomTokenBoxParse.js +23 -0
- package/dist/tokens/getCustomtonTokens.d.ts +10 -0
- package/dist/tokens/getCustomtonTokens.js +38 -0
- package/dist/tokens/getCustomtonTokensWithKeys.d.ts +12 -0
- package/dist/tokens/getCustomtonTokensWithKeys.js +14 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CUSTOM_TOKEN_DEFAULT_KEY = "Custom Tokens";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `camelize` function converts a string to camel case by removing special characters and
|
|
3
|
+
* capitalizing the first letter of each word except the first one.
|
|
4
|
+
* @param [text] - The `text` parameter is a string that represents the text that you want to camelize.
|
|
5
|
+
* @returns The `camelize` function returns a string.
|
|
6
|
+
*/
|
|
7
|
+
export declare function camelize(text?: string): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.camelize = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The `camelize` function converts a string to camel case by removing special characters and
|
|
6
|
+
* capitalizing the first letter of each word except the first one.
|
|
7
|
+
* @param [text] - The `text` parameter is a string that represents the text that you want to camelize.
|
|
8
|
+
* @returns The `camelize` function returns a string.
|
|
9
|
+
*/
|
|
10
|
+
// TODO: Replace split and join for replceAll string function when this is supported
|
|
11
|
+
function camelize(text = "") {
|
|
12
|
+
return text
|
|
13
|
+
.split(".")
|
|
14
|
+
.join(" ")
|
|
15
|
+
.split("{")
|
|
16
|
+
.join(" ")
|
|
17
|
+
.split("}")
|
|
18
|
+
.join(" ")
|
|
19
|
+
.trim()
|
|
20
|
+
.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) {
|
|
21
|
+
if (+match === 0)
|
|
22
|
+
return "";
|
|
23
|
+
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.camelize = camelize;
|
|
@@ -71,6 +71,7 @@ import { II18nChartBuilderTimePeriodCustomRange } from "./II18nChartBuilderTimeP
|
|
|
71
71
|
import { II18nChartBuilderWordCloud } from "./II18nChartBuilderWordCloud";
|
|
72
72
|
import { II18nChartBuilderBoxWhisker } from "./II18nChartBuilderBoxWhisker";
|
|
73
73
|
import { II18nChartBuilderDurationParts } from "./II18nChartBuilderDurationParts";
|
|
74
|
+
import { II18nChartBuilderThresholdDynamic } from "./II18nChartBuilderThresholdDynamic";
|
|
74
75
|
export interface II18nChartBuilder {
|
|
75
76
|
action_panel: II18nChartBuilderActionPanel;
|
|
76
77
|
aggregated_formula: II18nChartBuilderAggregatedFormulas;
|
|
@@ -137,6 +138,7 @@ export interface II18nChartBuilder {
|
|
|
137
138
|
table_style_options: II18nChartBuilderTableStyleOptions;
|
|
138
139
|
target_config: II18nChartBuilderTargetConfig;
|
|
139
140
|
threshold: II18nChartBuilderThreshold;
|
|
141
|
+
dynamic_threshold: II18nChartBuilderThresholdDynamic;
|
|
140
142
|
time_period: II18nChartBuilderTimePeriod;
|
|
141
143
|
time_period_custom_range: II18nChartBuilderTimePeriodCustomRange;
|
|
142
144
|
tooltip_settings: II18nChartBuilderTooltipSettings;
|
package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderThresholdDynamic.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface II18nChartBuilderThresholdDynamic {
|
|
2
|
+
title: string;
|
|
3
|
+
add: string;
|
|
4
|
+
label: string;
|
|
5
|
+
label_placeholder: string;
|
|
6
|
+
operator: string;
|
|
7
|
+
operator_placeholder: string;
|
|
8
|
+
value_column: string;
|
|
9
|
+
value_column_placeholder: string;
|
|
10
|
+
value_aggregate: string;
|
|
11
|
+
value_aggregate_placeholder: string;
|
|
12
|
+
initial_value_column: string;
|
|
13
|
+
initial_value_column_placeholder: string;
|
|
14
|
+
initial_value_aggregate: string;
|
|
15
|
+
initial_value_aggregate_placeholder: string;
|
|
16
|
+
end_value_column: string;
|
|
17
|
+
end_value_column_placeholder: string;
|
|
18
|
+
end_value_aggregate: string;
|
|
19
|
+
end_value_aggregate_placeholder: string;
|
|
20
|
+
}
|
package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderErrorMessage.d.ts
CHANGED
|
@@ -28,5 +28,9 @@ export interface II18nFormulaBuilderErrorMessage {
|
|
|
28
28
|
NOT_ALLOWED_OPERATION: string;
|
|
29
29
|
NOT_ALLOWED_OPERATION_DIFFERENT_TYPES: string;
|
|
30
30
|
NOT_ALLOWED_OPERATION_MISSING_OPERATOR: string;
|
|
31
|
+
MATCH_RANGE: string;
|
|
31
32
|
GREATER_THAN: string;
|
|
33
|
+
LESS_THAN: string;
|
|
34
|
+
GREATER_THAN_OR_EQUAL_TO: string;
|
|
35
|
+
LESS_THAN_OR_EQUAL_TO: string;
|
|
32
36
|
}
|
package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionLog.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { II18nFormulaBuilderFunction } from "./II18nFormulaBuilderFunction";
|
|
2
|
+
export interface II18nFormulaBuilderV2FunctionLog extends II18nFormulaBuilderFunction {
|
|
3
|
+
param_num1_name: string;
|
|
4
|
+
param_num1_description: string;
|
|
5
|
+
param_base_name: string;
|
|
6
|
+
param_base_description: string;
|
|
7
|
+
}
|
package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionPower.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { II18nFormulaBuilderFunction } from "./II18nFormulaBuilderFunction";
|
|
2
|
+
export interface II18nFormulaBuilderV2FunctionPower extends II18nFormulaBuilderFunction {
|
|
3
|
+
param_num1_name: string;
|
|
4
|
+
param_num1_description: string;
|
|
5
|
+
param_num2_name: string;
|
|
6
|
+
param_num2_description: string;
|
|
7
|
+
}
|
package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2FunctionRound.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { II18nFormulaBuilderFunction } from "./II18nFormulaBuilderFunction";
|
|
2
|
+
export interface II18nFormulaBuilderV2FunctionRound extends II18nFormulaBuilderFunction {
|
|
3
|
+
param_num1_name: string;
|
|
4
|
+
param_num1_description: string;
|
|
5
|
+
param_digits_name: string;
|
|
6
|
+
param_digits_description: string;
|
|
7
|
+
}
|
package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { II18nFormulaBuilderFunction } from "./II18nFormulaBuilderFunction";
|
|
1
2
|
import { II18nFormulaBuilderV2FunctionAbs } from "./II18nFormulaBuilderV2FunctionAbs";
|
|
2
3
|
import { II18nFormulaBuilderV2FunctionAnd } from "./II18nFormulaBuilderV2FunctionAnd";
|
|
3
4
|
import { II18nFormulaBuilderV2FunctionConcantenate } from "./II18nFormulaBuilderV2FunctionConcatenate";
|
|
@@ -6,6 +7,7 @@ import { II18nFormulaBuilderV2FunctionDatedif } from "./II18nFormulaBuilderV2Fun
|
|
|
6
7
|
import { II18nFormulaBuilderV2FunctionDatesubtract } from "./II18nFormulaBuilderV2FunctionDatesubtract";
|
|
7
8
|
import { II18nFormulaBuilderV2FunctionDay } from "./II18nFormulaBuilderV2FunctionDay";
|
|
8
9
|
import { II18nFormulaBuilderV2FunctionDayofweek } from "./II18nFormulaBuilderV2FunctionDayofweek";
|
|
10
|
+
import { II18nFormulaBuilderV2FunctionEven } from "./II18nFormulaBuilderV2FunctionEven";
|
|
9
11
|
import { II18nFormulaBuilderV2FunctionHour } from "./II18nFormulaBuilderV2FunctionHour";
|
|
10
12
|
import { II18nFormulaBuilderV2FunctionIf } from "./II18nFormulaBuilderV2FunctionIf";
|
|
11
13
|
import { II18nFormulaBuilderV2FunctionIfs } from "./II18nFormulaBuilderV2FunctionIfs";
|
|
@@ -13,11 +15,15 @@ import { II18nFormulaBuilderV2FunctionInclude } from "./II18nFormulaBuilderV2Fun
|
|
|
13
15
|
import { II18nFormulaBuilderV2FunctionIsnull } from "./II18nFormulaBuilderV2FunctionIsnull";
|
|
14
16
|
import { II18nFormulaBuilderV2FunctionLeft } from "./II18nFormulaBuilderV2FunctionLeft";
|
|
15
17
|
import { II18nFormulaBuilderV2FunctionLength } from "./II18nFormulaBuilderV2FunctionLength";
|
|
18
|
+
import { II18nFormulaBuilderV2FunctionLog } from "./II18nFormulaBuilderV2FunctionLog";
|
|
16
19
|
import { II18nFormulaBuilderV2FunctionMax } from "./II18nFormulaBuilderV2FunctionMax";
|
|
17
20
|
import { II18nFormulaBuilderV2FunctionMid } from "./II18nFormulaBuilderV2FunctionMid";
|
|
18
21
|
import { II18nFormulaBuilderV2FunctionMinute } from "./II18nFormulaBuilderV2FunctionMinute";
|
|
19
22
|
import { II18nFormulaBuilderV2FunctionMonth } from "./II18nFormulaBuilderV2FunctionMonth";
|
|
23
|
+
import { II18nFormulaBuilderV2FunctionOdd } from "./II18nFormulaBuilderV2FunctionOdd";
|
|
24
|
+
import { II18nFormulaBuilderV2FunctionPower } from "./II18nFormulaBuilderV2FunctionPower";
|
|
20
25
|
import { II18nFormulaBuilderV2FunctionReplace } from "./II18nFormulaBuilderV2FunctionReplace";
|
|
26
|
+
import { II18nFormulaBuilderV2FunctionRound } from "./II18nFormulaBuilderV2FunctionRound";
|
|
21
27
|
import { II18nFormulaBuilderV2FunctionSecond } from "./II18nFormulaBuilderV2FunctionSecond";
|
|
22
28
|
import { II18nFormulaBuilderV2FunctionSqrt } from "./II18nFormulaBuilderV2FunctionSqrt";
|
|
23
29
|
import { II18nFormulaBuilderV2FunctionTrim } from "./II18nFormulaBuilderV2FunctionTrim";
|
|
@@ -55,4 +61,12 @@ export interface II18nFormulaBuilderV2Functions {
|
|
|
55
61
|
length: II18nFormulaBuilderV2FunctionLength;
|
|
56
62
|
sqrt: II18nFormulaBuilderV2FunctionSqrt;
|
|
57
63
|
exp: II18nFormulaBuilderV2FunctionSqrt;
|
|
64
|
+
even: II18nFormulaBuilderV2FunctionEven;
|
|
65
|
+
log: II18nFormulaBuilderV2FunctionLog;
|
|
66
|
+
odd: II18nFormulaBuilderV2FunctionOdd;
|
|
67
|
+
power: II18nFormulaBuilderV2FunctionPower;
|
|
68
|
+
random: II18nFormulaBuilderFunction;
|
|
69
|
+
round: II18nFormulaBuilderV2FunctionRound;
|
|
70
|
+
rounddown: II18nFormulaBuilderV2FunctionRound;
|
|
71
|
+
roundup: II18nFormulaBuilderV2FunctionRound;
|
|
58
72
|
}
|
|
@@ -83,3 +83,8 @@ export * from "./II18nFormulaBuilderV2FunctionInclude";
|
|
|
83
83
|
export * from "./II18nFormulaBuilderV2FunctionReplace";
|
|
84
84
|
export * from "./II18nFormulaBuilderV2FunctionLength";
|
|
85
85
|
export * from "./II18nFormulaBuilderV2FunctionSqrt";
|
|
86
|
+
export * from "./II18nFormulaBuilderV2FunctionEven";
|
|
87
|
+
export * from "./II18nFormulaBuilderV2FunctionLog";
|
|
88
|
+
export * from "./II18nFormulaBuilderV2FunctionOdd";
|
|
89
|
+
export * from "./II18nFormulaBuilderV2FunctionPower";
|
|
90
|
+
export * from "./II18nFormulaBuilderV2FunctionRound";
|
|
@@ -99,3 +99,8 @@ __exportStar(require("./II18nFormulaBuilderV2FunctionInclude"), exports);
|
|
|
99
99
|
__exportStar(require("./II18nFormulaBuilderV2FunctionReplace"), exports);
|
|
100
100
|
__exportStar(require("./II18nFormulaBuilderV2FunctionLength"), exports);
|
|
101
101
|
__exportStar(require("./II18nFormulaBuilderV2FunctionSqrt"), exports);
|
|
102
|
+
__exportStar(require("./II18nFormulaBuilderV2FunctionEven"), exports);
|
|
103
|
+
__exportStar(require("./II18nFormulaBuilderV2FunctionLog"), exports);
|
|
104
|
+
__exportStar(require("./II18nFormulaBuilderV2FunctionOdd"), exports);
|
|
105
|
+
__exportStar(require("./II18nFormulaBuilderV2FunctionPower"), exports);
|
|
106
|
+
__exportStar(require("./II18nFormulaBuilderV2FunctionRound"), exports);
|
|
@@ -9,11 +9,12 @@ const I18N_CHART_BUILDER_LAYER_OPTIONS_1 = require("./I18N_CHART_BUILDER_LAYER_O
|
|
|
9
9
|
const I18N_CHART_BUILDER_OPERATORS_1 = require("./I18N_CHART_BUILDER_OPERATORS");
|
|
10
10
|
const I18N_CHART_BUILDER_STYLE_OPTIONS_1 = require("./I18N_CHART_BUILDER_STYLE_OPTIONS");
|
|
11
11
|
const I18N_CHART_BUILDER_THRESHOLD_1 = require("./I18N_CHART_BUILDER_THRESHOLD");
|
|
12
|
+
const I18N_CHART_BUILDER_THRESHOLD_DYNAMIC_1 = require("./I18N_CHART_BUILDER_THRESHOLD_DYNAMIC");
|
|
12
13
|
const I18N_CHART_BUILDER_TIME_PERIOD_1 = require("./I18N_CHART_BUILDER_TIME_PERIOD");
|
|
13
14
|
/**
|
|
14
15
|
* @deprecated since version 1.12.0; Qrvey version 8.3. Those default poroperties will be replaced by Qrvey Globalization JSON
|
|
15
16
|
*/
|
|
16
|
-
exports.I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ format_values: {
|
|
17
|
+
exports.I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ format_values: {
|
|
17
18
|
abbreviated: "Abbreviated",
|
|
18
19
|
currency: "Currency",
|
|
19
20
|
custom: "Custom Format",
|
|
@@ -71,4 +72,4 @@ exports.I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Object.as
|
|
|
71
72
|
}, box_whisker: {
|
|
72
73
|
largest: "Largest",
|
|
73
74
|
smallest: "Smallest",
|
|
74
|
-
} }, I18N_CHART_BUILDER_GENERAL_1.I18N_CHART_BUILDER_GENERAL), I18N_CHART_BUILDER_GENERAL_OPTIONS_1.I18N_CHART_BUILDER_GENERAL_OPTIONS), I18N_CHART_BUILDER_STYLE_OPTIONS_1.I18N_CHART_BUILDER_STYLE_OPTIONS), I18N_CHART_BUILDER_LAYER_OPTIONS_1.I18N_CHART_BUILDER_LAYER_OPTIONS), I18N_CHART_BUILDER_FORMAT_OPTIONS_1.I18N_CHART_BUILDER_FORMAT_OPTIONS), I18N_CHART_BUILDER_OPERATORS_1.I18N_CHART_BUILDER_OPERATORS), I18N_CHART_BUILDER_COMPARISION_OPTIONS_1.I18N_CHART_BUILDER_COMPARISION_OPTIONS), I18N_CHART_BUILDER_THRESHOLD_1.I18N_CHART_BUILDER_THRESHOLD), I18N_CHART_BUILDER_TIME_PERIOD_1.I18N_CHART_BUILDER_TIME_PERIOD);
|
|
75
|
+
} }, I18N_CHART_BUILDER_GENERAL_1.I18N_CHART_BUILDER_GENERAL), I18N_CHART_BUILDER_GENERAL_OPTIONS_1.I18N_CHART_BUILDER_GENERAL_OPTIONS), I18N_CHART_BUILDER_STYLE_OPTIONS_1.I18N_CHART_BUILDER_STYLE_OPTIONS), I18N_CHART_BUILDER_LAYER_OPTIONS_1.I18N_CHART_BUILDER_LAYER_OPTIONS), I18N_CHART_BUILDER_FORMAT_OPTIONS_1.I18N_CHART_BUILDER_FORMAT_OPTIONS), I18N_CHART_BUILDER_OPERATORS_1.I18N_CHART_BUILDER_OPERATORS), I18N_CHART_BUILDER_COMPARISION_OPTIONS_1.I18N_CHART_BUILDER_COMPARISION_OPTIONS), I18N_CHART_BUILDER_THRESHOLD_1.I18N_CHART_BUILDER_THRESHOLD), I18N_CHART_BUILDER_THRESHOLD_DYNAMIC_1.I18N_CHART_BUILDER_THRESHOLD_DYNAMIC), I18N_CHART_BUILDER_TIME_PERIOD_1.I18N_CHART_BUILDER_TIME_PERIOD);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.I18N_CHART_BUILDER_THRESHOLD_DYNAMIC = void 0;
|
|
4
|
+
exports.I18N_CHART_BUILDER_THRESHOLD_DYNAMIC = {
|
|
5
|
+
dynamic_threshold: {
|
|
6
|
+
title: "Threshold",
|
|
7
|
+
add: "Add Threshold",
|
|
8
|
+
label: "Label",
|
|
9
|
+
label_placeholder: "Type label",
|
|
10
|
+
operator: "Operator",
|
|
11
|
+
operator_placeholder: "Select Option",
|
|
12
|
+
value_column: "Value Column",
|
|
13
|
+
value_column_placeholder: "Select column",
|
|
14
|
+
value_aggregate: "Value Aggregate",
|
|
15
|
+
value_aggregate_placeholder: "Select aggregate",
|
|
16
|
+
initial_value_column: "Initial Value Column",
|
|
17
|
+
initial_value_column_placeholder: "Select column",
|
|
18
|
+
initial_value_aggregate: "Initial Value Aggregate",
|
|
19
|
+
initial_value_aggregate_placeholder: "Select aggregate",
|
|
20
|
+
end_value_column: "End Value Column",
|
|
21
|
+
end_value_column_placeholder: "Select column",
|
|
22
|
+
end_value_aggregate: "End Value Aggregate",
|
|
23
|
+
end_value_aggregate_placeholder: "Select aggregate",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -304,6 +304,62 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
304
304
|
param_num1_name: "num1",
|
|
305
305
|
param_num1_description: "The exponent to raise e to.",
|
|
306
306
|
},
|
|
307
|
+
even: {
|
|
308
|
+
description: "Returns a number rounded to the next greatest even integer. For negative numbers it returns a number rounded to the next negative even number with greater absolute value.",
|
|
309
|
+
function_placeholder: "EVEN(num1)",
|
|
310
|
+
param_num1_name: "num1",
|
|
311
|
+
param_num1_description: "Numeric value.",
|
|
312
|
+
},
|
|
313
|
+
log: {
|
|
314
|
+
description: "Returns the logarithm of a number to the base you specify.",
|
|
315
|
+
function_placeholder: "LOG(num1, [base])",
|
|
316
|
+
param_num1_name: "num1",
|
|
317
|
+
param_num1_description: "Numeric value.",
|
|
318
|
+
param_base_name: "base (optional)",
|
|
319
|
+
param_base_description: "Base of the logarithm, if omitted, it is assumed to be 10. To calculate natural logarithm enter EXP(1).",
|
|
320
|
+
},
|
|
321
|
+
odd: {
|
|
322
|
+
description: "Returns a number rounded to the next greatest odd integer. For negative numbers it returns a number rounded to the next negative odd number with greater absolute value.",
|
|
323
|
+
function_placeholder: "ODD(num1)",
|
|
324
|
+
param_num1_name: "num1",
|
|
325
|
+
param_num1_description: "Numeric value.",
|
|
326
|
+
},
|
|
327
|
+
power: {
|
|
328
|
+
description: "Returns the logarithm of a number to the base you specify.",
|
|
329
|
+
function_placeholder: "POWER(num1, num2)",
|
|
330
|
+
param_num1_name: "num1",
|
|
331
|
+
param_num1_description: "Base.",
|
|
332
|
+
param_num2_name: "num2",
|
|
333
|
+
param_num2_description: "Exponent.",
|
|
334
|
+
},
|
|
335
|
+
random: {
|
|
336
|
+
description: "Returns a positive decimal number between 0 (inclusive) and 1 (exclusive).",
|
|
337
|
+
function_placeholder: "LOG(num1, [base])",
|
|
338
|
+
},
|
|
339
|
+
round: {
|
|
340
|
+
description: "Rounds a number to a specified number of digits. For negative numbers it rounds to the next negative number with greater absolute value.",
|
|
341
|
+
function_placeholder: "ROUND(num1,digits)",
|
|
342
|
+
param_num1_name: "num1",
|
|
343
|
+
param_num1_description: "Numeric value.",
|
|
344
|
+
param_digits_name: "digits",
|
|
345
|
+
param_digits_description: "Number of decimal digits, up to 10 digits.",
|
|
346
|
+
},
|
|
347
|
+
rounddown: {
|
|
348
|
+
description: "Rounds a number down to a specified number of digits. For negative numbers it rounds to the next negative number with the least absolute value.",
|
|
349
|
+
function_placeholder: "ROUNDDOWN(num1,digits)",
|
|
350
|
+
param_num1_name: "num1",
|
|
351
|
+
param_num1_description: "Numeric value.",
|
|
352
|
+
param_digits_name: "digits",
|
|
353
|
+
param_digits_description: "Number of decimal digits, up to 10 digits.",
|
|
354
|
+
},
|
|
355
|
+
roundup: {
|
|
356
|
+
description: "Rounds a number up to a specified number of digits. For negative numbers it rounds to the next negative number with greater absolute value.",
|
|
357
|
+
function_placeholder: "ROUNDUP(num1,digits)",
|
|
358
|
+
param_num1_name: "num1",
|
|
359
|
+
param_num1_description: "Numeric value.",
|
|
360
|
+
param_digits_name: "digits",
|
|
361
|
+
param_digits_description: "Number of decimal digits, up to 10 digits.",
|
|
362
|
+
},
|
|
307
363
|
},
|
|
308
364
|
editor: {
|
|
309
365
|
error_messages: {
|
|
@@ -335,8 +391,16 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
335
391
|
NOT_ALLOWED_OPERATION: "Expression not allowed. Allowed operators between {{i18n.function.expression.types}}: {{i18n.function.expression.operators}}",
|
|
336
392
|
NOT_ALLOWED_OPERATION_DIFFERENT_TYPES: "Expression not allowed {{i18n.function.expression.value}}",
|
|
337
393
|
NOT_ALLOWED_OPERATION_MISSING_OPERATOR: "Expression not allowed. Missing operator",
|
|
338
|
-
GREATER_THAN: "Argument {{i18n.function.argument.position}} has to be greater or equal than {{i18n.function.argument.greater_than}}",
|
|
339
394
|
INVALID_ALLOW_VALUE: "Argument {{i18n.function.argument.position}} has to be {{i18n.function.argument.allow_value}}",
|
|
395
|
+
MATCH_RANGE: "Argument {{i18n.function.argument.position}} has to be {{i18n.function.expression.dynamic}}",
|
|
396
|
+
GREATER_THAN: "greater than {{i18n.function.argument.greater_than}}",
|
|
397
|
+
LESS_THAN: "less than {{i18n.function.argument.less_than}}",
|
|
398
|
+
GREATER_THAN_OR_EQUAL_TO: "greater or equal than {{i18n.function.argument.greater_than_or_equal_to}}",
|
|
399
|
+
LESS_THAN_OR_EQUAL_TO: "less or equal than {{i18n.function.argument.less_than_or_equal_to}}",
|
|
400
|
+
},
|
|
401
|
+
special_words: {
|
|
402
|
+
and: "and",
|
|
403
|
+
between: "between",
|
|
340
404
|
},
|
|
341
405
|
},
|
|
342
406
|
},
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initI18n = void 0;
|
|
4
|
+
const labels_1 = require("../labels");
|
|
4
5
|
const i18nextBuilder_1 = require("../service/i18nextBuilder");
|
|
5
|
-
function initI18n(i18nConfig = {}, i18nDefault =
|
|
6
|
+
function initI18n(i18nConfig = {}, i18nDefault = labels_1.I18N_DEFAULT) {
|
|
6
7
|
return i18nextBuilder_1.I18nServiceBuilder.buildI18n(i18nConfig, i18nDefault);
|
|
7
8
|
}
|
|
8
9
|
exports.initI18n = initI18n;
|
|
@@ -19,3 +19,4 @@ __exportStar(require("./IChartBuilder.Interface"), exports);
|
|
|
19
19
|
__exportStar(require("./general"), exports);
|
|
20
20
|
__exportStar(require("./Qrvey.Interface"), exports);
|
|
21
21
|
__exportStar(require("./format"), exports);
|
|
22
|
+
__exportStar(require("./CustomTokens.interface"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICustomTokensComplex } from "../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* The function `getCustomTokenBoxParse` takes in an object of custom tokens and returns a formatted
|
|
4
|
+
* list of tokens with aliases and labels.
|
|
5
|
+
* @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object that contains
|
|
6
|
+
* custom token groups and their corresponding tokens. Each custom token group is represented by a key
|
|
7
|
+
* in the object, and the value is an array of tokens within that group.
|
|
8
|
+
* @returns an object called `tokensList`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCustomTokenBoxParse(customTokens: ICustomTokensComplex): {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomTokenBoxParse = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const general_1 = require("../general");
|
|
6
|
+
/**
|
|
7
|
+
* The function `getCustomTokenBoxParse` takes in an object of custom tokens and returns a formatted
|
|
8
|
+
* list of tokens with aliases and labels.
|
|
9
|
+
* @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object that contains
|
|
10
|
+
* custom token groups and their corresponding tokens. Each custom token group is represented by a key
|
|
11
|
+
* in the object, and the value is an array of tokens within that group.
|
|
12
|
+
* @returns an object called `tokensList`.
|
|
13
|
+
*/
|
|
14
|
+
function getCustomTokenBoxParse(customTokens) {
|
|
15
|
+
const tokensList = {};
|
|
16
|
+
for (const tokenKey in customTokens) {
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(customTokens, tokenKey)) {
|
|
18
|
+
const subGroup = tokenKey === constants_1.CUSTOM_TOKEN_DEFAULT_KEY ? "" : `.${(0, general_1.camelize)(tokenKey)}`;
|
|
19
|
+
tokensList[tokenKey] = customTokens[tokenKey].map((token) => ({
|
|
20
|
+
alias: token.label,
|
|
21
|
+
label: `{{customTokens${subGroup}.${token.key}}}`,
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return tokensList;
|
|
26
|
+
}
|
|
27
|
+
exports.getCustomTokenBoxParse = getCustomTokenBoxParse;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICustomTokensComplex, ICustomTokensSimple } from "../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
|
|
4
|
+
* custom tokens.
|
|
5
|
+
* @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
|
|
6
|
+
* `customtonTokensConfig` parameter is an object that can be either of type `ICustomTokensSimple` or
|
|
7
|
+
* `ICustomTokensComplex`.
|
|
8
|
+
* @returns an object of type `ICustomTokensComplex`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCustomtonTokens(customtonTokensConfig: ICustomTokensSimple | ICustomTokensComplex): ICustomTokensComplex;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomtonTokens = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
|
+
const general_1 = require("../general");
|
|
6
|
+
const getCustomtonTokensWithKeys_1 = require("./getCustomtonTokensWithKeys");
|
|
7
|
+
/**
|
|
8
|
+
* The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
|
|
9
|
+
* custom tokens.
|
|
10
|
+
* @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
|
|
11
|
+
* `customtonTokensConfig` parameter is an object that can be either of type `ICustomTokensSimple` or
|
|
12
|
+
* `ICustomTokensComplex`.
|
|
13
|
+
* @returns an object of type `ICustomTokensComplex`.
|
|
14
|
+
*/
|
|
15
|
+
function getCustomtonTokens(customtonTokensConfig) {
|
|
16
|
+
const customTokensparsed = {
|
|
17
|
+
[constants_1.CUSTOM_TOKEN_DEFAULT_KEY]: [],
|
|
18
|
+
};
|
|
19
|
+
for (const key in customtonTokensConfig) {
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(customtonTokensConfig, key)) {
|
|
21
|
+
if (typeof customtonTokensConfig[key] === "object") {
|
|
22
|
+
const tokensFromConfig = (0, getCustomtonTokensWithKeys_1.getCustomtonTokensWithKeys)(customtonTokensConfig[key]);
|
|
23
|
+
if (key === constants_1.CUSTOM_TOKEN_DEFAULT_KEY) {
|
|
24
|
+
customTokensparsed[key].push(...tokensFromConfig);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
customTokensparsed[key] = tokensFromConfig;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const tokensFromConfig = customtonTokensConfig[key];
|
|
32
|
+
customTokensparsed[constants_1.CUSTOM_TOKEN_DEFAULT_KEY].push({
|
|
33
|
+
label: key,
|
|
34
|
+
value: tokensFromConfig,
|
|
35
|
+
key: (0, general_1.camelize)(key),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return customTokensparsed;
|
|
41
|
+
}
|
|
42
|
+
exports.getCustomtonTokens = getCustomtonTokens;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomTokens } from "../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* The function `getCustomtonTokensWithKeys` takes an array of `CustomTokens` objects and returns a new
|
|
4
|
+
* array with each object having a `key` property that is the camelized version of either the `key` or
|
|
5
|
+
* `label` property.
|
|
6
|
+
* @param {CustomTokens[]} customTokens - An array of objects representing custom tokens. Each object
|
|
7
|
+
* should have properties such as "key" and "label".
|
|
8
|
+
* @returns an array of `CustomTokens` objects. Each object in the array has an additional `key`
|
|
9
|
+
* property, which is generated by camelizing the `key` or `label` property of the original
|
|
10
|
+
* `CustomTokens` object.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCustomtonTokensWithKeys(customTokens: CustomTokens[]): CustomTokens[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCustomtonTokensWithKeys = void 0;
|
|
4
|
+
const general_1 = require("../general");
|
|
5
|
+
/**
|
|
6
|
+
* The function `getCustomtonTokensWithKeys` takes an array of `CustomTokens` objects and returns a new
|
|
7
|
+
* array with each object having a `key` property that is the camelized version of either the `key` or
|
|
8
|
+
* `label` property.
|
|
9
|
+
* @param {CustomTokens[]} customTokens - An array of objects representing custom tokens. Each object
|
|
10
|
+
* should have properties such as "key" and "label".
|
|
11
|
+
* @returns an array of `CustomTokens` objects. Each object in the array has an additional `key`
|
|
12
|
+
* property, which is generated by camelizing the `key` or `label` property of the original
|
|
13
|
+
* `CustomTokens` object.
|
|
14
|
+
*/
|
|
15
|
+
function getCustomtonTokensWithKeys(customTokens) {
|
|
16
|
+
return customTokens.map((token) => (Object.assign(Object.assign({}, token), { key: (0, general_1.camelize)((token === null || token === void 0 ? void 0 : token.key) || token.label) })));
|
|
17
|
+
}
|
|
18
|
+
exports.getCustomtonTokensWithKeys = getCustomtonTokensWithKeys;
|
package/dist/cjs/tokens/index.js
CHANGED
|
@@ -15,3 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./isTokenLabel"), exports);
|
|
18
|
+
__exportStar(require("./getCustomtonTokensWithKeys"), exports);
|
|
19
|
+
__exportStar(require("./getCustomtonTokens"), exports);
|
|
20
|
+
__exportStar(require("./getCustomTokenBoxParse"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CUSTOM_TOKEN_DEFAULT_KEY = "Custom Tokens";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CUSTOM_TOKEN_DEFAULT_KEY = "Custom Tokens";
|
package/dist/constants/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `camelize` function converts a string to camel case by removing special characters and
|
|
3
|
+
* capitalizing the first letter of each word except the first one.
|
|
4
|
+
* @param [text] - The `text` parameter is a string that represents the text that you want to camelize.
|
|
5
|
+
* @returns The `camelize` function returns a string.
|
|
6
|
+
*/
|
|
7
|
+
export declare function camelize(text?: string): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `camelize` function converts a string to camel case by removing special characters and
|
|
3
|
+
* capitalizing the first letter of each word except the first one.
|
|
4
|
+
* @param [text] - The `text` parameter is a string that represents the text that you want to camelize.
|
|
5
|
+
* @returns The `camelize` function returns a string.
|
|
6
|
+
*/
|
|
7
|
+
// TODO: Replace split and join for replceAll string function when this is supported
|
|
8
|
+
export function camelize(text = "") {
|
|
9
|
+
return text
|
|
10
|
+
.split(".")
|
|
11
|
+
.join(" ")
|
|
12
|
+
.split("{")
|
|
13
|
+
.join(" ")
|
|
14
|
+
.split("}")
|
|
15
|
+
.join(" ")
|
|
16
|
+
.trim()
|
|
17
|
+
.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) {
|
|
18
|
+
if (+match === 0)
|
|
19
|
+
return "";
|
|
20
|
+
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
|
21
|
+
});
|
|
22
|
+
}
|