@capillarytech/blaze-ui 5.23.3-beta.1 → 5.23.3-beta.3
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/CapCollapsibleNavbar/index.js +1 -1
- package/CapCondition/ConditionDate.js +1 -1
- package/CapDatePicker/index.js +1 -1
- package/CapDatePicker/tests/index.test.js +1 -1
- package/CapDateRangePicker/index.js +1 -1
- package/CapDateRangePicker/tests/CapDateRangePicker.compatibility.test.js +1 -1
- package/CapDateRangePicker/tests/CapDateRangePicker.mockData.js +1 -1
- package/CapDateTimePicker/index.js +1 -1
- package/CapDateTimePicker/tests/index.test.js +1 -1
- package/CapDateTimeRangePicker/index.js +1 -1
- package/CapEventCalendar/CalendarCanvas/index.js +1 -1
- package/CapEventCalendar/index.js +1 -1
- package/CapEventCalendar/utils.js +1 -1
- package/CapLanguageProvider/index.js +1 -1
- package/CapLanguageProvider/tests/CapLanguageProvider.test.js +3 -3
- package/CapLanguageProvider/tests/CapLanguageProvider.useCases.test.js +3 -3
- package/CapLanguageProvider/tests/locale.test.js +1 -1
- package/CapNotificationDropdown/CapNotificationDefaultCard.js +1 -1
- package/CapTimePicker/index.js +1 -1
- package/CapTimePicker/tests/CapTimePicker.mockData.js +1 -1
- package/package.json +1 -1
- package/utils/tests/dayjs.test.js +1 -1
|
@@ -15,7 +15,7 @@ import isEmpty from 'lodash/isEmpty';
|
|
|
15
15
|
import PropTypes from 'prop-types';
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import styled from 'styled-components';
|
|
18
|
-
import dayjs from "
|
|
18
|
+
import dayjs from "../utils/dayjs";
|
|
19
19
|
import CapButton from "../CapButton";
|
|
20
20
|
import CapColumn from "../CapColumn";
|
|
21
21
|
import CapDivider from "../CapDivider";
|
|
@@ -3,7 +3,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
3
3
|
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); }
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React, { useEffect, useState } from 'react';
|
|
6
|
-
import { TIME_UNITS, momentToDayjs } from "
|
|
6
|
+
import { TIME_UNITS, momentToDayjs } from "../utils/dayjs";
|
|
7
7
|
import CapColumn from "../CapColumn";
|
|
8
8
|
import CapDatePicker from "../CapDatePicker";
|
|
9
9
|
import CapHeading from "../CapHeading";
|
package/CapDatePicker/index.js
CHANGED
|
@@ -10,7 +10,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
10
10
|
import { DatePicker } from 'antd-v5';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import dayjs, { FORMAT_TOKENS, TIME_UNITS, momentToDayjs, isMomentObject, normalizeDateValue } from "
|
|
13
|
+
import dayjs, { FORMAT_TOKENS, TIME_UNITS, momentToDayjs, isMomentObject, normalizeDateValue } from "../utils/dayjs";
|
|
14
14
|
import ComponentWithLabelHOC from "../assets/HOCs/ComponentWithLabelHOC";
|
|
15
15
|
import CapIcon from "../CapIcon";
|
|
16
16
|
import * as styledVars from "../styles/_variables";
|
|
@@ -4,7 +4,7 @@ import { render, screen, waitFor } from '@testing-library/react';
|
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
import moment from 'moment-timezone';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import dayjs from "
|
|
7
|
+
import dayjs from "../../utils/dayjs";
|
|
8
8
|
import CapDatePicker from "../index";
|
|
9
9
|
|
|
10
10
|
// Mock HOC to test component directly without wrapper
|
|
@@ -10,7 +10,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
10
10
|
import { DatePicker } from 'antd-v5';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import dayjs, { FORMAT_TOKENS, TIME_UNITS, isMomentObject, normalizeDateValue, convertRangeValue } from "
|
|
13
|
+
import dayjs, { FORMAT_TOKENS, TIME_UNITS, isMomentObject, normalizeDateValue, convertRangeValue } from "../utils/dayjs";
|
|
14
14
|
import ComponentWithLabelHOC from "../assets/HOCs/ComponentWithLabelHOC";
|
|
15
15
|
import CapIcon from "../CapIcon";
|
|
16
16
|
import * as styledVars from "../styles/_variables";
|
|
@@ -9,7 +9,7 @@ import '@testing-library/jest-dom';
|
|
|
9
9
|
import { screen, waitFor } from '@testing-library/react';
|
|
10
10
|
import userEvent from '@testing-library/user-event';
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import dayjs from "
|
|
12
|
+
import dayjs from "../../utils/dayjs";
|
|
13
13
|
import { createDayjsRange, dayjsRangeValue, mockDisabledDate, mockIsDayBlocked, mockOnChange, mockOnFocusChange } from "./CapDateRangePicker.mockData";
|
|
14
14
|
import { openCalendar, renderWithProps } from "./CapDateRangePicker.testUtils";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,7 +11,7 @@ import { DatePicker } from 'antd-v5';
|
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import React, { useState, useRef, useMemo } from 'react';
|
|
13
13
|
import { injectIntl } from 'react-intl';
|
|
14
|
-
import dayjs, { TIME_UNITS, FORMAT_TOKENS, DEFAULT_TIMEZONE, toDayjsInTimezone, isMomentObject, normalizeDateValue } from "
|
|
14
|
+
import dayjs, { TIME_UNITS, FORMAT_TOKENS, DEFAULT_TIMEZONE, toDayjsInTimezone, isMomentObject, normalizeDateValue } from "../utils/dayjs";
|
|
15
15
|
import CapIcon from "../CapIcon";
|
|
16
16
|
import logDeprecationWarning from "../utils/logDeprecationWarning";
|
|
17
17
|
import messages from "./messages";
|
|
@@ -4,7 +4,7 @@ import { render, screen, waitFor } from '@testing-library/react';
|
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
import moment from 'moment-timezone';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import dayjs from "
|
|
7
|
+
import dayjs from "../../utils/dayjs";
|
|
8
8
|
import CapDateTimePicker from "../index";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
describe('<CapDateTimePicker />', () => {
|
|
@@ -11,7 +11,7 @@ import { DatePicker } from 'antd-v5';
|
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import React, { useState, useEffect, useMemo, useCallback, useRef } from 'react';
|
|
13
13
|
import { injectIntl } from 'react-intl';
|
|
14
|
-
import dayjs, { TIME_UNITS, FORMAT_TOKENS, momentToDayjs, isMomentObject, normalizeDateValue } from "
|
|
14
|
+
import dayjs, { TIME_UNITS, FORMAT_TOKENS, momentToDayjs, isMomentObject, normalizeDateValue } from "../utils/dayjs";
|
|
15
15
|
import CapIcon from "../CapIcon";
|
|
16
16
|
import CapRow from "../CapRow";
|
|
17
17
|
import CapTooltip from "../CapTooltip";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React, { useEffect, useState, useRef, useLayoutEffect, useMemo } from 'react';
|
|
4
|
-
import dayjs, { FORMAT_TOKENS } from "
|
|
4
|
+
import dayjs, { FORMAT_TOKENS } from "../../utils/dayjs";
|
|
5
5
|
import { FONT_COLOR_01, FONT_SIZE_S, FONT_FAMILY } from "../../styles/_variables";
|
|
6
6
|
import { DATE_KEY_FORMAT } from "../constants";
|
|
7
7
|
import { drawHeadingText, drawDashedLines, drawTodayLine, drawLineSeperator, drawRoundRectWithText } from "../drawUtils";
|
|
@@ -2,7 +2,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useState, useEffect } from 'react';
|
|
5
|
-
import dayjs from "
|
|
5
|
+
import dayjs from "../utils/dayjs";
|
|
6
6
|
import EmptyStateIllustrationForPromos from "../assets/images/EmptyStateIllustrationForPromos.png";
|
|
7
7
|
import CapIcon from "../CapIcon";
|
|
8
8
|
import CapIllustration from "../CapIllustration";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forEach, some } from 'lodash';
|
|
2
|
-
import dayjs, { TIME_UNITS, momentToDayjs } from "
|
|
2
|
+
import dayjs, { TIME_UNITS, momentToDayjs } from "../utils/dayjs";
|
|
3
3
|
import { DATE_STRING_FORMAT, MONTH_LABELS } from "./constants";
|
|
4
4
|
export var getQuarterForDate = date => dayjs(date).quarter();
|
|
5
5
|
export var splitMonthsArrayToQuarterChunks = function splitMonthsArrayToQuarterChunks(monthLabels) {
|
|
@@ -7,7 +7,7 @@ import { IntlProvider, addLocaleData } from 'react-intl';
|
|
|
7
7
|
import { connect } from 'react-redux';
|
|
8
8
|
import { bindActionCreators, compose } from 'redux';
|
|
9
9
|
import { createStructuredSelector } from 'reselect';
|
|
10
|
-
import dayjs from "
|
|
10
|
+
import dayjs from "../utils/dayjs";
|
|
11
11
|
import CapSpin from "../CapSpin";
|
|
12
12
|
import * as action from "./actions";
|
|
13
13
|
import * as types from "./constants";
|
|
@@ -6,7 +6,7 @@ import { screen, waitFor } from '@testing-library/react';
|
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { Provider } from 'react-redux';
|
|
9
|
-
import dayjs from "
|
|
9
|
+
import dayjs from "../../utils/dayjs";
|
|
10
10
|
import { mockActions, mockLoadingSupportedLocalesDetails, mockUser } from "./CapLanguageProvider.mockData";
|
|
11
11
|
import { createMockStore, renderWithStore, mockLocation, CapLanguageProviderClass, defaultProps, mockLanguageState, mockSupportedLocalesDetails } from "./CapLanguageProvider.testHelpers";
|
|
12
12
|
|
|
@@ -20,8 +20,8 @@ jest.mock('moment', () => {
|
|
|
20
20
|
locale: jest.fn()
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
|
-
jest.mock("
|
|
24
|
-
var actualDayjs = jest.requireActual("
|
|
23
|
+
jest.mock("../../utils/dayjs", () => {
|
|
24
|
+
var actualDayjs = jest.requireActual("../../utils/dayjs");
|
|
25
25
|
return _extends({}, actualDayjs, {
|
|
26
26
|
locale: jest.fn()
|
|
27
27
|
});
|
|
@@ -6,7 +6,7 @@ import { screen, waitFor } from '@testing-library/react';
|
|
|
6
6
|
import moment from 'moment';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { Provider } from 'react-redux';
|
|
9
|
-
import dayjs from "
|
|
9
|
+
import dayjs from "../../utils/dayjs";
|
|
10
10
|
import { mockActions, mockUser } from "./CapLanguageProvider.mockData";
|
|
11
11
|
import { createMockStore, renderWithStore, mockLocation, CapLanguageProviderClass, defaultProps, mockLanguageState, mockSupportedLocalesDetails } from "./CapLanguageProvider.testHelpers";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -16,8 +16,8 @@ jest.mock('moment', () => {
|
|
|
16
16
|
locale: jest.fn()
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
|
-
jest.mock("
|
|
20
|
-
var actualDayjs = jest.requireActual("
|
|
19
|
+
jest.mock("../../utils/dayjs", () => {
|
|
20
|
+
var actualDayjs = jest.requireActual("../../utils/dayjs");
|
|
21
21
|
return _extends({}, actualDayjs, {
|
|
22
22
|
locale: jest.fn()
|
|
23
23
|
});
|
|
@@ -8,7 +8,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { momentToDayjs } from "
|
|
11
|
+
import { momentToDayjs } from "../utils/dayjs";
|
|
12
12
|
import CapButton from "../CapButton";
|
|
13
13
|
import CapColumn from "../CapColumn";
|
|
14
14
|
import CapHeading from "../CapHeading";
|
package/CapTimePicker/index.js
CHANGED
|
@@ -10,7 +10,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
10
10
|
import { TimePicker } from 'antd-v5';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { momentToDayjs, isMomentObject, normalizeDateValue } from "
|
|
13
|
+
import { momentToDayjs, isMomentObject, normalizeDateValue } from "../utils/dayjs";
|
|
14
14
|
import logDeprecationWarning from "../utils/logDeprecationWarning";
|
|
15
15
|
import './styles.scss';
|
|
16
16
|
const styles = {"cap-timepicker-v2":"cap-timepicker-v2_n6WFj"};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import moment from 'moment-timezone';
|
|
2
|
-
import dayjs from "
|
|
2
|
+
import dayjs from "../../utils/dayjs";
|
|
3
3
|
export var mockOnChange = jest.fn();
|
|
4
4
|
export var defaultTime = dayjs('12:30:45', 'HH:mm:ss');
|
|
5
5
|
export var defaultTimeMoment = moment('12:30:45', 'HH:mm:ss');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'dayjs/locale/de';
|
|
2
2
|
import 'dayjs/locale/fr';
|
|
3
3
|
import moment from 'moment-timezone';
|
|
4
|
-
import dayjs, { TIME_UNITS, FORMAT_TOKENS, momentToDayjs, dayjsToMoment, isDayjsObject, isMomentObject, hasMomentTimezoneSupport, normalizeDateValue, convertRangeValue, toDayjsInTimezone } from "
|
|
4
|
+
import dayjs, { TIME_UNITS, FORMAT_TOKENS, momentToDayjs, dayjsToMoment, isDayjsObject, isMomentObject, hasMomentTimezoneSupport, normalizeDateValue, convertRangeValue, toDayjsInTimezone } from "../dayjs";
|
|
5
5
|
|
|
6
6
|
// Type for dayjs with timezone extension
|
|
7
7
|
// The timezone plugin adds a static tz method to dayjs
|