@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
|
@@ -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;
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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";
|
|
@@ -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";
|
|
@@ -6,11 +6,12 @@ import { I18N_CHART_BUILDER_LAYER_OPTIONS } from "./I18N_CHART_BUILDER_LAYER_OPT
|
|
|
6
6
|
import { I18N_CHART_BUILDER_OPERATORS } from "./I18N_CHART_BUILDER_OPERATORS";
|
|
7
7
|
import { I18N_CHART_BUILDER_STYLE_OPTIONS } from "./I18N_CHART_BUILDER_STYLE_OPTIONS";
|
|
8
8
|
import { I18N_CHART_BUILDER_THRESHOLD } from "./I18N_CHART_BUILDER_THRESHOLD";
|
|
9
|
+
import { I18N_CHART_BUILDER_THRESHOLD_DYNAMIC } from "./I18N_CHART_BUILDER_THRESHOLD_DYNAMIC";
|
|
9
10
|
import { I18N_CHART_BUILDER_TIME_PERIOD } from "./I18N_CHART_BUILDER_TIME_PERIOD";
|
|
10
11
|
/**
|
|
11
12
|
* @deprecated since version 1.12.0; Qrvey version 8.3. Those default poroperties will be replaced by Qrvey Globalization JSON
|
|
12
13
|
*/
|
|
13
|
-
export const I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ format_values: {
|
|
14
|
+
export const 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: {
|
|
14
15
|
abbreviated: "Abbreviated",
|
|
15
16
|
currency: "Currency",
|
|
16
17
|
custom: "Custom Format",
|
|
@@ -68,4 +69,4 @@ export const I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Obje
|
|
|
68
69
|
}, box_whisker: {
|
|
69
70
|
largest: "Largest",
|
|
70
71
|
smallest: "Smallest",
|
|
71
|
-
} }, I18N_CHART_BUILDER_GENERAL), I18N_CHART_BUILDER_GENERAL_OPTIONS), I18N_CHART_BUILDER_STYLE_OPTIONS), I18N_CHART_BUILDER_LAYER_OPTIONS), I18N_CHART_BUILDER_FORMAT_OPTIONS), I18N_CHART_BUILDER_OPERATORS), I18N_CHART_BUILDER_COMPARISION_OPTIONS), I18N_CHART_BUILDER_THRESHOLD), I18N_CHART_BUILDER_TIME_PERIOD);
|
|
72
|
+
} }, I18N_CHART_BUILDER_GENERAL), I18N_CHART_BUILDER_GENERAL_OPTIONS), I18N_CHART_BUILDER_STYLE_OPTIONS), I18N_CHART_BUILDER_LAYER_OPTIONS), I18N_CHART_BUILDER_FORMAT_OPTIONS), I18N_CHART_BUILDER_OPERATORS), I18N_CHART_BUILDER_COMPARISION_OPTIONS), I18N_CHART_BUILDER_THRESHOLD), I18N_CHART_BUILDER_THRESHOLD_DYNAMIC), I18N_CHART_BUILDER_TIME_PERIOD);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const I18N_CHART_BUILDER_THRESHOLD_DYNAMIC = {
|
|
2
|
+
dynamic_threshold: {
|
|
3
|
+
title: "Threshold",
|
|
4
|
+
add: "Add Threshold",
|
|
5
|
+
label: "Label",
|
|
6
|
+
label_placeholder: "Type label",
|
|
7
|
+
operator: "Operator",
|
|
8
|
+
operator_placeholder: "Select Option",
|
|
9
|
+
value_column: "Value Column",
|
|
10
|
+
value_column_placeholder: "Select column",
|
|
11
|
+
value_aggregate: "Value Aggregate",
|
|
12
|
+
value_aggregate_placeholder: "Select aggregate",
|
|
13
|
+
initial_value_column: "Initial Value Column",
|
|
14
|
+
initial_value_column_placeholder: "Select column",
|
|
15
|
+
initial_value_aggregate: "Initial Value Aggregate",
|
|
16
|
+
initial_value_aggregate_placeholder: "Select aggregate",
|
|
17
|
+
end_value_column: "End Value Column",
|
|
18
|
+
end_value_column_placeholder: "Select column",
|
|
19
|
+
end_value_aggregate: "End Value Aggregate",
|
|
20
|
+
end_value_aggregate_placeholder: "Select aggregate",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -301,6 +301,62 @@ export const I18N_FORMULA_BUILDER = {
|
|
|
301
301
|
param_num1_name: "num1",
|
|
302
302
|
param_num1_description: "The exponent to raise e to.",
|
|
303
303
|
},
|
|
304
|
+
even: {
|
|
305
|
+
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.",
|
|
306
|
+
function_placeholder: "EVEN(num1)",
|
|
307
|
+
param_num1_name: "num1",
|
|
308
|
+
param_num1_description: "Numeric value.",
|
|
309
|
+
},
|
|
310
|
+
log: {
|
|
311
|
+
description: "Returns the logarithm of a number to the base you specify.",
|
|
312
|
+
function_placeholder: "LOG(num1, [base])",
|
|
313
|
+
param_num1_name: "num1",
|
|
314
|
+
param_num1_description: "Numeric value.",
|
|
315
|
+
param_base_name: "base (optional)",
|
|
316
|
+
param_base_description: "Base of the logarithm, if omitted, it is assumed to be 10. To calculate natural logarithm enter EXP(1).",
|
|
317
|
+
},
|
|
318
|
+
odd: {
|
|
319
|
+
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.",
|
|
320
|
+
function_placeholder: "ODD(num1)",
|
|
321
|
+
param_num1_name: "num1",
|
|
322
|
+
param_num1_description: "Numeric value.",
|
|
323
|
+
},
|
|
324
|
+
power: {
|
|
325
|
+
description: "Returns the logarithm of a number to the base you specify.",
|
|
326
|
+
function_placeholder: "POWER(num1, num2)",
|
|
327
|
+
param_num1_name: "num1",
|
|
328
|
+
param_num1_description: "Base.",
|
|
329
|
+
param_num2_name: "num2",
|
|
330
|
+
param_num2_description: "Exponent.",
|
|
331
|
+
},
|
|
332
|
+
random: {
|
|
333
|
+
description: "Returns a positive decimal number between 0 (inclusive) and 1 (exclusive).",
|
|
334
|
+
function_placeholder: "LOG(num1, [base])",
|
|
335
|
+
},
|
|
336
|
+
round: {
|
|
337
|
+
description: "Rounds a number to a specified number of digits. For negative numbers it rounds to the next negative number with greater absolute value.",
|
|
338
|
+
function_placeholder: "ROUND(num1,digits)",
|
|
339
|
+
param_num1_name: "num1",
|
|
340
|
+
param_num1_description: "Numeric value.",
|
|
341
|
+
param_digits_name: "digits",
|
|
342
|
+
param_digits_description: "Number of decimal digits, up to 10 digits.",
|
|
343
|
+
},
|
|
344
|
+
rounddown: {
|
|
345
|
+
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.",
|
|
346
|
+
function_placeholder: "ROUNDDOWN(num1,digits)",
|
|
347
|
+
param_num1_name: "num1",
|
|
348
|
+
param_num1_description: "Numeric value.",
|
|
349
|
+
param_digits_name: "digits",
|
|
350
|
+
param_digits_description: "Number of decimal digits, up to 10 digits.",
|
|
351
|
+
},
|
|
352
|
+
roundup: {
|
|
353
|
+
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.",
|
|
354
|
+
function_placeholder: "ROUNDUP(num1,digits)",
|
|
355
|
+
param_num1_name: "num1",
|
|
356
|
+
param_num1_description: "Numeric value.",
|
|
357
|
+
param_digits_name: "digits",
|
|
358
|
+
param_digits_description: "Number of decimal digits, up to 10 digits.",
|
|
359
|
+
},
|
|
304
360
|
},
|
|
305
361
|
editor: {
|
|
306
362
|
error_messages: {
|
|
@@ -332,8 +388,16 @@ export const I18N_FORMULA_BUILDER = {
|
|
|
332
388
|
NOT_ALLOWED_OPERATION: "Expression not allowed. Allowed operators between {{i18n.function.expression.types}}: {{i18n.function.expression.operators}}",
|
|
333
389
|
NOT_ALLOWED_OPERATION_DIFFERENT_TYPES: "Expression not allowed {{i18n.function.expression.value}}",
|
|
334
390
|
NOT_ALLOWED_OPERATION_MISSING_OPERATOR: "Expression not allowed. Missing operator",
|
|
335
|
-
GREATER_THAN: "Argument {{i18n.function.argument.position}} has to be greater or equal than {{i18n.function.argument.greater_than}}",
|
|
336
391
|
INVALID_ALLOW_VALUE: "Argument {{i18n.function.argument.position}} has to be {{i18n.function.argument.allow_value}}",
|
|
392
|
+
MATCH_RANGE: "Argument {{i18n.function.argument.position}} has to be {{i18n.function.expression.dynamic}}",
|
|
393
|
+
GREATER_THAN: "greater than {{i18n.function.argument.greater_than}}",
|
|
394
|
+
LESS_THAN: "less than {{i18n.function.argument.less_than}}",
|
|
395
|
+
GREATER_THAN_OR_EQUAL_TO: "greater or equal than {{i18n.function.argument.greater_than_or_equal_to}}",
|
|
396
|
+
LESS_THAN_OR_EQUAL_TO: "less or equal than {{i18n.function.argument.less_than_or_equal_to}}",
|
|
397
|
+
},
|
|
398
|
+
special_words: {
|
|
399
|
+
and: "and",
|
|
400
|
+
between: "between",
|
|
337
401
|
},
|
|
338
402
|
},
|
|
339
403
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { I18N_DEFAULT } from "../labels";
|
|
1
2
|
import { I18nServiceBuilder } from "../service/i18nextBuilder";
|
|
2
|
-
export function initI18n(i18nConfig = {}, i18nDefault =
|
|
3
|
+
export function initI18n(i18nConfig = {}, i18nDefault = I18N_DEFAULT) {
|
|
3
4
|
return I18nServiceBuilder.buildI18n(i18nConfig, i18nDefault);
|
|
4
5
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/interfaces/index.js
CHANGED
|
@@ -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,23 @@
|
|
|
1
|
+
import { CUSTOM_TOKEN_DEFAULT_KEY } from "../constants";
|
|
2
|
+
import { camelize } from "../general";
|
|
3
|
+
/**
|
|
4
|
+
* The function `getCustomTokenBoxParse` takes in an object of custom tokens and returns a formatted
|
|
5
|
+
* list of tokens with aliases and labels.
|
|
6
|
+
* @param {ICustomTokensComplex} customTokens - The `customTokens` parameter is an object that contains
|
|
7
|
+
* custom token groups and their corresponding tokens. Each custom token group is represented by a key
|
|
8
|
+
* in the object, and the value is an array of tokens within that group.
|
|
9
|
+
* @returns an object called `tokensList`.
|
|
10
|
+
*/
|
|
11
|
+
export function getCustomTokenBoxParse(customTokens) {
|
|
12
|
+
const tokensList = {};
|
|
13
|
+
for (const tokenKey in customTokens) {
|
|
14
|
+
if (Object.prototype.hasOwnProperty.call(customTokens, tokenKey)) {
|
|
15
|
+
const subGroup = tokenKey === CUSTOM_TOKEN_DEFAULT_KEY ? "" : `.${camelize(tokenKey)}`;
|
|
16
|
+
tokensList[tokenKey] = customTokens[tokenKey].map((token) => ({
|
|
17
|
+
alias: token.label,
|
|
18
|
+
label: `{{customTokens${subGroup}.${token.key}}}`,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return tokensList;
|
|
23
|
+
}
|
|
@@ -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,38 @@
|
|
|
1
|
+
import { CUSTOM_TOKEN_DEFAULT_KEY } from "../constants";
|
|
2
|
+
import { camelize } from "../general";
|
|
3
|
+
import { getCustomtonTokensWithKeys } from "./getCustomtonTokensWithKeys";
|
|
4
|
+
/**
|
|
5
|
+
* The function `getCustomtonTokens` takes a configuration object and returns a parsed version of the
|
|
6
|
+
* custom tokens.
|
|
7
|
+
* @param {ICustomTokensSimple | ICustomTokensComplex} customtonTokensConfig - The
|
|
8
|
+
* `customtonTokensConfig` parameter is an object that can be either of type `ICustomTokensSimple` or
|
|
9
|
+
* `ICustomTokensComplex`.
|
|
10
|
+
* @returns an object of type `ICustomTokensComplex`.
|
|
11
|
+
*/
|
|
12
|
+
export function getCustomtonTokens(customtonTokensConfig) {
|
|
13
|
+
const customTokensparsed = {
|
|
14
|
+
[CUSTOM_TOKEN_DEFAULT_KEY]: [],
|
|
15
|
+
};
|
|
16
|
+
for (const key in customtonTokensConfig) {
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(customtonTokensConfig, key)) {
|
|
18
|
+
if (typeof customtonTokensConfig[key] === "object") {
|
|
19
|
+
const tokensFromConfig = getCustomtonTokensWithKeys(customtonTokensConfig[key]);
|
|
20
|
+
if (key === CUSTOM_TOKEN_DEFAULT_KEY) {
|
|
21
|
+
customTokensparsed[key].push(...tokensFromConfig);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
customTokensparsed[key] = tokensFromConfig;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const tokensFromConfig = customtonTokensConfig[key];
|
|
29
|
+
customTokensparsed[CUSTOM_TOKEN_DEFAULT_KEY].push({
|
|
30
|
+
label: key,
|
|
31
|
+
value: tokensFromConfig,
|
|
32
|
+
key: camelize(key),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return customTokensparsed;
|
|
38
|
+
}
|
|
@@ -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,14 @@
|
|
|
1
|
+
import { camelize } from "../general";
|
|
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 function getCustomtonTokensWithKeys(customTokens) {
|
|
13
|
+
return customTokens.map((token) => (Object.assign(Object.assign({}, token), { key: camelize((token === null || token === void 0 ? void 0 : token.key) || token.label) })));
|
|
14
|
+
}
|
package/dist/tokens/index.d.ts
CHANGED
package/dist/tokens/index.js
CHANGED