@qrvey/utils 1.10.0-timezone-1 → 1.10.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/README.md +1618 -952
- package/dist/cjs/columns/constants/COLUMN_PROPERTIES.d.ts +1 -1
- package/dist/cjs/columns/constants/COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COMPOUND_COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/cjs/columns/constants/COMPOUND_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/cjs/columns/helpers/isNumericalColumn.js +3 -1
- package/dist/cjs/dates/adapters/ISOToNumericOffset.js +6 -1
- package/dist/cjs/dates/adapters/dateToHms.js +5 -7
- package/dist/cjs/dates/adapters/dateToMdyDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/dateToMdyDate.js +9 -3
- package/dist/cjs/dates/adapters/dateToMonthYear.d.ts +2 -1
- package/dist/cjs/dates/adapters/dateToMonthYear.js +6 -2
- package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +2 -1
- package/dist/cjs/dates/adapters/dateToQuarterYear.js +6 -2
- package/dist/cjs/dates/adapters/dateToWeekYear.d.ts +2 -1
- package/dist/cjs/dates/adapters/dateToWeekYear.js +6 -2
- package/dist/cjs/dates/adapters/dateToYear.d.ts +2 -1
- package/dist/cjs/dates/adapters/dateToYear.js +6 -2
- package/dist/cjs/dates/adapters/hmsToDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/hmsToDate.js +6 -2
- package/dist/cjs/dates/adapters/mdyDateToDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/mdyDateToDate.js +7 -2
- package/dist/cjs/dates/adapters/monthYearToDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/monthYearToDate.js +6 -2
- package/dist/cjs/dates/adapters/numericOffsetToISO.d.ts +1 -1
- package/dist/cjs/dates/adapters/numericOffsetToISO.js +15 -8
- package/dist/cjs/dates/adapters/quarterYearToDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/quarterYearToDate.js +6 -2
- package/dist/cjs/dates/adapters/weekYearToDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/weekYearToDate.js +6 -2
- package/dist/cjs/dates/adapters/yearToDate.d.ts +2 -1
- package/dist/cjs/dates/adapters/yearToDate.js +6 -2
- package/dist/cjs/dates/constants/TIMEZONE_TYPE.d.ts +5 -0
- package/dist/cjs/dates/constants/TIMEZONE_TYPE.js +9 -0
- package/dist/cjs/dates/helpers/getDateByDateFormat.d.ts +2 -1
- package/dist/cjs/dates/helpers/getDateByDateFormat.js +6 -6
- package/dist/cjs/dates/helpers/getDateByTimezone.d.ts +3 -3
- package/dist/cjs/dates/helpers/getDateByTimezone.js +12 -27
- package/dist/cjs/dates/helpers/getDateByTimezoneOffset.d.ts +1 -1
- package/dist/cjs/dates/helpers/getDateByTimezoneOffset.js +14 -6
- package/dist/cjs/dates/helpers/getDefaultDateSettings.d.ts +7 -0
- package/dist/cjs/dates/helpers/getDefaultDateSettings.js +17 -0
- package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +2 -1
- package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +7 -7
- package/dist/cjs/dates/helpers/getTimezoneObject.d.ts +8 -1
- package/dist/cjs/dates/helpers/getTimezoneObject.js +98 -14
- package/dist/cjs/dates/helpers/getTimezoneOffsetByType.d.ts +13 -0
- package/dist/cjs/dates/helpers/getTimezoneOffsetByType.js +27 -0
- package/dist/cjs/dates/helpers/getUTCFormatByOffset.d.ts +7 -0
- package/dist/cjs/dates/helpers/getUTCFormatByOffset.js +19 -0
- package/dist/cjs/dates/helpers/index.d.ts +4 -1
- package/dist/cjs/dates/helpers/index.js +4 -1
- package/dist/cjs/dates/helpers/isValidPotentialDate.d.ts +1 -0
- package/dist/cjs/dates/helpers/isValidPotentialDate.js +14 -5
- package/dist/cjs/dates/interfaces/IBTimezone.d.ts +7 -0
- package/dist/cjs/dates/interfaces/IBTimezoneType.d.ts +2 -0
- package/dist/cjs/dates/interfaces/IDFDateToHmsSettings.d.ts +2 -1
- package/dist/cjs/dates/interfaces/IDTimezone.d.ts +3 -0
- package/dist/cjs/dates/interfaces/IDTimezoneType.d.ts +2 -0
- package/dist/cjs/dates/interfaces/IDTimezoneType.js +2 -0
- package/dist/cjs/dates/interfaces/IDateSettings.d.ts +5 -0
- package/dist/cjs/dates/interfaces/IDateSettings.js +2 -0
- package/dist/cjs/dates/interfaces/index.d.ts +4 -1
- package/dist/cjs/dates/interfaces/index.js +4 -1
- package/dist/cjs/filters/services/Filters.api.js +1 -1
- package/dist/cjs/format/format.js +11 -0
- package/dist/cjs/format/localization.js +10 -1
- package/dist/cjs/general/array/getArrayByProperty.d.ts +1 -1
- package/dist/cjs/general/array/getUniqueArray.d.ts +1 -1
- package/dist/cjs/general/array/getUniqueArray.js +2 -0
- package/dist/cjs/general/mix/isEmpty.js +2 -0
- package/dist/cjs/general/mix/isNaNV2.d.ts +1 -0
- package/dist/cjs/general/mix/isNaNV2.js +7 -2
- package/dist/cjs/general/numeric/getSign.js +1 -1
- package/dist/cjs/general/object/applyTimezoneDeep.d.ts +1 -1
- package/dist/cjs/general/object/applyTimezoneDeep.js +17 -12
- package/dist/cjs/general/object/isObject.js +3 -1
- package/dist/cjs/general/object/mergeDeep.d.ts +6 -0
- package/dist/cjs/general/object/mergeDeep.js +12 -10
- package/dist/cjs/general/object/objectCopy.d.ts +1 -1
- package/dist/cjs/general/object/removeUndefinedDeep.js +6 -3
- package/dist/cjs/general/string/padLeadingZeros.d.ts +28 -1
- package/dist/cjs/general/string/padLeadingZeros.js +75 -7
- package/dist/cjs/globalization/interfaces/common/II18nColumnProperties.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardTooltips.d.ts +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
- package/dist/cjs/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -1
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +5 -5
- package/dist/cjs/globalization/labels/panel/I18N_PANEL.js +1 -1
- package/dist/cjs/interfaces/format/IFormatConfig.Interface.d.ts +1 -1
- package/dist/cjs/qrvey/helpers/transformValue.js +35 -14
- package/dist/cjs/qrvey/interfaces/IBDataset.d.ts +1 -1
- package/dist/cjs/qrvey/interfaces/IBModel.d.ts +4 -1
- package/dist/cjs/qrvey/interfaces/index.d.ts +0 -1
- package/dist/cjs/qrvey/interfaces/index.js +0 -1
- package/dist/cjs/services/adapters/BTimezoneToUITimezone.d.ts +6 -1
- package/dist/cjs/services/adapters/BTimezoneToUITimezone.js +10 -1
- package/dist/columns/constants/COLUMN_PROPERTIES.d.ts +1 -1
- package/dist/columns/constants/COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/columns/constants/COMPOUND_COLUMN_PROPERTY_LABEL.d.ts +1 -0
- package/dist/columns/constants/COMPOUND_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/columns/helpers/isNumericalColumn.js +3 -1
- package/dist/dates/adapters/ISOToNumericOffset.js +6 -1
- package/dist/dates/adapters/dateToHms.js +5 -7
- package/dist/dates/adapters/dateToMdyDate.d.ts +2 -1
- package/dist/dates/adapters/dateToMdyDate.js +9 -3
- package/dist/dates/adapters/dateToMonthYear.d.ts +2 -1
- package/dist/dates/adapters/dateToMonthYear.js +6 -2
- package/dist/dates/adapters/dateToQuarterYear.d.ts +2 -1
- package/dist/dates/adapters/dateToQuarterYear.js +6 -2
- package/dist/dates/adapters/dateToWeekYear.d.ts +2 -1
- package/dist/dates/adapters/dateToWeekYear.js +6 -2
- package/dist/dates/adapters/dateToYear.d.ts +2 -1
- package/dist/dates/adapters/dateToYear.js +6 -2
- package/dist/dates/adapters/hmsToDate.d.ts +2 -1
- package/dist/dates/adapters/hmsToDate.js +6 -2
- package/dist/dates/adapters/mdyDateToDate.d.ts +2 -1
- package/dist/dates/adapters/mdyDateToDate.js +7 -2
- package/dist/dates/adapters/monthYearToDate.d.ts +2 -1
- package/dist/dates/adapters/monthYearToDate.js +6 -2
- package/dist/dates/adapters/numericOffsetToISO.d.ts +1 -1
- package/dist/dates/adapters/numericOffsetToISO.js +15 -8
- package/dist/dates/adapters/quarterYearToDate.d.ts +2 -1
- package/dist/dates/adapters/quarterYearToDate.js +6 -2
- package/dist/dates/adapters/weekYearToDate.d.ts +2 -1
- package/dist/dates/adapters/weekYearToDate.js +6 -2
- package/dist/dates/adapters/yearToDate.d.ts +2 -1
- package/dist/dates/adapters/yearToDate.js +6 -2
- package/dist/dates/constants/TIMEZONE_TYPE.d.ts +5 -0
- package/dist/dates/constants/TIMEZONE_TYPE.js +6 -0
- package/dist/dates/helpers/getDateByDateFormat.d.ts +2 -1
- package/dist/dates/helpers/getDateByDateFormat.js +6 -6
- package/dist/dates/helpers/getDateByTimezone.d.ts +3 -3
- package/dist/dates/helpers/getDateByTimezone.js +12 -27
- package/dist/dates/helpers/getDateByTimezoneOffset.d.ts +1 -1
- package/dist/dates/helpers/getDateByTimezoneOffset.js +11 -6
- package/dist/dates/helpers/getDefaultDateSettings.d.ts +7 -0
- package/dist/dates/helpers/getDefaultDateSettings.js +13 -0
- package/dist/dates/helpers/getFormattedDateByFormat.d.ts +2 -1
- package/dist/dates/helpers/getFormattedDateByFormat.js +7 -7
- package/dist/dates/helpers/getTimezoneObject.d.ts +8 -1
- package/dist/dates/helpers/getTimezoneObject.js +97 -13
- package/dist/dates/helpers/getTimezoneOffsetByType.d.ts +13 -0
- package/dist/dates/helpers/getTimezoneOffsetByType.js +23 -0
- package/dist/dates/helpers/getUTCFormatByOffset.d.ts +7 -0
- package/dist/dates/helpers/getUTCFormatByOffset.js +15 -0
- package/dist/dates/helpers/index.d.ts +4 -1
- package/dist/dates/helpers/index.js +4 -1
- package/dist/dates/helpers/isValidPotentialDate.d.ts +1 -0
- package/dist/dates/helpers/isValidPotentialDate.js +14 -5
- package/dist/dates/interfaces/IBTimezone.d.ts +7 -0
- package/dist/dates/interfaces/IBTimezoneType.d.ts +2 -0
- package/dist/dates/interfaces/IDFDateToHmsSettings.d.ts +2 -1
- package/dist/dates/interfaces/IDTimezone.d.ts +3 -0
- package/dist/dates/interfaces/IDTimezoneType.d.ts +2 -0
- package/dist/dates/interfaces/IDTimezoneType.js +1 -0
- package/dist/dates/interfaces/IDateSettings.d.ts +5 -0
- package/dist/dates/interfaces/IDateSettings.js +1 -0
- package/dist/dates/interfaces/index.d.ts +4 -1
- package/dist/dates/interfaces/index.js +4 -1
- package/dist/filters/services/Filters.api.js +1 -1
- package/dist/format/format.js +11 -0
- package/dist/format/localization.js +10 -1
- package/dist/general/array/getArrayByProperty.d.ts +1 -1
- package/dist/general/array/getUniqueArray.d.ts +1 -1
- package/dist/general/array/getUniqueArray.js +2 -0
- package/dist/general/mix/isEmpty.js +2 -0
- package/dist/general/mix/isNaNV2.d.ts +1 -0
- package/dist/general/mix/isNaNV2.js +7 -2
- package/dist/general/numeric/getSign.js +1 -1
- package/dist/general/object/applyTimezoneDeep.d.ts +1 -1
- package/dist/general/object/applyTimezoneDeep.js +17 -12
- package/dist/general/object/isObject.js +3 -1
- package/dist/general/object/mergeDeep.d.ts +6 -0
- package/dist/general/object/mergeDeep.js +12 -10
- package/dist/general/object/objectCopy.d.ts +1 -1
- package/dist/general/object/removeUndefinedDeep.js +6 -3
- package/dist/general/string/padLeadingZeros.d.ts +28 -1
- package/dist/general/string/padLeadingZeros.js +75 -7
- package/dist/globalization/interfaces/common/II18nColumnProperties.d.ts +1 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardToast.d.ts +1 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardTooltips.d.ts +1 -0
- package/dist/globalization/labels/common/I18N_COLUMN_PROPERTY_LABEL.js +1 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +2 -0
- package/dist/globalization/labels/filters/I18N_RELATIVE_CONTAINER.js +1 -1
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +5 -5
- package/dist/globalization/labels/panel/I18N_PANEL.js +1 -1
- package/dist/interfaces/format/IFormatConfig.Interface.d.ts +1 -1
- package/dist/qrvey/helpers/transformValue.js +35 -14
- package/dist/qrvey/interfaces/IBDataset.d.ts +1 -1
- package/dist/qrvey/interfaces/IBModel.d.ts +4 -1
- package/dist/qrvey/interfaces/index.d.ts +0 -1
- package/dist/qrvey/interfaces/index.js +0 -1
- package/dist/services/adapters/BTimezoneToUITimezone.d.ts +6 -1
- package/dist/services/adapters/BTimezoneToUITimezone.js +10 -1
- package/package.json +4 -3
- package/dist/cjs/dates/interfaces/IGetDateByTimezoneSettings.d.ts +0 -6
- package/dist/cjs/qrvey/interfaces/IBTimezone.d.ts +0 -4
- package/dist/dates/interfaces/IGetDateByTimezoneSettings.d.ts +0 -6
- package/dist/qrvey/interfaces/IBTimezone.d.ts +0 -4
- /package/dist/cjs/{qrvey → dates}/interfaces/IBTimezone.js +0 -0
- /package/dist/cjs/dates/interfaces/{IGetDateByTimezoneSettings.js → IBTimezoneType.js} +0 -0
- /package/dist/{qrvey → dates}/interfaces/IBTimezone.js +0 -0
- /package/dist/dates/interfaces/{IGetDateByTimezoneSettings.js → IBTimezoneType.js} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.formatWithLocale = exports.chooseLang = exports.getLang = void 0;
|
|
4
|
+
const dates_1 = require("../dates");
|
|
4
5
|
const isEmpty_1 = require("../general/mix/isEmpty");
|
|
5
6
|
const definition_1 = require("./definition");
|
|
6
7
|
const durationFormatter_1 = require("./duration/durationFormatter");
|
|
@@ -29,11 +30,19 @@ const formatWithLocale = (value, outputFormat, config = {}) => {
|
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
32
|
exports.formatWithLocale = formatWithLocale;
|
|
33
|
+
function getDateWithOffset(dateValue, offset) {
|
|
34
|
+
const targetTime = new Date(dateValue);
|
|
35
|
+
if (!(0, isEmpty_1.isEmpty)(offset))
|
|
36
|
+
targetTime.setUTCMinutes(targetTime.getUTCMinutes() +
|
|
37
|
+
targetTime.getTimezoneOffset() +
|
|
38
|
+
(0, dates_1.ISOToNumericOffset)(offset));
|
|
39
|
+
return targetTime;
|
|
40
|
+
}
|
|
32
41
|
const DATE_FORMAT_CACHE = [];
|
|
33
42
|
function formatLocaleDate(value, outputFormat, config) {
|
|
34
43
|
const { lang = definition_1.LANG_DEFAULT, options } = config;
|
|
35
44
|
const dateValue = value === null || value === void 0 ? void 0 : value.replace(/Z$/i, "");
|
|
36
|
-
const dateParam =
|
|
45
|
+
const dateParam = getDateWithOffset(dateValue, config === null || config === void 0 ? void 0 : config.offset);
|
|
37
46
|
let langOpts = options;
|
|
38
47
|
if (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.originalFormat) {
|
|
39
48
|
if ((0, isDateTimeFormat_1.isDateTimeFormat)(outputFormat))
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @param property the property to get the value collection
|
|
5
5
|
* @returns a collection of values by property
|
|
6
6
|
*/
|
|
7
|
-
export declare function getArrayByProperty<T = any>(arr: T[], property: string): T[];
|
|
7
|
+
export declare function getArrayByProperty<T = any>(arr: T[], property: string | number): T[];
|
|
@@ -26,6 +26,8 @@ function isEmpty(variable, includeFalsy = false) {
|
|
|
26
26
|
(!(variable instanceof Date) &&
|
|
27
27
|
typeof variable !== "function" &&
|
|
28
28
|
(0, isObject_1.isObject)(variable) &&
|
|
29
|
+
Object.entries(variable).length === 0) ||
|
|
30
|
+
((0, getTag_1.getTag)(variable) === "[object NodeList]" &&
|
|
29
31
|
Object.entries(variable).length === 0));
|
|
30
32
|
}
|
|
31
33
|
exports.isEmpty = isEmpty;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* Special case for isNaN
|
|
9
9
|
* - The isNaN('') is considered as false statement. The empty string is converted to 0 which is not NaN.
|
|
10
10
|
* - Boolean variables is considered as false statement.
|
|
11
|
+
* - Date objects is considered as true.
|
|
11
12
|
*
|
|
12
13
|
* @param variable the variable to validate
|
|
13
14
|
* @return True: variable is a NaN; False: The variable is a number
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isNaNV2 = void 0;
|
|
4
|
-
const
|
|
4
|
+
const isValidDateObject_1 = require("../../dates/helpers/isValidDateObject");
|
|
5
|
+
const isEmpty_1 = require("./isEmpty");
|
|
5
6
|
/**
|
|
6
7
|
* Validates if the recieved number is NaN type.
|
|
7
8
|
*
|
|
@@ -12,11 +13,15 @@ const _1 = require(".");
|
|
|
12
13
|
* Special case for isNaN
|
|
13
14
|
* - The isNaN('') is considered as false statement. The empty string is converted to 0 which is not NaN.
|
|
14
15
|
* - Boolean variables is considered as false statement.
|
|
16
|
+
* - Date objects is considered as true.
|
|
15
17
|
*
|
|
16
18
|
* @param variable the variable to validate
|
|
17
19
|
* @return True: variable is a NaN; False: The variable is a number
|
|
18
20
|
*/
|
|
19
21
|
function isNaNV2(variable) {
|
|
20
|
-
return (0,
|
|
22
|
+
return ((0, isEmpty_1.isEmpty)(variable) ||
|
|
23
|
+
typeof variable == "boolean" ||
|
|
24
|
+
isNaN(variable) ||
|
|
25
|
+
(0, isValidDateObject_1.isValidDateObject)(variable));
|
|
21
26
|
}
|
|
22
27
|
exports.isNaNV2 = isNaNV2;
|
|
@@ -5,4 +5,4 @@ import { IDTimezone } from "../../dates/interfaces/IDTimezone";
|
|
|
5
5
|
* @param {IDTimezone} timezone the timezone object
|
|
6
6
|
* @returns {IFSData | IFUData} the new filter data with the transformed datetime values
|
|
7
7
|
*/
|
|
8
|
-
export declare function applyTimezoneDeep(obj:
|
|
8
|
+
export declare function applyTimezoneDeep<T = any>(obj: T, timezone: IDTimezone): T;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applyTimezoneDeep = void 0;
|
|
4
4
|
const DATE_FORMAT_1 = require("../../dates/constants/DATE_FORMAT");
|
|
5
|
-
const DATE_GROUPING_TIME_PROPERTY_1 = require("../../dates/constants/DATE_GROUPING_TIME_PROPERTY");
|
|
6
5
|
const getDateByTimezone_1 = require("../../dates/helpers/getDateByTimezone");
|
|
6
|
+
const isValidDateObject_1 = require("../../dates/helpers/isValidDateObject");
|
|
7
7
|
const validateDate_1 = require("../../dates/helpers/validateDate");
|
|
8
8
|
const isEmpty_1 = require("../mix/isEmpty");
|
|
9
9
|
const isObject_1 = require("./isObject");
|
|
@@ -14,21 +14,23 @@ const isObject_1 = require("./isObject");
|
|
|
14
14
|
* @returns {IFSData | IFUData} the new filter data with the transformed datetime values
|
|
15
15
|
*/
|
|
16
16
|
function applyTimezoneDeep(obj, timezone) {
|
|
17
|
-
if ((
|
|
17
|
+
if (!isValid(obj, timezone))
|
|
18
18
|
return obj;
|
|
19
|
-
|
|
19
|
+
let result;
|
|
20
|
+
if ((0, isObject_1.isObject)(obj)) {
|
|
21
|
+
result = {};
|
|
22
|
+
}
|
|
23
|
+
else if (Array.isArray(obj)) {
|
|
24
|
+
result = [];
|
|
25
|
+
}
|
|
20
26
|
try {
|
|
21
27
|
for (const i in obj) {
|
|
22
|
-
if ((0,
|
|
23
|
-
result[i] = applyTimezoneDeep(obj[i], timezone);
|
|
24
|
-
}
|
|
25
|
-
else if (obj[i] instanceof Date ||
|
|
26
|
-
!isNaN(obj[i]) ||
|
|
28
|
+
if ((0, isValidDateObject_1.isValidDateObject)(obj[i]) ||
|
|
27
29
|
(0, validateDate_1.validateDate)(obj[i], DATE_FORMAT_1.DATE_FORMAT.HOUR)) {
|
|
28
|
-
result[i] = (0, getDateByTimezone_1.getDateByTimezone)(obj[i],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
result[i] = (0, getDateByTimezone_1.getDateByTimezone)(obj[i], timezone);
|
|
31
|
+
}
|
|
32
|
+
else if ((0, isObject_1.isObject)(obj[i]) || Array.isArray(obj[i])) {
|
|
33
|
+
result[i] = applyTimezoneDeep(obj[i], timezone);
|
|
32
34
|
}
|
|
33
35
|
else {
|
|
34
36
|
result[i] = obj[i];
|
|
@@ -41,3 +43,6 @@ function applyTimezoneDeep(obj, timezone) {
|
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
exports.applyTimezoneDeep = applyTimezoneDeep;
|
|
46
|
+
function isValid(obj, timezone) {
|
|
47
|
+
return (!(0, isEmpty_1.isEmpty)(obj) && (Array.isArray(obj) || (0, isObject_1.isObject)(obj)) && !(0, isEmpty_1.isEmpty)(timezone));
|
|
48
|
+
}
|
|
@@ -9,6 +9,8 @@ const getTag_1 = require("../mix/getTag");
|
|
|
9
9
|
*/
|
|
10
10
|
function isObject(obj) {
|
|
11
11
|
return (!Array.isArray(obj) &&
|
|
12
|
-
|
|
12
|
+
obj === Object(obj) &&
|
|
13
|
+
(0, getTag_1.getTag)(obj) !== "[object Function]" &&
|
|
14
|
+
((0, getTag_1.getTag)(obj) === "[object Object]" || (0, getTag_1.getTag)(obj) === "[object Date]"));
|
|
13
15
|
}
|
|
14
16
|
exports.isObject = isObject;
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
* Settings structure of the Merge Deep helper
|
|
3
3
|
*/
|
|
4
4
|
interface IMergeDeepSettings {
|
|
5
|
+
/**
|
|
6
|
+
* Merging properties that exists in object 2 but not in object 1
|
|
7
|
+
*/
|
|
5
8
|
mergeMissingProperties?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Merging values on matched object properties. If false, the object 1 values remains as equal.
|
|
11
|
+
*/
|
|
6
12
|
mergeExistingValues?: boolean;
|
|
7
13
|
}
|
|
8
14
|
/**
|
|
@@ -15,22 +15,23 @@ function mergeDeep(obj1, obj2, settings) {
|
|
|
15
15
|
const defaultSettings = getParamsToMergeDeep(settings);
|
|
16
16
|
if (!isValid(obj1, obj2))
|
|
17
17
|
return (0, objectCopy_1.objectCopy)(obj1);
|
|
18
|
-
const result = {};
|
|
18
|
+
const result = Array.isArray(obj1) ? [] : {};
|
|
19
19
|
for (const i in obj1) {
|
|
20
|
-
if (
|
|
20
|
+
if ((0, isObject_1.isObject)(obj1[i]) || Array.isArray(obj1[i])) {
|
|
21
21
|
result[i] = mergeDeep(obj1[i], obj2[i], defaultSettings);
|
|
22
22
|
}
|
|
23
|
+
else if (i in obj2 && defaultSettings.mergeExistingValues) {
|
|
24
|
+
result[i] = obj2[i];
|
|
25
|
+
}
|
|
23
26
|
else {
|
|
24
27
|
result[i] = obj1[i];
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(
|
|
30
|
-
i
|
|
31
|
-
|
|
32
|
-
(!(i in result) && defaultSettings.mergeMissingProperties))) {
|
|
33
|
-
result[i] = obj2[i];
|
|
30
|
+
if (defaultSettings.mergeMissingProperties) {
|
|
31
|
+
for (const i in obj2) {
|
|
32
|
+
if (!(i in result)) {
|
|
33
|
+
result[i] = obj2[i];
|
|
34
|
+
}
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
return result;
|
|
@@ -43,7 +44,8 @@ exports.mergeDeep = mergeDeep;
|
|
|
43
44
|
* @returns true: they are valid; false: they are not
|
|
44
45
|
*/
|
|
45
46
|
function isValid(obj1, obj2) {
|
|
46
|
-
return (0, isObject_1.isObject)(obj1) && (0, isObject_1.isObject)(obj2)
|
|
47
|
+
return (((0, isObject_1.isObject)(obj1) && (0, isObject_1.isObject)(obj2)) ||
|
|
48
|
+
(Array.isArray(obj1) && Array.isArray(obj2)));
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* Validates and gets the settings with all set parameters.
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeUndefinedDeep = void 0;
|
|
4
|
-
const cloneDeep_1 = require("./cloneDeep");
|
|
5
4
|
const isObject_1 = require("./isObject");
|
|
5
|
+
const objectCopy_1 = require("./objectCopy");
|
|
6
6
|
/**
|
|
7
7
|
* Removes and returns the given object cleaning the undefined values
|
|
8
8
|
* @param obj an object
|
|
9
9
|
* @returns the new object with no undefined values
|
|
10
10
|
*/
|
|
11
11
|
function removeUndefinedDeep(obj) {
|
|
12
|
-
|
|
12
|
+
const isArray = Array.isArray(obj);
|
|
13
|
+
if (obj == null || (!(0, isObject_1.isObject)(obj) && !isArray))
|
|
13
14
|
return obj;
|
|
14
|
-
|
|
15
|
+
let _obj = (0, objectCopy_1.objectCopy)(obj);
|
|
16
|
+
if (isArray)
|
|
17
|
+
_obj = _obj.filter(Boolean);
|
|
15
18
|
Object.keys(_obj).forEach((key) => {
|
|
16
19
|
if ((0, isObject_1.isObject)(_obj[key]) || Array.isArray(_obj[key])) {
|
|
17
20
|
_obj[key] = removeUndefinedDeep(_obj[key]);
|
|
@@ -1 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Sets an amount of zeros as prefix of the given number by its length
|
|
3
|
+
* @example
|
|
4
|
+
* num = 100
|
|
5
|
+
* size = 2
|
|
6
|
+
* padding = true
|
|
7
|
+
* => Returns "100"
|
|
8
|
+
* @example
|
|
9
|
+
* num = 100
|
|
10
|
+
* size = 5
|
|
11
|
+
* padding = true
|
|
12
|
+
* => Returns "00100"
|
|
13
|
+
* @example
|
|
14
|
+
* num = 100
|
|
15
|
+
* size = 2
|
|
16
|
+
* padding = false
|
|
17
|
+
* => Returns "00100"
|
|
18
|
+
* @example
|
|
19
|
+
* num = 100
|
|
20
|
+
* size = 5
|
|
21
|
+
* padding = false
|
|
22
|
+
* => Returns "00000100"
|
|
23
|
+
* @param {number | string} num the number
|
|
24
|
+
* @param {number} size the quantity of zeros to add
|
|
25
|
+
* @param {number} padding True: to pad with missing zeros; depending on the num length. False: to fill zeros by the amount.
|
|
26
|
+
* @returns the string of the number with the prefixed zeros
|
|
27
|
+
*/
|
|
28
|
+
export declare function padLeadingZeros(num: number | string, amount?: number, padding?: boolean): string;
|
|
@@ -1,12 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.padLeadingZeros = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const mix_1 = require("../mix");
|
|
5
|
+
const isNaNV2_1 = require("../mix/isNaNV2");
|
|
6
|
+
const getSign_1 = require("../numeric/getSign");
|
|
7
|
+
/**
|
|
8
|
+
* Sets an amount of zeros as prefix of the given number by its length
|
|
9
|
+
* @example
|
|
10
|
+
* num = 100
|
|
11
|
+
* size = 2
|
|
12
|
+
* padding = true
|
|
13
|
+
* => Returns "100"
|
|
14
|
+
* @example
|
|
15
|
+
* num = 100
|
|
16
|
+
* size = 5
|
|
17
|
+
* padding = true
|
|
18
|
+
* => Returns "00100"
|
|
19
|
+
* @example
|
|
20
|
+
* num = 100
|
|
21
|
+
* size = 2
|
|
22
|
+
* padding = false
|
|
23
|
+
* => Returns "00100"
|
|
24
|
+
* @example
|
|
25
|
+
* num = 100
|
|
26
|
+
* size = 5
|
|
27
|
+
* padding = false
|
|
28
|
+
* => Returns "00000100"
|
|
29
|
+
* @param {number | string} num the number
|
|
30
|
+
* @param {number} size the quantity of zeros to add
|
|
31
|
+
* @param {number} padding True: to pad with missing zeros; depending on the num length. False: to fill zeros by the amount.
|
|
32
|
+
* @returns the string of the number with the prefixed zeros
|
|
33
|
+
*/
|
|
34
|
+
function padLeadingZeros(num, amount = 0, padding = true) {
|
|
35
|
+
if (isValidLeadingZerosParams(num, amount))
|
|
36
|
+
return num;
|
|
37
|
+
const newPadding = !(0, mix_1.isEmpty)(padding, true);
|
|
38
|
+
const sign = getNumSign(num);
|
|
39
|
+
let absoluteStringNumber = getAbsoluteNum(num, sign);
|
|
40
|
+
if (newPadding) {
|
|
41
|
+
while (absoluteStringNumber.length < amount)
|
|
42
|
+
absoluteStringNumber = `0${absoluteStringNumber}`;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
let i = 0;
|
|
46
|
+
while (i < amount) {
|
|
47
|
+
absoluteStringNumber = `0${absoluteStringNumber}`;
|
|
48
|
+
i = i + 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return `${sign}${absoluteStringNumber}`;
|
|
11
52
|
}
|
|
12
53
|
exports.padLeadingZeros = padLeadingZeros;
|
|
54
|
+
function isValidLeadingZerosParams(num, amount) {
|
|
55
|
+
return (0, isNaNV2_1.isNaNV2)(num) || (0, isNaNV2_1.isNaNV2)(amount);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Gets the absolute number of the giving parameters
|
|
59
|
+
* @param {number | string} num the number
|
|
60
|
+
* @param {string} sign the sign of the number
|
|
61
|
+
* @returns {string} the absolute number
|
|
62
|
+
*/
|
|
63
|
+
function getAbsoluteNum(num, sign = "") {
|
|
64
|
+
const stringNum = `${num}`;
|
|
65
|
+
return sign !== "" && `${stringNum}`.charAt(0) === sign
|
|
66
|
+
? stringNum.substring(1)
|
|
67
|
+
: stringNum;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets the number sign
|
|
71
|
+
* @param {number | string} num the number
|
|
72
|
+
* @returns {string} the number sign
|
|
73
|
+
*/
|
|
74
|
+
function getNumSign(num) {
|
|
75
|
+
const stringNum = `${num}`;
|
|
76
|
+
const sign = (0, getSign_1.getSign)(num);
|
|
77
|
+
if (stringNum.charAt(0) === sign)
|
|
78
|
+
return sign;
|
|
79
|
+
return "";
|
|
80
|
+
}
|
|
@@ -42,6 +42,7 @@ export interface II18nColumnProperties {
|
|
|
42
42
|
address_state_label: string;
|
|
43
43
|
address_postal_code_label: string;
|
|
44
44
|
address_country_label: string;
|
|
45
|
+
address_county_label: string;
|
|
45
46
|
usaddress_address_line_1_label: string;
|
|
46
47
|
usaddress_address_line_2_label: string;
|
|
47
48
|
usaddress_city_label: string;
|
|
@@ -46,6 +46,7 @@ exports.I18N_COLUMN_PROPERTY_LABEL = {
|
|
|
46
46
|
address_state_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.ADDRESS_STATE,
|
|
47
47
|
address_postal_code_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.ADDRESS_POSTAL,
|
|
48
48
|
address_country_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.ADDRESS_COUNTRY,
|
|
49
|
+
address_county_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.ADDRESS_COUNTY,
|
|
49
50
|
usaddress_address_line_1_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.USADDRESS_LINE_1,
|
|
50
51
|
usaddress_address_line_2_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.USADDRESS_LINE_2,
|
|
51
52
|
usaddress_city_label: COLUMN_PROPERTY_LABEL_1.COLUMN_PROPERTY_LABEL.USADDRESS_CITY,
|
|
@@ -30,12 +30,14 @@ exports.I18N_DASHBOARD = {
|
|
|
30
30
|
delete_record_message: "Record Successfully Deleted.",
|
|
31
31
|
refresh_table_message: "Record Successfully Edited.",
|
|
32
32
|
failed_download: "The file(s) could not be exported at this time.",
|
|
33
|
+
panels_loading: "Visualizations are currently loading. Try exporting again once all visualizations have loaded properly.",
|
|
33
34
|
},
|
|
34
35
|
tooltips: {
|
|
35
36
|
buckets: "Buckets",
|
|
36
37
|
download: "Download",
|
|
37
38
|
embed_analyze: "Embed Analyze View",
|
|
38
39
|
formulas: "Formulas",
|
|
40
|
+
histogram: "Histogram",
|
|
39
41
|
style_themes: "Style Themes",
|
|
40
42
|
},
|
|
41
43
|
views: {
|
|
@@ -13,5 +13,5 @@ exports.I18N_RELATIVE_CONTAINER = {
|
|
|
13
13
|
starting_date_tooltip: "The relative date will include the specific starting date and a period of time to show from that date onwards (Inclusive range). <br/> Unchecking this option will exclude the chosen starting date (exclusive range) from the date range.",
|
|
14
14
|
starting_from: "Starting From",
|
|
15
15
|
set_current_date: "Set to current date",
|
|
16
|
-
utc_tooltip: "The times displayed are in
|
|
16
|
+
utc_tooltip: "The times displayed are in {{utc}}",
|
|
17
17
|
};
|
|
@@ -341,7 +341,7 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
341
341
|
function_placeholder: "String.length()",
|
|
342
342
|
},
|
|
343
343
|
function_now: {
|
|
344
|
-
description: "
|
|
344
|
+
description: "Returns a date with the current time in the current timezone with the following format: yyyy-MM-ddTHH:mm:ss.",
|
|
345
345
|
function_placeholder: "now()",
|
|
346
346
|
},
|
|
347
347
|
function_date_parse: {
|
|
@@ -362,7 +362,7 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
362
362
|
},
|
|
363
363
|
function_date_add: {
|
|
364
364
|
description: "Given a Date or a Column, add the specific value to the specific part.",
|
|
365
|
-
function_placeholder: "dateAdd(date, date_part, interval_value)",
|
|
365
|
+
function_placeholder: "dateAdd(date, 'date_part', interval_value)",
|
|
366
366
|
param_date_name: "date",
|
|
367
367
|
param_date_description: "This is the Date or Column to which you want to add.",
|
|
368
368
|
param_part_name: "date_part",
|
|
@@ -372,7 +372,7 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
372
372
|
},
|
|
373
373
|
function_date_subtract: {
|
|
374
374
|
description: "Given a Date or a Column, subtract the specific value to the specific part.",
|
|
375
|
-
function_placeholder: "dateSubtract(date, date_part, interval_value)",
|
|
375
|
+
function_placeholder: "dateSubtract(date, 'date_part', interval_value)",
|
|
376
376
|
param_date_name: "date",
|
|
377
377
|
param_date_description: "This is the Date or Column to which you want to subtract.",
|
|
378
378
|
param_part_name: "date_part",
|
|
@@ -382,7 +382,7 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
382
382
|
},
|
|
383
383
|
function_date_diff: {
|
|
384
384
|
description: "Calculates the difference between two dates based on the date part requested.",
|
|
385
|
-
function_placeholder: "dateDiff(date_value1, date_value2, date_part)",
|
|
385
|
+
function_placeholder: "dateDiff(date_value1, date_value2, 'date_part')",
|
|
386
386
|
param_date_value_one_name: "date_value1",
|
|
387
387
|
param_date_value_one_description: "The first date value.",
|
|
388
388
|
param_date_value_two_name: "date_value2",
|
|
@@ -396,7 +396,7 @@ exports.I18N_FORMULA_BUILDER = {
|
|
|
396
396
|
param_column_name: "column",
|
|
397
397
|
param_column_description: "Date column to check.",
|
|
398
398
|
param_replacement_name: "replacement",
|
|
399
|
-
param_replacement_description: 'Date replacement value.<br>Common Replacement Value Formats:<br>○ Using another date column "dateIsNull(Column1, Column2)"<br>○ Using another date function "dateIsNull(Column, now())"<br>○ Using specified date "dateIsNull(Column, dateParse(\'
|
|
399
|
+
param_replacement_description: 'Date replacement value.<br>Common Replacement Value Formats:<br>○ Using another date column "dateIsNull(Column1, Column2)"<br>○ Using another date function "dateIsNull(Column, now())"<br>○ Using specified date "dateIsNull(Column, dateParse(\'31/12/2021\', \'dd/MM/yyyy\'))"',
|
|
400
400
|
},
|
|
401
401
|
function_agg_sum: {
|
|
402
402
|
description: "A single-value metrics aggregation that sums up numeric values that are extracted from the documents",
|
|
@@ -18,7 +18,7 @@ exports.I18N_PANEL = {
|
|
|
18
18
|
invalid_data_for_chart: "No valid data for this chart",
|
|
19
19
|
longer_available_panel: "This panel is no longer available",
|
|
20
20
|
long_text: "long-text",
|
|
21
|
-
max_buckets_limit: "The combination of data used in this chart exceeds the maximum number of
|
|
21
|
+
max_buckets_limit: "The combination of data used in this chart exceeds the maximum number of aggregation buckets allowed in a single response.<br><br>To fix this issue, try the following:<br>• <i>Filter</i> your data<br>• Apply a <i>Date Grouping</i> that returns less data<br>• Use another chart visualization",
|
|
22
22
|
missing_column: "Missing Column.",
|
|
23
23
|
missing_bucket_column: "Missing bucket column.",
|
|
24
24
|
missing_formula_column: "Missing formula column.",
|
|
@@ -23,10 +23,7 @@ function transformValue(value, settings) {
|
|
|
23
23
|
const defaultSettings = getDefaultSettings(settings);
|
|
24
24
|
let timezonedValue = value;
|
|
25
25
|
if (!defaultSettings.noTimezone) {
|
|
26
|
-
timezonedValue = (0, getDateByTimezone_1.getDateByTimezone)(value,
|
|
27
|
-
property: defaultSettings.property,
|
|
28
|
-
timezone: defaultSettings.timezone,
|
|
29
|
-
});
|
|
26
|
+
timezonedValue = (0, getDateByTimezone_1.getDateByTimezone)(value, defaultSettings.timezone);
|
|
30
27
|
}
|
|
31
28
|
let valueWithI18n = timezonedValue;
|
|
32
29
|
if (!defaultSettings.noTranslate) {
|
|
@@ -61,18 +58,14 @@ function getDefaultSettings(settings) {
|
|
|
61
58
|
* @returns the outputformat settings
|
|
62
59
|
*/
|
|
63
60
|
function getOutputFormat(settings) {
|
|
64
|
-
var _a
|
|
65
|
-
let type, format, decimals;
|
|
66
|
-
const isDateTime =
|
|
67
|
-
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.HOUR,
|
|
68
|
-
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.MINUTE,
|
|
69
|
-
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.SECOND,
|
|
70
|
-
undefined,
|
|
71
|
-
].includes(settings.property);
|
|
61
|
+
var _a;
|
|
62
|
+
let type, format, decimals, originalFormat;
|
|
63
|
+
const isDateTime = isDateWithTime(settings.property);
|
|
72
64
|
const isDate = [DATE_GROUPING_PROPERTY_1.DATE_GROUPING_PROPERTY.DAY, undefined].includes(settings.property);
|
|
73
65
|
if ((0, isDateColumn_1.isDateColumn)(settings.column) && (isDate || isDateTime)) {
|
|
74
66
|
type = "DATE";
|
|
75
67
|
format = "Default";
|
|
68
|
+
originalFormat = getOutputFormatByPoperty(settings);
|
|
76
69
|
}
|
|
77
70
|
else if (settings.column.type === COLUMN_1.COLUMN.TIME) {
|
|
78
71
|
type = "TIME";
|
|
@@ -81,13 +74,13 @@ function getOutputFormat(settings) {
|
|
|
81
74
|
else if ((0, isNumericalColumn_1.isNumericalColumn)(settings.column)) {
|
|
82
75
|
type = "NUMERIC";
|
|
83
76
|
format = "Default";
|
|
84
|
-
decimals = (
|
|
77
|
+
decimals = (_a = settings.column.outputFormat) === null || _a === void 0 ? void 0 : _a.decimals;
|
|
85
78
|
}
|
|
86
79
|
return {
|
|
87
80
|
type,
|
|
88
81
|
format,
|
|
89
82
|
decimals,
|
|
90
|
-
originalFormat
|
|
83
|
+
originalFormat,
|
|
91
84
|
};
|
|
92
85
|
}
|
|
93
86
|
/**
|
|
@@ -99,3 +92,31 @@ function getFormatConfig(settings) {
|
|
|
99
92
|
var _a, _b;
|
|
100
93
|
return ((_a = settings.i18n) === null || _a === void 0 ? void 0 : _a.locale) && { lang: (_b = settings.i18n) === null || _b === void 0 ? void 0 : _b.locale };
|
|
101
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* If the property is a day, return the date format without the time, otherwise return the original
|
|
97
|
+
* format.
|
|
98
|
+
* @param {ITransformValueSettings} settings - ITransformValueSettings
|
|
99
|
+
* @returns The outputFormat of the column.
|
|
100
|
+
*/
|
|
101
|
+
function getOutputFormatByPoperty(settings) {
|
|
102
|
+
var _a;
|
|
103
|
+
if (settings.property === DATE_GROUPING_PROPERTY_1.DATE_GROUPING_PROPERTY.DAY) {
|
|
104
|
+
return Object.assign(Object.assign({}, settings.column.outputFormat), { format: (_a = settings.column.outputFormat) === null || _a === void 0 ? void 0 : _a.format.split(" ")[0] });
|
|
105
|
+
}
|
|
106
|
+
else if (isDateWithTime(settings.property))
|
|
107
|
+
return settings.column.outputFormat;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get the format related to the columnn property.
|
|
111
|
+
* If the property is hour, minute, second, or undefined, return true.
|
|
112
|
+
* @param {IColumnPropertyType} property - The property of the date to group by.
|
|
113
|
+
* @returns {boolean} A boolean value.
|
|
114
|
+
*/
|
|
115
|
+
function isDateWithTime(property) {
|
|
116
|
+
return [
|
|
117
|
+
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.HOUR,
|
|
118
|
+
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.MINUTE,
|
|
119
|
+
DATE_GROUPING_TIME_PROPERTY_1.DATE_GROUPING_TIME_PROPERTY.SECOND,
|
|
120
|
+
undefined,
|
|
121
|
+
].includes(property);
|
|
122
|
+
}
|
|
@@ -2,12 +2,15 @@ import { IAppStatus } from "./IAppStatus";
|
|
|
2
2
|
import { IBModelBranchesMap } from "./IBModelBranchesMap";
|
|
3
3
|
import { IBModelData } from "./IBModelData";
|
|
4
4
|
import { IAppType } from "./IAppType";
|
|
5
|
-
import { IBTimezone } from "
|
|
5
|
+
import { IBTimezone } from "../../dates/interfaces/IBTimezone";
|
|
6
6
|
export interface IBModel {
|
|
7
7
|
appType: IAppType;
|
|
8
8
|
appid: string;
|
|
9
9
|
branchesMap?: IBModelBranchesMap[];
|
|
10
10
|
createDate: string;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Data Link feature is not longer supported
|
|
13
|
+
*/
|
|
11
14
|
datalinkInfo?: any[];
|
|
12
15
|
geoGroups?: any[];
|
|
13
16
|
modifyDate: string;
|
|
@@ -4,7 +4,6 @@ export * from "./IBDataset";
|
|
|
4
4
|
export * from "./IBModel";
|
|
5
5
|
export * from "./IBModelBranchesMapBranch";
|
|
6
6
|
export * from "./IBModelData";
|
|
7
|
-
export * from "./IBTimezone";
|
|
8
7
|
export * from "./ICalculation";
|
|
9
8
|
export * from "./ICalculationInfo";
|
|
10
9
|
export * from "./ICalculationType";
|
|
@@ -20,7 +20,6 @@ __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);
|
|
24
23
|
__exportStar(require("./ICalculation"), exports);
|
|
25
24
|
__exportStar(require("./ICalculationInfo"), exports);
|
|
26
25
|
__exportStar(require("./ICalculationType"), exports);
|