@qrvey/utils 1.2.9-13 → 1.2.9-17
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 +926 -766
- package/dist/charts/constants/AGGREGATE_LABEL.d.ts +1 -1
- package/dist/charts/constants/AGGREGATE_LABEL.js +1 -1
- package/dist/cjs/charts/constants/AGGREGATE_LABEL.d.ts +1 -1
- package/dist/cjs/charts/constants/AGGREGATE_LABEL.js +1 -1
- package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
- package/dist/cjs/filters/helpers/ui/getQrveyIdsByUIFilters.d.ts +7 -0
- package/dist/cjs/filters/helpers/ui/getQrveyIdsByUIFilters.js +24 -0
- package/dist/cjs/filters/helpers/ui/getUpdatedUIFilters.d.ts +9 -0
- package/dist/cjs/filters/helpers/ui/getUpdatedUIFilters.js +36 -0
- package/dist/cjs/filters/helpers/ui/index.d.ts +3 -0
- package/dist/cjs/filters/helpers/ui/index.js +3 -0
- package/dist/cjs/filters/helpers/ui/transformFilterValues.d.ts +4 -0
- package/dist/cjs/filters/helpers/ui/transformFilterValues.js +22 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
- package/dist/cjs/filters/interfaces/panel/IFPSettingsGeneral.d.ts +2 -1
- package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +2 -0
- package/dist/cjs/filters/interfaces/ui/index.d.ts +3 -2
- package/dist/cjs/filters/interfaces/ui/index.js +3 -2
- package/dist/cjs/format/definition.d.ts +17 -0
- package/dist/cjs/format/definition.js +31 -1
- package/dist/cjs/format/format.d.ts +2 -1
- package/dist/cjs/format/format.js +8 -5
- package/dist/cjs/format/index.d.ts +1 -0
- package/dist/cjs/format/index.js +1 -0
- package/dist/cjs/format/localization.d.ts +3 -0
- package/dist/cjs/format/localization.js +56 -0
- package/dist/cjs/globalization/interfaces/IResourceI18n.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.d.ts +5 -3
- package/dist/cjs/globalization/interfaces/index.d.ts +4 -1
- package/dist/cjs/globalization/interfaces/index.js +4 -1
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemes.d.ts +13 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemes.js +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesDeleteDialog.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesDeleteDialog.js +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesMenu.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesMenu.js +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesMessages.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesMessages.js +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +27 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.js +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTooltips.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTooltips.js +2 -0
- package/dist/cjs/globalization/interfaces/style_themes/index.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/style_themes/index.js +18 -0
- package/dist/cjs/globalization/labels/I18N_DEFAULT.js +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.js +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +7 -5
- package/dist/cjs/globalization/labels/index.d.ts +5 -3
- package/dist/cjs/globalization/labels/index.js +5 -3
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.d.ts +2 -0
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +57 -0
- package/dist/cjs/globalization/labels/style_themes/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/style_themes/index.js +13 -0
- package/dist/cjs/globalization/labels/table_charts/I18N_TABLE_CHARTS.js +1 -1
- package/dist/cjs/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
- package/dist/cjs/interfaces/format/IFormatConfig.Interface.js +2 -0
- package/dist/cjs/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
- package/dist/cjs/interfaces/format/IFormatCurrency.Interface.js +2 -0
- package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
- package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.js +2 -0
- package/dist/cjs/interfaces/format/index.d.ts +3 -0
- package/dist/cjs/interfaces/format/index.js +15 -0
- package/dist/cjs/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/index.js +1 -0
- package/dist/cjs/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
- package/dist/cjs/qrvey/helpers/getValueWithSuffixes.js +23 -0
- package/dist/cjs/qrvey/helpers/index.d.ts +2 -0
- package/dist/cjs/qrvey/helpers/index.js +2 -0
- package/dist/cjs/qrvey/helpers/transformValue.d.ts +8 -0
- package/dist/cjs/qrvey/helpers/transformValue.js +46 -0
- package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
- package/dist/cjs/qrvey/interfaces/IGetValueWithSuffixesSettings.js +2 -0
- package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
- package/dist/cjs/qrvey/interfaces/ITransformValueSettings.js +2 -0
- package/dist/cjs/qrvey/interfaces/index.d.ts +2 -0
- package/dist/cjs/qrvey/interfaces/index.js +2 -0
- package/dist/cjs/services/api/getAllDatasets.api.d.ts +2 -1
- package/dist/cjs/services/api/getAllDatasets.api.js +2 -1
- package/dist/cjs/services/api/getDatasetColumns.api.js +3 -0
- package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -0
- package/dist/filters/helpers/ui/getQrveyIdsByUIFilters.d.ts +7 -0
- package/dist/filters/helpers/ui/getQrveyIdsByUIFilters.js +20 -0
- package/dist/filters/helpers/ui/getUpdatedUIFilters.d.ts +9 -0
- package/dist/filters/helpers/ui/getUpdatedUIFilters.js +32 -0
- package/dist/filters/helpers/ui/index.d.ts +3 -0
- package/dist/filters/helpers/ui/index.js +3 -0
- package/dist/filters/helpers/ui/transformFilterValues.d.ts +4 -0
- package/dist/filters/helpers/ui/transformFilterValues.js +18 -0
- package/dist/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +1 -0
- package/dist/filters/interfaces/panel/IFPSettingsGeneral.d.ts +2 -1
- package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +1 -0
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +6 -0
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.js +1 -0
- package/dist/filters/interfaces/ui/index.d.ts +3 -2
- package/dist/filters/interfaces/ui/index.js +3 -2
- package/dist/format/definition.d.ts +17 -0
- package/dist/format/definition.js +30 -0
- package/dist/format/format.d.ts +2 -1
- package/dist/format/format.js +6 -3
- package/dist/format/index.d.ts +1 -0
- package/dist/format/index.js +1 -0
- package/dist/format/localization.d.ts +3 -0
- package/dist/format/localization.js +51 -0
- package/dist/globalization/interfaces/IResourceI18n.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.d.ts +5 -3
- package/dist/globalization/interfaces/index.d.ts +4 -1
- package/dist/globalization/interfaces/index.js +4 -1
- package/dist/globalization/interfaces/style_themes/II18nStyleThemes.d.ts +13 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemes.js +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesDeleteDialog.d.ts +6 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesDeleteDialog.js +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesMenu.d.ts +6 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesMenu.js +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesMessages.d.ts +9 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesMessages.js +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +27 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.js +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTooltips.d.ts +3 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTooltips.js +1 -0
- package/dist/globalization/interfaces/style_themes/index.d.ts +6 -0
- package/dist/globalization/interfaces/style_themes/index.js +6 -0
- package/dist/globalization/labels/I18N_DEFAULT.js +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.js +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +7 -5
- package/dist/globalization/labels/index.d.ts +5 -3
- package/dist/globalization/labels/index.js +5 -3
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.d.ts +2 -0
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +54 -0
- package/dist/globalization/labels/style_themes/index.d.ts +1 -0
- package/dist/globalization/labels/style_themes/index.js +1 -0
- package/dist/globalization/labels/table_charts/I18N_TABLE_CHARTS.js +1 -1
- package/dist/interfaces/format/IFormatConfig.Interface.d.ts +5 -0
- package/dist/interfaces/format/IFormatConfig.Interface.js +1 -0
- package/dist/interfaces/format/IFormatCurrency.Interface.d.ts +4 -0
- package/dist/interfaces/format/IFormatCurrency.Interface.js +1 -0
- package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +8 -0
- package/dist/interfaces/format/IFormatOutputFormat.Interface.js +1 -0
- package/dist/interfaces/format/index.d.ts +3 -0
- package/dist/interfaces/format/index.js +3 -0
- package/dist/interfaces/general/IGeneralWidgetConfig.d.ts +2 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/qrvey/helpers/getValueWithSuffixes.d.ts +9 -0
- package/dist/qrvey/helpers/getValueWithSuffixes.js +19 -0
- package/dist/qrvey/helpers/index.d.ts +2 -0
- package/dist/qrvey/helpers/index.js +2 -0
- package/dist/qrvey/helpers/transformValue.d.ts +8 -0
- package/dist/qrvey/helpers/transformValue.js +42 -0
- package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.d.ts +11 -0
- package/dist/qrvey/interfaces/IGetValueWithSuffixesSettings.js +1 -0
- package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +10 -0
- package/dist/qrvey/interfaces/ITransformValueSettings.js +1 -0
- package/dist/qrvey/interfaces/index.d.ts +2 -0
- package/dist/qrvey/interfaces/index.js +2 -0
- package/dist/services/api/getAllDatasets.api.d.ts +2 -1
- package/dist/services/api/getAllDatasets.api.js +2 -1
- package/dist/services/api/getDatasetColumns.api.js +3 -0
- package/package.json +1 -1
- package/src/charts/constants/AGGREGATE_LABEL.ts +1 -1
- package/src/filters/helpers/builder/getFilterBuilderGeneralConfig.ts +1 -0
- package/src/filters/helpers/ui/getQrveyIdsByUIFilters.ts +22 -0
- package/src/filters/helpers/ui/getUpdatedUIFilters.ts +34 -0
- package/src/filters/helpers/ui/index.ts +3 -0
- package/src/filters/helpers/ui/transformFilterValues.ts +29 -0
- package/src/filters/interfaces/builder/IFilterBuilderGeneralConfig.ts +2 -1
- package/src/filters/interfaces/panel/IFPSettingsGeneral.ts +2 -1
- package/src/filters/interfaces/panel/IFilterPanelConfig.ts +1 -0
- package/src/filters/interfaces/ui/IFUTransformFilterValuesSettings.ts +7 -0
- package/src/filters/interfaces/ui/index.ts +3 -2
- package/src/format/definition.ts +45 -0
- package/src/format/format.ts +19 -15
- package/src/format/index.ts +1 -0
- package/src/format/localization.ts +52 -0
- package/src/globalization/interfaces/IResourceI18n.ts +2 -0
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.ts +5 -3
- package/src/globalization/interfaces/index.ts +4 -1
- package/src/globalization/interfaces/style_themes/II18nStyleThemes.ts +14 -0
- package/src/globalization/interfaces/style_themes/II18nStyleThemesDeleteDialog.ts +6 -0
- package/src/globalization/interfaces/style_themes/II18nStyleThemesMenu.ts +6 -0
- package/src/globalization/interfaces/style_themes/II18nStyleThemesMessages.ts +9 -0
- package/src/globalization/interfaces/style_themes/II18nStyleThemesTheme.ts +27 -0
- package/src/globalization/interfaces/style_themes/II18nStyleThemesTooltips.ts +3 -0
- package/src/globalization/interfaces/style_themes/index.ts +6 -0
- package/src/globalization/labels/I18N_DEFAULT.ts +2 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.ts +1 -1
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +8 -6
- package/src/globalization/labels/index.ts +5 -3
- package/src/globalization/labels/style_themes/I18N_STYLE_THEMES.ts +56 -0
- package/src/globalization/labels/style_themes/index.ts +1 -0
- package/src/globalization/labels/table_charts/I18N_TABLE_CHARTS.ts +1 -1
- package/src/interfaces/format/IFormatConfig.Interface.ts +5 -0
- package/src/interfaces/format/IFormatCurrency.Interface.ts +4 -0
- package/src/interfaces/format/IFormatOutputFormat.Interface.ts +9 -0
- package/src/interfaces/format/index.ts +3 -0
- package/src/interfaces/general/IGeneralWidgetConfig.ts +2 -0
- package/src/interfaces/index.ts +1 -0
- package/src/qrvey/helpers/getValueWithSuffixes.ts +19 -0
- package/src/qrvey/helpers/index.ts +2 -0
- package/src/qrvey/helpers/transformValue.ts +47 -0
- package/src/qrvey/interfaces/IGetValueWithSuffixesSettings.ts +12 -0
- package/src/qrvey/interfaces/ITransformValueSettings.ts +12 -0
- package/src/qrvey/interfaces/index.ts +2 -0
- package/src/services/api/getAllDatasets.api.ts +3 -2
- package/src/services/api/getDatasetColumns.api.ts +3 -0
- package/test/format.test.js +11 -11
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./II18nStyleThemes"), exports);
|
|
14
|
+
__exportStar(require("./II18nStyleThemesDeleteDialog"), exports);
|
|
15
|
+
__exportStar(require("./II18nStyleThemesMenu"), exports);
|
|
16
|
+
__exportStar(require("./II18nStyleThemesMessages"), exports);
|
|
17
|
+
__exportStar(require("./II18nStyleThemesTheme"), exports);
|
|
18
|
+
__exportStar(require("./II18nStyleThemesTooltips"), exports);
|
|
@@ -13,6 +13,7 @@ const I18N_FILTER_DISPLAY_1 = require("./filters/I18N_FILTER_DISPLAY");
|
|
|
13
13
|
const I18N_BUCKET_BUILDER_1 = require("./bucket_builder/I18N_BUCKET_BUILDER");
|
|
14
14
|
const cross_tabs_1 = require("./cross_tabs");
|
|
15
15
|
const chart_builder_1 = require("./chart_builder");
|
|
16
|
+
const style_themes_1 = require("./style_themes");
|
|
16
17
|
exports.I18N_DEFAULT = {
|
|
17
18
|
bucket_builder: I18N_BUCKET_BUILDER_1.I18N_BUCKET_BUILDER,
|
|
18
19
|
chart_builder: chart_builder_1.I18N_CHART_BUILDER,
|
|
@@ -25,5 +26,6 @@ exports.I18N_DEFAULT = {
|
|
|
25
26
|
filter_panel: I18N_FILTER_PANEL_1.I18N_FILTER_PANEL,
|
|
26
27
|
formula_builder: formula_builder_1.I18N_FORMULA_BUILDER,
|
|
27
28
|
panel: I18N_PANEL_1.I18N_PANEL,
|
|
29
|
+
style_themes: style_themes_1.I18N_STYLE_THEMES,
|
|
28
30
|
table_charts: table_charts_1.I18N_TABLE_CHARTS,
|
|
29
31
|
};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.I18N_CHART_BUILDER_LAYER_OPTIONS = void 0;
|
|
4
4
|
exports.I18N_CHART_BUILDER_LAYER_OPTIONS = {
|
|
5
5
|
trends_line: {
|
|
6
|
-
title: '
|
|
6
|
+
title: 'Trend Line',
|
|
7
7
|
type: 'Type',
|
|
8
8
|
type_none: 'None',
|
|
9
9
|
type_standard_linear_regression: 'Standard Linear Regression',
|
|
@@ -16,9 +16,9 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
|
|
|
16
16
|
comparision_color: 'Comparision Color',
|
|
17
17
|
data_labels_check: 'Data Labels',
|
|
18
18
|
default_format_title: 'Format',
|
|
19
|
-
display_outliers_check: 'Display
|
|
19
|
+
display_outliers_check: 'Display Outliers',
|
|
20
20
|
line_opacity: 'Line Opacity',
|
|
21
|
-
map_borders: 'Map
|
|
21
|
+
map_borders: 'Map Borders',
|
|
22
22
|
needle_color: 'Needle Color',
|
|
23
23
|
opacity: 'Opacity',
|
|
24
24
|
percentage_check: 'Percentage',
|
|
@@ -152,13 +152,15 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
|
|
|
152
152
|
names_rotation: 'Names Rotation',
|
|
153
153
|
},
|
|
154
154
|
font_options: {
|
|
155
|
+
automatic_resize: 'Automatic Resize',
|
|
155
156
|
color: 'Font Color',
|
|
157
|
+
disabled: '<i>Automatic Resize</i> is active, disable it to set the size manually.',
|
|
158
|
+
select_option_placeholder: 'Select Option',
|
|
159
|
+
size: 'Font Size',
|
|
156
160
|
style: 'Font Style',
|
|
157
|
-
style_regular: 'Regular',
|
|
158
161
|
style_bold: 'Bold',
|
|
159
162
|
style_italic: 'Italic',
|
|
160
|
-
|
|
161
|
-
size: 'Font Size',
|
|
163
|
+
style_regular: 'Regular',
|
|
162
164
|
},
|
|
163
165
|
circle_size: {
|
|
164
166
|
title: 'Circle Size',
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
export * from './bucket_builder';
|
|
2
|
+
export * from './chart_builder';
|
|
1
3
|
export * from './columns';
|
|
2
4
|
export * from './common';
|
|
5
|
+
export * from './cross_tabs';
|
|
3
6
|
export * from './dashboard';
|
|
4
7
|
export * from './filters';
|
|
8
|
+
export * from './formula_builder';
|
|
5
9
|
export * from './panel';
|
|
10
|
+
export * from './style_themes';
|
|
6
11
|
export * from './table_charts';
|
|
7
12
|
export * from './I18N_DEFAULT';
|
|
8
|
-
export * from './formula_builder';
|
|
9
|
-
export * from './bucket_builder';
|
|
10
|
-
export * from './chart_builder';
|
|
@@ -10,13 +10,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./bucket_builder"), exports);
|
|
14
|
+
__exportStar(require("./chart_builder"), exports);
|
|
13
15
|
__exportStar(require("./columns"), exports);
|
|
14
16
|
__exportStar(require("./common"), exports);
|
|
17
|
+
__exportStar(require("./cross_tabs"), exports);
|
|
15
18
|
__exportStar(require("./dashboard"), exports);
|
|
16
19
|
__exportStar(require("./filters"), exports);
|
|
20
|
+
__exportStar(require("./formula_builder"), exports);
|
|
17
21
|
__exportStar(require("./panel"), exports);
|
|
22
|
+
__exportStar(require("./style_themes"), exports);
|
|
18
23
|
__exportStar(require("./table_charts"), exports);
|
|
19
24
|
__exportStar(require("./I18N_DEFAULT"), exports);
|
|
20
|
-
__exportStar(require("./formula_builder"), exports);
|
|
21
|
-
__exportStar(require("./bucket_builder"), exports);
|
|
22
|
-
__exportStar(require("./chart_builder"), exports);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.I18N_STYLE_THEMES = void 0;
|
|
4
|
+
exports.I18N_STYLE_THEMES = {
|
|
5
|
+
delete_dialog: {
|
|
6
|
+
no: 'No',
|
|
7
|
+
theme_in_use: 'This theme is in use. If you delete it the visualizations will reset to the default theme.',
|
|
8
|
+
want_to_continue: 'Are you sure you want to continue?',
|
|
9
|
+
yes: 'Yes',
|
|
10
|
+
},
|
|
11
|
+
menu: {
|
|
12
|
+
delete: 'Delete',
|
|
13
|
+
duplicate: 'Duplicate',
|
|
14
|
+
edit: 'Edit',
|
|
15
|
+
use_all: 'Use in all applications',
|
|
16
|
+
},
|
|
17
|
+
messages: {
|
|
18
|
+
theme_could_not_be_created: 'Theme could not be created.',
|
|
19
|
+
theme_could_not_be_deleted: 'Theme could not be deleted.',
|
|
20
|
+
theme_could_not_be_duplicated: 'Theme could not be duplicated.',
|
|
21
|
+
theme_could_not_be_saved: 'Theme could not be saved.',
|
|
22
|
+
theme_could_not_be_selected: 'Theme could not be selected.',
|
|
23
|
+
theme_could_not_be_used_in_all_applications: 'Theme could not be used in all applications.',
|
|
24
|
+
themes_could_not_be_loaded: 'Themes could not be loaded.',
|
|
25
|
+
},
|
|
26
|
+
theme: {
|
|
27
|
+
axis_data_labels: 'Axis and Data Labels',
|
|
28
|
+
cancel_theme: 'Cancel',
|
|
29
|
+
chart_titles_color: 'Chart Titles Color',
|
|
30
|
+
copy: 'Copy',
|
|
31
|
+
create_theme: 'Create New Theme',
|
|
32
|
+
data_styles: 'Data Styles',
|
|
33
|
+
data_visualization: 'Data Visualization',
|
|
34
|
+
edit_theme: 'Edit Theme',
|
|
35
|
+
generate_new: 'Generate New',
|
|
36
|
+
header_font_color: 'Header Font Color',
|
|
37
|
+
id: 'ID',
|
|
38
|
+
legends: 'Legends',
|
|
39
|
+
main_color: 'Main Color',
|
|
40
|
+
name_placeholder: 'Type name',
|
|
41
|
+
panel_styles: 'Panel Styles',
|
|
42
|
+
qrvey_theme: 'Qrvey Theme',
|
|
43
|
+
restore_to_default: 'Restore to Default',
|
|
44
|
+
save_theme: 'Save Theme',
|
|
45
|
+
table_header_styles: 'Table Header Styles',
|
|
46
|
+
text_styles: 'Text Styles',
|
|
47
|
+
tooltips: 'Tooltips',
|
|
48
|
+
typeface: 'Typeface',
|
|
49
|
+
untitled_theme: 'Untitled',
|
|
50
|
+
use_theme_in_all_apps: 'Use Theme in All Apps',
|
|
51
|
+
values: 'Values',
|
|
52
|
+
},
|
|
53
|
+
title: 'Style Themes',
|
|
54
|
+
tooltips: {
|
|
55
|
+
theme_used_in_all_applications: 'This theme is being used in all applications',
|
|
56
|
+
}
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './I18N_STYLE_THEMES';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./I18N_STYLE_THEMES"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./IFormatConfig.Interface"), exports);
|
|
14
|
+
__exportStar(require("./IFormatOutputFormat.Interface"), exports);
|
|
15
|
+
__exportStar(require("./IFormatCurrency.Interface"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IGetValueWithSuffixesSettings } from "../interfaces/IGetValueWithSuffixesSettings";
|
|
2
|
+
/**
|
|
3
|
+
* Get a string value with suffixes if available.
|
|
4
|
+
* Add suffix into the value string. Prioritized for numeric values.
|
|
5
|
+
* @param value a number or string
|
|
6
|
+
* @param suffixes An object with singular or plural suffix string.
|
|
7
|
+
* @returns a string value with suffix
|
|
8
|
+
*/
|
|
9
|
+
export declare function getValueWithSuffixes(value: string | number, settings: IGetValueWithSuffixesSettings): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getValueWithSuffixes = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const isNaNV2_1 = require("../../general/mix/isNaNV2");
|
|
6
|
+
/**
|
|
7
|
+
* Get a string value with suffixes if available.
|
|
8
|
+
* Add suffix into the value string. Prioritized for numeric values.
|
|
9
|
+
* @param value a number or string
|
|
10
|
+
* @param suffixes An object with singular or plural suffix string.
|
|
11
|
+
* @returns a string value with suffix
|
|
12
|
+
*/
|
|
13
|
+
function getValueWithSuffixes(value, settings) {
|
|
14
|
+
let suffix = '';
|
|
15
|
+
if (!(0, isNaNV2_1.isNaNV2)(value)) {
|
|
16
|
+
if (!(0, isEmpty_1.isEmpty)(settings.suffixTranslateLabel) && !(0, isEmpty_1.isEmpty)(settings.translate))
|
|
17
|
+
suffix = settings.translate(settings.suffixTranslateLabel, { count: +value });
|
|
18
|
+
if (!(0, isEmpty_1.isEmpty)(settings.suffixes))
|
|
19
|
+
suffix = (+value > 1 || +value === 0) ? settings.suffixes.plural : settings.suffixes.singular;
|
|
20
|
+
}
|
|
21
|
+
return value + (!(0, isEmpty_1.isEmpty)(suffix) ? ' ' + suffix : '');
|
|
22
|
+
}
|
|
23
|
+
exports.getValueWithSuffixes = getValueWithSuffixes;
|
|
@@ -12,3 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./getColumnsLabel"), exports);
|
|
14
14
|
__exportStar(require("./getPropertyLabel"), exports);
|
|
15
|
+
__exportStar(require("./getValueWithSuffixes"), exports);
|
|
16
|
+
__exportStar(require("./transformValue"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITransformValueSettings } from "../interfaces/ITransformValueSettings";
|
|
2
|
+
/**
|
|
3
|
+
* Transforms a value depending of localization/globalization and extras settings.
|
|
4
|
+
* @param value A value to transform
|
|
5
|
+
* @param settings The settings of the transformValue function
|
|
6
|
+
* @returns A transformed value
|
|
7
|
+
*/
|
|
8
|
+
export declare function transformValue(value: string, settings: ITransformValueSettings): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformValue = void 0;
|
|
4
|
+
const isDateColumn_1 = require("../../columns/helpers/isDateColumn");
|
|
5
|
+
const isNumericalColumn_1 = require("../../columns/helpers/isNumericalColumn");
|
|
6
|
+
const DATE_GROUPING_PROPERTY_1 = require("../../dates/constants/DATE_GROUPING_PROPERTY");
|
|
7
|
+
const DATE_GROUPING_TIME_PROPERTY_1 = require("../../dates/constants/DATE_GROUPING_TIME_PROPERTY");
|
|
8
|
+
const format_1 = require("../../format/format");
|
|
9
|
+
const getI18nDateGroupLabel_1 = require("../../globalization/helpers/getI18nDateGroupLabel");
|
|
10
|
+
const getValueWithSuffixes_1 = require("./getValueWithSuffixes");
|
|
11
|
+
/**
|
|
12
|
+
* Transforms a value depending of localization/globalization and extras settings.
|
|
13
|
+
* @param value A value to transform
|
|
14
|
+
* @param settings The settings of the transformValue function
|
|
15
|
+
* @returns A transformed value
|
|
16
|
+
*/
|
|
17
|
+
function transformValue(value, settings) {
|
|
18
|
+
const valueWithI18n = (0, getI18nDateGroupLabel_1.getI18nDateGroupLabel)(value, settings.property, settings.translate);
|
|
19
|
+
const valueWithLocalization = (0, format_1.addFormat)(valueWithI18n, getOutputFormat(settings), getFormatConfig(settings));
|
|
20
|
+
return (0, getValueWithSuffixes_1.getValueWithSuffixes)(valueWithLocalization, { suffixTranslateLabel: settings.suffixTranslateLabel, translate: settings.translate });
|
|
21
|
+
}
|
|
22
|
+
exports.transformValue = transformValue;
|
|
23
|
+
/**
|
|
24
|
+
* Gets the outputformat settings
|
|
25
|
+
* @param settings The settings of the transformValue function
|
|
26
|
+
* @returns the outputformat settings
|
|
27
|
+
*/
|
|
28
|
+
function getOutputFormat(settings) {
|
|
29
|
+
let type, format;
|
|
30
|
+
if ((0, isDateColumn_1.isDateColumn)(settings.column) && [DATE_GROUPING_PROPERTY_1.DATE_GROUPING_PROPERTY.DAY, DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.HOUR, DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.MINUTE, DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.SECOND].includes(settings.property)) {
|
|
31
|
+
type = 'DATE';
|
|
32
|
+
format = 'Default';
|
|
33
|
+
}
|
|
34
|
+
else if ((0, isNumericalColumn_1.isNumericalColumn)(settings.column)) {
|
|
35
|
+
type = 'NUMERIC';
|
|
36
|
+
}
|
|
37
|
+
return { type, format };
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Gets the format config
|
|
41
|
+
* @param settings The settings of the transformValue function
|
|
42
|
+
* @returns the format config
|
|
43
|
+
*/
|
|
44
|
+
function getFormatConfig(settings) {
|
|
45
|
+
return { lang: settings.locale };
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { II18nServiceTranslate } from "../../globalization/interfaces/II18nServiceTranslate";
|
|
2
|
+
export interface IGetValueWithSuffixesSettings {
|
|
3
|
+
translate?: II18nServiceTranslate;
|
|
4
|
+
suffixTranslateLabel?: string;
|
|
5
|
+
suffixes?: IGetValueWithSuffixesSettingsSuffixes;
|
|
6
|
+
}
|
|
7
|
+
interface IGetValueWithSuffixesSettingsSuffixes {
|
|
8
|
+
singular: string;
|
|
9
|
+
plural: string;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
2
|
+
import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyType";
|
|
3
|
+
import { II18nServiceTranslate } from "../../globalization/interfaces/II18nServiceTranslate";
|
|
4
|
+
export interface ITransformValueSettings {
|
|
5
|
+
column: IColumn;
|
|
6
|
+
property: IColumnPropertyType;
|
|
7
|
+
translate: II18nServiceTranslate;
|
|
8
|
+
locale: string;
|
|
9
|
+
suffixTranslateLabel?: string;
|
|
10
|
+
}
|
|
@@ -15,3 +15,5 @@ __exportStar(require("./ICalculation"), exports);
|
|
|
15
15
|
__exportStar(require("./ICalculationInfo"), exports);
|
|
16
16
|
__exportStar(require("./ICalculationType"), exports);
|
|
17
17
|
__exportStar(require("./IDataset"), exports);
|
|
18
|
+
__exportStar(require("./IGetValueWithSuffixesSettings"), exports);
|
|
19
|
+
__exportStar(require("./ITransformValueSettings"), exports);
|
|
@@ -2,7 +2,8 @@ import { IGeneralWidgetConfig } from "../../interfaces/general/IGeneralWidgetCon
|
|
|
2
2
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
3
3
|
/**
|
|
4
4
|
* Get a dataset list from a collection of Qrvey IDs
|
|
5
|
-
* @param
|
|
5
|
+
* @param config the widget config. Includes the appid and others configuration properties
|
|
6
|
+
* @param pickDatasets Collection of Qrvey IDs for filtering the request
|
|
6
7
|
* @returns a promise
|
|
7
8
|
*/
|
|
8
9
|
export declare function getAllDatasets(config: IGeneralWidgetConfig, pickDatasets?: string[]): Promise<IDataset[]>;
|
|
@@ -6,7 +6,8 @@ const getAllQrveys_api_1 = require("./getAllQrveys.api");
|
|
|
6
6
|
const getDatasetColumns_api_1 = require("./getDatasetColumns.api");
|
|
7
7
|
/**
|
|
8
8
|
* Get a dataset list from a collection of Qrvey IDs
|
|
9
|
-
* @param
|
|
9
|
+
* @param config the widget config. Includes the appid and others configuration properties
|
|
10
|
+
* @param pickDatasets Collection of Qrvey IDs for filtering the request
|
|
10
11
|
* @returns a promise
|
|
11
12
|
*/
|
|
12
13
|
function getAllDatasets(config, pickDatasets = []) {
|
|
@@ -7,6 +7,8 @@ exports.getDatasetColumns = void 0;
|
|
|
7
7
|
const CHART_ENDPOINT_1 = require("../constants/CHART_ENDPOINT");
|
|
8
8
|
const Request_1 = __importDefault(require("../helpers/Request"));
|
|
9
9
|
const BDatasetsToUIDatasets_adapter_1 = require("../adapters/BDatasetsToUIDatasets.adapter");
|
|
10
|
+
const definition_1 = require("../../format/definition");
|
|
11
|
+
const __1 = require("../..");
|
|
10
12
|
/**
|
|
11
13
|
* Get a dataset by Qrvey ID
|
|
12
14
|
* @param qrveyid The Qrvey ID
|
|
@@ -14,6 +16,7 @@ const BDatasetsToUIDatasets_adapter_1 = require("../adapters/BDatasetsToUIDatase
|
|
|
14
16
|
*/
|
|
15
17
|
function getDatasetColumns(config, qrveyid) {
|
|
16
18
|
return Request_1.default.post(Object.assign(Object.assign({}, config), { qrveyid, endpoint: CHART_ENDPOINT_1.CHART_ENDPOINT }), '/question/list', {
|
|
19
|
+
'lang': (0, __1.getLang)(config.lang || config.locale || definition_1.LANG_DEFAULT).lang,
|
|
17
20
|
'optionsAttributes': ['id', 'text', 'type', 'property', 'linked', 'linkid', 'qrveyid', 'bucketId', 'formulaId', 'formulaType', 'geogroup', 'outputFormat'],
|
|
18
21
|
'extend': true
|
|
19
22
|
})
|
|
@@ -9,6 +9,7 @@ export function getFilterBuilderGeneralConfig(config = {}) {
|
|
|
9
9
|
apiKey: getAttribute(config, 'api_key') || config.apiKey,
|
|
10
10
|
appid: getAttribute(config, 'app_id') || config.appid,
|
|
11
11
|
domain: config.domain,
|
|
12
|
+
locale: config.locale,
|
|
12
13
|
qv_token: config.qv_token,
|
|
13
14
|
timezoneControl: getAttribute(config, 'timezone_control') || config.timezoneControl,
|
|
14
15
|
userid: getAttribute(config, 'user_id') || config.userid,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFSData } from "../../interfaces/common/IFSData";
|
|
2
|
+
/**
|
|
3
|
+
* Gets a collection of Qrvey IDs in the UI Filter structure.
|
|
4
|
+
* Looks around all filter structure finding the qrveyid propertty in each dataset
|
|
5
|
+
* @param uiFilter
|
|
6
|
+
*/
|
|
7
|
+
export declare function getQrveyIdsByUIFilters(uiFilter: IFSData): string[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
2
|
+
/**
|
|
3
|
+
* Gets a collection of Qrvey IDs in the UI Filter structure.
|
|
4
|
+
* Looks around all filter structure finding the qrveyid propertty in each dataset
|
|
5
|
+
* @param uiFilter
|
|
6
|
+
*/
|
|
7
|
+
export function getQrveyIdsByUIFilters(uiFilter) {
|
|
8
|
+
const qrveyids = [];
|
|
9
|
+
if (isEmpty(uiFilter))
|
|
10
|
+
return qrveyids;
|
|
11
|
+
uiFilter.scopes.forEach(scope => {
|
|
12
|
+
if (!isEmpty(scope.datasets)) {
|
|
13
|
+
scope.datasets.forEach(dataset => {
|
|
14
|
+
if (!isEmpty(dataset))
|
|
15
|
+
qrveyids.push(dataset.qrveyid);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return qrveyids;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDataset } from "../../../qrvey/interfaces/IDataset";
|
|
2
|
+
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
3
|
+
/**
|
|
4
|
+
* Gets a new UI Filter structure with a datasets/columns info updates
|
|
5
|
+
* @param data The UI Filter structure
|
|
6
|
+
* @param datasets An array of datasets/column info used for updating the data
|
|
7
|
+
* @returns A new UI FIlter structure
|
|
8
|
+
*/
|
|
9
|
+
export declare function getUpdatedUIFilters(data: IFUData, datasets?: IDataset[]): IFUData;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
2
|
+
/**
|
|
3
|
+
* Gets a new UI Filter structure with a datasets/columns info updates
|
|
4
|
+
* @param data The UI Filter structure
|
|
5
|
+
* @param datasets An array of datasets/column info used for updating the data
|
|
6
|
+
* @returns A new UI FIlter structure
|
|
7
|
+
*/
|
|
8
|
+
export function getUpdatedUIFilters(data, datasets = []) {
|
|
9
|
+
if (isEmpty(data) || isEmpty(datasets))
|
|
10
|
+
return data;
|
|
11
|
+
const updatedScopes = data.scopes.map(scopes => {
|
|
12
|
+
scopes.datasets = scopes.datasets.map(dataset => {
|
|
13
|
+
const datasetInfo = datasets.find(dInfo => dInfo.qrveyid === dataset.qrveyid && dInfo.linkid === dataset.linkid);
|
|
14
|
+
if (!isEmpty(datasetInfo))
|
|
15
|
+
dataset.label = datasetInfo.label;
|
|
16
|
+
dataset.filters = dataset.filters.map(filter => {
|
|
17
|
+
let columnInfo;
|
|
18
|
+
if (!isEmpty(datasetInfo))
|
|
19
|
+
columnInfo = datasetInfo.options.find(cInfo => { var _a, _b; return cInfo.id === filter.column.id && ((_a = cInfo.dataset) === null || _a === void 0 ? void 0 : _a.qrveyid) === filter.column.qrveyid && ((_b = cInfo.dataset) === null || _b === void 0 ? void 0 : _b.linkid) === filter.column.linkid; });
|
|
20
|
+
if (!isEmpty(columnInfo)) {
|
|
21
|
+
filter.column.formulaType = columnInfo.formulaType;
|
|
22
|
+
filter.column.label = columnInfo.label;
|
|
23
|
+
filter.column.type = columnInfo.type;
|
|
24
|
+
}
|
|
25
|
+
return filter;
|
|
26
|
+
});
|
|
27
|
+
return dataset;
|
|
28
|
+
});
|
|
29
|
+
return scopes;
|
|
30
|
+
});
|
|
31
|
+
return Object.assign(Object.assign({}, data), { scopes: updatedScopes });
|
|
32
|
+
}
|
|
@@ -2,7 +2,10 @@ export * from './excludeUIFiltersByAggregate';
|
|
|
2
2
|
export * from './excludeUIFlatFiltersByScopes';
|
|
3
3
|
export * from './getFilterPropertyLabel';
|
|
4
4
|
export * from './getOutputFormatByColumn';
|
|
5
|
+
export * from './getQrveyIdsByUIFilters';
|
|
5
6
|
export * from './getUIFlatFilterByParams';
|
|
6
7
|
export * from './getUIFlatFiltersByParams';
|
|
7
8
|
export * from './getUIFlatFiltersByScopes';
|
|
8
9
|
export * from './getUIValues';
|
|
10
|
+
export * from './getUpdatedUIFilters';
|
|
11
|
+
export * from './transformFilterValues';
|
|
@@ -2,7 +2,10 @@ export * from './excludeUIFiltersByAggregate';
|
|
|
2
2
|
export * from './excludeUIFlatFiltersByScopes';
|
|
3
3
|
export * from './getFilterPropertyLabel';
|
|
4
4
|
export * from './getOutputFormatByColumn';
|
|
5
|
+
export * from './getQrveyIdsByUIFilters';
|
|
5
6
|
export * from './getUIFlatFilterByParams';
|
|
6
7
|
export * from './getUIFlatFiltersByParams';
|
|
7
8
|
export * from './getUIFlatFiltersByScopes';
|
|
8
9
|
export * from './getUIValues';
|
|
10
|
+
export * from './getUpdatedUIFilters';
|
|
11
|
+
export * from './transformFilterValues';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IFSFilter } from "../../interfaces/common/IFSFilter";
|
|
2
|
+
import { IFValue } from "../../interfaces/IFValue";
|
|
3
|
+
import { IFUTransformFilterValuesSettings } from "../../interfaces/ui/IFUTransformFilterValuesSettings";
|
|
4
|
+
export declare function transformFilterValues(filter: IFSFilter, settings: IFUTransformFilterValuesSettings): IFValue[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
2
|
+
import { transformValue } from "../../../qrvey/helpers/transformValue";
|
|
3
|
+
import { isRangeValidator } from "../common/isRangeValidator";
|
|
4
|
+
import { isRegularValidator } from "../common/isRegularValidator";
|
|
5
|
+
export function transformFilterValues(filter, settings) {
|
|
6
|
+
const transformValueSettings = Object.assign(Object.assign({}, settings), { column: filter.column, property: filter.property });
|
|
7
|
+
if (isEmpty(filter))
|
|
8
|
+
return [];
|
|
9
|
+
if (isRegularValidator(filter.validator)) {
|
|
10
|
+
return filter.values.map((value) => (Object.assign(Object.assign({}, value), { value: transformValue(value.value, transformValueSettings) })));
|
|
11
|
+
}
|
|
12
|
+
else if (isRangeValidator(filter.validator)) {
|
|
13
|
+
return filter.values.map((value) => (Object.assign(Object.assign({}, value), { min: transformValue(value.min, transformValueSettings), max: transformValue(value.max, transformValueSettings) })));
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return filter.values;
|
|
17
|
+
}
|
|
18
|
+
}
|