@qrvey/utils 1.9.0 → 1.10.0-timezone-0
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/charts/interfaces/IAggregateAbbreviation.d.ts +1 -1
- package/dist/charts/interfaces/IAggregateLabel.d.ts +1 -1
- package/dist/charts/interfaces/IAggregateType.d.ts +1 -1
- package/dist/charts/interfaces/IRequestAdapterMetric.d.ts +12 -12
- package/dist/cjs/charts/interfaces/IAggregateAbbreviation.d.ts +1 -1
- package/dist/cjs/charts/interfaces/IAggregateLabel.d.ts +1 -1
- package/dist/cjs/charts/interfaces/IAggregateType.d.ts +1 -1
- package/dist/cjs/charts/interfaces/IRequestAdapterMetric.d.ts +12 -12
- package/dist/cjs/column_format/interfaces/IChartGroupType.d.ts +1 -1
- package/dist/cjs/column_format/interfaces/IChartShelfType.d.ts +1 -1
- package/dist/cjs/column_format/interfaces/IChartTableType.d.ts +1 -1
- package/dist/cjs/column_format/interfaces/IColumnFormatReturnType.d.ts +1 -1
- package/dist/cjs/column_format/interfaces/IFormatStringType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/IColumnImageUploadOption.d.ts +1 -1
- package/dist/cjs/columns/interfaces/IColumnPropertyType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/IColumnType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/IComplexColumnPropertyType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/IComplexColumnType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/ICompoundColumnPropertyType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/ICompoundColumnType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/IDateColumnPropertyType.d.ts +1 -1
- package/dist/cjs/columns/interfaces/INumericalColumnType.d.ts +1 -1
- package/dist/cjs/dates/adapters/ISOToNumericOffset.d.ts +6 -0
- package/dist/cjs/dates/adapters/ISOToNumericOffset.js +19 -0
- package/dist/cjs/dates/adapters/index.d.ts +2 -0
- package/dist/cjs/dates/adapters/index.js +2 -0
- package/dist/cjs/dates/adapters/numericOffsetToISO.d.ts +6 -0
- package/dist/cjs/dates/adapters/numericOffsetToISO.js +27 -0
- package/dist/cjs/dates/constants/ISO_8601_REGEX.d.ts +1 -0
- package/dist/cjs/dates/constants/ISO_8601_REGEX.js +4 -0
- package/dist/cjs/dates/constants/index.d.ts +1 -0
- package/dist/cjs/dates/constants/index.js +1 -0
- package/dist/cjs/dates/helpers/getDateByTimezoneOffset.d.ts +7 -0
- package/dist/cjs/dates/helpers/getDateByTimezoneOffset.js +25 -0
- package/dist/cjs/dates/helpers/index.d.ts +1 -1
- package/dist/cjs/dates/helpers/index.js +1 -1
- package/dist/cjs/dates/helpers/isValidISOOffset.d.ts +7 -0
- package/dist/cjs/dates/helpers/isValidISOOffset.js +17 -0
- package/dist/cjs/dates/interfaces/IDTimezoneOffset.d.ts +1 -0
- package/dist/cjs/dates/interfaces/IDTimezoneOffset.js +2 -0
- package/dist/cjs/dates/interfaces/IDateFormat.d.ts +1 -1
- package/dist/cjs/dates/interfaces/IDateGroupingProperty.d.ts +1 -1
- package/dist/cjs/dates/interfaces/index.d.ts +1 -0
- package/dist/cjs/dates/interfaces/index.js +1 -0
- package/dist/cjs/dates/relative/helpers/parseDate.d.ts +2 -2
- package/dist/cjs/dates/relative/interfaces/IRelativeUnit.d.ts +1 -1
- package/dist/cjs/dates/relative/interfaces/RelativeCursor.d.ts +1 -1
- package/dist/cjs/dates/relative/interfaces/RelativeInput.d.ts +1 -1
- package/dist/cjs/dates/relative/interfaces/ui/IRelativeSectionMode.d.ts +1 -1
- package/dist/cjs/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -1
- package/dist/cjs/filters/helpers/common/excludeFiltersByParams.js +5 -5
- package/dist/cjs/filters/helpers/common/index.d.ts +1 -0
- package/dist/cjs/filters/helpers/common/index.js +1 -0
- package/dist/cjs/filters/helpers/common/setTimezoneToFilters.d.ts +4 -0
- package/dist/cjs/filters/helpers/common/setTimezoneToFilters.js +17 -0
- package/dist/cjs/filters/interfaces/IFDateProperty.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFDateSection.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFOperator.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFProperty.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFScope.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFSection.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFStructureType.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFValidator.d.ts +1 -1
- package/dist/cjs/filters/interfaces/IFValue.d.ts +1 -1
- package/dist/cjs/filters/interfaces/OLD_IFilterExpression.d.ts +2 -2
- package/dist/cjs/filters/interfaces/backend/IFBExpressionRelativeDate.d.ts +1 -1
- package/dist/cjs/filters/interfaces/backend/IFBExpressionValue.d.ts +1 -1
- package/dist/cjs/filters/interfaces/backend/IFBackendExpressionValue.d.ts +1 -1
- package/dist/cjs/filters/interfaces/backend/IFBackendValidator.d.ts +1 -1
- package/dist/cjs/filters/interfaces/common/IFSColumn.d.ts +1 -1
- package/dist/cjs/filters/interfaces/common/IFSGetDataValues.d.ts +1 -1
- package/dist/cjs/filters/interfaces/common/IFSValueRelativeDate.d.ts +1 -1
- package/dist/cjs/filters/interfaces/common/IFilterConfig.d.ts +1 -1
- package/dist/cjs/filters/interfaces/panel/IFPAction.d.ts +1 -1
- package/dist/cjs/filters/interfaces/settings/IFSettingsPanelView.d.ts +1 -1
- package/dist/cjs/filters/interfaces/settings/IFSettingsScopes.d.ts +1 -1
- package/dist/cjs/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +2 -0
- package/dist/cjs/filters/services/Filters.api.js +1 -1
- package/dist/cjs/format/duration/durationFormatter.js +2 -1
- package/dist/cjs/formulas/interfaces/IFormulaType.d.ts +1 -1
- package/dist/cjs/general/array/addPropertyToArrayOfObjects.d.ts +1 -1
- package/dist/cjs/general/index.d.ts +1 -0
- package/dist/cjs/general/index.js +1 -0
- package/dist/cjs/general/mix/importScripts.d.ts +2 -2
- package/dist/cjs/general/numeric/getSign.d.ts +6 -0
- package/dist/cjs/general/numeric/getSign.js +12 -0
- package/dist/cjs/general/numeric/index.d.ts +1 -0
- package/dist/cjs/general/numeric/index.js +17 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_OPERATORS.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD.d.ts +1 -1
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.d.ts +1 -1
- package/dist/cjs/interfaces/Chart.Interface.d.ts +1 -1
- package/dist/cjs/interfaces/IChartBuilder.Interface.d.ts +1 -1
- package/dist/cjs/interfaces/Qrvey.Interface.d.ts +2 -2
- package/dist/cjs/interfaces/general/IWidgetConfig.d.ts +2 -1
- package/dist/cjs/qrvey/helpers/transformValue.js +24 -1
- package/dist/cjs/qrvey/interfaces/IAppStatus.d.ts +1 -1
- package/dist/cjs/qrvey/interfaces/IAppType.d.ts +1 -1
- package/dist/cjs/qrvey/interfaces/IBDataset.d.ts +2 -0
- package/dist/cjs/qrvey/interfaces/IBTimezone.d.ts +4 -0
- package/dist/cjs/qrvey/interfaces/IBTimezone.js +2 -0
- package/dist/cjs/qrvey/interfaces/ICalculation.d.ts +1 -1
- package/dist/cjs/qrvey/interfaces/ICalculationType.d.ts +1 -1
- package/dist/cjs/qrvey/interfaces/IDataset.d.ts +3 -1
- package/dist/cjs/qrvey/interfaces/ITransformValueSettings.d.ts +2 -0
- package/dist/cjs/qrvey/interfaces/index.d.ts +1 -0
- package/dist/cjs/qrvey/interfaces/index.js +1 -0
- package/dist/cjs/services/adapters/BDatasetsToUIDatasets.adapter.js +9 -5
- package/dist/cjs/services/helpers/Request.d.ts +1 -1
- package/dist/cjs/services/helpers/Request.js +6 -5
- package/dist/cjs/typescript/DeepPartial.d.ts +1 -1
- package/dist/cjs/typescript/DeepRequired.d.ts +1 -1
- package/dist/cjs/typescript/ValueOf.d.ts +1 -1
- package/dist/column_format/interfaces/IChartGroupType.d.ts +1 -1
- package/dist/column_format/interfaces/IChartShelfType.d.ts +1 -1
- package/dist/column_format/interfaces/IChartTableType.d.ts +1 -1
- package/dist/column_format/interfaces/IColumnFormatReturnType.d.ts +1 -1
- package/dist/column_format/interfaces/IFormatStringType.d.ts +1 -1
- package/dist/columns/interfaces/IColumnImageUploadOption.d.ts +1 -1
- package/dist/columns/interfaces/IColumnPropertyType.d.ts +1 -1
- package/dist/columns/interfaces/IColumnType.d.ts +1 -1
- package/dist/columns/interfaces/IComplexColumnPropertyType.d.ts +1 -1
- package/dist/columns/interfaces/IComplexColumnType.d.ts +1 -1
- package/dist/columns/interfaces/ICompoundColumnPropertyType.d.ts +1 -1
- package/dist/columns/interfaces/ICompoundColumnType.d.ts +1 -1
- package/dist/columns/interfaces/IDateColumnPropertyType.d.ts +1 -1
- package/dist/columns/interfaces/INumericalColumnType.d.ts +1 -1
- package/dist/dates/adapters/ISOToNumericOffset.d.ts +6 -0
- package/dist/dates/adapters/ISOToNumericOffset.js +15 -0
- package/dist/dates/adapters/index.d.ts +2 -0
- package/dist/dates/adapters/index.js +2 -0
- package/dist/dates/adapters/numericOffsetToISO.d.ts +6 -0
- package/dist/dates/adapters/numericOffsetToISO.js +23 -0
- package/dist/dates/constants/ISO_8601_REGEX.d.ts +1 -0
- package/dist/dates/constants/ISO_8601_REGEX.js +1 -0
- package/dist/dates/constants/index.d.ts +1 -0
- package/dist/dates/constants/index.js +1 -0
- package/dist/dates/helpers/getDateByTimezoneOffset.d.ts +7 -0
- package/dist/dates/helpers/getDateByTimezoneOffset.js +21 -0
- package/dist/dates/helpers/index.d.ts +1 -1
- package/dist/dates/helpers/index.js +1 -1
- package/dist/dates/helpers/isValidISOOffset.d.ts +7 -0
- package/dist/dates/helpers/isValidISOOffset.js +13 -0
- package/dist/dates/interfaces/IDTimezoneOffset.d.ts +1 -0
- package/dist/dates/interfaces/IDTimezoneOffset.js +1 -0
- package/dist/dates/interfaces/IDateFormat.d.ts +1 -1
- package/dist/dates/interfaces/IDateGroupingProperty.d.ts +1 -1
- package/dist/dates/interfaces/index.d.ts +1 -0
- package/dist/dates/interfaces/index.js +1 -0
- package/dist/dates/relative/helpers/parseDate.d.ts +2 -2
- package/dist/dates/relative/interfaces/IRelativeUnit.d.ts +1 -1
- package/dist/dates/relative/interfaces/RelativeCursor.d.ts +1 -1
- package/dist/dates/relative/interfaces/RelativeInput.d.ts +1 -1
- package/dist/dates/relative/interfaces/ui/IRelativeSectionMode.d.ts +1 -1
- package/dist/filters/helpers/builder/getFilterBuilderGeneralConfig.js +1 -1
- package/dist/filters/helpers/common/excludeFiltersByParams.js +5 -5
- package/dist/filters/helpers/common/index.d.ts +1 -0
- package/dist/filters/helpers/common/index.js +1 -0
- package/dist/filters/helpers/common/setTimezoneToFilters.d.ts +4 -0
- package/dist/filters/helpers/common/setTimezoneToFilters.js +13 -0
- package/dist/filters/interfaces/IFDateProperty.d.ts +1 -1
- package/dist/filters/interfaces/IFDateSection.d.ts +1 -1
- package/dist/filters/interfaces/IFOperator.d.ts +1 -1
- package/dist/filters/interfaces/IFProperty.d.ts +1 -1
- package/dist/filters/interfaces/IFScope.d.ts +1 -1
- package/dist/filters/interfaces/IFSection.d.ts +1 -1
- package/dist/filters/interfaces/IFStructureType.d.ts +1 -1
- package/dist/filters/interfaces/IFValidator.d.ts +1 -1
- package/dist/filters/interfaces/IFValue.d.ts +1 -1
- package/dist/filters/interfaces/OLD_IFilterExpression.d.ts +2 -2
- package/dist/filters/interfaces/backend/IFBExpressionRelativeDate.d.ts +1 -1
- package/dist/filters/interfaces/backend/IFBExpressionValue.d.ts +1 -1
- package/dist/filters/interfaces/backend/IFBackendExpressionValue.d.ts +1 -1
- package/dist/filters/interfaces/backend/IFBackendValidator.d.ts +1 -1
- package/dist/filters/interfaces/common/IFSColumn.d.ts +1 -1
- package/dist/filters/interfaces/common/IFSGetDataValues.d.ts +1 -1
- package/dist/filters/interfaces/common/IFSValueRelativeDate.d.ts +1 -1
- package/dist/filters/interfaces/common/IFilterConfig.d.ts +1 -1
- package/dist/filters/interfaces/panel/IFPAction.d.ts +1 -1
- package/dist/filters/interfaces/settings/IFSettingsPanelView.d.ts +1 -1
- package/dist/filters/interfaces/settings/IFSettingsScopes.d.ts +1 -1
- package/dist/filters/interfaces/ui/IFUTransformFilterValuesSettings.d.ts +2 -0
- package/dist/filters/services/Filters.api.js +1 -1
- package/dist/format/duration/durationFormatter.js +2 -1
- package/dist/formulas/interfaces/IFormulaType.d.ts +1 -1
- package/dist/general/array/addPropertyToArrayOfObjects.d.ts +1 -1
- package/dist/general/index.d.ts +1 -0
- package/dist/general/index.js +1 -0
- package/dist/general/mix/importScripts.d.ts +2 -2
- package/dist/general/numeric/getSign.d.ts +6 -0
- package/dist/general/numeric/getSign.js +8 -0
- package/dist/general/numeric/index.d.ts +1 -0
- package/dist/general/numeric/index.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_FORMAT_OPTIONS.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL_OPTIONS.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_LAYER_OPTIONS.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_OPERATORS.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_THRESHOLD.d.ts +1 -1
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_TIME_PERIOD.d.ts +1 -1
- package/dist/interfaces/Chart.Interface.d.ts +1 -1
- package/dist/interfaces/IChartBuilder.Interface.d.ts +1 -1
- package/dist/interfaces/Qrvey.Interface.d.ts +2 -2
- package/dist/interfaces/general/IWidgetConfig.d.ts +2 -1
- package/dist/qrvey/helpers/transformValue.js +24 -1
- package/dist/qrvey/interfaces/IAppStatus.d.ts +1 -1
- package/dist/qrvey/interfaces/IAppType.d.ts +1 -1
- package/dist/qrvey/interfaces/IBDataset.d.ts +2 -0
- package/dist/qrvey/interfaces/IBTimezone.d.ts +4 -0
- package/dist/qrvey/interfaces/IBTimezone.js +1 -0
- package/dist/qrvey/interfaces/ICalculation.d.ts +1 -1
- package/dist/qrvey/interfaces/ICalculationType.d.ts +1 -1
- package/dist/qrvey/interfaces/IDataset.d.ts +3 -1
- package/dist/qrvey/interfaces/ITransformValueSettings.d.ts +2 -0
- package/dist/qrvey/interfaces/index.d.ts +1 -0
- package/dist/qrvey/interfaces/index.js +1 -0
- package/dist/services/adapters/BDatasetsToUIDatasets.adapter.js +9 -5
- package/dist/services/helpers/Request.d.ts +1 -1
- package/dist/services/helpers/Request.js +6 -5
- package/dist/typescript/DeepPartial.d.ts +1 -1
- package/dist/typescript/DeepRequired.d.ts +1 -1
- package/dist/typescript/ValueOf.d.ts +1 -1
- package/package.json +20 -19
- package/dist/cjs/dates/helpers/adjustTimezone.d.ts +0 -6
- package/dist/cjs/dates/helpers/adjustTimezone.js +0 -19
- package/dist/dates/helpers/adjustTimezone.d.ts +0 -6
- package/dist/dates/helpers/adjustTimezone.js +0 -15
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AGGREGATE_ABBREVIATION } from "../constants/AGGREGATE_ABBREVIATION";
|
|
2
|
-
export
|
|
2
|
+
export type IAggregateAbbreviation = AGGREGATE_ABBREVIATION;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AGGREGATE_LABEL } from "../constants/AGGREGATE_LABEL";
|
|
2
|
-
export
|
|
2
|
+
export type IAggregateLabel = AGGREGATE_LABEL;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AGGREGATE } from "../constants/AGGREGATE";
|
|
2
|
-
export
|
|
2
|
+
export type IAggregateType = AGGREGATE;
|
|
@@ -17,7 +17,7 @@ export interface MetricRequestPayload {
|
|
|
17
17
|
* example, if you want to aggregate the number of times a question was answered, you would use the
|
|
18
18
|
* property "answered".
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type MetricValue = {
|
|
21
21
|
aggregate: AGGREGATE_LABEL;
|
|
22
22
|
questionid: string;
|
|
23
23
|
property?: string | null;
|
|
@@ -36,7 +36,7 @@ export declare type MetricValue = {
|
|
|
36
36
|
* @property {boolean} isCalendarDate - If true, the date is a calendar date, otherwise it's a relative
|
|
37
37
|
* date.
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export type RelativeDateConfig = {
|
|
40
40
|
questionid: string;
|
|
41
41
|
cursor: RelativeCursor;
|
|
42
42
|
number?: number;
|
|
@@ -50,7 +50,7 @@ export declare type RelativeDateConfig = {
|
|
|
50
50
|
* `CustomRange`.
|
|
51
51
|
* @property {CustomRange} customRange - The custom range to use for the metric.
|
|
52
52
|
*/
|
|
53
|
-
export
|
|
53
|
+
export type MetricCustomRange = {
|
|
54
54
|
customRange: CustomRange;
|
|
55
55
|
type?: IColumnType;
|
|
56
56
|
};
|
|
@@ -60,7 +60,7 @@ export declare type MetricCustomRange = {
|
|
|
60
60
|
* @property {string} endDate - The end date of the custom range.
|
|
61
61
|
* @property {TP_CUSTOM_RANGE} label - The label for the custom range.
|
|
62
62
|
*/
|
|
63
|
-
export
|
|
63
|
+
export type CustomRangeConfig = {
|
|
64
64
|
startingDate?: string;
|
|
65
65
|
endDate?: string;
|
|
66
66
|
label?: TP_CUSTOM_RANGE;
|
|
@@ -70,7 +70,7 @@ export declare type CustomRangeConfig = {
|
|
|
70
70
|
* @property {string} gte - Greater than or equal to
|
|
71
71
|
* @property {string} lte - Less than or equal to
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type CustomRange = {
|
|
74
74
|
gte?: string;
|
|
75
75
|
lte?: string;
|
|
76
76
|
};
|
|
@@ -84,19 +84,19 @@ export declare type CustomRange = {
|
|
|
84
84
|
* @property {number} max - The maximum value of the metric
|
|
85
85
|
* @property {number} comparison - The value of the metric for the previous period.
|
|
86
86
|
*/
|
|
87
|
-
export
|
|
87
|
+
export type MetricRequestResponse = {
|
|
88
88
|
value: number;
|
|
89
89
|
min: number;
|
|
90
90
|
max: number;
|
|
91
91
|
comparison: number;
|
|
92
92
|
};
|
|
93
|
-
export
|
|
94
|
-
export
|
|
95
|
-
export
|
|
93
|
+
export type MetricPeriod = RelativeDateConfig;
|
|
94
|
+
export type MetricComparison = RelativeDateConfig;
|
|
95
|
+
export type MetricConfig = {
|
|
96
96
|
logic: IFBLogic[];
|
|
97
97
|
data: MetricConfigData;
|
|
98
98
|
};
|
|
99
|
-
export
|
|
99
|
+
export type MetricConfigData = {
|
|
100
100
|
dateColumn: IBColumn;
|
|
101
101
|
timePeriod: MetricTimeInfo;
|
|
102
102
|
timePeriodCustomRange: MetricTimeCustomRange;
|
|
@@ -114,12 +114,12 @@ export declare type MetricConfigData = {
|
|
|
114
114
|
label: AGGREGATE_LABEL;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
-
export
|
|
117
|
+
export type MetricTimeCustomRange = {
|
|
118
118
|
key: string;
|
|
119
119
|
label: TP_CUSTOM_RANGE;
|
|
120
120
|
text: string;
|
|
121
121
|
};
|
|
122
|
-
export
|
|
122
|
+
export type MetricTimeInfo = {
|
|
123
123
|
key: string;
|
|
124
124
|
label: TimePeriod;
|
|
125
125
|
text: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AGGREGATE_ABBREVIATION } from "../constants/AGGREGATE_ABBREVIATION";
|
|
2
|
-
export
|
|
2
|
+
export type IAggregateAbbreviation = AGGREGATE_ABBREVIATION;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AGGREGATE_LABEL } from "../constants/AGGREGATE_LABEL";
|
|
2
|
-
export
|
|
2
|
+
export type IAggregateLabel = AGGREGATE_LABEL;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AGGREGATE } from "../constants/AGGREGATE";
|
|
2
|
-
export
|
|
2
|
+
export type IAggregateType = AGGREGATE;
|
|
@@ -17,7 +17,7 @@ export interface MetricRequestPayload {
|
|
|
17
17
|
* example, if you want to aggregate the number of times a question was answered, you would use the
|
|
18
18
|
* property "answered".
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type MetricValue = {
|
|
21
21
|
aggregate: AGGREGATE_LABEL;
|
|
22
22
|
questionid: string;
|
|
23
23
|
property?: string | null;
|
|
@@ -36,7 +36,7 @@ export declare type MetricValue = {
|
|
|
36
36
|
* @property {boolean} isCalendarDate - If true, the date is a calendar date, otherwise it's a relative
|
|
37
37
|
* date.
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export type RelativeDateConfig = {
|
|
40
40
|
questionid: string;
|
|
41
41
|
cursor: RelativeCursor;
|
|
42
42
|
number?: number;
|
|
@@ -50,7 +50,7 @@ export declare type RelativeDateConfig = {
|
|
|
50
50
|
* `CustomRange`.
|
|
51
51
|
* @property {CustomRange} customRange - The custom range to use for the metric.
|
|
52
52
|
*/
|
|
53
|
-
export
|
|
53
|
+
export type MetricCustomRange = {
|
|
54
54
|
customRange: CustomRange;
|
|
55
55
|
type?: IColumnType;
|
|
56
56
|
};
|
|
@@ -60,7 +60,7 @@ export declare type MetricCustomRange = {
|
|
|
60
60
|
* @property {string} endDate - The end date of the custom range.
|
|
61
61
|
* @property {TP_CUSTOM_RANGE} label - The label for the custom range.
|
|
62
62
|
*/
|
|
63
|
-
export
|
|
63
|
+
export type CustomRangeConfig = {
|
|
64
64
|
startingDate?: string;
|
|
65
65
|
endDate?: string;
|
|
66
66
|
label?: TP_CUSTOM_RANGE;
|
|
@@ -70,7 +70,7 @@ export declare type CustomRangeConfig = {
|
|
|
70
70
|
* @property {string} gte - Greater than or equal to
|
|
71
71
|
* @property {string} lte - Less than or equal to
|
|
72
72
|
*/
|
|
73
|
-
export
|
|
73
|
+
export type CustomRange = {
|
|
74
74
|
gte?: string;
|
|
75
75
|
lte?: string;
|
|
76
76
|
};
|
|
@@ -84,19 +84,19 @@ export declare type CustomRange = {
|
|
|
84
84
|
* @property {number} max - The maximum value of the metric
|
|
85
85
|
* @property {number} comparison - The value of the metric for the previous period.
|
|
86
86
|
*/
|
|
87
|
-
export
|
|
87
|
+
export type MetricRequestResponse = {
|
|
88
88
|
value: number;
|
|
89
89
|
min: number;
|
|
90
90
|
max: number;
|
|
91
91
|
comparison: number;
|
|
92
92
|
};
|
|
93
|
-
export
|
|
94
|
-
export
|
|
95
|
-
export
|
|
93
|
+
export type MetricPeriod = RelativeDateConfig;
|
|
94
|
+
export type MetricComparison = RelativeDateConfig;
|
|
95
|
+
export type MetricConfig = {
|
|
96
96
|
logic: IFBLogic[];
|
|
97
97
|
data: MetricConfigData;
|
|
98
98
|
};
|
|
99
|
-
export
|
|
99
|
+
export type MetricConfigData = {
|
|
100
100
|
dateColumn: IBColumn;
|
|
101
101
|
timePeriod: MetricTimeInfo;
|
|
102
102
|
timePeriodCustomRange: MetricTimeCustomRange;
|
|
@@ -114,12 +114,12 @@ export declare type MetricConfigData = {
|
|
|
114
114
|
label: AGGREGATE_LABEL;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
-
export
|
|
117
|
+
export type MetricTimeCustomRange = {
|
|
118
118
|
key: string;
|
|
119
119
|
label: TP_CUSTOM_RANGE;
|
|
120
120
|
text: string;
|
|
121
121
|
};
|
|
122
|
-
export
|
|
122
|
+
export type MetricTimeInfo = {
|
|
123
123
|
key: string;
|
|
124
124
|
label: TimePeriod;
|
|
125
125
|
text: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CHART_GROUPS } from "../constants/CHART_GROUP";
|
|
2
|
-
export
|
|
2
|
+
export type IChartGroupType = CHART_GROUPS;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SHELF_TYPE } from "../constants/SHELF_TYPE";
|
|
2
|
-
export
|
|
2
|
+
export type IChartShelfType = SHELF_TYPE;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TABLE_TYPE } from "../constants/TABLE_TYPE";
|
|
2
|
-
export
|
|
2
|
+
export type IChartTableType = TABLE_TYPE;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { STRING_FORMAT } from "../constants/STRING_FORMAT";
|
|
2
|
-
export
|
|
2
|
+
export type IFormatStringType = STRING_FORMAT;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { COLUMN_IMAGE_UPLOAD_OPTION } from "../constants/COLUMN_IMAGE_UPLOAD_OPTION";
|
|
2
|
-
export
|
|
2
|
+
export type IColumnImageUploadOption = COLUMN_IMAGE_UPLOAD_OPTION;
|
|
@@ -2,4 +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
|
-
export
|
|
5
|
+
export type IColumnPropertyType = COLUMN_PROPERTY | IComplexColumnPropertyType | ICompoundColumnPropertyType | IDateColumnPropertyType;
|
|
@@ -2,4 +2,4 @@ import { IComplexColumnType } from "./IComplexColumnType";
|
|
|
2
2
|
import { ICompoundColumnType } from "./ICompoundColumnType";
|
|
3
3
|
import { COLUMN } from "../constants/COLUMN";
|
|
4
4
|
import { INumericalColumnType } from "./INumericalColumnType";
|
|
5
|
-
export
|
|
5
|
+
export type IColumnType = COLUMN | ICompoundColumnType | IComplexColumnType | INumericalColumnType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { COMPLEX_COLUMN_PROPERTY } from "../constants/COMPLEX_COLUMN_PROPERTY";
|
|
2
|
-
export
|
|
2
|
+
export type IComplexColumnPropertyType = COMPLEX_COLUMN_PROPERTY;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { COMPLEX_COLUMN } from "../constants/COMPLEX_COLUMN";
|
|
2
|
-
export
|
|
2
|
+
export type IComplexColumnType = COMPLEX_COLUMN;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { COMPOUND_COLUMN_PROPERTY } from "../constants/COMPOUND_COLUMN_PROPERTY";
|
|
2
|
-
export
|
|
2
|
+
export type ICompoundColumnPropertyType = COMPOUND_COLUMN_PROPERTY;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { COMPOUND_COLUMN } from "../constants/COMPOUND_COLUMN";
|
|
2
|
-
export
|
|
2
|
+
export type ICompoundColumnType = COMPOUND_COLUMN;
|
|
@@ -2,4 +2,4 @@ import { DATE_GROUPING_TIME_PROPERTY } from "../../dates/constants/DATE_GROUPING
|
|
|
2
2
|
import { DATE_GROUPING_PROPERTY } from "../../dates/constants/DATE_GROUPING_PROPERTY";
|
|
3
3
|
import { DATE_DISTINCT_PROPERTY } from "../../dates/constants/DATE_DISTINCT_PROPERTY";
|
|
4
4
|
import { DATE_DISTINCT_TIME_PROPERTY } from "../../dates/constants/DATE_DISTINCT_TIME_PROPERTY";
|
|
5
|
-
export
|
|
5
|
+
export type IDateColumnPropertyType = DATE_GROUPING_PROPERTY | DATE_GROUPING_TIME_PROPERTY | DATE_DISTINCT_PROPERTY | DATE_DISTINCT_TIME_PROPERTY;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NUMERICAL_COLUMN } from "../constants/NUMERICAL_COLUMN";
|
|
2
|
-
export
|
|
2
|
+
export type INumericalColumnType = NUMERICAL_COLUMN;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ISOToNumericOffset = void 0;
|
|
4
|
+
const isNaNV2_1 = require("../../general/mix/isNaNV2");
|
|
5
|
+
const isValidISOOffset_1 = require("../helpers/isValidISOOffset");
|
|
6
|
+
/**
|
|
7
|
+
* Gets the numeric offset (minutes) from the ISO offset (string)
|
|
8
|
+
* @param {string} offset the timezone offset
|
|
9
|
+
* @returns {number} the offset in minutes
|
|
10
|
+
*/
|
|
11
|
+
function ISOToNumericOffset(offset) {
|
|
12
|
+
if (typeof offset === "number" || !(0, isNaNV2_1.isNaNV2)(offset))
|
|
13
|
+
return +offset;
|
|
14
|
+
if (!(0, isValidISOOffset_1.isValidISOOffset)(offset))
|
|
15
|
+
return 0;
|
|
16
|
+
const [hours, minutes] = offset.split(":").map(Number);
|
|
17
|
+
return hours * 60 + minutes;
|
|
18
|
+
}
|
|
19
|
+
exports.ISOToNumericOffset = ISOToNumericOffset;
|
|
@@ -5,8 +5,10 @@ export * from "./dateToQuarterYear";
|
|
|
5
5
|
export * from "./dateToWeekYear";
|
|
6
6
|
export * from "./dateToYear";
|
|
7
7
|
export * from "./hmsToDate";
|
|
8
|
+
export * from "./ISOToNumericOffset";
|
|
8
9
|
export * from "./mdyDateToDate";
|
|
9
10
|
export * from "./monthYearToDate";
|
|
11
|
+
export * from "./numericOffsetToISO";
|
|
10
12
|
export * from "./quarterYearToDate";
|
|
11
13
|
export * from "./weekYearToDate";
|
|
12
14
|
export * from "./yearToDate";
|
|
@@ -21,8 +21,10 @@ __exportStar(require("./dateToQuarterYear"), exports);
|
|
|
21
21
|
__exportStar(require("./dateToWeekYear"), exports);
|
|
22
22
|
__exportStar(require("./dateToYear"), exports);
|
|
23
23
|
__exportStar(require("./hmsToDate"), exports);
|
|
24
|
+
__exportStar(require("./ISOToNumericOffset"), exports);
|
|
24
25
|
__exportStar(require("./mdyDateToDate"), exports);
|
|
25
26
|
__exportStar(require("./monthYearToDate"), exports);
|
|
27
|
+
__exportStar(require("./numericOffsetToISO"), exports);
|
|
26
28
|
__exportStar(require("./quarterYearToDate"), exports);
|
|
27
29
|
__exportStar(require("./weekYearToDate"), exports);
|
|
28
30
|
__exportStar(require("./yearToDate"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.numericOffsetToISO = void 0;
|
|
4
|
+
const isNaNV2_1 = require("../../general/mix/isNaNV2");
|
|
5
|
+
const getSign_1 = require("../../general/numeric/getSign");
|
|
6
|
+
const padLeadingZeros_1 = require("../../general/string/padLeadingZeros");
|
|
7
|
+
const isValidISOOffset_1 = require("../helpers/isValidISOOffset");
|
|
8
|
+
/**
|
|
9
|
+
* Gets the ISO offset From the numeric offset (minutes)
|
|
10
|
+
* @param {number} offset the timezone offset
|
|
11
|
+
* @returns {string} the offset in minutes
|
|
12
|
+
*/
|
|
13
|
+
function numericOffsetToISO(offset) {
|
|
14
|
+
let newOffset = offset;
|
|
15
|
+
if (typeof offset === "string" && (0, isValidISOOffset_1.isValidISOOffset)(offset))
|
|
16
|
+
return String(newOffset);
|
|
17
|
+
if (typeof offset !== "number" && (0, isNaNV2_1.isNaNV2)(offset))
|
|
18
|
+
return "+00:00";
|
|
19
|
+
if (typeof offset === "string" && !(0, isNaNV2_1.isNaNV2)(offset))
|
|
20
|
+
newOffset = +offset;
|
|
21
|
+
const sign = (0, getSign_1.getSign)(newOffset);
|
|
22
|
+
newOffset = Math.abs(newOffset);
|
|
23
|
+
const hours = (0, padLeadingZeros_1.padLeadingZeros)(Math.floor(newOffset / 60), 2);
|
|
24
|
+
const minutes = (0, padLeadingZeros_1.padLeadingZeros)(newOffset % 60, 2);
|
|
25
|
+
return `${sign}${hours}:${minutes}`;
|
|
26
|
+
}
|
|
27
|
+
exports.numericOffsetToISO = numericOffsetToISO;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ISO_8601_REGEX: RegExp;
|
|
@@ -38,6 +38,7 @@ export * from "./DATE_YEAR_MONTHS_MMMM";
|
|
|
38
38
|
export * from "./DATE_YEAR_QUARTERS";
|
|
39
39
|
export * from "./DATE_YEAR_QUARTERS_RANGE";
|
|
40
40
|
export * from "./DATETIME_COLUMN_FORMAT";
|
|
41
|
+
export * from "./ISO_8601_REGEX";
|
|
41
42
|
export * from "./TIME_GROUPING_PROPERTY_INFO_LIST";
|
|
42
43
|
export * from "./TIME_GROUPING_PROPERTY_INFO";
|
|
43
44
|
export * from "./TIME_GROUPING_PROPERTY_LABEL";
|
|
@@ -54,6 +54,7 @@ __exportStar(require("./DATE_YEAR_MONTHS_MMMM"), exports);
|
|
|
54
54
|
__exportStar(require("./DATE_YEAR_QUARTERS"), exports);
|
|
55
55
|
__exportStar(require("./DATE_YEAR_QUARTERS_RANGE"), exports);
|
|
56
56
|
__exportStar(require("./DATETIME_COLUMN_FORMAT"), exports);
|
|
57
|
+
__exportStar(require("./ISO_8601_REGEX"), exports);
|
|
57
58
|
__exportStar(require("./TIME_GROUPING_PROPERTY_INFO_LIST"), exports);
|
|
58
59
|
__exportStar(require("./TIME_GROUPING_PROPERTY_INFO"), exports);
|
|
59
60
|
__exportStar(require("./TIME_GROUPING_PROPERTY_LABEL"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets a Date with the given offset of the Timezone.
|
|
3
|
+
* No given an offset the default is going to be set by the browser
|
|
4
|
+
* @param date String, object or millisencond number of the date
|
|
5
|
+
* @returns updated Date object
|
|
6
|
+
*/
|
|
7
|
+
export declare function getDateByTimezoneOffset(date: string | Date | number, offset?: number | string): Date;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDateByTimezoneOffset = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
5
|
+
const ISOToNumericOffset_1 = require("../adapters/ISOToNumericOffset");
|
|
6
|
+
const DATE_FORMAT_1 = require("../constants/DATE_FORMAT");
|
|
7
|
+
const isValidPotentialDate_1 = require("./isValidPotentialDate");
|
|
8
|
+
const validateDate_1 = require("./validateDate");
|
|
9
|
+
/**
|
|
10
|
+
* Gets a Date with the given offset of the Timezone.
|
|
11
|
+
* No given an offset the default is going to be set by the browser
|
|
12
|
+
* @param date String, object or millisencond number of the date
|
|
13
|
+
* @returns updated Date object
|
|
14
|
+
*/
|
|
15
|
+
function getDateByTimezoneOffset(date, offset) {
|
|
16
|
+
if (!(0, isValidPotentialDate_1.isValidPotentialDate)(date) ||
|
|
17
|
+
(typeof date === "string" && !(0, validateDate_1.validateDate)(date, DATE_FORMAT_1.DATE_FORMAT.DAY)))
|
|
18
|
+
return date;
|
|
19
|
+
const dt = new Date(date.valueOf());
|
|
20
|
+
const newOffset = (0, isEmpty_1.isEmpty)(offset) || offset === "browser"
|
|
21
|
+
? dt.getTimezoneOffset()
|
|
22
|
+
: (0, ISOToNumericOffset_1.ISOToNumericOffset)(offset);
|
|
23
|
+
return new Date(+dt + newOffset * 1000 * 60);
|
|
24
|
+
}
|
|
25
|
+
exports.getDateByTimezoneOffset = getDateByTimezoneOffset;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./adjustTimezone";
|
|
2
1
|
export * from "./areIncludedDateTokens";
|
|
3
2
|
export * from "./getDateByDateFormat";
|
|
4
3
|
export * from "./getDateFormatByProperty";
|
|
@@ -10,4 +9,5 @@ export * from "./getSeparatorByDateFormat";
|
|
|
10
9
|
export * from "./getWeek";
|
|
11
10
|
export * from "./isValidDateObject";
|
|
12
11
|
export * from "./isValidPotentialDate";
|
|
12
|
+
export * from "./getDateByTimezoneOffset";
|
|
13
13
|
export * from "./validateDate";
|
|
@@ -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("./adjustTimezone"), exports);
|
|
18
17
|
__exportStar(require("./areIncludedDateTokens"), exports);
|
|
19
18
|
__exportStar(require("./getDateByDateFormat"), exports);
|
|
20
19
|
__exportStar(require("./getDateFormatByProperty"), exports);
|
|
@@ -26,4 +25,5 @@ __exportStar(require("./getSeparatorByDateFormat"), exports);
|
|
|
26
25
|
__exportStar(require("./getWeek"), exports);
|
|
27
26
|
__exportStar(require("./isValidDateObject"), exports);
|
|
28
27
|
__exportStar(require("./isValidPotentialDate"), exports);
|
|
28
|
+
__exportStar(require("./getDateByTimezoneOffset"), exports);
|
|
29
29
|
__exportStar(require("./validateDate"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validate if offset uses a valid ISO 8601 offset specification
|
|
3
|
+
* - If the given offset is a numeric, returns an invalid flag.
|
|
4
|
+
* @param {string} offset the timezone offset
|
|
5
|
+
* @returns {boolean} true if the given offset is valid
|
|
6
|
+
*/
|
|
7
|
+
export declare function isValidISOOffset(offset: number | string): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isValidISOOffset = void 0;
|
|
4
|
+
const ISO_8601_REGEX_1 = require("../constants/ISO_8601_REGEX");
|
|
5
|
+
/**
|
|
6
|
+
* Validate if offset uses a valid ISO 8601 offset specification
|
|
7
|
+
* - If the given offset is a numeric, returns an invalid flag.
|
|
8
|
+
* @param {string} offset the timezone offset
|
|
9
|
+
* @returns {boolean} true if the given offset is valid
|
|
10
|
+
*/
|
|
11
|
+
function isValidISOOffset(offset) {
|
|
12
|
+
if (typeof offset !== "string")
|
|
13
|
+
return false;
|
|
14
|
+
const newOffset = (offset || "").trim();
|
|
15
|
+
return ISO_8601_REGEX_1.ISO_8601_REGEX.test(newOffset);
|
|
16
|
+
}
|
|
17
|
+
exports.isValidISOOffset = isValidISOOffset;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IDTimezoneOffset = number | string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DATE_FORMAT } from "../constants/DATE_FORMAT";
|
|
2
|
-
export
|
|
2
|
+
export type IDateFormat = (typeof DATE_FORMAT)[keyof typeof DATE_FORMAT];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DATE_GROUPING_PROPERTY } from "../constants/DATE_GROUPING_PROPERTY";
|
|
2
2
|
import { DATE_GROUPING_TIME_PROPERTY } from "../constants/DATE_GROUPING_TIME_PROPERTY";
|
|
3
|
-
export
|
|
3
|
+
export type IDateGroupingProperty = DATE_GROUPING_PROPERTY | DATE_GROUPING_TIME_PROPERTY;
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./IDateFormat"), exports);
|
|
18
18
|
__exportStar(require("./IDateGroupingProperty"), exports);
|
|
19
19
|
__exportStar(require("./IDFDateToHmsSettings"), exports);
|
|
20
|
+
__exportStar(require("./IDTimezoneOffset"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dayjs } from "./dayjs-module";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type ParserDate = string | Dayjs | Date;
|
|
3
|
+
type ParserDateReturnType = Dayjs | null;
|
|
4
4
|
/**
|
|
5
5
|
* Parses a string date and returns a dayjs date
|
|
6
6
|
* @param {string|Dayjs|Date} date
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DATE_GROUPING_TIME_PROPERTY } from "../../constants/DATE_GROUPING_TIME_PROPERTY";
|
|
2
2
|
import { DATE_GROUPING_PROPERTY } from "../../constants/DATE_GROUPING_PROPERTY";
|
|
3
|
-
export
|
|
3
|
+
export type IRelativeUnit = keyof typeof DATE_GROUPING_PROPERTY | keyof typeof DATE_GROUPING_TIME_PROPERTY;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RELATIVE_CURSOR } from "../constants/RELATIVE_CURSOR";
|
|
2
|
-
export
|
|
2
|
+
export type RelativeCursor = RELATIVE_CURSOR;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RelativeStatement } from "./RelativeStatement";
|
|
2
|
-
export
|
|
2
|
+
export type RelativeInput = RelativeStatement | string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RELATIVE_MODE } from "../../constants/ui/RELATIVE_MODE";
|
|
2
|
-
export
|
|
2
|
+
export type IRelativeSectionMode = RELATIVE_MODE;
|
|
@@ -14,7 +14,7 @@ function getFilterBuilderGeneralConfig(config = {}) {
|
|
|
14
14
|
domain: config.domain,
|
|
15
15
|
i18n: config.i18n,
|
|
16
16
|
qv_token: config.qv_token,
|
|
17
|
-
|
|
17
|
+
timezoneOffset: (0, getAttribute_1.getAttribute)(config, "timezone_offset") || config.timezoneOffset,
|
|
18
18
|
userid: (0, getAttribute_1.getAttribute)(config, "user_id") || config.userid,
|
|
19
19
|
};
|
|
20
20
|
}
|
|
@@ -39,13 +39,13 @@ function excludeFiltersByParams(filterData, params) {
|
|
|
39
39
|
return value
|
|
40
40
|
.map((rValue) => {
|
|
41
41
|
if (params.enableds == null ||
|
|
42
|
-
params.enableds === rValue.enabled)
|
|
42
|
+
params.enableds.values === rValue.enabled)
|
|
43
43
|
return rValue;
|
|
44
44
|
})
|
|
45
45
|
.filter(Boolean);
|
|
46
46
|
}
|
|
47
47
|
if (params.enableds == null ||
|
|
48
|
-
params.enableds ===
|
|
48
|
+
params.enableds.values ===
|
|
49
49
|
value.enabled)
|
|
50
50
|
return value;
|
|
51
51
|
})
|
|
@@ -67,19 +67,19 @@ function excludeFiltersByParams(filterData, params) {
|
|
|
67
67
|
}
|
|
68
68
|
exports.excludeFiltersByParams = excludeFiltersByParams;
|
|
69
69
|
function resolveScopeConditions(scope, params) {
|
|
70
|
-
return ((params.enableds == null || params.enableds !== scope.enabled) &&
|
|
70
|
+
return ((params.enableds == null || params.enableds.scopes !== scope.enabled) &&
|
|
71
71
|
((0, isEmpty_1.isEmpty)(params.scope) || scope.scope !== params.scope) &&
|
|
72
72
|
((0, isEmpty_1.isEmpty)(params.scopeid) || scope.scopeid !== params.scopeid) &&
|
|
73
73
|
scope.datasets.length > 0);
|
|
74
74
|
}
|
|
75
75
|
function resolveDatasetConditions(dataset, params) {
|
|
76
|
-
return ((params.enableds == null || params.enableds !== dataset.enabled) &&
|
|
76
|
+
return ((params.enableds == null || params.enableds.datasets !== dataset.enabled) &&
|
|
77
77
|
((0, isEmpty_1.isEmpty)(params.qrveyid) || params.qrveyid !== dataset.qrveyid) &&
|
|
78
78
|
dataset.filters.length > 0);
|
|
79
79
|
}
|
|
80
80
|
function resolveFilterConditions(filter, params) {
|
|
81
81
|
var _a, _b, _c, _d;
|
|
82
|
-
return ((params.enableds == null || params.enableds !== filter.enabled) &&
|
|
82
|
+
return ((params.enableds == null || params.enableds.filters !== filter.enabled) &&
|
|
83
83
|
((0, isEmpty_1.isEmpty)(params.dateSection) ||
|
|
84
84
|
params.dateSection !== filter.dateSection) &&
|
|
85
85
|
((0, isEmpty_1.isEmpty)(params.panelid) || params.panelid !== filter.extras.panelid) &&
|
|
@@ -44,3 +44,4 @@ __exportStar(require("./mergeValues"), exports);
|
|
|
44
44
|
__exportStar(require("./resolveDatasetConditions"), exports);
|
|
45
45
|
__exportStar(require("./resolveFilterConditions"), exports);
|
|
46
46
|
__exportStar(require("./resolveScopeConditions"), exports);
|
|
47
|
+
__exportStar(require("./setTimezoneToFilters"), exports);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IDTimezoneOffset } from "../../../dates/interfaces/IDTimezoneOffset";
|
|
2
|
+
import { IFSData } from "../../interfaces/common/IFSData";
|
|
3
|
+
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
4
|
+
export declare function setTimezoneToFilters(filterData: IFSData, timezoneOffset: IDTimezoneOffset): IFUData | IFSData;
|