@qrvey/utils 1.14.0-1 → 1.14.0-2
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/dist/cjs/column_format/helpers/columnTypeByChart.d.ts +1 -1
- package/dist/cjs/columns/constants/COLUMN.d.ts +3 -8
- package/dist/cjs/columns/constants/COLUMN.js +3 -8
- package/dist/cjs/columns/constants/COLUMNS.js +1 -9
- package/dist/cjs/columns/constants/COLUMN_ICON.d.ts +4 -0
- package/dist/cjs/columns/constants/COLUMN_ICON.js +41 -0
- package/dist/cjs/columns/constants/COLUMN_INFO.d.ts +1 -1
- package/dist/cjs/columns/constants/COLUMN_INFO.js +17 -37
- package/dist/cjs/columns/constants/COLUMN_INFO_LIST.js +0 -5
- package/dist/cjs/columns/constants/COLUMN_LABEL.d.ts +3 -0
- package/dist/cjs/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/cjs/columns/constants/NUMERICAL_COLUMN.d.ts +0 -3
- package/dist/cjs/columns/constants/NUMERICAL_COLUMN.js +0 -3
- package/dist/cjs/columns/constants/NUMERICAL_COLUMNS.js +0 -3
- package/dist/cjs/columns/constants/NUMERICAL_COLUMN_INFO.js +0 -24
- package/dist/cjs/columns/constants/NUMERICAL_COLUMN_INFO_LIST.js +0 -3
- package/dist/cjs/columns/constants/index.d.ts +1 -0
- package/dist/cjs/columns/constants/index.js +1 -0
- package/dist/cjs/dates/helpers/getTimezoneObject.d.ts +4 -4
- package/dist/cjs/dates/helpers/getTimezoneObject.js +17 -17
- package/dist/cjs/filters/adapters/FDToFlatUI.js +5 -1
- package/dist/cjs/filters/adapters/UIToFlatUI.js +4 -0
- package/dist/cjs/filters/adapters/UIToOldLogic.js +1 -0
- package/dist/cjs/filters/adapters/flatUIToFD.js +4 -0
- package/dist/cjs/filters/adapters/flatUIToUI.js +4 -0
- package/dist/cjs/filters/adapters/logicToFlatUI.js +7 -4
- package/dist/cjs/filters/constants/common/FILTER_SECTION.d.ts +2 -1
- package/dist/cjs/filters/constants/common/FILTER_SECTION.js +1 -0
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +2 -0
- package/dist/cjs/filters/helpers/common/getDateProperties.d.ts +10 -0
- package/dist/cjs/filters/helpers/common/getDateProperties.js +46 -0
- package/dist/cjs/filters/helpers/common/getDefaultValidatorByColumn.d.ts +11 -0
- package/dist/cjs/filters/helpers/common/getDefaultValidatorByColumn.js +27 -0
- package/dist/cjs/filters/helpers/common/getPropertiesByColumn.d.ts +20 -0
- package/dist/cjs/filters/helpers/common/getPropertiesByColumn.js +35 -0
- package/dist/cjs/filters/helpers/common/getTimeProperties.d.ts +8 -0
- package/dist/cjs/filters/helpers/common/getTimeProperties.js +22 -0
- package/dist/cjs/filters/helpers/common/getValidatorsByColumn.d.ts +10 -0
- package/dist/cjs/filters/helpers/common/getValidatorsByColumn.js +39 -0
- package/dist/cjs/filters/helpers/common/index.d.ts +10 -0
- package/dist/cjs/filters/helpers/common/index.js +10 -0
- package/dist/cjs/filters/helpers/common/isColumnForEqualLayout.d.ts +7 -0
- package/dist/cjs/filters/helpers/common/isColumnForEqualLayout.js +13 -0
- package/dist/cjs/filters/helpers/common/isColumnForEqualNullLayout.d.ts +9 -0
- package/dist/cjs/filters/helpers/common/isColumnForEqualNullLayout.js +20 -0
- package/dist/cjs/filters/helpers/common/isColumnForNullLayout.d.ts +7 -0
- package/dist/cjs/filters/helpers/common/isColumnForNullLayout.js +13 -0
- package/dist/cjs/filters/helpers/common/isColumnForNumericLayout.d.ts +9 -0
- package/dist/cjs/filters/helpers/common/isColumnForNumericLayout.js +22 -0
- package/dist/cjs/filters/helpers/common/isColumnForTextLayout.d.ts +9 -0
- package/dist/cjs/filters/helpers/common/isColumnForTextLayout.js +20 -0
- package/dist/cjs/filters/helpers/common/isValidatorMatchedToWindow.d.ts +7 -0
- package/dist/cjs/filters/helpers/common/isValidatorMatchedToWindow.js +13 -0
- package/dist/cjs/filters/helpers/common/resolveDatasetConditions.js +5 -0
- package/dist/cjs/filters/helpers/common/resolveFilterConditions.js +5 -0
- package/dist/cjs/filters/helpers/common/resolveScopeConditions.js +5 -0
- package/dist/cjs/filters/helpers/getAvailableScopes.d.ts +2 -1
- package/dist/cjs/filters/helpers/getAvailableScopes.js +5 -2
- package/dist/cjs/filters/interfaces/IFValidatorInfo.d.ts +1 -1
- package/dist/cjs/filters/interfaces/OLD_IFilterDetail.d.ts +4 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderConfig.d.ts +5 -1
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderSettings.d.ts +5 -0
- package/dist/cjs/filters/interfaces/common/IFSFilter.d.ts +3 -0
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilter.d.ts +2 -0
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +9 -0
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +2 -0
- package/dist/cjs/filters/interfaces/common/index.d.ts +1 -0
- package/dist/cjs/filters/interfaces/common/index.js +1 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +1 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +1 -0
- package/dist/cjs/general/array/getArrayByProperty.d.ts +1 -1
- package/dist/cjs/general/array/index.d.ts +1 -0
- package/dist/cjs/general/array/index.js +1 -0
- package/dist/cjs/general/array/intersectObjectArrays.d.ts +8 -0
- package/dist/cjs/general/array/intersectObjectArrays.js +37 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesMenu.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +1 -0
- package/dist/cjs/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
- package/dist/cjs/interfaces/general/IGeneralInfo.d.ts +4 -4
- package/dist/cjs/qrvey/interfaces/IDataset.d.ts +0 -2
- package/dist/cjs/services/api/getAllDatasets.api.js +2 -2
- package/dist/column_format/helpers/columnTypeByChart.d.ts +1 -1
- package/dist/columns/constants/COLUMN.d.ts +3 -8
- package/dist/columns/constants/COLUMN.js +3 -8
- package/dist/columns/constants/COLUMNS.js +1 -9
- package/dist/columns/constants/COLUMN_ICON.d.ts +4 -0
- package/dist/columns/constants/COLUMN_ICON.js +38 -0
- package/dist/columns/constants/COLUMN_INFO.d.ts +1 -1
- package/dist/columns/constants/COLUMN_INFO.js +17 -37
- package/dist/columns/constants/COLUMN_INFO_LIST.js +0 -5
- package/dist/columns/constants/COLUMN_LABEL.d.ts +3 -0
- package/dist/columns/constants/COLUMN_LABEL.js +1 -1
- package/dist/columns/constants/NUMERICAL_COLUMN.d.ts +0 -3
- package/dist/columns/constants/NUMERICAL_COLUMN.js +0 -3
- package/dist/columns/constants/NUMERICAL_COLUMNS.js +0 -3
- package/dist/columns/constants/NUMERICAL_COLUMN_INFO.js +0 -24
- package/dist/columns/constants/NUMERICAL_COLUMN_INFO_LIST.js +0 -3
- package/dist/columns/constants/index.d.ts +1 -0
- package/dist/columns/constants/index.js +1 -0
- package/dist/dates/helpers/getTimezoneObject.d.ts +4 -4
- package/dist/dates/helpers/getTimezoneObject.js +17 -17
- package/dist/filters/adapters/FDToFlatUI.js +5 -1
- package/dist/filters/adapters/UIToFlatUI.js +4 -0
- package/dist/filters/adapters/UIToOldLogic.js +1 -0
- package/dist/filters/adapters/flatUIToFD.js +4 -0
- package/dist/filters/adapters/flatUIToUI.js +4 -0
- package/dist/filters/adapters/logicToFlatUI.js +7 -4
- package/dist/filters/constants/common/FILTER_SECTION.d.ts +2 -1
- package/dist/filters/constants/common/FILTER_SECTION.js +1 -0
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +2 -0
- package/dist/filters/helpers/common/getDateProperties.d.ts +10 -0
- package/dist/filters/helpers/common/getDateProperties.js +42 -0
- package/dist/filters/helpers/common/getDefaultValidatorByColumn.d.ts +11 -0
- package/dist/filters/helpers/common/getDefaultValidatorByColumn.js +23 -0
- package/dist/filters/helpers/common/getPropertiesByColumn.d.ts +20 -0
- package/dist/filters/helpers/common/getPropertiesByColumn.js +31 -0
- package/dist/filters/helpers/common/getTimeProperties.d.ts +8 -0
- package/dist/filters/helpers/common/getTimeProperties.js +18 -0
- package/dist/filters/helpers/common/getValidatorsByColumn.d.ts +10 -0
- package/dist/filters/helpers/common/getValidatorsByColumn.js +35 -0
- package/dist/filters/helpers/common/index.d.ts +10 -0
- package/dist/filters/helpers/common/index.js +10 -0
- package/dist/filters/helpers/common/isColumnForEqualLayout.d.ts +7 -0
- package/dist/filters/helpers/common/isColumnForEqualLayout.js +9 -0
- package/dist/filters/helpers/common/isColumnForEqualNullLayout.d.ts +9 -0
- package/dist/filters/helpers/common/isColumnForEqualNullLayout.js +16 -0
- package/dist/filters/helpers/common/isColumnForNullLayout.d.ts +7 -0
- package/dist/filters/helpers/common/isColumnForNullLayout.js +9 -0
- package/dist/filters/helpers/common/isColumnForNumericLayout.d.ts +9 -0
- package/dist/filters/helpers/common/isColumnForNumericLayout.js +18 -0
- package/dist/filters/helpers/common/isColumnForTextLayout.d.ts +9 -0
- package/dist/filters/helpers/common/isColumnForTextLayout.js +16 -0
- package/dist/filters/helpers/common/isValidatorMatchedToWindow.d.ts +7 -0
- package/dist/filters/helpers/common/isValidatorMatchedToWindow.js +9 -0
- package/dist/filters/helpers/common/resolveDatasetConditions.js +5 -0
- package/dist/filters/helpers/common/resolveFilterConditions.js +5 -0
- package/dist/filters/helpers/common/resolveScopeConditions.js +5 -0
- package/dist/filters/helpers/getAvailableScopes.d.ts +2 -1
- package/dist/filters/helpers/getAvailableScopes.js +5 -2
- package/dist/filters/interfaces/IFValidatorInfo.d.ts +1 -1
- package/dist/filters/interfaces/OLD_IFilterDetail.d.ts +4 -0
- package/dist/filters/interfaces/builder/IFilterBuilderConfig.d.ts +5 -1
- package/dist/filters/interfaces/builder/IFilterBuilderSettings.d.ts +5 -0
- package/dist/filters/interfaces/common/IFSFilter.d.ts +3 -0
- package/dist/filters/interfaces/common/IFSParamsToGetFilter.d.ts +2 -0
- package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +9 -0
- package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +1 -0
- package/dist/filters/interfaces/common/index.d.ts +1 -0
- package/dist/filters/interfaces/common/index.js +1 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +1 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +1 -0
- package/dist/general/array/getArrayByProperty.d.ts +1 -1
- package/dist/general/array/index.d.ts +1 -0
- package/dist/general/array/index.js +1 -0
- package/dist/general/array/intersectObjectArrays.d.ts +8 -0
- package/dist/general/array/intersectObjectArrays.js +33 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesMenu.d.ts +1 -0
- package/dist/globalization/interfaces/style_themes/II18nStyleThemesTheme.d.ts +1 -0
- package/dist/globalization/labels/style_themes/I18N_STYLE_THEMES.js +2 -0
- package/dist/interfaces/general/IGeneralInfo.d.ts +4 -4
- package/dist/qrvey/interfaces/IDataset.d.ts +0 -2
- package/dist/services/api/getAllDatasets.api.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDateProperties = void 0;
|
|
4
|
+
const isValidatorMatchedToWindow_1 = require("./isValidatorMatchedToWindow");
|
|
5
|
+
const DATE_DISTINCT_PROPERTY_INFO_LIST_1 = require("../../../dates/constants/DATE_DISTINCT_PROPERTY_INFO_LIST");
|
|
6
|
+
const DATE_DISTINCT_TIME_PROPERTY_INFO_LIST_1 = require("../../../dates/constants/DATE_DISTINCT_TIME_PROPERTY_INFO_LIST");
|
|
7
|
+
const DATE_GROUPING_PROPERTY_INFO_LIST_1 = require("../../../dates/constants/DATE_GROUPING_PROPERTY_INFO_LIST");
|
|
8
|
+
const DATE_GROUPING_TIME_PROPERTY_INFO_LIST_1 = require("../../../dates/constants/DATE_GROUPING_TIME_PROPERTY_INFO_LIST");
|
|
9
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
10
|
+
const get_1 = require("../../../general/object/get");
|
|
11
|
+
/**
|
|
12
|
+
* Gets the tab options from the Date collection properties
|
|
13
|
+
* @param column The Date column
|
|
14
|
+
* @param validator The filter validator
|
|
15
|
+
* @returns properties of the Date column
|
|
16
|
+
*/
|
|
17
|
+
function getDateProperties(column, validator) {
|
|
18
|
+
let dateProperties = DATE_GROUPING_PROPERTY_INFO_LIST_1.DATE_GROUPING_PROPERTY_INFO_LIST;
|
|
19
|
+
// 1st Step: Add Date Time Values for grouping dates.
|
|
20
|
+
if (isDateColumnTimeFormat(column))
|
|
21
|
+
dateProperties = [
|
|
22
|
+
...dateProperties,
|
|
23
|
+
...DATE_GROUPING_TIME_PROPERTY_INFO_LIST_1.DATE_GROUPING_TIME_PROPERTY_INFO_LIST,
|
|
24
|
+
];
|
|
25
|
+
// 2nd Step: Add Property date values for distinct dates.
|
|
26
|
+
if ((0, isValidatorMatchedToWindow_1.isValidatorMatchedToWindow)(validator)) {
|
|
27
|
+
dateProperties = [...dateProperties, ...DATE_DISTINCT_PROPERTY_INFO_LIST_1.DATE_DISTINCT_PROPERTY_INFO_LIST];
|
|
28
|
+
// 3rd Step: Add Property date time values for distinct dates
|
|
29
|
+
if (isDateColumnTimeFormat(column))
|
|
30
|
+
dateProperties = [
|
|
31
|
+
...dateProperties,
|
|
32
|
+
...DATE_DISTINCT_TIME_PROPERTY_INFO_LIST_1.DATE_DISTINCT_TIME_PROPERTY_INFO_LIST,
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
return dateProperties;
|
|
36
|
+
}
|
|
37
|
+
exports.getDateProperties = getDateProperties;
|
|
38
|
+
/**
|
|
39
|
+
* Returns True or false when the output format in the date column exists and is a time type
|
|
40
|
+
* @param column Column prop
|
|
41
|
+
* @returns True if The Date Column has a time format, otherwise is false.
|
|
42
|
+
*/
|
|
43
|
+
function isDateColumnTimeFormat(column) {
|
|
44
|
+
const formatDate = (0, get_1._get)(column.outputFormat, "format");
|
|
45
|
+
return !(0, isEmpty_1.isEmpty)(formatDate) && formatDate.split(" ").length > 1;
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IFProperty } from "../../interfaces/IFProperty";
|
|
2
|
+
import { IFValidatorInfo } from "../../interfaces/IFValidatorInfo";
|
|
3
|
+
import { IFUColumn } from "../../interfaces/ui/IFUColumn";
|
|
4
|
+
/**
|
|
5
|
+
* Get default validator structure by the given column.
|
|
6
|
+
* @param column The column
|
|
7
|
+
* @param validators Validators array. If validator is not fulfilled the conditions, return the first validator given.
|
|
8
|
+
* @param property The property used in Filters. Useful for some questions
|
|
9
|
+
* @returns a default validator structure
|
|
10
|
+
*/
|
|
11
|
+
export declare function getDefaultValidatorByColumn(column: IFUColumn, validators: IFValidatorInfo[], property?: IFProperty): IFValidatorInfo;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultValidatorByColumn = void 0;
|
|
4
|
+
const isColumnForNumericLayout_1 = require("./isColumnForNumericLayout");
|
|
5
|
+
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
6
|
+
const isDateColumn_1 = require("../../../columns/helpers/isDateColumn");
|
|
7
|
+
const COLUMNS_FOR_CONTAINS_VALIDATOR_1 = require("../../constants/builder/COLUMNS_FOR_CONTAINS_VALIDATOR");
|
|
8
|
+
const FILTER_VALIDATOR_INFO_1 = require("../../constants/common/FILTER_VALIDATOR_INFO");
|
|
9
|
+
/**
|
|
10
|
+
* Get default validator structure by the given column.
|
|
11
|
+
* @param column The column
|
|
12
|
+
* @param validators Validators array. If validator is not fulfilled the conditions, return the first validator given.
|
|
13
|
+
* @param property The property used in Filters. Useful for some questions
|
|
14
|
+
* @returns a default validator structure
|
|
15
|
+
*/
|
|
16
|
+
function getDefaultValidatorByColumn(column, validators, property) {
|
|
17
|
+
if (column == null)
|
|
18
|
+
return;
|
|
19
|
+
if ((0, isColumnForNumericLayout_1.isColumnForNumericLayout)(column, property) ||
|
|
20
|
+
(0, isDateColumn_1.isDateColumn)(column) ||
|
|
21
|
+
column.type === COLUMN_1.COLUMN.TIME)
|
|
22
|
+
return FILTER_VALIDATOR_INFO_1.FILTER_VALIDATOR_INFO.BETWEEN_INCLUSIVE;
|
|
23
|
+
if (COLUMNS_FOR_CONTAINS_VALIDATOR_1.COLUMNS_FOR_CONTAINS_VALIDATOR.includes(column.type))
|
|
24
|
+
return FILTER_VALIDATOR_INFO_1.FILTER_VALIDATOR_INFO.CONTAINS;
|
|
25
|
+
return validators[0];
|
|
26
|
+
}
|
|
27
|
+
exports.getDefaultValidatorByColumn = getDefaultValidatorByColumn;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
import { IColumnPropertyInfo } from "../../../columns/interfaces/IColumnPropertyInfo";
|
|
3
|
+
import { IFValidator } from "../../interfaces/IFValidator";
|
|
4
|
+
/**
|
|
5
|
+
* Gets the tab options from the property collection by the question column.
|
|
6
|
+
* - Special case for Expression questions: If isExpressionCategorizable is false, a tab options are not needed.
|
|
7
|
+
* - Special case for Image Upload question: If hasImageUplaodAnalysis is true, image words from image upload property will be hidden
|
|
8
|
+
* @param column The question column
|
|
9
|
+
* @param validator the filter validator
|
|
10
|
+
* @param options Options for differents behaviors across question types.
|
|
11
|
+
* - isExpressionCategorizable: boolean. Send it if Expression question is categorizable or not. It is special for expression question when Category option is activated in the maker.
|
|
12
|
+
* - hasImageUploadAnalysis: boolean. Send it if Image upload question has analysis or not.
|
|
13
|
+
* @param options.isExpressionCategorizable
|
|
14
|
+
* @param options.hasImageUploadAnalysis
|
|
15
|
+
* @returns properties of the question column
|
|
16
|
+
*/
|
|
17
|
+
export declare function getPropertiesByColumn(column: IColumn, validator: IFValidator, options?: {
|
|
18
|
+
isExpressionCategorizable: boolean;
|
|
19
|
+
hasImageUploadAnalysis: boolean;
|
|
20
|
+
}): IColumnPropertyInfo[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPropertiesByColumn = void 0;
|
|
4
|
+
const getDateProperties_1 = require("./getDateProperties");
|
|
5
|
+
const getTimeProperties_1 = require("./getTimeProperties");
|
|
6
|
+
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
7
|
+
const COLUMN_PROPERTY_1 = require("../../../columns/constants/COLUMN_PROPERTY");
|
|
8
|
+
const COLUMN_PROPERTY_INFO_1 = require("../../../columns/constants/COLUMN_PROPERTY_INFO");
|
|
9
|
+
const isDateColumn_1 = require("../../../columns/helpers/isDateColumn");
|
|
10
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
11
|
+
/**
|
|
12
|
+
* Gets the tab options from the property collection by the question column.
|
|
13
|
+
* - Special case for Expression questions: If isExpressionCategorizable is false, a tab options are not needed.
|
|
14
|
+
* - Special case for Image Upload question: If hasImageUplaodAnalysis is true, image words from image upload property will be hidden
|
|
15
|
+
* @param column The question column
|
|
16
|
+
* @param validator the filter validator
|
|
17
|
+
* @param options Options for differents behaviors across question types.
|
|
18
|
+
* - isExpressionCategorizable: boolean. Send it if Expression question is categorizable or not. It is special for expression question when Category option is activated in the maker.
|
|
19
|
+
* - hasImageUploadAnalysis: boolean. Send it if Image upload question has analysis or not.
|
|
20
|
+
* @param options.isExpressionCategorizable
|
|
21
|
+
* @param options.hasImageUploadAnalysis
|
|
22
|
+
* @returns properties of the question column
|
|
23
|
+
*/
|
|
24
|
+
function getPropertiesByColumn(column, validator, options) {
|
|
25
|
+
if (column.type === COLUMN_1.COLUMN.EXPRESSION && !(options === null || options === void 0 ? void 0 : options.isExpressionCategorizable))
|
|
26
|
+
return;
|
|
27
|
+
if ((0, isDateColumn_1.isDateColumn)(column) && (0, isEmpty_1.isEmpty)(column.aggregate))
|
|
28
|
+
return (0, getDateProperties_1.getDateProperties)(column, validator);
|
|
29
|
+
if (column.type === COLUMN_1.COLUMN.TIME && (0, isEmpty_1.isEmpty)(column.aggregate))
|
|
30
|
+
return (0, getTimeProperties_1.getTimeProperties)(validator);
|
|
31
|
+
if (column.type === COLUMN_1.COLUMN.IMAGEUPLOAD && !(options === null || options === void 0 ? void 0 : options.hasImageUploadAnalysis))
|
|
32
|
+
return COLUMN_PROPERTY_INFO_1.COLUMN_PROPERTY_INFO[column.type].filter((propertyValue) => propertyValue.value !== COLUMN_PROPERTY_1.COLUMN_PROPERTY.IMAGEUPLOAD_IMAGEWORDS);
|
|
33
|
+
return COLUMN_PROPERTY_INFO_1.COLUMN_PROPERTY_INFO[column.type];
|
|
34
|
+
}
|
|
35
|
+
exports.getPropertiesByColumn = getPropertiesByColumn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IColumnPropertyInfo } from "../../../columns/interfaces/IColumnPropertyInfo";
|
|
2
|
+
import { IFValidator } from "../../interfaces/IFValidator";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the tab options from the Time collection properties
|
|
5
|
+
* @param validator The filter validator
|
|
6
|
+
* @returns properties of the Time column
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTimeProperties(validator: IFValidator): IColumnPropertyInfo[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTimeProperties = void 0;
|
|
4
|
+
const isValidatorMatchedToWindow_1 = require("./isValidatorMatchedToWindow");
|
|
5
|
+
const DATE_DISTINCT_TIME_PROPERTY_INFO_LIST_1 = require("../../../dates/constants/DATE_DISTINCT_TIME_PROPERTY_INFO_LIST");
|
|
6
|
+
const TIME_GROUPING_PROPERTY_INFO_LIST_1 = require("../../../dates/constants/TIME_GROUPING_PROPERTY_INFO_LIST");
|
|
7
|
+
/**
|
|
8
|
+
* Gets the tab options from the Time collection properties
|
|
9
|
+
* @param validator The filter validator
|
|
10
|
+
* @returns properties of the Time column
|
|
11
|
+
*/
|
|
12
|
+
function getTimeProperties(validator) {
|
|
13
|
+
let timeProperties = TIME_GROUPING_PROPERTY_INFO_LIST_1.TIME_GROUPING_PROPERTY_INFO_LIST;
|
|
14
|
+
if ((0, isValidatorMatchedToWindow_1.isValidatorMatchedToWindow)(validator)) {
|
|
15
|
+
timeProperties = [
|
|
16
|
+
...timeProperties,
|
|
17
|
+
...DATE_DISTINCT_TIME_PROPERTY_INFO_LIST_1.DATE_DISTINCT_TIME_PROPERTY_INFO_LIST,
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
return timeProperties;
|
|
21
|
+
}
|
|
22
|
+
exports.getTimeProperties = getTimeProperties;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
import { IFProperty } from "../../interfaces/IFProperty";
|
|
3
|
+
import { IFValidatorInfo } from "../../interfaces/IFValidatorInfo";
|
|
4
|
+
/**
|
|
5
|
+
* Gets validators depending on the given column and the filter property (For some cases)
|
|
6
|
+
* @param column The qrvey column
|
|
7
|
+
* @param property The filter property. Some question columns need it to fulfill the conditions
|
|
8
|
+
* @returns Array of validators
|
|
9
|
+
*/
|
|
10
|
+
export declare function getValidatorsByColumn(column: IColumn, property?: IFProperty): IFValidatorInfo[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getValidatorsByColumn = void 0;
|
|
4
|
+
const isColumnForEqualLayout_1 = require("./isColumnForEqualLayout");
|
|
5
|
+
const isColumnForEqualNullLayout_1 = require("./isColumnForEqualNullLayout");
|
|
6
|
+
const isColumnForNullLayout_1 = require("./isColumnForNullLayout");
|
|
7
|
+
const isColumnForNumericLayout_1 = require("./isColumnForNumericLayout");
|
|
8
|
+
const isColumnForTextLayout_1 = require("./isColumnForTextLayout");
|
|
9
|
+
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
10
|
+
const isDateColumn_1 = require("../../../columns/helpers/isDateColumn");
|
|
11
|
+
const FILTER_VALIDATOR_BY_TYPE_1 = require("../../constants/common/FILTER_VALIDATOR_BY_TYPE");
|
|
12
|
+
/**
|
|
13
|
+
* Gets validators depending on the given column and the filter property (For some cases)
|
|
14
|
+
* @param column The qrvey column
|
|
15
|
+
* @param property The filter property. Some question columns need it to fulfill the conditions
|
|
16
|
+
* @returns Array of validators
|
|
17
|
+
*/
|
|
18
|
+
function getValidatorsByColumn(column, property) {
|
|
19
|
+
if (column == null)
|
|
20
|
+
return;
|
|
21
|
+
if ((0, isColumnForNumericLayout_1.isColumnForNumericLayout)(column, property))
|
|
22
|
+
return FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.NUMERIC;
|
|
23
|
+
if ((0, isColumnForEqualLayout_1.isColumnForEqualLayout)(column))
|
|
24
|
+
return FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.EQUAL;
|
|
25
|
+
if ((0, isColumnForEqualNullLayout_1.isColumnForEqualNullLayout)(column, property))
|
|
26
|
+
return FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.EQUAL_NULL;
|
|
27
|
+
if ((0, isColumnForNullLayout_1.isColumnForNullLayout)(column))
|
|
28
|
+
return FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.NULL;
|
|
29
|
+
if ((0, isDateColumn_1.isDateColumn)(column))
|
|
30
|
+
return FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.DATE;
|
|
31
|
+
if ((0, isColumnForTextLayout_1.isColumnForTextLayout)(column, property))
|
|
32
|
+
return FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.TEXT;
|
|
33
|
+
if (column.type === COLUMN_1.COLUMN.TIME) {
|
|
34
|
+
const validators = [...FILTER_VALIDATOR_BY_TYPE_1.FILTER_VALIDATOR_BY_TYPE.DATE];
|
|
35
|
+
validators.shift();
|
|
36
|
+
return validators;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.getValidatorsByColumn = getValidatorsByColumn;
|
|
@@ -2,6 +2,8 @@ export * from "./areFiltersEquals";
|
|
|
2
2
|
export * from "./excludeFiltersByAggregateColumn";
|
|
3
3
|
export * from "./excludeFiltersByParams";
|
|
4
4
|
export * from "./excludeFiltersByScopes";
|
|
5
|
+
export * from "./getDefaultValidatorByColumn";
|
|
6
|
+
export * from "./getDateProperties";
|
|
5
7
|
export * from "./getFilterColumnLabel";
|
|
6
8
|
export * from "./getFilterid";
|
|
7
9
|
export * from "./getFilterLabel";
|
|
@@ -14,6 +16,9 @@ export * from "./getFiltersByTimezone";
|
|
|
14
16
|
export * from "./getFiltersByVisibility";
|
|
15
17
|
export * from "./getMergeFiltersSettings";
|
|
16
18
|
export * from "./getParamsToGetFilterSettings";
|
|
19
|
+
export * from "./getPropertiesByColumn";
|
|
20
|
+
export * from "./getTimeProperties";
|
|
21
|
+
export * from "./getValidatorsByColumn";
|
|
17
22
|
export * from "./getValuesFromModel";
|
|
18
23
|
export * from "./getValuesFromDataset";
|
|
19
24
|
export * from "./getVerboseFilterDatasets";
|
|
@@ -23,9 +28,14 @@ export * from "./getVerboseFilterScopes";
|
|
|
23
28
|
export * from "./getVerboseFilterValues";
|
|
24
29
|
export * from "./haveFiltersByDataset";
|
|
25
30
|
export * from "./isBetweenValidator";
|
|
31
|
+
export * from "./isColumnForEqualLayout";
|
|
32
|
+
export * from "./isColumnForNumericLayout";
|
|
33
|
+
export * from "./isColumnForNullLayout";
|
|
34
|
+
export * from "./isColumnForTextLayout";
|
|
26
35
|
export * from "./isDateDistinctProperty";
|
|
27
36
|
export * from "./isInValidator";
|
|
28
37
|
export * from "./isNullValidator";
|
|
38
|
+
export * from "./isValidatorMatchedToWindow";
|
|
29
39
|
export * from "./isRangeValidator";
|
|
30
40
|
export * from "./isRankingFilter";
|
|
31
41
|
export * from "./isRegularValidator";
|
|
@@ -18,6 +18,8 @@ __exportStar(require("./areFiltersEquals"), exports);
|
|
|
18
18
|
__exportStar(require("./excludeFiltersByAggregateColumn"), exports);
|
|
19
19
|
__exportStar(require("./excludeFiltersByParams"), exports);
|
|
20
20
|
__exportStar(require("./excludeFiltersByScopes"), exports);
|
|
21
|
+
__exportStar(require("./getDefaultValidatorByColumn"), exports);
|
|
22
|
+
__exportStar(require("./getDateProperties"), exports);
|
|
21
23
|
__exportStar(require("./getFilterColumnLabel"), exports);
|
|
22
24
|
__exportStar(require("./getFilterid"), exports);
|
|
23
25
|
__exportStar(require("./getFilterLabel"), exports);
|
|
@@ -30,6 +32,9 @@ __exportStar(require("./getFiltersByTimezone"), exports);
|
|
|
30
32
|
__exportStar(require("./getFiltersByVisibility"), exports);
|
|
31
33
|
__exportStar(require("./getMergeFiltersSettings"), exports);
|
|
32
34
|
__exportStar(require("./getParamsToGetFilterSettings"), exports);
|
|
35
|
+
__exportStar(require("./getPropertiesByColumn"), exports);
|
|
36
|
+
__exportStar(require("./getTimeProperties"), exports);
|
|
37
|
+
__exportStar(require("./getValidatorsByColumn"), exports);
|
|
33
38
|
__exportStar(require("./getValuesFromModel"), exports);
|
|
34
39
|
__exportStar(require("./getValuesFromDataset"), exports);
|
|
35
40
|
__exportStar(require("./getVerboseFilterDatasets"), exports);
|
|
@@ -39,9 +44,14 @@ __exportStar(require("./getVerboseFilterScopes"), exports);
|
|
|
39
44
|
__exportStar(require("./getVerboseFilterValues"), exports);
|
|
40
45
|
__exportStar(require("./haveFiltersByDataset"), exports);
|
|
41
46
|
__exportStar(require("./isBetweenValidator"), exports);
|
|
47
|
+
__exportStar(require("./isColumnForEqualLayout"), exports);
|
|
48
|
+
__exportStar(require("./isColumnForNumericLayout"), exports);
|
|
49
|
+
__exportStar(require("./isColumnForNullLayout"), exports);
|
|
50
|
+
__exportStar(require("./isColumnForTextLayout"), exports);
|
|
42
51
|
__exportStar(require("./isDateDistinctProperty"), exports);
|
|
43
52
|
__exportStar(require("./isInValidator"), exports);
|
|
44
53
|
__exportStar(require("./isNullValidator"), exports);
|
|
54
|
+
__exportStar(require("./isValidatorMatchedToWindow"), exports);
|
|
45
55
|
__exportStar(require("./isRangeValidator"), exports);
|
|
46
56
|
__exportStar(require("./isRankingFilter"), exports);
|
|
47
57
|
__exportStar(require("./isRegularValidator"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the given column is compatible with the Equal Layout.
|
|
4
|
+
* @param column The Qrvey column
|
|
5
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
6
|
+
*/
|
|
7
|
+
export declare function isColumnForEqualLayout(column: IColumn): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isColumnForEqualLayout = void 0;
|
|
4
|
+
const COLUMNS_FOR_EQUALS_LAYOUT_1 = require("../../constants/builder/COLUMNS_FOR_EQUALS_LAYOUT");
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the given column is compatible with the Equal Layout.
|
|
7
|
+
* @param column The Qrvey column
|
|
8
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
9
|
+
*/
|
|
10
|
+
function isColumnForEqualLayout(column) {
|
|
11
|
+
return COLUMNS_FOR_EQUALS_LAYOUT_1.COLUMNS_FOR_EQUALS_LAYOUT.includes(column.type);
|
|
12
|
+
}
|
|
13
|
+
exports.isColumnForEqualLayout = isColumnForEqualLayout;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
import { IFProperty } from "../../interfaces/IFProperty";
|
|
3
|
+
/**
|
|
4
|
+
* Validates if the given column is compatible with the Equal or Null Layout.
|
|
5
|
+
* @param column The Qrvey column
|
|
6
|
+
* @param property The filter property
|
|
7
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
8
|
+
*/
|
|
9
|
+
export declare function isColumnForEqualNullLayout(column: IColumn, property?: IFProperty): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isColumnForEqualNullLayout = void 0;
|
|
4
|
+
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
5
|
+
const COLUMN_PROPERTY_1 = require("../../../columns/constants/COLUMN_PROPERTY");
|
|
6
|
+
const COLUMNS_FOR_EQUALS_NULL_LAYOUT_1 = require("../../constants/builder/COLUMNS_FOR_EQUALS_NULL_LAYOUT");
|
|
7
|
+
/**
|
|
8
|
+
* Validates if the given column is compatible with the Equal or Null Layout.
|
|
9
|
+
* @param column The Qrvey column
|
|
10
|
+
* @param property The filter property
|
|
11
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
12
|
+
*/
|
|
13
|
+
function isColumnForEqualNullLayout(column, property) {
|
|
14
|
+
return (COLUMNS_FOR_EQUALS_NULL_LAYOUT_1.COLUMNS_FOR_EQUALS_NULL_LAYOUT.includes(column.type) ||
|
|
15
|
+
(COLUMN_1.COLUMN.FILEUPLOAD === column.type &&
|
|
16
|
+
COLUMN_PROPERTY_1.COLUMN_PROPERTY.FILEUPLOAD_FILETYPE === property) ||
|
|
17
|
+
(COLUMN_1.COLUMN.IMAGEUPLOAD === column.type &&
|
|
18
|
+
COLUMN_PROPERTY_1.COLUMN_PROPERTY.FILEUPLOAD_FILETYPE === property));
|
|
19
|
+
}
|
|
20
|
+
exports.isColumnForEqualNullLayout = isColumnForEqualNullLayout;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the given column is compatible with the Null Layout.
|
|
4
|
+
* @param column The Qrvey column
|
|
5
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
6
|
+
*/
|
|
7
|
+
export declare function isColumnForNullLayout(column: IColumn): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isColumnForNullLayout = void 0;
|
|
4
|
+
const COLUMNS_FOR_NULL_LAYOUT_1 = require("../../constants/builder/COLUMNS_FOR_NULL_LAYOUT");
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the given column is compatible with the Null Layout.
|
|
7
|
+
* @param column The Qrvey column
|
|
8
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
9
|
+
*/
|
|
10
|
+
function isColumnForNullLayout(column) {
|
|
11
|
+
return COLUMNS_FOR_NULL_LAYOUT_1.COLUMNS_FOR_NULL_LAYOUT.includes(column.type);
|
|
12
|
+
}
|
|
13
|
+
exports.isColumnForNullLayout = isColumnForNullLayout;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
import { IFProperty } from "../../interfaces/IFProperty";
|
|
3
|
+
/**
|
|
4
|
+
* Validates if the given column is compatible with Numeric Layout.
|
|
5
|
+
* @param column The Qrvey column
|
|
6
|
+
* @param property The filter property
|
|
7
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
8
|
+
*/
|
|
9
|
+
export declare function isColumnForNumericLayout(column: IColumn, property?: IFProperty): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isColumnForNumericLayout = void 0;
|
|
4
|
+
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
5
|
+
const COLUMN_PROPERTY_1 = require("../../../columns/constants/COLUMN_PROPERTY");
|
|
6
|
+
const isNumericalColumn_1 = require("../../../columns/helpers/isNumericalColumn");
|
|
7
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
8
|
+
/**
|
|
9
|
+
* Validates if the given column is compatible with Numeric Layout.
|
|
10
|
+
* @param column The Qrvey column
|
|
11
|
+
* @param property The filter property
|
|
12
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
13
|
+
*/
|
|
14
|
+
function isColumnForNumericLayout(column, property) {
|
|
15
|
+
return ((0, isNumericalColumn_1.isNumericalColumn)(column) ||
|
|
16
|
+
!(0, isEmpty_1.isEmpty)(column.aggregate) ||
|
|
17
|
+
(COLUMN_1.COLUMN.FILEUPLOAD === column.type &&
|
|
18
|
+
COLUMN_PROPERTY_1.COLUMN_PROPERTY.FILEUPLOAD_FILESIZE === property) ||
|
|
19
|
+
(COLUMN_1.COLUMN.IMAGEUPLOAD === column.type &&
|
|
20
|
+
COLUMN_PROPERTY_1.COLUMN_PROPERTY.FILEUPLOAD_FILESIZE === property));
|
|
21
|
+
}
|
|
22
|
+
exports.isColumnForNumericLayout = isColumnForNumericLayout;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
+
import { IFProperty } from "../../interfaces/IFProperty";
|
|
3
|
+
/**
|
|
4
|
+
* Validates if the given column is compatible with the Text Layout.
|
|
5
|
+
* @param column The Qrvey column
|
|
6
|
+
* @param property The filter property
|
|
7
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
8
|
+
*/
|
|
9
|
+
export declare function isColumnForTextLayout(column: IColumn, property?: IFProperty): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isColumnForTextLayout = void 0;
|
|
4
|
+
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
5
|
+
const COLUMN_PROPERTY_1 = require("../../../columns/constants/COLUMN_PROPERTY");
|
|
6
|
+
const definition_1 = require("../../../format/definition");
|
|
7
|
+
const COLUMNS_FOR_TEXT_LAYOUT_1 = require("../../constants/builder/COLUMNS_FOR_TEXT_LAYOUT");
|
|
8
|
+
/**
|
|
9
|
+
* Validates if the given column is compatible with the Text Layout.
|
|
10
|
+
* @param column The Qrvey column
|
|
11
|
+
* @param property The filter property
|
|
12
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
13
|
+
*/
|
|
14
|
+
function isColumnForTextLayout(column, property) {
|
|
15
|
+
return ((0, definition_1.isTextColumn)(column) ||
|
|
16
|
+
COLUMNS_FOR_TEXT_LAYOUT_1.COLUMNS_FOR_TEXT_LAYOUT.includes(column.type) ||
|
|
17
|
+
(COLUMN_1.COLUMN.IMAGEUPLOAD === column.type &&
|
|
18
|
+
COLUMN_PROPERTY_1.COLUMN_PROPERTY.IMAGEUPLOAD_IMAGEWORDS === property));
|
|
19
|
+
}
|
|
20
|
+
exports.isColumnForTextLayout = isColumnForTextLayout;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFValidator } from "../../interfaces/IFValidator";
|
|
2
|
+
/**
|
|
3
|
+
* Validates if the given validator is compatible with Value Window layout.
|
|
4
|
+
* @param validator the filter validator
|
|
5
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
6
|
+
*/
|
|
7
|
+
export declare function isValidatorMatchedToWindow(validator: IFValidator): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isValidatorMatchedToWindow = void 0;
|
|
4
|
+
const FILTER_VALIDATORS_FOR_WINDOW_1 = require("../../constants/builder/FILTER_VALIDATORS_FOR_WINDOW");
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the given validator is compatible with Value Window layout.
|
|
7
|
+
* @param validator the filter validator
|
|
8
|
+
* @returns true if the conditions fulfill; otherwise, false
|
|
9
|
+
*/
|
|
10
|
+
function isValidatorMatchedToWindow(validator) {
|
|
11
|
+
return FILTER_VALIDATORS_FOR_WINDOW_1.FILTER_VALIDATORS_FOR_WINDOW.includes(validator);
|
|
12
|
+
}
|
|
13
|
+
exports.isValidatorMatchedToWindow = isValidatorMatchedToWindow;
|
|
@@ -17,6 +17,11 @@ function resolveDatasetConditions(dataset, params, letPassUndefinedProperties =
|
|
|
17
17
|
(letPassUndefinedProperties && dataset.enabled == null) ||
|
|
18
18
|
(letPassUndefinedParams && params.enableds.datasets == null) ||
|
|
19
19
|
params.enableds.datasets === dataset.enabled) &&
|
|
20
|
+
(!(0, hasProperty_1._hasProperty)(params, "displayeds") ||
|
|
21
|
+
!(0, hasProperty_1._hasProperty)(params.displayeds, "datasets") ||
|
|
22
|
+
(letPassUndefinedProperties && dataset.displayed == null) ||
|
|
23
|
+
(letPassUndefinedParams && params.displayeds.datasets == null) ||
|
|
24
|
+
params.displayeds.datasets === dataset.displayed) &&
|
|
20
25
|
(!(0, hasProperty_1._hasProperty)(params, "qrveyid") ||
|
|
21
26
|
(letPassUndefinedProperties && dataset.qrveyid == null) ||
|
|
22
27
|
(letPassUndefinedParams && (0, isEmpty_1.isEmpty)(params.qrveyid)) ||
|
|
@@ -18,6 +18,11 @@ function resolveFilterConditions(filter, params, letPassUndefinedProperties = fa
|
|
|
18
18
|
(letPassUndefinedProperties && filter.enabled == null) ||
|
|
19
19
|
(letPassUndefinedParams && params.enableds.filters == null) ||
|
|
20
20
|
params.enableds.filters === filter.enabled) &&
|
|
21
|
+
(!(0, hasProperty_1._hasProperty)(params, "displayeds") ||
|
|
22
|
+
!(0, hasProperty_1._hasProperty)(params.displayeds, "filters") ||
|
|
23
|
+
(letPassUndefinedProperties && filter.displayed == null) ||
|
|
24
|
+
(letPassUndefinedParams && params.displayeds.filters == null) ||
|
|
25
|
+
params.displayeds.filters === filter.displayed) &&
|
|
21
26
|
(!(0, hasProperty_1._hasProperty)(params, "dateSection") ||
|
|
22
27
|
(letPassUndefinedProperties && filter.dateSection == null) ||
|
|
23
28
|
(letPassUndefinedParams && (0, isEmpty_1.isEmpty)(params.dateSection)) ||
|
|
@@ -17,6 +17,11 @@ function resolveScopeConditions(scope, params, letPassUndefinedProperties = fals
|
|
|
17
17
|
(letPassUndefinedProperties && scope.enabled == null) ||
|
|
18
18
|
(letPassUndefinedParams && params.enableds.scopes == null) ||
|
|
19
19
|
params.enableds.scopes === scope.enabled) &&
|
|
20
|
+
(!(0, hasProperty_1._hasProperty)(params, "displayeds") ||
|
|
21
|
+
!(0, hasProperty_1._hasProperty)(params.displayeds, "scopes") ||
|
|
22
|
+
(letPassUndefinedProperties && scope.displayed == null) ||
|
|
23
|
+
(letPassUndefinedParams && params.displayeds.scopes == null) ||
|
|
24
|
+
params.displayeds.scopes === scope.displayed) &&
|
|
20
25
|
(!(0, hasProperty_1._hasProperty)(params, "scope") ||
|
|
21
26
|
(letPassUndefinedProperties && scope.scope == null) ||
|
|
22
27
|
(letPassUndefinedParams && (0, isEmpty_1.isEmpty)(params.scope)) ||
|
|
@@ -3,6 +3,7 @@ import { IFSScopeID } from "../interfaces/common/IFSScopeID";
|
|
|
3
3
|
/**
|
|
4
4
|
* Gets Scopes/Scope IDs by given IDs
|
|
5
5
|
* @param config given Differnts IDs in order set a available scope
|
|
6
|
+
* @param includeGlobal flag to add the global scope
|
|
6
7
|
* @returns a Scopes/Scope IDs array
|
|
7
8
|
*/
|
|
8
|
-
export declare function getAvailableScopes(config: IFSAvailableScope): IFSScopeID[];
|
|
9
|
+
export declare function getAvailableScopes(config: IFSAvailableScope, includeGlobal?: boolean): IFSScopeID[];
|
|
@@ -6,9 +6,10 @@ const FILTER_SCOPE_1 = require("../constants/common/FILTER_SCOPE");
|
|
|
6
6
|
/**
|
|
7
7
|
* Gets Scopes/Scope IDs by given IDs
|
|
8
8
|
* @param config given Differnts IDs in order set a available scope
|
|
9
|
+
* @param includeGlobal flag to add the global scope
|
|
9
10
|
* @returns a Scopes/Scope IDs array
|
|
10
11
|
*/
|
|
11
|
-
function getAvailableScopes(config) {
|
|
12
|
+
function getAvailableScopes(config, includeGlobal = true) {
|
|
12
13
|
if ((0, isEmpty_1.isEmpty)(config))
|
|
13
14
|
return;
|
|
14
15
|
if (config.scope != null)
|
|
@@ -16,7 +17,9 @@ function getAvailableScopes(config) {
|
|
|
16
17
|
let scopes = [];
|
|
17
18
|
if (!(0, isEmpty_1.isEmpty)(config.predefinedScopes))
|
|
18
19
|
scopes = config.predefinedScopes;
|
|
19
|
-
scopes =
|
|
20
|
+
scopes = includeGlobal
|
|
21
|
+
? [...scopes, { label: FILTER_SCOPE_1.FILTER_SCOPE.GLOBAL, id: undefined }]
|
|
22
|
+
: [...scopes];
|
|
20
23
|
if (config.tabid != null || config.pageid != null || config.panelid != null) {
|
|
21
24
|
if (config.pageid)
|
|
22
25
|
scopes = [...scopes, { label: FILTER_SCOPE_1.FILTER_SCOPE.PAGE, id: config.pageid }];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IGeneralInfo } from "../../interfaces/general/IGeneralInfo";
|
|
2
1
|
import { IFValidator } from "./IFValidator";
|
|
2
|
+
import { IGeneralInfo } from "../../interfaces/general/IGeneralInfo";
|
|
3
3
|
export interface IFValidatorInfo extends IGeneralInfo {
|
|
4
4
|
value: IFValidator;
|
|
5
5
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
2
2
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
3
|
+
import { IFSFilter } from "./common/IFSFilter";
|
|
3
4
|
import { IFSFilterExtrasInfo } from "./common/IFSFilterExtrasInfo";
|
|
4
5
|
import { IFDateSection } from "./IFDateSection";
|
|
5
6
|
import { IFOperator } from "./IFOperator";
|
|
@@ -9,6 +10,8 @@ import { IFSection } from "./IFSection";
|
|
|
9
10
|
import { IFValidator } from "./IFValidator";
|
|
10
11
|
import { IFValue } from "./IFValue";
|
|
11
12
|
import { IFUChartSettings } from "./ui/IFUChartSettings";
|
|
13
|
+
import { IFUFilter } from "./ui/IFUFilter";
|
|
14
|
+
import { IFUFlattenedFilter } from "./ui/IFUFlattenedFilter";
|
|
12
15
|
import { IFUValue } from "./ui/IFUValue";
|
|
13
16
|
export interface OLD_IFilterDetail {
|
|
14
17
|
column?: Omit<IColumn, "label"> & {
|
|
@@ -44,4 +47,5 @@ export interface OLD_IFilterDetail {
|
|
|
44
47
|
section?: IFSection;
|
|
45
48
|
groupValue?: IFProperty;
|
|
46
49
|
extras?: any;
|
|
50
|
+
_newFilters?: IFUFilter | IFSFilter | IFUFlattenedFilter;
|
|
47
51
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IFilterBuilderSettings } from "./IFilterBuilderSettings";
|
|
1
2
|
import { IFBLogic } from "../backend/IFBLogic";
|
|
2
3
|
import { IFBUserFilters } from "../backend/IFBUserFilters";
|
|
3
4
|
import { IFilterConfig } from "../common/IFilterConfig";
|
|
@@ -10,11 +11,14 @@ import { IFValidator } from "../IFValidator";
|
|
|
10
11
|
import { OLD_IFilterData } from "../OLD_IFilterData";
|
|
11
12
|
import { IFSettings } from "../settings/IFSettings";
|
|
12
13
|
import { IFUData } from "../ui/IFUData";
|
|
13
|
-
import { IFilterBuilderSettings } from "./IFilterBuilderSettings";
|
|
14
14
|
/**
|
|
15
15
|
* Structure for the configuration of the Filter Builder
|
|
16
16
|
*/
|
|
17
17
|
export interface IFilterBuilderConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Flag to allow use the global scope
|
|
20
|
+
*/
|
|
21
|
+
noGlobal?: boolean;
|
|
18
22
|
datasets?: string[];
|
|
19
23
|
filterData?: IFSData;
|
|
20
24
|
filterLabel?: string;
|
|
@@ -8,4 +8,9 @@ export interface IFilterBuilderSettings {
|
|
|
8
8
|
chart?: IFUChartSettings;
|
|
9
9
|
mode?: FILTER_FLOW;
|
|
10
10
|
returningFilterStructureType?: IFStructureType;
|
|
11
|
+
displayed?: boolean;
|
|
12
|
+
displayable?: boolean;
|
|
13
|
+
deletable?: boolean;
|
|
14
|
+
editable?: boolean;
|
|
15
|
+
enableable?: boolean;
|
|
11
16
|
}
|
|
@@ -12,8 +12,11 @@ export interface IFSFilter {
|
|
|
12
12
|
collapsed: boolean;
|
|
13
13
|
column: IFSColumn;
|
|
14
14
|
dateSection?: IFDateSection;
|
|
15
|
+
deletable?: boolean;
|
|
15
16
|
displayed: boolean;
|
|
17
|
+
editable?: boolean;
|
|
16
18
|
enabled: boolean;
|
|
19
|
+
enableable?: boolean;
|
|
17
20
|
extras: IFSFilterExtras;
|
|
18
21
|
filterid: string;
|
|
19
22
|
lookupDisplayIndex?: number;
|