@synerise/ds-core 1.11.0 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/i18n/{en.json → en.json.d.ts} +4 -2
  3. package/dist/i18n/en.json.js +8 -0
  4. package/dist/i18n/{es.json → es.json.d.ts} +4 -2
  5. package/dist/i18n/es.json.js +8 -0
  6. package/dist/i18n/index.js +14 -11
  7. package/dist/i18n/{pl.json → pl.json.d.ts} +4 -2
  8. package/dist/i18n/pl.json.js +8 -0
  9. package/dist/i18n/{pt.json → pt.json.d.ts} +4 -2
  10. package/dist/i18n/pt.json.js +8 -0
  11. package/dist/js/DSProvider/DSProvider.d.ts +5 -6
  12. package/dist/js/DSProvider/DSProvider.js +36 -31
  13. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.d.ts +2 -2
  14. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.js +29 -38
  15. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.types.d.ts +3 -3
  16. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.types.js +1 -1
  17. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.utils.d.ts +1 -1
  18. package/dist/js/DSProvider/LocaleProvider/LocaleProvider.utils.js +22 -19
  19. package/dist/js/DSProvider/LocaleProvider/antLocales.d.ts +6 -6
  20. package/dist/js/DSProvider/LocaleProvider/antLocales.js +16 -13
  21. package/dist/js/DSProvider/LocaleProvider/index.js +4 -1
  22. package/dist/js/DSProvider/ThemeProvider/ThemeProvider.d.ts +2 -2
  23. package/dist/js/DSProvider/ThemeProvider/ThemeProvider.js +14 -12
  24. package/dist/js/DSProvider/ThemeProvider/breakpoints.js +5 -2
  25. package/dist/js/DSProvider/ThemeProvider/index.js +4 -1
  26. package/dist/js/DSProvider/ThemeProvider/theme.d.ts +1 -1
  27. package/dist/js/DSProvider/ThemeProvider/theme.js +17 -17
  28. package/dist/js/DSProvider/ThemeProvider/variables.d.ts +8 -0
  29. package/dist/js/DSProvider/ThemeProvider/variables.js +531 -530
  30. package/dist/js/DSProvider/index.js +4 -1
  31. package/dist/js/DropdownContext/DropdownContext/DropdownContextProvider.d.ts +2 -2
  32. package/dist/js/DropdownContext/DropdownContext/DropdownContextProvider.js +11 -11
  33. package/dist/js/DropdownContext/DropdownContext.d.ts +1 -1
  34. package/dist/js/DropdownContext/DropdownContext.js +5 -2
  35. package/dist/js/DropdownContext/DropdownContextProvider.d.ts +2 -2
  36. package/dist/js/DropdownContext/DropdownContextProvider.js +11 -11
  37. package/dist/js/DropdownContext/index.js +8 -3
  38. package/dist/js/DropdownContext/useDropdown.d.ts +1 -1
  39. package/dist/js/DropdownContext/useDropdown.js +7 -4
  40. package/dist/js/data-format/components/FormattedDate.d.ts +4 -4
  41. package/dist/js/data-format/components/FormattedDate.js +23 -9
  42. package/dist/js/data-format/components/FormattedDateTime.d.ts +4 -4
  43. package/dist/js/data-format/components/FormattedDateTime.js +26 -12
  44. package/dist/js/data-format/components/FormattedNumber.d.ts +2 -2
  45. package/dist/js/data-format/components/FormattedNumber.js +23 -9
  46. package/dist/js/data-format/components/FormattedRelativeDateTime.d.ts +3 -3
  47. package/dist/js/data-format/components/FormattedRelativeDateTime.js +40 -21
  48. package/dist/js/data-format/components/FormattedTime.d.ts +4 -4
  49. package/dist/js/data-format/components/FormattedTime.js +26 -12
  50. package/dist/js/data-format/components/index.js +13 -5
  51. package/dist/js/data-format/constants/dataFormat.constants.d.ts +2 -2
  52. package/dist/js/data-format/constants/dataFormat.constants.js +85 -49
  53. package/dist/js/data-format/constants/dataFormatConfig.constants.d.ts +2 -2
  54. package/dist/js/data-format/constants/dataFormatConfig.constants.js +15 -8
  55. package/dist/js/data-format/constants/dateTimeParts.constants.d.ts +1 -1
  56. package/dist/js/data-format/constants/dateTimeParts.constants.js +10 -4
  57. package/dist/js/data-format/constants/index.js +48 -3
  58. package/dist/js/data-format/contexts/DataFormatConfigContext.d.ts +2 -2
  59. package/dist/js/data-format/contexts/DataFormatConfigContext.js +6 -3
  60. package/dist/js/data-format/contexts/DataFormatIntlsContext.d.ts +2 -2
  61. package/dist/js/data-format/contexts/DataFormatIntlsContext.js +7 -4
  62. package/dist/js/data-format/contexts/index.js +6 -2
  63. package/dist/js/data-format/hocs/withDataFormat.d.ts +2 -2
  64. package/dist/js/data-format/hocs/withDataFormat.js +23 -9
  65. package/dist/js/data-format/hooks/index.js +14 -6
  66. package/dist/js/data-format/hooks/useDataFormat.d.ts +1 -1
  67. package/dist/js/data-format/hooks/useDataFormat.js +93 -90
  68. package/dist/js/data-format/hooks/useDataFormatConfig.d.ts +1 -1
  69. package/dist/js/data-format/hooks/useDataFormatConfig.js +8 -4
  70. package/dist/js/data-format/hooks/useDataFormatIntls.d.ts +1 -1
  71. package/dist/js/data-format/hooks/useDataFormatIntls.js +8 -4
  72. package/dist/js/data-format/hooks/useDataFormatUtils.d.ts +4 -4
  73. package/dist/js/data-format/hooks/useDataFormatUtils.js +62 -63
  74. package/dist/js/data-format/hooks/useRelativeDateTimeUpdate.d.ts +2 -2
  75. package/dist/js/data-format/hooks/useRelativeDateTimeUpdate.js +19 -23
  76. package/dist/js/data-format/hooks/useSingleIntl.d.ts +1 -1
  77. package/dist/js/data-format/hooks/useSingleIntl.js +11 -8
  78. package/dist/js/data-format/index.js +83 -7
  79. package/dist/js/data-format/providers/DataFormatConfigProvider.d.ts +2 -2
  80. package/dist/js/data-format/providers/DataFormatConfigProvider.js +37 -26
  81. package/dist/js/data-format/types/dataFormat.types.d.ts +3 -3
  82. package/dist/js/data-format/types/dataFormat.types.js +1 -5
  83. package/dist/js/data-format/types/dataFormatConfig.types.d.ts +1 -1
  84. package/dist/js/data-format/types/dataFormatConfig.types.js +1 -2
  85. package/dist/js/data-format/types/dateTimeParts.types.js +1 -2
  86. package/dist/js/data-format/types/index.js +1 -1
  87. package/dist/js/data-format/utils/dataFormat.utils.d.ts +2 -2
  88. package/dist/js/data-format/utils/dataFormat.utils.js +82 -67
  89. package/dist/js/data-format/utils/dataFormatConfig.utils.d.ts +1 -1
  90. package/dist/js/data-format/utils/dataFormatConfig.utils.js +9 -8
  91. package/dist/js/data-format/utils/date.utils.d.ts +2 -2
  92. package/dist/js/data-format/utils/date.utils.js +25 -21
  93. package/dist/js/data-format/utils/dateTimeParts.utils.d.ts +2 -2
  94. package/dist/js/data-format/utils/dateTimeParts.utils.js +68 -52
  95. package/dist/js/data-format/utils/index.js +41 -5
  96. package/dist/js/data-format/utils/timeZone.utils.d.ts +1 -1
  97. package/dist/js/data-format/utils/timeZone.utils.js +59 -51
  98. package/dist/js/index.js +112 -7
  99. package/dist/js/mediaQuery/mediaQuery.d.ts +2 -2
  100. package/dist/js/mediaQuery/mediaQuery.js +15 -25
  101. package/dist/js/style.d.ts +0 -2
  102. package/dist/js/style.js +1 -2
  103. package/dist/js/testing/index.js +6 -2
  104. package/dist/js/testing/renderWithProvider/renderWithProvider.d.ts +4 -4
  105. package/dist/js/testing/renderWithProvider/renderWithProvider.js +35 -27
  106. package/dist/js/testing/sleep.js +6 -8
  107. package/dist/js/toaster/Toaster.d.ts +1 -1
  108. package/dist/js/toaster/Toaster.js +12 -8
  109. package/dist/js/toaster/Toaster.types.js +1 -1
  110. package/dist/js/toaster/constants.d.ts +1 -1
  111. package/dist/js/toaster/constants.js +7 -4
  112. package/dist/js/toaster/contexts/ToasterContext.d.ts +2 -2
  113. package/dist/js/toaster/contexts/ToasterContext.js +9 -5
  114. package/dist/js/toaster/hooks/useToaster.d.ts +1 -1
  115. package/dist/js/toaster/hooks/useToaster.js +7 -4
  116. package/dist/js/toaster/index.js +12 -5
  117. package/dist/js/toaster/providers/ToasterProvider.d.ts +2 -2
  118. package/dist/js/toaster/providers/ToasterProvider.js +17 -17
  119. package/package.json +11 -13
  120. package/dist/js/testing/renderWithProvider/renderWithProvider.spec.d.ts +0 -1
  121. package/dist/style/colors.less +0 -137
  122. package/dist/style/config.less +0 -521
  123. package/dist/style/core.less +0 -55
  124. package/dist/style/variables.less +0 -2
  125. /package/dist/{style/variables.css → assets/style/core-tn0RQdqM.css} +0 -0
@@ -1,37 +1,33 @@
1
- import { useEffect, useState } from 'react';
2
- var getIntervalForTimeDifference = function getIntervalForTimeDifference(timeDiffMs) {
3
- // https://day.js.org/docs/en/display/from-now#list-of-breakdown-range
4
- var UNDER_45_MINUTES = 45 * 60 * 1000;
5
- var UNDER_22_HOURS = 22 * 60 * 60 * 1000;
1
+ import { useState, useEffect } from "react";
2
+ const getIntervalForTimeDifference = (timeDiffMs) => {
3
+ const UNDER_45_MINUTES = 45 * 60 * 1e3;
4
+ const UNDER_22_HOURS = 22 * 60 * 60 * 1e3;
6
5
  if (timeDiffMs < UNDER_45_MINUTES) {
7
- return 60 * 1000; // 60 seconds
6
+ return 60 * 1e3;
8
7
  }
9
8
  if (timeDiffMs < UNDER_22_HOURS) {
10
- return 60 * 60 * 1000; // 60 minutes
9
+ return 60 * 60 * 1e3;
11
10
  }
12
- return null; // no interval
11
+ return null;
13
12
  };
14
- export var useRelativeDateTimeUpdate = function useRelativeDateTimeUpdate(value) {
15
- var _useState = useState(0),
16
- updateTrigger = _useState[0],
17
- setUpdateTrigger = _useState[1];
18
- useEffect(function () {
13
+ const useRelativeDateTimeUpdate = (value) => {
14
+ const [updateTrigger, setUpdateTrigger] = useState(0);
15
+ useEffect(() => {
19
16
  if (!(value instanceof Date)) {
20
17
  return;
21
18
  }
22
- var timeDiffMs = Math.abs(value.getTime() - Date.now());
23
- var interval = getIntervalForTimeDifference(timeDiffMs);
19
+ const timeDiffMs = Math.abs(value.getTime() - Date.now());
20
+ const interval = getIntervalForTimeDifference(timeDiffMs);
24
21
  if (interval === null) {
25
22
  return;
26
23
  }
27
- var timeoutId = setTimeout(function () {
28
- setUpdateTrigger(function (prev) {
29
- return prev + 1;
30
- });
24
+ const timeoutId = setTimeout(() => {
25
+ setUpdateTrigger((prev) => prev + 1);
31
26
  }, interval);
32
- return function () {
33
- return clearTimeout(timeoutId);
34
- };
27
+ return () => clearTimeout(timeoutId);
35
28
  }, [value, updateTrigger]);
36
29
  return updateTrigger;
37
- };
30
+ };
31
+ export {
32
+ useRelativeDateTimeUpdate
33
+ };
@@ -1,4 +1,4 @@
1
- import { type IntlShape } from 'react-intl';
1
+ import { IntlShape } from 'react-intl';
2
2
  export declare const useSingleIntl: (locale: string) => {
3
3
  intl: IntlShape;
4
4
  };
@@ -1,12 +1,15 @@
1
- import { createIntl, createIntlCache, useIntl } from 'react-intl';
2
- export var useSingleIntl = function useSingleIntl(locale) {
3
- var cache = createIntlCache();
4
- var globalIntl = useIntl();
5
- var intl = createIntl({
6
- locale: locale,
1
+ import { createIntlCache, useIntl, createIntl } from "react-intl";
2
+ const useSingleIntl = (locale) => {
3
+ const cache = createIntlCache();
4
+ const globalIntl = useIntl();
5
+ const intl = createIntl({
6
+ locale,
7
7
  timeZone: globalIntl.timeZone
8
8
  }, cache);
9
9
  return {
10
- intl: intl
10
+ intl
11
11
  };
12
- };
12
+ };
13
+ export {
14
+ useSingleIntl
15
+ };
@@ -1,7 +1,83 @@
1
- export { DataFormatConfigProvider } from './providers/DataFormatConfigProvider';
2
- export { FormattedDate, FormattedDateTime, FormattedNumber, FormattedTime, FormattedRelativeDateTimeFrom, FormattedRelativeDateTimeTo } from './components';
3
- export { useDataFormat, useDataFormatUtils, useDataFormatConfig, useDataFormatIntls } from './hooks';
4
- export { withDataFormat } from './hocs/withDataFormat';
5
- export { getDataFormatConfigFromNotation, getDefaultDataTimeOptions } from './utils';
6
- export * from './constants';
7
- export { DataFormatConfigContext, DataFormatIntlsContext } from './contexts';
1
+ import { DataFormatConfigProvider } from "./providers/DataFormatConfigProvider.js";
2
+ import { FormattedDate } from "./components/FormattedDate.js";
3
+ import { FormattedDateTime } from "./components/FormattedDateTime.js";
4
+ import { FormattedNumber } from "./components/FormattedNumber.js";
5
+ import { FormattedTime } from "./components/FormattedTime.js";
6
+ import { FormattedRelativeDateTimeFrom, FormattedRelativeDateTimeTo } from "./components/FormattedRelativeDateTime.js";
7
+ import { useDataFormatConfig } from "./hooks/useDataFormatConfig.js";
8
+ import { useDataFormat } from "./hooks/useDataFormat.js";
9
+ import { useDataFormatUtils } from "./hooks/useDataFormatUtils.js";
10
+ import "react-intl";
11
+ import { useDataFormatIntls } from "./hooks/useDataFormatIntls.js";
12
+ import "react";
13
+ import { withDataFormat } from "./hocs/withDataFormat.js";
14
+ import { getDataFormatConfigFromNotation } from "./utils/dataFormatConfig.utils.js";
15
+ import { DEFAULT_DATA_FORMAT_CONFIG, DEFAULT_DATA_FORMAT_INTL, DEFAULT_DATA_FORMAT_NOTATION, EU_NOTATION, US_NOTATION } from "./constants/dataFormatConfig.constants.js";
16
+ import { COMPACT_DECIMAL_LARGER_NUMBER, COMPACT_LARGER_NUMBER, DATE, DATETIME, DATE_CONSTANTS_TARGET_FORMATS, DEFAULT_FORMAT_DATE_OPTIONS, DEFAULT_FORMAT_MONTH_LONG_OPTIONS, DEFAULT_FORMAT_MONTH_SHORT_OPTIONS, DEFAULT_FORMAT_NUMBER_OPTIONS, DEFAULT_FORMAT_TIME_OPTIONS, DEFAULT_FORMAT_WEEKDAY_LONG_OPTIONS, DEFAULT_FORMAT_WEEKDAY_SHORT_OPTIONS, EU_DECIMAL_DELIMITER, EU_THOUSAND_DELIMITER, LARGER_NUMBER_LIMIT, LOWER_CASE, LOWER_FIRST, MONTHS_LONG, MONTHS_SHORT, MONTH_LONG, MONTH_SHORT, RELATIVE_FROM, RELATIVE_FROM_WITHOUT_SUFFIX, RELATIVE_TO, RELATIVE_TO_WITHOUT_SUFFIX, TIME, UPPER_CASE, UPPER_FIRST, US_DECIMAL_DELIMITER, US_THOUSAND_DELIMITER, WEEKDAYS_LONG, WEEKDAYS_SHORT, WEEKDAY_LONG, WEEKDAY_SHORT } from "./constants/dataFormat.constants.js";
17
+ import { LONG, MONTH, SHORT, WEEKDAY } from "./constants/dateTimeParts.constants.js";
18
+ import "./utils/timeZone.utils.js";
19
+ import { getDefaultDataTimeOptions } from "./utils/dataFormat.utils.js";
20
+ import "dayjs";
21
+ import { DataFormatConfigContext } from "./contexts/DataFormatConfigContext.js";
22
+ import { DataFormatIntlsContext } from "./contexts/DataFormatIntlsContext.js";
23
+ export {
24
+ COMPACT_DECIMAL_LARGER_NUMBER,
25
+ COMPACT_LARGER_NUMBER,
26
+ DATE,
27
+ DATETIME,
28
+ DATE_CONSTANTS_TARGET_FORMATS,
29
+ DEFAULT_DATA_FORMAT_CONFIG,
30
+ DEFAULT_DATA_FORMAT_INTL,
31
+ DEFAULT_DATA_FORMAT_NOTATION,
32
+ DEFAULT_FORMAT_DATE_OPTIONS,
33
+ DEFAULT_FORMAT_MONTH_LONG_OPTIONS,
34
+ DEFAULT_FORMAT_MONTH_SHORT_OPTIONS,
35
+ DEFAULT_FORMAT_NUMBER_OPTIONS,
36
+ DEFAULT_FORMAT_TIME_OPTIONS,
37
+ DEFAULT_FORMAT_WEEKDAY_LONG_OPTIONS,
38
+ DEFAULT_FORMAT_WEEKDAY_SHORT_OPTIONS,
39
+ DataFormatConfigContext,
40
+ DataFormatConfigProvider,
41
+ DataFormatIntlsContext,
42
+ EU_DECIMAL_DELIMITER,
43
+ EU_NOTATION,
44
+ EU_THOUSAND_DELIMITER,
45
+ FormattedDate,
46
+ FormattedDateTime,
47
+ FormattedNumber,
48
+ FormattedRelativeDateTimeFrom,
49
+ FormattedRelativeDateTimeTo,
50
+ FormattedTime,
51
+ LARGER_NUMBER_LIMIT,
52
+ LONG,
53
+ LOWER_CASE,
54
+ LOWER_FIRST,
55
+ MONTH,
56
+ MONTHS_LONG,
57
+ MONTHS_SHORT,
58
+ MONTH_LONG,
59
+ MONTH_SHORT,
60
+ RELATIVE_FROM,
61
+ RELATIVE_FROM_WITHOUT_SUFFIX,
62
+ RELATIVE_TO,
63
+ RELATIVE_TO_WITHOUT_SUFFIX,
64
+ SHORT,
65
+ TIME,
66
+ UPPER_CASE,
67
+ UPPER_FIRST,
68
+ US_DECIMAL_DELIMITER,
69
+ US_NOTATION,
70
+ US_THOUSAND_DELIMITER,
71
+ WEEKDAY,
72
+ WEEKDAYS_LONG,
73
+ WEEKDAYS_SHORT,
74
+ WEEKDAY_LONG,
75
+ WEEKDAY_SHORT,
76
+ getDataFormatConfigFromNotation,
77
+ getDefaultDataTimeOptions,
78
+ useDataFormat,
79
+ useDataFormatConfig,
80
+ useDataFormatIntls,
81
+ useDataFormatUtils,
82
+ withDataFormat
83
+ };
@@ -1,5 +1,5 @@
1
- import React, { type ReactNode } from 'react';
2
- import { type DataFormatConfig } from '../types';
1
+ import { default as React, ReactNode } from 'react';
2
+ import { DataFormatConfig } from '../types';
3
3
  export type DataFormatConfigProviderProps = {
4
4
  dataFormatConfig?: DataFormatConfig;
5
5
  children?: ReactNode;
@@ -1,26 +1,37 @@
1
- import React from 'react';
2
- import { DEFAULT_DATA_FORMAT_CONFIG } from '../constants';
3
- import { DataFormatConfigContext, DataFormatIntlsContext } from '../contexts';
4
- import { useDataFormatUtils, useSingleIntl } from '../hooks';
5
- export var DataFormatConfigProvider = function DataFormatConfigProvider(_ref) {
6
- var dataFormatConfigFromProps = _ref.dataFormatConfig,
7
- children = _ref.children;
8
- var dataFormatConfig = dataFormatConfigFromProps != null ? dataFormatConfigFromProps : DEFAULT_DATA_FORMAT_CONFIG;
9
- var _useDataFormatUtils = useDataFormatUtils(),
10
- getLocaleFromNotation = _useDataFormatUtils.getLocaleFromNotation;
11
- var _useSingleIntl = useSingleIntl(getLocaleFromNotation(dataFormatConfig == null ? void 0 : dataFormatConfig.numberFormatNotation)),
12
- numberFormatIntl = _useSingleIntl.intl;
13
- var _useSingleIntl2 = useSingleIntl(getLocaleFromNotation(dataFormatConfig == null ? void 0 : dataFormatConfig.dateFormatNotation)),
14
- dateFormatIntl = _useSingleIntl2.intl;
15
- var _useSingleIntl3 = useSingleIntl(getLocaleFromNotation(dataFormatConfig == null ? void 0 : dataFormatConfig.timeFormatNotation)),
16
- timeFormatIntl = _useSingleIntl3.intl;
17
- return /*#__PURE__*/React.createElement(DataFormatIntlsContext.Provider, {
18
- value: {
19
- numberFormatIntl: numberFormatIntl,
20
- dateFormatIntl: dateFormatIntl,
21
- timeFormatIntl: timeFormatIntl
22
- }
23
- }, /*#__PURE__*/React.createElement(DataFormatConfigContext.Provider, {
24
- value: dataFormatConfig
25
- }, children));
26
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_DATA_FORMAT_CONFIG } from "../constants/dataFormatConfig.constants.js";
3
+ import { DataFormatConfigContext } from "../contexts/DataFormatConfigContext.js";
4
+ import { DataFormatIntlsContext } from "../contexts/DataFormatIntlsContext.js";
5
+ import "react";
6
+ import "dayjs";
7
+ import "moment";
8
+ import "../utils/timeZone.utils.js";
9
+ import "../utils/dataFormat.utils.js";
10
+ import { useDataFormatUtils } from "../hooks/useDataFormatUtils.js";
11
+ import { useSingleIntl } from "../hooks/useSingleIntl.js";
12
+ const DataFormatConfigProvider = ({
13
+ dataFormatConfig: dataFormatConfigFromProps,
14
+ children
15
+ }) => {
16
+ const dataFormatConfig = dataFormatConfigFromProps ?? DEFAULT_DATA_FORMAT_CONFIG;
17
+ const {
18
+ getLocaleFromNotation
19
+ } = useDataFormatUtils();
20
+ const {
21
+ intl: numberFormatIntl
22
+ } = useSingleIntl(getLocaleFromNotation(dataFormatConfig?.numberFormatNotation));
23
+ const {
24
+ intl: dateFormatIntl
25
+ } = useSingleIntl(getLocaleFromNotation(dataFormatConfig?.dateFormatNotation));
26
+ const {
27
+ intl: timeFormatIntl
28
+ } = useSingleIntl(getLocaleFromNotation(dataFormatConfig?.timeFormatNotation));
29
+ return /* @__PURE__ */ jsx(DataFormatIntlsContext.Provider, { value: {
30
+ numberFormatIntl,
31
+ dateFormatIntl,
32
+ timeFormatIntl
33
+ }, children: /* @__PURE__ */ jsx(DataFormatConfigContext.Provider, { value: dataFormatConfig, children }) });
34
+ };
35
+ export {
36
+ DataFormatConfigProvider
37
+ };
@@ -1,6 +1,6 @@
1
- import { type Dayjs, type default as dayjs } from 'dayjs';
2
- import { type Moment } from 'moment';
3
- import { type FormatDateOptions, type FormatNumberOptions, type FormatPluralOptions } from 'react-intl';
1
+ import { Dayjs, default as dayjs } from 'dayjs';
2
+ import { Moment } from 'moment';
3
+ import { FormatDateOptions, FormatNumberOptions, FormatPluralOptions } from 'react-intl';
4
4
  declare const _DATE_TARGET_FORMATS: readonly ["date", "datetime", "relative-from", "relative-to", "relative-from-without-suffix", "relative-to-without-suffix", "time", "weekday-long", "weekday-short", "month-long", "month-short"];
5
5
  export type DateTargetFormat = (typeof _DATE_TARGET_FORMATS)[number];
6
6
  declare const _NUMBER_TARGET_FORMATS: readonly ["compact-larger-number", "compact-decimal-larger-number"];
@@ -1,5 +1 @@
1
- var _DATE_TARGET_FORMATS = ['date', 'datetime', 'relative-from', 'relative-to', 'relative-from-without-suffix', 'relative-to-without-suffix', 'time', 'weekday-long', 'weekday-short', 'month-long', 'month-short'];
2
- var _NUMBER_TARGET_FORMATS = ['compact-larger-number', 'compact-decimal-larger-number'];
3
- var _NAMING_CONVENTIONS = ['upperCase', 'upperFirst', 'lowerCase', 'lowerFirst'];
4
- var _DELIMITERS = [',', '.', ' '];
5
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import { type IntlShape } from 'react-intl';
1
+ import { IntlShape } from 'react-intl';
2
2
  declare const _DATA_FORMAT_NOTATION_TYPES: readonly ["US", "EU"];
3
3
  export type DataFormatNotationType = (typeof _DATA_FORMAT_NOTATION_TYPES)[number];
4
4
  export type DataFormatConfig = {
@@ -1,2 +1 @@
1
- var _DATA_FORMAT_NOTATION_TYPES = ['US', 'EU'];
2
- export {};
1
+
@@ -1,2 +1 @@
1
- var _DATE_TIME_PART_FORMAT = ['long', 'short', 'numeric'];
2
- export {};
1
+
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,5 +1,5 @@
1
- import { type IntlShape } from 'react-intl';
2
- import { type CommonFormatOptions, type DateToFormatOptions, type Delimiter, type NumberToFormatOptions } from '../types';
1
+ import { IntlShape } from 'react-intl';
2
+ import { CommonFormatOptions, DateToFormatOptions, Delimiter, NumberToFormatOptions } from '../types';
3
3
  export declare const convertNumberString: (value: number, numberFormatIntl: IntlShape, languageIntl: IntlShape, thousandDelimiter: Delimiter, decimalDelimiter: Delimiter, numberOptions?: NumberToFormatOptions) => string;
4
4
  export declare const convertDateToDateTimeString: (value: Date, dateFormatIntl: IntlShape, timeFormatIntl: IntlShape, languageIntl: IntlShape, options?: DateToFormatOptions) => string;
5
5
  export declare const convertDateToRelativeToString: (value: Date, withoutSuffix?: boolean) => string;
@@ -1,98 +1,101 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import dayjs from 'dayjs';
3
- import relativeTimePlugin from 'dayjs/plugin/relativeTime';
4
- import { COMPACT_DECIMAL_LARGER_NUMBER, COMPACT_LARGER_NUMBER, DATE, DATETIME, DEFAULT_FORMAT_MONTH_SHORT_OPTIONS, DEFAULT_FORMAT_NUMBER_OPTIONS, LARGER_NUMBER_LIMIT, LOWER_CASE, LOWER_FIRST, UPPER_CASE, UPPER_FIRST } from '../constants';
5
- import { dateTimePartsToString, getDateParts, getDateTimePartsSubset, getMonthLongDateParts, getMonthShortDateParts, getTimeParts, getWeekdayLongDateParts, getWeekdayShortDateParts, numberPartsToString, translateDateTimeParts } from './dateTimeParts.utils';
1
+ import dayjs from "dayjs";
2
+ import relativeTimePlugin from "dayjs/plugin/relativeTime";
3
+ import "../constants/dataFormatConfig.constants.js";
4
+ import { UPPER_FIRST, DEFAULT_FORMAT_MONTH_SHORT_OPTIONS, DATETIME, DATE, LOWER_FIRST, LOWER_CASE, UPPER_CASE, COMPACT_LARGER_NUMBER, LARGER_NUMBER_LIMIT, COMPACT_DECIMAL_LARGER_NUMBER, DEFAULT_FORMAT_NUMBER_OPTIONS } from "../constants/dataFormat.constants.js";
5
+ import { getDateParts, translateDateTimeParts, dateTimePartsToString, getTimeParts, getMonthLongDateParts, getDateTimePartsSubset, getMonthShortDateParts, getWeekdayLongDateParts, getWeekdayShortDateParts, numberPartsToString } from "./dateTimeParts.utils.js";
6
6
  dayjs.extend(relativeTimePlugin);
7
- export var convertNumberString = function convertNumberString(value, numberFormatIntl, languageIntl, thousandDelimiter, decimalDelimiter, numberOptions) {
8
- var updatedNumberOptions = numberOptions;
9
- if (updatedNumberOptions != null && updatedNumberOptions.pluralOptions) {
7
+ const convertNumberString = (value, numberFormatIntl, languageIntl, thousandDelimiter, decimalDelimiter, numberOptions) => {
8
+ const updatedNumberOptions = numberOptions;
9
+ if (updatedNumberOptions?.pluralOptions) {
10
10
  return numberFormatIntl.formatPlural(value, updatedNumberOptions);
11
11
  }
12
- if ((updatedNumberOptions == null ? void 0 : updatedNumberOptions.targetFormat) === COMPACT_LARGER_NUMBER && value > LARGER_NUMBER_LIMIT) {
12
+ if (updatedNumberOptions?.targetFormat === COMPACT_LARGER_NUMBER && value > LARGER_NUMBER_LIMIT) {
13
13
  if (!updatedNumberOptions.notation) {
14
- updatedNumberOptions.notation = 'compact';
14
+ updatedNumberOptions.notation = "compact";
15
15
  }
16
16
  }
17
- if ((updatedNumberOptions == null ? void 0 : updatedNumberOptions.targetFormat) === COMPACT_DECIMAL_LARGER_NUMBER && value > LARGER_NUMBER_LIMIT) {
17
+ if (updatedNumberOptions?.targetFormat === COMPACT_DECIMAL_LARGER_NUMBER && value > LARGER_NUMBER_LIMIT) {
18
18
  if (!updatedNumberOptions.notation) {
19
- updatedNumberOptions.notation = 'compact';
19
+ updatedNumberOptions.notation = "compact";
20
20
  }
21
21
  if (!updatedNumberOptions.minimumFractionDigits && updatedNumberOptions.minimumFractionDigits !== 0) {
22
22
  updatedNumberOptions.minimumFractionDigits = 1;
23
23
  }
24
24
  }
25
- var numberParts = languageIntl.formatNumberToParts(value, _extends({}, DEFAULT_FORMAT_NUMBER_OPTIONS, updatedNumberOptions));
25
+ const numberParts = languageIntl.formatNumberToParts(value, {
26
+ ...DEFAULT_FORMAT_NUMBER_OPTIONS,
27
+ ...updatedNumberOptions
28
+ });
26
29
  return numberPartsToString(numberParts, thousandDelimiter, decimalDelimiter);
27
30
  };
28
- export var convertDateToDateTimeString = function convertDateToDateTimeString(value, dateFormatIntl, timeFormatIntl, languageIntl, options) {
29
- var dateParts = getDateParts(value, dateFormatIntl, options == null ? void 0 : options.dateOptions);
30
- var datePartsByLanguageIntl = getDateParts(value, languageIntl, options == null ? void 0 : options.dateOptions);
31
- var translatedDateParts = translateDateTimeParts(dateParts, datePartsByLanguageIntl, options);
32
- var date = dateTimePartsToString(translatedDateParts);
33
- var time = dateTimePartsToString(getTimeParts(value, timeFormatIntl, options == null ? void 0 : options.timeOptions));
34
- return date + ", " + time;
31
+ const convertDateToDateTimeString = (value, dateFormatIntl, timeFormatIntl, languageIntl, options) => {
32
+ const dateParts = getDateParts(value, dateFormatIntl, options?.dateOptions);
33
+ const datePartsByLanguageIntl = getDateParts(value, languageIntl, options?.dateOptions);
34
+ const translatedDateParts = translateDateTimeParts(dateParts, datePartsByLanguageIntl, options);
35
+ const date = dateTimePartsToString(translatedDateParts);
36
+ const time = dateTimePartsToString(getTimeParts(value, timeFormatIntl, options?.timeOptions));
37
+ return `${date}, ${time}`;
35
38
  };
36
- export var convertDateToRelativeToString = function convertDateToRelativeToString(value, withoutSuffix) {
39
+ const convertDateToRelativeToString = (value, withoutSuffix) => {
37
40
  return dayjs().to(dayjs(value), withoutSuffix);
38
41
  };
39
- export var convertDateToRelativeFromString = function convertDateToRelativeFromString(value, withoutSuffix) {
42
+ const convertDateToRelativeFromString = (value, withoutSuffix) => {
40
43
  return dayjs().from(dayjs(value), withoutSuffix);
41
44
  };
42
- export var convertDateToTimeString = function convertDateToTimeString(value, timeFormatIntl, options) {
45
+ const convertDateToTimeString = (value, timeFormatIntl, options) => {
43
46
  return dateTimePartsToString(getTimeParts(value, timeFormatIntl, options));
44
47
  };
45
- export var convertDateToDateString = function convertDateToDateString(value, dateFormatIntl, languageIntl, options) {
46
- var dateParts = getDateParts(value, dateFormatIntl, options);
47
- var datePartsByLanguageIntl = getDateParts(value, languageIntl, options);
48
- var translatedDateParts = translateDateTimeParts(dateParts, datePartsByLanguageIntl, options);
48
+ const convertDateToDateString = (value, dateFormatIntl, languageIntl, options) => {
49
+ const dateParts = getDateParts(value, dateFormatIntl, options);
50
+ const datePartsByLanguageIntl = getDateParts(value, languageIntl, options);
51
+ const translatedDateParts = translateDateTimeParts(dateParts, datePartsByLanguageIntl, options);
49
52
  return dateTimePartsToString(translatedDateParts);
50
53
  };
51
- export var convertDateToWeekdayLongString = function convertDateToWeekdayLongString(value, dateFormatIntl, languageIntl, options) {
52
- var weekdayLongDateParts = getWeekdayLongDateParts(value, dateFormatIntl, options);
53
- var weekdayLongDatePartsByLanguageIntl = getWeekdayLongDateParts(value, languageIntl, options);
54
- var translatedDateTimeParts = translateDateTimeParts(weekdayLongDateParts, weekdayLongDatePartsByLanguageIntl, options);
55
- var reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ['weekday']);
54
+ const convertDateToWeekdayLongString = (value, dateFormatIntl, languageIntl, options) => {
55
+ const weekdayLongDateParts = getWeekdayLongDateParts(value, dateFormatIntl, options);
56
+ const weekdayLongDatePartsByLanguageIntl = getWeekdayLongDateParts(value, languageIntl, options);
57
+ const translatedDateTimeParts = translateDateTimeParts(weekdayLongDateParts, weekdayLongDatePartsByLanguageIntl, options);
58
+ const reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ["weekday"]);
56
59
  return dateTimePartsToString(reducedDateTimeParts);
57
60
  };
58
- export var convertDateToWeekdayShortString = function convertDateToWeekdayShortString(value, dateFormatIntl, languageIntl, options) {
59
- var weekdayShortDateParts = getWeekdayShortDateParts(value, dateFormatIntl, options);
60
- var weekdayShortDatePartsByLanguageIntl = getWeekdayShortDateParts(value, languageIntl, options);
61
- var translatedDateTimeParts = translateDateTimeParts(weekdayShortDateParts, weekdayShortDatePartsByLanguageIntl, options);
62
- var reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ['weekday']);
61
+ const convertDateToWeekdayShortString = (value, dateFormatIntl, languageIntl, options) => {
62
+ const weekdayShortDateParts = getWeekdayShortDateParts(value, dateFormatIntl, options);
63
+ const weekdayShortDatePartsByLanguageIntl = getWeekdayShortDateParts(value, languageIntl, options);
64
+ const translatedDateTimeParts = translateDateTimeParts(weekdayShortDateParts, weekdayShortDatePartsByLanguageIntl, options);
65
+ const reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ["weekday"]);
63
66
  return dateTimePartsToString(reducedDateTimeParts);
64
67
  };
65
- export var convertDateToMonthLongString = function convertDateToMonthLongString(value, dateFormatIntl, languageIntl, options) {
66
- var monthLongDateParts = getMonthLongDateParts(value, dateFormatIntl, options);
67
- var monthLongDatePartsByLanguageIntl = getMonthLongDateParts(value, languageIntl, options);
68
- var translatedDateTimeParts = translateDateTimeParts(monthLongDateParts, monthLongDatePartsByLanguageIntl, options);
69
- var reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ['month']);
68
+ const convertDateToMonthLongString = (value, dateFormatIntl, languageIntl, options) => {
69
+ const monthLongDateParts = getMonthLongDateParts(value, dateFormatIntl, options);
70
+ const monthLongDatePartsByLanguageIntl = getMonthLongDateParts(value, languageIntl, options);
71
+ const translatedDateTimeParts = translateDateTimeParts(monthLongDateParts, monthLongDatePartsByLanguageIntl, options);
72
+ const reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ["month"]);
70
73
  return dateTimePartsToString(reducedDateTimeParts);
71
74
  };
72
- export var convertDateToMonthShortString = function convertDateToMonthShortString(value, dateFormatIntl, languageIntl, options) {
73
- var monthShortDateParts = getMonthShortDateParts(value, dateFormatIntl, options);
74
- var monthShortDatePartsByLanguageIntl = getMonthShortDateParts(value, languageIntl, options);
75
- var translatedDateTimeParts = translateDateTimeParts(monthShortDateParts, monthShortDatePartsByLanguageIntl, options);
76
- var reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ['month']);
75
+ const convertDateToMonthShortString = (value, dateFormatIntl, languageIntl, options) => {
76
+ const monthShortDateParts = getMonthShortDateParts(value, dateFormatIntl, options);
77
+ const monthShortDatePartsByLanguageIntl = getMonthShortDateParts(value, languageIntl, options);
78
+ const translatedDateTimeParts = translateDateTimeParts(monthShortDateParts, monthShortDatePartsByLanguageIntl, options);
79
+ const reducedDateTimeParts = getDateTimePartsSubset(translatedDateTimeParts, ["month"]);
77
80
  return dateTimePartsToString(reducedDateTimeParts);
78
81
  };
79
- export var addPrefix = function addPrefix(value, options) {
80
- var result = value;
81
- if (options != null && options.prefix) {
82
- result = (options == null ? void 0 : options.prefix) + result;
82
+ const addPrefix = (value, options) => {
83
+ let result = value;
84
+ if (options?.prefix) {
85
+ result = options?.prefix + result;
83
86
  }
84
87
  return result;
85
88
  };
86
- export var addSuffix = function addSuffix(value, options) {
87
- var result = value;
88
- if (options != null && options.suffix) {
89
- result += options == null ? void 0 : options.suffix;
89
+ const addSuffix = (value, options) => {
90
+ let result = value;
91
+ if (options?.suffix) {
92
+ result += options?.suffix;
90
93
  }
91
94
  return result;
92
95
  };
93
- export var changeNamingConvention = function changeNamingConvention(value, options) {
94
- var result = value;
95
- switch (options == null ? void 0 : options.namingConvention) {
96
+ const changeNamingConvention = (value, options) => {
97
+ let result = value;
98
+ switch (options?.namingConvention) {
96
99
  case UPPER_CASE:
97
100
  result = result.toUpperCase();
98
101
  break;
@@ -105,15 +108,27 @@ export var changeNamingConvention = function changeNamingConvention(value, optio
105
108
  case LOWER_FIRST:
106
109
  result = result.charAt(0).toLowerCase() + result.slice(1);
107
110
  break;
108
- default:
109
- break;
110
111
  }
111
112
  return result;
112
113
  };
113
- export var getDefaultDataTimeOptions = function getDefaultDataTimeOptions(showTime) {
114
- return {
115
- targetFormat: showTime ? DATETIME : DATE,
116
- dateOptions: DEFAULT_FORMAT_MONTH_SHORT_OPTIONS,
117
- namingConvention: UPPER_FIRST
118
- };
119
- };
114
+ const getDefaultDataTimeOptions = (showTime) => ({
115
+ targetFormat: showTime ? DATETIME : DATE,
116
+ dateOptions: DEFAULT_FORMAT_MONTH_SHORT_OPTIONS,
117
+ namingConvention: UPPER_FIRST
118
+ });
119
+ export {
120
+ addPrefix,
121
+ addSuffix,
122
+ changeNamingConvention,
123
+ convertDateToDateString,
124
+ convertDateToDateTimeString,
125
+ convertDateToMonthLongString,
126
+ convertDateToMonthShortString,
127
+ convertDateToRelativeFromString,
128
+ convertDateToRelativeToString,
129
+ convertDateToTimeString,
130
+ convertDateToWeekdayLongString,
131
+ convertDateToWeekdayShortString,
132
+ convertNumberString,
133
+ getDefaultDataTimeOptions
134
+ };
@@ -1,2 +1,2 @@
1
- import { type DataFormatConfig, type DataFormatNotationType } from '../types';
1
+ import { DataFormatConfig, DataFormatNotationType } from '../types';
2
2
  export declare const getDataFormatConfigFromNotation: (notation: DataFormatNotationType) => DataFormatConfig;
@@ -1,8 +1,9 @@
1
- export var getDataFormatConfigFromNotation = function getDataFormatConfigFromNotation(notation) {
2
- return {
3
- startWeekDayNotation: notation,
4
- dateFormatNotation: notation,
5
- timeFormatNotation: notation,
6
- numberFormatNotation: notation
7
- };
8
- };
1
+ const getDataFormatConfigFromNotation = (notation) => ({
2
+ startWeekDayNotation: notation,
3
+ dateFormatNotation: notation,
4
+ timeFormatNotation: notation,
5
+ numberFormatNotation: notation
6
+ });
7
+ export {
8
+ getDataFormatConfigFromNotation
9
+ };
@@ -1,5 +1,5 @@
1
- import dayjs from 'dayjs';
2
- import { type DateConstantsTargetFormat, type DateToFormatOptions } from '../types';
1
+ import { default as dayjs } from 'dayjs';
2
+ import { DateConstantsTargetFormat, DateToFormatOptions } from '../types';
3
3
  export declare const getDatesRange: (start: Date, end: Date, interval: dayjs.UnitType) => Date[];
4
4
  export declare const isValidDate: (date: Date) => boolean;
5
5
  export declare const getConstantDatesAndFormattingOptions: (targetFormat: DateConstantsTargetFormat, isSundayFirstWeekDay: boolean, customStartDate?: Date, customEndDate?: Date, customInterval?: dayjs.UnitType) => {
@@ -1,50 +1,54 @@
1
- import dayjs from 'dayjs';
2
- import { MONTHS_LONG, MONTHS_SHORT, MONTH_LONG, MONTH_SHORT, UPPER_FIRST, WEEKDAYS_LONG, WEEKDAYS_SHORT, WEEKDAY_LONG, WEEKDAY_SHORT } from '../constants';
3
- export var getDatesRange = function getDatesRange(start, end, interval) {
4
- var startDate = dayjs(start);
5
- var endDate = dayjs(end);
6
- var diffInUnits = endDate.diff(startDate, interval);
7
- return Array.from(Array(diffInUnits + 1).keys()).map(function (i) {
1
+ import dayjs from "dayjs";
2
+ import "../constants/dataFormatConfig.constants.js";
3
+ import { WEEKDAYS_SHORT, WEEKDAYS_LONG, MONTHS_SHORT, MONTHS_LONG, MONTH_LONG, UPPER_FIRST, WEEKDAY_SHORT, WEEKDAY_LONG, MONTH_SHORT } from "../constants/dataFormat.constants.js";
4
+ const getDatesRange = (start, end, interval) => {
5
+ const startDate = dayjs(start);
6
+ const endDate = dayjs(end);
7
+ const diffInUnits = endDate.diff(startDate, interval);
8
+ return Array.from(Array(diffInUnits + 1).keys()).map((i) => {
8
9
  return startDate.add(i, interval).toDate();
9
10
  });
10
11
  };
11
- export var isValidDate = function isValidDate(date) {
12
+ const isValidDate = (date) => {
12
13
  return !isNaN(date.getTime());
13
14
  };
14
- export var getConstantDatesAndFormattingOptions = function getConstantDatesAndFormattingOptions(targetFormat, isSundayFirstWeekDay, customStartDate, customEndDate, customInterval) {
15
- var startDate = new Date(2023, 0, isSundayFirstWeekDay ? 1 : 2);
16
- var endDate = new Date(2023, 0, isSundayFirstWeekDay ? 1 : 2);
17
- var defaultTargetFormat = MONTH_LONG;
18
- var interval = 'month';
15
+ const getConstantDatesAndFormattingOptions = (targetFormat, isSundayFirstWeekDay, customStartDate, customEndDate, customInterval) => {
16
+ const startDate = new Date(2023, 0, isSundayFirstWeekDay ? 1 : 2);
17
+ const endDate = new Date(2023, 0, isSundayFirstWeekDay ? 1 : 2);
18
+ let defaultTargetFormat = MONTH_LONG;
19
+ let interval = "month";
19
20
  switch (targetFormat) {
20
21
  case MONTHS_LONG:
21
22
  endDate.setMonth(11);
22
- interval = 'month';
23
+ interval = "month";
23
24
  defaultTargetFormat = MONTH_LONG;
24
25
  break;
25
26
  case MONTHS_SHORT:
26
27
  endDate.setMonth(11);
27
- interval = 'month';
28
+ interval = "month";
28
29
  defaultTargetFormat = MONTH_SHORT;
29
30
  break;
30
31
  case WEEKDAYS_LONG:
31
32
  endDate.setDate(isSundayFirstWeekDay ? 7 : 8);
32
- interval = 'day';
33
+ interval = "day";
33
34
  defaultTargetFormat = WEEKDAY_LONG;
34
35
  break;
35
36
  case WEEKDAYS_SHORT:
36
37
  endDate.setDate(isSundayFirstWeekDay ? 7 : 8);
37
- interval = 'day';
38
+ interval = "day";
38
39
  defaultTargetFormat = WEEKDAY_SHORT;
39
40
  break;
40
- default:
41
- break;
42
41
  }
43
42
  return {
44
- constantDates: getDatesRange(customStartDate != null ? customStartDate : startDate, customEndDate != null ? customEndDate : endDate, customInterval != null ? customInterval : interval),
43
+ constantDates: getDatesRange(customStartDate ?? startDate, customEndDate ?? endDate, customInterval ?? interval),
45
44
  defaultOptions: {
46
45
  namingConvention: UPPER_FIRST,
47
46
  targetFormat: defaultTargetFormat
48
47
  }
49
48
  };
50
- };
49
+ };
50
+ export {
51
+ getConstantDatesAndFormattingOptions,
52
+ getDatesRange,
53
+ isValidDate
54
+ };
@@ -1,5 +1,5 @@
1
- import { type FormatDateOptions, type IntlShape } from 'react-intl';
2
- import { type DateToFormatOptions, type Delimiter } from '../types';
1
+ import { FormatDateOptions, IntlShape } from 'react-intl';
2
+ import { DateToFormatOptions, Delimiter } from '../types';
3
3
  export declare const getDateParts: (value: Date, dateFormatIntl: IntlShape, option?: FormatDateOptions) => Intl.DateTimeFormatPart[];
4
4
  export declare const getTimeParts: (value: Date, timeFormatIntl: IntlShape, option?: FormatDateOptions) => Intl.DateTimeFormatPart[];
5
5
  export declare const getWeekdayLongDateParts: (value: Date, dateFormatIntl: IntlShape, option?: FormatDateOptions) => Intl.DateTimeFormatPart[];