@qrvey/utils 1.11.0-0 → 1.11.0-1-features-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/cjs/columns/helpers/index.d.ts +1 -0
- package/dist/cjs/columns/helpers/index.js +1 -0
- package/dist/cjs/columns/helpers/isDurationColumn.d.ts +7 -0
- package/dist/cjs/columns/helpers/isDurationColumn.js +18 -0
- package/dist/cjs/columns/interfaces/IColumnPropertyType.d.ts +2 -1
- package/dist/cjs/dates/adapters/ISOToNumericOffset.d.ts +1 -1
- package/dist/cjs/dates/adapters/ISOToNumericOffset.js +1 -1
- package/dist/cjs/dates/adapters/dateToHms.d.ts +5 -4
- package/dist/cjs/dates/adapters/dateToHms.js +14 -14
- package/dist/cjs/dates/adapters/dateToMdyDate.d.ts +5 -3
- package/dist/cjs/dates/adapters/dateToMdyDate.js +3 -2
- package/dist/cjs/dates/adapters/dateToMonthYear.d.ts +5 -3
- package/dist/cjs/dates/adapters/dateToMonthYear.js +3 -2
- package/dist/cjs/dates/adapters/dateToQuarterYear.d.ts +5 -3
- package/dist/cjs/dates/adapters/dateToQuarterYear.js +3 -2
- package/dist/cjs/dates/adapters/dateToWeekYear.d.ts +5 -3
- package/dist/cjs/dates/adapters/dateToWeekYear.js +3 -2
- package/dist/cjs/dates/adapters/dateToYear.d.ts +5 -3
- package/dist/cjs/dates/adapters/dateToYear.js +3 -2
- package/dist/cjs/dates/adapters/hmsToDate.d.ts +5 -4
- package/dist/cjs/dates/adapters/hmsToDate.js +3 -3
- package/dist/cjs/dates/adapters/mdyDateToDate.d.ts +5 -4
- package/dist/cjs/dates/adapters/mdyDateToDate.js +3 -3
- package/dist/cjs/dates/adapters/monthYearToDate.d.ts +5 -4
- package/dist/cjs/dates/adapters/monthYearToDate.js +3 -3
- package/dist/cjs/dates/adapters/numericOffsetToISO.d.ts +1 -1
- package/dist/cjs/dates/adapters/numericOffsetToISO.js +1 -1
- package/dist/cjs/dates/adapters/quarterYearToDate.d.ts +5 -4
- package/dist/cjs/dates/adapters/quarterYearToDate.js +3 -3
- package/dist/cjs/dates/adapters/weekYearToDate.d.ts +5 -4
- package/dist/cjs/dates/adapters/weekYearToDate.js +3 -3
- package/dist/cjs/dates/adapters/yearToDate.d.ts +5 -4
- package/dist/cjs/dates/adapters/yearToDate.js +3 -3
- package/dist/cjs/dates/constants/ISO_8601_REGEX.d.ts +11 -0
- package/dist/cjs/dates/constants/ISO_8601_REGEX.js +12 -1
- package/dist/cjs/dates/helpers/areIncludedDateTokens.d.ts +3 -3
- package/dist/cjs/dates/helpers/areIncludedDateTokens.js +3 -3
- package/dist/cjs/dates/helpers/getDateByDateFormat.d.ts +6 -5
- package/dist/cjs/dates/helpers/getDateByDateFormat.js +4 -4
- package/dist/cjs/dates/helpers/getDateByTimezone.d.ts +4 -3
- package/dist/cjs/dates/helpers/getDateByTimezone.js +2 -2
- package/dist/cjs/dates/helpers/getDateByTimezoneOffset.d.ts +6 -3
- package/dist/cjs/dates/helpers/getDateByTimezoneOffset.js +3 -2
- package/dist/cjs/dates/helpers/getDateFormatByProperty.d.ts +2 -2
- package/dist/cjs/dates/helpers/getDateFormatByProperty.js +2 -2
- package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +1 -1
- package/dist/cjs/dates/helpers/getDateFormatRegularExpressionInArray.js +1 -1
- package/dist/cjs/dates/helpers/getDefaultDateSettings.d.ts +2 -2
- package/dist/cjs/dates/helpers/getDefaultDateSettings.js +2 -2
- package/dist/cjs/dates/helpers/getFormattedDateByFormat.d.ts +6 -4
- package/dist/cjs/dates/helpers/getFormattedDateByFormat.js +4 -3
- package/dist/cjs/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
- package/dist/cjs/dates/helpers/getSeparatorByDateFormat.js +1 -1
- package/dist/cjs/dates/helpers/getTimezoneObject.d.ts +1 -1
- package/dist/cjs/dates/helpers/getTimezoneObject.js +5 -4
- package/dist/cjs/dates/helpers/getUTCFormatByOffset.d.ts +1 -0
- package/dist/cjs/dates/helpers/getUTCFormatByOffset.js +1 -0
- package/dist/cjs/dates/helpers/getWeek.d.ts +1 -1
- package/dist/cjs/dates/helpers/getWeek.js +1 -1
- package/dist/cjs/dates/helpers/isValidDateObject.d.ts +1 -1
- package/dist/cjs/dates/helpers/isValidDateObject.js +1 -1
- package/dist/cjs/dates/helpers/isValidISOOffset.d.ts +3 -2
- package/dist/cjs/dates/helpers/isValidISOOffset.js +3 -2
- package/dist/cjs/dates/helpers/isValidPotentialDate.d.ts +3 -2
- package/dist/cjs/dates/helpers/isValidPotentialDate.js +16 -1
- package/dist/cjs/dates/helpers/isValidTimezoneOffset.d.ts +1 -1
- package/dist/cjs/dates/helpers/isValidTimezoneOffset.js +15 -4
- package/dist/cjs/dates/helpers/validateDate.d.ts +3 -3
- package/dist/cjs/dates/helpers/validateDate.js +3 -3
- package/dist/cjs/dates/interfaces/IDate.d.ts +1 -0
- package/dist/cjs/dates/interfaces/IDate.js +2 -0
- package/dist/cjs/filters/adapters/FDToFlatUI.js +2 -1
- package/dist/cjs/filters/adapters/UIToOldLogic.js +1 -0
- package/dist/cjs/filters/adapters/logicToFlatUI.js +4 -4
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +2 -0
- package/dist/cjs/filters/helpers/backend/getBackendValues.js +3 -1
- package/dist/cjs/filters/helpers/common/adaptTimeUnitValuesFromFilters.d.ts +11 -0
- package/dist/cjs/filters/helpers/common/adaptTimeUnitValuesFromFilters.js +29 -0
- package/dist/cjs/filters/helpers/common/getVerboseFilters.d.ts +1 -1
- package/dist/cjs/filters/helpers/common/getVerboseFilters.js +64 -27
- 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/resolveDatasetConditions.js +5 -0
- package/dist/cjs/filters/helpers/common/resolveFilterConditions.js +5 -0
- package/dist/cjs/filters/helpers/common/resolveScopeConditions.js +5 -0
- package/dist/cjs/filters/helpers/settings/getFilterSettings.js +1 -6
- package/dist/cjs/filters/interfaces/OLD_IFilterDetail.d.ts +4 -0
- package/dist/cjs/filters/interfaces/builder/IFilterBuilderSettings.d.ts +5 -0
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilter.d.ts +2 -0
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +9 -0
- package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +2 -0
- package/dist/cjs/filters/interfaces/common/index.d.ts +1 -0
- package/dist/cjs/filters/interfaces/common/index.js +1 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +1 -0
- package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +1 -0
- package/dist/cjs/format/definition.d.ts +1 -0
- package/dist/cjs/format/definition.js +2 -1
- package/dist/cjs/format/duration/convertTimeUnit.d.ts +15 -0
- package/dist/cjs/format/duration/convertTimeUnit.js +34 -0
- package/dist/cjs/format/duration/index.d.ts +1 -0
- package/dist/cjs/format/duration/index.js +1 -0
- package/dist/cjs/globalization/interfaces/common/I18nTimeUnitProperties.d.ts +10 -0
- package/dist/cjs/globalization/interfaces/common/I18nTimeUnitProperties.js +2 -0
- package/dist/cjs/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/common/index.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/common/index.js +1 -0
- package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.d.ts +1 -0
- package/dist/cjs/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/cjs/globalization/labels/common/I18N_TIME_UNITS.d.ts +2 -0
- package/dist/cjs/globalization/labels/common/I18N_TIME_UNITS.js +14 -0
- package/dist/cjs/globalization/labels/index.d.ts +0 -1
- package/dist/cjs/globalization/labels/index.js +0 -1
- package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/qrvey/helpers/getPropertyLabel.d.ts +7 -0
- package/dist/cjs/qrvey/helpers/getPropertyLabel.js +14 -3
- package/dist/cjs/time/adapters/adaptTimeUnitNumbers.d.ts +9 -0
- package/dist/cjs/time/adapters/adaptTimeUnitNumbers.js +204 -0
- package/dist/cjs/time/adapters/daysToHours.d.ts +6 -0
- package/dist/cjs/time/adapters/daysToHours.js +22 -0
- package/dist/cjs/time/adapters/daysToMinutes.d.ts +6 -0
- package/dist/cjs/time/adapters/daysToMinutes.js +22 -0
- package/dist/cjs/time/adapters/daysToMonths.d.ts +6 -0
- package/dist/cjs/time/adapters/daysToMonths.js +22 -0
- package/dist/cjs/time/adapters/daysToSeconds.d.ts +6 -0
- package/dist/cjs/time/adapters/daysToSeconds.js +22 -0
- package/dist/cjs/time/adapters/daysToYears.d.ts +6 -0
- package/dist/cjs/time/adapters/daysToYears.js +22 -0
- package/dist/cjs/time/adapters/hoursToDays.d.ts +6 -0
- package/dist/cjs/time/adapters/hoursToDays.js +22 -0
- package/dist/cjs/time/adapters/hoursToMinutes.d.ts +6 -0
- package/dist/cjs/time/adapters/hoursToMinutes.js +22 -0
- package/dist/cjs/time/adapters/hoursToMonths.d.ts +6 -0
- package/dist/cjs/time/adapters/hoursToMonths.js +22 -0
- package/dist/cjs/time/adapters/hoursToSeconds.d.ts +6 -0
- package/dist/cjs/time/adapters/hoursToSeconds.js +22 -0
- package/dist/cjs/time/adapters/hoursToYears.d.ts +6 -0
- package/dist/cjs/time/adapters/hoursToYears.js +22 -0
- package/dist/cjs/time/adapters/index.d.ts +31 -0
- package/dist/cjs/time/adapters/index.js +47 -0
- package/dist/cjs/time/adapters/minutesToDays.d.ts +6 -0
- package/dist/cjs/time/adapters/minutesToDays.js +22 -0
- package/dist/cjs/time/adapters/minutesToHours.d.ts +6 -0
- package/dist/cjs/time/adapters/minutesToHours.js +22 -0
- package/dist/cjs/time/adapters/minutesToMonths.d.ts +6 -0
- package/dist/cjs/time/adapters/minutesToMonths.js +22 -0
- package/dist/cjs/time/adapters/minutesToSeconds.d.ts +6 -0
- package/dist/cjs/time/adapters/minutesToSeconds.js +22 -0
- package/dist/cjs/time/adapters/minutesToYears.d.ts +6 -0
- package/dist/cjs/time/adapters/minutesToYears.js +22 -0
- package/dist/cjs/time/adapters/monthsToDays.d.ts +6 -0
- package/dist/cjs/time/adapters/monthsToDays.js +22 -0
- package/dist/cjs/time/adapters/monthsToHours.d.ts +6 -0
- package/dist/cjs/time/adapters/monthsToHours.js +22 -0
- package/dist/cjs/time/adapters/monthsToMinutes.d.ts +6 -0
- package/dist/cjs/time/adapters/monthsToMinutes.js +22 -0
- package/dist/cjs/time/adapters/monthsToSeconds.d.ts +6 -0
- package/dist/cjs/time/adapters/monthsToSeconds.js +22 -0
- package/dist/cjs/time/adapters/monthsToYears.d.ts +6 -0
- package/dist/cjs/time/adapters/monthsToYears.js +22 -0
- package/dist/cjs/time/adapters/secondsToDays.d.ts +6 -0
- package/dist/cjs/time/adapters/secondsToDays.js +22 -0
- package/dist/cjs/time/adapters/secondsToHours.d.ts +6 -0
- package/dist/cjs/time/adapters/secondsToHours.js +22 -0
- package/dist/cjs/time/adapters/secondsToMinutes.d.ts +6 -0
- package/dist/cjs/time/adapters/secondsToMinutes.js +22 -0
- package/dist/cjs/time/adapters/secondsToMonths.d.ts +6 -0
- package/dist/cjs/time/adapters/secondsToMonths.js +22 -0
- package/dist/cjs/time/adapters/secondsToYears.d.ts +6 -0
- package/dist/cjs/time/adapters/secondsToYears.js +22 -0
- package/dist/cjs/time/adapters/yearsToDays.d.ts +6 -0
- package/dist/cjs/time/adapters/yearsToDays.js +22 -0
- package/dist/cjs/time/adapters/yearsToHours.d.ts +6 -0
- package/dist/cjs/time/adapters/yearsToHours.js +22 -0
- package/dist/cjs/time/adapters/yearsToMinutes.d.ts +6 -0
- package/dist/cjs/time/adapters/yearsToMinutes.js +22 -0
- package/dist/cjs/time/adapters/yearsToMonths.d.ts +6 -0
- package/dist/cjs/time/adapters/yearsToMonths.js +22 -0
- package/dist/cjs/time/adapters/yearsToSeconds.d.ts +6 -0
- package/dist/cjs/time/adapters/yearsToSeconds.js +22 -0
- package/dist/cjs/time/constants/TIME_UNIT_INFO.d.ts +5 -0
- package/dist/cjs/time/constants/TIME_UNIT_INFO.js +55 -0
- package/dist/cjs/time/constants/TIME_UNIT_INFO_LIST.d.ts +2 -0
- package/dist/cjs/time/constants/TIME_UNIT_INFO_LIST.js +13 -0
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY.d.ts +8 -0
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY.js +12 -0
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY_LABEL.d.ts +8 -0
- package/dist/cjs/time/constants/TIME_UNIT_PROPERTY_LABEL.js +12 -0
- package/dist/cjs/time/constants/index.d.ts +4 -0
- package/dist/cjs/time/constants/index.js +20 -0
- package/dist/cjs/time/index.d.ts +3 -0
- package/dist/cjs/time/index.js +19 -0
- package/dist/cjs/time/interfaces/ITimeUnitProperty.d.ts +2 -0
- package/dist/cjs/time/interfaces/ITimeUnitProperty.js +2 -0
- package/dist/cjs/time/interfaces/ITimeUnitPropertyInfo.d.ts +5 -0
- package/dist/cjs/time/interfaces/ITimeUnitPropertyInfo.js +2 -0
- package/dist/cjs/time/interfaces/index.d.ts +2 -0
- package/dist/cjs/{globalization/labels/columns → time/interfaces}/index.js +2 -1
- package/dist/columns/helpers/index.d.ts +1 -0
- package/dist/columns/helpers/index.js +1 -0
- package/dist/columns/helpers/isDurationColumn.d.ts +7 -0
- package/dist/columns/helpers/isDurationColumn.js +14 -0
- package/dist/columns/interfaces/IColumnPropertyType.d.ts +2 -1
- package/dist/dates/adapters/ISOToNumericOffset.d.ts +1 -1
- package/dist/dates/adapters/ISOToNumericOffset.js +1 -1
- package/dist/dates/adapters/dateToHms.d.ts +5 -4
- package/dist/dates/adapters/dateToHms.js +14 -14
- package/dist/dates/adapters/dateToMdyDate.d.ts +5 -3
- package/dist/dates/adapters/dateToMdyDate.js +3 -2
- package/dist/dates/adapters/dateToMonthYear.d.ts +5 -3
- package/dist/dates/adapters/dateToMonthYear.js +3 -2
- package/dist/dates/adapters/dateToQuarterYear.d.ts +5 -3
- package/dist/dates/adapters/dateToQuarterYear.js +3 -2
- package/dist/dates/adapters/dateToWeekYear.d.ts +5 -3
- package/dist/dates/adapters/dateToWeekYear.js +3 -2
- package/dist/dates/adapters/dateToYear.d.ts +5 -3
- package/dist/dates/adapters/dateToYear.js +3 -2
- package/dist/dates/adapters/hmsToDate.d.ts +5 -4
- package/dist/dates/adapters/hmsToDate.js +3 -3
- package/dist/dates/adapters/mdyDateToDate.d.ts +5 -4
- package/dist/dates/adapters/mdyDateToDate.js +3 -3
- package/dist/dates/adapters/monthYearToDate.d.ts +5 -4
- package/dist/dates/adapters/monthYearToDate.js +3 -3
- package/dist/dates/adapters/numericOffsetToISO.d.ts +1 -1
- package/dist/dates/adapters/numericOffsetToISO.js +1 -1
- package/dist/dates/adapters/quarterYearToDate.d.ts +5 -4
- package/dist/dates/adapters/quarterYearToDate.js +3 -3
- package/dist/dates/adapters/weekYearToDate.d.ts +5 -4
- package/dist/dates/adapters/weekYearToDate.js +3 -3
- package/dist/dates/adapters/yearToDate.d.ts +5 -4
- package/dist/dates/adapters/yearToDate.js +3 -3
- package/dist/dates/constants/ISO_8601_REGEX.d.ts +11 -0
- package/dist/dates/constants/ISO_8601_REGEX.js +12 -1
- package/dist/dates/helpers/areIncludedDateTokens.d.ts +3 -3
- package/dist/dates/helpers/areIncludedDateTokens.js +3 -3
- package/dist/dates/helpers/getDateByDateFormat.d.ts +6 -5
- package/dist/dates/helpers/getDateByDateFormat.js +4 -4
- package/dist/dates/helpers/getDateByTimezone.d.ts +4 -3
- package/dist/dates/helpers/getDateByTimezone.js +2 -2
- package/dist/dates/helpers/getDateByTimezoneOffset.d.ts +6 -3
- package/dist/dates/helpers/getDateByTimezoneOffset.js +3 -2
- package/dist/dates/helpers/getDateFormatByProperty.d.ts +2 -2
- package/dist/dates/helpers/getDateFormatByProperty.js +2 -2
- package/dist/dates/helpers/getDateFormatRegularExpressionInArray.d.ts +1 -1
- package/dist/dates/helpers/getDateFormatRegularExpressionInArray.js +1 -1
- package/dist/dates/helpers/getDefaultDateSettings.d.ts +2 -2
- package/dist/dates/helpers/getDefaultDateSettings.js +2 -2
- package/dist/dates/helpers/getFormattedDateByFormat.d.ts +6 -4
- package/dist/dates/helpers/getFormattedDateByFormat.js +4 -3
- package/dist/dates/helpers/getSeparatorByDateFormat.d.ts +1 -1
- package/dist/dates/helpers/getSeparatorByDateFormat.js +1 -1
- package/dist/dates/helpers/getTimezoneObject.d.ts +1 -1
- package/dist/dates/helpers/getTimezoneObject.js +5 -4
- package/dist/dates/helpers/getUTCFormatByOffset.d.ts +1 -0
- package/dist/dates/helpers/getUTCFormatByOffset.js +1 -0
- package/dist/dates/helpers/getWeek.d.ts +1 -1
- package/dist/dates/helpers/getWeek.js +1 -1
- package/dist/dates/helpers/isValidDateObject.d.ts +1 -1
- package/dist/dates/helpers/isValidDateObject.js +1 -1
- package/dist/dates/helpers/isValidISOOffset.d.ts +3 -2
- package/dist/dates/helpers/isValidISOOffset.js +3 -2
- package/dist/dates/helpers/isValidPotentialDate.d.ts +3 -2
- package/dist/dates/helpers/isValidPotentialDate.js +16 -1
- package/dist/dates/helpers/isValidTimezoneOffset.d.ts +1 -1
- package/dist/dates/helpers/isValidTimezoneOffset.js +15 -4
- package/dist/dates/helpers/validateDate.d.ts +3 -3
- package/dist/dates/helpers/validateDate.js +3 -3
- package/dist/dates/interfaces/IDate.d.ts +1 -0
- package/dist/dates/interfaces/IDate.js +1 -0
- package/dist/filters/adapters/FDToFlatUI.js +2 -1
- package/dist/filters/adapters/UIToOldLogic.js +1 -0
- package/dist/filters/adapters/logicToFlatUI.js +4 -4
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +2 -0
- package/dist/filters/helpers/backend/getBackendValues.js +3 -1
- package/dist/filters/helpers/common/adaptTimeUnitValuesFromFilters.d.ts +11 -0
- package/dist/filters/helpers/common/adaptTimeUnitValuesFromFilters.js +25 -0
- package/dist/filters/helpers/common/getVerboseFilters.d.ts +1 -1
- package/dist/filters/helpers/common/getVerboseFilters.js +63 -26
- package/dist/filters/helpers/common/index.d.ts +1 -0
- package/dist/filters/helpers/common/index.js +1 -0
- package/dist/filters/helpers/common/resolveDatasetConditions.js +5 -0
- package/dist/filters/helpers/common/resolveFilterConditions.js +5 -0
- package/dist/filters/helpers/common/resolveScopeConditions.js +5 -0
- package/dist/filters/helpers/settings/getFilterSettings.js +1 -6
- package/dist/filters/interfaces/OLD_IFilterDetail.d.ts +4 -0
- package/dist/filters/interfaces/builder/IFilterBuilderSettings.d.ts +5 -0
- package/dist/filters/interfaces/common/IFSParamsToGetFilter.d.ts +2 -0
- package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +9 -0
- package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +1 -0
- package/dist/filters/interfaces/common/index.d.ts +1 -0
- package/dist/filters/interfaces/common/index.js +1 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +1 -0
- package/dist/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +1 -0
- package/dist/format/definition.d.ts +1 -0
- package/dist/format/definition.js +1 -0
- package/dist/format/duration/convertTimeUnit.d.ts +15 -0
- package/dist/format/duration/convertTimeUnit.js +27 -0
- package/dist/format/duration/index.d.ts +1 -0
- package/dist/format/duration/index.js +1 -0
- package/dist/globalization/interfaces/common/I18nTimeUnitProperties.d.ts +10 -0
- package/dist/globalization/interfaces/common/I18nTimeUnitProperties.js +1 -0
- package/dist/globalization/interfaces/common/II18nCommon.d.ts +2 -0
- package/dist/globalization/interfaces/common/index.d.ts +1 -0
- package/dist/globalization/interfaces/common/index.js +1 -0
- package/dist/globalization/interfaces/tabular_view/II18nTabularView.d.ts +1 -0
- package/dist/globalization/labels/common/I18N_COMMON.js +2 -0
- package/dist/globalization/labels/common/I18N_TIME_UNITS.d.ts +2 -0
- package/dist/globalization/labels/common/I18N_TIME_UNITS.js +11 -0
- package/dist/globalization/labels/index.d.ts +0 -1
- package/dist/globalization/labels/index.js +0 -1
- package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/qrvey/helpers/getPropertyLabel.d.ts +7 -0
- package/dist/qrvey/helpers/getPropertyLabel.js +14 -3
- package/dist/time/adapters/adaptTimeUnitNumbers.d.ts +9 -0
- package/dist/time/adapters/adaptTimeUnitNumbers.js +200 -0
- package/dist/time/adapters/daysToHours.d.ts +6 -0
- package/dist/time/adapters/daysToHours.js +15 -0
- package/dist/time/adapters/daysToMinutes.d.ts +6 -0
- package/dist/time/adapters/daysToMinutes.js +15 -0
- package/dist/time/adapters/daysToMonths.d.ts +6 -0
- package/dist/time/adapters/daysToMonths.js +15 -0
- package/dist/time/adapters/daysToSeconds.d.ts +6 -0
- package/dist/time/adapters/daysToSeconds.js +15 -0
- package/dist/time/adapters/daysToYears.d.ts +6 -0
- package/dist/time/adapters/daysToYears.js +15 -0
- package/dist/time/adapters/hoursToDays.d.ts +6 -0
- package/dist/time/adapters/hoursToDays.js +15 -0
- package/dist/time/adapters/hoursToMinutes.d.ts +6 -0
- package/dist/time/adapters/hoursToMinutes.js +15 -0
- package/dist/time/adapters/hoursToMonths.d.ts +6 -0
- package/dist/time/adapters/hoursToMonths.js +15 -0
- package/dist/time/adapters/hoursToSeconds.d.ts +6 -0
- package/dist/time/adapters/hoursToSeconds.js +15 -0
- package/dist/time/adapters/hoursToYears.d.ts +6 -0
- package/dist/time/adapters/hoursToYears.js +15 -0
- package/dist/time/adapters/index.d.ts +31 -0
- package/dist/time/adapters/index.js +31 -0
- package/dist/time/adapters/minutesToDays.d.ts +6 -0
- package/dist/time/adapters/minutesToDays.js +15 -0
- package/dist/time/adapters/minutesToHours.d.ts +6 -0
- package/dist/time/adapters/minutesToHours.js +15 -0
- package/dist/time/adapters/minutesToMonths.d.ts +6 -0
- package/dist/time/adapters/minutesToMonths.js +15 -0
- package/dist/time/adapters/minutesToSeconds.d.ts +6 -0
- package/dist/time/adapters/minutesToSeconds.js +15 -0
- package/dist/time/adapters/minutesToYears.d.ts +6 -0
- package/dist/time/adapters/minutesToYears.js +15 -0
- package/dist/time/adapters/monthsToDays.d.ts +6 -0
- package/dist/time/adapters/monthsToDays.js +15 -0
- package/dist/time/adapters/monthsToHours.d.ts +6 -0
- package/dist/time/adapters/monthsToHours.js +15 -0
- package/dist/time/adapters/monthsToMinutes.d.ts +6 -0
- package/dist/time/adapters/monthsToMinutes.js +15 -0
- package/dist/time/adapters/monthsToSeconds.d.ts +6 -0
- package/dist/time/adapters/monthsToSeconds.js +15 -0
- package/dist/time/adapters/monthsToYears.d.ts +6 -0
- package/dist/time/adapters/monthsToYears.js +15 -0
- package/dist/time/adapters/secondsToDays.d.ts +6 -0
- package/dist/time/adapters/secondsToDays.js +15 -0
- package/dist/time/adapters/secondsToHours.d.ts +6 -0
- package/dist/time/adapters/secondsToHours.js +15 -0
- package/dist/time/adapters/secondsToMinutes.d.ts +6 -0
- package/dist/time/adapters/secondsToMinutes.js +15 -0
- package/dist/time/adapters/secondsToMonths.d.ts +6 -0
- package/dist/time/adapters/secondsToMonths.js +15 -0
- package/dist/time/adapters/secondsToYears.d.ts +6 -0
- package/dist/time/adapters/secondsToYears.js +15 -0
- package/dist/time/adapters/yearsToDays.d.ts +6 -0
- package/dist/time/adapters/yearsToDays.js +15 -0
- package/dist/time/adapters/yearsToHours.d.ts +6 -0
- package/dist/time/adapters/yearsToHours.js +15 -0
- package/dist/time/adapters/yearsToMinutes.d.ts +6 -0
- package/dist/time/adapters/yearsToMinutes.js +15 -0
- package/dist/time/adapters/yearsToMonths.d.ts +6 -0
- package/dist/time/adapters/yearsToMonths.js +15 -0
- package/dist/time/adapters/yearsToSeconds.d.ts +6 -0
- package/dist/time/adapters/yearsToSeconds.js +15 -0
- package/dist/time/constants/TIME_UNIT_INFO.d.ts +5 -0
- package/dist/time/constants/TIME_UNIT_INFO.js +52 -0
- package/dist/time/constants/TIME_UNIT_INFO_LIST.d.ts +2 -0
- package/dist/time/constants/TIME_UNIT_INFO_LIST.js +10 -0
- package/dist/time/constants/TIME_UNIT_PROPERTY.d.ts +8 -0
- package/dist/time/constants/TIME_UNIT_PROPERTY.js +9 -0
- package/dist/time/constants/TIME_UNIT_PROPERTY_LABEL.d.ts +8 -0
- package/dist/time/constants/TIME_UNIT_PROPERTY_LABEL.js +9 -0
- package/dist/time/constants/index.d.ts +4 -0
- package/dist/time/constants/index.js +4 -0
- package/dist/time/index.d.ts +3 -0
- package/dist/time/index.js +3 -0
- package/dist/time/interfaces/ITimeUnitProperty.d.ts +2 -0
- package/dist/time/interfaces/ITimeUnitProperty.js +1 -0
- package/dist/time/interfaces/ITimeUnitPropertyInfo.d.ts +5 -0
- package/dist/time/interfaces/ITimeUnitPropertyInfo.js +1 -0
- package/dist/time/interfaces/index.d.ts +2 -0
- package/dist/time/interfaces/index.js +2 -0
- package/package.json +1 -1
- package/dist/cjs/globalization/labels/columns/I18N_COLUMN.d.ts +0 -2
- package/dist/cjs/globalization/labels/columns/I18N_COLUMN.js +0 -8
- package/dist/cjs/globalization/labels/columns/index.d.ts +0 -1
- package/dist/globalization/labels/columns/I18N_COLUMN.d.ts +0 -2
- package/dist/globalization/labels/columns/I18N_COLUMN.js +0 -5
- package/dist/globalization/labels/columns/index.d.ts +0 -1
- package/dist/globalization/labels/columns/index.js +0 -1
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @example -12:00
|
|
3
|
+
* @example -01:00
|
|
4
|
+
* @example 00:00
|
|
5
|
+
* @example +00:00
|
|
6
|
+
* @example -00:00
|
|
7
|
+
* @example +05:00
|
|
8
|
+
* @example +12:00
|
|
9
|
+
* @example +13:59
|
|
10
|
+
* @example +14:00
|
|
11
|
+
*/
|
|
12
|
+
export const ISO_8601_REGEX = /^(-(0[0-9]|1[0-2]):[0-5][0-9]|[+]?(0[0-9]|1[0-3]):[0-5][0-9]|\+14:00)?$/;
|
|
@@ -2,8 +2,8 @@ import { IDateFormat } from "../interfaces/IDateFormat";
|
|
|
2
2
|
/**
|
|
3
3
|
* Determines if the given date has tokens. The date is splitted depending on date format.
|
|
4
4
|
* Undefined date is returning false.
|
|
5
|
-
* @param date The string of the date. It may contain tokens.
|
|
6
|
-
* @param format The date format
|
|
7
|
-
* @returns true: include tokens; false: otherwise
|
|
5
|
+
* @param {string }date The string of the date. It may contain tokens.
|
|
6
|
+
* @param {IDateFormat} format The date format
|
|
7
|
+
* @returns {boolean} true: include tokens; false: otherwise
|
|
8
8
|
*/
|
|
9
9
|
export declare function areIncludedDateTokens(date: string, format?: IDateFormat): boolean;
|
|
@@ -5,9 +5,9 @@ import { getSeparatorByDateFormat } from "./getSeparatorByDateFormat";
|
|
|
5
5
|
/**
|
|
6
6
|
* Determines if the given date has tokens. The date is splitted depending on date format.
|
|
7
7
|
* Undefined date is returning false.
|
|
8
|
-
* @param date The string of the date. It may contain tokens.
|
|
9
|
-
* @param format The date format
|
|
10
|
-
* @returns true: include tokens; false: otherwise
|
|
8
|
+
* @param {string }date The string of the date. It may contain tokens.
|
|
9
|
+
* @param {IDateFormat} format The date format
|
|
10
|
+
* @returns {boolean} true: include tokens; false: otherwise
|
|
11
11
|
*/
|
|
12
12
|
export function areIncludedDateTokens(date, format = DATE_FORMAT.DAY) {
|
|
13
13
|
let hasTokens = false;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IDateFormat } from "../interfaces/IDateFormat";
|
|
2
2
|
import { IDateSettings } from "../interfaces/IDateSettings";
|
|
3
|
+
import { IDate } from "../interfaces/IDate";
|
|
3
4
|
/**
|
|
4
5
|
* Gets a Date Object instance by a Date format
|
|
5
|
-
* @param date String with a formatted date
|
|
6
|
-
* @param format The date format
|
|
7
|
-
* @param
|
|
8
|
-
* @returns a Date object, milisecond time or the same value if date format does not match.
|
|
6
|
+
* @param {string} date String with a formatted date
|
|
7
|
+
* @param {IDateFormat} format The date format
|
|
8
|
+
* @param {IDateSettings} settings the configuration of dates
|
|
9
|
+
* @returns {IDate} a Date object, milisecond time or the same value if date format does not match.
|
|
9
10
|
*/
|
|
10
|
-
export declare function getDateByDateFormat(date: string, format: IDateFormat, settings?: IDateSettings):
|
|
11
|
+
export declare function getDateByDateFormat(date: string, format: IDateFormat, settings?: IDateSettings): IDate;
|
|
@@ -6,10 +6,10 @@ import { weekYearToDate } from "../adapters/weekYearToDate";
|
|
|
6
6
|
import { mdyDateToDate } from "../adapters/mdyDateToDate";
|
|
7
7
|
/**
|
|
8
8
|
* Gets a Date Object instance by a Date format
|
|
9
|
-
* @param date String with a formatted date
|
|
10
|
-
* @param format The date format
|
|
11
|
-
* @param
|
|
12
|
-
* @returns a Date object, milisecond time or the same value if date format does not match.
|
|
9
|
+
* @param {string} date String with a formatted date
|
|
10
|
+
* @param {IDateFormat} format The date format
|
|
11
|
+
* @param {IDateSettings} settings the configuration of dates
|
|
12
|
+
* @returns {IDate} a Date object, milisecond time or the same value if date format does not match.
|
|
13
13
|
*/
|
|
14
14
|
export function getDateByDateFormat(date, format, settings) {
|
|
15
15
|
switch (format) {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IDTimezone } from "../interfaces/IDTimezone";
|
|
2
|
+
import { IDate } from "../interfaces/IDate";
|
|
2
3
|
/**
|
|
3
4
|
* Gets a date value in the given timezone
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {IDate} date the date
|
|
5
6
|
* @param {IDTimezone} timezone the timezone object
|
|
6
|
-
* @returns {
|
|
7
|
+
* @returns {IDate} A transformed value
|
|
7
8
|
*/
|
|
8
|
-
export declare function getDateByTimezone(date:
|
|
9
|
+
export declare function getDateByTimezone(date: IDate, timezone: IDTimezone): IDate;
|
|
@@ -6,9 +6,9 @@ import { isValidPotentialDate } from "./isValidPotentialDate";
|
|
|
6
6
|
import { validateDate } from "./validateDate";
|
|
7
7
|
/**
|
|
8
8
|
* Gets a date value in the given timezone
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {IDate} date the date
|
|
10
10
|
* @param {IDTimezone} timezone the timezone object
|
|
11
|
-
* @returns {
|
|
11
|
+
* @returns {IDate} A transformed value
|
|
12
12
|
*/
|
|
13
13
|
export function getDateByTimezone(date, timezone) {
|
|
14
14
|
const defaultTimezone = getTimezoneObject(timezone);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { IDTimezoneOffset } from "../interfaces/IDTimezoneOffset";
|
|
2
|
+
import { IDate } from "../interfaces/IDate";
|
|
1
3
|
/**
|
|
2
4
|
* Gets a Date with the given offset of the Timezone.
|
|
3
5
|
* 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
|
-
* @
|
|
6
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
7
|
+
* @param {IDTimezoneOffset} offset the timezone offset
|
|
8
|
+
* @returns {IDate} the updated Date object
|
|
6
9
|
*/
|
|
7
|
-
export declare function getDateByTimezoneOffset(date:
|
|
10
|
+
export declare function getDateByTimezoneOffset(date: IDate, offset?: IDTimezoneOffset): IDate;
|
|
@@ -6,8 +6,9 @@ import { validateDate } from "./validateDate";
|
|
|
6
6
|
/**
|
|
7
7
|
* Gets a Date with the given offset of the Timezone.
|
|
8
8
|
* No given an offset the default is going to be set by the browser
|
|
9
|
-
* @param date String, object or millisencond number of the date
|
|
10
|
-
* @
|
|
9
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
10
|
+
* @param {IDTimezoneOffset} offset the timezone offset
|
|
11
|
+
* @returns {IDate} the updated Date object
|
|
11
12
|
*/
|
|
12
13
|
export function getDateByTimezoneOffset(date, offset) {
|
|
13
14
|
if (!isValidPotentialDate(date) ||
|
|
@@ -2,7 +2,7 @@ import { IColumnPropertyType } from "../../columns/interfaces/IColumnPropertyTyp
|
|
|
2
2
|
import { IDateFormat } from "../interfaces/IDateFormat";
|
|
3
3
|
/**
|
|
4
4
|
* Gets the date format by the given property
|
|
5
|
-
* @param property The Column Property
|
|
6
|
-
* @returns The date format
|
|
5
|
+
* @param {IColumnPropertyType} property The Column Property
|
|
6
|
+
* @returns {IDateFormat} The date format
|
|
7
7
|
*/
|
|
8
8
|
export declare function getDateFormatByProperty(property: IColumnPropertyType): IDateFormat;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DATE_FORMAT_BY_PROPERTY } from "../constants/DATE_FORMAT_BY_PROPERTY";
|
|
2
2
|
/**
|
|
3
3
|
* Gets the date format by the given property
|
|
4
|
-
* @param property The Column Property
|
|
5
|
-
* @returns The date format
|
|
4
|
+
* @param {IColumnPropertyType} property The Column Property
|
|
5
|
+
* @returns {IDateFormat} The date format
|
|
6
6
|
*/
|
|
7
7
|
export function getDateFormatByProperty(property) {
|
|
8
8
|
return DATE_FORMAT_BY_PROPERTY[property];
|
|
@@ -3,6 +3,6 @@ import { IDateFormat } from "../interfaces/IDateFormat";
|
|
|
3
3
|
* Gets an array of regular expressions by the given date format.
|
|
4
4
|
* Day format is the default date format
|
|
5
5
|
* @param {IDateFormat} dateFormat an string of the format
|
|
6
|
-
* @returns an array of regular expressions
|
|
6
|
+
* @returns {string[]} an array of regular expressions
|
|
7
7
|
*/
|
|
8
8
|
export declare function getDateFormatRegularExpressionInArray(dateFormat?: IDateFormat): string[];
|
|
@@ -5,7 +5,7 @@ import { DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT } from "../constants/DATE_REGUL
|
|
|
5
5
|
* Gets an array of regular expressions by the given date format.
|
|
6
6
|
* Day format is the default date format
|
|
7
7
|
* @param {IDateFormat} dateFormat an string of the format
|
|
8
|
-
* @returns an array of regular expressions
|
|
8
|
+
* @returns {string[]} an array of regular expressions
|
|
9
9
|
*/
|
|
10
10
|
export function getDateFormatRegularExpressionInArray(dateFormat = DATE_FORMAT.DAY) {
|
|
11
11
|
const defaultRegularExpression = DATE_REGULAR_EXPRESSION_ARRAY_BY_FORMAT[DATE_FORMAT.DAY];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IDateSettings } from "../interfaces/IDateSettings";
|
|
2
2
|
/**
|
|
3
3
|
* Gets the default properties for Date Settings object
|
|
4
|
-
* @param settings the
|
|
5
|
-
* @returns a new object with the date settings.
|
|
4
|
+
* @param {IDateSettings} settings the configuration of dates
|
|
5
|
+
* @returns {IDateSettings} a new object with the date settings.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getDefaultDateSettings(settings: IDateSettings): IDateSettings;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getTimezoneObject } from "./getTimezoneObject";
|
|
2
2
|
/**
|
|
3
3
|
* Gets the default properties for Date Settings object
|
|
4
|
-
* @param settings the
|
|
5
|
-
* @returns a new object with the date settings.
|
|
4
|
+
* @param {IDateSettings} settings the configuration of dates
|
|
5
|
+
* @returns {IDateSettings} a new object with the date settings.
|
|
6
6
|
*/
|
|
7
7
|
export function getDefaultDateSettings(settings) {
|
|
8
8
|
var _a;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { IDate } from "../interfaces/IDate";
|
|
1
2
|
import { IDateFormat } from "../interfaces/IDateFormat";
|
|
2
3
|
import { IDateSettings } from "../interfaces/IDateSettings";
|
|
3
4
|
/**
|
|
4
5
|
* A Date object, string or millisecond number are gotten in order to convert it in an formatted string date
|
|
5
6
|
* - Some strings are valid
|
|
6
|
-
* @param date String with a formatted date
|
|
7
|
-
* @param format The date format
|
|
8
|
-
* @
|
|
7
|
+
* @param {IDate} date String with a formatted date
|
|
8
|
+
* @param {IDateFormat} format The date format
|
|
9
|
+
* @param {IDateSettings} settings the configuration of dates
|
|
10
|
+
* @returns {IDate} a formmatted date or the same value if format does not match
|
|
9
11
|
*/
|
|
10
|
-
export declare function getFormattedDateByFormat(date:
|
|
12
|
+
export declare function getFormattedDateByFormat(date: IDate, format: IDateFormat, settings?: IDateSettings): IDate;
|
|
@@ -7,9 +7,10 @@ import { DATE_FORMAT } from "../constants/DATE_FORMAT";
|
|
|
7
7
|
/**
|
|
8
8
|
* A Date object, string or millisecond number are gotten in order to convert it in an formatted string date
|
|
9
9
|
* - Some strings are valid
|
|
10
|
-
* @param date String with a formatted date
|
|
11
|
-
* @param format The date format
|
|
12
|
-
* @
|
|
10
|
+
* @param {IDate} date String with a formatted date
|
|
11
|
+
* @param {IDateFormat} format The date format
|
|
12
|
+
* @param {IDateSettings} settings the configuration of dates
|
|
13
|
+
* @returns {IDate} a formmatted date or the same value if format does not match
|
|
13
14
|
*/
|
|
14
15
|
export function getFormattedDateByFormat(date, format, settings) {
|
|
15
16
|
switch (format) {
|
|
@@ -2,6 +2,6 @@ import { IDateFormat } from "../interfaces/IDateFormat";
|
|
|
2
2
|
/**
|
|
3
3
|
* Gets the separator of the date format
|
|
4
4
|
* @param {IDateFormat} format the date format
|
|
5
|
-
* @returns a separator string
|
|
5
|
+
* @returns {string} a separator string
|
|
6
6
|
*/
|
|
7
7
|
export declare function getSeparatorByDateFormat(format?: IDateFormat): string;
|
|
@@ -2,7 +2,7 @@ import { DATE_FORMAT } from "../constants/DATE_FORMAT";
|
|
|
2
2
|
/**
|
|
3
3
|
* Gets the separator of the date format
|
|
4
4
|
* @param {IDateFormat} format the date format
|
|
5
|
-
* @returns a separator string
|
|
5
|
+
* @returns {string} a separator string
|
|
6
6
|
*/
|
|
7
7
|
export function getSeparatorByDateFormat(format = DATE_FORMAT.DAY) {
|
|
8
8
|
return format === DATE_FORMAT.DAY ? "/" : " ";
|
|
@@ -6,6 +6,6 @@ import { IDTimezone } from "../interfaces/IDTimezone";
|
|
|
6
6
|
* - In any case, the offset is prioritized to override other properties.
|
|
7
7
|
* @param {IDTimezone} timezone the timezone object
|
|
8
8
|
* @param {IModel | IDataset} model the info of the dataset (model)
|
|
9
|
-
* @returns a new timezone object
|
|
9
|
+
* @returns {IDTimezone} a new timezone object
|
|
10
10
|
*/
|
|
11
11
|
export declare function getTimezoneObject(timezone: IDTimezone, model?: IModel | IDataset): IDTimezone;
|
|
@@ -10,7 +10,7 @@ import { isValidTimezoneOffset } from "./isValidTimezoneOffset";
|
|
|
10
10
|
* - In any case, the offset is prioritized to override other properties.
|
|
11
11
|
* @param {IDTimezone} timezone the timezone object
|
|
12
12
|
* @param {IModel | IDataset} model the info of the dataset (model)
|
|
13
|
-
* @returns a new timezone object
|
|
13
|
+
* @returns {IDTimezone} a new timezone object
|
|
14
14
|
*/
|
|
15
15
|
export function getTimezoneObject(timezone, model) {
|
|
16
16
|
const offset = getOffset(timezone, model);
|
|
@@ -64,8 +64,9 @@ function getType(timezone, model, offset) {
|
|
|
64
64
|
if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.type)) {
|
|
65
65
|
type = timezone.type;
|
|
66
66
|
}
|
|
67
|
-
else if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.offset)
|
|
68
|
-
|
|
67
|
+
else if (!isEmpty(timezone === null || timezone === void 0 ? void 0 : timezone.offset) &&
|
|
68
|
+
isValidTimezoneOffset(timezone.offset)) {
|
|
69
|
+
type = getTypeByOffset(timezone.offset);
|
|
69
70
|
}
|
|
70
71
|
else if (!isEmpty((_a = model === null || model === void 0 ? void 0 : model.timezone) === null || _a === void 0 ? void 0 : _a.type)) {
|
|
71
72
|
type = model.timezone.type;
|
|
@@ -85,7 +86,7 @@ function getType(timezone, model, offset) {
|
|
|
85
86
|
* @returns {IDTimezoneType} the right timezone type for the offset
|
|
86
87
|
*/
|
|
87
88
|
function getTypeByOffset(offset) {
|
|
88
|
-
if (offset === "+00:00") {
|
|
89
|
+
if (offset === "+00:00" || offset === "00:00" || offset === "-00:00") {
|
|
89
90
|
return TIMEZONE_TYPE.DEFAULT;
|
|
90
91
|
}
|
|
91
92
|
else if (offset === "browser") {
|
|
@@ -2,6 +2,7 @@ import { IDTimezone } from "../interfaces/IDTimezone";
|
|
|
2
2
|
/**
|
|
3
3
|
* Gets the UTC format dependeing on the given offset
|
|
4
4
|
* @param {IDTimezone} timezone the timezone object
|
|
5
|
+
* @param {boolean} minified Flag to reduce the Zeros
|
|
5
6
|
* @returns {string} an string with the UTC format
|
|
6
7
|
*/
|
|
7
8
|
export declare function getUTCFormatByOffset(timezone: IDTimezone, minified?: boolean): string;
|
|
@@ -3,6 +3,7 @@ import { numericOffsetToISO } from "../adapters/numericOffsetToISO";
|
|
|
3
3
|
/**
|
|
4
4
|
* Gets the UTC format dependeing on the given offset
|
|
5
5
|
* @param {IDTimezone} timezone the timezone object
|
|
6
|
+
* @param {boolean} minified Flag to reduce the Zeros
|
|
6
7
|
* @returns {string} an string with the UTC format
|
|
7
8
|
*/
|
|
8
9
|
export function getUTCFormatByOffset(timezone, minified = false) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Gets the week number of the year
|
|
3
3
|
* Additionally, the month and the year
|
|
4
4
|
* @param {Date} date the date object
|
|
5
|
-
* @returns an object with the week, month and year or undefined if the date is not valid.
|
|
5
|
+
* @returns {IDateWeek} an object with the week, month and year or undefined if the date is not valid.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getWeek(date: Date): IDateWeek;
|
|
8
8
|
interface IDateWeek {
|
|
@@ -3,7 +3,7 @@ import { isValidDateObject } from "./isValidDateObject";
|
|
|
3
3
|
* Gets the week number of the year
|
|
4
4
|
* Additionally, the month and the year
|
|
5
5
|
* @param {Date} date the date object
|
|
6
|
-
* @returns an object with the week, month and year or undefined if the date is not valid.
|
|
6
|
+
* @returns {IDateWeek} an object with the week, month and year or undefined if the date is not valid.
|
|
7
7
|
*/
|
|
8
8
|
export function getWeek(date) {
|
|
9
9
|
if (!isValidDateObject(date))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If the date is a valid Date object, return true, otherwise return false.
|
|
3
3
|
* @param {Date} date - The date object to check.
|
|
4
|
-
* @returns
|
|
4
|
+
* @returns {boolean} True: The Date object is valid
|
|
5
5
|
*/
|
|
6
6
|
export declare function isValidDateObject(date: Date): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* If the date is a valid Date object, return true, otherwise return false.
|
|
3
3
|
* @param {Date} date - The date object to check.
|
|
4
|
-
* @returns
|
|
4
|
+
* @returns {boolean} True: The Date object is valid
|
|
5
5
|
*/
|
|
6
6
|
export function isValidDateObject(date) {
|
|
7
7
|
return date instanceof Date && !isNaN(date.getTime());
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { IDTimezoneOffset } from "../interfaces/IDTimezoneOffset";
|
|
1
2
|
/**
|
|
2
3
|
* Validate if offset uses a valid ISO 8601 offset specification
|
|
3
4
|
* - If the given offset is a numeric, returns an invalid flag.
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {IDTimezoneOffset} offset the timezone offset
|
|
5
6
|
* @returns {boolean} true if the given offset is valid
|
|
6
7
|
*/
|
|
7
|
-
export declare function isValidISOOffset(offset:
|
|
8
|
+
export declare function isValidISOOffset(offset: IDTimezoneOffset): boolean;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { isEmpty } from "../../general/mix/isEmpty";
|
|
1
2
|
import { ISO_8601_REGEX } from "../constants/ISO_8601_REGEX";
|
|
2
3
|
/**
|
|
3
4
|
* Validate if offset uses a valid ISO 8601 offset specification
|
|
4
5
|
* - If the given offset is a numeric, returns an invalid flag.
|
|
5
|
-
* @param {
|
|
6
|
+
* @param {IDTimezoneOffset} offset the timezone offset
|
|
6
7
|
* @returns {boolean} true if the given offset is valid
|
|
7
8
|
*/
|
|
8
9
|
export function isValidISOOffset(offset) {
|
|
9
|
-
if (typeof offset !== "string")
|
|
10
|
+
if (isEmpty(offset) || typeof offset !== "string")
|
|
10
11
|
return false;
|
|
11
12
|
const newOffset = (offset || "").trim();
|
|
12
13
|
return ISO_8601_REGEX.test(newOffset);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { IDate } from "../interfaces/IDate";
|
|
1
2
|
/**
|
|
2
3
|
* Checks if the given date is allowed to continue the process for adapting dates
|
|
3
4
|
* - If the string is a token or a combination of tokens is not valid
|
|
4
|
-
* @param {
|
|
5
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
5
6
|
* @returns true: the date is valid.
|
|
6
7
|
*/
|
|
7
|
-
export declare function isValidPotentialDate(date:
|
|
8
|
+
export declare function isValidPotentialDate(date: IDate): boolean;
|
|
@@ -4,7 +4,7 @@ import { areIncludedDateTokens } from "./areIncludedDateTokens";
|
|
|
4
4
|
/**
|
|
5
5
|
* Checks if the given date is allowed to continue the process for adapting dates
|
|
6
6
|
* - If the string is a token or a combination of tokens is not valid
|
|
7
|
-
* @param {
|
|
7
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
8
8
|
* @returns true: the date is valid.
|
|
9
9
|
*/
|
|
10
10
|
export function isValidPotentialDate(date) {
|
|
@@ -12,12 +12,27 @@ export function isValidPotentialDate(date) {
|
|
|
12
12
|
!includingDateTokens(date) &&
|
|
13
13
|
(isDateInstance(date) || isStringDate(date) || typeof date === "number"));
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Validates if the given date has tokens
|
|
17
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
18
|
+
* @returns {boolean} true: the date has tokens
|
|
19
|
+
*/
|
|
15
20
|
function includingDateTokens(date) {
|
|
16
21
|
return DATE_FORMATS.some((dateFormat) => areIncludedDateTokens(date, dateFormat));
|
|
17
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates if the given date is a date instance
|
|
25
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
26
|
+
* @returns {boolean} true: the date is a date instance
|
|
27
|
+
*/
|
|
18
28
|
function isDateInstance(date) {
|
|
19
29
|
return date instanceof Date && !isNaN(date);
|
|
20
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Validates if the given date is a string date
|
|
33
|
+
* @param {IDate} date String, object or millisencond number of the date
|
|
34
|
+
* @returns {boolean} true: the date is a string date
|
|
35
|
+
*/
|
|
21
36
|
function isStringDate(date) {
|
|
22
37
|
return (typeof date === "string" && new Date(date).toString() !== "Invalid Date");
|
|
23
38
|
}
|
|
@@ -2,6 +2,6 @@ import { IDTimezoneOffset } from "../interfaces/IDTimezoneOffset";
|
|
|
2
2
|
/**
|
|
3
3
|
* Validates if the given param is a valid timezone offset
|
|
4
4
|
* @param {IDTimezoneOffset} offset the timezone offset
|
|
5
|
-
* @returns true: is valid.
|
|
5
|
+
* @returns {boolean} true: is valid timezone offset.
|
|
6
6
|
*/
|
|
7
7
|
export declare function isValidTimezoneOffset(offset: IDTimezoneOffset): boolean;
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
import { isNaNV2 } from "../../general";
|
|
1
|
+
import { isNaNV2 } from "../../general/mix/isNaNV2";
|
|
2
|
+
import { ISOToNumericOffset } from "../adapters/ISOToNumericOffset";
|
|
2
3
|
import { isValidISOOffset } from "./isValidISOOffset";
|
|
3
4
|
/**
|
|
4
5
|
* Validates if the given param is a valid timezone offset
|
|
5
6
|
* @param {IDTimezoneOffset} offset the timezone offset
|
|
6
|
-
* @returns true: is valid.
|
|
7
|
+
* @returns {boolean} true: is valid timezone offset.
|
|
7
8
|
*/
|
|
8
9
|
export function isValidTimezoneOffset(offset) {
|
|
9
10
|
if (typeof offset === "string") {
|
|
10
|
-
return offset === "browser" ||
|
|
11
|
+
return (offset === "browser" ||
|
|
12
|
+
(isValidISOOffset(offset) && isValidOffsetRange(offset)));
|
|
11
13
|
}
|
|
12
14
|
if (typeof offset === "number") {
|
|
13
|
-
return !isNaNV2(offset);
|
|
15
|
+
return !isNaNV2(offset) && isValidOffsetRange(offset);
|
|
14
16
|
}
|
|
15
17
|
return false;
|
|
16
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates if the given offset is in the timezone range
|
|
21
|
+
* @param {IDTimezoneOffset} offset the timezone offset
|
|
22
|
+
* @returns {boolean} true: the offset is in the timezone range
|
|
23
|
+
*/
|
|
24
|
+
function isValidOffsetRange(offset) {
|
|
25
|
+
const numericOffset = ISOToNumericOffset(offset);
|
|
26
|
+
return -720 <= numericOffset && numericOffset <= 840;
|
|
27
|
+
}
|
|
@@ -4,8 +4,8 @@ import { IDateFormat } from "../interfaces/IDateFormat";
|
|
|
4
4
|
* - If the string is a token label, the function lets it pass.
|
|
5
5
|
* - Otherwise depends of the format
|
|
6
6
|
* - Some escenarios the string is a mix of token labels and dates
|
|
7
|
-
* @param date String of date
|
|
8
|
-
* @param format String of the format to validate
|
|
9
|
-
* @returns True if it is valid or not. Undefined if date is undefined
|
|
7
|
+
* @param {string} date String of date
|
|
8
|
+
* @param {IDateFormat} format String of the format to validate
|
|
9
|
+
* @returns {boolean} True if it is valid or not. Undefined if date is undefined
|
|
10
10
|
*/
|
|
11
11
|
export declare function validateDate(date: string, format?: IDateFormat): boolean;
|
|
@@ -8,9 +8,9 @@ import { getSeparatorByDateFormat } from "./getSeparatorByDateFormat";
|
|
|
8
8
|
* - If the string is a token label, the function lets it pass.
|
|
9
9
|
* - Otherwise depends of the format
|
|
10
10
|
* - Some escenarios the string is a mix of token labels and dates
|
|
11
|
-
* @param date String of date
|
|
12
|
-
* @param format String of the format to validate
|
|
13
|
-
* @returns True if it is valid or not. Undefined if date is undefined
|
|
11
|
+
* @param {string} date String of date
|
|
12
|
+
* @param {IDateFormat} format String of the format to validate
|
|
13
|
+
* @returns {boolean} True if it is valid or not. Undefined if date is undefined
|
|
14
14
|
*/
|
|
15
15
|
export function validateDate(date, format = DATE_FORMAT.DAY) {
|
|
16
16
|
if (isEmpty(date) || typeof date !== "string")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IDate = Date | string | number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -36,6 +36,7 @@ function FD21ToFlatUI(scopes = [], datasetsInfo = []) {
|
|
|
36
36
|
scope.datasets.forEach((dataset) => {
|
|
37
37
|
if (dataset.filters.length > 0) {
|
|
38
38
|
dataset.filters.forEach((filter) => {
|
|
39
|
+
var _a;
|
|
39
40
|
const datasetInfo = datasetsInfo.find((dInfo) => dInfo.qrveyid === dataset.qrveyid);
|
|
40
41
|
let columnInfo;
|
|
41
42
|
if (!isEmpty(datasetInfo))
|
|
@@ -61,7 +62,7 @@ function FD21ToFlatUI(scopes = [], datasetsInfo = []) {
|
|
|
61
62
|
type: (columnInfo === null || columnInfo === void 0 ? void 0 : columnInfo.type) || filter.column.type,
|
|
62
63
|
},
|
|
63
64
|
dateSection: filter.dateSection,
|
|
64
|
-
displayed: filter.displayed,
|
|
65
|
+
displayed: (_a = filter.displayed) !== null && _a !== void 0 ? _a : true,
|
|
65
66
|
enabled: filter.enabled,
|
|
66
67
|
extras: Object.assign(Object.assign({}, filter.extras), { panelid: filter.extras.panelid, filterLabel: filter.extras.filterLabel, info, scope: filter.extras.scope, scopeid: filter.extras.scopeid, section: filter.extras.section, scopeInfo: {
|
|
67
68
|
collapsed: scope.collapsed,
|
|
@@ -61,7 +61,7 @@ function buildFilterByExpression(expression, scopeItem, uFilters) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
function getFilterByExpression(expression, scopeItem) {
|
|
64
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
65
65
|
const uiExtras = expression.uiExtras;
|
|
66
66
|
const scopeid = scopeItem.scope !== FILTER_SCOPE.GLOBAL
|
|
67
67
|
? _get(scopeItem, "uiExtras.scopeid")
|
|
@@ -87,11 +87,11 @@ function getFilterByExpression(expression, scopeItem) {
|
|
|
87
87
|
type: (_l = uiExtras.column) === null || _l === void 0 ? void 0 : _l.type,
|
|
88
88
|
},
|
|
89
89
|
dateSection: uiExtras.dateSection,
|
|
90
|
-
displayed: true,
|
|
90
|
+
displayed: (_o = (_m = uiExtras._newFilters) === null || _m === void 0 ? void 0 : _m.displayed) !== null && _o !== void 0 ? _o : true,
|
|
91
91
|
enabled: uiExtras.enabled,
|
|
92
92
|
extras: Object.assign(Object.assign({}, uiExtras.extras), { panelid: uiExtras.panelid, filterLabel: uiExtras.panelName, info,
|
|
93
93
|
scopeid, scope: scopeItem.scope, section: uiExtras.section, scopeInfo: {
|
|
94
|
-
collapsed: (
|
|
94
|
+
collapsed: (_p = scopeItem.uiExtras) === null || _p === void 0 ? void 0 : _p.collapsed,
|
|
95
95
|
enabled: scopeItem.enabled,
|
|
96
96
|
displayed: true,
|
|
97
97
|
scope: scopeItem.scope,
|
|
@@ -100,7 +100,7 @@ function getFilterByExpression(expression, scopeItem) {
|
|
|
100
100
|
collapsed: false,
|
|
101
101
|
enabled: true,
|
|
102
102
|
displayed: true,
|
|
103
|
-
qrveyid: (
|
|
103
|
+
qrveyid: (_q = uiExtras.column) === null || _q === void 0 ? void 0 : _q.qrveyid,
|
|
104
104
|
label: _get(uiExtras.column, "dataset.name") ||
|
|
105
105
|
_get(uiExtras.column, "label"),
|
|
106
106
|
} }),
|
|
@@ -9,6 +9,7 @@ export const FILTER_SETTINGS_DEFAULT = {
|
|
|
9
9
|
filterBuilder: {
|
|
10
10
|
scopeSelectorDisplayed: true,
|
|
11
11
|
scopeSelectorEnabled: true,
|
|
12
|
+
strictlyInteractivity: false,
|
|
12
13
|
},
|
|
13
14
|
filterDisplayer: {
|
|
14
15
|
addFilterDisplayed: true,
|
|
@@ -71,6 +72,7 @@ export const FILTER_SETTINGS_DEFAULT = {
|
|
|
71
72
|
},
|
|
72
73
|
iconsDisplayed: true,
|
|
73
74
|
readonly: false,
|
|
75
|
+
strictlyInteractivity: false,
|
|
74
76
|
updateFilterInfo: true,
|
|
75
77
|
},
|
|
76
78
|
filterPanelSettings: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { COLUMN } from "../../../columns/constants/COLUMN";
|
|
2
2
|
import { flattenDeep } from "../../../general/array/flattenDeep";
|
|
3
|
+
import { TIME_UNIT_PROPERTY } from "../../../time";
|
|
3
4
|
import { FILTER_VALIDATOR } from "../../constants/common/FILTER_VALIDATOR";
|
|
4
5
|
import { FILTER_VALIDATOR_INFO } from "../../constants/common/FILTER_VALIDATOR_INFO";
|
|
6
|
+
import { adaptTimeUnitValuesFromFilters } from "../common/adaptTimeUnitValuesFromFilters";
|
|
5
7
|
import { isRankingFilter } from "../common/isRankingFilter";
|
|
6
8
|
/**
|
|
7
9
|
* Gets the expresion values in the logic format
|
|
@@ -9,7 +11,7 @@ import { isRankingFilter } from "../common/isRankingFilter";
|
|
|
9
11
|
* @returns A collection of backend expression value
|
|
10
12
|
*/
|
|
11
13
|
export function getBackendValues(filter) {
|
|
12
|
-
const values =
|
|
14
|
+
const values = adaptTimeUnitValuesFromFilters(TIME_UNIT_PROPERTY.SECOND, filter) || [];
|
|
13
15
|
switch (filter.validator) {
|
|
14
16
|
case FILTER_VALIDATOR.EQUALS:
|
|
15
17
|
case FILTER_VALIDATOR.NOT_EQUAL:
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITimeUnitProperty } from "../../../time/interfaces/ITimeUnitProperty";
|
|
2
|
+
import { IFValue } from "../../interfaces";
|
|
3
|
+
import { IFSFilter } from "../../interfaces/common/IFSFilter";
|
|
4
|
+
/**
|
|
5
|
+
* Converts the Filter values to the given time unit
|
|
6
|
+
* It is only happening when the filter column format is a duration type
|
|
7
|
+
* @param {ITimeUnitProperty} to a time unit
|
|
8
|
+
* @param {IFSFilter} filter the filter object
|
|
9
|
+
* @returns the converted filter values
|
|
10
|
+
*/
|
|
11
|
+
export declare function adaptTimeUnitValuesFromFilters(to: ITimeUnitProperty, filter: IFSFilter): IFValue[];
|