@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
|
@@ -26,6 +26,16 @@ exports.I18N_CHART_BUILDER = Object.assign(Object.assign(Object.assign(Object.as
|
|
|
26
26
|
custom: "Custom Format",
|
|
27
27
|
date_format: "Date Format",
|
|
28
28
|
value_format: "Value Format",
|
|
29
|
+
duration: "Duration",
|
|
30
|
+
}, duration_parts: {
|
|
31
|
+
full_duration: "D[d] HH[h] mm[m] ss[s]",
|
|
32
|
+
hour_minute_seconds: "HH:mm:ss",
|
|
33
|
+
hour_minutes: "HH:mm",
|
|
34
|
+
hours: "HH",
|
|
35
|
+
minutes: "mm",
|
|
36
|
+
seconds: "ss (Seconds)",
|
|
37
|
+
milliseconds: "SSS (Milliseconds)",
|
|
38
|
+
custom: "Custom format",
|
|
29
39
|
}, chart_names: {
|
|
30
40
|
bar: "Bar",
|
|
31
41
|
line: "Line",
|
|
@@ -78,7 +78,7 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
|
|
|
78
78
|
axis_position_right: "Right",
|
|
79
79
|
custom_axis_label: "Axis Label",
|
|
80
80
|
custom_label: "Label",
|
|
81
|
-
custom_label_placeholder: "
|
|
81
|
+
custom_label_placeholder: "Type custom label",
|
|
82
82
|
format_title: "Format",
|
|
83
83
|
max_range: "Max Range",
|
|
84
84
|
max_range_placeholder: "Auto",
|
|
@@ -93,11 +93,20 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
|
|
|
93
93
|
steps_placeholder: "Auto",
|
|
94
94
|
type_label: "Type",
|
|
95
95
|
values_axis_check: "Axis Values",
|
|
96
|
-
values_check: "
|
|
96
|
+
values_check: "Value Labels",
|
|
97
97
|
values_rotation: "Values Rotation",
|
|
98
98
|
values_rotation_diagonal: "Diagonal",
|
|
99
99
|
values_rotation_horizontal: "Horizontal",
|
|
100
100
|
values_rotation_vertical: "Vertical",
|
|
101
|
+
value_font_type: "Typeface",
|
|
102
|
+
value_font_weight: "Weight",
|
|
103
|
+
value_font_size: "Size",
|
|
104
|
+
value_font_color: "Font Color",
|
|
105
|
+
label_check: "Axis Title",
|
|
106
|
+
label_font_type: "Typeface",
|
|
107
|
+
label_font_weight: "Weight",
|
|
108
|
+
label_font_size: "Size",
|
|
109
|
+
label_font_color: "Font Color",
|
|
101
110
|
},
|
|
102
111
|
bar_types: {
|
|
103
112
|
title: "Type",
|
|
@@ -218,8 +227,8 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
|
|
|
218
227
|
border_outer: "Outer Borders",
|
|
219
228
|
expandable_color: "Header Color",
|
|
220
229
|
expandable_font_color: "Header Font Color",
|
|
221
|
-
crosstab_color: "
|
|
222
|
-
crosstab_font_color: "
|
|
230
|
+
crosstab_color: "BG Color",
|
|
231
|
+
crosstab_font_color: "Font Color",
|
|
223
232
|
},
|
|
224
233
|
table_body: {
|
|
225
234
|
title: "Body",
|
|
@@ -9,6 +9,7 @@ const I18N_COLUMN_PROPERTY_LABEL_1 = require("./I18N_COLUMN_PROPERTY_LABEL");
|
|
|
9
9
|
const I18N_DATE_GROUPING_1 = require("./I18N_DATE_GROUPING");
|
|
10
10
|
const I18N_DAY_NAMES_1 = require("./I18N_DAY_NAMES");
|
|
11
11
|
exports.I18N_COMMON = {
|
|
12
|
+
aggregates: "Aggregates",
|
|
12
13
|
aggregate_labels: I18N_AGGREGATE_LABEL_1.I18N_AGGREGATE_LABEL,
|
|
13
14
|
calendar: calendar_1.I18N_CALENDAR,
|
|
14
15
|
column_types: I18N_COLUMN_LABEL_1.I18N_COLUMN_LABEL,
|
|
@@ -23,6 +24,11 @@ exports.I18N_COMMON = {
|
|
|
23
24
|
no_data_found: "No Data Found",
|
|
24
25
|
properties: I18N_COLUMN_PROPERTY_LABEL_1.I18N_COLUMN_PROPERTY_LABEL,
|
|
25
26
|
search: "Search",
|
|
27
|
+
sort: "Sort",
|
|
28
|
+
token_box: {
|
|
29
|
+
search: "Search",
|
|
30
|
+
language_tokens: "Language Tokens",
|
|
31
|
+
},
|
|
26
32
|
units: {
|
|
27
33
|
day: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.DAY.label,
|
|
28
34
|
month: RELATIVE_UNIT_INFO_1.RELATIVE_UNIT_INFO.MONTH.label,
|
|
@@ -9,11 +9,9 @@ function getLookupAnswers(column, property, display) {
|
|
|
9
9
|
(valueItem === null || valueItem === void 0 ? void 0 : valueItem.answer) ||
|
|
10
10
|
[]).map((_value) => (Object.assign(Object.assign({}, _value), { answerid: valueItem.answerid })));
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
: [];
|
|
17
|
-
}
|
|
12
|
+
const answerItem = column.answers[display];
|
|
13
|
+
return answerItem
|
|
14
|
+
? answerItem.answer.map((_answer) => (Object.assign(Object.assign({}, _answer), { answerid: answerItem.answerid })))
|
|
15
|
+
: [];
|
|
18
16
|
}
|
|
19
17
|
exports.getLookupAnswers = getLookupAnswers;
|
|
@@ -23,6 +23,6 @@ function getValueWithSuffixes(value, settings) {
|
|
|
23
23
|
? settings.suffixes.plural
|
|
24
24
|
: settings.suffixes.singular;
|
|
25
25
|
}
|
|
26
|
-
return value + (!(0, isEmpty_1.isEmpty)(suffix) ?
|
|
26
|
+
return value + (!(0, isEmpty_1.isEmpty)(suffix) ? ` ${suffix}` : "");
|
|
27
27
|
}
|
|
28
28
|
exports.getValueWithSuffixes = getValueWithSuffixes;
|
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./BBranchesMapToUIBranchesMap.adapter"), exports);
|
|
18
|
-
__exportStar(require("./BDatasetsToUIDatasets.adapter"), exports);
|
|
19
18
|
__exportStar(require("./BColumnsToUIColumns.adapter"), exports);
|
|
19
|
+
__exportStar(require("./BDatasetsToUIDatasets.adapter"), exports);
|
|
20
|
+
__exportStar(require("./BModelToUIModel.adapter"), exports);
|
|
@@ -22,13 +22,11 @@ function getAllDatasets(config, qrveyids) {
|
|
|
22
22
|
else if (Array.isArray(qrveyids) && !(0, isEmpty_1.isEmpty)(qrveyids)) {
|
|
23
23
|
return (0, getDatasetsByIds_api_1.getDatasetsByIds)(config, qrveyids);
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.catch((_e) => []);
|
|
32
|
-
}
|
|
25
|
+
return (0, getAllQrveys_api_1.getAllQrveys)(Object.assign({}, config), { status: ["RUNNING", "FINISHED", "PAUSED"], loadAll: true })
|
|
26
|
+
.then((qrveys) => {
|
|
27
|
+
const datasets = qrveys.Items.filter((item) => !["NPS", "CHECKLIST"].includes(item.appType.toUpperCase()));
|
|
28
|
+
return (0, getDatasetsByIds_api_1.getDatasetsByIds)(config, (0, getArrayByProperty_1.getArrayByProperty)(datasets, "qrveyid"));
|
|
29
|
+
})
|
|
30
|
+
.catch((_e) => []);
|
|
33
31
|
}
|
|
34
32
|
exports.getAllDatasets = getAllDatasets;
|
|
@@ -36,7 +36,8 @@ class Request {
|
|
|
36
36
|
return (0, getAttribute_1.getAttribute)(config, "api_key");
|
|
37
37
|
}
|
|
38
38
|
static makeUrl(config, url, params) {
|
|
39
|
-
|
|
39
|
+
let _url = url;
|
|
40
|
+
_url += typeof params === "object" ? (0, serialize_1.serialize)(params) : "";
|
|
40
41
|
if (config.endpoint) {
|
|
41
42
|
const endpoint = config.endpoint;
|
|
42
43
|
const version = `v${endpoint.version || 4}`;
|
|
@@ -45,9 +46,9 @@ class Request {
|
|
|
45
46
|
? "/user/:user_id"
|
|
46
47
|
: "";
|
|
47
48
|
const base = `/${api}/${version}${user}`;
|
|
48
|
-
|
|
49
|
+
_url = (config.domain || "") + base + endpoint.uri + _url;
|
|
49
50
|
}
|
|
50
|
-
return this.parseUrl(
|
|
51
|
+
return this.parseUrl(_url, config);
|
|
51
52
|
}
|
|
52
53
|
static requestConfig(reqData) {
|
|
53
54
|
const cfg = {
|
|
@@ -58,7 +59,7 @@ class Request {
|
|
|
58
59
|
};
|
|
59
60
|
const qvToken = this.getQvToken(reqData.config);
|
|
60
61
|
if (qvToken) {
|
|
61
|
-
cfg.headers
|
|
62
|
+
cfg.headers.Authorization = `Bearer ${qvToken}`;
|
|
62
63
|
}
|
|
63
64
|
else {
|
|
64
65
|
const apiKey = this.getApiKey(reqData.config);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DURATION_PARTS_LIST: string[];
|
|
@@ -5,6 +5,7 @@ import { CHART_GROUPS } from "../constants/CHART_GROUP";
|
|
|
5
5
|
import { STRING_FORMAT } from "../constants/STRING_FORMAT";
|
|
6
6
|
import { TABLE_TYPE } from "../constants/TABLE_TYPE";
|
|
7
7
|
import { columnTypeByChart } from "./columnTypeByChart";
|
|
8
|
+
import { STANDARD_NUMERIC_FORMATS, } from "../../format/definition";
|
|
8
9
|
import { CALCULATION_LABEL } from "../../qrvey/constants/CALCULATION_LABEL";
|
|
9
10
|
import { DATEGROUP_UNSUPPORT_FORMAT } from "../constants/DATEGROUP_UNSUPPORT_FORMAT";
|
|
10
11
|
/**
|
|
@@ -15,7 +16,7 @@ import { DATEGROUP_UNSUPPORT_FORMAT } from "../constants/DATEGROUP_UNSUPPORT_FOR
|
|
|
15
16
|
export const defineTableChartFormat = (column, settings) => {
|
|
16
17
|
const { aggregate, defaultFormat, outputFormat, selectedFormat, calculation, dateGroup, } = column;
|
|
17
18
|
const { tableType, shelfType } = settings;
|
|
18
|
-
//Defaults
|
|
19
|
+
// Defaults
|
|
19
20
|
const defaultText = "Default";
|
|
20
21
|
const defaultNumeric = { type: "NUMERIC", format: "Decimal" /* LOCALE_FORMATS.DECIMAL */ };
|
|
21
22
|
const defaultPercentage = {
|
|
@@ -57,17 +58,25 @@ export const defineTableChartFormat = (column, settings) => {
|
|
|
57
58
|
case COLUMN.NUMERIC:
|
|
58
59
|
case COLUMN.RATING:
|
|
59
60
|
case COLUMN.SLIDEBAR: {
|
|
60
|
-
if (selectedFormat)
|
|
61
|
+
if (selectedFormat && selectedFormat.format !== "Default") {
|
|
61
62
|
return selectedFormat;
|
|
62
|
-
if ((calculation === null || calculation === void 0 ? void 0 : calculation.value) === CALCULATION_LABEL.PDIFF)
|
|
63
|
-
return defaultPercentage;
|
|
64
|
-
if (hasDefaultFormat) {
|
|
65
|
-
if ((aggregate === null || aggregate === void 0 ? void 0 : aggregate.label) === AGGREGATE.COUNT ||
|
|
66
|
-
(aggregate === null || aggregate === void 0 ? void 0 : aggregate.label) === AGGREGATE.DISTINCTCOUNT)
|
|
67
|
-
return defaultNumeric;
|
|
68
|
-
return defaultFormat || defaultNumeric;
|
|
69
63
|
}
|
|
70
|
-
|
|
64
|
+
let output;
|
|
65
|
+
if ((calculation === null || calculation === void 0 ? void 0 : calculation.value) === CALCULATION_LABEL.PDIFF) {
|
|
66
|
+
output = defaultPercentage;
|
|
67
|
+
}
|
|
68
|
+
else if (isGroupedTable &&
|
|
69
|
+
((aggregate === null || aggregate === void 0 ? void 0 : aggregate.label) === AGGREGATE.COUNT ||
|
|
70
|
+
(aggregate === null || aggregate === void 0 ? void 0 : aggregate.label) === AGGREGATE.DISTINCTCOUNT)) {
|
|
71
|
+
output = defaultNumeric;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
output = defaultFormat || defaultNumeric;
|
|
75
|
+
}
|
|
76
|
+
if (!STANDARD_NUMERIC_FORMATS.includes(output === null || output === void 0 ? void 0 : output.format)) {
|
|
77
|
+
output = Object.assign(Object.assign({}, output), { template: output.format, format: "Duration" });
|
|
78
|
+
}
|
|
79
|
+
return output;
|
|
71
80
|
}
|
|
72
81
|
}
|
|
73
82
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AGGREGATE } from "../../charts/constants/AGGREGATE";
|
|
2
2
|
import { COLUMN } from "../../columns/constants/COLUMN";
|
|
3
|
+
import { STANDARD_NUMERIC_FORMATS, } from "../../format/definition";
|
|
3
4
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
4
5
|
import { CALCULATION_LABEL } from "../../qrvey/constants/CALCULATION_LABEL";
|
|
5
6
|
import { CHART_GROUPS } from "../constants/CHART_GROUP";
|
|
@@ -53,9 +54,7 @@ export const defineXYChartFormat = (column, settings) => {
|
|
|
53
54
|
else if (hasDefaultFormat) {
|
|
54
55
|
return Object.assign(Object.assign({}, columnDefaultFormat), { format: defaultText, originalFormat: Object.assign({}, outputFormat) });
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
return selectedFormat;
|
|
58
|
-
}
|
|
57
|
+
return selectedFormat;
|
|
59
58
|
}
|
|
60
59
|
case COLUMN.NUMERIC:
|
|
61
60
|
case COLUMN.RATING:
|
|
@@ -71,19 +70,18 @@ export const defineXYChartFormat = (column, settings) => {
|
|
|
71
70
|
(columnCurrentFormat === null || columnCurrentFormat === void 0 ? void 0 : columnCurrentFormat.type) !== COLUMN.NUMERIC) ||
|
|
72
71
|
withoutFormat)
|
|
73
72
|
return defaultAbb;
|
|
74
|
-
|
|
75
|
-
return columnCurrentFormat;
|
|
73
|
+
return columnCurrentFormat;
|
|
76
74
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return Object.assign({}, outputFormat);
|
|
75
|
+
if (withoutFormat === true) {
|
|
76
|
+
return columnDefaultFormat;
|
|
77
|
+
}
|
|
78
|
+
else if (hasDefaultFormat) {
|
|
79
|
+
if (!STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)) {
|
|
80
|
+
return Object.assign(Object.assign({}, outputFormat), { template: outputFormat.format, format: "Duration" });
|
|
83
81
|
}
|
|
84
|
-
|
|
85
|
-
return selectedFormat;
|
|
82
|
+
return Object.assign({}, outputFormat);
|
|
86
83
|
}
|
|
84
|
+
return selectedFormat;
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
};
|
|
@@ -30,7 +30,7 @@ export var COLUMN;
|
|
|
30
30
|
COLUMN["NUMERICP"] = "NUMERIC-P";
|
|
31
31
|
COLUMN["NUMERICG"] = "NUMERIC-G";
|
|
32
32
|
COLUMN["RATING"] = "RATING";
|
|
33
|
-
|
|
33
|
+
// ...COMPLEX_COLUMN,
|
|
34
34
|
COLUMN["TEXTFIELD"] = "TEXTFIELD";
|
|
35
35
|
COLUMN["LONGTEXT"] = "LONGTEXT";
|
|
36
36
|
COLUMN["IMAGEUPLOAD"] = "IMAGEUPLOAD";
|
|
@@ -10,7 +10,7 @@ export var COLUMN_PROPERTY;
|
|
|
10
10
|
COLUMN_PROPERTY["MONTH"] = "month";
|
|
11
11
|
COLUMN_PROPERTY["WEEK"] = "week";
|
|
12
12
|
COLUMN_PROPERTY["DAY"] = "day";
|
|
13
|
-
|
|
13
|
+
// ...DATE_GROUPING_TIME_PROPERTY,
|
|
14
14
|
COLUMN_PROPERTY["HOUR"] = "hour";
|
|
15
15
|
COLUMN_PROPERTY["MINUTE"] = "minute";
|
|
16
16
|
COLUMN_PROPERTY["SECOND"] = "second";
|
|
@@ -19,7 +19,7 @@ export var COLUMN_PROPERTY;
|
|
|
19
19
|
COLUMN_PROPERTY["YEAR_MONTH"] = "month_only";
|
|
20
20
|
// YEAR_DAY = 'p-y-day',
|
|
21
21
|
COLUMN_PROPERTY["MONTH_DAY"] = "day_only";
|
|
22
|
-
//WEEK_DAY = 'p-w-day'
|
|
22
|
+
// WEEK_DAY = 'p-w-day'
|
|
23
23
|
// ...DATE_DISTINCT_TIME_PROPERTY,
|
|
24
24
|
COLUMN_PROPERTY["DAY_HOUR"] = "hour_only";
|
|
25
25
|
COLUMN_PROPERTY["HOUR_MINUTE"] = "minute_only";
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
2
2
|
import { IColumn } from "../interfaces/IColumn";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Gets the column from the dataset object
|
|
5
|
+
* Recieves a partial column object and returns a full column object from the Dataset
|
|
6
|
+
* @param {IColumn} column a partial column info
|
|
7
|
+
* @param {IDataset} dataset the dataset info to look for the column
|
|
8
|
+
* @param {boolean} getIndex flag to get the index of the column array or the complete column info
|
|
9
|
+
* @returns the dataset column index or the dataset column object
|
|
10
|
+
*/
|
|
11
|
+
export declare function getDatasetColumn(column: Partial<IColumn>, dataset: IDataset, getIndex?: boolean): IColumn | number;
|
|
@@ -1,10 +1,37 @@
|
|
|
1
|
+
import { isObject } from "../../general";
|
|
1
2
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Gets the column from the dataset object
|
|
5
|
+
* Recieves a partial column object and returns a full column object from the Dataset
|
|
6
|
+
* @param {IColumn} column a partial column info
|
|
7
|
+
* @param {IDataset} dataset the dataset info to look for the column
|
|
8
|
+
* @param {boolean} getIndex flag to get the index of the column array or the complete column info
|
|
9
|
+
* @returns the dataset column index or the dataset column object
|
|
10
|
+
*/
|
|
11
|
+
export function getDatasetColumn(column, dataset, getIndex = false) {
|
|
12
|
+
if (!isValidArguments(column, dataset))
|
|
13
|
+
return getIndex ? -1 : undefined;
|
|
5
14
|
const columns = getDatasetColumns(dataset);
|
|
6
|
-
|
|
15
|
+
const validation = (c) => c.id === column.id && c.qrveyid === column.qrveyid;
|
|
16
|
+
return getIndex ? columns.findIndex(validation) : columns.find(validation);
|
|
7
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Validates the arguments
|
|
20
|
+
* @param {IColumn} column a partial column info
|
|
21
|
+
* @param {IDataset} dataset the dataset info
|
|
22
|
+
* @returns true: the arguments are valid.
|
|
23
|
+
*/
|
|
24
|
+
function isValidArguments(column, dataset) {
|
|
25
|
+
return (!isEmpty(column) &&
|
|
26
|
+
isObject(column) &&
|
|
27
|
+
!isEmpty(dataset) &&
|
|
28
|
+
isObject(dataset));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Gets the column array
|
|
32
|
+
* @param {IDataset} dataset the dataset info
|
|
33
|
+
* @returns the column array
|
|
34
|
+
*/
|
|
8
35
|
function getDatasetColumns(dataset) {
|
|
9
36
|
return (dataset === null || dataset === void 0 ? void 0 : dataset.options) || [];
|
|
10
37
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
2
2
|
import { IColumn } from "../interfaces/IColumn";
|
|
3
3
|
/**
|
|
4
|
-
* Gets a column from a
|
|
5
|
-
* Recieves a partial column object and
|
|
6
|
-
* @param column a partial column object
|
|
7
|
-
* @param datasets the datasets to look for the
|
|
4
|
+
* Gets a column from a datasets collection.
|
|
5
|
+
* Recieves a partial column object and returns a full column object from the Dataset
|
|
6
|
+
* @param {IColumn} column a partial column object
|
|
7
|
+
* @param {IDataset} datasets the datasets collection to look for the column
|
|
8
|
+
* @param {boolean} getIndex flag to get the index of the column array or the complete column info
|
|
8
9
|
* @returns the Column object
|
|
9
10
|
*/
|
|
10
|
-
export declare function getDatasetColumnByDatasets(column: Partial<IColumn>, datasets: IDataset[]): IColumn;
|
|
11
|
+
export declare function getDatasetColumnByDatasets(column: Partial<IColumn>, datasets: IDataset[], getIndex?: boolean): IColumn | number;
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
+
import { isObject } from "../../general/object/isObject";
|
|
2
3
|
import { getDatasetColumn } from "./getDatasetColumn";
|
|
3
4
|
/**
|
|
4
|
-
* Gets a column from a
|
|
5
|
-
* Recieves a partial column object and
|
|
6
|
-
* @param column a partial column object
|
|
7
|
-
* @param datasets the datasets to look for the
|
|
5
|
+
* Gets a column from a datasets collection.
|
|
6
|
+
* Recieves a partial column object and returns a full column object from the Dataset
|
|
7
|
+
* @param {IColumn} column a partial column object
|
|
8
|
+
* @param {IDataset} datasets the datasets collection to look for the column
|
|
9
|
+
* @param {boolean} getIndex flag to get the index of the column array or the complete column info
|
|
8
10
|
* @returns the Column object
|
|
9
11
|
*/
|
|
10
|
-
export function getDatasetColumnByDatasets(column, datasets) {
|
|
11
|
-
if (
|
|
12
|
-
return;
|
|
12
|
+
export function getDatasetColumnByDatasets(column, datasets, getIndex = false) {
|
|
13
|
+
if (!isValidArguments(column, datasets))
|
|
14
|
+
return getIndex ? -1 : undefined;
|
|
13
15
|
const dataset = datasets.find((_dataset) => _dataset.qrveyid === column.qrveyid);
|
|
14
|
-
return getDatasetColumn(column, dataset);
|
|
16
|
+
return getDatasetColumn(column, dataset, getIndex);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Validates the arguments
|
|
20
|
+
* @param {IColumn} column a partial column info
|
|
21
|
+
* @param {IDataset} dataset the datasets collection
|
|
22
|
+
* @returns true: the arguments are valid.
|
|
23
|
+
*/
|
|
24
|
+
function isValidArguments(column, datasets) {
|
|
25
|
+
return (!isEmpty(column) &&
|
|
26
|
+
isObject(column) &&
|
|
27
|
+
!isEmpty(datasets) &&
|
|
28
|
+
Array.isArray(datasets));
|
|
15
29
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IModel } from "../../qrvey/interfaces/IModel";
|
|
2
2
|
import { IColumn } from "../interfaces/IColumn";
|
|
3
3
|
/**
|
|
4
|
-
* Get a model
|
|
5
|
-
* @param column The column
|
|
6
|
-
* @param model The model object
|
|
7
|
-
* @returns the model
|
|
4
|
+
* Get a model column by a partial column info.
|
|
5
|
+
* @param {IColumn} column The partial column info
|
|
6
|
+
* @param {IModel} model The model object
|
|
7
|
+
* @returns the model column
|
|
8
8
|
*/
|
|
9
9
|
export declare function getModelColumn(column: Partial<IColumn>, model: IModel): IColumn;
|
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
|
-
import { _get } from "../../general/object/get";
|
|
3
2
|
/**
|
|
4
|
-
* Get a model
|
|
5
|
-
* @param column The column
|
|
6
|
-
* @param model The model object
|
|
7
|
-
* @returns the model
|
|
3
|
+
* Get a model column by a partial column info.
|
|
4
|
+
* @param {IColumn} column The partial column info
|
|
5
|
+
* @param {IModel} model The model object
|
|
6
|
+
* @returns the model column
|
|
8
7
|
*/
|
|
9
8
|
export function getModelColumn(column, model) {
|
|
10
|
-
if (isEmpty(column) ||
|
|
9
|
+
if (isEmpty(column) ||
|
|
10
|
+
isEmpty(model) ||
|
|
11
|
+
isEmpty(model.columns) ||
|
|
12
|
+
!Array.isArray(model.columns))
|
|
11
13
|
return;
|
|
12
|
-
|
|
13
|
-
if (isEmpty(questions))
|
|
14
|
-
return;
|
|
15
|
-
return questions.find((q) => q.id === column.id);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* [TODO: Change the question.data access path. IModel structure is different]
|
|
19
|
-
* Get the question data array from model object
|
|
20
|
-
* @param model The model object
|
|
21
|
-
* @returns the question data array from model object
|
|
22
|
-
*/
|
|
23
|
-
function getQuestionData(model) {
|
|
24
|
-
return _get(model, "questions.data", []);
|
|
14
|
+
return model.columns.find((q) => q.id === column.id);
|
|
25
15
|
}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { IColumn } from "../interfaces/IColumn";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the given column is a complex type
|
|
4
|
+
* @param {IColumn} column the column info
|
|
5
|
+
* @returns true: the column is a complex type
|
|
6
|
+
*/
|
|
2
7
|
export declare const isComplexColumn: (column: IColumn) => boolean;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { isObject } from "../../general/object/isObject";
|
|
2
2
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
3
3
|
import { COMPLEX_COLUMNS } from "../constants/COMPLEX_COLUMNS";
|
|
4
|
+
/**
|
|
5
|
+
* Validates if the given column is a complex type
|
|
6
|
+
* @param {IColumn} column the column info
|
|
7
|
+
* @returns true: the column is a complex type
|
|
8
|
+
*/
|
|
4
9
|
export const isComplexColumn = (column) => !isEmpty(column) &&
|
|
5
10
|
isObject(column) &&
|
|
6
11
|
COMPLEX_COLUMNS.includes(column.type);
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { isObject } from "../../general/object/isObject";
|
|
2
2
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
3
|
+
import { COLUMN } from "../constants/COLUMN";
|
|
4
|
+
import { FORMULA } from "../../formulas/constants/FORMULA";
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the given column is a date type
|
|
7
|
+
* @param {IColumn} column the column info
|
|
8
|
+
* @returns true: the column is a date type
|
|
9
|
+
*/
|
|
3
10
|
export const isDateColumn = (column) => !isEmpty(column) &&
|
|
4
11
|
isObject(column) &&
|
|
5
|
-
(column.type ===
|
|
12
|
+
(column.type === COLUMN.DATE || column.formulaType === FORMULA.DATE);
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { IColumn } from "../interfaces/IColumn";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the given column is numerical type
|
|
4
|
+
* @param {IColumn} column the column info
|
|
5
|
+
* @returns true: the column is numerical type
|
|
6
|
+
*/
|
|
2
7
|
export declare const isNumericalColumn: (column: IColumn) => boolean;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { FORMULA } from "../../formulas/constants/FORMULA";
|
|
1
2
|
import { isEmpty } from "../../general/mix/isEmpty";
|
|
2
3
|
import { isObject } from "../../general/object/isObject";
|
|
3
4
|
import { NUMERICAL_COLUMNS } from "../constants/NUMERICAL_COLUMNS";
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the given column is numerical type
|
|
7
|
+
* @param {IColumn} column the column info
|
|
8
|
+
* @returns true: the column is numerical type
|
|
9
|
+
*/
|
|
4
10
|
export const isNumericalColumn = (column) => !isEmpty(column) &&
|
|
5
11
|
isObject(column) &&
|
|
6
12
|
(NUMERICAL_COLUMNS.includes(column.type) ||
|
|
7
|
-
column.formulaType ===
|
|
13
|
+
column.formulaType === FORMULA.NUMBER);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export var CHART_TYPE;
|
|
2
2
|
(function (CHART_TYPE) {
|
|
3
3
|
CHART_TYPE["BAR_CHART"] = "BAR_CHART";
|
|
4
|
+
CHART_TYPE["FUNNEL_CHART"] = "FUNNEL_CHART";
|
|
4
5
|
CHART_TYPE["BAR_CHART_MS"] = "BAR_CHART_MS";
|
|
5
6
|
CHART_TYPE["EXPANDABLE_TABLE_CHART"] = "EXPANDABLE_TABLE_CHART";
|
|
6
7
|
CHART_TYPE["SYMBOL_CHART"] = "SYMBOL_CHART";
|