@qrvey/utils 1.11.0 → 1.12.0-0-chart-v2-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/charts/adapters/chartBuilderAdapter.d.ts +35 -0
  2. package/dist/charts/adapters/chartBuilderAdapter.js +647 -0
  3. package/dist/charts/adapters/chartBuilderDefinitions.d.ts +568 -0
  4. package/dist/charts/adapters/chartBuilderDefinitions.js +31 -0
  5. package/dist/charts/adapters/chartBuilderParse.d.ts +9 -0
  6. package/dist/charts/adapters/chartBuilderParse.js +416 -0
  7. package/dist/charts/adapters/index.d.ts +1 -0
  8. package/dist/charts/adapters/index.js +1 -0
  9. package/dist/charts/helpers/chartBuilder.d.ts +53 -0
  10. package/dist/charts/helpers/chartBuilder.js +190 -0
  11. package/dist/cjs/charts/adapters/chartBuilderAdapter.d.ts +35 -0
  12. package/dist/cjs/charts/adapters/chartBuilderAdapter.js +654 -0
  13. package/dist/cjs/charts/adapters/chartBuilderDefinitions.d.ts +568 -0
  14. package/dist/cjs/charts/adapters/chartBuilderDefinitions.js +34 -0
  15. package/dist/cjs/charts/adapters/chartBuilderParse.d.ts +9 -0
  16. package/dist/cjs/charts/adapters/chartBuilderParse.js +421 -0
  17. package/dist/cjs/charts/adapters/index.d.ts +1 -0
  18. package/dist/cjs/charts/adapters/index.js +1 -0
  19. package/dist/cjs/charts/helpers/chartBuilder.d.ts +53 -0
  20. package/dist/cjs/charts/helpers/chartBuilder.js +212 -0
  21. package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +4 -0
  22. package/dist/cjs/globalization/interfaces/common/II18nRelativeDates.d.ts +8 -0
  23. package/dist/cjs/globalization/interfaces/common/II18nRelativeDates.js +2 -0
  24. package/dist/cjs/globalization/interfaces/common/II18nUnits.d.ts +6 -0
  25. package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +4 -0
  26. package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -10
  27. package/dist/cjs/globalization/labels/common/I18N_RELATIVE_DATES.d.ts +2 -0
  28. package/dist/cjs/globalization/labels/common/I18N_RELATIVE_DATES.js +11 -0
  29. package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +4 -0
  30. package/dist/globalization/interfaces/common/II18nRelativeDates.d.ts +8 -0
  31. package/dist/globalization/interfaces/common/II18nRelativeDates.js +1 -0
  32. package/dist/globalization/interfaces/common/II18nUnits.d.ts +6 -0
  33. package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +4 -0
  34. package/dist/globalization/labels/common/I18N_COMMON.js +2 -10
  35. package/dist/globalization/labels/common/I18N_RELATIVE_DATES.d.ts +2 -0
  36. package/dist/globalization/labels/common/I18N_RELATIVE_DATES.js +8 -0
  37. package/package.json +1 -1
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isChartMinMax = exports.isChartMultiserie = exports.isChartMetric = exports.isChartMap = exports.isChartBasic = exports.hasTrendLayer = exports.hasSmallMultiple = exports.hasReferenceLayer = exports.allowTableCalculation = exports.isTimeColumn = exports.timePeriodCustomRange = exports.timePeriod = exports.columnKey = exports.isColumnDate = exports.getSortByType = exports.capitalize = exports.randomKey = exports._pick = exports._isEmpty = exports._get = exports._cloneDeep = exports.jsonCopy = void 0;
4
+ /**
5
+ * simple deepclone
6
+ */
7
+ const jsonCopy = (obj = "") => {
8
+ return JSON.parse(JSON.stringify(obj));
9
+ };
10
+ exports.jsonCopy = jsonCopy;
11
+ exports._cloneDeep = exports.jsonCopy; //
12
+ /**
13
+ * Like lodash _.get
14
+ */
15
+ const _get = (baseObject, key, fallback) => {
16
+ function fn() {
17
+ try {
18
+ // tslint:disable-next-line:no-eval
19
+ const value = eval(`this.${key}`.replace(".[", "["));
20
+ return typeof value !== "undefined" ? value : fallback;
21
+ }
22
+ catch (e) {
23
+ return fallback;
24
+ }
25
+ }
26
+ return fn.apply(baseObject, null);
27
+ };
28
+ exports._get = _get;
29
+ const _isEmpty = (obj) => Object.keys(obj || "").length === 0;
30
+ exports._isEmpty = _isEmpty;
31
+ const _pick = (baseObject, keys) => {
32
+ return keys.reduce((newObj, attr) => {
33
+ if (attr in baseObject)
34
+ newObj[attr] = baseObject[attr];
35
+ return newObj;
36
+ }, {});
37
+ };
38
+ exports._pick = _pick;
39
+ const randomKey = () => {
40
+ return (Date.now() + Math.random() * 1e17).toString(36);
41
+ };
42
+ exports.randomKey = randomKey;
43
+ /**
44
+ * Capitalize string
45
+ */
46
+ const capitalize = (text) => text.toLowerCase().replace(/^\w/, (c) => c.toUpperCase());
47
+ exports.capitalize = capitalize;
48
+ function getSortBy(type) {
49
+ return [
50
+ "BAR_CHART" /* CHART_TYPE.BAR_CHART */,
51
+ "LINE_CHART" /* CHART_TYPE.LINE_CHART */,
52
+ "SYMBOL_CHART" /* CHART_TYPE.SYMBOL_CHART */,
53
+ "MINMAX_CHART" /* CHART_TYPE.MINMAX_CHART */,
54
+ "COMBO_CHART" /* CHART_TYPE.COMBO_CHART */,
55
+ "BAR_CHART_MS" /* CHART_TYPE.BAR_CHART_MS */,
56
+ "LINE_CHART_MS" /* CHART_TYPE.LINE_CHART_MS */,
57
+ "SYMBOL_CHART_MS" /* CHART_TYPE.SYMBOL_CHART_MS */,
58
+ "FUNNEL_CHART" /* CHART_TYPE.FUNNEL_CHART */,
59
+ "HEATMAP_CHART" /* CHART_TYPE.HEATMAP_CHART */,
60
+ "COMBINED_CHART" /* CHART_TYPE.COMBINED_CHART */,
61
+ ].includes(type)
62
+ ? "sort_by_column"
63
+ : "sort_by";
64
+ }
65
+ function getSortByType(globalSettings, type) {
66
+ return ((0, exports._get)(globalSettings, getSortBy(type)) ||
67
+ (0, exports._get)(globalSettings, "sort_by") || {
68
+ type: "Value" /* ACTION_SORT.VALUE */,
69
+ order: "Desc" /* ACTION_SORT_DIR.DESC */,
70
+ });
71
+ }
72
+ exports.getSortByType = getSortByType;
73
+ /**
74
+ * Returns True or false when column type property is a date column.
75
+ * In cases when column type is a Formula, validate if formulaType property is a date one.
76
+ * @param column Webforms or Dataset Column object
77
+ * @return True if the column is a date column otherwise is not.
78
+ */
79
+ const isColumnDate = (column) => {
80
+ if (column == null)
81
+ return;
82
+ return (column.type === "DATE" ||
83
+ (column.type === "FORMULA" && column.formulaType === "date"));
84
+ };
85
+ exports.isColumnDate = isColumnDate;
86
+ /**
87
+ * Column Key Indetifier Generator
88
+ * @param id QuestionId
89
+ * @param type Question Type
90
+ * @param prop Extra property for compound or complex data type
91
+ * @param index column index in table (to support the same column multiple times)
92
+ */
93
+ const columnKey = (id, type, prop = "", index) => {
94
+ const _prop = prop !== null ? (prop === null || prop === void 0 ? void 0 : prop.value) || prop || "" : "";
95
+ const idx = index === undefined ? "" : `|${index || ""}`;
96
+ return `${id}|${type}|${_prop}${idx}`;
97
+ };
98
+ exports.columnKey = columnKey;
99
+ exports.timePeriod = [
100
+ { text: "This second", label: "THIS_SECOND" /* TIME_PERIOD.THIS_SECOND */, key: "this_second" },
101
+ { text: "Last second", label: "LAST_SECOND" /* TIME_PERIOD.LAST_SECOND */, key: "last_second" },
102
+ { text: "This minute", label: "THIS_MINUTE" /* TIME_PERIOD.THIS_MINUTE */, key: "this_minute" },
103
+ { text: "Last minute", label: "LAST_MINUTE" /* TIME_PERIOD.LAST_MINUTE */, key: "last_minute" },
104
+ { text: "This hour", label: "THIS_HOUR" /* TIME_PERIOD.THIS_HOUR */, key: "this_hour" },
105
+ { text: "Last hour", label: "LAST_HOUR" /* TIME_PERIOD.LAST_HOUR */, key: "last_hour" },
106
+ { text: "Today", label: "TODAY" /* TIME_PERIOD.TODAY */, key: "today" },
107
+ { text: "Yesterday", label: "YESTERDAY" /* TIME_PERIOD.YESTERDAY */, key: "yesterday" },
108
+ { text: "This week", label: "THIS_WEEK" /* TIME_PERIOD.THIS_WEEK */, key: "this_week" },
109
+ { text: "Last week", label: "LAST_WEEK" /* TIME_PERIOD.LAST_WEEK */, key: "last_week" },
110
+ { text: "This month", label: "THIS_MONTH" /* TIME_PERIOD.THIS_MONTH */, key: "this_month" },
111
+ { text: "Last month", label: "LAST_MONTH" /* TIME_PERIOD.LAST_MONTH */, key: "last_month" },
112
+ {
113
+ text: "This quarter",
114
+ label: "THIS_QUARTER" /* TIME_PERIOD.THIS_QUARTER */,
115
+ key: "this_quarter",
116
+ },
117
+ {
118
+ text: "Last quarter",
119
+ label: "LAST_QUARTER" /* TIME_PERIOD.LAST_QUARTER */,
120
+ key: "last_quarter",
121
+ },
122
+ { text: "This year", label: "THIS_YEAR" /* TIME_PERIOD.THIS_YEAR */, key: "this_year" },
123
+ { text: "Last year", label: "LAST_YEAR" /* TIME_PERIOD.LAST_YEAR */, key: "last_year" },
124
+ { text: "All history", label: "ALL_HISTORY" /* TIME_PERIOD.ALL_HISTORY */, key: "all_history" },
125
+ {
126
+ text: "Custom Range",
127
+ label: "CUSTOM_RANGE" /* TIME_PERIOD.CUSTOM_RANGE */,
128
+ key: "custom_range",
129
+ },
130
+ ];
131
+ exports.timePeriodCustomRange = [
132
+ { text: "Before", label: "BEFORE" /* TP_CUSTOM_RANGE.BEFORE */, key: "before" },
133
+ { text: "After", label: "AFTER" /* TP_CUSTOM_RANGE.AFTER */, key: "after" },
134
+ { text: "Between", label: "BETWEEN" /* TP_CUSTOM_RANGE.BETWEEN */, key: "between" },
135
+ ];
136
+ const isTimeColumn = (column = {}) => column.type === "TIME";
137
+ exports.isTimeColumn = isTimeColumn;
138
+ function allowTableCalculation(chartType) {
139
+ const supportedCharts = getChartsSupportingTableCalculation();
140
+ return supportedCharts.includes(chartType);
141
+ }
142
+ exports.allowTableCalculation = allowTableCalculation;
143
+ function getChartsSupportingTableCalculation() {
144
+ return [
145
+ "TABLE_CHART" /* CHART_TYPE.TABLE_CHART */,
146
+ "BAR_CHART" /* CHART_TYPE.BAR_CHART */,
147
+ "LINE_CHART" /* CHART_TYPE.LINE_CHART */,
148
+ "HEATMAP_CHART" /* CHART_TYPE.HEATMAP_CHART */,
149
+ "COMBO_CHART" /* CHART_TYPE.COMBO_CHART */,
150
+ "BAR_CHART_MS" /* CHART_TYPE.BAR_CHART_MS */,
151
+ "LINE_CHART_MS" /* CHART_TYPE.LINE_CHART_MS */,
152
+ "SYMBOL_CHART_MS" /* CHART_TYPE.SYMBOL_CHART_MS */,
153
+ "FUNNEL_CHART" /* CHART_TYPE.FUNNEL_CHART */,
154
+ "COMBINED_CHART" /* CHART_TYPE.COMBINED_CHART */,
155
+ ];
156
+ }
157
+ function hasReferenceLayer(references) {
158
+ return (references === null || references === void 0 ? void 0 : references.filter((ref) => !(0, exports._isEmpty)(ref.axis)).length) > 0;
159
+ }
160
+ exports.hasReferenceLayer = hasReferenceLayer;
161
+ function hasSmallMultiple(list) {
162
+ return (list === null || list === void 0 ? void 0 : list.length) > 0;
163
+ }
164
+ exports.hasSmallMultiple = hasSmallMultiple;
165
+ function hasTrendLayer(trend) {
166
+ return trend && trend[0] ? trend[0].type !== "NONE" /* TREND_LINE_TYPE.NONE */ : false;
167
+ }
168
+ exports.hasTrendLayer = hasTrendLayer;
169
+ const CHART_BASE = [
170
+ "BAR_CHART" /* CHART_TYPE.BAR_CHART */,
171
+ "LINE_CHART" /* CHART_TYPE.LINE_CHART */,
172
+ "SYMBOL_CHART" /* CHART_TYPE.SYMBOL_CHART */,
173
+ "MINMAX_CHART" /* CHART_TYPE.MINMAX_CHART */,
174
+ ];
175
+ const CHART_MS = [
176
+ "BAR_CHART_MS" /* CHART_TYPE.BAR_CHART_MS */,
177
+ "LINE_CHART_MS" /* CHART_TYPE.LINE_CHART_MS */,
178
+ "SYMBOL_CHART_MS" /* CHART_TYPE.SYMBOL_CHART_MS */,
179
+ "COMBINED_CHART" /* CHART_TYPE.COMBINED_CHART */,
180
+ ];
181
+ const CHART_MAPS = [
182
+ "GEO_CHART_BUBBLE" /* CHART_TYPE.GEO_CHART_BUBBLE */,
183
+ "GEO_CHART_DOT" /* CHART_TYPE.GEO_CHART_DOT */,
184
+ "GEO_CHART_CHOROPLETH" /* CHART_TYPE.GEO_CHART_CHOROPLETH */,
185
+ "GEO_CHART" /* CHART_TYPE.GEO_CHART */,
186
+ ];
187
+ const CHART_METRIC = [
188
+ "INDICATOR" /* CHART_TYPE.INDICATOR_METRIC */,
189
+ "DIAL" /* CHART_TYPE.DIAL_METRIC */,
190
+ "BULLET" /* CHART_TYPE.BULLET_METRIC */,
191
+ ];
192
+ const CHART_MINMAX = ["MINMAX_CHART" /* CHART_TYPE.MINMAX_CHART */];
193
+ function isChartBasic(type) {
194
+ return CHART_BASE.includes(type);
195
+ }
196
+ exports.isChartBasic = isChartBasic;
197
+ function isChartMap(type) {
198
+ return CHART_MAPS.includes(type);
199
+ }
200
+ exports.isChartMap = isChartMap;
201
+ function isChartMetric(type) {
202
+ return CHART_METRIC.includes(type);
203
+ }
204
+ exports.isChartMetric = isChartMetric;
205
+ function isChartMultiserie(type) {
206
+ return CHART_MS.includes(type);
207
+ }
208
+ exports.isChartMultiserie = isChartMultiserie;
209
+ function isChartMinMax(type) {
210
+ return CHART_MINMAX.includes(type);
211
+ }
212
+ exports.isChartMinMax = isChartMinMax;
@@ -4,10 +4,13 @@ export interface II18nChartBuilderAxisStyle {
4
4
  axis_position_left: string;
5
5
  axis_position_primary_axis: string;
6
6
  axis_position_right: string;
7
+ calendar_dates: string;
7
8
  custom_axis_label: string;
8
9
  custom_label: string;
9
10
  custom_label_placeholder: string;
11
+ end_date: string;
10
12
  format_title: string;
13
+ include_starting: string;
11
14
  max_range: string;
12
15
  max_range_placeholder: string;
13
16
  min_range: string;
@@ -17,6 +20,7 @@ export interface II18nChartBuilderAxisStyle {
17
20
  scale_type_linear: string;
18
21
  scale_type_logarithm: string;
19
22
  scale_type_placeholder: string;
23
+ start_date: string;
20
24
  steps: string;
21
25
  steps_placeholder: string;
22
26
  type_label: string;
@@ -0,0 +1,8 @@
1
+ export interface II18nRelativeDates {
2
+ auto: string;
3
+ current_date: string;
4
+ fixed: string;
5
+ in_this: string;
6
+ the_last: string;
7
+ the_next: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,4 +7,10 @@ export interface II18nUnits {
7
7
  second: string;
8
8
  week: string;
9
9
  year: string;
10
+ auto: string;
11
+ current_date: string;
12
+ fixed: string;
13
+ in_this: string;
14
+ the_last: string;
15
+ the_next: string;
10
16
  }
@@ -79,10 +79,13 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
79
79
  axis_position_left: "Left",
80
80
  axis_position_primary_axis: "Use Primary Axis",
81
81
  axis_position_right: "Right",
82
+ calendar_dates: "Calendar dates",
82
83
  custom_axis_label: "Axis Label",
83
84
  custom_label: "Label",
84
85
  custom_label_placeholder: "Type custom label",
86
+ end_date: "End Date",
85
87
  format_title: "Format",
88
+ include_starting: "Include starting date",
86
89
  max_range: "Max Range",
87
90
  max_range_placeholder: "Auto",
88
91
  min_range: "Min Range",
@@ -92,6 +95,7 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
92
95
  scale_type_linear: "Linear",
93
96
  scale_type_logarithm: "Logarithm",
94
97
  scale_type_placeholder: "Select color type",
98
+ start_date: "Start Date",
95
99
  steps: "Steps",
96
100
  steps_placeholder: "Auto",
97
101
  type_label: "Type",
@@ -8,6 +8,7 @@ const I18N_COLUMN_LABEL_1 = require("./I18N_COLUMN_LABEL");
8
8
  const I18N_COLUMN_PROPERTY_LABEL_1 = require("./I18N_COLUMN_PROPERTY_LABEL");
9
9
  const I18N_DATE_GROUPING_1 = require("./I18N_DATE_GROUPING");
10
10
  const I18N_DAY_NAMES_1 = require("./I18N_DAY_NAMES");
11
+ const I18N_RELATIVE_DATES_1 = require("./I18N_RELATIVE_DATES");
11
12
  exports.I18N_COMMON = {
12
13
  aggregates: "Aggregates",
13
14
  aggregate_labels: I18N_AGGREGATE_LABEL_1.I18N_AGGREGATE_LABEL,
@@ -38,14 +39,5 @@ exports.I18N_COMMON = {
38
39
  tokens: "Show Internationalization Labels",
39
40
  },
40
41
  },
41
- units: {
42
- day: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.DAY.label,
43
- hour: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.HOUR.label,
44
- minute: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MINUTE.label,
45
- month: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MONTH.label,
46
- quarter: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.QUARTER.label,
47
- second: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.SECOND.label,
48
- week: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.WEEK.label,
49
- year: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.YEAR.label,
50
- },
42
+ units: Object.assign({ day: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.DAY.label, hour: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.HOUR.label, minute: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MINUTE.label, month: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MONTH.label, quarter: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.QUARTER.label, second: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.SECOND.label, week: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.WEEK.label, year: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.YEAR.label }, I18N_RELATIVE_DATES_1.I18N_RELATIVE_DATES),
51
43
  };
@@ -0,0 +1,2 @@
1
+ import { II18nRelativeDates } from "../../interfaces/common/II18nRelativeDates";
2
+ export declare const I18N_RELATIVE_DATES: II18nRelativeDates;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I18N_RELATIVE_DATES = void 0;
4
+ exports.I18N_RELATIVE_DATES = {
5
+ auto: "Auto",
6
+ current_date: "Current Date",
7
+ fixed: "Fixed",
8
+ in_this: "In This",
9
+ the_last: "The Last",
10
+ the_next: "The Next",
11
+ };
@@ -4,10 +4,13 @@ export interface II18nChartBuilderAxisStyle {
4
4
  axis_position_left: string;
5
5
  axis_position_primary_axis: string;
6
6
  axis_position_right: string;
7
+ calendar_dates: string;
7
8
  custom_axis_label: string;
8
9
  custom_label: string;
9
10
  custom_label_placeholder: string;
11
+ end_date: string;
10
12
  format_title: string;
13
+ include_starting: string;
11
14
  max_range: string;
12
15
  max_range_placeholder: string;
13
16
  min_range: string;
@@ -17,6 +20,7 @@ export interface II18nChartBuilderAxisStyle {
17
20
  scale_type_linear: string;
18
21
  scale_type_logarithm: string;
19
22
  scale_type_placeholder: string;
23
+ start_date: string;
20
24
  steps: string;
21
25
  steps_placeholder: string;
22
26
  type_label: string;
@@ -0,0 +1,8 @@
1
+ export interface II18nRelativeDates {
2
+ auto: string;
3
+ current_date: string;
4
+ fixed: string;
5
+ in_this: string;
6
+ the_last: string;
7
+ the_next: string;
8
+ }
@@ -7,4 +7,10 @@ export interface II18nUnits {
7
7
  second: string;
8
8
  week: string;
9
9
  year: string;
10
+ auto: string;
11
+ current_date: string;
12
+ fixed: string;
13
+ in_this: string;
14
+ the_last: string;
15
+ the_next: string;
10
16
  }
@@ -76,10 +76,13 @@ export const I18N_CHART_BUILDER_STYLE_OPTIONS = {
76
76
  axis_position_left: "Left",
77
77
  axis_position_primary_axis: "Use Primary Axis",
78
78
  axis_position_right: "Right",
79
+ calendar_dates: "Calendar dates",
79
80
  custom_axis_label: "Axis Label",
80
81
  custom_label: "Label",
81
82
  custom_label_placeholder: "Type custom label",
83
+ end_date: "End Date",
82
84
  format_title: "Format",
85
+ include_starting: "Include starting date",
83
86
  max_range: "Max Range",
84
87
  max_range_placeholder: "Auto",
85
88
  min_range: "Min Range",
@@ -89,6 +92,7 @@ export const I18N_CHART_BUILDER_STYLE_OPTIONS = {
89
92
  scale_type_linear: "Linear",
90
93
  scale_type_logarithm: "Logarithm",
91
94
  scale_type_placeholder: "Select color type",
95
+ start_date: "Start Date",
92
96
  steps: "Steps",
93
97
  steps_placeholder: "Auto",
94
98
  type_label: "Type",
@@ -5,6 +5,7 @@ import { I18N_COLUMN_LABEL } from "./I18N_COLUMN_LABEL";
5
5
  import { I18N_COLUMN_PROPERTY_LABEL } from "./I18N_COLUMN_PROPERTY_LABEL";
6
6
  import { I18N_DATE_GROUPING } from "./I18N_DATE_GROUPING";
7
7
  import { I18N_DAY_NAMES } from "./I18N_DAY_NAMES";
8
+ import { I18N_RELATIVE_DATES } from "./I18N_RELATIVE_DATES";
8
9
  export const I18N_COMMON = {
9
10
  aggregates: "Aggregates",
10
11
  aggregate_labels: I18N_AGGREGATE_LABEL,
@@ -35,14 +36,5 @@ export const I18N_COMMON = {
35
36
  tokens: "Show Internationalization Labels",
36
37
  },
37
38
  },
38
- units: {
39
- day: RELATIVE_UNIT_INFO.DAY.label,
40
- hour: RELATIVE_UNIT_INFO.HOUR.label,
41
- minute: RELATIVE_UNIT_INFO.MINUTE.label,
42
- month: RELATIVE_UNIT_INFO.MONTH.label,
43
- quarter: RELATIVE_UNIT_INFO.QUARTER.label,
44
- second: RELATIVE_UNIT_INFO.SECOND.label,
45
- week: RELATIVE_UNIT_INFO.WEEK.label,
46
- year: RELATIVE_UNIT_INFO.YEAR.label,
47
- },
39
+ units: Object.assign({ day: RELATIVE_UNIT_INFO.DAY.label, hour: RELATIVE_UNIT_INFO.HOUR.label, minute: RELATIVE_UNIT_INFO.MINUTE.label, month: RELATIVE_UNIT_INFO.MONTH.label, quarter: RELATIVE_UNIT_INFO.QUARTER.label, second: RELATIVE_UNIT_INFO.SECOND.label, week: RELATIVE_UNIT_INFO.WEEK.label, year: RELATIVE_UNIT_INFO.YEAR.label }, I18N_RELATIVE_DATES),
48
40
  };
@@ -0,0 +1,2 @@
1
+ import { II18nRelativeDates } from "../../interfaces/common/II18nRelativeDates";
2
+ export declare const I18N_RELATIVE_DATES: II18nRelativeDates;
@@ -0,0 +1,8 @@
1
+ export const I18N_RELATIVE_DATES = {
2
+ auto: "Auto",
3
+ current_date: "Current Date",
4
+ fixed: "Fixed",
5
+ in_this: "In This",
6
+ the_last: "The Last",
7
+ the_next: "The Next",
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.11.0",
3
+ "version": "1.12.0-0-chart-v2-0",
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",