@qrvey/utils 1.8.0-1 → 1.8.0-3
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 +1 -1
- package/dist/cjs/columns/helpers/isDateColumn.js +2 -1
- package/dist/cjs/columns/helpers/isNumericalColumn.js +2 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMessagesCombined.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMessagesCombined.js +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/index.js +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +4 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +1 -0
- package/dist/columns/helpers/isDateColumn.js +2 -1
- package/dist/columns/helpers/isNumericalColumn.js +2 -1
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderChartNames.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMessagesCombined.d.ts +3 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMessagesCombined.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/index.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/index.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +4 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,5 +12,6 @@ const FORMULA_1 = require("../../formulas/constants/FORMULA");
|
|
|
12
12
|
*/
|
|
13
13
|
const isDateColumn = (column) => !(0, isEmpty_1.isEmpty)(column) &&
|
|
14
14
|
(0, isObject_1.isObject)(column) &&
|
|
15
|
-
(column.type === COLUMN_1.COLUMN.DATE ||
|
|
15
|
+
(column.type === COLUMN_1.COLUMN.DATE ||
|
|
16
|
+
(column.type === COLUMN_1.COLUMN.FORMULA && column.formulaType === FORMULA_1.FORMULA.DATE));
|
|
16
17
|
exports.isDateColumn = isDateColumn;
|
|
@@ -4,6 +4,7 @@ exports.isNumericalColumn = void 0;
|
|
|
4
4
|
const FORMULA_1 = require("../../formulas/constants/FORMULA");
|
|
5
5
|
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
6
6
|
const isObject_1 = require("../../general/object/isObject");
|
|
7
|
+
const COLUMN_1 = require("../constants/COLUMN");
|
|
7
8
|
const NUMERICAL_COLUMNS_1 = require("../constants/NUMERICAL_COLUMNS");
|
|
8
9
|
/**
|
|
9
10
|
* Validates if the given column is numerical type
|
|
@@ -13,5 +14,5 @@ const NUMERICAL_COLUMNS_1 = require("../constants/NUMERICAL_COLUMNS");
|
|
|
13
14
|
const isNumericalColumn = (column) => !(0, isEmpty_1.isEmpty)(column) &&
|
|
14
15
|
(0, isObject_1.isObject)(column) &&
|
|
15
16
|
(NUMERICAL_COLUMNS_1.NUMERICAL_COLUMNS.includes(column.type) ||
|
|
16
|
-
column.formulaType === FORMULA_1.FORMULA.NUMBER);
|
|
17
|
+
(column.type === COLUMN_1.COLUMN.FORMULA && column.formulaType === FORMULA_1.FORMULA.NUMBER));
|
|
17
18
|
exports.isNumericalColumn = isNumericalColumn;
|
|
@@ -57,6 +57,7 @@ import { II18nChartBuilderMessagesBoxWhiskers } from "./II18nChartBuilderMessage
|
|
|
57
57
|
import { II18nChartBuilderMessagesDefault } from "./II18nChartBuilderMessagesDefault";
|
|
58
58
|
import { II18nChartBuilderMessagesCrosstab } from "./II18nChartBuilderMessagesCrosstab";
|
|
59
59
|
import { II18nChartBuilderMessagesTableChart } from "./II18nChartBuilderMessagesTableChart";
|
|
60
|
+
import { II18nChartBuilderMessagesCombined } from "./II18nChartBuilderMessagesCombined";
|
|
60
61
|
import { II18nChartBuilderTrendsLine } from "./II18nChartBuilderTrendsLine";
|
|
61
62
|
import { II18nChartBuilderReferenceLine } from "./II18nChartBuilderRefernceLine";
|
|
62
63
|
import { II18nChartBuilderSmallMultiples } from "./II18nChartBuilderSmallMultiple";
|
|
@@ -117,6 +118,7 @@ export interface II18nChartBuilder {
|
|
|
117
118
|
messages_ms: II18nChartBuilderMessagesMs;
|
|
118
119
|
messages_pie: II18nChartBuilderMessagesPie;
|
|
119
120
|
messages_table_chart: II18nChartBuilderMessagesTableChart;
|
|
121
|
+
messages_combined: II18nChartBuilderMessagesCombined;
|
|
120
122
|
nav_panel: II18nChartBuilderNavPanel;
|
|
121
123
|
operators: II18nChartBuilderOperators;
|
|
122
124
|
references_line: II18nChartBuilderReferenceLine;
|
|
@@ -87,3 +87,4 @@ __exportStar(require("./II18nChartBuilderTimePeriodCustomRange"), exports);
|
|
|
87
87
|
__exportStar(require("./II18nChartBuilderWordCloud"), exports);
|
|
88
88
|
__exportStar(require("./II18nChartBuilderBoxWhisker"), exports);
|
|
89
89
|
__exportStar(require("./II18nChartBuilderDurationParts"), exports);
|
|
90
|
+
__exportStar(require("./II18nChartBuilderMessagesCombined"), exports);
|
|
@@ -60,6 +60,7 @@ exports.I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Object.as
|
|
|
60
60
|
choropleth_map: "Choropleth Map",
|
|
61
61
|
boxwhisker: "Box and Whisker",
|
|
62
62
|
wordcloud: "Word Cloud",
|
|
63
|
+
multiseries_combo: "Multiseries Combo",
|
|
63
64
|
}, filters_options: {
|
|
64
65
|
add: "Add Filters",
|
|
65
66
|
}, word_cloud: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
declare type General = "nav_panel" | "save_dialog" | "save_incomplete_dialog" | "leave_dialog" | "custom_format_dialog" | "data_panel" | "dimensions" | "shelf_menu" | "scale_types" | "trend_chart" | "chart_info" | "dnd_zone" | "chart_labels" | "action_panel" | "messages_general" | "messages_default" | "messages_crosstab" | "messages_table_chart" | "messages_missing_default" | "messages_ms" | "messages_pie" | "messages_min_max" | "messages_metric" | "messages_heatmap" | "messages_geo" | "messages_geo_bubble" | "messages_box_whiskers";
|
|
2
|
+
declare type General = "nav_panel" | "save_dialog" | "save_incomplete_dialog" | "leave_dialog" | "custom_format_dialog" | "data_panel" | "dimensions" | "shelf_menu" | "scale_types" | "trend_chart" | "chart_info" | "dnd_zone" | "chart_labels" | "action_panel" | "messages_general" | "messages_default" | "messages_crosstab" | "messages_table_chart" | "messages_missing_default" | "messages_ms" | "messages_pie" | "messages_min_max" | "messages_metric" | "messages_heatmap" | "messages_geo" | "messages_geo_bubble" | "messages_box_whiskers" | "messages_combined";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_GENERAL: Pick<II18nChartBuilder, General>;
|
|
4
4
|
export {};
|
|
@@ -175,6 +175,7 @@ exports.I18N_CHART_BUILDER_GENERAL = {
|
|
|
175
175
|
choropleth_map: "Choropleth Map Chart",
|
|
176
176
|
boxwhisker: "Box and Whisker Chart",
|
|
177
177
|
wordcloud: "Word Cloud Chart",
|
|
178
|
+
multiseries_combo: "Multiseries Combo Chart",
|
|
178
179
|
},
|
|
179
180
|
action_panel: {
|
|
180
181
|
charts: "Charts",
|
|
@@ -257,4 +258,7 @@ exports.I18N_CHART_BUILDER_GENERAL = {
|
|
|
257
258
|
value_missing: "A <i>Value</i> column is needed for this chart.",
|
|
258
259
|
distribution_missing: "A <i>Distribution</i> column is needed for this chart when the <i>Value</i> column is of non-numeric datatype.",
|
|
259
260
|
},
|
|
261
|
+
messages_combined: {
|
|
262
|
+
column_missing: "A <i>Category</i>, a <i>Series</i> and at least two <i>Value</i> are needed for this chart.",
|
|
263
|
+
},
|
|
260
264
|
};
|
|
@@ -9,4 +9,5 @@ import { FORMULA } from "../../formulas/constants/FORMULA";
|
|
|
9
9
|
*/
|
|
10
10
|
export const isDateColumn = (column) => !isEmpty(column) &&
|
|
11
11
|
isObject(column) &&
|
|
12
|
-
(column.type === COLUMN.DATE ||
|
|
12
|
+
(column.type === COLUMN.DATE ||
|
|
13
|
+
(column.type === COLUMN.FORMULA && column.formulaType === FORMULA.DATE));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FORMULA } from "../../formulas/constants/FORMULA";
|
|
2
2
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
3
3
|
import { isObject } from "../../general/object/isObject";
|
|
4
|
+
import { COLUMN } from "../constants/COLUMN";
|
|
4
5
|
import { NUMERICAL_COLUMNS } from "../constants/NUMERICAL_COLUMNS";
|
|
5
6
|
/**
|
|
6
7
|
* Validates if the given column is numerical type
|
|
@@ -10,4 +11,4 @@ import { NUMERICAL_COLUMNS } from "../constants/NUMERICAL_COLUMNS";
|
|
|
10
11
|
export const isNumericalColumn = (column) => !isEmpty(column) &&
|
|
11
12
|
isObject(column) &&
|
|
12
13
|
(NUMERICAL_COLUMNS.includes(column.type) ||
|
|
13
|
-
column.formulaType === FORMULA.NUMBER);
|
|
14
|
+
(column.type === COLUMN.FORMULA && column.formulaType === FORMULA.NUMBER));
|
|
@@ -57,6 +57,7 @@ import { II18nChartBuilderMessagesBoxWhiskers } from "./II18nChartBuilderMessage
|
|
|
57
57
|
import { II18nChartBuilderMessagesDefault } from "./II18nChartBuilderMessagesDefault";
|
|
58
58
|
import { II18nChartBuilderMessagesCrosstab } from "./II18nChartBuilderMessagesCrosstab";
|
|
59
59
|
import { II18nChartBuilderMessagesTableChart } from "./II18nChartBuilderMessagesTableChart";
|
|
60
|
+
import { II18nChartBuilderMessagesCombined } from "./II18nChartBuilderMessagesCombined";
|
|
60
61
|
import { II18nChartBuilderTrendsLine } from "./II18nChartBuilderTrendsLine";
|
|
61
62
|
import { II18nChartBuilderReferenceLine } from "./II18nChartBuilderRefernceLine";
|
|
62
63
|
import { II18nChartBuilderSmallMultiples } from "./II18nChartBuilderSmallMultiple";
|
|
@@ -117,6 +118,7 @@ export interface II18nChartBuilder {
|
|
|
117
118
|
messages_ms: II18nChartBuilderMessagesMs;
|
|
118
119
|
messages_pie: II18nChartBuilderMessagesPie;
|
|
119
120
|
messages_table_chart: II18nChartBuilderMessagesTableChart;
|
|
121
|
+
messages_combined: II18nChartBuilderMessagesCombined;
|
|
120
122
|
nav_panel: II18nChartBuilderNavPanel;
|
|
121
123
|
operators: II18nChartBuilderOperators;
|
|
122
124
|
references_line: II18nChartBuilderReferenceLine;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -57,6 +57,7 @@ export const I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Obje
|
|
|
57
57
|
choropleth_map: "Choropleth Map",
|
|
58
58
|
boxwhisker: "Box and Whisker",
|
|
59
59
|
wordcloud: "Word Cloud",
|
|
60
|
+
multiseries_combo: "Multiseries Combo",
|
|
60
61
|
}, filters_options: {
|
|
61
62
|
add: "Add Filters",
|
|
62
63
|
}, word_cloud: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
declare type General = "nav_panel" | "save_dialog" | "save_incomplete_dialog" | "leave_dialog" | "custom_format_dialog" | "data_panel" | "dimensions" | "shelf_menu" | "scale_types" | "trend_chart" | "chart_info" | "dnd_zone" | "chart_labels" | "action_panel" | "messages_general" | "messages_default" | "messages_crosstab" | "messages_table_chart" | "messages_missing_default" | "messages_ms" | "messages_pie" | "messages_min_max" | "messages_metric" | "messages_heatmap" | "messages_geo" | "messages_geo_bubble" | "messages_box_whiskers";
|
|
2
|
+
declare type General = "nav_panel" | "save_dialog" | "save_incomplete_dialog" | "leave_dialog" | "custom_format_dialog" | "data_panel" | "dimensions" | "shelf_menu" | "scale_types" | "trend_chart" | "chart_info" | "dnd_zone" | "chart_labels" | "action_panel" | "messages_general" | "messages_default" | "messages_crosstab" | "messages_table_chart" | "messages_missing_default" | "messages_ms" | "messages_pie" | "messages_min_max" | "messages_metric" | "messages_heatmap" | "messages_geo" | "messages_geo_bubble" | "messages_box_whiskers" | "messages_combined";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_GENERAL: Pick<II18nChartBuilder, General>;
|
|
4
4
|
export {};
|
|
@@ -172,6 +172,7 @@ export const I18N_CHART_BUILDER_GENERAL = {
|
|
|
172
172
|
choropleth_map: "Choropleth Map Chart",
|
|
173
173
|
boxwhisker: "Box and Whisker Chart",
|
|
174
174
|
wordcloud: "Word Cloud Chart",
|
|
175
|
+
multiseries_combo: "Multiseries Combo Chart",
|
|
175
176
|
},
|
|
176
177
|
action_panel: {
|
|
177
178
|
charts: "Charts",
|
|
@@ -254,4 +255,7 @@ export const I18N_CHART_BUILDER_GENERAL = {
|
|
|
254
255
|
value_missing: "A <i>Value</i> column is needed for this chart.",
|
|
255
256
|
distribution_missing: "A <i>Distribution</i> column is needed for this chart when the <i>Value</i> column is of non-numeric datatype.",
|
|
256
257
|
},
|
|
258
|
+
messages_combined: {
|
|
259
|
+
column_missing: "A <i>Category</i>, a <i>Series</i> and at least two <i>Value</i> are needed for this chart.",
|
|
260
|
+
},
|
|
257
261
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qrvey/utils",
|
|
3
|
-
"version": "1.8.0-
|
|
3
|
+
"version": "1.8.0-3",
|
|
4
4
|
"description": "Helper, Utils for all Qrvey Projects",
|
|
5
5
|
"homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"typescript": "4.8.4"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"d3-format": "
|
|
41
|
+
"d3-format": "2.0.0",
|
|
42
42
|
"dayjs": "1.11.6",
|
|
43
43
|
"i18next": "22.0.4"
|
|
44
44
|
},
|