@qrvey/utils 1.2.9-34 → 1.2.9-37
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 +753 -753
- package/bitbucket-pipelines.yml +1 -1
- package/dist/cjs/charts/constants/index.js +5 -1
- package/dist/cjs/charts/helpers/index.js +5 -1
- package/dist/cjs/charts/index.js +5 -1
- package/dist/cjs/charts/interfaces/index.js +5 -1
- package/dist/cjs/columns/constants/COLUMN_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
- package/dist/cjs/columns/constants/index.js +5 -1
- package/dist/cjs/columns/helpers/index.js +5 -1
- package/dist/cjs/columns/index.js +5 -1
- package/dist/cjs/columns/interfaces/index.js +5 -1
- package/dist/cjs/constants/index.js +5 -1
- package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSION.js +1 -1
- package/dist/cjs/dates/constants/index.js +5 -1
- package/dist/cjs/dates/helpers/getSeparatorByDateFormat.js +1 -1
- package/dist/cjs/dates/helpers/index.js +5 -1
- package/dist/cjs/dates/index.js +5 -1
- package/dist/cjs/dates/interfaces/index.js +5 -1
- package/dist/cjs/dates/range/index.js +5 -1
- package/dist/cjs/dates/relative/constants/index.js +5 -1
- package/dist/cjs/dates/relative/constants/ui/index.js +5 -1
- package/dist/cjs/dates/relative/helpers/dayjs-module.js +5 -1
- package/dist/cjs/dates/relative/helpers/index.js +5 -1
- package/dist/cjs/dates/relative/index.js +5 -1
- package/dist/cjs/dates/relative/interfaces/index.js +5 -1
- package/dist/cjs/dates/relative/interfaces/ui/index.js +5 -1
- package/dist/cjs/filters/adapters/index.js +5 -1
- package/dist/cjs/filters/classes/index.js +5 -1
- package/dist/cjs/filters/constants/backend/index.js +5 -1
- package/dist/cjs/filters/constants/builder/index.js +5 -1
- package/dist/cjs/filters/constants/common/index.js +5 -1
- package/dist/cjs/filters/constants/index.js +5 -1
- package/dist/cjs/filters/constants/panel/index.js +5 -1
- package/dist/cjs/filters/helpers/backend/index.js +5 -1
- package/dist/cjs/filters/helpers/builder/index.js +5 -1
- package/dist/cjs/filters/helpers/common/index.js +5 -1
- package/dist/cjs/filters/helpers/index.js +5 -1
- package/dist/cjs/filters/helpers/ui/index.js +5 -1
- package/dist/cjs/filters/index.js +5 -1
- package/dist/cjs/filters/interfaces/backend/index.js +5 -1
- package/dist/cjs/filters/interfaces/builder/index.js +5 -1
- package/dist/cjs/filters/interfaces/common/index.js +5 -1
- package/dist/cjs/filters/interfaces/index.js +5 -1
- package/dist/cjs/filters/interfaces/panel/index.js +5 -1
- package/dist/cjs/filters/interfaces/ui/index.js +5 -1
- package/dist/cjs/format/format.d.ts +1 -1
- package/dist/cjs/format/format.js +3 -0
- package/dist/cjs/format/index.js +5 -1
- package/dist/cjs/format/localization.js +18 -4
- package/dist/cjs/formulas/constants/index.js +5 -1
- package/dist/cjs/formulas/index.js +5 -1
- package/dist/cjs/formulas/interfaces/index.js +5 -1
- package/dist/cjs/general/array/index.js +5 -1
- package/dist/cjs/general/function/index.js +5 -1
- package/dist/cjs/general/index.js +5 -1
- package/dist/cjs/general/mix/index.js +5 -1
- package/dist/cjs/general/object/index.js +5 -1
- package/dist/cjs/general/string/index.js +5 -1
- package/dist/cjs/globalization/helpers/index.js +5 -1
- package/dist/cjs/globalization/index.js +5 -1
- package/dist/cjs/globalization/interfaces/bucket_builder/index.js +5 -1
- package/dist/cjs/globalization/interfaces/calendar/index.js +5 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/chart_builder/index.js +5 -1
- package/dist/cjs/globalization/interfaces/columns/index.js +5 -1
- package/dist/cjs/globalization/interfaces/common/II18nColumnTypes.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/common/index.js +5 -1
- package/dist/cjs/globalization/interfaces/cross_tabs/index.js +5 -1
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/dashboard/index.js +5 -1
- package/dist/cjs/globalization/interfaces/filters/index.js +5 -1
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.d.ts +3 -3
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.d.ts +5 -5
- package/dist/cjs/globalization/interfaces/formula_builder/index.js +5 -1
- package/dist/cjs/globalization/interfaces/index.js +5 -1
- package/dist/cjs/globalization/interfaces/panel/index.js +5 -1
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/index.js +5 -1
- package/dist/cjs/globalization/interfaces/table_charts/index.js +5 -1
- package/dist/cjs/globalization/labels/bucket_builder/index.js +5 -1
- package/dist/cjs/globalization/labels/calendar/index.js +5 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +6 -0
- package/dist/cjs/globalization/labels/chart_builder/index.js +5 -1
- package/dist/cjs/globalization/labels/columns/index.js +5 -1
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
- package/dist/cjs/globalization/labels/common/index.js +5 -1
- package/dist/cjs/globalization/labels/cross_tabs/index.js +5 -1
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/cjs/globalization/labels/dashboard/index.js +5 -1
- package/dist/cjs/globalization/labels/filters/index.js +5 -1
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +9 -9
- package/dist/cjs/globalization/labels/formula_builder/index.js +5 -1
- package/dist/cjs/globalization/labels/index.js +5 -1
- package/dist/cjs/globalization/labels/panel/index.js +5 -1
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
- package/dist/cjs/globalization/labels/style_themes/index.js +5 -1
- package/dist/cjs/globalization/labels/table_charts/index.js +5 -1
- package/dist/cjs/globalization/service/index.js +5 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/interfaces/format/index.js +5 -1
- package/dist/cjs/interfaces/general/index.js +5 -1
- package/dist/cjs/interfaces/index.js +5 -1
- package/dist/cjs/qrvey/constants/index.js +5 -1
- package/dist/cjs/qrvey/helpers/index.js +5 -1
- package/dist/cjs/qrvey/index.js +5 -1
- package/dist/cjs/qrvey/interfaces/index.js +5 -1
- package/dist/cjs/services/adapters/index.js +5 -1
- package/dist/cjs/services/api/index.js +5 -1
- package/dist/cjs/services/constants/index.js +5 -1
- package/dist/cjs/services/helpers/index.js +5 -1
- package/dist/cjs/services/index.js +5 -1
- package/dist/cjs/services/interfaces/index.js +5 -1
- package/dist/cjs/stencil/decorators/index.js +5 -1
- package/dist/cjs/stencil/index.js +5 -1
- package/dist/cjs/stencil/util/index.js +5 -1
- package/dist/cjs/tokens/index.js +5 -1
- package/dist/cjs/typescript/decorators/index.js +5 -1
- package/dist/cjs/typescript/index.js +5 -1
- package/dist/columns/constants/COLUMN_LABEL.d.ts +1 -0
- package/dist/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY_INFO.js +1 -1
- package/dist/dates/constants/DATE_REGULAR_EXPRESSION.js +1 -1
- package/dist/dates/helpers/getSeparatorByDateFormat.js +1 -1
- package/dist/format/format.d.ts +1 -1
- package/dist/format/format.js +3 -0
- package/dist/format/localization.js +18 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.d.ts +6 -0
- package/dist/globalization/interfaces/common/II18nColumnTypes.d.ts +1 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.d.ts +3 -3
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.d.ts +5 -5
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +6 -0
- package/dist/globalization/labels/common/I18N_COLUMN_LABEL.d.ts +1 -0
- package/dist/globalization/labels/common/I18N_COLUMN_LABEL.js +1 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +9 -9
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
- package/package.json +22 -16
- package/scripts/clean-build/index.js +62 -0
- package/scripts/generating-docs/index.js +133 -0
- package/{prepareToPublish.js → scripts/prepare-publish/index.js} +0 -0
- package/scripts/publishing/index.js +209 -0
- package/src/columns/constants/COLUMN_LABEL.ts +1 -0
- package/src/columns/constants/COLUMN_PROPERTY_INFO.ts +1 -1
- package/src/dates/constants/DATE_REGULAR_EXPRESSION.ts +1 -1
- package/src/dates/helpers/getSeparatorByDateFormat.ts +1 -1
- package/src/dates/helpers/validateDate.ts +1 -1
- package/src/dates/helpers/validateDateByDateFormat.ts +1 -1
- package/src/format/format.ts +3 -1
- package/src/format/localization.ts +16 -2
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderTableStyleOptions.ts +6 -0
- package/src/globalization/interfaces/common/II18nColumnTypes.ts +1 -0
- package/src/globalization/interfaces/dashboard/II18nDashboardToast.ts +1 -0
- package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderDeleteDialog.ts +3 -3
- package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderListTable.ts +5 -5
- package/src/globalization/interfaces/style_themes/II18nStyleThemesTheme.ts +2 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +6 -0
- package/src/globalization/labels/common/I18N_COLUMN_LABEL.ts +1 -0
- package/src/globalization/labels/dashboard/I18N_DASHBOARD.ts +1 -0
- package/src/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.ts +9 -9
- package/src/globalization/labels/style_themes/I18N_STYLE_THEMES.ts +2 -0
|
@@ -27,6 +27,7 @@ export const formatWithLocale = (value: any, outputFormat: IFormatOutputFormat,
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
const DATE_FORMAT_CACHE = [];
|
|
30
31
|
function formatLocaleDate(value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig) {
|
|
31
32
|
const { lang = LANG_DEFAULT, options } = config;
|
|
32
33
|
const dateValue = value?.replace(/Z$/i, '');
|
|
@@ -37,18 +38,31 @@ function formatLocaleDate(value: any, outputFormat: IFormatOutputFormat, config:
|
|
|
37
38
|
if (DATETIME_COLUMN_FORMAT.includes(format)) langOpts = DATETIME_OPTIONS;
|
|
38
39
|
}
|
|
39
40
|
try {
|
|
40
|
-
|
|
41
|
+
const key = lang + JSON.stringify(langOpts);
|
|
42
|
+
let formatter = DATE_FORMAT_CACHE[key];
|
|
43
|
+
if (!formatter) {
|
|
44
|
+
formatter = new Intl.DateTimeFormat([lang, LANG_DEFAULT], langOpts);
|
|
45
|
+
DATE_FORMAT_CACHE[key] = formatter;
|
|
46
|
+
}
|
|
47
|
+
return formatter.format(dateParam);
|
|
41
48
|
} catch (error) {
|
|
42
49
|
return isEmpty(dateParam) ? value : new Intl.DateTimeFormat(LANG_DEFAULT, langOpts).format(dateParam);
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
|
|
53
|
+
const NUMBER_FORMAT_CACHE = [];
|
|
46
54
|
function formatLocaleNumber(value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig,) {
|
|
47
55
|
const { lang = LANG_DEFAULT, options } = config;
|
|
48
56
|
const langOpts = options || getLocaleOptions(outputFormat);
|
|
49
57
|
const valueToFormat = outputFormat?.format === LOCALE_FORMATS.PERCENTAGE ? value/100 : value;
|
|
50
58
|
try {
|
|
51
|
-
|
|
59
|
+
const key = lang + JSON.stringify(langOpts);
|
|
60
|
+
let formatter = NUMBER_FORMAT_CACHE[key];
|
|
61
|
+
if (!formatter) {
|
|
62
|
+
formatter = new Intl.NumberFormat([lang, LANG_DEFAULT], langOpts);
|
|
63
|
+
NUMBER_FORMAT_CACHE[key] = formatter;
|
|
64
|
+
}
|
|
65
|
+
return formatter.format(valueToFormat);
|
|
52
66
|
} catch (e) {
|
|
53
67
|
return new Intl.NumberFormat(LANG_DEFAULT, langOpts).format(valueToFormat);
|
|
54
68
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface II18nFormulaBuilderListTable{
|
|
2
|
-
name: string;
|
|
3
|
-
formula: string;
|
|
4
|
-
menu_edit: string;
|
|
5
|
-
menu_duplicate: string;
|
|
6
|
-
menu_delete: string;
|
|
7
2
|
duplicate_copy: string;
|
|
8
3
|
duplicate_toast: string
|
|
4
|
+
formula: string;
|
|
5
|
+
menu_delete: string;
|
|
6
|
+
menu_duplicate: string;
|
|
7
|
+
menu_edit: string;
|
|
8
|
+
name: string;
|
|
9
9
|
}
|
|
@@ -13,10 +13,12 @@ export interface II18nStyleThemesTheme {
|
|
|
13
13
|
legends: string;
|
|
14
14
|
main_color: string;
|
|
15
15
|
name_placeholder: string;
|
|
16
|
+
panel_background: string;
|
|
16
17
|
panel_styles: string;
|
|
17
18
|
qrvey_theme: string;
|
|
18
19
|
restore_to_default: string;
|
|
19
20
|
save_theme: string;
|
|
21
|
+
show_title: string;
|
|
20
22
|
table_header_styles: string;
|
|
21
23
|
text_styles: string;
|
|
22
24
|
tooltips: string;
|
|
@@ -188,6 +188,12 @@ export const I18N_CHART_BUILDER_STYLE_OPTIONS: Pick<II18nChartBuilder, StyleOpti
|
|
|
188
188
|
target_value: 'Target Value'
|
|
189
189
|
},
|
|
190
190
|
table_style_options: {
|
|
191
|
+
align: 'Align',
|
|
192
|
+
align_all_columns: 'All Columns',
|
|
193
|
+
align_default: 'Default',
|
|
194
|
+
align_left: 'Align Left',
|
|
195
|
+
align_right: 'Align Right',
|
|
196
|
+
align_center: 'Align Center',
|
|
191
197
|
typeface: 'Typeface',
|
|
192
198
|
weight: 'Weight',
|
|
193
199
|
weight_bold: 'Bold',
|
|
@@ -21,6 +21,7 @@ export const I18N_COLUMN_LABEL = {
|
|
|
21
21
|
checklist_label: COLUMN_LABEL.CHECKLIST,
|
|
22
22
|
nps_score_label: COLUMN_LABEL.NPS_SCORE,
|
|
23
23
|
nps_feedback_label: COLUMN_LABEL.NPS_FEEDBACK,
|
|
24
|
+
text_label: COLUMN_LABEL.TEXT,
|
|
24
25
|
text_label_label: COLUMN_LABEL.TEXT_LABEL,
|
|
25
26
|
text_category_label: COLUMN_LABEL.TEXT_CATEGORY,
|
|
26
27
|
lookup_label: COLUMN_LABEL.LOOKUP,
|
|
@@ -25,6 +25,7 @@ export const I18N_DASHBOARD: II18nDashboard = {
|
|
|
25
25
|
data_views_updated_message: 'Data views updated successfully.',
|
|
26
26
|
delete_record_message: 'Record Successfully Deleted.',
|
|
27
27
|
refresh_table_message: 'Record Successfully Edited.',
|
|
28
|
+
failed_download: 'The file(s) could not be exported at this time.',
|
|
28
29
|
},
|
|
29
30
|
tooltips: {
|
|
30
31
|
buckets: "Buckets",
|
|
@@ -9,20 +9,20 @@ export const I18N_FORMULA_BUILDER: II18nFormulaBuilder = {
|
|
|
9
9
|
information_text_text: 'create and work with formulas',
|
|
10
10
|
},
|
|
11
11
|
list_table: {
|
|
12
|
-
|
|
12
|
+
duplicate_copy: 'Copy',
|
|
13
|
+
duplicate_toast: 'Formula Duplicated Successfully',
|
|
13
14
|
formula: 'Formula',
|
|
14
|
-
menu_edit: 'Edit',
|
|
15
|
-
menu_duplicate: 'Duplicate',
|
|
16
15
|
menu_delete: 'Delete',
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
menu_duplicate: 'Duplicate',
|
|
17
|
+
menu_edit: 'Edit',
|
|
18
|
+
name: 'Formula Name'
|
|
19
19
|
},
|
|
20
20
|
delete_dialog: {
|
|
21
|
-
|
|
22
|
-
description: 'Deleting this formula will remove all instances of this calculation in your analytics.',
|
|
23
|
-
toast_description: 'Formula Successfully Deleted',
|
|
21
|
+
apply_button: 'Delete',
|
|
24
22
|
cancel_button: 'Cancel',
|
|
25
|
-
|
|
23
|
+
description: 'Deleting this formula will remove all instances of this calculation in your analytics.',
|
|
24
|
+
title: 'Delete Formula',
|
|
25
|
+
toast_description: 'Formula Deleted Successfully'
|
|
26
26
|
},
|
|
27
27
|
create_modal: {
|
|
28
28
|
title_header_create: 'Create Formula',
|
|
@@ -37,10 +37,12 @@ export const I18N_STYLE_THEMES: II18nStyleThemes = {
|
|
|
37
37
|
legends: 'Legends',
|
|
38
38
|
main_color: 'Main Color',
|
|
39
39
|
name_placeholder: 'Type name',
|
|
40
|
+
panel_background: 'Panel Background',
|
|
40
41
|
panel_styles: 'Panel Styles',
|
|
41
42
|
qrvey_theme: 'Qrvey Theme',
|
|
42
43
|
restore_to_default: 'Restore to Default',
|
|
43
44
|
save_theme: 'Save Theme',
|
|
45
|
+
show_title: 'Show Title',
|
|
44
46
|
table_header_styles: 'Table Header Styles',
|
|
45
47
|
text_styles: 'Text Styles',
|
|
46
48
|
tooltips: 'Tooltips',
|