@ape.swap/bonds-sdk 3.0.84 → 3.0.85-test.1

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/dist/main.js CHANGED
@@ -79899,8 +79899,9 @@ const BonusContainer = ({ trueBondPrices, minTier, bonus, tooltipPosition = 'bot
79899
79899
  return (jsx$2("div", { className: `discount-column`, children: jsx$2(BonusComponent, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus, tooltipPosition: isMobile ? tooltipPosition : 'bottomLeft' }) }));
79900
79900
  };
79901
79901
 
79902
- const BondRow = ({ bondAddress, bondChain, payoutToken, tag, bondSoldOut, trueBondPrices, minTier, bonus, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, }) => {
79902
+ const BondRow = ({ bondAddress, bondChain, payoutToken, tag, bondSoldOut, trueBondPrices, minTier, bonus, vestingTermString, vestingCliffString, percentageAvailable, remainingTokensString, projectURL, twitterURL, auditURL, shortDescription, }) => {
79903
79903
  var _a, _b, _c;
79904
+ const SDKConfig = useSDKConfig();
79904
79905
  const locationPath = window.location.pathname.replace('/', '');
79905
79906
  // Modal
79906
79907
  const [openBuyModal] = useModal(jsx$2(ModalHandler, { bondAddress: bondAddress, bondChain: bondChain }), true, true, `buyBondModal-${bondAddress.toLowerCase()}-${bondChain}`);
@@ -79930,7 +79931,7 @@ const BondRow = ({ bondAddress, bondChain, payoutToken, tag, bondSoldOut, trueBo
79930
79931
  });
79931
79932
  };
79932
79933
  return (jsxs("div", { className: "bond-row" // Insert special campaign styles here
79933
- , onClick: handleOpenModal, sx: { borderRadius: 'normal' }, children: [jsx$2("div", { className: "gold-ribbon" }), jsx$2("div", { className: "token-info-container", sx: { width: ['70%', '70%', '65%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag }) }), jsxs("div", { className: "bond-info-columns", sx: { width: '55%' }, children: [jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble",
79934
+ , onClick: handleOpenModal, sx: { borderRadius: 'normal' }, children: [jsx$2("div", { className: "gold-ribbon" }), jsx$2("div", { className: "token-info-container", sx: { width: ['70%', '70%', '65%', '30%'] }, children: jsx$2(TokenInfoAndName, { tokenSymbol: payoutToken === null || payoutToken === void 0 ? void 0 : payoutToken.symbol, chain: bondChain, tag: tag }) }), SDKConfig.useCardsView && shortDescription && (jsx$2("div", { className: 'short-description', children: shortDescription })), jsxs("div", { className: "bond-info-columns", sx: { width: '55%' }, children: [jsx$2(BonusContainer, { trueBondPrices: trueBondPrices, minTier: minTier, bonus: bonus }), jsxs("div", { className: "terms-column", children: [vestingTermString, vestingCliffString && (jsx$2(TooltipBubble, { className: "tooltip-bubble",
79934
79935
  // body={<Flex>{getVestingTermsTooltipString(bond)}</Flex>}
79935
79936
  body: jsx$2(Flex, { children: vestingCliffString }), width: "180px", placement: "bottomRight", transformTip: "translate(13%, 0%)", children: jsx$2(Flex, { sx: { opacity: 0.6, ml: '6px' }, children: jsx$2(Svg, { icon: "questionCircle", width: "12px" }) }) }))] }), jsx$2("div", { className: "tokens-remaining-column", children: jsx$2(ProgressBarWrapper$1, { title: '', value: jsx$2(ProgressBar, { value: percentageAvailable }), style: {
79936
79937
  width: '127px',
@@ -80095,7 +80096,7 @@ const BondRowsWithTitle = ({ chain, bonds, showHotBonds }) => {
80095
80096
  var _a, _b, _c, _d, _e;
80096
80097
  const bondAddress = (_a = bond === null || bond === void 0 ? void 0 : bond.billAddress) !== null && _a !== void 0 ? _a : (_b = bond === null || bond === void 0 ? void 0 : bond.contractAddress) === null || _b === void 0 ? void 0 : _b[bond === null || bond === void 0 ? void 0 : bond.chainId];
80097
80098
  const remainingTokensString = getRemainingTokensString(bond);
80098
- return (jsx$2(BondRow, { bondAddress: (_c = bond.billAddress) !== null && _c !== void 0 ? _c : (_d = bond.contractAddress) === null || _d === void 0 ? void 0 : _d[bond.chainId], bondChain: bond.chainId, payoutToken: bond.earnToken, tag: (_e = bond.tags) === null || _e === void 0 ? void 0 : _e[0], bondSoldOut: isBondSoldOut(bond), trueBondPrices: bond === null || bond === void 0 ? void 0 : bond.trueBondPrices, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit }, `${bondAddress}-${bond.chainId}-${index}`));
80099
+ return (jsx$2(BondRow, { bondAddress: (_c = bond.billAddress) !== null && _c !== void 0 ? _c : (_d = bond.contractAddress) === null || _d === void 0 ? void 0 : _d[bond.chainId], bondChain: bond.chainId, payoutToken: bond.earnToken, tag: (_e = bond.tags) === null || _e === void 0 ? void 0 : _e[0], bondSoldOut: isBondSoldOut(bond), trueBondPrices: bond === null || bond === void 0 ? void 0 : bond.trueBondPrices, minTier: bond === null || bond === void 0 ? void 0 : bond.minTier, vestingTermString: getVestingTermsString(bond), vestingCliffString: getVestingTermsTooltipString(bond), percentageAvailable: remainingPercentage(bond), remainingTokensString: remainingTokensString, projectURL: bond.projectLink, twitterURL: bond.twitter, auditURL: bond.audit, shortDescription: bond.shortDescription }, `${bondAddress}-${bond.chainId}-${index}`));
80099
80100
  }), showHotBonds && (jsx$2(SwiperProvider, { children: jsx$2(HotBondCards, {}) }))] }, key))] }) }, key));
80100
80101
  };
80101
80102
 
@@ -7,6 +7,7 @@ export interface SDKProps {
7
7
  useTGEBonds?: boolean;
8
8
  urls?: Partial<Record<URLKeys, string>>;
9
9
  theme?: any;
10
+ useCardsView?: boolean;
10
11
  }
11
12
  export declare const useSDKConfig: (config?: SDKProps) => {
12
13
  urls: {
@@ -23,6 +24,7 @@ export declare const useSDKConfig: (config?: SDKProps) => {
23
24
  useTiers: boolean;
24
25
  useTGEBonds: boolean;
25
26
  theme?: any;
27
+ useCardsView?: boolean;
26
28
  };
27
29
  export type URLKeys = 'apiV2' | 'realTimeApi' | 'apeswapLists' | 'mainUrl';
28
30
  export declare const useURLByEnvironment: (key: URLKeys) => string;
@@ -17,6 +17,7 @@ interface BondRowProps {
17
17
  projectURL?: string;
18
18
  twitterURL?: string;
19
19
  auditURL?: string;
20
+ shortDescription?: string;
20
21
  }
21
22
  declare const BondRow: React.FC<BondRowProps>;
22
23
  export default BondRow;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ape Bond SDK",
4
4
  "author": "Ape Bond",
5
5
  "license": "MIT",
6
- "version": "3.0.84",
6
+ "version": "3.0.85-test.1",
7
7
  "module": "dist/main.js",
8
8
  "type": "module",
9
9
  "types": "dist/main.d.ts",