@transferwise/components 0.0.0-experimental-9562bba → 0.0.0-experimental-5aa8131

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.
@@ -1 +1 @@
1
- {"version":3,"file":"injectIntl.js","sources":["../../src/common/injectIntl.tsx"],"sourcesContent":["import { useIntl } from 'react-intl';\n\nexport interface WrappedComponentProps {\n intl: ReturnType<typeof useIntl>;\n}\n\ntype WithIntlProps<P> = Omit<P, keyof WrappedComponentProps>;\n\nexport function injectIntl<T>(Component: React.ComponentType<T>): React.FC<WithIntlProps<T>> {\n return function WrappedComponent(props: T) {\n return <Component {...props} intl={useIntl()} />;\n } as React.FC<WithIntlProps<T>>;\n}\n"],"names":["injectIntl","Component","WrappedComponent","props","_jsx","intl","useIntl"],"mappings":";;;;;AAQM,SAAUA,UAAUA,CAAIC,SAAiC,EAAA;AAC7D,EAAA,OAAO,SAASC,gBAAgBA,CAACC,KAAQ,EAAA;IACvC,oBAAOC,cAAA,CAACH,SAAS,EAAA;AAAA,MAAA,GAAKE,KAAK;MAAEE,IAAI,EAAEC,iBAAO;AAAG,MAAG;EAClD,CAA+B;AACjC;;;;"}
1
+ {"version":3,"file":"injectIntl.js","sources":["../../src/common/injectIntl.tsx"],"sourcesContent":["import { useIntl } from 'react-intl';\n\nexport interface WrappedComponentProps {\n intl: ReturnType<typeof useIntl>;\n}\n\ntype WithIntlProps<P> = Omit<P, keyof WrappedComponentProps>;\n\n/**\n * A higher-order component that injects the `intl` prop into the wrapped component.\n * @deprecated\n * Use the `useIntl` hook instead of the `injectIntl` HOC for functional components. The `injectIntl` HOC is intended for legacy class components\n * @param Component The component to wrap.\n * @returns A new component with the `intl` prop injected.\n */\nexport function injectIntl<T>(Component: React.ComponentType<T>): React.FC<WithIntlProps<T>> {\n return function WrappedComponent(props: T) {\n return <Component {...props} intl={useIntl()} />;\n } as React.FC<WithIntlProps<T>>;\n}\n"],"names":["injectIntl","Component","WrappedComponent","props","_jsx","intl","useIntl"],"mappings":";;;;;AAeM,SAAUA,UAAUA,CAAIC,SAAiC,EAAA;AAC7D,EAAA,OAAO,SAASC,gBAAgBA,CAACC,KAAQ,EAAA;IACvC,oBAAOC,cAAA,CAACH,SAAS,EAAA;AAAA,MAAA,GAAKE,KAAK;MAAEE,IAAI,EAAEC,iBAAO;AAAG,MAAG;EAClD,CAA+B;AACjC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"injectIntl.mjs","sources":["../../src/common/injectIntl.tsx"],"sourcesContent":["import { useIntl } from 'react-intl';\n\nexport interface WrappedComponentProps {\n intl: ReturnType<typeof useIntl>;\n}\n\ntype WithIntlProps<P> = Omit<P, keyof WrappedComponentProps>;\n\nexport function injectIntl<T>(Component: React.ComponentType<T>): React.FC<WithIntlProps<T>> {\n return function WrappedComponent(props: T) {\n return <Component {...props} intl={useIntl()} />;\n } as React.FC<WithIntlProps<T>>;\n}\n"],"names":["injectIntl","Component","WrappedComponent","props","_jsx","intl","useIntl"],"mappings":";;;AAQM,SAAUA,UAAUA,CAAIC,SAAiC,EAAA;AAC7D,EAAA,OAAO,SAASC,gBAAgBA,CAACC,KAAQ,EAAA;IACvC,oBAAOC,GAAA,CAACH,SAAS,EAAA;AAAA,MAAA,GAAKE,KAAK;MAAEE,IAAI,EAAEC,OAAO;AAAG,MAAG;EAClD,CAA+B;AACjC;;;;"}
1
+ {"version":3,"file":"injectIntl.mjs","sources":["../../src/common/injectIntl.tsx"],"sourcesContent":["import { useIntl } from 'react-intl';\n\nexport interface WrappedComponentProps {\n intl: ReturnType<typeof useIntl>;\n}\n\ntype WithIntlProps<P> = Omit<P, keyof WrappedComponentProps>;\n\n/**\n * A higher-order component that injects the `intl` prop into the wrapped component.\n * @deprecated\n * Use the `useIntl` hook instead of the `injectIntl` HOC for functional components. The `injectIntl` HOC is intended for legacy class components\n * @param Component The component to wrap.\n * @returns A new component with the `intl` prop injected.\n */\nexport function injectIntl<T>(Component: React.ComponentType<T>): React.FC<WithIntlProps<T>> {\n return function WrappedComponent(props: T) {\n return <Component {...props} intl={useIntl()} />;\n } as React.FC<WithIntlProps<T>>;\n}\n"],"names":["injectIntl","Component","WrappedComponent","props","_jsx","intl","useIntl"],"mappings":";;;AAeM,SAAUA,UAAUA,CAAIC,SAAiC,EAAA;AAC7D,EAAA,OAAO,SAASC,gBAAgBA,CAACC,KAAQ,EAAA;IACvC,oBAAOC,GAAA,CAACH,SAAS,EAAA;AAAA,MAAA,GAAKE,KAAK;MAAEE,IAAI,EAAEC,OAAO;AAAG,MAAG;EAClD,CAA+B;AACjC;;;;"}
@@ -3,6 +3,13 @@ export interface WrappedComponentProps {
3
3
  intl: ReturnType<typeof useIntl>;
4
4
  }
5
5
  type WithIntlProps<P> = Omit<P, keyof WrappedComponentProps>;
6
+ /**
7
+ * A higher-order component that injects the `intl` prop into the wrapped component.
8
+ * @deprecated
9
+ * Use the `useIntl` hook instead of the `injectIntl` HOC for functional components. The `injectIntl` HOC is intended for legacy class components
10
+ * @param Component The component to wrap.
11
+ * @returns A new component with the `intl` prop injected.
12
+ */
6
13
  export declare function injectIntl<T>(Component: React.ComponentType<T>): React.FC<WithIntlProps<T>>;
7
14
  export {};
8
15
  //# sourceMappingURL=injectIntl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"injectIntl.d.ts","sourceRoot":"","sources":["../../../src/common/injectIntl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC;AAED,KAAK,aAAa,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAC;AAE7D,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAI3F"}
1
+ {"version":3,"file":"injectIntl.d.ts","sourceRoot":"","sources":["../../../src/common/injectIntl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;CAClC;AAED,KAAK,aAAa,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,qBAAqB,CAAC,CAAC;AAE7D;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAI3F"}
@@ -55,6 +55,7 @@ declare const _default: import("react").FC<{
55
55
  selectProps?: Partial<SelectInputProps<CurrencyOptionItem>> | undefined;
56
56
  amount: number | null;
57
57
  searchPlaceholder?: string | undefined;
58
+ decimals?: number | undefined;
58
59
  currencies: readonly CurrencyItem[];
59
60
  selectedCurrency: CurrencyOptionItem;
60
61
  onCurrencyChange?: ((value: CurrencyOptionItem) => void) | undefined;
@@ -66,7 +67,6 @@ declare const _default: import("react").FC<{
66
67
  }) => void) | undefined;
67
68
  customActionLabel?: import("react").ReactNode;
68
69
  onCustomAction?: (() => void) | undefined;
69
- decimals?: number | undefined;
70
70
  }>;
71
71
  export default _default;
72
72
  //# sourceMappingURL=MoneyInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAGL,SAAS,EACT,UAAU,EACV,SAAS,EAEV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAuB,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,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CAAC,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,eAAe,GAC9D,OAAO,CAAC,wBAAwB,CAAC,CAAC;;SA5B7B,MAAM;wBACS,MAAM;YAMnB,SAAS,GAAG,UAAU,GAAG,SAAS;kBAF3B,MAAM;iBAYP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;kBACrB,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YAZnD,MAAM,GAAG,IAAI;wBAID,MAAM;eAcf,MAAM;gBAtBL,SAAS,YAAY,EAAE;sBACjB,kBAAkB;wBACjB,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI;sBAIrC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;sBAM9B,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI;;sBAEzE,MAAM,IAAI;;AAib7B,wBAA2F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-9562bba",
3
+ "version": "0.0.0-experimental-5aa8131",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -92,8 +92,8 @@
92
92
  "storybook-addon-tag-badges": "^3.1.0",
93
93
  "storybook-addon-test-codegen": "^3.0.1",
94
94
  "@transferwise/less-config": "3.1.2",
95
- "@wise/wds-configs": "0.0.0",
96
- "@wise/components-theming": "1.10.3"
95
+ "@wise/components-theming": "1.10.3",
96
+ "@wise/wds-configs": "0.0.0"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "@transferwise/icons": "^3 || ^4",
@@ -6,6 +6,13 @@ export interface WrappedComponentProps {
6
6
 
7
7
  type WithIntlProps<P> = Omit<P, keyof WrappedComponentProps>;
8
8
 
9
+ /**
10
+ * A higher-order component that injects the `intl` prop into the wrapped component.
11
+ * @deprecated
12
+ * Use the `useIntl` hook instead of the `injectIntl` HOC for functional components. The `injectIntl` HOC is intended for legacy class components
13
+ * @param Component The component to wrap.
14
+ * @returns A new component with the `intl` prop injected.
15
+ */
9
16
  export function injectIntl<T>(Component: React.ComponentType<T>): React.FC<WithIntlProps<T>> {
10
17
  return function WrappedComponent(props: T) {
11
18
  return <Component {...props} intl={useIntl()} />;