@transferwise/components 0.0.0-experimental-e9526a8 → 0.0.0-experimental-9a61b0a
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/build/i18n/en.json +8 -0
- package/build/index.esm.js +388 -241
- package/build/index.esm.js.map +1 -1
- package/build/index.js +387 -240
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts +2 -2
- package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
- package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts +2 -0
- package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts.map +1 -0
- package/build/types/common/focusBoundary/utils/index.d.ts +3 -0
- package/build/types/common/focusBoundary/utils/index.d.ts.map +1 -0
- package/build/types/common/focusBoundary/utils/resetFocus.d.ts +2 -0
- package/build/types/common/focusBoundary/utils/resetFocus.d.ts.map +1 -0
- package/build/types/dateLookup/DateLookup.messages.d.ts +65 -0
- package/build/types/dateLookup/DateLookup.messages.d.ts.map +1 -0
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts +3 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts +4 -26
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +4 -29
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/upload/steps/completeStep/completeStep.d.ts.map +1 -1
- package/build/types/upload/steps/processingStep/processingStep.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +1 -8
- package/src/common/focusBoundary/FocusBoundary.spec.tsx +66 -0
- package/src/common/focusBoundary/FocusBoundary.tsx +36 -6
- package/src/common/focusBoundary/__snapshots__/FocusBoundary.spec.tsx.snap +16 -0
- package/src/common/focusBoundary/utils/getFocusableElements.js +25 -0
- package/src/common/focusBoundary/utils/getFocusableElements.spec.js +51 -0
- package/src/common/focusBoundary/utils/index.js +2 -0
- package/src/common/focusBoundary/utils/resetFocus.js +23 -0
- package/src/common/focusBoundary/utils/resetFocus.spec.js +103 -0
- package/src/dateLookup/DateLookup.css +1 -1
- package/src/dateLookup/DateLookup.keyboardEvents.spec.js +3 -3
- package/src/dateLookup/DateLookup.less +4 -0
- package/src/dateLookup/DateLookup.messages.js +44 -0
- package/src/dateLookup/DateLookup.testingLibrary.spec.js +39 -0
- package/src/dateLookup/dateHeader/DateHeader.js +48 -26
- package/src/dateLookup/dateHeader/DateHeader.spec.js +37 -0
- package/src/dateLookup/dayCalendar/DayCalendar.js +3 -1
- package/src/dateLookup/dayCalendar/DayCalendar.spec.js +7 -1
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.js +7 -3
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.spec.js +1 -0
- package/src/dateLookup/monthCalendar/MonthCalendar.js +3 -1
- package/src/dateLookup/monthCalendar/MonthCalendar.spec.js +7 -1
- package/src/dateLookup/monthCalendar/table/MonthCalendarTable.spec.js +4 -5
- package/src/dateLookup/tableLink/TableLink.js +24 -3
- package/src/dateLookup/tableLink/TableLink.spec.js +60 -4
- package/src/dateLookup/yearCalendar/YearCalendar.js +16 -3
- package/src/dateLookup/yearCalendar/YearCalendar.spec.js +14 -1
- package/src/dateLookup/yearCalendar/table/YearCalendarTable.spec.js +4 -5
- package/src/i18n/en.json +8 -0
- package/src/main.css +1 -1
- package/src/upload/Upload.js +1 -1
- package/src/upload/steps/completeStep/completeStep.js +4 -1
- package/src/upload/steps/processingStep/processingStep.js +1 -0
- package/src/uploadInput/uploadItem/UploadItem.tsx +1 -1
|
@@ -2,8 +2,6 @@ import * as formatting from '@transferwise/formatting';
|
|
|
2
2
|
import { shallow } from 'enzyme';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
|
|
5
|
-
import TableLink from '../../tableLink';
|
|
6
|
-
|
|
7
5
|
import YearCalendarTable from '.';
|
|
8
6
|
|
|
9
7
|
jest.mock('react-intl');
|
|
@@ -29,7 +27,7 @@ describe('YearCalendarTable', () => {
|
|
|
29
27
|
it('generates 5x4 table', () => {
|
|
30
28
|
expect(component.find('tbody tr')).toHaveLength(5);
|
|
31
29
|
expect(component.find('tbody td')).toHaveLength(20);
|
|
32
|
-
expect(
|
|
30
|
+
expect(getTableLink()).toHaveLength(20);
|
|
33
31
|
});
|
|
34
32
|
|
|
35
33
|
it('starts with year 2000, 2020, 2040 etc', () => {
|
|
@@ -81,7 +79,7 @@ describe('YearCalendarTable', () => {
|
|
|
81
79
|
selectedDate: today,
|
|
82
80
|
viewYear: today.getFullYear(),
|
|
83
81
|
});
|
|
84
|
-
expect(
|
|
82
|
+
expect(getTableLink().find({ today: true }).prop('item')).toBe(today.getFullYear());
|
|
85
83
|
});
|
|
86
84
|
|
|
87
85
|
it('passes onSelect to TableLink', () => {
|
|
@@ -92,5 +90,6 @@ describe('YearCalendarTable', () => {
|
|
|
92
90
|
expect(component.find('.sr-only').text()).toBe('Enter date..');
|
|
93
91
|
});
|
|
94
92
|
|
|
95
|
-
const getTableLinkAt = (i) => component.find(
|
|
93
|
+
const getTableLinkAt = (i) => component.find('[type="year"]').at(i);
|
|
94
|
+
const getTableLink = () => component.find('[type="year"]');
|
|
96
95
|
});
|
package/src/i18n/en.json
CHANGED
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
"neptune.DateInput.day.label": "Day",
|
|
6
6
|
"neptune.DateInput.month.label": "Month",
|
|
7
7
|
"neptune.DateInput.year.label": "Year",
|
|
8
|
+
"neptune.DateLookup.day": "day",
|
|
9
|
+
"neptune.DateLookup.goTo20YearView": "Go to 20 year view",
|
|
10
|
+
"neptune.DateLookup.month": "month",
|
|
11
|
+
"neptune.DateLookup.next": "next",
|
|
12
|
+
"neptune.DateLookup.previous": "previous",
|
|
13
|
+
"neptune.DateLookup.selected": "selected",
|
|
14
|
+
"neptune.DateLookup.twentyYears": "20 years",
|
|
15
|
+
"neptune.DateLookup.year": "year",
|
|
8
16
|
"neptune.Link.opensInNewTab": "(opens in new tab)",
|
|
9
17
|
"neptune.MoneyInput.Select.placeholder": "Select an option...",
|
|
10
18
|
"neptune.Select.searchPlaceholder": "Search...",
|