@qrvey/utils 1.2.9-3 → 1.2.9-32
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 +0 -4323
- 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/columns/constants/COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COMPLEX_COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COMPLEX_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/cjs/columns/interfaces/IColumn.d.ts +0 -2
- package/dist/cjs/dates/constants/DATETIME_COLUMN_FORMAT.d.ts +1 -0
- package/dist/cjs/dates/constants/DATETIME_COLUMN_FORMAT.js +11 -0
- package/dist/cjs/dates/constants/index.d.ts +1 -0
- package/dist/cjs/dates/constants/index.js +1 -0
- package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO.d.ts +5 -0
- package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO.js +11 -0
- package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.d.ts +5 -0
- package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +14 -0
- package/dist/cjs/dates/relative/constants/index.d.ts +2 -0
- package/dist/cjs/dates/relative/constants/index.js +2 -0
- package/dist/cjs/dates/relative/interfaces/IRelativeUnit.d.ts +2 -0
- package/dist/cjs/{globalization/interfaces/IResourceI18n.js → dates/relative/interfaces/IRelativeUnit.js} +0 -0
- package/dist/cjs/dates/relative/interfaces/IRelativeUnitInfo.d.ts +5 -0
- package/dist/cjs/{globalization/interfaces/chart_builder/II18nChartBuilderChartLabes.js → dates/relative/interfaces/IRelativeUnitInfo.js} +0 -0
- package/dist/cjs/dates/relative/interfaces/index.d.ts +2 -0
- package/dist/cjs/dates/relative/interfaces/index.js +2 -0
- package/dist/cjs/filters/adapters/FDToFlatUI.js +1 -1
- package/dist/cjs/filters/adapters/FDToUI.js +2 -4
- package/dist/cjs/filters/adapters/logicToFlatUI.js +3 -3
- 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/getUIValues.js +13 -7
- package/dist/cjs/filters/helpers/ui/getUpdatedUIFilters.d.ts +9 -0
- package/dist/cjs/filters/helpers/ui/getUpdatedUIFilters.js +38 -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/OLD_IFilterDetail.d.ts +4 -1
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderConfig.d.ts +0 -2
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +2 -0
- package/dist/cjs/filters/interfaces/panel/IFPSettingsGeneral.d.ts +2 -1
- package/dist/cjs/filters/interfaces/panel/IFilterPanelConfig.d.ts +2 -2
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +7 -0
- package/dist/cjs/{globalization/interfaces/chart_builder/II18nChartBuilderComplexAddress.js → filters/interfaces/ui/IFUTransformFilterValuesSettings.js} +0 -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 +31 -0
- package/dist/cjs/format/definition.js +33 -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 +4 -0
- package/dist/cjs/format/localization.js +79 -0
- package/dist/cjs/globalization/helpers/getI18nCalendar.d.ts +4 -0
- package/dist/cjs/globalization/helpers/getI18nCalendar.js +69 -0
- package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.js +2 -0
- package/dist/cjs/globalization/helpers/getReverseI18nGroupLabel.js +2 -0
- package/dist/cjs/globalization/helpers/index.d.ts +1 -0
- package/dist/cjs/globalization/helpers/index.js +1 -0
- package/dist/cjs/globalization/interfaces/II18nConfig.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/{chart_builder/II18nChartBuilderComplexFile.js → II18nConfig.js} +0 -0
- package/dist/cjs/globalization/interfaces/{IResourceI18n.d.ts → II18nResource.d.ts} +3 -1
- package/dist/cjs/globalization/interfaces/{chart_builder/II18nChartBuilderComplexImage.js → II18nResource.js} +0 -0
- package/dist/cjs/globalization/interfaces/bucket_builder/II18nBucketBuilderMessages.d.ts +2 -1
- package/dist/cjs/globalization/interfaces/bucket_builder/II18nBucketBuilderModalBucket.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/{chart_builder/II18nChartBuilderComplexImageAnalysis.js → calendar/II18nCalendar.js} +0 -0
- package/dist/cjs/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/{chart_builder/II18nChartBuilderComplexName.js → calendar/II18nCalendarProperties.js} +0 -0
- package/dist/cjs/globalization/interfaces/calendar/index.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/calendar/index.js +14 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -16
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +19 -18
- package/dist/{globalization/interfaces/chart_builder/II18nChartBuilderChartLabes.d.ts → cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts} +1 -1
- package/dist/cjs/globalization/interfaces/chart_builder/{II18nChartBuilderComplexText.js → II18nChartBuilderChartLabels.js} +0 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderColorSettings.d.ts +5 -4
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComparisionOptions.d.ts +15 -11
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderDataPanel.d.ts +16 -15
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderDimensions.d.ts +13 -11
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.d.ts +5 -3
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderGeneralOptions.d.ts +16 -12
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderRefernceLine.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderSorting.d.ts +3 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +19 -16
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.d.ts +2 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTooltipSettings.d.ts +1 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderTrendChart.d.ts +15 -3
- package/dist/cjs/globalization/interfaces/chart_builder/index.d.ts +1 -8
- package/dist/cjs/globalization/interfaces/chart_builder/index.js +1 -8
- package/dist/cjs/globalization/interfaces/common/II18nColumnProperties.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/common/II18nUnits.d.ts +7 -0
- package/dist/cjs/globalization/interfaces/{chart_builder/II18nChartBuilderComplexUsaAddress.js → common/II18nUnits.js} +0 -0
- package/dist/cjs/globalization/interfaces/common/index.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/common/index.js +2 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboard.d.ts +3 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardMessages.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardMessages.js +2 -0
- package/dist/cjs/globalization/interfaces/dashboard/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/dashboard/index.js +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilter.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterBuilderColumnSelector.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterExtraInfo.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterExtraInfo.js +2 -0
- package/dist/cjs/globalization/interfaces/filters/II18nRelativeContainer.d.ts +5 -2
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.js +2 -0
- package/dist/cjs/globalization/interfaces/filters/II18nValueContainer.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/index.js +1 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderListModal.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/index.d.ts +7 -2
- package/dist/cjs/globalization/interfaces/index.js +7 -2
- package/dist/cjs/globalization/interfaces/panel/II18nPanelSummaryViews.d.ts +21 -11
- 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 +4 -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/interfaces/table_charts/II18nTableChartsPagination.d.ts +1 -0
- package/dist/cjs/globalization/labels/I18N_DEFAULT.d.ts +2 -2
- package/dist/cjs/globalization/labels/I18N_DEFAULT.js +2 -0
- package/dist/cjs/globalization/labels/bucket_builder/I18N_BUCKET_BUILDER.js +5 -2
- package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
- package/dist/cjs/globalization/labels/calendar/I18N_CALENDAR.js +10 -0
- package/dist/cjs/globalization/labels/calendar/index.d.ts +1 -0
- package/dist/cjs/globalization/labels/calendar/index.js +13 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_COMPARISION_OPTIONS.js +15 -11
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +53 -74
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +22 -15
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.js +3 -2
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +50 -43
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.js +1 -1
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +10 -0
- package/dist/cjs/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +7 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +10 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER_BUILDER.js +3 -2
- package/dist/cjs/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +5 -2
- package/dist/cjs/globalization/labels/filters/I18N_VALUE_CONTAINER.js +3 -2
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +5 -3
- package/dist/cjs/globalization/labels/index.d.ts +6 -3
- package/dist/cjs/globalization/labels/index.js +6 -3
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +22 -12
- 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 +58 -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 -0
- package/dist/cjs/globalization/service/i18nextBuilder.d.ts +3 -3
- package/dist/cjs/globalization/service/initI18n.d.ts +2 -2
- 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 +9 -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 +49 -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 +11 -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 +3 -3
- package/dist/cjs/services/api/getDatasetColumns.api.js +3 -1
- package/dist/columns/constants/COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/columns/constants/COMPLEX_COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/columns/constants/COMPLEX_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/columns/interfaces/IColumn.d.ts +0 -2
- package/dist/dates/constants/DATETIME_COLUMN_FORMAT.d.ts +1 -0
- package/dist/dates/constants/DATETIME_COLUMN_FORMAT.js +8 -0
- package/dist/dates/constants/index.d.ts +1 -0
- package/dist/dates/constants/index.js +1 -0
- package/dist/dates/relative/constants/RELATIVE_UNIT_INFO.d.ts +5 -0
- package/dist/dates/relative/constants/RELATIVE_UNIT_INFO.js +8 -0
- package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.d.ts +5 -0
- package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +11 -0
- package/dist/dates/relative/constants/index.d.ts +2 -0
- package/dist/dates/relative/constants/index.js +2 -0
- package/dist/dates/relative/interfaces/IRelativeUnit.d.ts +2 -0
- package/dist/{globalization/interfaces/IResourceI18n.js → dates/relative/interfaces/IRelativeUnit.js} +0 -0
- package/dist/dates/relative/interfaces/IRelativeUnitInfo.d.ts +5 -0
- package/dist/{globalization/interfaces/chart_builder/II18nChartBuilderChartLabes.js → dates/relative/interfaces/IRelativeUnitInfo.js} +0 -0
- package/dist/dates/relative/interfaces/index.d.ts +2 -0
- package/dist/dates/relative/interfaces/index.js +2 -0
- package/dist/filters/adapters/FDToFlatUI.js +1 -1
- package/dist/filters/adapters/FDToUI.js +2 -4
- package/dist/filters/adapters/logicToFlatUI.js +3 -3
- 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/getUIValues.js +13 -7
- package/dist/filters/helpers/ui/getUpdatedUIFilters.d.ts +9 -0
- package/dist/filters/helpers/ui/getUpdatedUIFilters.js +34 -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/OLD_IFilterDetail.d.ts +4 -1
- package/dist/filters/interfaces/builder/IFilterBuilderConfig.d.ts +0 -2
- package/dist/filters/interfaces/builder/IFilterBuilderGeneralConfig.d.ts +2 -0
- package/dist/filters/interfaces/panel/IFPSettingsGeneral.d.ts +2 -1
- package/dist/filters/interfaces/panel/IFilterPanelConfig.d.ts +2 -2
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +7 -0
- package/dist/{globalization/interfaces/chart_builder/II18nChartBuilderComplexAddress.js → filters/interfaces/ui/IFUTransformFilterValuesSettings.js} +0 -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 +31 -0
- package/dist/format/definition.js +32 -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 +4 -0
- package/dist/format/localization.js +73 -0
- package/dist/globalization/helpers/getI18nCalendar.d.ts +4 -0
- package/dist/globalization/helpers/getI18nCalendar.js +65 -0
- package/dist/globalization/helpers/getI18nDateGroupLabel.js +2 -0
- package/dist/globalization/helpers/getReverseI18nGroupLabel.js +2 -0
- package/dist/globalization/helpers/index.d.ts +1 -0
- package/dist/globalization/helpers/index.js +1 -0
- package/dist/globalization/interfaces/II18nConfig.d.ts +6 -0
- package/dist/globalization/interfaces/{chart_builder/II18nChartBuilderComplexFile.js → II18nConfig.js} +0 -0
- package/dist/globalization/interfaces/{IResourceI18n.d.ts → II18nResource.d.ts} +3 -1
- package/dist/globalization/interfaces/{chart_builder/II18nChartBuilderComplexImage.js → II18nResource.js} +0 -0
- package/dist/globalization/interfaces/bucket_builder/II18nBucketBuilderMessages.d.ts +2 -1
- package/dist/globalization/interfaces/bucket_builder/II18nBucketBuilderModalBucket.d.ts +2 -0
- package/dist/globalization/interfaces/calendar/II18nCalendar.d.ts +7 -0
- package/dist/globalization/interfaces/{chart_builder/II18nChartBuilderComplexImageAnalysis.js → calendar/II18nCalendar.js} +0 -0
- package/dist/globalization/interfaces/calendar/II18nCalendarProperties.d.ts +9 -0
- package/dist/globalization/interfaces/{chart_builder/II18nChartBuilderComplexName.js → calendar/II18nCalendarProperties.js} +0 -0
- package/dist/globalization/interfaces/calendar/index.d.ts +2 -0
- package/dist/globalization/interfaces/calendar/index.js +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -16
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +19 -18
- package/dist/{cjs/globalization/interfaces/chart_builder/II18nChartBuilderChartLabes.d.ts → globalization/interfaces/chart_builder/II18nChartBuilderChartLabels.d.ts} +1 -1
- package/dist/globalization/interfaces/chart_builder/{II18nChartBuilderComplexText.js → II18nChartBuilderChartLabels.js} +0 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderColorSettings.d.ts +5 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComparisionOptions.d.ts +15 -11
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderDataPanel.d.ts +16 -15
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderDimensions.d.ts +13 -11
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.d.ts +5 -3
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderGeneralOptions.d.ts +16 -12
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderRefernceLine.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderSorting.d.ts +3 -1
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +19 -16
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.d.ts +2 -1
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTooltipSettings.d.ts +1 -1
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderTrendChart.d.ts +15 -3
- package/dist/globalization/interfaces/chart_builder/index.d.ts +1 -8
- package/dist/globalization/interfaces/chart_builder/index.js +1 -8
- package/dist/globalization/interfaces/common/II18nColumnProperties.d.ts +1 -0
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +4 -0
- package/dist/globalization/interfaces/common/II18nDayNames.d.ts +7 -0
- package/dist/globalization/interfaces/common/II18nUnits.d.ts +7 -0
- package/dist/globalization/interfaces/{chart_builder/II18nChartBuilderComplexUsaAddress.js → common/II18nUnits.js} +0 -0
- package/dist/globalization/interfaces/common/index.d.ts +2 -0
- package/dist/globalization/interfaces/common/index.js +2 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboard.d.ts +3 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardMessages.d.ts +6 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardMessages.js +1 -0
- package/dist/globalization/interfaces/dashboard/index.d.ts +1 -0
- package/dist/globalization/interfaces/dashboard/index.js +1 -0
- package/dist/globalization/interfaces/filters/II18nFilter.d.ts +4 -0
- package/dist/globalization/interfaces/filters/II18nFilterBuilderColumnSelector.d.ts +1 -0
- package/dist/globalization/interfaces/filters/II18nFilterExtraInfo.d.ts +4 -0
- package/dist/globalization/interfaces/filters/II18nFilterExtraInfo.js +1 -0
- package/dist/globalization/interfaces/filters/II18nRelativeContainer.d.ts +5 -2
- package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +6 -0
- package/dist/globalization/interfaces/filters/II18nTokenBox.js +1 -0
- package/dist/globalization/interfaces/filters/II18nValueContainer.d.ts +1 -0
- package/dist/globalization/interfaces/filters/index.d.ts +1 -0
- package/dist/globalization/interfaces/filters/index.js +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderListModal.d.ts +2 -0
- package/dist/globalization/interfaces/index.d.ts +7 -2
- package/dist/globalization/interfaces/index.js +7 -2
- package/dist/globalization/interfaces/panel/II18nPanelSummaryViews.d.ts +21 -11
- 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 +4 -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/interfaces/table_charts/II18nTableChartsPagination.d.ts +1 -0
- package/dist/globalization/labels/I18N_DEFAULT.d.ts +2 -2
- package/dist/globalization/labels/I18N_DEFAULT.js +2 -0
- package/dist/globalization/labels/bucket_builder/I18N_BUCKET_BUILDER.js +5 -2
- package/dist/globalization/labels/calendar/I18N_CALENDAR.d.ts +2 -0
- package/dist/globalization/labels/calendar/I18N_CALENDAR.js +7 -0
- package/dist/globalization/labels/calendar/index.d.ts +1 -0
- package/dist/globalization/labels/calendar/index.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_COMPARISION_OPTIONS.js +15 -11
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.js +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +53 -74
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.js +22 -15
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.js +3 -2
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +50 -43
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.js +1 -1
- package/dist/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/globalization/labels/common/I18N_COMMON.js +10 -0
- package/dist/globalization/labels/common/I18N_DAY_NAMES.js +7 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +7 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +10 -0
- package/dist/globalization/labels/filters/I18N_FILTER_BUILDER.js +3 -2
- package/dist/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +5 -2
- package/dist/globalization/labels/filters/I18N_VALUE_CONTAINER.js +3 -2
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +5 -3
- package/dist/globalization/labels/index.d.ts +6 -3
- package/dist/globalization/labels/index.js +6 -3
- package/dist/globalization/labels/panel/I18N_PANEL.js +22 -12
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.d.ts +2 -0
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +55 -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 -0
- package/dist/globalization/service/i18nextBuilder.d.ts +3 -3
- package/dist/globalization/service/initI18n.d.ts +2 -2
- 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 +9 -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 +45 -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 +11 -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 +3 -3
- package/dist/services/api/getDatasetColumns.api.js +3 -1
- package/package.json +4 -7
- package/prepareToPublish.js +2 -1
- package/src/charts/constants/AGGREGATE_LABEL.ts +1 -1
- package/src/columns/constants/COMPLEX_COLUMN_PROPERTY_LABEL.ts +1 -0
- package/src/columns/interfaces/IColumn.ts +0 -2
- package/src/dates/constants/DATETIME_COLUMN_FORMAT.ts +8 -0
- package/src/dates/constants/index.ts +1 -0
- package/src/dates/relative/constants/RELATIVE_UNIT_INFO.ts +11 -0
- package/src/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.ts +13 -0
- package/src/dates/relative/constants/index.ts +2 -0
- package/src/dates/relative/interfaces/IRelativeUnit.ts +3 -0
- package/src/dates/relative/interfaces/IRelativeUnitInfo.ts +7 -0
- package/src/dates/relative/interfaces/index.ts +2 -0
- package/src/filters/adapters/FDToFlatUI.ts +1 -1
- package/src/filters/adapters/FDToUI.ts +2 -3
- package/src/filters/adapters/logicToFlatUI.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/getUIValues.ts +14 -9
- package/src/filters/helpers/ui/getUpdatedUIFilters.ts +36 -0
- package/src/filters/helpers/ui/index.ts +3 -0
- package/src/filters/helpers/ui/transformFilterValues.ts +29 -0
- package/src/filters/interfaces/OLD_IFilterDetail.ts +2 -1
- package/src/filters/interfaces/builder/IFilterBuilderConfig.ts +0 -2
- package/src/filters/interfaces/builder/IFilterBuilderGeneralConfig.ts +4 -1
- package/src/filters/interfaces/panel/IFPSettingsGeneral.ts +2 -1
- package/src/filters/interfaces/panel/IFilterPanelConfig.ts +2 -2
- package/src/filters/interfaces/ui/IFUTransformFilterValuesSettings.ts +8 -0
- package/src/filters/interfaces/ui/index.ts +3 -2
- package/src/format/definition.ts +50 -0
- package/src/format/format.ts +19 -15
- package/src/format/index.ts +1 -0
- package/src/format/localization.ts +75 -0
- package/src/globalization/helpers/getI18nCalendar.ts +68 -0
- package/src/globalization/helpers/getI18nDateGroupLabel.ts +2 -0
- package/src/globalization/helpers/getReverseI18nGroupLabel.ts +2 -0
- package/src/globalization/helpers/index.ts +1 -0
- package/src/globalization/interfaces/II18nConfig.ts +7 -0
- package/src/globalization/interfaces/{IResourceI18n.ts → II18nResource.ts} +3 -1
- package/src/globalization/interfaces/bucket_builder/II18nBucketBuilderMessages.ts +2 -1
- package/src/globalization/interfaces/bucket_builder/II18nBucketBuilderModalBucket.ts +2 -0
- package/src/globalization/interfaces/calendar/II18nCalendar.ts +7 -0
- package/src/globalization/interfaces/calendar/II18nCalendarProperties.ts +9 -0
- package/src/globalization/interfaces/calendar/index.ts +2 -0
- package/src/globalization/interfaces/chart_builder/II18nChartBuilder.ts +2 -16
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.ts +19 -18
- package/src/globalization/interfaces/chart_builder/{II18nChartBuilderChartLabes.ts → II18nChartBuilderChartLabels.ts} +1 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderColorSettings.ts +5 -4
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComparisionOptions.ts +15 -11
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderConditionalFormatting.ts +2 -0
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderDataPanel.ts +16 -15
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderDimensions.ts +13 -11
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderFontOptions.ts +5 -3
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderGeneralOptions.ts +16 -12
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderRefernceLine.ts +1 -0
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderSorting.ts +3 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.ts +19 -16
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderTableCalculation.ts +2 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderTooltipSettings.ts +1 -1
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderTrendChart.ts +15 -3
- package/src/globalization/interfaces/chart_builder/index.ts +1 -8
- package/src/globalization/interfaces/common/II18nColumnProperties.ts +1 -0
- package/src/globalization/interfaces/common/II18nCommon.ts +4 -0
- package/src/globalization/interfaces/common/II18nDayNames.ts +8 -0
- package/src/globalization/interfaces/common/II18nUnits.ts +7 -0
- package/src/globalization/interfaces/common/index.ts +3 -0
- package/src/globalization/interfaces/dashboard/II18nDashboard.ts +3 -0
- package/src/globalization/interfaces/dashboard/II18nDashboardMessages.ts +6 -0
- package/src/globalization/interfaces/dashboard/index.ts +1 -0
- package/src/globalization/interfaces/filters/II18nFilter.ts +4 -0
- package/src/globalization/interfaces/filters/II18nFilterBuilderColumnSelector.ts +1 -0
- package/src/globalization/interfaces/filters/II18nFilterExtraInfo.ts +4 -0
- package/src/globalization/interfaces/filters/II18nRelativeContainer.ts +5 -2
- package/src/globalization/interfaces/filters/II18nTokenBox.ts +6 -0
- package/src/globalization/interfaces/filters/II18nValueContainer.ts +1 -0
- package/src/globalization/interfaces/filters/index.ts +1 -0
- package/src/globalization/interfaces/formula_builder/II18nFormulaBuilderListModal.ts +3 -1
- package/src/globalization/interfaces/index.ts +7 -2
- package/src/globalization/interfaces/panel/II18nPanelSummaryViews.ts +21 -11
- 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 +4 -0
- package/src/globalization/interfaces/style_themes/index.ts +6 -0
- package/src/globalization/interfaces/table_charts/II18nTableChartsPagination.ts +1 -0
- package/src/globalization/labels/I18N_DEFAULT.ts +4 -2
- package/src/globalization/labels/bucket_builder/I18N_BUCKET_BUILDER.ts +5 -2
- package/src/globalization/labels/calendar/I18N_CALENDAR.ts +9 -0
- package/src/globalization/labels/calendar/index.ts +1 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_COMPARISION_OPTIONS.ts +15 -11
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.ts +2 -0
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.ts +55 -78
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.ts +23 -17
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.ts +3 -2
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.ts +51 -44
- package/src/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.ts +1 -1
- package/src/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.ts +1 -0
- package/src/globalization/labels/common/I18N_COMMON.ts +10 -0
- package/src/globalization/labels/common/I18N_DAY_NAMES.ts +8 -0
- package/src/globalization/labels/dashboard/I18N_DASHBOARD.ts +7 -0
- package/src/globalization/labels/filters/I18N_FILTER.ts +10 -0
- package/src/globalization/labels/filters/I18N_FILTER_BUILDER.ts +3 -2
- package/src/globalization/labels/filters/I18N_RELATIVE_CONTAINER.ts +5 -2
- package/src/globalization/labels/filters/I18N_VALUE_CONTAINER.ts +3 -2
- package/src/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.ts +5 -3
- package/src/globalization/labels/index.ts +6 -3
- package/src/globalization/labels/panel/I18N_PANEL.ts +22 -12
- package/src/globalization/labels/style_themes/I18N_STYLE_THEMES.ts +57 -0
- package/src/globalization/labels/style_themes/index.ts +1 -0
- package/src/globalization/labels/table_charts/I18N_TABLE_CHARTS.ts +1 -0
- package/src/globalization/service/i18nextBuilder.ts +4 -4
- package/src/globalization/service/initI18n.ts +3 -3
- 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 +10 -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 +49 -0
- package/src/qrvey/interfaces/IGetValueWithSuffixesSettings.ts +12 -0
- package/src/qrvey/interfaces/ITransformValueSettings.ts +13 -0
- package/src/qrvey/interfaces/index.ts +2 -0
- package/src/services/api/getAllDatasets.api.ts +4 -3
- package/src/services/api/getDatasetColumns.api.ts +3 -1
- package/test/columns/isNumericalColumn.test.js +154 -0
- package/test/format.test.js +11 -11
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexAddress.d.ts +0 -5
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexFile.d.ts +0 -4
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexImage.d.ts +0 -4
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexImageAnalysis.d.ts +0 -4
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexName.d.ts +0 -4
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexText.d.ts +0 -6
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderComplexUsaAddress.d.ts +0 -5
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexAddress.d.ts +0 -5
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexFile.d.ts +0 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexImage.d.ts +0 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexImageAnalysis.d.ts +0 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexName.d.ts +0 -4
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexText.d.ts +0 -6
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderComplexUsaAddress.d.ts +0 -5
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexAddress.ts +0 -6
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexFile.ts +0 -4
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexImage.ts +0 -4
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexImageAnalysis.ts +0 -4
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexName.ts +0 -4
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexText.ts +0 -6
- package/src/globalization/interfaces/chart_builder/II18nChartBuilderComplexUsaAddress.ts +0 -6
|
@@ -2,6 +2,8 @@ export * from './AbsoluteStatement';
|
|
|
2
2
|
export * from './Anchor';
|
|
3
3
|
export * from './RelativeCursor';
|
|
4
4
|
export * from './IRelativeCursorInfo';
|
|
5
|
+
export * from './IRelativeUnit';
|
|
6
|
+
export * from './IRelativeUnitInfo';
|
|
5
7
|
export * from './RelativeInput';
|
|
6
8
|
export * from './RelativeStatement';
|
|
7
9
|
export * from './RelativeToAbsoluteStruct';
|
|
@@ -47,7 +47,7 @@ function FD21ToFlatUI(scopes: IFSScope[] = [], datasetsInfo: IDataset[] = []): I
|
|
|
47
47
|
dataset.filters.forEach(filter => {
|
|
48
48
|
const datasetInfo: IDataset = datasetsInfo.find(dInfo => dInfo.qrveyid === dataset.qrveyid && dInfo.linkid === dataset.linkid);
|
|
49
49
|
let columnInfo: IColumn;
|
|
50
|
-
if (!isEmpty(datasetInfo)) columnInfo = datasetInfo.options.find(cInfo => cInfo.id === filter.column.id && cInfo.
|
|
50
|
+
if (!isEmpty(datasetInfo)) columnInfo = datasetInfo.options.find(cInfo => cInfo.id === filter.column.id && cInfo.qrveyid === filter.column.qrveyid && cInfo.linkid === filter.column.linkid);
|
|
51
51
|
const info = !isEmpty(filter.extras.info) ? { icon: filter.extras.info.icon, label: filter.extras.info.label } : undefined;
|
|
52
52
|
const property = adaptDateGroupingProperty(filter.property);
|
|
53
53
|
|
|
@@ -11,7 +11,6 @@ import { FILTER_SECTION } from "../constants/common/FILTER_SECTION";
|
|
|
11
11
|
import { IFUScope } from "../interfaces/ui/IFUScope";
|
|
12
12
|
import { FILTER_STRUCTURE_VERSION } from "../constants/common/FILTER_STRUCTURE_VERSION";
|
|
13
13
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
14
|
-
import { _get } from "../../general/object/get";
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Generates a UI filter structure from Filter Data structure.
|
|
@@ -71,8 +70,8 @@ export function FDToUI(filterData: IFSData, datasetsInfo: IDataset[] = []): IFUD
|
|
|
71
70
|
id: filter.column.id,
|
|
72
71
|
label: columnInfo?.label,
|
|
73
72
|
linked: columnInfo?.linked,
|
|
74
|
-
linkid: columnInfo?.
|
|
75
|
-
outputFormat:
|
|
73
|
+
linkid: columnInfo?.linkid || datasetInfo?.linkid,
|
|
74
|
+
outputFormat: columnInfo?.outputFormat,
|
|
76
75
|
qrveyid: filter.column.qrveyid,
|
|
77
76
|
type: columnInfo?.type || filter.column.type,
|
|
78
77
|
},
|
|
@@ -103,7 +103,7 @@ function getFilterByExpression(expression: OLD_IFilterExpression, scopeItem: OLD
|
|
|
103
103
|
enabled: true,
|
|
104
104
|
displayed: true,
|
|
105
105
|
qrveyid: uiExtras.column?.qrveyid,
|
|
106
|
-
label: _get(
|
|
106
|
+
label: _get(uiExtras.column, 'dataset.name') || uiExtras.column?.label,
|
|
107
107
|
linkid: uiExtras.column?.linkid,
|
|
108
108
|
},
|
|
109
109
|
},
|
|
@@ -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
|
+
i18n: config.i18n,
|
|
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
|
+
}
|
|
@@ -23,7 +23,6 @@ import { getI18nDateGroupLabel, IDateColumnPropertyType } from "../../..";
|
|
|
23
23
|
*/
|
|
24
24
|
export function getUIValues(filter: IFSFilter, settings?: IFUUIValueSettings): IFUValue[] {
|
|
25
25
|
settings = getUiValuesSettings(settings);
|
|
26
|
-
|
|
27
26
|
switch (filter.validator) {
|
|
28
27
|
case FILTER_VALIDATOR.AFTER:
|
|
29
28
|
case FILTER_VALIDATOR.GREATER_THAN:
|
|
@@ -50,15 +49,20 @@ export function getUIValues(filter: IFSFilter, settings?: IFUUIValueSettings): I
|
|
|
50
49
|
case FILTER_VALIDATOR.IS_NULL:
|
|
51
50
|
case FILTER_VALIDATOR.IS_NOT_NULL:
|
|
52
51
|
return [{
|
|
53
|
-
value: FILTER_VALIDATOR_INFO[filter.validator].label,
|
|
52
|
+
value: settings?.translate ? settings.translate('filter.validators.' + filter.validator.toLowerCase() + '_label') : FILTER_VALIDATOR_INFO[filter.validator].label,
|
|
54
53
|
enabled: settings.addEnableds ? (filter.values as IFSValue[])[0]?.enabled : undefined,
|
|
55
54
|
}];
|
|
56
55
|
case FILTER_VALIDATOR.IN:
|
|
57
|
-
return (filter.values as IFSValueRelativeDate[]).map(value =>
|
|
58
|
-
value:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
return (filter.values as IFSValueRelativeDate[]).map(value => {
|
|
57
|
+
const cursor = settings?.translate ? settings.translate(RELATIVE_CURSOR_INFO[value.cursor].i18nLabelPath) : RELATIVE_CURSOR_INFO[value.cursor].i18nLabelPath;
|
|
58
|
+
const from = settings?.translate ? settings.translate('filter.relative_container.from_label') : 'from';
|
|
59
|
+
const anchor = settings?.translate ? settings?.translate('filter.relative_container.current_date') : 'current date';
|
|
60
|
+
return {
|
|
61
|
+
value:
|
|
62
|
+
`${cursor} ${value.cursor !== RELATIVE_CURSOR.THIS && value.number > 1 ? value.number : ''} ${getValueUiUnitRelativeDate(value, settings)} ${value.cursor !== RELATIVE_CURSOR.THIS ? `${from} ${value.anchor || anchor}`: ''}`,
|
|
63
|
+
enabled: settings.addEnableds ? filter.enabled : undefined,
|
|
64
|
+
};
|
|
65
|
+
});
|
|
62
66
|
default:
|
|
63
67
|
if (filter.column.type === COLUMN.RANKING && isEmpty(filter.column.aggregate)) {
|
|
64
68
|
return getRankingUIValues(filter.values as IFSValueRanking[][], settings.addEnableds, settings.rankingGroupIndex);
|
|
@@ -84,8 +88,9 @@ function getUiValuesSettings(settings: IFUUIValueSettings): IFUUIValueSettings {
|
|
|
84
88
|
};
|
|
85
89
|
}
|
|
86
90
|
|
|
87
|
-
function getValueUiUnitRelativeDate(relative: IFSValueRelativeDate) {
|
|
88
|
-
|
|
91
|
+
function getValueUiUnitRelativeDate(relative: IFSValueRelativeDate, settings: IFUUIValueSettings) {
|
|
92
|
+
const unit = settings.translate ? `${settings.translate(`common.units.${relative.unit}`)}` : relative.unit;
|
|
93
|
+
return relative.cursor !== RELATIVE_CURSOR.THIS && relative.number > 1 ? `${unit}s`: unit;
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
function getRankingUIValues(values: IFSValueRanking[][], addEnableds = false, rankingGroupIndex?: number) {
|
|
@@ -0,0 +1,36 @@
|
|
|
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.qrveyid === filter.column.qrveyid && cInfo.linkid === filter.column.linkid);
|
|
22
|
+
if (!isEmpty(columnInfo)) {
|
|
23
|
+
filter.column.formulaType = columnInfo.formulaType;
|
|
24
|
+
filter.column.geogroup = columnInfo.geogroup;
|
|
25
|
+
filter.column.label = columnInfo.label;
|
|
26
|
+
filter.column.outputFormat = columnInfo.outputFormat;
|
|
27
|
+
filter.column.type = columnInfo.type;
|
|
28
|
+
}
|
|
29
|
+
return filter;
|
|
30
|
+
});
|
|
31
|
+
return dataset;
|
|
32
|
+
});
|
|
33
|
+
return scopes;
|
|
34
|
+
});
|
|
35
|
+
return { ...data, scopes: updatedScopes };
|
|
36
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
2
|
+
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
2
3
|
import { IFSFilterExtrasInfo } from "./common/IFSFilterExtrasInfo";
|
|
3
4
|
import { IFDateSection } from "./IFDateSection";
|
|
4
5
|
import { IFOperator } from "./IFOperator";
|
|
@@ -11,7 +12,7 @@ import { IFUChartSettings } from "./ui/IFUChartSettings";
|
|
|
11
12
|
import { IFUValue } from "./ui/IFUValue";
|
|
12
13
|
|
|
13
14
|
export interface OLD_IFilterDetail {
|
|
14
|
-
column?: IColumn;
|
|
15
|
+
column?: IColumn & { dataset: IDataset };
|
|
15
16
|
dateSection?: IFDateSection;
|
|
16
17
|
enabled?: boolean;
|
|
17
18
|
lookupDisplayIndex?: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IResourceI18n } from "../../../globalization/interfaces/IResourceI18n";
|
|
2
1
|
import { IFBLogic } from "../backend/IFBLogic";
|
|
3
2
|
import { IFBUserFilters } from "../backend/IFBUserFilters";
|
|
4
3
|
import { IFSColumn } from "../common/IFSColumn";
|
|
@@ -16,7 +15,6 @@ import { IFilterBuilderSettings } from "./IFilterBuilderSettings";
|
|
|
16
15
|
* Structure for the configuration of the Filter Builder
|
|
17
16
|
*/
|
|
18
17
|
export interface IFilterBuilderConfig {
|
|
19
|
-
i18n?: IResourceI18n; // Globalization object
|
|
20
18
|
datasets?: string[]; // Qrvey IDs for displaying their columns in the colum selector. No qrveyids, the column list is not render
|
|
21
19
|
filterData?: IFSData; // The Filter Data structure
|
|
22
20
|
filterLabel?: string; // A label for the filter. If filterLabel is provided the old filterLabel is replaced by the new one
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { II18nConfig } from "../../../globalization/interfaces/II18nConfig";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Structure for the Fiter Builder General config
|
|
3
5
|
*/
|
|
@@ -6,6 +8,7 @@ export interface IFilterBuilderGeneralConfig {
|
|
|
6
8
|
appid: string; // App ID
|
|
7
9
|
domain: string; // The domain of the environment
|
|
8
10
|
qv_token?: string; // Qrvey Token for RLS
|
|
9
|
-
timezoneControl?: string;
|
|
11
|
+
timezoneControl?: string; // Offset number for Timezone
|
|
12
|
+
i18n?: II18nConfig; // The i18n configuration;
|
|
10
13
|
userid: string; // User ID
|
|
11
14
|
}
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { II18nConfig } from "../../../globalization/interfaces/II18nConfig";
|
|
2
2
|
import { IFilterBuilderConfig } from "../builder/IFilterBuilderConfig";
|
|
3
3
|
import { IFUDataStore } from "../ui/IFUDataStore";
|
|
4
4
|
|
|
@@ -7,5 +7,5 @@ import { IFUDataStore } from "../ui/IFUDataStore";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IFilterPanelConfig extends IFUDataStore {
|
|
9
9
|
filterBuilderConfig?: IFilterBuilderConfig; // Filter Builder config object
|
|
10
|
-
i18n?:
|
|
10
|
+
i18n?: II18nConfig; // The i18n configuration;
|
|
11
11
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { II18nConfig } from "../../../globalization/interfaces/II18nConfig";
|
|
2
|
+
import { II18nServiceTranslate } from "../../../globalization/interfaces/II18nServiceTranslate";
|
|
3
|
+
|
|
4
|
+
export interface IFUTransformFilterValuesSettings {
|
|
5
|
+
translate: II18nServiceTranslate; // Function for getting translations
|
|
6
|
+
i18n: II18nConfig; // I18n configuration
|
|
7
|
+
suffixTranslateLabel?: string // The i18n label for the suffix values.
|
|
8
|
+
}
|
|
@@ -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,53 @@ 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
|
+
ABBREVIATED = 'Abbreviated'
|
|
95
|
+
}
|
|
96
|
+
export const enum LOCALE_STYLES {
|
|
97
|
+
DECIMAL = 'decimal',
|
|
98
|
+
PERCENT = 'percent',
|
|
99
|
+
CURRENCY = 'currency',
|
|
100
|
+
SCIENTIFIC = 'scientific',
|
|
101
|
+
COMPACT = 'compact'
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const LANG_DEFAULT = 'en-US';
|
|
105
|
+
export const CURRENCY_DEFAULT = { text: '$ (USD)', label: 'USD' };
|
|
106
|
+
export const DATETIME_OPTIONS = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
|
107
|
+
|
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 !== '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,75 @@
|
|
|
1
|
+
import { DATETIME_COLUMN_FORMAT } from '..';
|
|
2
|
+
import { isEmpty } from '../general/mix/isEmpty';
|
|
3
|
+
import { IFormatConfig, IFormatOutputFormat } from '../interfaces';
|
|
4
|
+
import { currencyISO, LOCALE_FORMATS, LOCALE_STYLES, LANG_DEFAULT, CURRENCY_DEFAULT, DATETIME_OPTIONS } from './definition';
|
|
5
|
+
|
|
6
|
+
export const getLang = (locale: string | Record<string, any>) => {
|
|
7
|
+
if (!locale) return;
|
|
8
|
+
else if(typeof locale === 'object') return locale;
|
|
9
|
+
else return { lang: locale === "browser" ? window.navigator.language : locale };
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const chooseLang = (config: Record<string, any>): string => {
|
|
13
|
+
const lang: string | Record<string, any> = (
|
|
14
|
+
config?.i18n?.lang ||
|
|
15
|
+
config.lang
|
|
16
|
+
);
|
|
17
|
+
return (<any>lang)?.lang || lang || LANG_DEFAULT;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const formatWithLocale = (value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig = {}): any => {
|
|
21
|
+
switch (outputFormat.type) {
|
|
22
|
+
case 'DATE':
|
|
23
|
+
case 'DATETIME':
|
|
24
|
+
return formatLocaleDate(value, outputFormat, config);
|
|
25
|
+
case 'NUMERIC':
|
|
26
|
+
return formatLocaleNumber(value, outputFormat, config);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function formatLocaleDate(value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig) {
|
|
31
|
+
const { lang = LANG_DEFAULT, options } = config;
|
|
32
|
+
const dateParam = new Date(value);
|
|
33
|
+
let langOpts = options;
|
|
34
|
+
if (outputFormat?.originalFormat) {
|
|
35
|
+
const { format } = outputFormat.originalFormat;
|
|
36
|
+
if (DATETIME_COLUMN_FORMAT.includes(format)) langOpts = DATETIME_OPTIONS;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
return new Intl.DateTimeFormat([lang, LANG_DEFAULT], langOpts).format(dateParam);
|
|
40
|
+
} catch (error) {
|
|
41
|
+
return isEmpty(dateParam) ? value : new Intl.DateTimeFormat(LANG_DEFAULT, langOpts).format(dateParam);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function formatLocaleNumber(value: any, outputFormat: IFormatOutputFormat, config: IFormatConfig,) {
|
|
46
|
+
const { lang = LANG_DEFAULT, options } = config;
|
|
47
|
+
const langOpts = options || getLocaleOptions(outputFormat);
|
|
48
|
+
const valueToFormat = outputFormat?.format === LOCALE_FORMATS.PERCENTAGE ? value/100 : value;
|
|
49
|
+
try {
|
|
50
|
+
return new Intl.NumberFormat([lang, LANG_DEFAULT], langOpts).format(valueToFormat);
|
|
51
|
+
} catch (e) {
|
|
52
|
+
return new Intl.NumberFormat(LANG_DEFAULT, langOpts).format(valueToFormat);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getLocaleOptions(outputFormat: IFormatOutputFormat) {
|
|
57
|
+
const { format, decimals, currency } = outputFormat;
|
|
58
|
+
switch(format) {
|
|
59
|
+
case LOCALE_FORMATS.CURRENCY: {
|
|
60
|
+
let iso = isEmpty(currency) ? CURRENCY_DEFAULT : currencyISO.find(item => item.text === currency.text);
|
|
61
|
+
if(isEmpty(iso)) {
|
|
62
|
+
iso = currencyISO.find(item => {
|
|
63
|
+
const symbol = item.text.split(' ')[0];
|
|
64
|
+
return symbol === currency.label;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return { style: LOCALE_STYLES.CURRENCY, currency: iso.label, maximumFractionDigits: decimals, minimumFractionDigits: decimals, currencyDisplay: 'narrowSymbol' };
|
|
68
|
+
}
|
|
69
|
+
case LOCALE_FORMATS.SCIENTIFIC: return { style: LOCALE_STYLES.DECIMAL,
|
|
70
|
+
notation: LOCALE_STYLES.SCIENTIFIC, maximumFractionDigits: decimals, minimumFractionDigits: decimals };
|
|
71
|
+
case LOCALE_FORMATS.PERCENTAGE: return { style: LOCALE_STYLES.PERCENT, maximumFractionDigits: decimals, minimumFractionDigits: decimals };
|
|
72
|
+
case LOCALE_FORMATS.ABBREVIATED: return { notation: LOCALE_STYLES.COMPACT, maximumFractionDigits: decimals, minimumFractionDigits: decimals };
|
|
73
|
+
default: return { style: LOCALE_STYLES.DECIMAL, maximumFractionDigits: decimals, minimumFractionDigits: decimals };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { II18nCalendarProperties } from "../interfaces/calendar/II18nCalendarProperties";
|
|
2
|
+
import { II18nServiceTranslate } from "../interfaces/II18nServiceTranslate";
|
|
3
|
+
import { I18nService } from "../service/i18nextBuilder";
|
|
4
|
+
|
|
5
|
+
export function getI18nCalendar(locale: I18nService | II18nServiceTranslate): II18nCalendarProperties {
|
|
6
|
+
const localeOverride = locale instanceof I18nService ? locale : typeof locale === 'function' ? { translate: locale } : undefined;
|
|
7
|
+
if (!localeOverride) return undefined;
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
clear: localeOverride.translate('common.calendar.clear'),
|
|
11
|
+
days: [
|
|
12
|
+
localeOverride.translate('common.day_names.sunday_dddd'),
|
|
13
|
+
localeOverride.translate('common.day_names.monday_dddd'),
|
|
14
|
+
localeOverride.translate('common.day_names.tuesday_dddd'),
|
|
15
|
+
localeOverride.translate('common.day_names.wednesday_dddd'),
|
|
16
|
+
localeOverride.translate('common.day_names.thursday_dddd'),
|
|
17
|
+
localeOverride.translate('common.day_names.friday_dddd'),
|
|
18
|
+
localeOverride.translate('common.day_names.saturday_dddd')
|
|
19
|
+
],
|
|
20
|
+
daysMin: [
|
|
21
|
+
localeOverride.translate('common.day_names.sunday_dd'),
|
|
22
|
+
localeOverride.translate('common.day_names.monday_dd'),
|
|
23
|
+
localeOverride.translate('common.day_names.tuesday_dd'),
|
|
24
|
+
localeOverride.translate('common.day_names.wednesday_dd'),
|
|
25
|
+
localeOverride.translate('common.day_names.thursday_dd'),
|
|
26
|
+
localeOverride.translate('common.day_names.friday_dd'),
|
|
27
|
+
localeOverride.translate('common.day_names.saturday_dd')
|
|
28
|
+
],
|
|
29
|
+
daysShort: [
|
|
30
|
+
localeOverride.translate('common.day_names.sunday_ddd'),
|
|
31
|
+
localeOverride.translate('common.day_names.monday_ddd'),
|
|
32
|
+
localeOverride.translate('common.day_names.tuesday_ddd'),
|
|
33
|
+
localeOverride.translate('common.day_names.wednesday_ddd'),
|
|
34
|
+
localeOverride.translate('common.day_names.thursday_ddd'),
|
|
35
|
+
localeOverride.translate('common.day_names.friday_ddd'),
|
|
36
|
+
localeOverride.translate('common.day_names.saturday_ddd')
|
|
37
|
+
],
|
|
38
|
+
months: [
|
|
39
|
+
localeOverride.translate('common.date_grouping.january_mmmm'),
|
|
40
|
+
localeOverride.translate('common.date_grouping.february_mmmm'),
|
|
41
|
+
localeOverride.translate('common.date_grouping.march_mmmm'),
|
|
42
|
+
localeOverride.translate('common.date_grouping.april_mmmm'),
|
|
43
|
+
localeOverride.translate('common.date_grouping.may_mmmm'),
|
|
44
|
+
localeOverride.translate('common.date_grouping.june_mmmm'),
|
|
45
|
+
localeOverride.translate('common.date_grouping.july_mmmm'),
|
|
46
|
+
localeOverride.translate('common.date_grouping.august_mmmm'),
|
|
47
|
+
localeOverride.translate('common.date_grouping.september_mmmm'),
|
|
48
|
+
localeOverride.translate('common.date_grouping.october_mmmm'),
|
|
49
|
+
localeOverride.translate('common.date_grouping.november_mmmm'),
|
|
50
|
+
localeOverride.translate('common.date_grouping.december_mmmm')
|
|
51
|
+
],
|
|
52
|
+
monthsShort: [
|
|
53
|
+
localeOverride.translate('common.date_grouping.january_mmm'),
|
|
54
|
+
localeOverride.translate('common.date_grouping.february_mmm'),
|
|
55
|
+
localeOverride.translate('common.date_grouping.march_mmm'),
|
|
56
|
+
localeOverride.translate('common.date_grouping.april_mmm'),
|
|
57
|
+
localeOverride.translate('common.date_grouping.may_mmm'),
|
|
58
|
+
localeOverride.translate('common.date_grouping.june_mmm'),
|
|
59
|
+
localeOverride.translate('common.date_grouping.july_mmm'),
|
|
60
|
+
localeOverride.translate('common.date_grouping.august_mmm'),
|
|
61
|
+
localeOverride.translate('common.date_grouping.september_mmm'),
|
|
62
|
+
localeOverride.translate('common.date_grouping.october_mmm'),
|
|
63
|
+
localeOverride.translate('common.date_grouping.november_mmm'),
|
|
64
|
+
localeOverride.translate('common.date_grouping.december_mmm')
|
|
65
|
+
],
|
|
66
|
+
today: localeOverride.translate('common.calendar.today')
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -7,6 +7,8 @@ import { isTokenLabel } from "../../tokens/isTokenLabel";
|
|
|
7
7
|
import { II18nServiceTranslate } from "../interfaces/II18nServiceTranslate";
|
|
8
8
|
|
|
9
9
|
export function getI18nDateGroupLabel(label: string, dateGroup: IDateColumnPropertyType, translate?: II18nServiceTranslate): string {
|
|
10
|
+
if (isEmpty(label)) return label;
|
|
11
|
+
|
|
10
12
|
if (dateGroup === DATE_GROUPING_PROPERTY.MONTH)
|
|
11
13
|
return getI18nMonthLabel(label, translate);
|
|
12
14
|
else if (dateGroup === DATE_GROUPING_PROPERTY.QUARTER)
|
|
@@ -8,6 +8,8 @@ import { isTokenLabel } from "../../tokens/isTokenLabel";
|
|
|
8
8
|
import { II18nServiceTranslate } from "../interfaces/II18nServiceTranslate";
|
|
9
9
|
|
|
10
10
|
export function getReverseI18nGroupLabel(label: string, dateGroup: IDateColumnPropertyType, translate?: II18nServiceTranslate): string {
|
|
11
|
+
if (isEmpty(label)) return label;
|
|
12
|
+
|
|
11
13
|
if (dateGroup === DATE_GROUPING_PROPERTY.MONTH)
|
|
12
14
|
return getReverseI18nMonthLabel(label, translate);
|
|
13
15
|
else if (dateGroup === DATE_GROUPING_PROPERTY.QUARTER)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { II18nResource } from "./II18nResource";
|
|
2
|
+
|
|
3
|
+
export interface II18nConfig {
|
|
4
|
+
lang?: string; // Language format for getting stored traslations of the labels (en-US)
|
|
5
|
+
locale?: string; // Language format for transform number and date values (en-US)
|
|
6
|
+
lang_object?: II18nResource; // Oject Structure to translate labels
|
|
7
|
+
}
|
|
@@ -10,8 +10,9 @@ 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
|
-
export interface
|
|
15
|
+
export interface II18nResource {
|
|
15
16
|
bucket_builder?: II18nBucketBuilder;
|
|
16
17
|
chart_builder?: II18nChartBuilder;
|
|
17
18
|
common?: II18nCommon;
|
|
@@ -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
|
}
|