@qrvey/utils 1.11.0-1-features-0 → 1.11.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/columns/helpers/index.d.ts +0 -1
- package/dist/cjs/columns/helpers/index.js +0 -1
- package/dist/cjs/columns/interfaces/IColumnPropertyType.d.ts +1 -2
- package/dist/cjs/dates/helpers/getTimezoneObject.d.ts +2 -1
- package/dist/cjs/dates/helpers/getTimezoneObject.js +13 -13
- package/dist/cjs/filters/adapters/FDToFlatUI.js +1 -2
- package/dist/cjs/filters/adapters/UIToOldLogic.js +0 -1
- package/dist/cjs/filters/adapters/logicToFlatUI.js +4 -4
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +0 -2
- package/dist/cjs/filters/helpers/backend/getBackendValues.js +1 -3
- package/dist/cjs/filters/helpers/common/index.d.ts +0 -1
- package/dist/cjs/filters/helpers/common/index.js +0 -1
- package/dist/cjs/filters/helpers/common/resolveDatasetConditions.js +0 -5
- package/dist/cjs/filters/helpers/common/resolveFilterConditions.js +0 -5
- package/dist/cjs/filters/helpers/common/resolveScopeConditions.js +0 -5
- package/dist/cjs/filters/interfaces/OLD_IFilterDetail.d.ts +0 -4
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderSettings.d.ts +0 -5
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilter.d.ts +0 -2
- package/dist/cjs/filters/interfaces/common/index.d.ts +0 -1
- package/dist/cjs/filters/interfaces/common/index.js +0 -1
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +0 -1
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +0 -1
- package/dist/cjs/format/definition.d.ts +0 -1
- package/dist/cjs/format/definition.js +1 -2
- package/dist/cjs/format/duration/index.d.ts +0 -1
- package/dist/cjs/format/duration/index.js +0 -1
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +0 -2
- package/dist/cjs/globalization/interfaces/common/index.d.ts +0 -1
- package/dist/cjs/globalization/interfaces/common/index.js +0 -1
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +0 -2
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/qrvey/helpers/getPropertyLabel.d.ts +0 -7
- package/dist/cjs/qrvey/helpers/getPropertyLabel.js +3 -14
- package/dist/columns/helpers/index.d.ts +0 -1
- package/dist/columns/helpers/index.js +0 -1
- package/dist/columns/interfaces/IColumnPropertyType.d.ts +1 -2
- package/dist/dates/helpers/getTimezoneObject.d.ts +2 -1
- package/dist/dates/helpers/getTimezoneObject.js +13 -13
- package/dist/filters/adapters/FDToFlatUI.js +1 -2
- package/dist/filters/adapters/UIToOldLogic.js +0 -1
- package/dist/filters/adapters/logicToFlatUI.js +4 -4
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +0 -2
- package/dist/filters/helpers/backend/getBackendValues.js +1 -3
- package/dist/filters/helpers/common/index.d.ts +0 -1
- package/dist/filters/helpers/common/index.js +0 -1
- package/dist/filters/helpers/common/resolveDatasetConditions.js +0 -5
- package/dist/filters/helpers/common/resolveFilterConditions.js +0 -5
- package/dist/filters/helpers/common/resolveScopeConditions.js +0 -5
- package/dist/filters/interfaces/OLD_IFilterDetail.d.ts +0 -4
- package/dist/filters/interfaces/builder/IFilterBuilderSettings.d.ts +0 -5
- package/dist/filters/interfaces/common/IFSParamsToGetFilter.d.ts +0 -2
- package/dist/filters/interfaces/common/index.d.ts +0 -1
- package/dist/filters/interfaces/common/index.js +0 -1
- package/dist/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +0 -1
- package/dist/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +0 -1
- package/dist/format/definition.d.ts +0 -1
- package/dist/format/definition.js +0 -1
- package/dist/format/duration/index.d.ts +0 -1
- package/dist/format/duration/index.js +0 -1
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +0 -2
- package/dist/globalization/interfaces/common/index.d.ts +0 -1
- package/dist/globalization/interfaces/common/index.js +0 -1
- package/dist/globalization/labels/common/I18N_COMMON.js +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/qrvey/helpers/getPropertyLabel.d.ts +0 -7
- package/dist/qrvey/helpers/getPropertyLabel.js +3 -14
- package/package.json +1 -1
- package/dist/cjs/columns/helpers/isDurationColumn.d.ts +0 -7
- package/dist/cjs/columns/helpers/isDurationColumn.js +0 -18
- package/dist/cjs/filters/helpers/common/adaptTimeUnitValuesFromFilters.d.ts +0 -11
- package/dist/cjs/filters/helpers/common/adaptTimeUnitValuesFromFilters.js +0 -29
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +0 -9
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +0 -2
- package/dist/cjs/format/duration/convertTimeUnit.d.ts +0 -15
- package/dist/cjs/format/duration/convertTimeUnit.js +0 -34
- package/dist/cjs/globalization/interfaces/common/I18nTimeUnitProperties.d.ts +0 -10
- package/dist/cjs/globalization/interfaces/common/I18nTimeUnitProperties.js +0 -2
- package/dist/cjs/globalization/labels/common/I18N_TIME_UNITS.d.ts +0 -2
- package/dist/cjs/globalization/labels/common/I18N_TIME_UNITS.js +0 -14
- package/dist/cjs/time/adapters/adaptTimeUnitNumbers.d.ts +0 -9
- package/dist/cjs/time/adapters/adaptTimeUnitNumbers.js +0 -204
- package/dist/cjs/time/adapters/daysToHours.d.ts +0 -6
- package/dist/cjs/time/adapters/daysToHours.js +0 -22
- package/dist/cjs/time/adapters/daysToMinutes.d.ts +0 -6
- package/dist/cjs/time/adapters/daysToMinutes.js +0 -22
- package/dist/cjs/time/adapters/daysToMonths.d.ts +0 -6
- package/dist/cjs/time/adapters/daysToMonths.js +0 -22
- package/dist/cjs/time/adapters/daysToSeconds.d.ts +0 -6
- package/dist/cjs/time/adapters/daysToSeconds.js +0 -22
- package/dist/cjs/time/adapters/daysToYears.d.ts +0 -6
- package/dist/cjs/time/adapters/daysToYears.js +0 -22
- package/dist/cjs/time/adapters/hoursToDays.d.ts +0 -6
- package/dist/cjs/time/adapters/hoursToDays.js +0 -22
- package/dist/cjs/time/adapters/hoursToMinutes.d.ts +0 -6
- package/dist/cjs/time/adapters/hoursToMinutes.js +0 -22
- package/dist/cjs/time/adapters/hoursToMonths.d.ts +0 -6
- package/dist/cjs/time/adapters/hoursToMonths.js +0 -22
- package/dist/cjs/time/adapters/hoursToSeconds.d.ts +0 -6
- package/dist/cjs/time/adapters/hoursToSeconds.js +0 -22
- package/dist/cjs/time/adapters/hoursToYears.d.ts +0 -6
- package/dist/cjs/time/adapters/hoursToYears.js +0 -22
- package/dist/cjs/time/adapters/index.d.ts +0 -31
- package/dist/cjs/time/adapters/index.js +0 -47
- package/dist/cjs/time/adapters/minutesToDays.d.ts +0 -6
- package/dist/cjs/time/adapters/minutesToDays.js +0 -22
- package/dist/cjs/time/adapters/minutesToHours.d.ts +0 -6
- package/dist/cjs/time/adapters/minutesToHours.js +0 -22
- package/dist/cjs/time/adapters/minutesToMonths.d.ts +0 -6
- package/dist/cjs/time/adapters/minutesToMonths.js +0 -22
- package/dist/cjs/time/adapters/minutesToSeconds.d.ts +0 -6
- package/dist/cjs/time/adapters/minutesToSeconds.js +0 -22
- package/dist/cjs/time/adapters/minutesToYears.d.ts +0 -6
- package/dist/cjs/time/adapters/minutesToYears.js +0 -22
- package/dist/cjs/time/adapters/monthsToDays.d.ts +0 -6
- package/dist/cjs/time/adapters/monthsToDays.js +0 -22
- package/dist/cjs/time/adapters/monthsToHours.d.ts +0 -6
- package/dist/cjs/time/adapters/monthsToHours.js +0 -22
- package/dist/cjs/time/adapters/monthsToMinutes.d.ts +0 -6
- package/dist/cjs/time/adapters/monthsToMinutes.js +0 -22
- package/dist/cjs/time/adapters/monthsToSeconds.d.ts +0 -6
- package/dist/cjs/time/adapters/monthsToSeconds.js +0 -22
- package/dist/cjs/time/adapters/monthsToYears.d.ts +0 -6
- package/dist/cjs/time/adapters/monthsToYears.js +0 -22
- package/dist/cjs/time/adapters/secondsToDays.d.ts +0 -6
- package/dist/cjs/time/adapters/secondsToDays.js +0 -22
- package/dist/cjs/time/adapters/secondsToHours.d.ts +0 -6
- package/dist/cjs/time/adapters/secondsToHours.js +0 -22
- package/dist/cjs/time/adapters/secondsToMinutes.d.ts +0 -6
- package/dist/cjs/time/adapters/secondsToMinutes.js +0 -22
- package/dist/cjs/time/adapters/secondsToMonths.d.ts +0 -6
- package/dist/cjs/time/adapters/secondsToMonths.js +0 -22
- package/dist/cjs/time/adapters/secondsToYears.d.ts +0 -6
- package/dist/cjs/time/adapters/secondsToYears.js +0 -22
- package/dist/cjs/time/adapters/yearsToDays.d.ts +0 -6
- package/dist/cjs/time/adapters/yearsToDays.js +0 -22
- package/dist/cjs/time/adapters/yearsToHours.d.ts +0 -6
- package/dist/cjs/time/adapters/yearsToHours.js +0 -22
- package/dist/cjs/time/adapters/yearsToMinutes.d.ts +0 -6
- package/dist/cjs/time/adapters/yearsToMinutes.js +0 -22
- package/dist/cjs/time/adapters/yearsToMonths.d.ts +0 -6
- package/dist/cjs/time/adapters/yearsToMonths.js +0 -22
- package/dist/cjs/time/adapters/yearsToSeconds.d.ts +0 -6
- package/dist/cjs/time/adapters/yearsToSeconds.js +0 -22
- package/dist/cjs/time/constants/TIME_UNIT_INFO.d.ts +0 -5
- package/dist/cjs/time/constants/TIME_UNIT_INFO.js +0 -55
- package/dist/cjs/time/constants/TIME_UNIT_INFO_LIST.d.ts +0 -2
- package/dist/cjs/time/constants/TIME_UNIT_INFO_LIST.js +0 -13
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY.d.ts +0 -8
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY.js +0 -12
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY_LABEL.d.ts +0 -8
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY_LABEL.js +0 -12
- package/dist/cjs/time/constants/index.d.ts +0 -4
- package/dist/cjs/time/constants/index.js +0 -20
- package/dist/cjs/time/index.d.ts +0 -3
- package/dist/cjs/time/index.js +0 -19
- package/dist/cjs/time/interfaces/ITimeUnitProperty.d.ts +0 -2
- package/dist/cjs/time/interfaces/ITimeUnitProperty.js +0 -2
- package/dist/cjs/time/interfaces/ITimeUnitPropertyInfo.d.ts +0 -5
- package/dist/cjs/time/interfaces/ITimeUnitPropertyInfo.js +0 -2
- package/dist/cjs/time/interfaces/index.d.ts +0 -2
- package/dist/cjs/time/interfaces/index.js +0 -18
- package/dist/columns/helpers/isDurationColumn.d.ts +0 -7
- package/dist/columns/helpers/isDurationColumn.js +0 -14
- package/dist/filters/helpers/common/adaptTimeUnitValuesFromFilters.d.ts +0 -11
- package/dist/filters/helpers/common/adaptTimeUnitValuesFromFilters.js +0 -25
- package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +0 -9
- package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +0 -1
- package/dist/format/duration/convertTimeUnit.d.ts +0 -15
- package/dist/format/duration/convertTimeUnit.js +0 -27
- package/dist/globalization/interfaces/common/I18nTimeUnitProperties.d.ts +0 -10
- package/dist/globalization/interfaces/common/I18nTimeUnitProperties.js +0 -1
- package/dist/globalization/labels/common/I18N_TIME_UNITS.d.ts +0 -2
- package/dist/globalization/labels/common/I18N_TIME_UNITS.js +0 -11
- package/dist/time/adapters/adaptTimeUnitNumbers.d.ts +0 -9
- package/dist/time/adapters/adaptTimeUnitNumbers.js +0 -200
- package/dist/time/adapters/daysToHours.d.ts +0 -6
- package/dist/time/adapters/daysToHours.js +0 -15
- package/dist/time/adapters/daysToMinutes.d.ts +0 -6
- package/dist/time/adapters/daysToMinutes.js +0 -15
- package/dist/time/adapters/daysToMonths.d.ts +0 -6
- package/dist/time/adapters/daysToMonths.js +0 -15
- package/dist/time/adapters/daysToSeconds.d.ts +0 -6
- package/dist/time/adapters/daysToSeconds.js +0 -15
- package/dist/time/adapters/daysToYears.d.ts +0 -6
- package/dist/time/adapters/daysToYears.js +0 -15
- package/dist/time/adapters/hoursToDays.d.ts +0 -6
- package/dist/time/adapters/hoursToDays.js +0 -15
- package/dist/time/adapters/hoursToMinutes.d.ts +0 -6
- package/dist/time/adapters/hoursToMinutes.js +0 -15
- package/dist/time/adapters/hoursToMonths.d.ts +0 -6
- package/dist/time/adapters/hoursToMonths.js +0 -15
- package/dist/time/adapters/hoursToSeconds.d.ts +0 -6
- package/dist/time/adapters/hoursToSeconds.js +0 -15
- package/dist/time/adapters/hoursToYears.d.ts +0 -6
- package/dist/time/adapters/hoursToYears.js +0 -15
- package/dist/time/adapters/index.d.ts +0 -31
- package/dist/time/adapters/index.js +0 -31
- package/dist/time/adapters/minutesToDays.d.ts +0 -6
- package/dist/time/adapters/minutesToDays.js +0 -15
- package/dist/time/adapters/minutesToHours.d.ts +0 -6
- package/dist/time/adapters/minutesToHours.js +0 -15
- package/dist/time/adapters/minutesToMonths.d.ts +0 -6
- package/dist/time/adapters/minutesToMonths.js +0 -15
- package/dist/time/adapters/minutesToSeconds.d.ts +0 -6
- package/dist/time/adapters/minutesToSeconds.js +0 -15
- package/dist/time/adapters/minutesToYears.d.ts +0 -6
- package/dist/time/adapters/minutesToYears.js +0 -15
- package/dist/time/adapters/monthsToDays.d.ts +0 -6
- package/dist/time/adapters/monthsToDays.js +0 -15
- package/dist/time/adapters/monthsToHours.d.ts +0 -6
- package/dist/time/adapters/monthsToHours.js +0 -15
- package/dist/time/adapters/monthsToMinutes.d.ts +0 -6
- package/dist/time/adapters/monthsToMinutes.js +0 -15
- package/dist/time/adapters/monthsToSeconds.d.ts +0 -6
- package/dist/time/adapters/monthsToSeconds.js +0 -15
- package/dist/time/adapters/monthsToYears.d.ts +0 -6
- package/dist/time/adapters/monthsToYears.js +0 -15
- package/dist/time/adapters/secondsToDays.d.ts +0 -6
- package/dist/time/adapters/secondsToDays.js +0 -15
- package/dist/time/adapters/secondsToHours.d.ts +0 -6
- package/dist/time/adapters/secondsToHours.js +0 -15
- package/dist/time/adapters/secondsToMinutes.d.ts +0 -6
- package/dist/time/adapters/secondsToMinutes.js +0 -15
- package/dist/time/adapters/secondsToMonths.d.ts +0 -6
- package/dist/time/adapters/secondsToMonths.js +0 -15
- package/dist/time/adapters/secondsToYears.d.ts +0 -6
- package/dist/time/adapters/secondsToYears.js +0 -15
- package/dist/time/adapters/yearsToDays.d.ts +0 -6
- package/dist/time/adapters/yearsToDays.js +0 -15
- package/dist/time/adapters/yearsToHours.d.ts +0 -6
- package/dist/time/adapters/yearsToHours.js +0 -15
- package/dist/time/adapters/yearsToMinutes.d.ts +0 -6
- package/dist/time/adapters/yearsToMinutes.js +0 -15
- package/dist/time/adapters/yearsToMonths.d.ts +0 -6
- package/dist/time/adapters/yearsToMonths.js +0 -15
- package/dist/time/adapters/yearsToSeconds.d.ts +0 -6
- package/dist/time/adapters/yearsToSeconds.js +0 -15
- package/dist/time/constants/TIME_UNIT_INFO.d.ts +0 -5
- package/dist/time/constants/TIME_UNIT_INFO.js +0 -52
- package/dist/time/constants/TIME_UNIT_INFO_LIST.d.ts +0 -2
- package/dist/time/constants/TIME_UNIT_INFO_LIST.js +0 -10
- package/dist/time/constants/TIME_UNIT_PROPERTY.d.ts +0 -8
- package/dist/time/constants/TIME_UNIT_PROPERTY.js +0 -9
- package/dist/time/constants/TIME_UNIT_PROPERTY_LABEL.d.ts +0 -8
- package/dist/time/constants/TIME_UNIT_PROPERTY_LABEL.js +0 -9
- package/dist/time/constants/index.d.ts +0 -4
- package/dist/time/constants/index.js +0 -4
- package/dist/time/index.d.ts +0 -3
- package/dist/time/index.js +0 -3
- package/dist/time/interfaces/ITimeUnitProperty.d.ts +0 -2
- package/dist/time/interfaces/ITimeUnitProperty.js +0 -1
- package/dist/time/interfaces/ITimeUnitPropertyInfo.d.ts +0 -5
- package/dist/time/interfaces/ITimeUnitPropertyInfo.js +0 -1
- package/dist/time/interfaces/index.d.ts +0 -2
- package/dist/time/interfaces/index.js +0 -2
|
@@ -20,5 +20,4 @@ __exportStar(require("./getDatasetColumnByDatasets"), exports);
|
|
|
20
20
|
__exportStar(require("./getModelColumn"), exports);
|
|
21
21
|
__exportStar(require("./isComplexColumn"), exports);
|
|
22
22
|
__exportStar(require("./isDateColumn"), exports);
|
|
23
|
-
__exportStar(require("./isDurationColumn"), exports);
|
|
24
23
|
__exportStar(require("./isNumericalColumn"), exports);
|
|
@@ -2,5 +2,4 @@ import { ICompoundColumnPropertyType } from "./ICompoundColumnPropertyType";
|
|
|
2
2
|
import { IDateColumnPropertyType } from "./IDateColumnPropertyType";
|
|
3
3
|
import { COLUMN_PROPERTY } from "../constants/COLUMN_PROPERTY";
|
|
4
4
|
import { IComplexColumnPropertyType } from "./IComplexColumnPropertyType";
|
|
5
|
-
|
|
6
|
-
export type IColumnPropertyType = COLUMN_PROPERTY | IComplexColumnPropertyType | ICompoundColumnPropertyType | IDateColumnPropertyType | ITimeUnitProperty;
|
|
5
|
+
export type IColumnPropertyType = COLUMN_PROPERTY | IComplexColumnPropertyType | ICompoundColumnPropertyType | IDateColumnPropertyType;
|
|
@@ -3,7 +3,8 @@ import { IModel } from "../../qrvey/interfaces/IModel";
|
|
|
3
3
|
import { IDTimezone } from "../interfaces/IDTimezone";
|
|
4
4
|
/**
|
|
5
5
|
* Gets the timezone object by the given argument or the model object
|
|
6
|
-
* - In any case, the offset is prioritized
|
|
6
|
+
* - In any case, the offset is prioritized. It means, offset overrides other properties.
|
|
7
|
+
* - If the offset is undefined, the type is used to calculate the offset
|
|
7
8
|
* @param {IDTimezone} timezone the timezone object
|
|
8
9
|
* @param {IModel | IDataset} model the info of the dataset (model)
|
|
9
10
|
* @returns {IDTimezone} a new timezone object
|
|
@@ -10,7 +10,8 @@ const isValidISOOffset_1 = require("./isValidISOOffset");
|
|
|
10
10
|
const isValidTimezoneOffset_1 = require("./isValidTimezoneOffset");
|
|
11
11
|
/**
|
|
12
12
|
* Gets the timezone object by the given argument or the model object
|
|
13
|
-
* - In any case, the offset is prioritized
|
|
13
|
+
* - In any case, the offset is prioritized. It means, offset overrides other properties.
|
|
14
|
+
* - If the offset is undefined, the type is used to calculate the offset
|
|
14
15
|
* @param {IDTimezone} timezone the timezone object
|
|
15
16
|
* @param {IModel | IDataset} model the info of the dataset (model)
|
|
16
17
|
* @returns {IDTimezone} a new timezone object
|
|
@@ -46,9 +47,6 @@ function getOffset(timezone, model) {
|
|
|
46
47
|
(0, isValidTimezoneOffset_1.isValidTimezoneOffset)(model.timezone.offset)) {
|
|
47
48
|
offset = model.timezone.offset;
|
|
48
49
|
}
|
|
49
|
-
else {
|
|
50
|
-
offset = "+00:00";
|
|
51
|
-
}
|
|
52
50
|
return offset;
|
|
53
51
|
}
|
|
54
52
|
/**
|
|
@@ -65,15 +63,17 @@ function getOffset(timezone, model) {
|
|
|
65
63
|
function getType(timezone, model, offset) {
|
|
66
64
|
var _a;
|
|
67
65
|
let type;
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
(0,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
if ((0, isEmpty_1.isEmpty)(offset)) {
|
|
67
|
+
if (!(0, isEmpty_1.isEmpty)(timezone === null || timezone === void 0 ? void 0 : timezone.type)) {
|
|
68
|
+
type = timezone.type;
|
|
69
|
+
}
|
|
70
|
+
else if (!(0, isEmpty_1.isEmpty)(timezone === null || timezone === void 0 ? void 0 : timezone.offset) &&
|
|
71
|
+
(0, isValidTimezoneOffset_1.isValidTimezoneOffset)(timezone.offset)) {
|
|
72
|
+
type = getTypeByOffset(timezone.offset);
|
|
73
|
+
}
|
|
74
|
+
else if (!(0, isEmpty_1.isEmpty)((_a = model === null || model === void 0 ? void 0 : model.timezone) === null || _a === void 0 ? void 0 : _a.type)) {
|
|
75
|
+
type = model.timezone.type;
|
|
76
|
+
}
|
|
77
77
|
}
|
|
78
78
|
if ((0, isEmpty_1.isEmpty)(type)) {
|
|
79
79
|
type = getTypeByOffset(offset);
|
|
@@ -40,7 +40,6 @@ function FD21ToFlatUI(scopes = [], datasetsInfo = []) {
|
|
|
40
40
|
scope.datasets.forEach((dataset) => {
|
|
41
41
|
if (dataset.filters.length > 0) {
|
|
42
42
|
dataset.filters.forEach((filter) => {
|
|
43
|
-
var _a;
|
|
44
43
|
const datasetInfo = datasetsInfo.find((dInfo) => dInfo.qrveyid === dataset.qrveyid);
|
|
45
44
|
let columnInfo;
|
|
46
45
|
if (!(0, isEmpty_1.isEmpty)(datasetInfo))
|
|
@@ -66,7 +65,7 @@ function FD21ToFlatUI(scopes = [], datasetsInfo = []) {
|
|
|
66
65
|
type: (columnInfo === null || columnInfo === void 0 ? void 0 : columnInfo.type) || filter.column.type,
|
|
67
66
|
},
|
|
68
67
|
dateSection: filter.dateSection,
|
|
69
|
-
displayed:
|
|
68
|
+
displayed: filter.displayed,
|
|
70
69
|
enabled: filter.enabled,
|
|
71
70
|
extras: Object.assign(Object.assign({}, filter.extras), { panelid: filter.extras.panelid, filterLabel: filter.extras.filterLabel, info, scope: filter.extras.scope, scopeid: filter.extras.scopeid, section: filter.extras.section, scopeInfo: {
|
|
72
71
|
collapsed: scope.collapsed,
|
|
@@ -136,6 +136,5 @@ const getFilterDetail = (filter, scope, dataset) => {
|
|
|
136
136
|
uiValue: (0, getUIValues_1.getUIValues)(filter, { addEnableds: true }),
|
|
137
137
|
validator: filter.validator,
|
|
138
138
|
values: (0, adaptFilterValues_1.adaptFilterValues)(filter),
|
|
139
|
-
_newFilters: Object.assign({}, filter),
|
|
140
139
|
};
|
|
141
140
|
};
|
|
@@ -65,7 +65,7 @@ function buildFilterByExpression(expression, scopeItem, uFilters) {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function getFilterByExpression(expression, scopeItem) {
|
|
68
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
69
69
|
const uiExtras = expression.uiExtras;
|
|
70
70
|
const scopeid = scopeItem.scope !== FILTER_SCOPE_1.FILTER_SCOPE.GLOBAL
|
|
71
71
|
? (0, get_1._get)(scopeItem, "uiExtras.scopeid")
|
|
@@ -91,11 +91,11 @@ function getFilterByExpression(expression, scopeItem) {
|
|
|
91
91
|
type: (_l = uiExtras.column) === null || _l === void 0 ? void 0 : _l.type,
|
|
92
92
|
},
|
|
93
93
|
dateSection: uiExtras.dateSection,
|
|
94
|
-
displayed:
|
|
94
|
+
displayed: true,
|
|
95
95
|
enabled: uiExtras.enabled,
|
|
96
96
|
extras: Object.assign(Object.assign({}, uiExtras.extras), { panelid: uiExtras.panelid, filterLabel: uiExtras.panelName, info,
|
|
97
97
|
scopeid, scope: scopeItem.scope, section: uiExtras.section, scopeInfo: {
|
|
98
|
-
collapsed: (
|
|
98
|
+
collapsed: (_m = scopeItem.uiExtras) === null || _m === void 0 ? void 0 : _m.collapsed,
|
|
99
99
|
enabled: scopeItem.enabled,
|
|
100
100
|
displayed: true,
|
|
101
101
|
scope: scopeItem.scope,
|
|
@@ -104,7 +104,7 @@ function getFilterByExpression(expression, scopeItem) {
|
|
|
104
104
|
collapsed: false,
|
|
105
105
|
enabled: true,
|
|
106
106
|
displayed: true,
|
|
107
|
-
qrveyid: (
|
|
107
|
+
qrveyid: (_o = uiExtras.column) === null || _o === void 0 ? void 0 : _o.qrveyid,
|
|
108
108
|
label: (0, get_1._get)(uiExtras.column, "dataset.name") ||
|
|
109
109
|
(0, get_1._get)(uiExtras.column, "label"),
|
|
110
110
|
} }),
|
|
@@ -12,7 +12,6 @@ exports.FILTER_SETTINGS_DEFAULT = {
|
|
|
12
12
|
filterBuilder: {
|
|
13
13
|
scopeSelectorDisplayed: true,
|
|
14
14
|
scopeSelectorEnabled: true,
|
|
15
|
-
strictlyInteractivity: false,
|
|
16
15
|
},
|
|
17
16
|
filterDisplayer: {
|
|
18
17
|
addFilterDisplayed: true,
|
|
@@ -75,7 +74,6 @@ exports.FILTER_SETTINGS_DEFAULT = {
|
|
|
75
74
|
},
|
|
76
75
|
iconsDisplayed: true,
|
|
77
76
|
readonly: false,
|
|
78
|
-
strictlyInteractivity: false,
|
|
79
77
|
updateFilterInfo: true,
|
|
80
78
|
},
|
|
81
79
|
filterPanelSettings: {
|
|
@@ -3,10 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getBackendValues = void 0;
|
|
4
4
|
const COLUMN_1 = require("../../../columns/constants/COLUMN");
|
|
5
5
|
const flattenDeep_1 = require("../../../general/array/flattenDeep");
|
|
6
|
-
const time_1 = require("../../../time");
|
|
7
6
|
const FILTER_VALIDATOR_1 = require("../../constants/common/FILTER_VALIDATOR");
|
|
8
7
|
const FILTER_VALIDATOR_INFO_1 = require("../../constants/common/FILTER_VALIDATOR_INFO");
|
|
9
|
-
const adaptTimeUnitValuesFromFilters_1 = require("../common/adaptTimeUnitValuesFromFilters");
|
|
10
8
|
const isRankingFilter_1 = require("../common/isRankingFilter");
|
|
11
9
|
/**
|
|
12
10
|
* Gets the expresion values in the logic format
|
|
@@ -14,7 +12,7 @@ const isRankingFilter_1 = require("../common/isRankingFilter");
|
|
|
14
12
|
* @returns A collection of backend expression value
|
|
15
13
|
*/
|
|
16
14
|
function getBackendValues(filter) {
|
|
17
|
-
const values =
|
|
15
|
+
const values = filter.values || [];
|
|
18
16
|
switch (filter.validator) {
|
|
19
17
|
case FILTER_VALIDATOR_1.FILTER_VALIDATOR.EQUALS:
|
|
20
18
|
case FILTER_VALIDATOR_1.FILTER_VALIDATOR.NOT_EQUAL:
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./adaptTimeUnitValuesFromFilters"), exports);
|
|
18
17
|
__exportStar(require("./areFiltersEquals"), exports);
|
|
19
18
|
__exportStar(require("./excludeFiltersByAggregateColumn"), exports);
|
|
20
19
|
__exportStar(require("./excludeFiltersByParams"), exports);
|
|
@@ -17,11 +17,6 @@ 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) &&
|
|
25
20
|
(!(0, hasProperty_1._hasProperty)(params, "qrveyid") ||
|
|
26
21
|
(letPassUndefinedProperties && dataset.qrveyid == null) ||
|
|
27
22
|
(letPassUndefinedParams && (0, isEmpty_1.isEmpty)(params.qrveyid)) ||
|
|
@@ -18,11 +18,6 @@ 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) &&
|
|
26
21
|
(!(0, hasProperty_1._hasProperty)(params, "dateSection") ||
|
|
27
22
|
(letPassUndefinedProperties && filter.dateSection == null) ||
|
|
28
23
|
(letPassUndefinedParams && (0, isEmpty_1.isEmpty)(params.dateSection)) ||
|
|
@@ -17,11 +17,6 @@ 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) &&
|
|
25
20
|
(!(0, hasProperty_1._hasProperty)(params, "scope") ||
|
|
26
21
|
(letPassUndefinedProperties && scope.scope == null) ||
|
|
27
22
|
(letPassUndefinedParams && (0, isEmpty_1.isEmpty)(params.scope)) ||
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
2
2
|
import { IDataset } from "../../qrvey/interfaces/IDataset";
|
|
3
|
-
import { IFSFilter } from "./common/IFSFilter";
|
|
4
3
|
import { IFSFilterExtrasInfo } from "./common/IFSFilterExtrasInfo";
|
|
5
4
|
import { IFDateSection } from "./IFDateSection";
|
|
6
5
|
import { IFOperator } from "./IFOperator";
|
|
@@ -10,8 +9,6 @@ import { IFSection } from "./IFSection";
|
|
|
10
9
|
import { IFValidator } from "./IFValidator";
|
|
11
10
|
import { IFValue } from "./IFValue";
|
|
12
11
|
import { IFUChartSettings } from "./ui/IFUChartSettings";
|
|
13
|
-
import { IFUFilter } from "./ui/IFUFilter";
|
|
14
|
-
import { IFUFlattenedFilter } from "./ui/IFUFlattenedFilter";
|
|
15
12
|
import { IFUValue } from "./ui/IFUValue";
|
|
16
13
|
export interface OLD_IFilterDetail {
|
|
17
14
|
column?: Omit<IColumn, "label"> & {
|
|
@@ -47,5 +44,4 @@ export interface OLD_IFilterDetail {
|
|
|
47
44
|
section?: IFSection;
|
|
48
45
|
groupValue?: IFProperty;
|
|
49
46
|
extras?: any;
|
|
50
|
-
_newFilters?: IFUFilter | IFSFilter | IFUFlattenedFilter;
|
|
51
47
|
}
|
|
@@ -8,9 +8,4 @@ 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;
|
|
16
11
|
}
|
|
@@ -4,7 +4,6 @@ import { IFScope } from "../IFScope";
|
|
|
4
4
|
import { IFValidator } from "../IFValidator";
|
|
5
5
|
import { IFUChartSettings } from "../ui/IFUChartSettings";
|
|
6
6
|
import { IFSColumn } from "./IFSColumn";
|
|
7
|
-
import { IFSParamsToGetFilterDisplayeds } from "./IFSParamsToGetFilterDisplayeds";
|
|
8
7
|
import { IFSParamsToGetFilterEnableds } from "./IFSParamsToGetFilterEnableds";
|
|
9
8
|
/**
|
|
10
9
|
* Structure for filter properties
|
|
@@ -12,7 +11,6 @@ import { IFSParamsToGetFilterEnableds } from "./IFSParamsToGetFilterEnableds";
|
|
|
12
11
|
export interface IFSParamsToGetFilter {
|
|
13
12
|
column?: Partial<IFSColumn>;
|
|
14
13
|
dateSection?: IFDateSection;
|
|
15
|
-
displayeds?: IFSParamsToGetFilterDisplayeds;
|
|
16
14
|
enableds?: IFSParamsToGetFilterEnableds;
|
|
17
15
|
chart?: IFUChartSettings;
|
|
18
16
|
panelid?: string;
|
|
@@ -23,7 +23,6 @@ export * from "./IFSFilterExtras";
|
|
|
23
23
|
export * from "./IFSFilterExtrasInfo";
|
|
24
24
|
export * from "./IFSGetDataValues";
|
|
25
25
|
export * from "./IFSParamsToGetFilter";
|
|
26
|
-
export * from "./IFSParamsToGetFilterDisplayeds";
|
|
27
26
|
export * from "./IFSParamsToGetFilterEnableds";
|
|
28
27
|
export * from "./IFSScope";
|
|
29
28
|
export * from "./IFSScopeID";
|
|
@@ -39,7 +39,6 @@ __exportStar(require("./IFSFilterExtras"), exports);
|
|
|
39
39
|
__exportStar(require("./IFSFilterExtrasInfo"), exports);
|
|
40
40
|
__exportStar(require("./IFSGetDataValues"), exports);
|
|
41
41
|
__exportStar(require("./IFSParamsToGetFilter"), exports);
|
|
42
|
-
__exportStar(require("./IFSParamsToGetFilterDisplayeds"), exports);
|
|
43
42
|
__exportStar(require("./IFSParamsToGetFilterEnableds"), exports);
|
|
44
43
|
__exportStar(require("./IFSScope"), exports);
|
|
45
44
|
__exportStar(require("./IFSScopeID"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DEFAULT_DATE = exports.DEFAULT_OPTIONS = exports.DURATION_PARTS = exports.PARTS_REGEX = exports.DATETIME_OPTIONS = exports.CURRENCY_DEFAULT = exports.LANG_DEFAULT = exports.STANDARD_NUMERIC_FORMATS = exports.currencyISO = exports.isTextColumn = exports.supportNumericFormatting = exports.hasfileSizeProperty = exports.appliesFormatting = exports.DATEGROUP_FORMATTING_UNSUPPORT = exports.QUESTION_FORMAT_SUPPORT = exports.numericalFields = exports.complexFields = exports.textFields = void 0;
|
|
4
4
|
const isComplexColumn_1 = require("../columns/helpers/isComplexColumn");
|
|
5
5
|
const COLUMN_1 = require("../columns/constants/COLUMN");
|
|
6
6
|
const Charts_Const_1 = require("../constants/Charts.Const");
|
|
@@ -142,4 +142,3 @@ exports.DEFAULT_OPTIONS = {
|
|
|
142
142
|
fractionDigits: 0,
|
|
143
143
|
};
|
|
144
144
|
exports.DEFAULT_DATE = "1/1/1970";
|
|
145
|
-
exports.DEFAULT_TIME_UNIT = "seconds";
|
|
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./durationFormatter"), exports);
|
|
18
18
|
__exportStar(require("./addDurationFormat"), exports);
|
|
19
|
-
__exportStar(require("./convertTimeUnit"), exports);
|
|
@@ -8,7 +8,6 @@ import { II18nUnits } from "./II18nUnits";
|
|
|
8
8
|
import { II18nCalendar } from "../calendar/II18nCalendar";
|
|
9
9
|
import { II18nTokenBox } from "../filters/II18nTokenBox";
|
|
10
10
|
import { II18nTokenMode } from "./II18nTokenMode";
|
|
11
|
-
import { I18nTimeUnitProperties } from "./I18nTimeUnitProperties";
|
|
12
11
|
export interface II18nCommon {
|
|
13
12
|
aggregates: string;
|
|
14
13
|
aggregate_labels: II18nAgreggateLabels;
|
|
@@ -21,7 +20,6 @@ export interface II18nCommon {
|
|
|
21
20
|
properties: II18nColumnProperties;
|
|
22
21
|
search: string;
|
|
23
22
|
sort: string;
|
|
24
|
-
time_units: I18nTimeUnitProperties;
|
|
25
23
|
token_box: II18nTokenBox;
|
|
26
24
|
token_mode: II18nTokenMode;
|
|
27
25
|
units: II18nUnits;
|
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./II18nCommon"), exports);
|
|
18
|
-
__exportStar(require("./I18nTimeUnitProperties"), exports);
|
|
19
18
|
__exportStar(require("./II18nAgreggateLabels"), exports);
|
|
20
19
|
__exportStar(require("./II18nColumnProperties"), exports);
|
|
21
20
|
__exportStar(require("./II18nColumnTypes"), exports);
|
|
@@ -8,7 +8,6 @@ const I18N_COLUMN_LABEL_1 = require("./I18N_COLUMN_LABEL");
|
|
|
8
8
|
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
|
-
const I18N_TIME_UNITS_1 = require("./I18N_TIME_UNITS");
|
|
12
11
|
exports.I18N_COMMON = {
|
|
13
12
|
aggregates: "Aggregates",
|
|
14
13
|
aggregate_labels: I18N_AGGREGATE_LABEL_1.I18N_AGGREGATE_LABEL,
|
|
@@ -26,7 +25,6 @@ exports.I18N_COMMON = {
|
|
|
26
25
|
properties: I18N_COLUMN_PROPERTY_LABEL_1.I18N_COLUMN_PROPERTY_LABEL,
|
|
27
26
|
search: "Search",
|
|
28
27
|
sort: "Sort",
|
|
29
|
-
time_units: I18N_TIME_UNITS_1.I18N_TIME_UNITS,
|
|
30
28
|
token_box: {
|
|
31
29
|
data_tokens: "Data Tokens",
|
|
32
30
|
language_tokens: "Language Tokens",
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -28,6 +28,5 @@ __exportStar(require("./qrvey/index"), exports);
|
|
|
28
28
|
__exportStar(require("./stencil/index"), exports);
|
|
29
29
|
__exportStar(require("./services/index"), exports);
|
|
30
30
|
__exportStar(require("./typescript/index"), exports);
|
|
31
|
-
__exportStar(require("./time/index"), exports);
|
|
32
31
|
__exportStar(require("./tokens/index"), exports);
|
|
33
32
|
__exportStar(require("./column_format/index"), exports);
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyType";
|
|
2
2
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
3
3
|
import { II18nServiceTranslate } from "../../globalization/interfaces/II18nServiceTranslate";
|
|
4
|
-
/**
|
|
5
|
-
* Gets the label of a property by the column
|
|
6
|
-
* @param {IColumn} column the column object
|
|
7
|
-
* @param {IColumnPropertyType} property the column property
|
|
8
|
-
* @param translate function to apply the i18n translation
|
|
9
|
-
* @returns the label
|
|
10
|
-
*/
|
|
11
4
|
export declare function getPropertyLabel(column: IColumn, property: IColumnPropertyType, translate?: II18nServiceTranslate): string;
|
|
@@ -5,22 +5,11 @@ const COLUMN_PROPERTY_INFO_1 = require("../../columns/constants/COLUMN_PROPERTY_
|
|
|
5
5
|
const isDateColumn_1 = require("../../columns/helpers/isDateColumn");
|
|
6
6
|
const COLUMN_1 = require("../../columns/constants/COLUMN");
|
|
7
7
|
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
8
|
-
const isDurationColumn_1 = require("../../columns/helpers/isDurationColumn");
|
|
9
|
-
const TIME_UNIT_INFO_LIST_1 = require("../../time/constants/TIME_UNIT_INFO_LIST");
|
|
10
|
-
/**
|
|
11
|
-
* Gets the label of a property by the column
|
|
12
|
-
* @param {IColumn} column the column object
|
|
13
|
-
* @param {IColumnPropertyType} property the column property
|
|
14
|
-
* @param translate function to apply the i18n translation
|
|
15
|
-
* @returns the label
|
|
16
|
-
*/
|
|
17
8
|
function getPropertyLabel(column, property, translate) {
|
|
18
9
|
let propertyLabel;
|
|
19
|
-
|
|
20
|
-
if ((0, isEmpty_1.isEmpty)(
|
|
21
|
-
|
|
22
|
-
if (!(0, isEmpty_1.isEmpty)(columnProperties)) {
|
|
23
|
-
const propertyObject = columnProperties.find((pValue) => pValue.value === property);
|
|
10
|
+
const propertyValues = COLUMN_PROPERTY_INFO_1.COLUMN_PROPERTY_INFO[(0, isDateColumn_1.isDateColumn)(column) ? COLUMN_1.COLUMN.DATE : column.type];
|
|
11
|
+
if (!(0, isEmpty_1.isEmpty)(propertyValues)) {
|
|
12
|
+
const propertyObject = propertyValues.find((pValue) => pValue.value === property);
|
|
24
13
|
if (!(0, isEmpty_1.isEmpty)(propertyObject))
|
|
25
14
|
propertyLabel = !(0, isEmpty_1.isEmpty)(translate)
|
|
26
15
|
? translate(propertyObject.i18nLabelPath)
|
|
@@ -2,5 +2,4 @@ import { ICompoundColumnPropertyType } from "./ICompoundColumnPropertyType";
|
|
|
2
2
|
import { IDateColumnPropertyType } from "./IDateColumnPropertyType";
|
|
3
3
|
import { COLUMN_PROPERTY } from "../constants/COLUMN_PROPERTY";
|
|
4
4
|
import { IComplexColumnPropertyType } from "./IComplexColumnPropertyType";
|
|
5
|
-
|
|
6
|
-
export type IColumnPropertyType = COLUMN_PROPERTY | IComplexColumnPropertyType | ICompoundColumnPropertyType | IDateColumnPropertyType | ITimeUnitProperty;
|
|
5
|
+
export type IColumnPropertyType = COLUMN_PROPERTY | IComplexColumnPropertyType | ICompoundColumnPropertyType | IDateColumnPropertyType;
|
|
@@ -3,7 +3,8 @@ import { IModel } from "../../qrvey/interfaces/IModel";
|
|
|
3
3
|
import { IDTimezone } from "../interfaces/IDTimezone";
|
|
4
4
|
/**
|
|
5
5
|
* Gets the timezone object by the given argument or the model object
|
|
6
|
-
* - In any case, the offset is prioritized
|
|
6
|
+
* - In any case, the offset is prioritized. It means, offset overrides other properties.
|
|
7
|
+
* - If the offset is undefined, the type is used to calculate the offset
|
|
7
8
|
* @param {IDTimezone} timezone the timezone object
|
|
8
9
|
* @param {IModel | IDataset} model the info of the dataset (model)
|
|
9
10
|
* @returns {IDTimezone} a new timezone object
|
|
@@ -7,7 +7,8 @@ import { isValidISOOffset } from "./isValidISOOffset";
|
|
|
7
7
|
import { isValidTimezoneOffset } from "./isValidTimezoneOffset";
|
|
8
8
|
/**
|
|
9
9
|
* Gets the timezone object by the given argument or the model object
|
|
10
|
-
* - In any case, the offset is prioritized
|
|
10
|
+
* - In any case, the offset is prioritized. It means, offset overrides other properties.
|
|
11
|
+
* - If the offset is undefined, the type is used to calculate the offset
|
|
11
12
|
* @param {IDTimezone} timezone the timezone object
|
|
12
13
|
* @param {IModel | IDataset} model the info of the dataset (model)
|
|
13
14
|
* @returns {IDTimezone} a new timezone object
|
|
@@ -42,9 +43,6 @@ function getOffset(timezone, model) {
|
|
|
42
43
|
isValidTimezoneOffset(model.timezone.offset)) {
|
|
43
44
|
offset = model.timezone.offset;
|
|
44
45
|
}
|
|
45
|
-
else {
|
|
46
|
-
offset = "+00:00";
|
|
47
|
-
}
|
|
48
46
|
return offset;
|
|
49
47
|
}
|
|
50
48
|
/**
|
|
@@ -61,15 +59,17 @@ function getOffset(timezone, model) {
|
|
|
61
59
|
function getType(timezone, model, offset) {
|
|
62
60
|
var _a;
|
|
63
61
|
let type;
|
|
64
|
-
if (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
if (isEmpty(offset)) {
|
|
63
|
+
if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.type)) {
|
|
64
|
+
type = timezone.type;
|
|
65
|
+
}
|
|
66
|
+
else if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.offset) &&
|
|
67
|
+
isValidTimezoneOffset(timezone.offset)) {
|
|
68
|
+
type = getTypeByOffset(timezone.offset);
|
|
69
|
+
}
|
|
70
|
+
else if (!isEmpty((_a = model === null || model === void 0 ? void 0 : model.timezone) === null || _a === void 0 ? void 0 : _a.type)) {
|
|
71
|
+
type = model.timezone.type;
|
|
72
|
+
}
|
|
73
73
|
}
|
|
74
74
|
if (isEmpty(type)) {
|
|
75
75
|
type = getTypeByOffset(offset);
|
|
@@ -36,7 +36,6 @@ function FD21ToFlatUI(scopes = [], datasetsInfo = []) {
|
|
|
36
36
|
scope.datasets.forEach((dataset) => {
|
|
37
37
|
if (dataset.filters.length > 0) {
|
|
38
38
|
dataset.filters.forEach((filter) => {
|
|
39
|
-
var _a;
|
|
40
39
|
const datasetInfo = datasetsInfo.find((dInfo) => dInfo.qrveyid === dataset.qrveyid);
|
|
41
40
|
let columnInfo;
|
|
42
41
|
if (!isEmpty(datasetInfo))
|
|
@@ -62,7 +61,7 @@ function FD21ToFlatUI(scopes = [], datasetsInfo = []) {
|
|
|
62
61
|
type: (columnInfo === null || columnInfo === void 0 ? void 0 : columnInfo.type) || filter.column.type,
|
|
63
62
|
},
|
|
64
63
|
dateSection: filter.dateSection,
|
|
65
|
-
displayed:
|
|
64
|
+
displayed: filter.displayed,
|
|
66
65
|
enabled: filter.enabled,
|
|
67
66
|
extras: Object.assign(Object.assign({}, filter.extras), { panelid: filter.extras.panelid, filterLabel: filter.extras.filterLabel, info, scope: filter.extras.scope, scopeid: filter.extras.scopeid, section: filter.extras.section, scopeInfo: {
|
|
68
67
|
collapsed: scope.collapsed,
|
|
@@ -61,7 +61,7 @@ function buildFilterByExpression(expression, scopeItem, uFilters) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
function getFilterByExpression(expression, scopeItem) {
|
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
65
65
|
const uiExtras = expression.uiExtras;
|
|
66
66
|
const scopeid = scopeItem.scope !== FILTER_SCOPE.GLOBAL
|
|
67
67
|
? _get(scopeItem, "uiExtras.scopeid")
|
|
@@ -87,11 +87,11 @@ function getFilterByExpression(expression, scopeItem) {
|
|
|
87
87
|
type: (_l = uiExtras.column) === null || _l === void 0 ? void 0 : _l.type,
|
|
88
88
|
},
|
|
89
89
|
dateSection: uiExtras.dateSection,
|
|
90
|
-
displayed:
|
|
90
|
+
displayed: true,
|
|
91
91
|
enabled: uiExtras.enabled,
|
|
92
92
|
extras: Object.assign(Object.assign({}, uiExtras.extras), { panelid: uiExtras.panelid, filterLabel: uiExtras.panelName, info,
|
|
93
93
|
scopeid, scope: scopeItem.scope, section: uiExtras.section, scopeInfo: {
|
|
94
|
-
collapsed: (
|
|
94
|
+
collapsed: (_m = scopeItem.uiExtras) === null || _m === void 0 ? void 0 : _m.collapsed,
|
|
95
95
|
enabled: scopeItem.enabled,
|
|
96
96
|
displayed: true,
|
|
97
97
|
scope: scopeItem.scope,
|
|
@@ -100,7 +100,7 @@ function getFilterByExpression(expression, scopeItem) {
|
|
|
100
100
|
collapsed: false,
|
|
101
101
|
enabled: true,
|
|
102
102
|
displayed: true,
|
|
103
|
-
qrveyid: (
|
|
103
|
+
qrveyid: (_o = uiExtras.column) === null || _o === void 0 ? void 0 : _o.qrveyid,
|
|
104
104
|
label: _get(uiExtras.column, "dataset.name") ||
|
|
105
105
|
_get(uiExtras.column, "label"),
|
|
106
106
|
} }),
|
|
@@ -9,7 +9,6 @@ export const FILTER_SETTINGS_DEFAULT = {
|
|
|
9
9
|
filterBuilder: {
|
|
10
10
|
scopeSelectorDisplayed: true,
|
|
11
11
|
scopeSelectorEnabled: true,
|
|
12
|
-
strictlyInteractivity: false,
|
|
13
12
|
},
|
|
14
13
|
filterDisplayer: {
|
|
15
14
|
addFilterDisplayed: true,
|
|
@@ -72,7 +71,6 @@ export const FILTER_SETTINGS_DEFAULT = {
|
|
|
72
71
|
},
|
|
73
72
|
iconsDisplayed: true,
|
|
74
73
|
readonly: false,
|
|
75
|
-
strictlyInteractivity: false,
|
|
76
74
|
updateFilterInfo: true,
|
|
77
75
|
},
|
|
78
76
|
filterPanelSettings: {
|