@qrvey/utils 1.15.0-9 → 1.16.0-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.
- package/dist/cjs/columns/constants/COLUMN_ICON.js +32 -32
- package/dist/cjs/columns/helpers/index.d.ts +1 -0
- package/dist/cjs/columns/helpers/index.js +1 -0
- package/dist/cjs/columns/helpers/isNumericalColumn.d.ts +1 -1
- package/dist/cjs/columns/helpers/isNumericalColumn.js +1 -1
- package/dist/cjs/columns/helpers/isStringColumn.d.ts +7 -0
- package/dist/cjs/columns/helpers/isStringColumn.js +19 -0
- package/dist/cjs/dates/constants/DATE_DISTINCT_PROPERTY.d.ts +2 -1
- package/dist/cjs/dates/constants/DATE_DISTINCT_PROPERTY.js +1 -0
- package/dist/cjs/dates/relative/RelativeStatementAdapter.js +2 -1
- package/dist/cjs/elements/helpers/fixed.d.ts +96 -0
- package/dist/cjs/elements/helpers/fixed.js +248 -0
- package/dist/cjs/elements/helpers/gridStrategy.d.ts +29 -0
- package/dist/cjs/elements/helpers/gridStrategy.js +83 -0
- package/dist/cjs/elements/helpers/index.d.ts +3 -0
- package/dist/cjs/elements/helpers/index.js +22 -0
- package/dist/cjs/elements/helpers/responsive.d.ts +87 -0
- package/dist/cjs/elements/helpers/responsive.js +166 -0
- package/dist/cjs/elements/index.d.ts +2 -0
- package/dist/cjs/elements/index.js +18 -0
- package/dist/cjs/elements/interfaces/ICanvasGrid.d.ts +5 -0
- package/dist/cjs/elements/interfaces/ICanvasGrid.js +9 -0
- package/dist/cjs/elements/interfaces/IFixedPosition.d.ts +5 -0
- package/dist/cjs/elements/interfaces/IFixedPosition.js +2 -0
- package/dist/cjs/elements/interfaces/IVemCore.d.ts +29 -0
- package/dist/cjs/elements/interfaces/IVemCore.js +3 -0
- package/dist/cjs/elements/interfaces/IVemPosition.d.ts +44 -0
- package/dist/cjs/elements/interfaces/IVemPosition.js +8 -0
- package/dist/cjs/elements/interfaces/index.d.ts +4 -0
- package/dist/cjs/elements/interfaces/index.js +20 -0
- package/dist/cjs/elements/utils/element.d.ts +4 -0
- package/dist/cjs/elements/utils/element.js +28 -0
- package/dist/cjs/elements/utils/fixed.position.d.ts +12 -0
- package/dist/cjs/elements/utils/fixed.position.js +86 -0
- package/dist/cjs/elements/utils/general.d.ts +15 -0
- package/dist/cjs/elements/utils/general.js +20 -0
- package/dist/cjs/elements/utils/overlap.d.ts +63 -0
- package/dist/cjs/elements/utils/overlap.js +99 -0
- package/dist/cjs/elements/utils/position.d.ts +4 -0
- package/dist/cjs/elements/utils/position.js +5 -0
- package/dist/cjs/filters/adapters/FDToLogic.js +2 -1
- package/dist/cjs/filters/helpers/backend/buildExpression.js +1 -0
- package/dist/cjs/filters/helpers/backend/buildFilters.d.ts +5 -0
- package/dist/cjs/filters/helpers/backend/buildFilters.js +23 -1
- package/dist/cjs/filters/helpers/backend/getBackendValues.js +4 -1
- package/dist/cjs/filters/helpers/getAvailableScopesIDsByConfig.js +1 -0
- package/dist/cjs/filters/interfaces/backend/IFBExpression.js +0 -1
- package/dist/cjs/general/array/getUniqueSimpleArray.d.ts +6 -0
- package/dist/cjs/general/array/getUniqueSimpleArray.js +14 -0
- package/dist/cjs/general/array/index.d.ts +1 -0
- package/dist/cjs/general/array/index.js +1 -0
- package/dist/cjs/general/string/index.d.ts +4 -0
- package/dist/cjs/general/string/index.js +4 -0
- package/dist/cjs/general/string/secureHTML.d.ts +8 -0
- package/dist/cjs/general/string/secureHTML.js +13 -0
- package/dist/cjs/general/string/strategies/XSSEstrictedSanitizer.d.ts +8 -0
- package/dist/cjs/general/string/strategies/XSSEstrictedSanitizer.js +23 -0
- package/dist/cjs/general/string/strategies/XSSSanitizer.d.ts +8 -0
- package/dist/cjs/general/string/strategies/XSSSanitizer.js +19 -0
- package/dist/cjs/general/string/urlValidator.d.ts +10 -0
- package/dist/cjs/general/string/urlValidator.js +38 -0
- package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.d.ts +6 -0
- package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.js +120 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderSorting.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModal.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +2 -0
- package/dist/cjs/globalization/labels/export/I18N_EXPORT_MODAL.js +10 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/interfaces/SatinizerStrategy.d.ts +3 -0
- package/dist/cjs/interfaces/SatinizerStrategy.js +2 -0
- package/dist/cjs/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +3 -3
- package/dist/columns/constants/COLUMN_ICON.js +32 -32
- package/dist/columns/helpers/index.d.ts +1 -0
- package/dist/columns/helpers/index.js +1 -0
- package/dist/columns/helpers/isNumericalColumn.d.ts +1 -1
- package/dist/columns/helpers/isNumericalColumn.js +1 -1
- package/dist/columns/helpers/isStringColumn.d.ts +7 -0
- package/dist/columns/helpers/isStringColumn.js +15 -0
- package/dist/dates/constants/DATE_DISTINCT_PROPERTY.d.ts +2 -1
- package/dist/dates/constants/DATE_DISTINCT_PROPERTY.js +1 -0
- package/dist/dates/relative/RelativeStatementAdapter.js +2 -1
- package/dist/elements/helpers/fixed.d.ts +96 -0
- package/dist/elements/helpers/fixed.js +236 -0
- package/dist/elements/helpers/gridStrategy.d.ts +29 -0
- package/dist/elements/helpers/gridStrategy.js +78 -0
- package/dist/elements/helpers/index.d.ts +3 -0
- package/dist/elements/helpers/index.js +3 -0
- package/dist/elements/helpers/responsive.d.ts +87 -0
- package/dist/elements/helpers/responsive.js +155 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/elements/index.js +2 -0
- package/dist/elements/interfaces/ICanvasGrid.d.ts +5 -0
- package/dist/elements/interfaces/ICanvasGrid.js +6 -0
- package/dist/elements/interfaces/IFixedPosition.d.ts +5 -0
- package/dist/elements/interfaces/IFixedPosition.js +1 -0
- package/dist/elements/interfaces/IVemCore.d.ts +29 -0
- package/dist/elements/interfaces/IVemCore.js +1 -0
- package/dist/elements/interfaces/IVemPosition.d.ts +44 -0
- package/dist/elements/interfaces/IVemPosition.js +5 -0
- package/dist/elements/interfaces/index.d.ts +4 -0
- package/dist/elements/interfaces/index.js +4 -0
- package/dist/elements/utils/element.d.ts +4 -0
- package/dist/elements/utils/element.js +24 -0
- package/dist/elements/utils/fixed.position.d.ts +12 -0
- package/dist/elements/utils/fixed.position.js +72 -0
- package/dist/elements/utils/general.d.ts +15 -0
- package/dist/elements/utils/general.js +16 -0
- package/dist/elements/utils/overlap.d.ts +63 -0
- package/dist/elements/utils/overlap.js +95 -0
- package/dist/elements/utils/position.d.ts +4 -0
- package/dist/elements/utils/position.js +1 -0
- package/dist/filters/adapters/FDToLogic.js +2 -1
- package/dist/filters/helpers/backend/buildExpression.js +1 -0
- package/dist/filters/helpers/backend/buildFilters.d.ts +5 -0
- package/dist/filters/helpers/backend/buildFilters.js +23 -1
- package/dist/filters/helpers/backend/getBackendValues.js +4 -1
- package/dist/filters/helpers/getAvailableScopesIDsByConfig.js +1 -0
- package/dist/filters/interfaces/backend/IFBExpression.js +0 -1
- package/dist/general/array/getUniqueSimpleArray.d.ts +6 -0
- package/dist/general/array/getUniqueSimpleArray.js +10 -0
- package/dist/general/array/index.d.ts +1 -0
- package/dist/general/array/index.js +1 -0
- package/dist/general/string/index.d.ts +4 -0
- package/dist/general/string/index.js +4 -0
- package/dist/general/string/secureHTML.d.ts +8 -0
- package/dist/general/string/secureHTML.js +9 -0
- package/dist/general/string/strategies/XSSEstrictedSanitizer.d.ts +8 -0
- package/dist/general/string/strategies/XSSEstrictedSanitizer.js +19 -0
- package/dist/general/string/strategies/XSSSanitizer.d.ts +8 -0
- package/dist/general/string/strategies/XSSSanitizer.js +15 -0
- package/dist/general/string/urlValidator.d.ts +10 -0
- package/dist/general/string/urlValidator.js +34 -0
- package/dist/globalization/helpers/getI18nDateGroupLabel.d.ts +6 -0
- package/dist/globalization/helpers/getI18nDateGroupLabel.js +120 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderSorting.d.ts +2 -0
- package/dist/globalization/interfaces/export/II18nExportingModal.d.ts +6 -0
- package/dist/globalization/interfaces/export/II18nExportingModalApplyButtonLabel.d.ts +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +2 -0
- package/dist/globalization/labels/export/I18N_EXPORT_MODAL.js +10 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interfaces/SatinizerStrategy.d.ts +3 -0
- package/dist/interfaces/SatinizerStrategy.js +1 -0
- package/dist/themes/constants/AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT.js +3 -3
- package/package.json +3 -2
|
@@ -6,6 +6,12 @@ const DATE_GROUPING_PROPERTY_1 = require("../../dates/constants/DATE_GROUPING_PR
|
|
|
6
6
|
const DATE_YEAR_MONTHS_1 = require("../../dates/constants/DATE_YEAR_MONTHS");
|
|
7
7
|
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
8
8
|
const isTokenLabel_1 = require("../../tokens/isTokenLabel");
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param label
|
|
12
|
+
* @param dateGroup
|
|
13
|
+
* @param translate
|
|
14
|
+
*/
|
|
9
15
|
function getI18nDateGroupLabel(label, dateGroup, translate) {
|
|
10
16
|
if ((0, isEmpty_1.isEmpty)(label))
|
|
11
17
|
return label;
|
|
@@ -19,14 +25,26 @@ function getI18nDateGroupLabel(label, dateGroup, translate) {
|
|
|
19
25
|
return getI18nYearMonthLabel(label, translate);
|
|
20
26
|
else if (dateGroup === DATE_DISTINCT_PROPERTY_1.DATE_DISTINCT_PROPERTY.YEAR_QUARTER)
|
|
21
27
|
return getI18nYearQuarterLabel(label, translate);
|
|
28
|
+
else if (dateGroup === DATE_DISTINCT_PROPERTY_1.DATE_DISTINCT_PROPERTY.DAY_CUSTOM)
|
|
29
|
+
return getI18nDayCustomLabel(label, translate);
|
|
22
30
|
return label;
|
|
23
31
|
}
|
|
24
32
|
exports.getI18nDateGroupLabel = getI18nDateGroupLabel;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param label
|
|
36
|
+
* @param translate
|
|
37
|
+
*/
|
|
25
38
|
function getI18nMonthLabel(label, translate) {
|
|
26
39
|
const splittedLabel = label.split(" ");
|
|
27
40
|
splittedLabel[0] = getI18nYearMonthLabel(splittedLabel[0], translate);
|
|
28
41
|
return splittedLabel.join(" ");
|
|
29
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @param label
|
|
46
|
+
* @param translate
|
|
47
|
+
*/
|
|
30
48
|
function getI18nYearMonthLabel(label, translate) {
|
|
31
49
|
let newLabel = label;
|
|
32
50
|
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
@@ -36,6 +54,10 @@ function getI18nYearMonthLabel(label, translate) {
|
|
|
36
54
|
}
|
|
37
55
|
return newLabel;
|
|
38
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param index
|
|
60
|
+
*/
|
|
39
61
|
function getI18nMonthPropertyByIndex(index) {
|
|
40
62
|
const months = [
|
|
41
63
|
"january",
|
|
@@ -53,11 +75,21 @@ function getI18nMonthPropertyByIndex(index) {
|
|
|
53
75
|
];
|
|
54
76
|
return months[index];
|
|
55
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @param label
|
|
81
|
+
* @param translate
|
|
82
|
+
*/
|
|
56
83
|
function getI18nQuarterLabel(label, translate) {
|
|
57
84
|
const splittedLabel = label.split(" ");
|
|
58
85
|
splittedLabel[0] = getI18nYearQuarterLabel(splittedLabel[0], translate);
|
|
59
86
|
return splittedLabel.join(" ");
|
|
60
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @param label
|
|
91
|
+
* @param translate
|
|
92
|
+
*/
|
|
61
93
|
function getI18nYearQuarterLabel(label, translate) {
|
|
62
94
|
let newLabel = label;
|
|
63
95
|
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
@@ -65,11 +97,21 @@ function getI18nYearQuarterLabel(label, translate) {
|
|
|
65
97
|
}
|
|
66
98
|
return newLabel;
|
|
67
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @param label
|
|
103
|
+
* @param translate
|
|
104
|
+
*/
|
|
68
105
|
function getI18nWeekLabel(label, translate) {
|
|
69
106
|
const splittedLabel = label.split(" ");
|
|
70
107
|
splittedLabel[0] = getI18nYearWeekLabel(splittedLabel[0], translate);
|
|
71
108
|
return splittedLabel.join(" ");
|
|
72
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @param label
|
|
113
|
+
* @param translate
|
|
114
|
+
*/
|
|
73
115
|
function getI18nYearWeekLabel(label, translate) {
|
|
74
116
|
let newLabel = label;
|
|
75
117
|
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
@@ -77,3 +119,81 @@ function getI18nYearWeekLabel(label, translate) {
|
|
|
77
119
|
}
|
|
78
120
|
return newLabel;
|
|
79
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
* @param label
|
|
125
|
+
* @param translate
|
|
126
|
+
*/
|
|
127
|
+
function getI18nDayCustomLabel(label, translate) {
|
|
128
|
+
const dayMapper = {
|
|
129
|
+
Monday: "monday",
|
|
130
|
+
Tuesday: "tuesday",
|
|
131
|
+
Wednesday: "wednesday",
|
|
132
|
+
Thursday: "thursday",
|
|
133
|
+
Friday: "friday",
|
|
134
|
+
Saturday: "saturday",
|
|
135
|
+
Sunday: "sunday",
|
|
136
|
+
};
|
|
137
|
+
const dayAbbMapper = {
|
|
138
|
+
Mon: "monday",
|
|
139
|
+
Tue: "tuesday",
|
|
140
|
+
Wed: "wednesday",
|
|
141
|
+
Thu: "thursday",
|
|
142
|
+
Fri: "friday",
|
|
143
|
+
Sat: "saturday",
|
|
144
|
+
Sun: "sunday",
|
|
145
|
+
};
|
|
146
|
+
const monthMapper = {
|
|
147
|
+
January: "january",
|
|
148
|
+
February: "february",
|
|
149
|
+
March: "march",
|
|
150
|
+
April: "april",
|
|
151
|
+
May: "may",
|
|
152
|
+
June: "june",
|
|
153
|
+
July: "july",
|
|
154
|
+
August: "august",
|
|
155
|
+
September: "september",
|
|
156
|
+
October: "october",
|
|
157
|
+
November: "november",
|
|
158
|
+
December: "december",
|
|
159
|
+
};
|
|
160
|
+
const monthAbbMapper = {
|
|
161
|
+
Jan: "january",
|
|
162
|
+
Feb: "february",
|
|
163
|
+
Mar: "march",
|
|
164
|
+
Apr: "april",
|
|
165
|
+
May: "may",
|
|
166
|
+
Jun: "june",
|
|
167
|
+
Jul: "july",
|
|
168
|
+
Aug: "august",
|
|
169
|
+
Sep: "september",
|
|
170
|
+
Oct: "october",
|
|
171
|
+
Nov: "november",
|
|
172
|
+
Dec: "december",
|
|
173
|
+
};
|
|
174
|
+
let newLabel = label;
|
|
175
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
176
|
+
const regex = new RegExp([
|
|
177
|
+
...Object.keys(dayMapper),
|
|
178
|
+
...Object.keys(dayAbbMapper),
|
|
179
|
+
...Object.keys(monthMapper),
|
|
180
|
+
...Object.keys(monthAbbMapper),
|
|
181
|
+
].join("|"), "g");
|
|
182
|
+
newLabel = newLabel.replace(regex, (match) => {
|
|
183
|
+
if (dayMapper[match]) {
|
|
184
|
+
return translate(`common.day_names.${dayMapper[match]}_dddd`);
|
|
185
|
+
}
|
|
186
|
+
else if (dayAbbMapper[match]) {
|
|
187
|
+
return translate(`common.day_names.${dayAbbMapper[match]}_ddd`);
|
|
188
|
+
}
|
|
189
|
+
else if (monthMapper[match]) {
|
|
190
|
+
return translate(`common.date_grouping.${monthMapper[match]}_mmmm`);
|
|
191
|
+
}
|
|
192
|
+
else if (monthAbbMapper[match]) {
|
|
193
|
+
return translate(`common.date_grouping.${monthAbbMapper[match]}_mmm`);
|
|
194
|
+
}
|
|
195
|
+
return match;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return newLabel;
|
|
199
|
+
}
|
|
@@ -7,16 +7,20 @@ export interface I18nExportingModal {
|
|
|
7
7
|
cancel_button_label: string;
|
|
8
8
|
error_messages: II18nExportingModalErrorMessages;
|
|
9
9
|
file_name_label: string;
|
|
10
|
+
new_dataset_name_label: string;
|
|
11
|
+
new_dataset_name_placeholder: string;
|
|
10
12
|
recurrence: II18nExportingModalRecurrence;
|
|
11
13
|
time_stamp: II18nExportingModalTimeStamp;
|
|
12
14
|
time_zone_label: string;
|
|
13
15
|
title_label: string;
|
|
16
|
+
title_new_dataset: string;
|
|
14
17
|
uniqueness_concatenate: string;
|
|
15
18
|
toast_messages: {
|
|
16
19
|
failed_scheduling: string;
|
|
17
20
|
successful_scheduling: string;
|
|
18
21
|
};
|
|
19
22
|
pivoting_export: {
|
|
23
|
+
source_label: string;
|
|
20
24
|
dataset_label: string;
|
|
21
25
|
filter_label: string;
|
|
22
26
|
pivoting: {
|
|
@@ -28,12 +32,14 @@ export interface I18nExportingModal {
|
|
|
28
32
|
columns_section: {
|
|
29
33
|
title: string;
|
|
30
34
|
subtitle: string;
|
|
35
|
+
subtitle_new_dataset: string;
|
|
31
36
|
select_all_label: string;
|
|
32
37
|
dataset_columns: string;
|
|
33
38
|
pivot_columns_label: string;
|
|
34
39
|
pivot_columns_sublabel: string;
|
|
35
40
|
};
|
|
36
41
|
columns_to_export_label: string;
|
|
42
|
+
columns_to_create_dataset_label: string;
|
|
37
43
|
no_results_found: string;
|
|
38
44
|
};
|
|
39
45
|
schedule: {
|
|
@@ -102,6 +102,8 @@ exports.I18N_CHART_BUILDER_GENERAL_OPTIONS = {
|
|
|
102
102
|
sorting_by_calculated_value: "Sorting by Calculated Value",
|
|
103
103
|
title: "Sorting",
|
|
104
104
|
value: "Value",
|
|
105
|
+
empty_row_message: "Add rows to apply sorting",
|
|
106
|
+
empty_column_message: "Add columns to apply sorting",
|
|
105
107
|
},
|
|
106
108
|
menu_actions: {
|
|
107
109
|
title: "Self-service Options",
|
|
@@ -5,12 +5,17 @@ exports.EXPORTING_MODAL = void 0;
|
|
|
5
5
|
* @deprecated since version 1.12.0; Qrvey version 8.3. Those default poroperties will be replaced by Qrvey Globalization JSON
|
|
6
6
|
*/
|
|
7
7
|
exports.EXPORTING_MODAL = {
|
|
8
|
-
apply_button_label: {
|
|
8
|
+
apply_button_label: {
|
|
9
|
+
export_now: "Export Now",
|
|
10
|
+
create_dataset: "Create Dataset",
|
|
11
|
+
},
|
|
9
12
|
cancel_button_label: "Cancel",
|
|
10
13
|
error_messages: {
|
|
11
14
|
special_characters: "Special characters are not allowed in file name.",
|
|
12
15
|
},
|
|
13
16
|
file_name_label: "File Name",
|
|
17
|
+
new_dataset_name_label: "New Dataset Name",
|
|
18
|
+
new_dataset_name_placeholder: "Type",
|
|
14
19
|
recurrence: {
|
|
15
20
|
label: "Recurrence",
|
|
16
21
|
value: { does_not_repeat: "Does not repeat" },
|
|
@@ -22,12 +27,14 @@ exports.EXPORTING_MODAL = {
|
|
|
22
27
|
},
|
|
23
28
|
time_zone_label: "Time Zone",
|
|
24
29
|
title_label: "Export",
|
|
30
|
+
title_new_dataset: "New Dataset",
|
|
25
31
|
uniqueness_concatenate: "For Uniqueness Concatenate",
|
|
26
32
|
toast_messages: {
|
|
27
33
|
failed_scheduling: "The export could not be scheduled at this time.",
|
|
28
34
|
successful_scheduling: "The export of {{fileName}} has been scheduled successfully.",
|
|
29
35
|
},
|
|
30
36
|
pivoting_export: {
|
|
37
|
+
source_label: "Source",
|
|
31
38
|
dataset_label: "Dataset",
|
|
32
39
|
filter_label: "Filter",
|
|
33
40
|
pivoting: {
|
|
@@ -39,12 +46,14 @@ exports.EXPORTING_MODAL = {
|
|
|
39
46
|
columns_section: {
|
|
40
47
|
title: "Columns",
|
|
41
48
|
subtitle: "(Select columns to export)",
|
|
49
|
+
subtitle_new_dataset: "(Select columns for new dataset)",
|
|
42
50
|
select_all_label: "Add All Columns",
|
|
43
51
|
dataset_columns: "Dataset Columns",
|
|
44
52
|
pivot_columns_label: "Pivot Columns",
|
|
45
53
|
pivot_columns_sublabel: "Displaying only the first 100 results.",
|
|
46
54
|
},
|
|
47
55
|
columns_to_export_label: "Columns to export",
|
|
56
|
+
columns_to_create_dataset_label: "Dataset columns",
|
|
48
57
|
no_results_found: "No results found",
|
|
49
58
|
},
|
|
50
59
|
schedule: {
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -32,3 +32,4 @@ __exportStar(require("./typescript/index"), exports);
|
|
|
32
32
|
__exportStar(require("./tokens/index"), exports);
|
|
33
33
|
__exportStar(require("./column_format/index"), exports);
|
|
34
34
|
__exportStar(require("./themes/index"), exports);
|
|
35
|
+
__exportStar(require("./elements/index"), exports);
|
|
@@ -6,10 +6,10 @@ const GLOBAL_CSS_VARIABLES_1 = require("./GLOBAL_CSS_VARIABLES");
|
|
|
6
6
|
* Collection of CSS Variables for Light Themes and its assigned values.
|
|
7
7
|
*/
|
|
8
8
|
exports.AUTOMATIC_GLOBAL_CSS_VARIABLES_FOR_LIGHT = {
|
|
9
|
-
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.HEADER_BACKGROUND_COLOR]: "#
|
|
9
|
+
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.HEADER_BACKGROUND_COLOR]: "#F7F8FB",
|
|
10
10
|
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.BACKGROUND_OPACITY_BLACK_COLOR]: "#FFFFFF10",
|
|
11
|
-
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.BORDER_COLOR]: "#
|
|
12
|
-
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.DIVIDER_COLOR]: "#
|
|
11
|
+
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.BORDER_COLOR]: "#00000017",
|
|
12
|
+
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.DIVIDER_COLOR]: "#00000010",
|
|
13
13
|
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.HOVER_COLOR]: "#00000010",
|
|
14
14
|
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.PLACEHOLDER_COLOR]: "#00000070",
|
|
15
15
|
[GLOBAL_CSS_VARIABLES_1.GLOBAL_CSS_VARIABLES.PILLS_BACKGROUND_COLOR]: "#FFFFFF40",
|
|
@@ -3,36 +3,36 @@ import { COMPLEX_COLUMN } from "./COMPLEX_COLUMN";
|
|
|
3
3
|
import { COMPOUND_COLUMN } from "./COMPOUND_COLUMN";
|
|
4
4
|
import { NUMERICAL_COLUMN } from "./NUMERICAL_COLUMN";
|
|
5
5
|
export const COLUMN_ICON = {
|
|
6
|
-
[NUMERICAL_COLUMN.RATING]: "q-icon-
|
|
7
|
-
[COMPLEX_COLUMN.TEXTFIELD]: "q-icon-short-text",
|
|
8
|
-
[COMPLEX_COLUMN.LONGTEXT]: "q-icon-long-text",
|
|
9
|
-
[COLUMN.TEXT_LABEL]: "q-icon-
|
|
10
|
-
[COLUMN.TEXT_CATEGORY]: "q-icon-
|
|
11
|
-
[COLUMN.YES_NO]: "q-icon-yes-no",
|
|
12
|
-
[COLUMN.RANKING]: "q-icon-ranking",
|
|
13
|
-
[COLUMN.DATE]: "q-icon-date",
|
|
14
|
-
[COLUMN.TIME]: "q-icon-time",
|
|
15
|
-
[NUMERICAL_COLUMN.SLIDEBAR]: "q-icon-
|
|
16
|
-
[COMPLEX_COLUMN.IMAGEUPLOAD]: "q-icon-image-upload",
|
|
17
|
-
[COLUMN.SIGNATURE]: "q-icon-signature",
|
|
18
|
-
[COMPLEX_COLUMN.EXPRESSION]: "q-icon-expression",
|
|
19
|
-
[NUMERICAL_COLUMN.NUMERIC]: "q-icon-numeric",
|
|
20
|
-
[COLUMN.IMAGE]: "q-icon-image",
|
|
21
|
-
[COMPOUND_COLUMN.NAME]: "q-icon-name",
|
|
22
|
-
[COLUMN.EMAIL_FORM]: "q-icon-email",
|
|
23
|
-
[COLUMN.PHONE]: "q-icon-phone",
|
|
24
|
-
[COMPOUND_COLUMN.USADDRESS]: "q-icon-us-address",
|
|
25
|
-
[COMPOUND_COLUMN.ADDRESS]: "q-icon-address",
|
|
26
|
-
[COLUMN.PASSWORD]: "q-icon-password",
|
|
27
|
-
[COLUMN.DROPDOWN]: "q-icon-dropdown",
|
|
28
|
-
[COLUMN.LOOKUP]: "q-icon-
|
|
29
|
-
[COLUMN.SINGLE_CHOICE]: "q-icon-multiple-choice",
|
|
30
|
-
[COLUMN.MULTIPLE_CHOICE]: "q-icon-multiple-choice",
|
|
31
|
-
[COLUMN.BUCKET]: "q-icon-
|
|
32
|
-
[COLUMN.FORMULA]: "q-icon-formula",
|
|
33
|
-
[COLUMN.TEXT_FORMULA]: "q-icon-formula",
|
|
34
|
-
[COLUMN.DATE_FORMULA]: "q-icon-formula",
|
|
35
|
-
[COLUMN.NUMERIC_FORMULA]: "q-icon-formula",
|
|
36
|
-
[COMPLEX_COLUMN.FILEUPLOAD]: "q-icon-
|
|
37
|
-
[COLUMN.AGGREGATED_FORMULA]: "q-icon-
|
|
6
|
+
[NUMERICAL_COLUMN.RATING]: "new-q-icon-wf-rating",
|
|
7
|
+
[COMPLEX_COLUMN.TEXTFIELD]: "new-q-icon-wf-short-text",
|
|
8
|
+
[COMPLEX_COLUMN.LONGTEXT]: "new-q-icon-wf-long-text",
|
|
9
|
+
[COLUMN.TEXT_LABEL]: "new-q-icon-qv-justify-left",
|
|
10
|
+
[COLUMN.TEXT_CATEGORY]: "new-q-icon-qv-justify-left",
|
|
11
|
+
[COLUMN.YES_NO]: "new-q-icon-wf-yes-no",
|
|
12
|
+
[COLUMN.RANKING]: "new-q-icon-wf-ranking",
|
|
13
|
+
[COLUMN.DATE]: "new-q-icon-wf-date",
|
|
14
|
+
[COLUMN.TIME]: "new-q-icon-wf-dt-time",
|
|
15
|
+
[NUMERICAL_COLUMN.SLIDEBAR]: "new-q-icon-wf-slide-bar",
|
|
16
|
+
[COMPLEX_COLUMN.IMAGEUPLOAD]: "new-q-icon-wf-image-upload",
|
|
17
|
+
[COLUMN.SIGNATURE]: "new-q-icon-wf-signature",
|
|
18
|
+
[COMPLEX_COLUMN.EXPRESSION]: "new-q-icon-wf-expression",
|
|
19
|
+
[NUMERICAL_COLUMN.NUMERIC]: "new-q-icon-wf-numeric",
|
|
20
|
+
[COLUMN.IMAGE]: "new-q-icon-wf-image",
|
|
21
|
+
[COMPOUND_COLUMN.NAME]: "new-q-icon-wf-name",
|
|
22
|
+
[COLUMN.EMAIL_FORM]: "new-q-icon-wf-email",
|
|
23
|
+
[COLUMN.PHONE]: "new-q-icon-wf-phone-number",
|
|
24
|
+
[COMPOUND_COLUMN.USADDRESS]: "new-q-icon-wf-us-address",
|
|
25
|
+
[COMPOUND_COLUMN.ADDRESS]: "new-q-icon-wf-address",
|
|
26
|
+
[COLUMN.PASSWORD]: "new-q-icon-wf-password",
|
|
27
|
+
[COLUMN.DROPDOWN]: "new-q-icon-wf-dropdown",
|
|
28
|
+
[COLUMN.LOOKUP]: "new-q-icon-wf-lookup",
|
|
29
|
+
[COLUMN.SINGLE_CHOICE]: "new-q-icon-wf-multiple-choice",
|
|
30
|
+
[COLUMN.MULTIPLE_CHOICE]: "new-q-icon-wf-multiple-choice",
|
|
31
|
+
[COLUMN.BUCKET]: "new-q-icon-an-buckets",
|
|
32
|
+
[COLUMN.FORMULA]: "new-q-icon-an-formula",
|
|
33
|
+
[COLUMN.TEXT_FORMULA]: "new-q-icon-an-formula",
|
|
34
|
+
[COLUMN.DATE_FORMULA]: "new-q-icon-an-formula",
|
|
35
|
+
[COLUMN.NUMERIC_FORMULA]: "new-q-icon-an-formula",
|
|
36
|
+
[COMPLEX_COLUMN.FILEUPLOAD]: "new-q-icon-wf-file-upload",
|
|
37
|
+
[COLUMN.AGGREGATED_FORMULA]: "new-q-icon-wf-dt-array-aggregate",
|
|
38
38
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IColumn } from "../interfaces/IColumn";
|
|
2
2
|
/**
|
|
3
3
|
* Validates if the given column is numerical type
|
|
4
|
-
* @param
|
|
4
|
+
* @param column the column info
|
|
5
5
|
* @returns true: the column is numerical type
|
|
6
6
|
*/
|
|
7
7
|
export declare const isNumericalColumn: (column: IColumn) => boolean;
|
|
@@ -5,7 +5,7 @@ import { COLUMN } from "../constants/COLUMN";
|
|
|
5
5
|
import { NUMERICAL_COLUMNS } from "../constants/NUMERICAL_COLUMNS";
|
|
6
6
|
/**
|
|
7
7
|
* Validates if the given column is numerical type
|
|
8
|
-
* @param
|
|
8
|
+
* @param column the column info
|
|
9
9
|
* @returns true: the column is numerical type
|
|
10
10
|
*/
|
|
11
11
|
export const isNumericalColumn = (column) => !isEmpty(column) &&
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FORMULA } from "../../formulas/constants/FORMULA";
|
|
2
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
3
|
+
import { isObject } from "../../general/object/isObject";
|
|
4
|
+
import { COLUMN } from "../constants/COLUMN";
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the given column is text type
|
|
7
|
+
* @param column the column info
|
|
8
|
+
* @returns true: the column is numerical type
|
|
9
|
+
*/
|
|
10
|
+
export const isStringColumn = (column) => !isEmpty(column) &&
|
|
11
|
+
isObject(column) &&
|
|
12
|
+
([COLUMN.TEXT_LABEL, COLUMN.LONGTEXT, COLUMN.TEXT_FORMULA].includes(column.type) ||
|
|
13
|
+
(column.type === COLUMN.FORMULA && column.formulaType === FORMULA.TEXT) ||
|
|
14
|
+
(column.type === COLUMN.AGGREGATED_FORMULA &&
|
|
15
|
+
column.formulaType === FORMULA.TEXT));
|
|
@@ -6,6 +6,7 @@ import { getStatementCase } from "./helpers/getStatementCase";
|
|
|
6
6
|
import { DATE_GROUPING_PROPERTY } from "../constants/DATE_GROUPING_PROPERTY";
|
|
7
7
|
import { parseDate } from "./helpers/parseDate";
|
|
8
8
|
import { DATETIME_FORMAT } from "./constants/DATE_FORMATS";
|
|
9
|
+
import { isEmpty } from "../../general";
|
|
9
10
|
export class RelativeStatementAdapter {
|
|
10
11
|
constructor(statement, now = new Date()) {
|
|
11
12
|
this.statement =
|
|
@@ -19,7 +20,7 @@ export class RelativeStatementAdapter {
|
|
|
19
20
|
return this.get("unit");
|
|
20
21
|
}
|
|
21
22
|
get anchor() {
|
|
22
|
-
return this.get("anchor");
|
|
23
|
+
return isEmpty(this.get("anchor")) ? undefined : this.get("anchor");
|
|
23
24
|
}
|
|
24
25
|
get number() {
|
|
25
26
|
return this.get("number");
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { CanvasDevice } from "../interfaces/ICanvasGrid";
|
|
2
|
+
import { FindAvailablePositionOptions } from "../interfaces/IFixedPosition";
|
|
3
|
+
import { VemFixed } from "../interfaces/IVemCore";
|
|
4
|
+
import { VemPositionFixed } from "../interfaces/IVemPosition";
|
|
5
|
+
/**
|
|
6
|
+
* update the position for a specific device
|
|
7
|
+
* @param element element to be updated
|
|
8
|
+
* @param newDevicePosition new position attributes for the element
|
|
9
|
+
* @param device device for the update
|
|
10
|
+
* @returns new element with its position updated
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateFixedPosition(element: VemFixed, newDevicePosition: Partial<VemPositionFixed>, device: CanvasDevice): VemFixed;
|
|
13
|
+
/**
|
|
14
|
+
* Finds the first available position within a canvas where a new element can be placed without overlapping existing elements.
|
|
15
|
+
* @param canvasWidth - The width of the canvas in pixels.
|
|
16
|
+
* @param newElement - The new element to be placed, with fixed position properties.
|
|
17
|
+
* @param elements - The list of existing elements on the canvas.
|
|
18
|
+
* @param device - The device type (e.g., desktop, tablet, mobile) for determining element positions.
|
|
19
|
+
* @param [options] - Additional options for position finding.
|
|
20
|
+
* @param [options.canvasHeight] - The maximum height of the canvas in pixels. Defaults to `Infinity`.
|
|
21
|
+
* @param [options.findRightToLeft] - Whether to search for positions from right to left. Defaults to `false`.
|
|
22
|
+
* @param [options.initialY] - The initial Y-coordinate to start the search. Defaults to `0`.
|
|
23
|
+
* @returns - The x and y coordinates of the first available position.
|
|
24
|
+
* @throws {Error} - Throws an error if no valid position is found and `canvasHeight` is not specified.
|
|
25
|
+
*/
|
|
26
|
+
export declare function findAvailablePosition(canvasWidth: number, newElement: VemFixed, elements: VemFixed[], device: CanvasDevice, options?: FindAvailablePositionOptions): {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const getFixedPositionByDevice: (item: VemFixed, device: CanvasDevice) => VemPositionFixed | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Finds available positions for multiple new elements within a canvas, ensuring they do not overlap with existing elements.
|
|
33
|
+
* @param canvasWidth - The width of the canvas in pixels.
|
|
34
|
+
* @param newElements - The list of new elements to be positioned, each with fixed position properties.
|
|
35
|
+
* @param elements - The list of existing elements on the canvas.
|
|
36
|
+
* @param device - The device type (e.g., desktop, tablet, mobile) for determining element positions.
|
|
37
|
+
* @param [startWithPositionY] - Whether to start the position search for each new element based on its initial Y-coordinate. Defaults to `false`.
|
|
38
|
+
* @param [findRightToLeft] - Whether to search for positions from right to left. Defaults to `false`.
|
|
39
|
+
* @param [canvasHeight] - The maximum height of the canvas in pixels. If not provided, the search height is unlimited.
|
|
40
|
+
* @returns List of elements with their recalculated positions.
|
|
41
|
+
*/
|
|
42
|
+
export declare function findFixedAvailablePositions(canvasWidth: number, newElements: VemFixed[], elements: VemFixed[], device: CanvasDevice, startWithPositionY?: boolean, findRightToLeft?: boolean, canvasHeight?: number): VemFixed[];
|
|
43
|
+
/**
|
|
44
|
+
* Recalculates the positions of elements on the canvas, preserving the position of those
|
|
45
|
+
* that meet certain conditions (no overflow or overlap). Elements that do not meet these
|
|
46
|
+
* conditions are recalculated to find a new valid position.
|
|
47
|
+
* @param elements - List of elements to recalculate.
|
|
48
|
+
* @param device - The device on which the canvas is being rendered.
|
|
49
|
+
* @param resolution - The resolution of the canvas.
|
|
50
|
+
* @param [canvasHeight] - Optional height of the canvas.
|
|
51
|
+
* @returns - List of elements with their recalculated positions.
|
|
52
|
+
*/
|
|
53
|
+
export declare const recalculatePreservingPositions: (elements: VemFixed[], device: CanvasDevice, resolution: number, canvasHeight?: number) => VemFixed[];
|
|
54
|
+
/**
|
|
55
|
+
* Adjusts the `width` of a fixed element to fit within the specified canvas width and updates its position.
|
|
56
|
+
* @param element - The fixed element to adjust.
|
|
57
|
+
* @param canvasWidth - The width of the canvas in grid columns.
|
|
58
|
+
* @param canvasDevice - The target device type (e.g., desktop, tablet, mobile).
|
|
59
|
+
* @returns - The updated responsive element with an adjusted `width`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function updateFixedElementWidth(element: VemFixed, canvasWidth: number, canvasDevice: CanvasDevice): VemFixed;
|
|
62
|
+
/**
|
|
63
|
+
* @param elements elements to calculate
|
|
64
|
+
* @param device current device
|
|
65
|
+
* @returns height
|
|
66
|
+
*/
|
|
67
|
+
export declare const getFixedGridElementsBottomLimit: (elements: VemFixed[], device: CanvasDevice) => number;
|
|
68
|
+
/**
|
|
69
|
+
* Calculates distances of elements from a given reference point on the canvas device.
|
|
70
|
+
* @param elements - Array of `VemFixed` elements to calculate distances for.
|
|
71
|
+
* @param device - Canvas device providing the coordinates of the elements.
|
|
72
|
+
* @param referencePoint - The reference point to calculate distances from.
|
|
73
|
+
* @param referencePoint.x
|
|
74
|
+
* @param referencePoint.y
|
|
75
|
+
* @returns An array of objects containing the original elements and their calculated distances from the reference point.
|
|
76
|
+
*/
|
|
77
|
+
export declare const calculateDistancesToReferencePoint: (elements: VemFixed[], device: CanvasDevice, referencePoint: {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
}) => {
|
|
81
|
+
distance: number;
|
|
82
|
+
element: VemFixed;
|
|
83
|
+
}[];
|
|
84
|
+
/**
|
|
85
|
+
* Sorts elements based on their distance from a reference point on the canvas.
|
|
86
|
+
* @param elements - Array of `VemFixed` elements to be sorted.
|
|
87
|
+
* @param device - Canvas device providing the coordinates of the elements.
|
|
88
|
+
* @param referencePoint - The reference point to calculate distances from.
|
|
89
|
+
* @param referencePoint.x
|
|
90
|
+
* @param referencePoint.y
|
|
91
|
+
* @returns An array of `VemFixed` elements sorted by their distance from the reference point (0, 0).
|
|
92
|
+
*/
|
|
93
|
+
export declare const sortElementsFromReferencePoint: (elements: VemFixed<unknown>[], device: CanvasDevice, referencePoint: {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
}) => VemFixed<unknown>[];
|