@rango-dev/widget-embedded 0.1.11-next.16 → 0.1.11-next.19

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,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ export declare const LoaderContainer: any;
2
3
  interface PropTypes {
3
4
  requestId: string;
4
5
  loading: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../src/components/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":";AAMA,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,eAmBtD"}
1
+ {"version":3,"file":"SwapDetailsPlaceholder.d.ts","sourceRoot":"","sources":["../src/components/SwapDetailsPlaceholder.tsx"],"names":[],"mappings":";AAKA,eAAO,MAAM,eAAe,KAM1B,CAAC;AAEH,UAAU,SAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,eAmBtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"TokenInfo.d.ts","sourceRoot":"","sources":["../src/components/TokenInfo.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlD,OAAO,SAAS,MAAM,cAAc,CAAC;AAMrC,aAAK,SAAS,GAAG,CACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,GACD;IACE,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;CAClC,CACJ,GAAG;IAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CAAC;AA0F1D,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,eAuMzC"}
1
+ {"version":3,"file":"TokenInfo.d.ts","sourceRoot":"","sources":["../src/components/TokenInfo.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlD,OAAO,SAAS,MAAM,cAAc,CAAC;AAMrC,aAAK,SAAS,GAAG,CACb;IACE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,GACD;IACE,IAAI,EAAE,IAAI,CAAC;IACX,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,SAAS,GAAG,IAAI,CAAC;CAClC,CACJ,GAAG;IAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CAAC;AA0F1D,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,eAwMzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HistoryPage.d.ts","sourceRoot":"","sources":["../src/pages/HistoryPage.tsx"],"names":[],"mappings":";AAUA,wBAAgB,WAAW,gBAkB1B"}
1
+ {"version":3,"file":"HistoryPage.d.ts","sourceRoot":"","sources":["../src/pages/HistoryPage.tsx"],"names":[],"mappings":";AAUA,wBAAgB,WAAW,gBAqB1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../src/pages/Home.tsx"],"names":[],"mappings":";AAmEA,wBAAgB,IAAI,gBA4JnB"}
1
+ {"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../src/pages/Home.tsx"],"names":[],"mappings":";AAmEA,wBAAgB,IAAI,gBA6JnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"SwapDetailsPage.d.ts","sourceRoot":"","sources":["../src/pages/SwapDetailsPage.tsx"],"names":[],"mappings":";AAgCA,wBAAgB,eAAe,gBAqI9B"}
1
+ {"version":3,"file":"SwapDetailsPage.d.ts","sourceRoot":"","sources":["../src/pages/SwapDetailsPage.tsx"],"names":[],"mappings":";AAgCA,wBAAgB,eAAe,gBA8H9B"}
@@ -4,7 +4,6 @@ interface PropTypes {
4
4
  supportedWallets?: WalletType[];
5
5
  multiWallets: boolean;
6
6
  }
7
- export declare const LoaderContainer: any;
8
7
  export declare function WalletsPage({ supportedWallets, multiWallets }: PropTypes): JSX.Element;
9
8
  export {};
10
9
  //# sourceMappingURL=WalletsPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../src/pages/WalletsPage.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,UAAU,EAAuB,MAAM,2BAA2B,CAAC;AAW5E,UAAU,SAAS;IACjB,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;CACvB;AAWD,eAAO,MAAM,eAAe,KAM1B,CAAC;AAKH,wBAAgB,WAAW,CAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,EAAE,SAAS,eA2FxE"}
1
+ {"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../src/pages/WalletsPage.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,UAAU,EAAuB,MAAM,2BAA2B,CAAC;AAW5E,UAAU,SAAS;IACjB,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC;CACvB;AAsBD,wBAAgB,WAAW,CAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,EAAE,SAAS,eA2FxE"}
@@ -1544,6 +1544,7 @@ function TokenInfo(props) {
1544
1544
  color: "neutrals800"
1545
1545
  }, `$${numberToString(inputUsdValue)}`)),
1546
1546
  value: props.inputAmount || '',
1547
+ min: 0,
1547
1548
  onChange: props.type === 'From' ? event => {
1548
1549
  props.onAmountChange(event.target.value);
1549
1550
  } : undefined
@@ -1781,7 +1782,7 @@ function Home() {
1781
1782
  title: `${swap?.swapperId} Limit`
1782
1783
  }, React__default.createElement(React__default.Fragment, null, React__default.createElement(ui.Typography, {
1783
1784
  variant: "body3"
1784
- }, fromAmountRangeError, ", Yours: ", numberToString(swap?.fromAmount || null), "\u00A0", swap?.from.symbol), React__default.createElement(ui.Typography, {
1785
+ }, `${fromAmountRangeError}, Yours: ${numberToString(swap?.fromAmount || null)} ${swap?.from.symbol}`), React__default.createElement(ui.Typography, {
1785
1786
  variant: "body3"
1786
1787
  }, recommendation)))), React__default.createElement(Footer, null, React__default.createElement(ui.Button, {
1787
1788
  type: "primary",
@@ -2486,9 +2487,11 @@ function HistoryPage() {
2486
2487
  } = _ref;
2487
2488
  return swap;
2488
2489
  });
2490
+ const loading = !manager?.isLoaded();
2489
2491
  return React__default.createElement(ui.History, {
2490
2492
  list: pendingSwaps,
2491
2493
  groupBy: groupSwapsByDate,
2494
+ loading: loading,
2492
2495
  onSwapClick: requestId => {
2493
2496
  setSelectedSwap(requestId);
2494
2497
  navigate(navigationRoutes.swaps + `/${requestId}`, {
@@ -2799,6 +2802,13 @@ function getSwapDate(pendingSwap) {
2799
2802
  const PlaceholderContainer = /*#__PURE__*/ui.styled('div', {
2800
2803
  height: '450px'
2801
2804
  });
2805
+ const LoaderContainer$1 = /*#__PURE__*/ui.styled('div', {
2806
+ display: 'flex',
2807
+ justifyContent: 'center',
2808
+ width: '100%',
2809
+ paddingTop: '33%',
2810
+ flex: 1
2811
+ });
2802
2812
  function SwapDetailsPlaceholder(props) {
2803
2813
  const {
2804
2814
  requestId,
@@ -2809,7 +2819,7 @@ function SwapDetailsPlaceholder(props) {
2809
2819
  title: "Swap Details",
2810
2820
  textField: false,
2811
2821
  onBack: onBack
2812
- }, React__default.createElement(PlaceholderContainer, null, loading ? React__default.createElement(LoaderContainer, null, React__default.createElement(ui.Spinner, {
2822
+ }, React__default.createElement(PlaceholderContainer, null, loading ? React__default.createElement(LoaderContainer$1, null, React__default.createElement(ui.Spinner, {
2813
2823
  size: 24
2814
2824
  })) : React__default.createElement(ui.Alert, {
2815
2825
  type: "secondary",
@@ -2832,12 +2842,6 @@ function SwapDetailsPage() {
2832
2842
  const {
2833
2843
  manager
2834
2844
  } = queueManagerReact.useManager();
2835
- const [loading, setLoading] = React.useState(true);
2836
- React.useEffect(() => {
2837
- setTimeout(() => {
2838
- setLoading(false);
2839
- }, 5000);
2840
- }, []);
2841
2845
  const pendingSwaps = getPendingSwaps(manager);
2842
2846
  const selectedSwap = pendingSwaps.find(_ref => {
2843
2847
  let {
@@ -2850,6 +2854,7 @@ function SwapDetailsPage() {
2850
2854
  if (swap) queueManagerRangoPreset.cancelSwap(swap);
2851
2855
  };
2852
2856
  const swap = selectedSwap?.swap;
2857
+ const loading = !manager?.isLoaded();
2853
2858
  if (!swap) return React__default.createElement(SwapDetailsPlaceholder, {
2854
2859
  requestId: selectedSwapRequestId || '',
2855
2860
  loading: loading,