@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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setTimezoneToFilters = void 0;
|
|
4
|
+
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
|
+
const transformFilterValues_1 = require("../ui/transformFilterValues");
|
|
6
|
+
function setTimezoneToFilters(filterData, timezoneOffset) {
|
|
7
|
+
if ((0, isEmpty_1.isEmpty)(filterData) ||
|
|
8
|
+
(0, isEmpty_1.isEmpty)(filterData.scopes) ||
|
|
9
|
+
!Array.isArray(filterData.scopes))
|
|
10
|
+
return filterData;
|
|
11
|
+
return Object.assign(Object.assign({}, filterData), { scopes: filterData.scopes.map((scope) => (Object.assign(Object.assign({}, scope), { datasets: scope.datasets.map((dataset) => (Object.assign(Object.assign({}, dataset), { filters: dataset.filters.map((filter) => (Object.assign(Object.assign({}, filter), { values: (0, transformFilterValues_1.transformFilterValues)(filter, {
|
|
12
|
+
timezoneOffset,
|
|
13
|
+
translate: undefined,
|
|
14
|
+
i18n: undefined,
|
|
15
|
+
}) }))) }))) }))) });
|
|
16
|
+
}
|
|
17
|
+
exports.setTimezoneToFilters = setTimezoneToFilters;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IDateGroupingProperty } from "../../dates/interfaces/IDateGroupingProperty";
|
|
2
|
-
export
|
|
2
|
+
export type IFDateProperty = IDateGroupingProperty;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_DATE_SECTION } from "../constants/common/FILTER_DATE_SECTION";
|
|
2
|
-
export
|
|
2
|
+
export type IFDateSection = FILTER_DATE_SECTION;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_OPERATOR } from "../constants/common/FILTER_OPERATOR";
|
|
2
|
-
export
|
|
2
|
+
export type IFOperator = FILTER_OPERATOR;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyType";
|
|
2
|
-
export
|
|
2
|
+
export type IFProperty = IColumnPropertyType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_SCOPE } from "../constants/common/FILTER_SCOPE";
|
|
2
|
-
export
|
|
2
|
+
export type IFScope = FILTER_SCOPE;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_SECTION } from "../constants/common/FILTER_SECTION";
|
|
2
|
-
export
|
|
2
|
+
export type IFSection = FILTER_SECTION;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_STRUCTURE_TYPE } from "../constants/common/FILTER_STRUCTURE_TYPE";
|
|
2
|
-
export
|
|
2
|
+
export type IFStructureType = FILTER_STRUCTURE_TYPE;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_VALIDATOR } from "../constants/common/FILTER_VALIDATOR";
|
|
2
|
-
export
|
|
2
|
+
export type IFValidator = FILTER_VALIDATOR;
|
|
@@ -2,4 +2,4 @@ import { IFSValue } from "./common/IFSValue";
|
|
|
2
2
|
import { IFSValueRange } from "./common/IFSValueRange";
|
|
3
3
|
import { IFSValueRanking } from "./common/IFSValueRanking";
|
|
4
4
|
import { IFSValueRelativeDate } from "./common/IFSValueRelativeDate";
|
|
5
|
-
export
|
|
5
|
+
export type IFValue = IFSValue | IFSValueRange | IFSValueRelativeDate | IFSValueRanking[];
|
|
@@ -19,14 +19,14 @@ export interface OLD_IFilterExpression {
|
|
|
19
19
|
value?: IFBackendExpressionValue[];
|
|
20
20
|
uiExtras?: OLD_IFilterDetail;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type IFilterExpressionValue = IFilterNumericExpressionValue | IFilterStringExpressionValue | IFilterRankingExpressionValue | IFBResultRelativeDate[];
|
|
23
23
|
interface IFilterNumericExpressionValue {
|
|
24
24
|
gt?: string;
|
|
25
25
|
gte?: string;
|
|
26
26
|
lt?: string;
|
|
27
27
|
lte?: string;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
type IFilterStringExpressionValue = string;
|
|
30
30
|
interface IFilterRankingExpressionValue {
|
|
31
31
|
position: number;
|
|
32
32
|
value: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IFSValueRelativeDate } from "../common/IFSValueRelativeDate";
|
|
2
|
-
export
|
|
2
|
+
export type IFBExpressionRelativeDate = IFSValueRelativeDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type IFBExpressionValue = string;
|
|
@@ -2,4 +2,4 @@ import { IFBExpressionRelativeDate } from "./IFBExpressionRelativeDate";
|
|
|
2
2
|
import { IFBExpressionValue } from "./IFBExpressionValue";
|
|
3
3
|
import { IFBExpressionValueRange } from "./IFBExpressionValueRange";
|
|
4
4
|
import { IFBExpressionValueRanking } from "./IFBExpressionValueRanking";
|
|
5
|
-
export
|
|
5
|
+
export type IFBackendExpressionValue = IFBExpressionValue | IFBExpressionValueRange | IFBExpressionRelativeDate | IFBExpressionValueRanking;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_BACKEND_VALIDATOR } from "../../constants/backend/FILTER_BACKEND_VALIDATOR";
|
|
2
|
-
export
|
|
2
|
+
export type IFBackendValidator = FILTER_BACKEND_VALIDATOR;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IColumn } from "../../../columns/interfaces/IColumn";
|
|
2
|
-
export
|
|
2
|
+
export type IFSColumn = Omit<IColumn, "expressionCategory" | "expressionNegative" | "expressionPositive" | "expressionWords" | "label" | "lookupValue" | "slidebarValue">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IFFiltersGetData } from "../functions/IFFiltersGetData";
|
|
2
|
-
export
|
|
2
|
+
export type IFSGetDataValues = IFFiltersGetData;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IWidgetConfig } from "../../../interfaces/general/IWidgetConfig";
|
|
2
|
-
export
|
|
2
|
+
export type IFilterConfig = IWidgetConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_PANEL_ACTION } from "../../constants/panel/FILTER_PANEL_ACTION";
|
|
2
|
-
export
|
|
2
|
+
export type IFPAction = FILTER_PANEL_ACTION;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FILTER_PANEL_VIEW } from "../../constants/panel/FILTER_PANEL_VIEW";
|
|
2
|
-
export
|
|
2
|
+
export type IFPSettingsPanelView = FILTER_PANEL_VIEW;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { IDTimezoneOffset } from "../../../dates/interfaces/IDTimezoneOffset";
|
|
1
2
|
import { II18nConfig } from "../../../globalization/interfaces/II18nConfig";
|
|
2
3
|
import { II18nServiceTranslate } from "../../../globalization/interfaces/II18nServiceTranslate";
|
|
3
4
|
export interface IFUTransformFilterValuesSettings {
|
|
5
|
+
timezoneOffset: IDTimezoneOffset;
|
|
4
6
|
translate: II18nServiceTranslate;
|
|
5
7
|
i18n: II18nConfig;
|
|
6
8
|
suffixTranslateLabel?: string;
|
|
@@ -103,7 +103,7 @@ class FiltersApi {
|
|
|
103
103
|
else {
|
|
104
104
|
api = this.chartPaginationApi;
|
|
105
105
|
}
|
|
106
|
-
return api.getChartResult(this.config, FiltersApi.getFilter(config), FiltersApi.getLogic(config), FiltersApi.getChartRequest(config), resetApi);
|
|
106
|
+
return api.getChartResult(Object.assign(Object.assign({}, this.config), { timezoneOffset: 0 }), FiltersApi.getFilter(config), FiltersApi.getLogic(config), FiltersApi.getChartRequest(config), resetApi);
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
static getLogic(config) {
|
|
@@ -104,7 +104,8 @@ class DurationFormatter {
|
|
|
104
104
|
*/
|
|
105
105
|
parseFormatTemplate(template) {
|
|
106
106
|
this.template = (0, isEmpty_1.isEmpty)(template) ? "" : template;
|
|
107
|
-
|
|
107
|
+
const templateParts = this.template.match(definition_1.PARTS_REGEX) || [];
|
|
108
|
+
return templateParts
|
|
108
109
|
.reduce((store, part) => {
|
|
109
110
|
const config = definition_1.DURATION_PARTS[part[0]];
|
|
110
111
|
if (config)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FORMULA } from "../constants/FORMULA";
|
|
2
|
-
export
|
|
2
|
+
export type IFormulaType = FORMULA;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @returns the new array created.
|
|
15
15
|
*/
|
|
16
16
|
export declare function addPropertyToArrayOfObjects(obj: AddPropertyToArrayOfObjectsParams): any[];
|
|
17
|
-
|
|
17
|
+
type AddPropertyToArrayOfObjectsParams = {
|
|
18
18
|
array: any[];
|
|
19
19
|
property: string;
|
|
20
20
|
value: any;
|
|
@@ -17,5 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./array/index"), exports);
|
|
18
18
|
__exportStar(require("./function/index"), exports);
|
|
19
19
|
__exportStar(require("./mix/index"), exports);
|
|
20
|
+
__exportStar(require("./numeric/index"), exports);
|
|
20
21
|
__exportStar(require("./object/index"), exports);
|
|
21
22
|
__exportStar(require("./string/index"), exports);
|
|
@@ -49,5 +49,5 @@ export interface IScriptItem {
|
|
|
49
49
|
noModule?: boolean;
|
|
50
50
|
type?: string;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
53
|
-
export
|
|
52
|
+
export type TScriptItem = string | IScriptItem;
|
|
53
|
+
export type TScriptType = "text/javascript" | "module" | string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSign = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Gets the numeric sign of a given number
|
|
6
|
+
* @param {number} num the number
|
|
7
|
+
* @returns {string} an string with the sign
|
|
8
|
+
*/
|
|
9
|
+
function getSign(num) {
|
|
10
|
+
return Math.sign(num) > -1 ? "+" : "-";
|
|
11
|
+
}
|
|
12
|
+
exports.getSign = getSign;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./getSign";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./getSign"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
|
|
2
|
+
type FormatOptions = "small_multiples" | "conditional_formatting";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_FORMAT_OPTIONS: Pick<II18nChartBuilder, FormatOptions>;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
|
|
2
|
+
type General = "nav_panel" | "save_dialog" | "save_incomplete_dialog" | "leave_dialog" | "custom_format_dialog" | "data_panel" | "dimensions" | "shelf_menu" | "scale_types" | "trend_chart" | "chart_info" | "dnd_zone" | "chart_labels" | "action_panel" | "messages_general" | "messages_default" | "messages_crosstab" | "messages_table_chart" | "messages_missing_default" | "messages_ms" | "messages_pie" | "messages_min_max" | "messages_metric" | "messages_heatmap" | "messages_geo" | "messages_geo_bubble" | "messages_box_whiskers" | "messages_combined";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_GENERAL: Pick<II18nChartBuilder, General>;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
|
|
2
|
+
type GeneralOptions = "aggregated_formula" | "general_options" | "totals" | "legends" | "menu_actions" | "sorting" | "table_calculations" | "tooltip_settings";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_GENERAL_OPTIONS: Pick<II18nChartBuilder, GeneralOptions>;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
|
|
2
|
+
type LayerOptions = "trends_line" | "references_line";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_LAYER_OPTIONS: Pick<II18nChartBuilder, LayerOptions>;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
|
|
2
|
+
type StyleOptions = "style_options" | "color_settings" | "color_by_values" | "chart_orientation" | "axis_style" | "bar_types" | "line_style_options" | "symbol_style_options" | "chart_mode" | "category_labels" | "font_options" | "circle_size" | "gauge_style" | "target_config" | "table_header" | "table_body" | "resize_rows" | "custom_scale" | "gaps_options" | "base_map" | "map_region" | "table_style_options";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_STYLE_OPTIONS: Pick<II18nChartBuilder, StyleOptions>;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { II18nChartBuilder } from "../../interfaces/chart_builder/II18nChartBuilder";
|
|
2
|
-
|
|
2
|
+
type TimePeriod = "time_period" | "time_period_custom_range";
|
|
3
3
|
export declare const I18N_CHART_BUILDER_TIME_PERIOD: Pick<II18nChartBuilder, TimePeriod>;
|
|
4
4
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CHART_TYPE } from "../constants/Charts.Const";
|
|
2
|
-
export
|
|
2
|
+
export type ChartType = CHART_TYPE;
|
|
@@ -26,7 +26,7 @@ export declare enum TIME_PERIOD {
|
|
|
26
26
|
ALL_HISTORY = "ALL_HISTORY",
|
|
27
27
|
CUSTOM_RANGE = "CUSTOM_RANGE"
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type TimePeriod = TIME_PERIOD;
|
|
30
30
|
export declare enum TP_CUSTOM_RANGE {
|
|
31
31
|
BEFORE = "BEFORE",
|
|
32
32
|
AFTER = "AFTER",
|
|
@@ -7,5 +7,5 @@ export interface IColumnCalculation {
|
|
|
7
7
|
type: string;
|
|
8
8
|
value: IColumnCalculationLabel;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type IColumnCalculationLabel = CALCULATION_LABEL;
|
|
11
|
+
export type IColumnCalculationAbbreviation = CALCULATION_ABBREVIATION;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IDTimezoneOffset } from "../../dates/interfaces/IDTimezoneOffset";
|
|
1
2
|
import { II18nConfig } from "../../globalization/interfaces/II18nConfig";
|
|
2
3
|
export interface IWidgetConfig {
|
|
3
4
|
appid?: string;
|
|
@@ -5,6 +6,6 @@ export interface IWidgetConfig {
|
|
|
5
6
|
domain: string;
|
|
6
7
|
i18n?: II18nConfig;
|
|
7
8
|
qv_token?: string;
|
|
8
|
-
|
|
9
|
+
timezoneOffset?: IDTimezoneOffset;
|
|
9
10
|
userid?: string;
|
|
10
11
|
}
|
|
@@ -6,6 +6,10 @@ const isDateColumn_1 = require("../../columns/helpers/isDateColumn");
|
|
|
6
6
|
const isNumericalColumn_1 = require("../../columns/helpers/isNumericalColumn");
|
|
7
7
|
const DATE_GROUPING_PROPERTY_1 = require("../../dates/constants/DATE_GROUPING_PROPERTY");
|
|
8
8
|
const DATE_GROUPING_TIME_PROPERTY_1 = require("../../dates/constants/DATE_GROUPING_TIME_PROPERTY");
|
|
9
|
+
const getDateByDateFormat_1 = require("../../dates/helpers/getDateByDateFormat");
|
|
10
|
+
const getDateFormatByProperty_1 = require("../../dates/helpers/getDateFormatByProperty");
|
|
11
|
+
const getFormattedDateByFormat_1 = require("../../dates/helpers/getFormattedDateByFormat");
|
|
12
|
+
const getDateByTimezoneOffset_1 = require("../../dates/helpers/getDateByTimezoneOffset");
|
|
9
13
|
const format_1 = require("../../format/format");
|
|
10
14
|
const isEmpty_1 = require("../../general/mix/isEmpty");
|
|
11
15
|
const getI18nDateGroupLabel_1 = require("../../globalization/helpers/getI18nDateGroupLabel");
|
|
@@ -19,7 +23,8 @@ const getValueWithSuffixes_1 = require("./getValueWithSuffixes");
|
|
|
19
23
|
function transformValue(value, settings) {
|
|
20
24
|
if ((0, isEmpty_1.isEmpty)(value))
|
|
21
25
|
return value;
|
|
22
|
-
const
|
|
26
|
+
const timezonedValue = getTimezoneValue(value, settings);
|
|
27
|
+
const valueWithI18n = (0, getI18nDateGroupLabel_1.getI18nDateGroupLabel)(timezonedValue, settings.property, settings.translate);
|
|
23
28
|
const valueWithLocalization = (0, format_1.addFormat)(valueWithI18n, getOutputFormat(settings), getFormatConfig(settings));
|
|
24
29
|
return (0, getValueWithSuffixes_1.getValueWithSuffixes)(valueWithLocalization, {
|
|
25
30
|
suffixTranslateLabel: settings.suffixTranslateLabel,
|
|
@@ -27,6 +32,24 @@ function transformValue(value, settings) {
|
|
|
27
32
|
});
|
|
28
33
|
}
|
|
29
34
|
exports.transformValue = transformValue;
|
|
35
|
+
/**
|
|
36
|
+
* Gets a date value in the given timezone
|
|
37
|
+
* @param {string} value the date
|
|
38
|
+
* @param {ITransformValueSettings} settings The settings of the transformValue function
|
|
39
|
+
* @returns {string} A transformed value
|
|
40
|
+
*/
|
|
41
|
+
function getTimezoneValue(value, settings) {
|
|
42
|
+
const isDateTime = [
|
|
43
|
+
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.HOUR,
|
|
44
|
+
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.MINUTE,
|
|
45
|
+
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.SECOND,
|
|
46
|
+
].includes(settings.property);
|
|
47
|
+
if (isDateTime) {
|
|
48
|
+
const dateFormat = (0, getDateFormatByProperty_1.getDateFormatByProperty)(settings.property);
|
|
49
|
+
return (0, getFormattedDateByFormat_1.getFormattedDateByFormat)((0, getDateByTimezoneOffset_1.getDateByTimezoneOffset)((0, getDateByDateFormat_1.getDateByDateFormat)(value, dateFormat), settings === null || settings === void 0 ? void 0 : settings.timezoneOffset), dateFormat);
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
30
53
|
/**
|
|
31
54
|
* Gets the outputformat settings
|
|
32
55
|
* @param settings The settings of the transformValue function
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { APP_STATUS } from "../constants/APP_STATUS";
|
|
2
|
-
export
|
|
2
|
+
export type IAppStatus = APP_STATUS;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { APP_TYPE } from "../constants/APP_TYPE";
|
|
2
|
-
export
|
|
2
|
+
export type IAppType = APP_TYPE;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IBColumn } from "../../columns/interfaces/IBColumn";
|
|
2
|
+
import { IBTimezone } from "./IBTimezone";
|
|
2
3
|
/**
|
|
3
4
|
* Structure for Dataset in the frontend side of Qrvey App
|
|
4
5
|
*/
|
|
@@ -7,4 +8,5 @@ export interface IBDataset {
|
|
|
7
8
|
name?: string;
|
|
8
9
|
options?: IBColumn[];
|
|
9
10
|
qrveyid: string;
|
|
11
|
+
timezone?: IBTimezone;
|
|
10
12
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CALCULATION } from "../constants/CALCULATION";
|
|
2
|
-
export
|
|
2
|
+
export type ICalculation = CALCULATION;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CALCULATION } from "../constants/CALCULATION";
|
|
2
|
-
export
|
|
2
|
+
export type IColumnCalculationType = (typeof CALCULATION)[keyof typeof CALCULATION];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
2
|
+
import { IDTimezoneOffset } from "../../dates/interfaces/IDTimezoneOffset";
|
|
2
3
|
import { IBDataset } from "./IBDataset";
|
|
3
4
|
/**
|
|
4
5
|
* Structure for Dataset in the frontend side of Qrvey App
|
|
5
6
|
*/
|
|
6
|
-
export interface IDataset extends Omit<IBDataset, "name" | "options"> {
|
|
7
|
+
export interface IDataset extends Omit<IBDataset, "name" | "options" | "timezone"> {
|
|
7
8
|
label?: string;
|
|
8
9
|
options?: IColumn[];
|
|
10
|
+
timezone?: IDTimezoneOffset;
|
|
9
11
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { IColumn } from "../../columns/interfaces/IColumn";
|
|
2
2
|
import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyType";
|
|
3
|
+
import { IDTimezoneOffset } from "../../dates/interfaces/IDTimezoneOffset";
|
|
3
4
|
import { II18nConfig } from "../../globalization/interfaces/II18nConfig";
|
|
4
5
|
import { II18nServiceTranslate } from "../../globalization/interfaces/II18nServiceTranslate";
|
|
5
6
|
export interface ITransformValueSettings {
|
|
6
7
|
column: IColumn;
|
|
7
8
|
property: IColumnPropertyType;
|
|
9
|
+
timezoneOffset: IDTimezoneOffset;
|
|
8
10
|
translate: II18nServiceTranslate;
|
|
9
11
|
i18n: II18nConfig;
|
|
10
12
|
suffixTranslateLabel?: string;
|
|
@@ -4,6 +4,7 @@ export * from "./IBDataset";
|
|
|
4
4
|
export * from "./IBModel";
|
|
5
5
|
export * from "./IBModelBranchesMapBranch";
|
|
6
6
|
export * from "./IBModelData";
|
|
7
|
+
export * from "./IBTimezone";
|
|
7
8
|
export * from "./ICalculation";
|
|
8
9
|
export * from "./ICalculationInfo";
|
|
9
10
|
export * from "./ICalculationType";
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./IBDataset"), exports);
|
|
|
20
20
|
__exportStar(require("./IBModel"), exports);
|
|
21
21
|
__exportStar(require("./IBModelBranchesMapBranch"), exports);
|
|
22
22
|
__exportStar(require("./IBModelData"), exports);
|
|
23
|
+
__exportStar(require("./IBTimezone"), exports);
|
|
23
24
|
__exportStar(require("./ICalculation"), exports);
|
|
24
25
|
__exportStar(require("./ICalculationInfo"), exports);
|
|
25
26
|
__exportStar(require("./ICalculationType"), exports);
|
|
@@ -4,10 +4,14 @@ exports.BDatasetsToUIDatasets = void 0;
|
|
|
4
4
|
const getAttribute_1 = require("../../general/object/getAttribute");
|
|
5
5
|
const BColumnsToUIColumns_adapter_1 = require("./BColumnsToUIColumns.adapter");
|
|
6
6
|
function BDatasetsToUIDatasets(datasets = []) {
|
|
7
|
-
return datasets.map((dataset) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
return datasets.map((dataset) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
return ({
|
|
10
|
+
qrveyid: (0, getAttribute_1.getAttribute)(dataset, "qrvey_id"),
|
|
11
|
+
label: dataset.name,
|
|
12
|
+
options: (0, BColumnsToUIColumns_adapter_1.BColumnsToUIColumns)(dataset.options, dataset),
|
|
13
|
+
timezone: ((_a = dataset.timezone) === null || _a === void 0 ? void 0 : _a.offset) || ((_b = dataset.timezone) === null || _b === void 0 ? void 0 : _b.numericOffset),
|
|
14
|
+
});
|
|
15
|
+
});
|
|
12
16
|
}
|
|
13
17
|
exports.BDatasetsToUIDatasets = BDatasetsToUIDatasets;
|
|
@@ -2,7 +2,7 @@ export default class Request {
|
|
|
2
2
|
static checkStatus(response: any): Promise<any>;
|
|
3
3
|
static hasQvToken(config: any): boolean;
|
|
4
4
|
static getQvToken(config: any): any;
|
|
5
|
-
static
|
|
5
|
+
static getTimezoneOffset(config: any): string;
|
|
6
6
|
static hasApiKey(config: any): boolean;
|
|
7
7
|
static getApiKey(config: any): any;
|
|
8
8
|
static makeUrl(config: any, url: any, params?: any): string;
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const numericOffsetToISO_1 = require("../../dates/adapters/numericOffsetToISO");
|
|
12
13
|
const getAttribute_1 = require("../../general/object/getAttribute");
|
|
13
14
|
const serialize_1 = require("../../general/object/serialize");
|
|
14
15
|
const parseUrl_1 = require("../../general/string/parseUrl");
|
|
@@ -26,8 +27,8 @@ class Request {
|
|
|
26
27
|
static getQvToken(config) {
|
|
27
28
|
return (0, getAttribute_1.getAttribute)(config, "qv_token");
|
|
28
29
|
}
|
|
29
|
-
static
|
|
30
|
-
return (0, getAttribute_1.getAttribute)(config, "
|
|
30
|
+
static getTimezoneOffset(config) {
|
|
31
|
+
return (0, numericOffsetToISO_1.numericOffsetToISO)((0, getAttribute_1.getAttribute)(config, "timezone_offset"));
|
|
31
32
|
}
|
|
32
33
|
static hasApiKey(config) {
|
|
33
34
|
return !!this.getApiKey(config);
|
|
@@ -70,9 +71,9 @@ class Request {
|
|
|
70
71
|
cfg.credentials = "include";
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
-
if (
|
|
75
|
-
cfg.headers["q-timezone-control"] = `offset=${
|
|
74
|
+
const timezoneOffset = this.getTimezoneOffset(reqData.config);
|
|
75
|
+
if (timezoneOffset) {
|
|
76
|
+
cfg.headers["q-timezone-control"] = `offset=${timezoneOffset}`;
|
|
76
77
|
}
|
|
77
78
|
// AbortSignal (https://developers.google.com/web/updates/2017/09/abortable-fetch)
|
|
78
79
|
if (reqData.config && reqData.config.signal) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ValueOf<T> = T[keyof T];
|
|
@@ -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;
|