@transferwise/components 0.0.0-experimental-c1fc9b6 → 0.0.0-experimental-3d0a13d

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 (69) hide show
  1. package/build/index.esm.js +252 -184
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +253 -185
  4. package/build/index.js.map +1 -1
  5. package/build/types/common/textFormat/formatWithPattern/formatWithPattern.d.ts +1 -1
  6. package/build/types/common/textFormat/formatWithPattern/formatWithPattern.d.ts.map +1 -1
  7. package/build/types/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.d.ts +1 -2
  8. package/build/types/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.d.ts.map +1 -1
  9. package/build/types/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.d.ts +1 -5
  10. package/build/types/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.d.ts.map +1 -1
  11. package/build/types/common/textFormat/unformatWithPattern/unformatWithPattern.d.ts +1 -1
  12. package/build/types/common/textFormat/unformatWithPattern/unformatWithPattern.d.ts.map +1 -1
  13. package/build/types/index.d.ts +1 -2
  14. package/build/types/index.d.ts.map +1 -1
  15. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +11 -5
  16. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
  17. package/build/types/inputWithDisplayFormat/index.d.ts +1 -2
  18. package/build/types/inputWithDisplayFormat/index.d.ts.map +1 -1
  19. package/build/types/inputs/Input.d.ts +6 -8
  20. package/build/types/inputs/Input.d.ts.map +1 -1
  21. package/build/types/inputs/SelectInput.d.ts +2 -2
  22. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  23. package/build/types/moneyInput/MoneyInput.d.ts +45 -31
  24. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  25. package/build/types/moneyInput/MoneyInput.messages.d.ts +6 -6
  26. package/build/types/moneyInput/MoneyInput.messages.d.ts.map +1 -1
  27. package/build/types/moneyInput/currencyFormatting.d.ts +2 -2
  28. package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
  29. package/build/types/moneyInput/index.d.ts +2 -1
  30. package/build/types/moneyInput/index.d.ts.map +1 -1
  31. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +11 -5
  32. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
  33. package/build/types/textareaWithDisplayFormat/index.d.ts +1 -2
  34. package/build/types/textareaWithDisplayFormat/index.d.ts.map +1 -1
  35. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +82 -55
  36. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  37. package/build/types/withDisplayFormat/index.d.ts +1 -2
  38. package/build/types/withDisplayFormat/index.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/src/common/textFormat/formatWithPattern/{formatWithPattern.ts → formatWithPattern.js} +4 -8
  41. package/src/common/textFormat/getCursorPositionAfterKeystroke/{getCursorPositionAfterKeystroke.ts → getCursorPositionAfterKeystroke.js} +6 -7
  42. package/src/common/textFormat/getSymbolsInPatternWithPosition/{getSymbolsInPatternWithPosition.ts → getSymbolsInPatternWithPosition.js} +2 -7
  43. package/src/common/textFormat/unformatWithPattern/{unformatWithPattern.ts → unformatWithPattern.js} +2 -3
  44. package/src/index.ts +6 -2
  45. package/src/inputWithDisplayFormat/InputWithDisplayFormat.js +14 -0
  46. package/src/inputWithDisplayFormat/index.js +1 -0
  47. package/src/inputs/Input.tsx +11 -6
  48. package/src/inputs/SelectInput.tsx +2 -2
  49. package/src/moneyInput/{MoneyInput.rtl.spec.js → MoneyInput.rtl.spec.tsx} +4 -4
  50. package/src/moneyInput/MoneyInput.spec.js +109 -49
  51. package/src/moneyInput/MoneyInput.story.tsx +6 -14
  52. package/src/moneyInput/{MoneyInput.js → MoneyInput.tsx} +189 -173
  53. package/src/moneyInput/{currencyFormatting.spec.js → currencyFormatting.spec.ts} +2 -2
  54. package/src/moneyInput/{currencyFormatting.js → currencyFormatting.ts} +7 -10
  55. package/src/moneyInput/index.ts +7 -0
  56. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +14 -0
  57. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.spec.js +1 -3
  58. package/src/textareaWithDisplayFormat/index.js +1 -0
  59. package/src/withDisplayFormat/WithDisplayFormat.js +312 -0
  60. package/src/withDisplayFormat/index.js +1 -0
  61. package/src/inputWithDisplayFormat/InputWithDisplayFormat.tsx +0 -11
  62. package/src/inputWithDisplayFormat/index.ts +0 -2
  63. package/src/moneyInput/index.js +0 -1
  64. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +0 -30
  65. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.tsx +0 -11
  66. package/src/textareaWithDisplayFormat/index.ts +0 -2
  67. package/src/withDisplayFormat/WithDisplayFormat.tsx +0 -303
  68. package/src/withDisplayFormat/index.ts +0 -2
  69. /package/src/moneyInput/{MoneyInput.messages.js → MoneyInput.messages.ts} +0 -0
@@ -1,3 +1,3 @@
1
- declare const formatWithPattern: (value: string, pattern: string) => string;
2
1
  export default formatWithPattern;
2
+ declare function formatWithPattern(value: any, pattern: any): any;
3
3
  //# sourceMappingURL=formatWithPattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatWithPattern.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/formatWithPattern/formatWithPattern.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,iBAAiB,UAAW,MAAM,WAAW,MAAM,KAAG,MAuB3D,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"formatWithPattern.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/formatWithPattern/formatWithPattern.js"],"names":[],"mappings":";AAEA,kEAoBC"}
@@ -1,4 +1,3 @@
1
- import type { EventType } from '../../../withDisplayFormat/WithDisplayFormat';
2
- declare const getCursorPositionAfteractionstroke: (action: EventType, selectionStart: number, selectionEnd: number, pattern: string, pastedLength: number) => number;
3
1
  export default getCursorPositionAfteractionstroke;
2
+ declare function getCursorPositionAfteractionstroke(action: any, selectionStart: any, selectionEnd: any, pattern: any, pastedLength: any): any;
4
3
  //# sourceMappingURL=getCursorPositionAfterKeystroke.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCursorPositionAfterKeystroke.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AAI9E,QAAA,MAAM,kCAAkC,WAC9B,SAAS,kBACD,MAAM,gBACR,MAAM,WACX,MAAM,gBACD,MAAM,KACnB,MA6BF,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
1
+ {"version":3,"file":"getCursorPositionAfterKeystroke.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js"],"names":[],"mappings":";AAGA,+IAmCC"}
@@ -1,7 +1,3 @@
1
- export type SymbolWithPosition = {
2
- index: number;
3
- symbol: string;
4
- };
5
- declare const getSymbolsInPatternWithPosition: (pattern: string) => SymbolWithPosition[];
6
1
  export default getSymbolsInPatternWithPosition;
2
+ declare function getSymbolsInPatternWithPosition(pattern: any): any[];
7
3
  //# sourceMappingURL=getSymbolsInPatternWithPosition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getSymbolsInPatternWithPosition.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,+BAA+B,YAAa,MAAM,KAAG,kBAAkB,EAU5E,CAAC;AAEF,eAAe,+BAA+B,CAAC"}
1
+ {"version":3,"file":"getSymbolsInPatternWithPosition.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js"],"names":[],"mappings":";AAAA,sEAUC"}
@@ -1,3 +1,3 @@
1
- declare const unformatWithPattern: (value: string, pattern: string) => string;
2
1
  export default unformatWithPattern;
2
+ declare function unformatWithPattern(value: any, pattern: any): string;
3
3
  //# sourceMappingURL=unformatWithPattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unformatWithPattern.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/unformatWithPattern/unformatWithPattern.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,mBAAmB,UAAW,MAAM,WAAW,MAAM,KAAG,MAQ7D,CAAC;AAKF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"unformatWithPattern.d.ts","sourceRoot":"","sources":["../../../../../src/common/textFormat/unformatWithPattern/unformatWithPattern.js"],"names":[],"mappings":";AAAA,uEAQC"}
@@ -2,14 +2,13 @@
2
2
  * Types
3
3
  */
4
4
  export type { InputProps } from './inputs/Input';
5
- export type { InputWithDisplayFormatProps } from './inputWithDisplayFormat';
6
5
  export type { InputGroupProps } from './inputs/InputGroup';
7
6
  export type { SearchInputProps } from './inputs/SearchInput';
8
7
  export type { SelectInputGroupItem, SelectInputItem, SelectInputOptionContentProps, SelectInputOptionItem, SelectInputProps, SelectInputSeparatorItem, SelectInputTriggerButtonProps, } from './inputs/SelectInput';
9
8
  export type { TextAreaProps } from './inputs/TextArea';
10
- export type { TextareaWithDisplayFormatProps } from './textareaWithDisplayFormat';
11
9
  export type { UploadedFile, UploadError, UploadResponse } from './uploadInput/types';
12
10
  export type { ModalProps } from './modal';
11
+ export type { CurrencyHeaderItem, CurrencyItem, CurrencyOptionItem, MoneyInputProps, } from './moneyInput';
13
12
  export type { LayoutDirection, TypographyTypes, TitleTypes, BodyTypes, LinkTypes, DisplayTypes, } from './common';
14
13
  /**
15
14
  * Components
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAClF,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrF,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EACV,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,GACb,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CA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UAAU,EACV,OAAO,GACR,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,5 +1,11 @@
1
- /// <reference types="react" />
2
- import { type TextInputProps } from '../withDisplayFormat';
3
- declare const InputWithDisplayFormat: (props: TextInputProps) => import("react").JSX.Element;
4
- export default InputWithDisplayFormat;
5
- //# sourceMappingURL=InputWithDisplayFormat.d.ts.map
1
+ import * as React from 'react';
2
+
3
+ export interface InputWithDisplayFormatProps {
4
+ displayPattern: string;
5
+ onChange: (...args: any[])=>any;
6
+ }
7
+
8
+ declare const InputWithDisplayFormat: React.FC<InputWithDisplayFormatProps>;
9
+
10
+ export default InputWithDisplayFormat;
11
+
@@ -1 +1 @@
1
- {"version":3,"file":"InputWithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/inputWithDisplayFormat/InputWithDisplayFormat.tsx"],"names":[],"mappings":";AACA,OAA0B,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE9E,QAAA,MAAM,sBAAsB,UAAW,cAAc,gCAKpD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"InputWithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/inputWithDisplayFormat/InputWithDisplayFormat.js"],"names":[],"mappings":";AAIA,iFAEC"}
@@ -1,3 +1,2 @@
1
- export { default } from './InputWithDisplayFormat';
2
- export type { TextInputProps as InputWithDisplayFormatProps } from '../withDisplayFormat';
1
+ export { default } from "./InputWithDisplayFormat";
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/inputWithDisplayFormat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,YAAY,EAAE,cAAc,IAAI,2BAA2B,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/inputWithDisplayFormat/index.js"],"names":[],"mappings":""}
@@ -1,13 +1,11 @@
1
- import { InputHTMLAttributes } from 'react';
1
+ /// <reference types="react" />
2
2
  import { SizeLarge, SizeMedium, SizeSmall } from '../common';
3
- export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> & {
3
+ import { Merge } from '../utils';
4
+ export interface InputProps extends Merge<React.ComponentPropsWithRef<'input'>, {
4
5
  size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;
5
6
  shape?: 'rectangle' | 'pill';
6
7
  'aria-invalid'?: boolean;
7
- };
8
- export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
9
- size?: "auto" | "sm" | "md" | "lg" | undefined;
10
- shape?: "rectangle" | "pill" | undefined;
11
- 'aria-invalid'?: boolean | undefined;
12
- } & import("react").RefAttributes<HTMLInputElement>>;
8
+ }> {
9
+ }
10
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
13
11
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/inputs/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAc,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAK7D,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,GAAG;IAC7E,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,KAAK;;;;oDAkBhB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/inputs/Input.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKjC,MAAM,WAAW,UACf,SAAQ,KAAK,CACX,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACpC;IACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEN,eAAO,MAAM,KAAK,sHAkBhB,CAAC"}
@@ -32,13 +32,13 @@ export interface SelectInputProps<T = string> {
32
32
  placeholderShown: boolean;
33
33
  clear: (() => void) | undefined;
34
34
  disabled: boolean;
35
- size: 'md' | 'lg';
35
+ size: 'sm' | 'md' | 'lg';
36
36
  className: string | undefined;
37
37
  }) => React.ReactNode;
38
38
  filterable?: boolean;
39
39
  filterPlaceholder?: string;
40
40
  disabled?: boolean;
41
- size?: 'md' | 'lg';
41
+ size?: 'sm' | 'md' | 'lg';
42
42
  className?: string;
43
43
  onFilterChange?: (args: {
44
44
  query: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../src/inputs/SelectInput.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAmCjC,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;IACT,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,GAAG,MAAM;IAC9C,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,MAAM,IAClC,qBAAqB,CAAC,CAAC,CAAC,GACxB,oBAAoB,CAAC,CAAC,CAAC,GACvB,wBAAwB,CAAC;AAyD7B,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,MAAM;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,KAAK,EAAE,SAAS,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClD,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,aAAa,CAAC,EACV,CAAC,MAAM,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GA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AC,EAAE;IAAE,EAAE,CAAC,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEzD,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,mCAAmC,GAAG,QAAQ,EAAE,EACjG,EAAkB,EAClB,GAAG,SAAS,EACb,EAAE,6BAA6B,CAAC,CAAC,CAAC,+BAalC;AAwTD,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,WAAW,EACX,IAAI,GACL,EAAE,6BAA6B,+BAiD/B"}
@@ -1,31 +1,45 @@
1
- import * as React from 'react';
2
-
3
- export type MoneyInputSize = "sm" | "md" | "lg";
4
-
5
- export interface MoneyInputProps {
6
- id?: string;
7
- currencies: any[];
8
- selectedCurrency?: any;
9
- onCurrencyChange?: (...args: any[])=>any;
10
- placeholder?: number;
11
- amount?: number;
12
- size?: MoneyInputSize;
13
- onAmountChange?: (...args: any[])=>any;
14
- addon?: React.ReactNode;
15
- searchPlaceholder?: string;
16
- /**
17
- * Allows the consumer to react to searching, while the search itself is handled internally. Called with `{ searchQuery: string, filteredOptions: Currency[] }`
18
- */
19
- onSearchChange?: (...args: any[])=>any;
20
- customActionLabel?: React.ReactNode;
21
- onCustomAction?: (...args: any[])=>any;
22
- classNames?: any;
23
- selectProps?: Object;
24
- maxLengthOverride?: number;
25
- }
26
-
27
- export class MoneyInput extends React.Component<MoneyInputProps, any> {
28
- render(): JSX.Element;
29
-
30
- }
31
-
1
+ /// <reference types="react" />
2
+ import { WrappedComponentProps } from 'react-intl';
3
+ import { SizeLarge, SizeMedium, SizeSmall } from '../common/propsValues/size';
4
+ import { SelectInputProps } from '../inputs/SelectInput';
5
+ export interface CurrencyOptionItem {
6
+ header?: never;
7
+ value: string;
8
+ label: string;
9
+ currency: string;
10
+ note?: string;
11
+ searchable?: string;
12
+ }
13
+ export interface CurrencyHeaderItem {
14
+ header: string;
15
+ }
16
+ export type CurrencyItem = CurrencyOptionItem | CurrencyHeaderItem;
17
+ export interface MoneyInputProps extends WrappedComponentProps {
18
+ id?: string;
19
+ currencies: readonly CurrencyItem[];
20
+ selectedCurrency: CurrencyOptionItem;
21
+ onCurrencyChange?: (value: CurrencyOptionItem) => void;
22
+ placeholder?: number;
23
+ amount: number | null;
24
+ size?: SizeSmall | SizeMedium | SizeLarge;
25
+ onAmountChange?: (value: number | null) => void;
26
+ addon?: React.ReactNode;
27
+ searchPlaceholder?: string;
28
+ /**
29
+ * Allows the consumer to react to searching, while the search itself is handled internally.
30
+ */
31
+ onSearchChange?: (value: {
32
+ searchQuery: string;
33
+ filteredOptions: CurrencyItem[];
34
+ }) => void;
35
+ customActionLabel?: React.ReactNode;
36
+ onCustomAction?: () => void;
37
+ classNames?: Record<string, string>;
38
+ selectProps?: Partial<SelectInputProps<CurrencyOptionItem>>;
39
+ maxLengthOverride?: number;
40
+ }
41
+ declare const _default: import("react").FC<import("react-intl").WithIntlProps<MoneyInputProps>> & {
42
+ WrappedComponent: import("react").ComponentType<MoneyInputProps>;
43
+ };
44
+ export default _default;
45
+ //# sourceMappingURL=MoneyInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.js"],"names":[],"mappings":";;;;AA+DA;IACE,wBAcC;IAXC,mBAAkD;IAClD;;;;MASC;IAGH,uDAaC;IAED,+CAWE;IAEF,oCAIE;IAEF,kCAyBE;IAEF,qCAgBE;IAEF,yBAGE;IAFA,mCAA0B;IAI5B,0BAEE;IAEF;;;;MAME;IAEF,0BAwBC;IAED,kBAsBC;IAED,yCAGE;IAEF,+BAKE;IAEF,+CAQE;IAEF,+BAAqE;IAErE,sCAyIC;CACF"}
1
+ {"version":3,"file":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EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3F,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;;;;AA2YD,wBAAsC"}
@@ -1,8 +1,8 @@
1
- declare namespace _default {
2
- namespace selectPlaceholder {
3
- const id: string;
4
- const defaultMessage: string;
5
- }
6
- }
1
+ declare const _default: {
2
+ selectPlaceholder: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ };
7
7
  export default _default;
8
8
  //# sourceMappingURL=MoneyInput.messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyInput.messages.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.messages.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"MoneyInput.messages.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.messages.ts"],"names":[],"mappings":";;;;;;AAEA,wBAKG"}
@@ -1,4 +1,4 @@
1
- export function parseAmount(number: any, currency: any, locale: any): number;
1
+ import { formatAmount } from '@transferwise/formatting';
2
2
  export { formatAmount };
3
- import { formatAmount } from "@transferwise/formatting/dist/currency/currency";
3
+ export declare function parseAmount(number: string, currency: string, locale?: string): number;
4
4
  //# sourceMappingURL=currencyFormatting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"currencyFormatting.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/currencyFormatting.js"],"names":[],"mappings":"AAkEA,6EAcC"}
1
+ {"version":3,"file":"currencyFormatting.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/currencyFormatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIxD,OAAO,EAAE,YAAY,EAAE,CAAC;AA2DxB,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAiB,UAcpF"}
@@ -1,2 +1,3 @@
1
- export { default } from "./MoneyInput";
1
+ export type { CurrencyHeaderItem, CurrencyItem, CurrencyOptionItem, MoneyInputProps, } from './MoneyInput';
2
+ export { default } from './MoneyInput';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -1,5 +1,11 @@
1
- /// <reference types="react" />
2
- import { type TextInputProps } from '../withDisplayFormat';
3
- declare const TextareaWithDisplayFormat: (props: TextInputProps) => import("react").JSX.Element;
4
- export default TextareaWithDisplayFormat;
5
- //# sourceMappingURL=TextareaWithDisplayFormat.d.ts.map
1
+ import * as React from 'react';
2
+
3
+ export interface TextareaWithDisplayFormatProps {
4
+ displayPattern: string;
5
+ onChange: (...args: any[])=>any;
6
+ }
7
+
8
+ declare const TextareaWithDisplayFormat: React.FC<TextareaWithDisplayFormatProps>;
9
+
10
+ export default TextareaWithDisplayFormat;
11
+
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaWithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/textareaWithDisplayFormat/TextareaWithDisplayFormat.tsx"],"names":[],"mappings":";AACA,OAA0B,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE9E,QAAA,MAAM,yBAAyB,UAAW,cAAc,gCAKvD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"TextareaWithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/textareaWithDisplayFormat/TextareaWithDisplayFormat.js"],"names":[],"mappings":";AAIA,oFAEC"}
@@ -1,3 +1,2 @@
1
- export { default } from './TextareaWithDisplayFormat';
2
- export type { TextInputProps as TextareaWithDisplayFormatProps } from '../withDisplayFormat';
1
+ export { default } from "./TextareaWithDisplayFormat";
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/textareaWithDisplayFormat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,YAAY,EAAE,cAAc,IAAI,8BAA8B,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/textareaWithDisplayFormat/index.js"],"names":[],"mappings":""}
@@ -1,63 +1,90 @@
1
- import { Component, KeyboardEvent, ClipboardEvent, ChangeEvent, FocusEvent } from 'react';
2
- import { HistoryNavigator } from '../common';
3
- import { InputProps } from '../inputs/Input';
4
- import { TextAreaProps } from '../inputs/TextArea';
5
- import { Merge } from '../utils';
6
- export type TextInputProps = Merge<InputProps, {
7
- value?: string;
8
- displayPattern: string;
9
- /**
10
- * autocomplete hides our form help so we need to disable it when help text
11
- * is present. Chrome ignores autocomplete=off, the only way to disable it is
12
- * to provide an 'invalid' value, for which 'disabled' serves.
13
- */
14
- autoComplete?: InputProps['autoComplete'] | 'disabled';
15
- onChange?: (value: string) => void;
16
- onBlur?: (value: string | null) => void;
17
- onFocus?: (value: string | null) => void;
18
- }>;
19
- export type Props = typeof WithDisplayFormat.defaultProps & {
20
- render: (renderProps: InputProps | TextAreaProps) => JSX.Element;
21
- } & TextInputProps;
22
- export type EventType = 'KeyDown' | 'Paste' | 'Cut' | 'Undo' | 'Redo' | 'Backspace' | 'Delete' | null;
23
- type State = {
24
- value: string;
25
- historyNavigator: HistoryNavigator;
26
- prevDisplayPattern?: string;
27
- triggerType?: EventType;
28
- triggerEvent?: KeyboardEvent<HTMLInputElement> | null;
29
- pastedLength?: number;
30
- selectionStart?: HTMLInputElement['selectionStart'];
31
- selectionEnd?: HTMLInputElement['selectionEnd'];
32
- };
33
- declare class WithDisplayFormat extends Component<Props, State> {
34
- static defaultProps: {
35
- autoComplete: string;
36
- displayPattern: string;
37
- type: string;
38
- value: string;
39
- };
40
- constructor(props: Props);
41
- static getDerivedStateFromProps({ displayPattern }: Props, { prevDisplayPattern, value, historyNavigator }: State): {
42
- prevDisplayPattern: string;
43
- value: string;
1
+ export default WithDisplayFormat;
2
+ declare class WithDisplayFormat extends Component<any, any, any> {
3
+ static getDerivedStateFromProps(nextProps: any, previousState: any): {
4
+ prevDisplayPattern: any;
5
+ value: any;
44
6
  triggerType: null;
45
7
  triggerEvent: null;
46
8
  pastedLength: number;
47
9
  } | null;
48
- getUserAction: (unformattedValue: string) => EventType;
10
+ constructor(props: any);
11
+ state: {
12
+ value: any;
13
+ historyNavigator: HistoryNavigator;
14
+ prevDisplayPattern: any;
15
+ triggerType: null;
16
+ triggerEvent: null;
17
+ };
18
+ getUserAction: (unformattedValue: any) => any;
49
19
  resetEvent: () => void;
50
- detectUndoRedo: (event: KeyboardEvent<HTMLInputElement>) => "Undo" | "Redo" | null;
51
- handleOnKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
52
- handleOnPaste: (event: ClipboardEvent<HTMLInputElement>) => void;
20
+ detectUndoRedo: (event: any) => "Redo" | "Undo" | null;
21
+ handleOnKeyDown: (event: any) => void;
22
+ handleOnPaste: (event: any) => void;
53
23
  handleOnCut: () => void;
54
- isKeyAllowed: (action: EventType) => boolean;
55
- handleOnChange: (event: ChangeEvent<HTMLInputElement>) => void;
56
- handleOnBlur: (event: FocusEvent<HTMLInputElement>) => void;
57
- handleOnFocus: (event: FocusEvent<HTMLInputElement>) => void;
58
- handleDelete: (unformattedValue: string, action: EventType) => string;
59
- handleCursorPositioning: (action: EventType) => void;
60
- render(): JSX.Element;
24
+ isKeyAllowed: (action: any) => boolean;
25
+ handleOnChange: (event: any) => void;
26
+ handleOnBlur: (event: any) => void;
27
+ handleOnFocus: (event: any) => void;
28
+ handleDelete: (unformattedValue: any, action: any) => string;
29
+ handleCursorPositioning: (action: any) => void;
30
+ render(): any;
61
31
  }
62
- export default WithDisplayFormat;
32
+ declare namespace WithDisplayFormat {
33
+ namespace propTypes {
34
+ const autoComplete: any;
35
+ const className: any;
36
+ const disabled: any;
37
+ const id: any;
38
+ const maxLength: any;
39
+ const minLength: any;
40
+ const name: any;
41
+ const onFocus: any;
42
+ const onBlur: any;
43
+ const onChange: any;
44
+ const placeholder: any;
45
+ const readOnly: any;
46
+ const render: any;
47
+ const required: any;
48
+ const displayPattern: any;
49
+ const type: any;
50
+ const inputMode: any;
51
+ const value: any;
52
+ }
53
+ namespace defaultProps {
54
+ const autoComplete_1: string;
55
+ export { autoComplete_1 as autoComplete };
56
+ const className_1: null;
57
+ export { className_1 as className };
58
+ const disabled_1: boolean;
59
+ export { disabled_1 as disabled };
60
+ const id_1: null;
61
+ export { id_1 as id };
62
+ const maxLength_1: null;
63
+ export { maxLength_1 as maxLength };
64
+ const minLength_1: null;
65
+ export { minLength_1 as minLength };
66
+ const name_1: null;
67
+ export { name_1 as name };
68
+ const placeholder_1: null;
69
+ export { placeholder_1 as placeholder };
70
+ const readOnly_1: boolean;
71
+ export { readOnly_1 as readOnly };
72
+ const required_1: boolean;
73
+ export { required_1 as required };
74
+ const displayPattern_1: string;
75
+ export { displayPattern_1 as displayPattern };
76
+ const type_1: string;
77
+ export { type_1 as type };
78
+ const inputMode_1: null;
79
+ export { inputMode_1 as inputMode };
80
+ const value_1: string;
81
+ export { value_1 as value };
82
+ const onFocus_1: null;
83
+ export { onFocus_1 as onFocus };
84
+ const onBlur_1: null;
85
+ export { onBlur_1 as onBlur };
86
+ }
87
+ }
88
+ import { Component } from "react";
89
+ import { HistoryNavigator } from "../common";
63
90
  //# sourceMappingURL=WithDisplayFormat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/withDisplayFormat/WithDisplayFormat.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAS7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,KAAK,CAChC,UAAU,EACV;IACE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC;IACvD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1C,CACF,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,iBAAiB,CAAC,YAAY,GAAG;IAC1D,MAAM,EAAE,CAAC,WAAW,EAAE,UAAU,GAAG,aAAa,KAAK,GAAG,CAAC,OAAO,CAAC;CAClE,GAAG,cAAc,CAAC;AAEnB,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,OAAO,GACP,KAAK,GACL,MAAM,GACN,MAAM,GACN,WAAW,GACX,QAAQ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ourceRoot":"","sources":["../../../src/withDisplayFormat/WithDisplayFormat.js"],"names":[],"mappings":";AAaA;IAcE;;;;;;aAkBC;IA/BD,wBAWC;IAPC;;;;;;MAMC;IAuBH,8CA0BE;IAEF,uBAME;IAEF,uDAME;IAEF,sCAuBE;IAEF,oCAQE;IAEF,wBAEE;IAEF,uCAKE;IAEF,qCA0BE;IAEF,mCAKE;IAEF,oCAME;IAEF,6DAuBE;IAEF,+CAkBE;IAEF,cAsCC;CACF"}
@@ -1,3 +1,2 @@
1
- export { default } from './WithDisplayFormat';
2
- export type { Props as WithDisplayFormatProps, TextInputProps } from './WithDisplayFormat';
1
+ export { default } from "./WithDisplayFormat";
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/withDisplayFormat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,KAAK,IAAI,sBAAsB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/withDisplayFormat/index.js"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-c1fc9b6",
3
+ "version": "0.0.0-experimental-3d0a13d",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,7 +1,6 @@
1
1
  import getSymbolsInPatternWithPosition from '../getSymbolsInPatternWithPosition';
2
- import type { SymbolWithPosition } from '../getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition';
3
2
 
4
- const formatWithPattern = (value: string, pattern: string): string => {
3
+ const formatWithPattern = (value, pattern) => {
5
4
  if (!value || value === '') {
6
5
  return '';
7
6
  }
@@ -10,16 +9,13 @@ const formatWithPattern = (value: string, pattern: string): string => {
10
9
 
11
10
  const patternWithSymbolsPosition = getSymbolsInPatternWithPosition(pattern);
12
11
 
13
- let patternSymbol: SymbolWithPosition[] = [];
12
+ let patternSymbol = [];
14
13
  // valueArray.length increments during the cycle cause we are adding new elements.
15
14
  for (let index = 0; index < valueArray.length; index += 1) {
16
- patternSymbol = patternWithSymbolsPosition.filter((pattern) => pattern.index === index);
15
+ patternSymbol = patternWithSymbolsPosition.filter((symbol) => symbol.index === index);
17
16
  // Add pattern's symbol at n position
18
17
  if (patternSymbol.length === 1) {
19
- const last = patternSymbol.pop();
20
- if (last) {
21
- valueArray.splice(index, 0, last.symbol);
22
- }
18
+ valueArray.splice(index, 0, patternSymbol.pop().symbol);
23
19
  }
24
20
  }
25
21
 
@@ -1,14 +1,13 @@
1
- import type { EventType } from '../../../withDisplayFormat/WithDisplayFormat';
2
1
  import getCountOfSymbolsInSelection from '../getCountOfSymbolsInSelection';
3
2
  import { getDistanceToNextSymbol, getDistanceToPreviousSymbol } from '../getDistanceToSymbol';
4
3
 
5
4
  const getCursorPositionAfteractionstroke = (
6
- action: EventType,
7
- selectionStart: number,
8
- selectionEnd: number,
9
- pattern: string,
10
- pastedLength: number,
11
- ): number => {
5
+ action,
6
+ selectionStart,
7
+ selectionEnd,
8
+ pattern,
9
+ pastedLength,
10
+ ) => {
12
11
  let cursorPosition = selectionStart;
13
12
 
14
13
  switch (action) {
@@ -1,10 +1,5 @@
1
- export type SymbolWithPosition = {
2
- index: number;
3
- symbol: string;
4
- };
5
-
6
- const getSymbolsInPatternWithPosition = (pattern: string): SymbolWithPosition[] => {
7
- const patternWithSymbolsPosition: SymbolWithPosition[] = [];
1
+ const getSymbolsInPatternWithPosition = (pattern) => {
2
+ const patternWithSymbolsPosition = [];
8
3
  const patternArray = pattern.split('');
9
4
  patternArray.forEach((symbol, index) => {
10
5
  if (symbol !== '*') {