@qrvey/utils 1.5.0-0 → 1.5.0-11
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 +1 -1
- package/dist/charts/adapters/endpointData.d.ts +90 -0
- package/dist/charts/adapters/endpointData.js +513 -0
- package/dist/charts/adapters/endpointDataGet.d.ts +14 -0
- package/dist/charts/adapters/endpointDataGet.js +427 -0
- package/dist/charts/adapters/endpointDataValidators.d.ts +4 -0
- package/dist/charts/adapters/endpointDataValidators.js +54 -0
- package/dist/charts/adapters/index.d.ts +3 -0
- package/dist/charts/adapters/index.js +3 -0
- package/dist/charts/index.d.ts +1 -0
- package/dist/charts/index.js +1 -0
- package/dist/cjs/charts/adapters/endpointData.d.ts +90 -0
- package/dist/cjs/charts/adapters/endpointData.js +519 -0
- package/dist/cjs/charts/adapters/endpointDataGet.d.ts +14 -0
- package/dist/cjs/charts/adapters/endpointDataGet.js +443 -0
- package/dist/cjs/charts/adapters/endpointDataValidators.d.ts +4 -0
- package/dist/cjs/charts/adapters/endpointDataValidators.js +61 -0
- package/dist/cjs/charts/adapters/index.d.ts +3 -0
- package/dist/cjs/{dates/range → charts/adapters}/index.js +3 -1
- package/dist/cjs/charts/index.d.ts +1 -0
- package/dist/cjs/charts/index.js +1 -0
- package/dist/cjs/column_format/constants/DURATION_PARTS_LIST.d.ts +1 -0
- package/dist/cjs/column_format/constants/DURATION_PARTS_LIST.js +12 -0
- package/dist/cjs/column_format/constants/index.d.ts +1 -0
- package/dist/cjs/column_format/constants/index.js +1 -0
- package/dist/cjs/column_format/helpers/defineTableChartFormat.js +19 -10
- package/dist/cjs/column_format/helpers/defineXYChartFormat.js +11 -13
- package/dist/cjs/columns/constants/COLUMN.js +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY.js +2 -2
- package/dist/cjs/columns/helpers/getDatasetColumn.d.ts +9 -1
- package/dist/cjs/columns/helpers/getDatasetColumn.js +31 -4
- package/dist/cjs/columns/helpers/getDatasetColumnByDatasets.d.ts +6 -5
- package/dist/cjs/columns/helpers/getDatasetColumnByDatasets.js +22 -8
- package/dist/cjs/columns/helpers/getModelColumn.d.ts +4 -4
- package/dist/cjs/columns/helpers/getModelColumn.js +9 -19
- package/dist/cjs/columns/helpers/isComplexColumn.d.ts +5 -0
- package/dist/cjs/columns/helpers/isComplexColumn.js +5 -0
- package/dist/cjs/columns/helpers/isDateColumn.d.ts +5 -0
- package/dist/cjs/columns/helpers/isDateColumn.js +8 -1
- package/dist/cjs/columns/helpers/isNumericalColumn.d.ts +5 -0
- package/dist/cjs/columns/helpers/isNumericalColumn.js +7 -1
- package/dist/cjs/constants/Charts.Const.d.ts +1 -0
- package/dist/cjs/constants/Charts.Const.js +1 -0
- package/dist/cjs/dates/adapters/dateToHms.d.ts +1 -1
- package/dist/cjs/dates/adapters/dateToHms.js +6 -8
- package/dist/cjs/dates/adapters/dateToMdyDate.js +6 -9
- package/dist/cjs/dates/adapters/dateToMonthYear.js +6 -4
- package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +2 -2
- package/dist/cjs/dates/adapters/dateToQuarterYear.js +8 -6
- package/dist/cjs/dates/adapters/dateToWeekYear.js +5 -3
- package/dist/cjs/dates/adapters/dateToYear.d.ts +1 -1
- package/dist/cjs/dates/adapters/dateToYear.js +6 -4
- package/dist/cjs/dates/adapters/weekYearToDate.js +1 -6
- package/dist/cjs/dates/constants/DATETIME_COLUMN_FORMAT.js +1 -0
- package/dist/cjs/dates/constants/DATE_DISTINCT_PROPERTY.js +1 -1
- package/dist/cjs/dates/constants/DATE_FORMAT.js +7 -7
- package/dist/cjs/dates/constants/DATE_FORMATS.d.ts +1 -0
- package/dist/cjs/dates/constants/DATE_FORMATS.js +22 -0
- package/dist/cjs/dates/constants/DATE_GROUPING_ALL_PROPERTIES.d.ts +1 -0
- package/dist/cjs/dates/constants/DATE_GROUPING_ALL_PROPERTIES.js +9 -0
- package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSIONS.d.ts +1 -0
- package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSIONS.js +23 -0
- package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.d.ts +3 -0
- package/dist/cjs/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.js +40 -0
- package/dist/cjs/dates/constants/index.d.ts +4 -0
- package/dist/cjs/dates/constants/index.js +4 -0
- package/dist/cjs/dates/helpers/{includeDateTokens.d.ts → areIncludedDateTokens.d.ts} +1 -1
- package/dist/cjs/dates/helpers/{includeDateTokens.js → areIncludedDateTokens.js} +5 -4
- package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +2 -2
- package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.js +9 -42
- package/dist/{dates/range → cjs/dates/helpers}/getDateRange.d.ts +3 -3
- package/dist/cjs/dates/{range → helpers}/getDateRange.js +73 -69
- package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +1 -0
- package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +17 -17
- package/dist/cjs/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
- package/dist/cjs/dates/helpers/getSeparatorByDateFormat.js +1 -1
- package/dist/cjs/dates/helpers/getWeek.d.ts +6 -4
- package/dist/cjs/dates/helpers/getWeek.js +6 -3
- package/dist/cjs/dates/helpers/index.d.ts +4 -1
- package/dist/cjs/dates/helpers/index.js +4 -1
- package/dist/cjs/dates/helpers/isValidPotentialDate.d.ts +6 -0
- package/dist/cjs/dates/helpers/isValidPotentialDate.js +18 -0
- package/dist/cjs/dates/index.d.ts +0 -1
- package/dist/cjs/dates/index.js +0 -1
- package/dist/cjs/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +5 -5
- package/dist/cjs/filters/adapters/FDToFlatUI.js +4 -4
- package/dist/cjs/filters/adapters/FDToUI.js +3 -3
- package/dist/cjs/filters/adapters/UIToFD.js +3 -3
- package/dist/cjs/filters/adapters/UIToFlatUI.js +3 -3
- package/dist/cjs/filters/adapters/UIToOldLogic.js +6 -6
- package/dist/cjs/filters/adapters/adaptFilterData.js +7 -7
- package/dist/cjs/filters/adapters/flatUIToFD.js +24 -24
- package/dist/cjs/filters/adapters/flatUIToOldLogic.js +42 -49
- package/dist/cjs/filters/adapters/flatUIToUI.js +29 -29
- package/dist/cjs/filters/adapters/index.d.ts +0 -1
- package/dist/cjs/filters/adapters/index.js +0 -1
- package/dist/cjs/filters/adapters/logicToFlatUI.js +6 -8
- package/dist/cjs/filters/helpers/OLD_getAggFilters.js +5 -4
- package/dist/cjs/filters/helpers/backend/buildExpression.js +1 -1
- package/dist/cjs/filters/helpers/backend/buildFilters.js +6 -16
- package/dist/cjs/filters/helpers/backend/getBackendValidator.js +1 -1
- package/dist/cjs/filters/helpers/backend/getBackendValues.js +1 -3
- package/dist/cjs/filters/helpers/backend/getLogicByDatasets.js +2 -2
- package/dist/cjs/filters/helpers/backend/getLogicByDatasetsColumns.js +2 -2
- package/dist/cjs/filters/helpers/backend/getLogicByScopes.js +2 -2
- package/dist/cjs/filters/helpers/backend/getLogicByScopesHierarchy.js +0 -2
- package/dist/cjs/filters/helpers/common/excludeFiltersByAggregateColumn.js +3 -3
- package/dist/cjs/filters/helpers/common/excludeFiltersByParams.js +10 -11
- package/dist/cjs/filters/helpers/common/excludeFiltersByScopes.js +3 -3
- package/dist/cjs/filters/helpers/common/getFilterLabel.js +1 -1
- package/dist/cjs/filters/helpers/common/getFiltersByAggregateColumn.js +3 -3
- package/dist/cjs/filters/helpers/common/getFiltersByParams.js +15 -17
- package/dist/cjs/filters/helpers/common/getFiltersByScopes.js +3 -3
- package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +4 -4
- package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +4 -4
- package/dist/cjs/filters/helpers/common/mergeFilters.js +23 -19
- package/dist/cjs/filters/helpers/common/mergeValues.js +2 -2
- package/dist/cjs/filters/helpers/common/resolveScopeConditions.js +1 -1
- package/dist/cjs/filters/helpers/getAggFiltersFromFilterData.js +2 -2
- package/dist/cjs/filters/helpers/getTokensFromFilters.js +9 -4
- package/dist/cjs/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
- package/dist/cjs/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
- package/dist/cjs/filters/helpers/ui/getUIFlatFilterByParams.js +3 -3
- package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
- package/dist/cjs/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
- package/dist/cjs/filters/helpers/ui/getUIValues.js +9 -11
- package/dist/cjs/filters/helpers/ui/transformFilterValues.js +1 -3
- package/dist/cjs/filters/services/Filters.api.d.ts +4 -4
- package/dist/cjs/filters/services/Filters.api.js +7 -7
- package/dist/cjs/filters/services/UChartApi.d.ts +11 -11
- package/dist/cjs/filters/services/UChartApi.js +176 -185
- package/dist/cjs/filters/services/UChartPaginationApi.d.ts +13 -13
- package/dist/cjs/filters/services/UChartPaginationApi.js +198 -212
- package/dist/cjs/format/definition.d.ts +4 -1
- package/dist/cjs/format/definition.js +10 -1
- package/dist/cjs/format/duration/addDurationFormat.d.ts +1 -1
- package/dist/cjs/format/duration/addDurationFormat.js +2 -2
- package/dist/cjs/format/duration/durationFormatter.d.ts +1 -1
- package/dist/cjs/format/duration/durationFormatter.js +7 -10
- package/dist/cjs/format/format.js +42 -34
- package/dist/cjs/format/localization.js +19 -4
- package/dist/cjs/general/mix/importScripts.js +8 -14
- package/dist/cjs/general/mix/randomId.js +11 -10
- package/dist/cjs/general/object/get.js +4 -4
- package/dist/cjs/general/object/getAttribute.js +1 -1
- package/dist/cjs/general/object/mapValues.js +2 -2
- package/dist/cjs/general/object/mergeDeep.js +6 -4
- package/dist/cjs/general/object/serialize.js +3 -3
- package/dist/cjs/general/string/padLeadingZeros.js +2 -2
- package/dist/cjs/globalization/helpers/getI18nDateGroupLabel.js +13 -10
- package/dist/cjs/globalization/helpers/getReverseI18nGroupLabel.js +12 -9
- package/dist/cjs/globalization/interfaces/II18nResource.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.d.ts +10 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.js +2 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderFormatValues.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/index.js +1 -0
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/filters/II18nTokenBox.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/panel/II18nPanelMenu.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.js +2 -0
- package/dist/cjs/globalization/labels/I18N_DEFAULT.js +2 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +10 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +13 -4
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +6 -0
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +1 -0
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +1 -0
- package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.d.ts +2 -0
- package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +7 -0
- package/dist/cjs/interfaces/format/IFormatOutputFormat.Interface.d.ts +1 -0
- package/dist/cjs/qrvey/helpers/getLookupAnswers.js +4 -6
- package/dist/cjs/qrvey/helpers/getValueWithSuffixes.js +1 -1
- package/dist/cjs/services/adapters/index.d.ts +2 -1
- package/dist/cjs/services/adapters/index.js +2 -1
- package/dist/cjs/services/api/getAllDatasets.api.js +6 -8
- package/dist/cjs/services/helpers/Request.js +5 -4
- package/dist/column_format/constants/DURATION_PARTS_LIST.d.ts +1 -0
- package/dist/column_format/constants/DURATION_PARTS_LIST.js +9 -0
- package/dist/column_format/constants/index.d.ts +1 -0
- package/dist/column_format/constants/index.js +1 -0
- package/dist/column_format/helpers/defineTableChartFormat.js +19 -10
- package/dist/column_format/helpers/defineXYChartFormat.js +11 -13
- package/dist/columns/constants/COLUMN.js +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY.js +2 -2
- package/dist/columns/helpers/getDatasetColumn.d.ts +9 -1
- package/dist/columns/helpers/getDatasetColumn.js +31 -4
- package/dist/columns/helpers/getDatasetColumnByDatasets.d.ts +6 -5
- package/dist/columns/helpers/getDatasetColumnByDatasets.js +22 -8
- package/dist/columns/helpers/getModelColumn.d.ts +4 -4
- package/dist/columns/helpers/getModelColumn.js +9 -19
- package/dist/columns/helpers/isComplexColumn.d.ts +5 -0
- package/dist/columns/helpers/isComplexColumn.js +5 -0
- package/dist/columns/helpers/isDateColumn.d.ts +5 -0
- package/dist/columns/helpers/isDateColumn.js +8 -1
- package/dist/columns/helpers/isNumericalColumn.d.ts +5 -0
- package/dist/columns/helpers/isNumericalColumn.js +7 -1
- package/dist/constants/Charts.Const.d.ts +1 -0
- package/dist/constants/Charts.Const.js +1 -0
- package/dist/dates/adapters/dateToHms.d.ts +1 -1
- package/dist/dates/adapters/dateToHms.js +6 -8
- package/dist/dates/adapters/dateToMdyDate.js +6 -9
- package/dist/dates/adapters/dateToMonthYear.js +6 -4
- package/dist/dates/adapters/dateToQuarterYear.d.ts +2 -2
- package/dist/dates/adapters/dateToQuarterYear.js +8 -6
- package/dist/dates/adapters/dateToWeekYear.js +5 -3
- package/dist/dates/adapters/dateToYear.d.ts +1 -1
- package/dist/dates/adapters/dateToYear.js +6 -4
- package/dist/dates/adapters/weekYearToDate.js +1 -6
- package/dist/dates/constants/DATETIME_COLUMN_FORMAT.js +1 -0
- package/dist/dates/constants/DATE_DISTINCT_PROPERTY.js +1 -1
- package/dist/dates/constants/DATE_FORMAT.js +7 -7
- package/dist/dates/constants/DATE_FORMATS.d.ts +1 -0
- package/dist/dates/constants/DATE_FORMATS.js +19 -0
- package/dist/dates/constants/DATE_GROUPING_ALL_PROPERTIES.d.ts +1 -0
- package/dist/dates/constants/DATE_GROUPING_ALL_PROPERTIES.js +6 -0
- package/dist/dates/constants/DATE_REGULAR_EXPRESSIONS.d.ts +1 -0
- package/dist/dates/constants/DATE_REGULAR_EXPRESSIONS.js +20 -0
- package/dist/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.d.ts +3 -0
- package/dist/dates/constants/DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT.js +37 -0
- package/dist/dates/constants/index.d.ts +4 -0
- package/dist/dates/constants/index.js +4 -0
- package/dist/dates/helpers/{includeDateTokens.d.ts → areIncludedDateTokens.d.ts} +1 -1
- package/dist/dates/helpers/{includeDateTokens.js → areIncludedDateTokens.js} +3 -2
- package/dist/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +2 -2
- package/dist/dates/helpers/getDateFormatRegularExpressionInArray.js +9 -42
- package/dist/{cjs/dates/range → dates/helpers}/getDateRange.d.ts +3 -3
- package/dist/dates/{range → helpers}/getDateRange.js +73 -69
- package/dist/dates/helpers/getFormattedDateByFormat.d.ts +1 -0
- package/dist/dates/helpers/getFormattedDateByFormat.js +17 -17
- package/dist/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
- package/dist/dates/helpers/getSeparatorByDateFormat.js +1 -1
- package/dist/dates/helpers/getWeek.d.ts +6 -4
- package/dist/dates/helpers/getWeek.js +6 -3
- package/dist/dates/helpers/index.d.ts +4 -1
- package/dist/dates/helpers/index.js +4 -1
- package/dist/dates/helpers/isValidPotentialDate.d.ts +6 -0
- package/dist/dates/helpers/isValidPotentialDate.js +14 -0
- package/dist/dates/index.d.ts +0 -1
- package/dist/dates/index.js +0 -1
- package/dist/dates/relative/constants/RELATIVE_UNIT_INFO_LIST.js +5 -5
- package/dist/filters/adapters/FDToFlatUI.js +4 -4
- package/dist/filters/adapters/FDToUI.js +3 -3
- package/dist/filters/adapters/UIToFD.js +3 -3
- package/dist/filters/adapters/UIToFlatUI.js +3 -3
- package/dist/filters/adapters/UIToOldLogic.js +6 -6
- package/dist/filters/adapters/adaptFilterData.js +7 -7
- package/dist/filters/adapters/flatUIToFD.js +24 -24
- package/dist/filters/adapters/flatUIToOldLogic.js +42 -49
- package/dist/filters/adapters/flatUIToUI.js +29 -29
- package/dist/filters/adapters/index.d.ts +0 -1
- package/dist/filters/adapters/index.js +0 -1
- package/dist/filters/adapters/logicToFlatUI.js +6 -8
- package/dist/filters/helpers/OLD_getAggFilters.js +5 -4
- package/dist/filters/helpers/backend/buildExpression.js +1 -1
- package/dist/filters/helpers/backend/buildFilters.js +6 -16
- package/dist/filters/helpers/backend/getBackendValidator.js +1 -1
- package/dist/filters/helpers/backend/getBackendValues.js +1 -3
- package/dist/filters/helpers/backend/getLogicByDatasets.js +2 -2
- package/dist/filters/helpers/backend/getLogicByDatasetsColumns.js +2 -2
- package/dist/filters/helpers/backend/getLogicByScopes.js +2 -2
- package/dist/filters/helpers/backend/getLogicByScopesHierarchy.js +0 -2
- package/dist/filters/helpers/common/excludeFiltersByAggregateColumn.js +3 -3
- package/dist/filters/helpers/common/excludeFiltersByParams.js +10 -11
- package/dist/filters/helpers/common/excludeFiltersByScopes.js +3 -3
- package/dist/filters/helpers/common/getFilterLabel.js +1 -1
- package/dist/filters/helpers/common/getFiltersByAggregateColumn.js +3 -3
- package/dist/filters/helpers/common/getFiltersByParams.js +15 -17
- package/dist/filters/helpers/common/getFiltersByScopes.js +3 -3
- package/dist/filters/helpers/common/getFiltersByScopesIds.js +4 -4
- package/dist/filters/helpers/common/getFiltersByVisibility.js +4 -4
- package/dist/filters/helpers/common/mergeFilters.js +23 -19
- package/dist/filters/helpers/common/mergeValues.js +2 -2
- package/dist/filters/helpers/common/resolveScopeConditions.js +1 -1
- package/dist/filters/helpers/getAggFiltersFromFilterData.js +2 -2
- package/dist/filters/helpers/getTokensFromFilters.js +9 -4
- package/dist/filters/helpers/ui/excludeUIFiltersByAggregate.js +2 -2
- package/dist/filters/helpers/ui/excludeUIFlatFiltersByScopes.js +2 -2
- package/dist/filters/helpers/ui/getUIFlatFilterByParams.js +3 -3
- package/dist/filters/helpers/ui/getUIFlatFiltersByParams.js +2 -2
- package/dist/filters/helpers/ui/getUIFlatFiltersByScopes.js +2 -2
- package/dist/filters/helpers/ui/getUIValues.js +9 -11
- package/dist/filters/helpers/ui/transformFilterValues.js +1 -3
- package/dist/filters/services/Filters.api.d.ts +4 -4
- package/dist/filters/services/Filters.api.js +7 -7
- package/dist/filters/services/UChartApi.d.ts +11 -11
- package/dist/filters/services/UChartApi.js +176 -185
- package/dist/filters/services/UChartPaginationApi.d.ts +13 -13
- package/dist/filters/services/UChartPaginationApi.js +198 -212
- package/dist/format/definition.d.ts +4 -1
- package/dist/format/definition.js +9 -0
- package/dist/format/duration/addDurationFormat.d.ts +1 -1
- package/dist/format/duration/addDurationFormat.js +2 -2
- package/dist/format/duration/durationFormatter.d.ts +1 -1
- package/dist/format/duration/durationFormatter.js +7 -10
- package/dist/format/format.js +42 -34
- package/dist/format/localization.js +19 -4
- package/dist/general/mix/importScripts.js +8 -14
- package/dist/general/mix/randomId.js +11 -10
- package/dist/general/object/get.js +4 -4
- package/dist/general/object/getAttribute.js +1 -1
- package/dist/general/object/mapValues.js +2 -2
- package/dist/general/object/mergeDeep.js +6 -4
- package/dist/general/object/serialize.js +3 -3
- package/dist/general/string/padLeadingZeros.js +2 -2
- package/dist/globalization/helpers/getI18nDateGroupLabel.js +13 -10
- package/dist/globalization/helpers/getReverseI18nGroupLabel.js +12 -9
- package/dist/globalization/interfaces/II18nResource.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilder.d.ts +2 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderAxisStyle.d.ts +9 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.d.ts +10 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderDurationParts.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderFormatValues.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/index.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/index.js +1 -0
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +4 -0
- package/dist/globalization/interfaces/filters/II18nTokenBox.d.ts +1 -0
- package/dist/globalization/interfaces/panel/II18nPanelMenu.d.ts +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +1 -0
- package/dist/globalization/interfaces/tabular_view/II18nTabularView.d.ts +4 -0
- package/dist/globalization/interfaces/tabular_view/II18nTabularView.js +1 -0
- package/dist/globalization/labels/I18N_DEFAULT.js +2 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER.js +10 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +13 -4
- package/dist/globalization/labels/common/I18N_COMMON.js +6 -0
- package/dist/globalization/labels/panel/I18N_PANEL.js +1 -0
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +1 -0
- package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.d.ts +2 -0
- package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +4 -0
- package/dist/interfaces/format/IFormatOutputFormat.Interface.d.ts +1 -0
- package/dist/qrvey/helpers/getLookupAnswers.js +4 -6
- package/dist/qrvey/helpers/getValueWithSuffixes.js +1 -1
- package/dist/services/adapters/index.d.ts +2 -1
- package/dist/services/adapters/index.js +2 -1
- package/dist/services/api/getAllDatasets.api.js +6 -8
- package/dist/services/helpers/Request.js +5 -4
- package/package.json +5 -5
- package/dist/cjs/dates/range/index.d.ts +0 -1
- package/dist/cjs/filters/adapters/transformFilters.d.ts +0 -60
- package/dist/cjs/filters/adapters/transformFilters.js +0 -427
- package/dist/dates/range/index.d.ts +0 -1
- package/dist/dates/range/index.js +0 -1
- package/dist/filters/adapters/transformFilters.d.ts +0 -60
- package/dist/filters/adapters/transformFilters.js +0 -423
|
@@ -7,6 +7,7 @@ exports.defineFormat = exports.validateColumnType = exports.parseFormulaType = e
|
|
|
7
7
|
const d3_1 = require("d3");
|
|
8
8
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
9
9
|
const definition_1 = require("./definition");
|
|
10
|
+
const isoWeek_1 = __importDefault(require("dayjs/plugin/isoWeek"));
|
|
10
11
|
const advancedFormat_1 = __importDefault(require("dayjs/plugin/advancedFormat"));
|
|
11
12
|
const isEmpty_1 = require("../general/mix/isEmpty");
|
|
12
13
|
const get_1 = require("../general/object/get");
|
|
@@ -14,6 +15,9 @@ const COLUMN_1 = require("../columns/constants/COLUMN");
|
|
|
14
15
|
const FORMULA_1 = require("../formulas/constants/FORMULA");
|
|
15
16
|
const localization_1 = require("./localization");
|
|
16
17
|
const isObject_1 = require("../general/object/isObject");
|
|
18
|
+
const DURATION_PARTS_LIST_1 = require("../column_format/constants/DURATION_PARTS_LIST");
|
|
19
|
+
const cloneDeep_1 = require("../general/object/cloneDeep");
|
|
20
|
+
dayjs_1.default.extend(isoWeek_1.default); // Add support for iso week format https://github.com/iamkun/dayjs/issues/1328
|
|
17
21
|
dayjs_1.default.extend(advancedFormat_1.default); // Add support to advanced formats https://day.js.org/docs/en/plugin/advanced-format
|
|
18
22
|
/**
|
|
19
23
|
* Apply to the given date format to a date value
|
|
@@ -24,62 +28,64 @@ function isValidDateString(dateString = "") {
|
|
|
24
28
|
/^\d{4}-\d{2}-\d{2}/.test(dateString)); // YYYY-MM-DD
|
|
25
29
|
}
|
|
26
30
|
function formatDate(dateString, format) {
|
|
31
|
+
let _format = (0, cloneDeep_1.cloneDeep)(format);
|
|
27
32
|
if ((0, isObject_1.isObject)(format))
|
|
28
|
-
|
|
29
|
-
if ((0, isEmpty_1.isEmpty)(dateString) || !isNaN(dateString) ||
|
|
33
|
+
_format = _format.format || "";
|
|
34
|
+
if ((0, isEmpty_1.isEmpty)(dateString) || !isNaN(dateString) || _format === "Default")
|
|
30
35
|
return dateString;
|
|
31
36
|
if (!isValidDateString(dateString))
|
|
32
37
|
return dateString;
|
|
33
38
|
const dateValue = dateString === null || dateString === void 0 ? void 0 : dateString.replace(/Z$/i, "");
|
|
34
|
-
return (0, dayjs_1.default)(dateValue.split(".")[0]).format(
|
|
39
|
+
return (0, dayjs_1.default)(dateValue.split(".")[0]).format(_format
|
|
35
40
|
.replace("HH24:", "HH:")
|
|
36
41
|
.replace("MI:SS", "mm:ss")
|
|
37
42
|
.replace("MM:SS", "mm:ss"));
|
|
38
43
|
}
|
|
39
44
|
exports.formatDate = formatDate;
|
|
40
45
|
function formatAbbreviated(num, decimals) {
|
|
41
|
-
if (num
|
|
46
|
+
if (num === 0)
|
|
42
47
|
return 0;
|
|
43
48
|
const absValue = Math.abs(num);
|
|
44
49
|
const exp = Math.floor(Math.log10(absValue));
|
|
45
50
|
if (exp <= 0 && exp >= -3)
|
|
46
51
|
return num.toFixed(decimals === 0 ? 2 : decimals);
|
|
47
|
-
return (0, d3_1.format)(num > -100 && num < 100 ?
|
|
52
|
+
return (0, d3_1.format)(num > -100 && num < 100 ? `.${decimals + 2}n` : ".3s")(num);
|
|
48
53
|
}
|
|
49
54
|
exports.formatAbbreviated = formatAbbreviated;
|
|
50
55
|
function formatNumber(num, outputFormat, _config) {
|
|
56
|
+
let _num = num;
|
|
51
57
|
try {
|
|
52
|
-
|
|
58
|
+
_num = +(_num || 0);
|
|
53
59
|
}
|
|
54
60
|
catch (e) {
|
|
55
|
-
|
|
61
|
+
_num = 0;
|
|
56
62
|
}
|
|
57
|
-
if (isNaN(
|
|
58
|
-
|
|
63
|
+
if (isNaN(_num))
|
|
64
|
+
_num = 0;
|
|
59
65
|
const num_decimals = !(0, isEmpty_1.isEmpty)(outputFormat.decimals) && outputFormat.format !== "Abbreviated"
|
|
60
66
|
? outputFormat.decimals
|
|
61
67
|
: 0;
|
|
62
68
|
switch (outputFormat.format) {
|
|
63
69
|
case "Abbreviated":
|
|
64
|
-
return formatAbbreviated(
|
|
70
|
+
return formatAbbreviated(_num, num_decimals);
|
|
65
71
|
case "Numeric":
|
|
66
72
|
case "Decimal":
|
|
67
|
-
return (0, d3_1.format)(`,.${num_decimals}f`)(
|
|
73
|
+
return (0, d3_1.format)(`,.${num_decimals}f`)(_num).replace(/\.(%*)$/, "$1");
|
|
68
74
|
case "Currency": {
|
|
69
|
-
const currency = `${
|
|
70
|
-
const absNum = Math.abs(
|
|
75
|
+
const currency = `${_num < 0 ? "-" : ""} ${(0, get_1._get)(outputFormat, "currency.label", "$")}`;
|
|
76
|
+
const absNum = Math.abs(_num);
|
|
71
77
|
return (currency +
|
|
72
78
|
(0, d3_1.format)(`,.${num_decimals}f`)(absNum).replace(/\.(%*)$/, "$1"));
|
|
73
79
|
}
|
|
74
80
|
case "Percentage":
|
|
75
|
-
return `${(0, d3_1.format)(`,.${num_decimals}f`)(
|
|
81
|
+
return `${(0, d3_1.format)(`,.${num_decimals}f`)(_num).replace(/\.(%*)$/, "$1")}%`;
|
|
76
82
|
case "Scientific":
|
|
77
|
-
return Number(
|
|
83
|
+
return Number(_num)
|
|
78
84
|
.toExponential(num_decimals)
|
|
79
85
|
.replace(".00", "")
|
|
80
86
|
.replace("e+0", "");
|
|
81
87
|
default:
|
|
82
|
-
return `${
|
|
88
|
+
return `${_num}`;
|
|
83
89
|
}
|
|
84
90
|
}
|
|
85
91
|
/**
|
|
@@ -114,12 +120,16 @@ const addFormat = (value, outputFormat = "None", config) => {
|
|
|
114
120
|
: outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format);
|
|
115
121
|
case "NUMERIC": {
|
|
116
122
|
const parse = parseFloat(value);
|
|
117
|
-
const withLocale = outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang)
|
|
118
|
-
|
|
119
|
-
?
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
const withLocale = (outputFormat !== "None" && (config === null || config === void 0 ? void 0 : config.lang)) ||
|
|
124
|
+
(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Duration" ||
|
|
125
|
+
DURATION_PARTS_LIST_1.DURATION_PARTS_LIST.includes[outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format];
|
|
126
|
+
if (isNaN(parse)) {
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
else if (withLocale) {
|
|
130
|
+
return (0, localization_1.formatWithLocale)(value, outputFormat, config);
|
|
131
|
+
}
|
|
132
|
+
return formatNumber(parse, outputFormat, config);
|
|
123
133
|
}
|
|
124
134
|
case "IMAGEUPLOAD":
|
|
125
135
|
case "FILEUPLOAD":
|
|
@@ -216,16 +226,16 @@ const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimension) =
|
|
|
216
226
|
definition_1.DATEGROUP_FORMATTING_UNSUPPORT.includes(dateGroupLabel))
|
|
217
227
|
return "None";
|
|
218
228
|
if ((isCategoryDimension || isTable) &&
|
|
219
|
-
selectType
|
|
229
|
+
selectType === "NUMERIC" &&
|
|
220
230
|
dateGroupLabel &&
|
|
221
231
|
outputType === "DATE")
|
|
222
232
|
return column.outputFormat;
|
|
223
233
|
if ((isCategoryDimension || isTable) &&
|
|
224
|
-
selectType
|
|
234
|
+
selectType === "NUMERIC" &&
|
|
225
235
|
dateGroupLabel &&
|
|
226
236
|
outputType === "NUMERIC")
|
|
227
237
|
return (0, get_1._get)(column, "defaultFormat");
|
|
228
|
-
if (selectedFormat && selectedFormat
|
|
238
|
+
if (selectedFormat && selectedFormat !== "Default") {
|
|
229
239
|
if (isNumericDefaultSelected)
|
|
230
240
|
return defaultAbbreviated;
|
|
231
241
|
return column.selectedFormat;
|
|
@@ -271,7 +281,7 @@ const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimension) =
|
|
|
271
281
|
return defaultAbbreviated;
|
|
272
282
|
return (0, get_1._get)(column, "defaultFormat");
|
|
273
283
|
}
|
|
274
|
-
if (selectedFormat && selectedFormat
|
|
284
|
+
if (selectedFormat && selectedFormat !== "Default") {
|
|
275
285
|
if (isNumericDefaultSelected)
|
|
276
286
|
return defaultAbbreviated;
|
|
277
287
|
return column.selectedFormat;
|
|
@@ -332,14 +342,12 @@ const defineFormat = (column = {}, isSimpleTable = false, isCategoryDimension) =
|
|
|
332
342
|
format: "fileSize",
|
|
333
343
|
};
|
|
334
344
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
};
|
|
342
|
-
}
|
|
345
|
+
if (outputFormat !== "Default")
|
|
346
|
+
return column.outputFormat;
|
|
347
|
+
return {
|
|
348
|
+
type: "NUMERIC",
|
|
349
|
+
format: "Numeric",
|
|
350
|
+
};
|
|
343
351
|
}
|
|
344
352
|
if (column.isGroup)
|
|
345
353
|
return "None";
|
|
@@ -4,13 +4,13 @@ exports.formatWithLocale = exports.chooseLang = exports.getLang = void 0;
|
|
|
4
4
|
const DATETIME_COLUMN_FORMAT_1 = require("../dates/constants/DATETIME_COLUMN_FORMAT");
|
|
5
5
|
const isEmpty_1 = require("../general/mix/isEmpty");
|
|
6
6
|
const definition_1 = require("./definition");
|
|
7
|
+
const durationFormatter_1 = require("./duration/durationFormatter");
|
|
7
8
|
const getLang = (locale) => {
|
|
8
9
|
if (!locale)
|
|
9
10
|
return;
|
|
10
11
|
else if (typeof locale === "object")
|
|
11
12
|
return locale;
|
|
12
|
-
|
|
13
|
-
return { lang: locale === "browser" ? window.navigator.language : locale };
|
|
13
|
+
return { lang: locale === "browser" ? window.navigator.language : locale };
|
|
14
14
|
};
|
|
15
15
|
exports.getLang = getLang;
|
|
16
16
|
const chooseLang = (config) => {
|
|
@@ -61,10 +61,20 @@ function formatLocaleNumber(value, outputFormat, config) {
|
|
|
61
61
|
const langOpts = options || getLocaleOptions(outputFormat);
|
|
62
62
|
const valueToFormat = (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Percentage" /* LOCALE_FORMATS.PERCENTAGE */ ? value / 100 : value;
|
|
63
63
|
try {
|
|
64
|
-
const key =
|
|
64
|
+
const key = (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) +
|
|
65
|
+
lang +
|
|
66
|
+
JSON.stringify(langOpts) +
|
|
67
|
+
((outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.template) ? outputFormat.template : "");
|
|
65
68
|
let formatter = NUMBER_FORMAT_CACHE[key];
|
|
66
69
|
if (!formatter) {
|
|
67
|
-
|
|
70
|
+
const intlNumberFormat = new Intl.NumberFormat([lang, definition_1.LANG_DEFAULT], langOpts);
|
|
71
|
+
formatter =
|
|
72
|
+
(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === "Duration" /* LOCALE_FORMATS.DURATION */
|
|
73
|
+
? new durationFormatter_1.DurationFormatter({
|
|
74
|
+
template: outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.template,
|
|
75
|
+
intlNumberFormat,
|
|
76
|
+
})
|
|
77
|
+
: intlNumberFormat;
|
|
68
78
|
NUMBER_FORMAT_CACHE[key] = formatter;
|
|
69
79
|
}
|
|
70
80
|
return formatter.format(valueToFormat);
|
|
@@ -113,6 +123,11 @@ function getLocaleOptions(outputFormat) {
|
|
|
113
123
|
maximumFractionDigits: decimals,
|
|
114
124
|
minimumFractionDigits: decimals,
|
|
115
125
|
};
|
|
126
|
+
case "Duration" /* LOCALE_FORMATS.DURATION */:
|
|
127
|
+
return {
|
|
128
|
+
maximumFractionDigits: 0,
|
|
129
|
+
minimumFractionDigits: 0,
|
|
130
|
+
};
|
|
116
131
|
default:
|
|
117
132
|
return {
|
|
118
133
|
style: "decimal" /* LOCALE_STYLES.DECIMAL */,
|
|
@@ -41,22 +41,16 @@ function importScripts(scripts) {
|
|
|
41
41
|
if (typeof script === "string") {
|
|
42
42
|
return loadScript(script);
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return script.dependencies && importScripts(script.dependencies);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
|
|
44
|
+
if (script.namespace) {
|
|
45
|
+
const exist = typeof script.namespace === "function"
|
|
46
|
+
? script.namespace()
|
|
47
|
+
: window[script.namespace];
|
|
48
|
+
if (exist) {
|
|
49
|
+
return script.dependencies && importScripts(script.dependencies);
|
|
58
50
|
}
|
|
51
|
+
return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
|
|
59
52
|
}
|
|
53
|
+
return loadScript(script.url, script.type, script.noModule).then(() => script.dependencies && importScripts(script.dependencies));
|
|
60
54
|
});
|
|
61
55
|
return Promise.all(promiseList);
|
|
62
56
|
}
|
|
@@ -12,11 +12,12 @@ const isNull_1 = require("./isNull");
|
|
|
12
12
|
* @return {String} Random string
|
|
13
13
|
*/
|
|
14
14
|
function randomId(length = 8, exclude = []) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
let _length = length, _exclude = exclude;
|
|
16
|
+
if (typeof _length !== "number")
|
|
17
|
+
_length = 8;
|
|
18
|
+
if ((0, isNull_1.isNull)(_exclude) || !Array.isArray(_exclude))
|
|
19
|
+
_exclude = [];
|
|
20
|
+
_exclude = _exclude.filter((e) => typeof e === "string");
|
|
20
21
|
const charSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
|
|
21
22
|
const blackList = [];
|
|
22
23
|
let id = "";
|
|
@@ -24,14 +25,14 @@ function randomId(length = 8, exclude = []) {
|
|
|
24
25
|
if (!(0, isEmpty_1.isEmpty)(id) && !blackList.includes(id))
|
|
25
26
|
blackList.push(id);
|
|
26
27
|
id = "";
|
|
27
|
-
for (let i = 0; i <
|
|
28
|
+
for (let i = 0; i < _length; i++) {
|
|
28
29
|
const randPos = Math.floor(Math.random() * charSet.length);
|
|
29
30
|
id += charSet[randPos];
|
|
30
31
|
}
|
|
31
|
-
} while (
|
|
32
|
-
|
|
33
|
-
blackList.length <
|
|
34
|
-
if (
|
|
32
|
+
} while (_exclude.length > 0 &&
|
|
33
|
+
_exclude.includes(id) &&
|
|
34
|
+
blackList.length < _exclude.length);
|
|
35
|
+
if (_exclude.length > 0 && blackList.length >= _exclude.length)
|
|
35
36
|
id = "";
|
|
36
37
|
return id;
|
|
37
38
|
}
|
|
@@ -38,11 +38,11 @@ function _get(baseObject, path, defaultValue) {
|
|
|
38
38
|
.replace(/(\[(\d)\])/g, ".$2")
|
|
39
39
|
.split(".")
|
|
40
40
|
.filter((k) => k.length);
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
return _get(
|
|
41
|
+
const _baseObject = baseObject[keys[0]];
|
|
42
|
+
if (_baseObject !== undefined && keys.length > 1) {
|
|
43
|
+
return _get(_baseObject, keys.slice(1), defaultValue);
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return _baseObject === undefined ? defaultValue : _baseObject;
|
|
46
46
|
}
|
|
47
47
|
exports._get = _get;
|
|
48
48
|
function validateToReturnDefaultValue(baseObject, path) {
|
|
@@ -32,7 +32,7 @@ function getAttribute(obj, key) {
|
|
|
32
32
|
}
|
|
33
33
|
exports.getAttribute = getAttribute;
|
|
34
34
|
function getSnakeCase(key) {
|
|
35
|
-
return key.replace(/[A-Z]/g, (a, i) => i
|
|
35
|
+
return key.replace(/[A-Z]/g, (a, i) => i === 0 ? a.toLowerCase() : `_${a.toLowerCase()}`);
|
|
36
36
|
}
|
|
37
37
|
function getCamelCase(key) {
|
|
38
38
|
return key
|
|
@@ -12,9 +12,9 @@ const defaultIteratee = (v) => v;
|
|
|
12
12
|
*/
|
|
13
13
|
function mapValues(baseObject, iteratee) {
|
|
14
14
|
const newObject = {};
|
|
15
|
-
|
|
15
|
+
const _iteratee = typeof iteratee === "function" ? iteratee : defaultIteratee;
|
|
16
16
|
for (const key in baseObject)
|
|
17
|
-
newObject[key] =
|
|
17
|
+
newObject[key] = _iteratee(baseObject[key], key);
|
|
18
18
|
return newObject;
|
|
19
19
|
}
|
|
20
20
|
exports.mapValues = mapValues;
|
|
@@ -12,13 +12,13 @@ const objectCopy_1 = require("./objectCopy");
|
|
|
12
12
|
* @returns a new merged object
|
|
13
13
|
*/
|
|
14
14
|
function mergeDeep(obj1, obj2, settings) {
|
|
15
|
-
|
|
15
|
+
const defaultSettings = getParamsToMergeDeep(settings);
|
|
16
16
|
if (!isValid(obj1, obj2))
|
|
17
17
|
return (0, objectCopy_1.objectCopy)(obj1);
|
|
18
18
|
const result = {};
|
|
19
19
|
for (const i in obj1) {
|
|
20
20
|
if (i != null && i in obj2 && (0, isObject_1.isObject)(obj1[i])) {
|
|
21
|
-
result[i] = mergeDeep(obj1[i], obj2[i],
|
|
21
|
+
result[i] = mergeDeep(obj1[i], obj2[i], defaultSettings);
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
24
|
result[i] = obj1[i];
|
|
@@ -26,8 +26,10 @@ function mergeDeep(obj1, obj2, settings) {
|
|
|
26
26
|
}
|
|
27
27
|
for (const i in obj2) {
|
|
28
28
|
if (i != null &&
|
|
29
|
-
((!(0, isObject_1.isObject)(obj2[i]) &&
|
|
30
|
-
|
|
29
|
+
((!(0, isObject_1.isObject)(obj2[i]) &&
|
|
30
|
+
i in result &&
|
|
31
|
+
defaultSettings.mergeExistingValues) ||
|
|
32
|
+
(!(i in result) && defaultSettings.mergeMissingProperties))) {
|
|
31
33
|
result[i] = obj2[i];
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -16,15 +16,15 @@ function serialize(obj) {
|
|
|
16
16
|
if (Array.isArray(obj[key])) {
|
|
17
17
|
for (const key2 in obj[key]) {
|
|
18
18
|
if ((0, hasProperty_1._hasProperty)(obj[key], key2)) {
|
|
19
|
-
str +=
|
|
19
|
+
str += `&${key}=${encodeURIComponent(obj[key][key2])}`;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
str +=
|
|
24
|
+
str += `&${key}=${encodeURIComponent(obj[key])}`;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return `?${str.substring(1)}`;
|
|
29
29
|
}
|
|
30
30
|
exports.serialize = serialize;
|
|
@@ -4,9 +4,9 @@ exports.padLeadingZeros = void 0;
|
|
|
4
4
|
function padLeadingZeros(num, size = 0) {
|
|
5
5
|
if (isNaN(Number(num)))
|
|
6
6
|
return String(num);
|
|
7
|
-
let s = num
|
|
7
|
+
let s = `${num}`;
|
|
8
8
|
while (s.length < size)
|
|
9
|
-
s =
|
|
9
|
+
s = `0${s}`;
|
|
10
10
|
return s;
|
|
11
11
|
}
|
|
12
12
|
exports.padLeadingZeros = padLeadingZeros;
|
|
@@ -28,12 +28,13 @@ function getI18nMonthLabel(label, translate) {
|
|
|
28
28
|
return splittedLabel.join(" ");
|
|
29
29
|
}
|
|
30
30
|
function getI18nYearMonthLabel(label, translate) {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
let newLabel = label;
|
|
32
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
33
|
+
const month = getI18nMonthPropertyByIndex(DATE_YEAR_MONTHS_1.DATE_YEAR_MONTHS.findIndex((_month) => _month === newLabel));
|
|
33
34
|
if (!(0, isEmpty_1.isEmpty)(month))
|
|
34
|
-
|
|
35
|
+
newLabel = translate(`common.date_grouping.${month}_mmm`);
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return newLabel;
|
|
37
38
|
}
|
|
38
39
|
function getI18nMonthPropertyByIndex(index) {
|
|
39
40
|
const months = [
|
|
@@ -58,10 +59,11 @@ function getI18nQuarterLabel(label, translate) {
|
|
|
58
59
|
return splittedLabel.join(" ");
|
|
59
60
|
}
|
|
60
61
|
function getI18nYearQuarterLabel(label, translate) {
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
let newLabel = label;
|
|
63
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
64
|
+
newLabel = newLabel.replace(/Q/i, translate("common.date_grouping.quarter"));
|
|
63
65
|
}
|
|
64
|
-
return
|
|
66
|
+
return newLabel;
|
|
65
67
|
}
|
|
66
68
|
function getI18nWeekLabel(label, translate) {
|
|
67
69
|
const splittedLabel = label.split(" ");
|
|
@@ -69,8 +71,9 @@ function getI18nWeekLabel(label, translate) {
|
|
|
69
71
|
return splittedLabel.join(" ");
|
|
70
72
|
}
|
|
71
73
|
function getI18nYearWeekLabel(label, translate) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
let newLabel = label;
|
|
75
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
76
|
+
newLabel = newLabel.replace(/W/i, translate("common.date_grouping.week"));
|
|
74
77
|
}
|
|
75
|
-
return
|
|
78
|
+
return newLabel;
|
|
76
79
|
}
|
|
@@ -29,10 +29,11 @@ function getReverseI18nMonthLabel(label, translate) {
|
|
|
29
29
|
return splittedLabel.join(" ");
|
|
30
30
|
}
|
|
31
31
|
function getReverseI18nYearMonthLabel(label, translate) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
let newLabel = label;
|
|
33
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
34
|
+
newLabel = getReverseI18nMonthProperty(newLabel, translate);
|
|
34
35
|
}
|
|
35
|
-
return
|
|
36
|
+
return newLabel;
|
|
36
37
|
}
|
|
37
38
|
function getReverseI18nMonthProperty(label, translate) {
|
|
38
39
|
const translatedMonths = [
|
|
@@ -58,10 +59,11 @@ function getReverseI18nQuarterLabel(label, translate) {
|
|
|
58
59
|
return splittedLabel.join(" ");
|
|
59
60
|
}
|
|
60
61
|
function getReverseI18nYearQuarterLabel(label, translate) {
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
let newLabel = label;
|
|
63
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
64
|
+
newLabel = newLabel.replace(new RegExp(translate("common.date_grouping.quarter"), "i"), __1.I18N_COMMON.date_grouping.quarter);
|
|
63
65
|
}
|
|
64
|
-
return
|
|
66
|
+
return newLabel;
|
|
65
67
|
}
|
|
66
68
|
function getReverseI18nWeekLabel(label, translate) {
|
|
67
69
|
const splittedLabel = label.split(" ");
|
|
@@ -69,8 +71,9 @@ function getReverseI18nWeekLabel(label, translate) {
|
|
|
69
71
|
return splittedLabel.join(" ");
|
|
70
72
|
}
|
|
71
73
|
function getReverseI18nYearWeekLabel(label, translate) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
let newLabel = label;
|
|
75
|
+
if (!(0, isTokenLabel_1.isTokenLabel)(newLabel) && !(0, isEmpty_1.isEmpty)(translate)) {
|
|
76
|
+
newLabel = newLabel.replace(new RegExp(translate("common.date_grouping.week"), "i"), __1.I18N_COMMON.date_grouping.week);
|
|
74
77
|
}
|
|
75
|
-
return
|
|
78
|
+
return newLabel;
|
|
76
79
|
}
|
|
@@ -11,6 +11,7 @@ import { II18nBucketBuilder } from "./bucket_builder/II18nBucketBuilder";
|
|
|
11
11
|
import { II18nCrossTabs } from "./cross_tabs";
|
|
12
12
|
import { II18nChartBuilder } from ".";
|
|
13
13
|
import { II18nStyleThemes } from "./style_themes/II18nStyleThemes";
|
|
14
|
+
import { II18nTabularView } from "./tabular_view/II18nTabularView";
|
|
14
15
|
export interface II18nResource {
|
|
15
16
|
bucket_builder?: II18nBucketBuilder;
|
|
16
17
|
chart_builder?: II18nChartBuilder;
|
|
@@ -25,4 +26,5 @@ export interface II18nResource {
|
|
|
25
26
|
panel?: II18nPanel;
|
|
26
27
|
style_themes?: II18nStyleThemes;
|
|
27
28
|
table_charts?: II18nTableCharts;
|
|
29
|
+
tabular_view?: II18nTabularView;
|
|
28
30
|
}
|
|
@@ -69,6 +69,7 @@ import { II18nChartBuilderTimePeriod } from "./II18nChartBuilderTimePeriod";
|
|
|
69
69
|
import { II18nChartBuilderTimePeriodCustomRange } from "./II18nChartBuilderTimePeriodCustomRange";
|
|
70
70
|
import { II18nChartBuilderWordCloud } from "./II18nChartBuilderWordCloud";
|
|
71
71
|
import { II18nChartBuilderBoxWhisker } from "./II18nChartBuilderBoxWhisker";
|
|
72
|
+
import { II18nChartBuilderDurationParts } from "./II18nChartBuilderDurationParts";
|
|
72
73
|
export interface II18nChartBuilder {
|
|
73
74
|
action_panel: II18nChartBuilderActionPanel;
|
|
74
75
|
aggregated_formula: II18nChartBuilderAggregatedFormulas;
|
|
@@ -141,4 +142,5 @@ export interface II18nChartBuilder {
|
|
|
141
142
|
trend_chart: II18nChartBuilderTrendChart;
|
|
142
143
|
trends_line: II18nChartBuilderTrendsLine;
|
|
143
144
|
word_cloud: II18nChartBuilderWordCloud;
|
|
145
|
+
duration_parts: II18nChartBuilderDurationParts;
|
|
144
146
|
}
|
|
@@ -26,4 +26,13 @@ export interface II18nChartBuilderAxisStyle {
|
|
|
26
26
|
values_rotation_diagonal: string;
|
|
27
27
|
values_rotation_horizontal: string;
|
|
28
28
|
values_rotation_vertical: string;
|
|
29
|
+
value_font_type: string;
|
|
30
|
+
value_font_weight: string;
|
|
31
|
+
value_font_size: string;
|
|
32
|
+
value_font_color: string;
|
|
33
|
+
label_check: string;
|
|
34
|
+
label_font_type: string;
|
|
35
|
+
label_font_weight: string;
|
|
36
|
+
label_font_size: string;
|
|
37
|
+
label_font_color: string;
|
|
29
38
|
}
|
|
@@ -86,3 +86,4 @@ __exportStar(require("./II18nChartBuilderTimePeriod"), exports);
|
|
|
86
86
|
__exportStar(require("./II18nChartBuilderTimePeriodCustomRange"), exports);
|
|
87
87
|
__exportStar(require("./II18nChartBuilderWordCloud"), exports);
|
|
88
88
|
__exportStar(require("./II18nChartBuilderBoxWhisker"), exports);
|
|
89
|
+
__exportStar(require("./II18nChartBuilderDurationParts"), exports);
|
|
@@ -6,7 +6,9 @@ import { II18nDateGrouping } from "./II18nDateGrouping";
|
|
|
6
6
|
import { II18nDayNames } from "./II18nDayNames";
|
|
7
7
|
import { II18nUnits } from "./II18nUnits";
|
|
8
8
|
import { II18nCalendar } from "../calendar/II18nCalendar";
|
|
9
|
+
import { II18nTokenBox } from "../filters/II18nTokenBox";
|
|
9
10
|
export interface II18nCommon {
|
|
11
|
+
aggregates: string;
|
|
10
12
|
aggregate_labels: II18nAgreggateLabels;
|
|
11
13
|
calendar: II18nCalendar;
|
|
12
14
|
column_types: II18nColumnTypes;
|
|
@@ -16,5 +18,7 @@ export interface II18nCommon {
|
|
|
16
18
|
no_data_found: string;
|
|
17
19
|
properties: II18nColumnProperties;
|
|
18
20
|
search: string;
|
|
21
|
+
sort: string;
|
|
22
|
+
token_box: II18nTokenBox;
|
|
19
23
|
units: II18nUnits;
|
|
20
24
|
}
|
|
@@ -11,6 +11,7 @@ const formula_builder_1 = require("./formula_builder");
|
|
|
11
11
|
const I18N_FILTER_PANEL_1 = require("./filters/I18N_FILTER_PANEL");
|
|
12
12
|
const I18N_FILTER_DISPLAY_1 = require("./filters/I18N_FILTER_DISPLAY");
|
|
13
13
|
const I18N_BUCKET_BUILDER_1 = require("./bucket_builder/I18N_BUCKET_BUILDER");
|
|
14
|
+
const I18N_TABULAR_VIEW_1 = require("./tabular_view/I18N_TABULAR_VIEW");
|
|
14
15
|
const cross_tabs_1 = require("./cross_tabs");
|
|
15
16
|
const chart_builder_1 = require("./chart_builder");
|
|
16
17
|
const style_themes_1 = require("./style_themes");
|
|
@@ -28,4 +29,5 @@ exports.I18N_DEFAULT = {
|
|
|
28
29
|
panel: I18N_PANEL_1.I18N_PANEL,
|
|
29
30
|
style_themes: style_themes_1.I18N_STYLE_THEMES,
|
|
30
31
|
table_charts: table_charts_1.I18N_TABLE_CHARTS,
|
|
32
|
+
tabular_view: I18N_TABULAR_VIEW_1.I18N_TABULAR_VIEW,
|
|
31
33
|
};
|