@transferwise/components 0.0.0-experimental-c5b4f4d → 0.0.0-experimental-fd8d699

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 (31) hide show
  1. package/build/i18n/hu.json +2 -2
  2. package/build/index.esm.js +7 -6
  3. package/build/index.esm.js.map +1 -1
  4. package/build/index.js +7 -6
  5. package/build/index.js.map +1 -1
  6. package/build/types/common/dateUtils/getFormatForLocale/getFormatForLocale.d.ts +3 -0
  7. package/build/types/common/dateUtils/getFormatForLocale/getFormatForLocale.d.ts.map +1 -0
  8. package/build/types/common/dateUtils/index.d.ts +7 -6
  9. package/build/types/common/dateUtils/index.d.ts.map +1 -1
  10. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  11. package/package.json +1 -1
  12. package/src/common/dateUtils/getFormatForLocale/getFormatForLocale.ts +2 -0
  13. package/src/common/dateUtils/index.ts +7 -6
  14. package/src/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.ts +1 -1
  15. package/src/dateInput/DateInput.tsx +2 -5
  16. package/src/i18n/hu.json +2 -2
  17. package/build/types/common/dateUtils/getDayNames/index.d.ts +0 -2
  18. package/build/types/common/dateUtils/getDayNames/index.d.ts.map +0 -1
  19. package/build/types/common/dateUtils/getMonthNames/index.d.ts +0 -2
  20. package/build/types/common/dateUtils/getMonthNames/index.d.ts.map +0 -1
  21. package/build/types/common/dateUtils/isDateValid/index.d.ts +0 -2
  22. package/build/types/common/dateUtils/isDateValid/index.d.ts.map +0 -1
  23. package/build/types/common/dateUtils/isWithinRange/index.d.ts +0 -2
  24. package/build/types/common/dateUtils/isWithinRange/index.d.ts.map +0 -1
  25. package/build/types/common/dateUtils/moveToWithinRange/index.d.ts +0 -2
  26. package/build/types/common/dateUtils/moveToWithinRange/index.d.ts.map +0 -1
  27. package/src/common/dateUtils/getDayNames/index.ts +0 -1
  28. package/src/common/dateUtils/getMonthNames/index.ts +0 -1
  29. package/src/common/dateUtils/isDateValid/index.ts +0 -1
  30. package/src/common/dateUtils/isWithinRange/index.ts +0 -1
  31. package/src/common/dateUtils/moveToWithinRange/index.ts +0 -1
@@ -0,0 +1,3 @@
1
+ export declare const MDY: Set<string>;
2
+ export declare const YMD: Set<string>;
3
+ //# sourceMappingURL=getFormatForLocale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getFormatForLocale.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getFormatForLocale/getFormatForLocale.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,aAAqB,CAAC;AACtC,eAAO,MAAM,GAAG,aAA4D,CAAC"}
@@ -1,7 +1,8 @@
1
- export { getDayNames } from './getDayNames';
2
- export { moveToWithinRange } from './moveToWithinRange';
3
- export { isWithinRange } from './isWithinRange';
4
- export { getMonthNames } from './getMonthNames';
5
- export { isDateValid } from './isDateValid';
6
- export { isMonthAndYearFormat } from './isMonthAndYearFormat';
1
+ export { getDayNames } from './getDayNames/getDayNames';
2
+ export { moveToWithinRange } from './moveToWithinRange/moveToWithinRange';
3
+ export { isWithinRange } from './isWithinRange/isWithinRange';
4
+ export { getMonthNames } from './getMonthNames/getMonthNames';
5
+ export { isDateValid } from './isDateValid/isDateValid';
6
+ export { isMonthAndYearFormat } from './isMonthAndYearFormat/isMonthAndYearFormat';
7
+ export { MDY, YMD } from './getFormatForLocale/getFormatForLocale';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/dateUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/dateUtils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,yCAAyC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/dateInput/DateInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAsB,gBAAgB,EAA4B,MAAM,IAAI,CAAC;AACpF,OAAO,EAAQ,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAM1F,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;I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CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;CACxD;AAED,QAAA,MAAM,SAAS,4OAmBZ,cAAc,gCAwShB,CAAC;AA8BF,eAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-c5b4f4d",
3
+ "version": "0.0.0-experimental-fd8d699",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -0,0 +1,2 @@
1
+ export const MDY = new Set(['en-US']);
2
+ export const YMD = new Set(['hu', 'hu-HU', 'zh-HK', 'zh-CN', 'ja', 'ja-JP']);
@@ -1,6 +1,7 @@
1
- export { getDayNames } from './getDayNames';
2
- export { moveToWithinRange } from './moveToWithinRange';
3
- export { isWithinRange } from './isWithinRange';
4
- export { getMonthNames } from './getMonthNames';
5
- export { isDateValid } from './isDateValid';
6
- export { isMonthAndYearFormat } from './isMonthAndYearFormat';
1
+ export { getDayNames } from './getDayNames/getDayNames';
2
+ export { moveToWithinRange } from './moveToWithinRange/moveToWithinRange';
3
+ export { isWithinRange } from './isWithinRange/isWithinRange';
4
+ export { getMonthNames } from './getMonthNames/getMonthNames';
5
+ export { isDateValid } from './isDateValid/isDateValid';
6
+ export { isMonthAndYearFormat } from './isMonthAndYearFormat/isMonthAndYearFormat';
7
+ export { MDY, YMD } from './getFormatForLocale/getFormatForLocale';
@@ -1,4 +1,4 @@
1
- import { validDateString } from '../isDateValid';
1
+ import { validDateString } from '../isDateValid/isDateValid';
2
2
 
3
3
  export const isMonthAndYearFormat = (dateString: string) =>
4
4
  validDateString(dateString) && dateString.split('-').length < 3;
@@ -4,7 +4,7 @@ import { useIntl } from 'react-intl';
4
4
 
5
5
  import { Input, SelectInput, SelectInputProps, SelectInputOptionContent } from '..';
6
6
  import { Size, DateMode, MonthFormat, SizeSmall, SizeMedium, SizeLarge } from '../common';
7
- import { getMonthNames, isDateValid, isMonthAndYearFormat } from '../common/dateUtils';
7
+ import { getMonthNames, isDateValid, isMonthAndYearFormat, MDY, YMD } from '../common/dateUtils';
8
8
 
9
9
  import messages from './DateInput.messages';
10
10
  import { convertToLocalMidnight } from './utils';
@@ -56,9 +56,6 @@ const DateInput = ({
56
56
  }: DateInputProps) => {
57
57
  const { locale, formatMessage } = useIntl();
58
58
 
59
- const MDY = new Set(['en-US']);
60
- const YMD = new Set(['hu', 'hu-HU', 'zh-HK', 'zh-CN', 'ja', 'ja-JP']);
61
-
62
59
  const getDateObject = (): Date | undefined => {
63
60
  if (value && isDateValid(value)) {
64
61
  return typeof value === 'string' ? convertToLocalMidnight(value) : value;
@@ -313,7 +310,7 @@ const DateInput = ({
313
310
  }
314
311
  >
315
312
  <div className="row">
316
- {(function returnOrderedInputs() {
313
+ {(() => {
317
314
  if (monthYearOnly) {
318
315
  return (
319
316
  <>
package/src/i18n/hu.json CHANGED
@@ -29,13 +29,13 @@
29
29
  "neptune.Upload.csButtonText": "Másik fájl feltöltése?",
30
30
  "neptune.Upload.csFailureText": "Feltöltés sikertelen. Kérünk, próbáld újra",
31
31
  "neptune.Upload.csSuccessText": "Feltöltés sikeres",
32
- "neptune.Upload.csTooLargeMessage": "Kérünk, {maxSize} MB-nál kisebb fájlt tölts fel",
32
+ "neptune.Upload.csTooLargeMessage": "Kérünk, olyan fájlt küldj el, amely kisebb mint {maxSize}MB",
33
33
  "neptune.Upload.csWrongTypeMessage": "Nem támogatott fájltípus. Kérünk, próbáld újra másik fájllal",
34
34
  "neptune.Upload.psButtonText": "Mégsem",
35
35
  "neptune.Upload.psProcessingText": "Feltöltés...",
36
36
  "neptune.Upload.usButtonText": "Vagy válaszd ki a fájlt",
37
37
  "neptune.Upload.usDropMessage": "Húzd ide a fájlokat a feltöltéshez",
38
- "neptune.Upload.usPlaceholder": "Húzz ide egy {maxSize} MB-nál kisebb fájlt",
38
+ "neptune.Upload.usPlaceholder": "Húzz ide egy legfeljebb {maxSize} MB méretű fájlt",
39
39
  "neptune.UploadButton.allFileTypes": "Összes fájltípus",
40
40
  "neptune.UploadButton.dropFiles": "Húzd a fájlokat ide a feltöltéshez",
41
41
  "neptune.UploadButton.instructions": "{fileTypes}, legfeljebb {size}MB",
@@ -1,2 +0,0 @@
1
- export { getDayNames } from './getDayNames';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDayNames/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getMonthNames } from './getMonthNames';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getMonthNames/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { isDateValid, validDateString } from './isDateValid';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isDateValid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
@@ -1,2 +0,0 @@
1
- export { isWithinRange } from './isWithinRange';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/isWithinRange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { moveToWithinRange } from './moveToWithinRange';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/moveToWithinRange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- export { getDayNames } from './getDayNames';
@@ -1 +0,0 @@
1
- export { getMonthNames } from './getMonthNames';
@@ -1 +0,0 @@
1
- export { isDateValid, validDateString } from './isDateValid';
@@ -1 +0,0 @@
1
- export { isWithinRange } from './isWithinRange';
@@ -1 +0,0 @@
1
- export { moveToWithinRange } from './moveToWithinRange';