@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,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,19 @@
|
|
|
1
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
+
import { isNaNV2 } from "../../general/mix/isNaNV2";
|
|
3
|
+
/**
|
|
4
|
+
* Get a string value with suffixes if available.
|
|
5
|
+
* Add suffix into the value string. Prioritized for numeric values.
|
|
6
|
+
* @param value a number or string
|
|
7
|
+
* @param suffixes An object with singular or plural suffix string.
|
|
8
|
+
* @returns a string value with suffix
|
|
9
|
+
*/
|
|
10
|
+
export function getValueWithSuffixes(value, settings) {
|
|
11
|
+
let suffix = '';
|
|
12
|
+
if (!isNaNV2(value)) {
|
|
13
|
+
if (!isEmpty(settings.suffixTranslateLabel) && !isEmpty(settings.translate))
|
|
14
|
+
suffix = settings.translate(settings.suffixTranslateLabel, { count: +value });
|
|
15
|
+
if (!isEmpty(settings.suffixes))
|
|
16
|
+
suffix = (+value > 1 || +value === 0) ? settings.suffixes.plural : settings.suffixes.singular;
|
|
17
|
+
}
|
|
18
|
+
return value + (!isEmpty(suffix) ? ' ' + suffix : '');
|
|
19
|
+
}
|
|
@@ -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,42 @@
|
|
|
1
|
+
import { isDateColumn } from "../../columns/helpers/isDateColumn";
|
|
2
|
+
import { isNumericalColumn } from "../../columns/helpers/isNumericalColumn";
|
|
3
|
+
import { DATE_GROUPING_PROPERTY } from "../../dates/constants/DATE_GROUPING_PROPERTY";
|
|
4
|
+
import { DATE_GROUPING_TIME_PROPERTY } from "../../dates/constants/DATE_GROUPING_TIME_PROPERTY";
|
|
5
|
+
import { addFormat } from "../../format/format";
|
|
6
|
+
import { getI18nDateGroupLabel } from "../../globalization/helpers/getI18nDateGroupLabel";
|
|
7
|
+
import { getValueWithSuffixes } from "./getValueWithSuffixes";
|
|
8
|
+
/**
|
|
9
|
+
* Transforms a value depending of localization/globalization and extras settings.
|
|
10
|
+
* @param value A value to transform
|
|
11
|
+
* @param settings The settings of the transformValue function
|
|
12
|
+
* @returns A transformed value
|
|
13
|
+
*/
|
|
14
|
+
export function transformValue(value, settings) {
|
|
15
|
+
const valueWithI18n = getI18nDateGroupLabel(value, settings.property, settings.translate);
|
|
16
|
+
const valueWithLocalization = addFormat(valueWithI18n, getOutputFormat(settings), getFormatConfig(settings));
|
|
17
|
+
return getValueWithSuffixes(valueWithLocalization, { suffixTranslateLabel: settings.suffixTranslateLabel, translate: settings.translate });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the outputformat settings
|
|
21
|
+
* @param settings The settings of the transformValue function
|
|
22
|
+
* @returns the outputformat settings
|
|
23
|
+
*/
|
|
24
|
+
function getOutputFormat(settings) {
|
|
25
|
+
let type, format;
|
|
26
|
+
if (isDateColumn(settings.column) && [DATE_GROUPING_PROPERTY.DAY, DATE_GROUPING_TIME_PROPERTY.HOUR, DATE_GROUPING_TIME_PROPERTY.MINUTE, DATE_GROUPING_TIME_PROPERTY.SECOND].includes(settings.property)) {
|
|
27
|
+
type = 'DATE';
|
|
28
|
+
format = 'Default';
|
|
29
|
+
}
|
|
30
|
+
else if (isNumericalColumn(settings.column)) {
|
|
31
|
+
type = 'NUMERIC';
|
|
32
|
+
}
|
|
33
|
+
return { type, format };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Gets the format config
|
|
37
|
+
* @param settings The settings of the transformValue function
|
|
38
|
+
* @returns the format config
|
|
39
|
+
*/
|
|
40
|
+
function getFormatConfig(settings) {
|
|
41
|
+
return { lang: settings.locale };
|
|
42
|
+
}
|
|
@@ -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 @@
|
|
|
1
|
+
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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[]>;
|
|
@@ -3,7 +3,8 @@ import { getAllQrveys } from "./getAllQrveys.api";
|
|
|
3
3
|
import { getDatasetColumns } from "./getDatasetColumns.api";
|
|
4
4
|
/**
|
|
5
5
|
* Get a dataset list from a collection of Qrvey IDs
|
|
6
|
-
* @param
|
|
6
|
+
* @param config the widget config. Includes the appid and others configuration properties
|
|
7
|
+
* @param pickDatasets Collection of Qrvey IDs for filtering the request
|
|
7
8
|
* @returns a promise
|
|
8
9
|
*/
|
|
9
10
|
export function getAllDatasets(config, pickDatasets = []) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CHART_ENDPOINT } from "../constants/CHART_ENDPOINT";
|
|
2
2
|
import Request from "../helpers/Request";
|
|
3
3
|
import { BDatasetsToUIDatasets } from "../adapters/BDatasetsToUIDatasets.adapter";
|
|
4
|
+
import { LANG_DEFAULT } from "../../format/definition";
|
|
5
|
+
import { getLang } from "../..";
|
|
4
6
|
/**
|
|
5
7
|
* Get a dataset by Qrvey ID
|
|
6
8
|
* @param qrveyid The Qrvey ID
|
|
@@ -8,6 +10,7 @@ import { BDatasetsToUIDatasets } from "../adapters/BDatasetsToUIDatasets.adapter
|
|
|
8
10
|
*/
|
|
9
11
|
export function getDatasetColumns(config, qrveyid) {
|
|
10
12
|
return Request.post(Object.assign(Object.assign({}, config), { qrveyid, endpoint: CHART_ENDPOINT }), '/question/list', {
|
|
13
|
+
'lang': getLang(config.lang || config.locale || LANG_DEFAULT).lang,
|
|
11
14
|
'optionsAttributes': ['id', 'text', 'type', 'property', 'linked', 'linkid', 'qrveyid', 'bucketId', 'formulaId', 'formulaType', 'geogroup', 'outputFormat'],
|
|
12
15
|
'extend': true
|
|
13
16
|
})
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ export function getFilterBuilderGeneralConfig(config: any = {}): IFilterBuilderG
|
|
|
11
11
|
apiKey: getAttribute(config, 'api_key') || config.apiKey,
|
|
12
12
|
appid: getAttribute(config, 'app_id') || config.appid,
|
|
13
13
|
domain: config.domain,
|
|
14
|
+
locale: config.locale,
|
|
14
15
|
qv_token: config.qv_token,
|
|
15
16
|
timezoneControl: getAttribute(config, 'timezone_control') || config.timezoneControl,
|
|
16
17
|
userid: getAttribute(config, 'user_id') || config.userid,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
3
|
+
import { IFSData } from "../../interfaces/common/IFSData";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Gets a collection of Qrvey IDs in the UI Filter structure.
|
|
7
|
+
* Looks around all filter structure finding the qrveyid propertty in each dataset
|
|
8
|
+
* @param uiFilter
|
|
9
|
+
*/
|
|
10
|
+
export function getQrveyIdsByUIFilters(uiFilter: IFSData): string[] {
|
|
11
|
+
const qrveyids = [];
|
|
12
|
+
if (isEmpty(uiFilter)) return qrveyids;
|
|
13
|
+
|
|
14
|
+
uiFilter.scopes.forEach(scope => {
|
|
15
|
+
if (!isEmpty(scope.datasets)) {
|
|
16
|
+
scope.datasets.forEach(dataset => {
|
|
17
|
+
if (!isEmpty(dataset)) qrveyids.push(dataset.qrveyid);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return qrveyids;
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
3
|
+
import { IDataset } from "../../../qrvey/interfaces/IDataset";
|
|
4
|
+
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Gets a new UI Filter structure with a datasets/columns info updates
|
|
8
|
+
* @param data The UI Filter structure
|
|
9
|
+
* @param datasets An array of datasets/column info used for updating the data
|
|
10
|
+
* @returns A new UI FIlter structure
|
|
11
|
+
*/
|
|
12
|
+
export function getUpdatedUIFilters(data: IFUData, datasets: IDataset[] = []): IFUData {
|
|
13
|
+
if (isEmpty(data) || isEmpty(datasets)) return data;
|
|
14
|
+
|
|
15
|
+
const updatedScopes = data.scopes.map(scopes => {
|
|
16
|
+
scopes.datasets = scopes.datasets.map(dataset => {
|
|
17
|
+
const datasetInfo: IDataset = datasets.find(dInfo => dInfo.qrveyid === dataset.qrveyid && dInfo.linkid === dataset.linkid);
|
|
18
|
+
if (!isEmpty(datasetInfo)) dataset.label = datasetInfo.label;
|
|
19
|
+
dataset.filters = dataset.filters.map(filter => {
|
|
20
|
+
let columnInfo: IColumn;
|
|
21
|
+
if (!isEmpty(datasetInfo)) columnInfo = datasetInfo.options.find(cInfo => cInfo.id === filter.column.id && cInfo.dataset?.qrveyid === filter.column.qrveyid && cInfo.dataset?.linkid === filter.column.linkid);
|
|
22
|
+
if (!isEmpty(columnInfo)) {
|
|
23
|
+
filter.column.formulaType = columnInfo.formulaType;
|
|
24
|
+
filter.column.label = columnInfo.label;
|
|
25
|
+
filter.column.type = columnInfo.type;
|
|
26
|
+
}
|
|
27
|
+
return filter;
|
|
28
|
+
});
|
|
29
|
+
return dataset;
|
|
30
|
+
});
|
|
31
|
+
return scopes;
|
|
32
|
+
});
|
|
33
|
+
return { ...data, scopes: updatedScopes };
|
|
34
|
+
}
|
|
@@ -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,29 @@
|
|
|
1
|
+
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
2
|
+
import { transformValue } from "../../../qrvey/helpers/transformValue";
|
|
3
|
+
import { IFSFilter } from "../../interfaces/common/IFSFilter";
|
|
4
|
+
import { IFSValue } from "../../interfaces/common/IFSValue";
|
|
5
|
+
import { IFSValueRange } from "../../interfaces/common/IFSValueRange";
|
|
6
|
+
import { IFValue } from "../../interfaces/IFValue";
|
|
7
|
+
import { IFUTransformFilterValuesSettings } from "../../interfaces/ui/IFUTransformFilterValuesSettings";
|
|
8
|
+
import { isRangeValidator } from "../common/isRangeValidator";
|
|
9
|
+
import { isRegularValidator } from "../common/isRegularValidator";
|
|
10
|
+
|
|
11
|
+
export function transformFilterValues(filter: IFSFilter, settings: IFUTransformFilterValuesSettings): IFValue[] {
|
|
12
|
+
const transformValueSettings = { ...settings, column: filter.column, property: filter.property };
|
|
13
|
+
if (isEmpty(filter)) return [];
|
|
14
|
+
|
|
15
|
+
if (isRegularValidator(filter.validator)) {
|
|
16
|
+
return (filter.values as IFSValue[]).map((value: IFSValue) => ({
|
|
17
|
+
...value,
|
|
18
|
+
value: transformValue(value.value, transformValueSettings),
|
|
19
|
+
}));
|
|
20
|
+
} else if (isRangeValidator(filter.validator)) {
|
|
21
|
+
return (filter.values as IFSValueRange[]).map((value: IFSValueRange) => ({
|
|
22
|
+
...value,
|
|
23
|
+
min: transformValue(value.min, transformValueSettings),
|
|
24
|
+
max: transformValue(value.max, transformValueSettings)
|
|
25
|
+
}));
|
|
26
|
+
} else {
|
|
27
|
+
return filter.values;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -6,6 +6,7 @@ export interface IFilterBuilderGeneralConfig {
|
|
|
6
6
|
appid: string; // App ID
|
|
7
7
|
domain: string; // The domain of the environment
|
|
8
8
|
qv_token?: string; // Qrvey Token for RLS
|
|
9
|
-
timezoneControl?: string;
|
|
9
|
+
timezoneControl?: string; // Offset number for Timezone
|
|
10
|
+
locale?: string; // Localization setting
|
|
10
11
|
userid: string; // User ID
|
|
11
12
|
}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
canCollapse?: boolean; // Validates if the component can be collapsed. True: It can collapse; False: It cannot collapse
|
|
6
6
|
collapsed?: boolean; // True: The component is collapsed; False: The component is not collapsed.
|
|
7
7
|
colorModeDisplayed?: boolean; // True: Display the color of each filter scopes; False: Hide the color.
|
|
8
|
+
dynamicFilters?: boolean; // True: The filters should be filtered by given params from config or listener.
|
|
8
9
|
enabled?: boolean; // True: The scope filters are applied. False: The scope filters are not applied.
|
|
9
10
|
iconDisplayed?: boolean; // True: Display the icons linked with each scope; false: Do not display the icons.
|
|
10
11
|
readonly?: boolean; // True: validates read only, any event could be executed.
|
|
11
|
-
|
|
12
|
+
updateFilterInfo?: boolean; // True: Update info of the datasets and columns stored in the filter structure
|
|
12
13
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { II18nServiceTranslate } from "../../../globalization/interfaces/II18nServiceTranslate";
|
|
2
|
+
|
|
3
|
+
export interface IFUTransformFilterValuesSettings {
|
|
4
|
+
translate: II18nServiceTranslate; // Function for getting translations
|
|
5
|
+
locale: string; // The locale string
|
|
6
|
+
suffixTranslateLabel?: string // The i18n label for the suffix values.
|
|
7
|
+
}
|
|
@@ -19,7 +19,8 @@ export * from './IFUDataset';
|
|
|
19
19
|
export * from './IFUFilter';
|
|
20
20
|
export * from './IFUFilterExtras';
|
|
21
21
|
export * from './IFUFlattenedFilter';
|
|
22
|
-
export * from './IFUScope';
|
|
23
22
|
export * from './IFUParamsToGetFilter';
|
|
24
|
-
export * from './
|
|
23
|
+
export * from './IFUScope';
|
|
24
|
+
export * from './IFUTransformFilterValuesSettings';
|
|
25
25
|
export * from './IFUUIValueSettings';
|
|
26
|
+
export * from './IFUValue';
|
package/src/format/definition.ts
CHANGED
|
@@ -55,3 +55,48 @@ export function supportNumericFormatting(chartType: ChartType): boolean {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export const isTextColumn = (column: any): boolean => textFields.includes(column.type) || column.formulaType === 'string' || column.formulaType === 'boolean';
|
|
58
|
+
|
|
59
|
+
export const currencyISO = [
|
|
60
|
+
{ text: 'Default', label: 'USD' },
|
|
61
|
+
{ text: '$ (USD)', label: 'USD' },
|
|
62
|
+
{ text: '€ (EUR)', label: 'EUR' },
|
|
63
|
+
{ text: '¥ (JPY)', label: 'JPY' },
|
|
64
|
+
{ text: '£ (GBP)', label: 'GBP' },
|
|
65
|
+
{ text: '₩ (WON)', label: 'WON' },
|
|
66
|
+
{ text: '$ (AUD)', label: 'AUD' },
|
|
67
|
+
{ text: '$ (CAD)', label: 'CAD' },
|
|
68
|
+
{ text: 'CHF (CHF)', label: 'CHF' },
|
|
69
|
+
{ text: '¥ (CNY)', label: 'CNY' },
|
|
70
|
+
{ text: 'kr (SEK)', label: 'SEK' },
|
|
71
|
+
{ text: '$ (MXN)', label: 'MXN' },
|
|
72
|
+
{ text: '$ (NZD)', label: 'NZD' },
|
|
73
|
+
{ text: '$ (SGD)', label: 'SGD' },
|
|
74
|
+
{ text: '$ (HKD)', label: 'HKD' },
|
|
75
|
+
{ text: 'kr (NOK)', label: 'NOK' },
|
|
76
|
+
{ text: '₩ (KRW)', label: 'KRW' },
|
|
77
|
+
{ text: '₺ (TRY)', label: 'TRY' },
|
|
78
|
+
{ text: '₹ (INR)', label: 'INR' },
|
|
79
|
+
{ text: '₽ (RUB)', label: 'RUB' },
|
|
80
|
+
{ text: 'R$ (BRL)', label: 'BRL' },
|
|
81
|
+
{ text: 'R (ZAR)', label: 'ZAR' },
|
|
82
|
+
{ text: 'kr (DKK)', label: 'DKK' },
|
|
83
|
+
{ text: 'zł (PLN)', label: 'PLN' },
|
|
84
|
+
{ text: 'NT$ (TWD)', label: 'TWD' },
|
|
85
|
+
{ text: '฿ (THB)', label: 'THB' },
|
|
86
|
+
{ text: 'RM (MYR)', label: 'MYR' }
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
export const enum LOCALE_FORMATS {
|
|
90
|
+
DECIMAL = 'Decimal',
|
|
91
|
+
CURRENCY = 'Currency',
|
|
92
|
+
PERCENTAGE = 'Percentage',
|
|
93
|
+
SCIENTIFIC = 'Scientific',
|
|
94
|
+
}
|
|
95
|
+
export const enum LOCALE_STYLES {
|
|
96
|
+
DECIMAL = 'decimal',
|
|
97
|
+
PERCENT = 'percent',
|
|
98
|
+
CURRENCY = 'currency',
|
|
99
|
+
SCIENTIFIC = 'scientific',
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const LANG_DEFAULT = 'en-US';
|
package/src/format/format.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { isEmpty } from '../general/mix/isEmpty';
|
|
|
6
6
|
import { _get } from '../general/object/get';
|
|
7
7
|
import { COLUMN } from '../columns/constants/COLUMN';
|
|
8
8
|
import { FORMULA } from '../formulas/constants/FORMULA';
|
|
9
|
+
import { IFormatConfig } from '..';
|
|
10
|
+
import { formatWithLocale } from './localization';
|
|
9
11
|
|
|
10
12
|
dayjs.extend(advancedFormat); // Add support to advanced formats https://day.js.org/docs/en/plugin/advanced-format
|
|
11
13
|
|
|
@@ -82,22 +84,24 @@ export function formatFileSize(bytes: number): string {
|
|
|
82
84
|
return megaBytes < 10 ? `${fixDecimals(megaBytes)} MB` : `${Math.round(megaBytes)} MB`;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
export const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
case 'FILEUPLOAD':
|
|
97
|
-
return formatFileSize(parseFloat(value));
|
|
98
|
-
default:
|
|
99
|
-
return typeof value === 'number' ? value.toFixed(0) : value;
|
|
87
|
+
export const addFormat = (value: any, outputFormat: any = 'None', config?: IFormatConfig): any => {
|
|
88
|
+
if (isEmpty(value) || typeof value === 'object' && isEmpty(value[0])) return value;
|
|
89
|
+
switch (outputFormat.type) {
|
|
90
|
+
case 'DATE':
|
|
91
|
+
case 'DATETIME':
|
|
92
|
+
return config?.lang && outputFormat.format === 'Default' ? formatWithLocale(value, outputFormat, config) : formatDate(value, outputFormat.format);
|
|
93
|
+
case 'NUMERIC': {
|
|
94
|
+
const parse = parseFloat(value);
|
|
95
|
+
const withLocale = outputFormat.format !== 'Abbreviated' && outputFormat !== 'None' && config?.lang;
|
|
96
|
+
return isNaN(parse) ? value : withLocale ? formatWithLocale(value, outputFormat, config)
|
|
97
|
+
: formatNumber(parse, outputFormat, config);
|
|
100
98
|
}
|
|
99
|
+
case 'IMAGEUPLOAD':
|
|
100
|
+
case 'FILEUPLOAD':
|
|
101
|
+
return formatFileSize(parseFloat(value));
|
|
102
|
+
default:
|
|
103
|
+
return typeof value === 'number' ? value.toFixed(0) : value;
|
|
104
|
+
}
|
|
101
105
|
};
|
|
102
106
|
|
|
103
107
|
export const parseFormulaType = (type: string) => {
|
package/src/format/index.ts
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IFormatConfig, IFormatOutputFormat } from '../interfaces';
|
|
2
|
+
import { currencyISO, LOCALE_FORMATS, LOCALE_STYLES, LANG_DEFAULT } from './definition';
|
|
3
|
+
|
|
4
|
+
export const getLang = (locale: string | Record<string, any>) => {
|
|
5
|
+
if (!locale) return;
|
|
6
|
+
else if(typeof locale === 'object') return locale;
|
|
7
|
+
else return { lang: locale === "browser" ? window.navigator.language : locale };
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const formatWithLocale = (value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig = {}): any => {
|
|
11
|
+
switch (outputFormat.type) {
|
|
12
|
+
case 'DATE':
|
|
13
|
+
case 'DATETIME':
|
|
14
|
+
return formatLocaleDate(value, config);
|
|
15
|
+
case 'NUMERIC':
|
|
16
|
+
return formatLocaleNumber(value, outputFormat, config);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function formatLocaleDate(value: any, config: IFormatConfig) {
|
|
21
|
+
const { lang = LANG_DEFAULT, options } = config;
|
|
22
|
+
const dateParam = new Date(value);
|
|
23
|
+
try {
|
|
24
|
+
return new Intl.DateTimeFormat([lang, LANG_DEFAULT], options).format(dateParam);
|
|
25
|
+
} catch (error) {
|
|
26
|
+
return new Intl.DateTimeFormat(LANG_DEFAULT, options).format(dateParam);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function formatLocaleNumber(value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig,) {
|
|
31
|
+
const { lang = LANG_DEFAULT, options } = config;
|
|
32
|
+
const langOpts = options || getLocaleOptions(outputFormat);
|
|
33
|
+
try {
|
|
34
|
+
return new Intl.NumberFormat([lang, LANG_DEFAULT], langOpts).format(value);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
return new Intl.NumberFormat(LANG_DEFAULT, langOpts).format(value);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function getLocaleOptions(outputFormat: IFormatOutputFormat) {
|
|
41
|
+
const { format, decimals, currency, backup_currency } = outputFormat;
|
|
42
|
+
switch(format) {
|
|
43
|
+
case LOCALE_FORMATS.CURRENCY: {
|
|
44
|
+
const iso = currencyISO.find(item => item.text === (currency.text || backup_currency.text));
|
|
45
|
+
return { style: LOCALE_STYLES.CURRENCY, currency: iso.label, maximumFractionDigits: decimals, minimumFractionDigits: 0 };
|
|
46
|
+
}
|
|
47
|
+
case LOCALE_FORMATS.SCIENTIFIC: return { style: LOCALE_STYLES.DECIMAL,
|
|
48
|
+
notation: LOCALE_STYLES.SCIENTIFIC, maximumFractionDigits: decimals };
|
|
49
|
+
case LOCALE_FORMATS.PERCENTAGE: return { style: LOCALE_STYLES.PERCENT, maximumFractionDigits: decimals };
|
|
50
|
+
default: return { style: LOCALE_STYLES.DECIMAL, maximumFractionDigits: decimals };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -10,6 +10,7 @@ import { II18nFilterDisplay } from './filters/II18nFilterDisplay';
|
|
|
10
10
|
import { II18nBucketBuilder } from './bucket_builder/II18nBucketBuilder';
|
|
11
11
|
import { II18nCrossTabs } from './cross_tabs';
|
|
12
12
|
import { II18nChartBuilder } from '.';
|
|
13
|
+
import { II18nStyleThemes } from './style_themes/II18nStyleThemes';
|
|
13
14
|
|
|
14
15
|
export interface IResourceI18n {
|
|
15
16
|
bucket_builder?: II18nBucketBuilder;
|
|
@@ -23,5 +24,6 @@ export interface IResourceI18n {
|
|
|
23
24
|
filter_panel?: II18nFilterPanel;
|
|
24
25
|
formula_builder?: II18nFormulaBuilder;
|
|
25
26
|
panel?: II18nPanel;
|
|
27
|
+
style_themes?: II18nStyleThemes;
|
|
26
28
|
table_charts?: II18nTableCharts;
|
|
27
29
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export interface II18nChartBuilderFontOptions {
|
|
2
|
+
automatic_resize: string;
|
|
2
3
|
color: string;
|
|
4
|
+
disabled: string;
|
|
5
|
+
select_option_placeholder: string;
|
|
6
|
+
size: string;
|
|
3
7
|
style: string;
|
|
4
|
-
style_regular: string;
|
|
5
8
|
style_bold: string;
|
|
6
9
|
style_italic: string;
|
|
7
|
-
|
|
8
|
-
size: string;
|
|
10
|
+
style_regular: string;
|
|
9
11
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
export * from './bucket_builder/index';
|
|
2
|
+
export * from './chart_builder/index';
|
|
1
3
|
export * from './columns/index';
|
|
2
4
|
export * from './common/index';
|
|
5
|
+
export * from './cross_tabs/index';
|
|
3
6
|
export * from './dashboard/index';
|
|
4
7
|
export * from './filters/index';
|
|
5
8
|
export * from './formula_builder/index';
|
|
6
9
|
export * from './panel/index';
|
|
10
|
+
export * from './style_themes/index';
|
|
7
11
|
export * from './table_charts/index';
|
|
8
|
-
export * from './chart_builder/index';
|
|
9
12
|
|
|
10
13
|
export * from './II18nServiceTranslate';
|
|
11
14
|
export * from './II18nServiceTranslateOption';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { II18nStyleThemesDeleteDialog } from "./II18nStyleThemesDeleteDialog";
|
|
2
|
+
import { II18nStyleThemesMenu } from "./II18nStyleThemesMenu";
|
|
3
|
+
import { II18nStyleThemesMessages } from "./II18nStyleThemesMessages";
|
|
4
|
+
import { II18nStyleThemesTheme } from "./II18nStyleThemesTheme";
|
|
5
|
+
import { II18nStyleThemesTooltips } from "./II18nStyleThemesTooltips";
|
|
6
|
+
|
|
7
|
+
export interface II18nStyleThemes {
|
|
8
|
+
delete_dialog: II18nStyleThemesDeleteDialog;
|
|
9
|
+
menu: II18nStyleThemesMenu;
|
|
10
|
+
messages: II18nStyleThemesMessages;
|
|
11
|
+
theme: II18nStyleThemesTheme;
|
|
12
|
+
title: string;
|
|
13
|
+
tooltips: II18nStyleThemesTooltips;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface II18nStyleThemesMessages {
|
|
2
|
+
theme_could_not_be_created: string;
|
|
3
|
+
theme_could_not_be_deleted: string;
|
|
4
|
+
theme_could_not_be_duplicated: string;
|
|
5
|
+
theme_could_not_be_saved: string;
|
|
6
|
+
theme_could_not_be_selected: string;
|
|
7
|
+
theme_could_not_be_used_in_all_applications: string;
|
|
8
|
+
themes_could_not_be_loaded: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface II18nStyleThemesTheme {
|
|
2
|
+
axis_data_labels: string;
|
|
3
|
+
cancel_theme: string;
|
|
4
|
+
chart_titles_color: string;
|
|
5
|
+
copy: string;
|
|
6
|
+
create_theme: string;
|
|
7
|
+
data_styles: string;
|
|
8
|
+
data_visualization: string;
|
|
9
|
+
edit_theme: string;
|
|
10
|
+
generate_new: string;
|
|
11
|
+
header_font_color: string;
|
|
12
|
+
id: string;
|
|
13
|
+
legends: string;
|
|
14
|
+
main_color: string;
|
|
15
|
+
name_placeholder: string;
|
|
16
|
+
panel_styles: string;
|
|
17
|
+
qrvey_theme: string;
|
|
18
|
+
restore_to_default: string;
|
|
19
|
+
save_theme: string;
|
|
20
|
+
table_header_styles: string;
|
|
21
|
+
text_styles: string;
|
|
22
|
+
tooltips: string;
|
|
23
|
+
typeface: string;
|
|
24
|
+
untitled_theme: string;
|
|
25
|
+
use_theme_in_all_apps: string;
|
|
26
|
+
values: string;
|
|
27
|
+
}
|