@zoralabs/nft-components
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -157,3 +157,3 @@ "use strict"; | ||
*/ | ||
HISTORY_ASK_CANCELLED: "cancelled ask", | ||
HISTORY_ASK_CANCELLED: "cancelled ask for", | ||
/** | ||
@@ -160,0 +160,0 @@ * Ask has been filled |
@@ -26,2 +26,3 @@ "use strict"; | ||
minute: "2-digit", | ||
year: "numeric", | ||
hour12: true, | ||
@@ -50,3 +51,3 @@ }); | ||
(_e = data.markets) === null || _e === void 0 ? void 0 : _e.forEach((market) => { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
if (market.type === types_1.MARKET_TYPES.AUCTION) { | ||
@@ -94,5 +95,5 @@ const typedAuction = market; | ||
activityDescription: getString("HISTORY_ASK_CANCELLED"), | ||
createdAt: market.canceledAt.timestamp, | ||
createdAt: ((_b = market.canceledAt) === null || _b === void 0 ? void 0 : _b.timestamp) || market.createdAt.timestamp, | ||
actor: market.createdBy, | ||
transactionHash: ((_b = market.canceledAt) === null || _b === void 0 ? void 0 : _b.transactionHash) || null, | ||
transactionHash: ((_c = market.canceledAt) === null || _c === void 0 ? void 0 : _c.transactionHash) || null, | ||
pricing: market.amount, | ||
@@ -122,3 +123,2 @@ }); | ||
}); | ||
// data.events?.filter((evt) => ) | ||
return bidEvents; | ||
@@ -131,4 +131,4 @@ }, [data === null || data === void 0 ? void 0 : data.markets]); | ||
.sort((bidA, bidB) => new Date(bidA.createdAt).getTime() < new Date(bidB.createdAt).getTime() | ||
? -1 | ||
: 1) | ||
? 1 | ||
: -1) | ||
.map((bidItem) => (react_1.createElement("li", Object.assign({}, getStyles("fullPageHistoryItem"), { key: `${bidItem.actor}-${bidItem.createdAt}` }), | ||
@@ -135,0 +135,0 @@ jsx_runtime_1.jsxs("div", Object.assign({}, getStyles("fullPageHistoryItemDescription"), { children: [jsx_runtime_1.jsxs("div", Object.assign({}, getStyles("fullPageHistoryItemDescriptionCopy"), { children: [jsx_runtime_1.jsx(AddressView_1.AddressView, { address: bidItem.actor }, void 0), "\u00A0", jsx_runtime_1.jsxs("span", Object.assign({}, getStyles("pricingAmount"), { children: [bidItem.activityDescription, " ", bidItem.pricing && jsx_runtime_1.jsx(PricingString_1.PricingString, { pricing: bidItem.pricing }, void 0)] }), void 0)] }), void 0), |
@@ -28,2 +28,3 @@ "use strict"; | ||
return (_a = data === null || data === void 0 ? void 0 : data.markets) === null || _a === void 0 ? void 0 : _a.find((market) => market.type === types_1.MARKET_TYPES.FIXED_PRICE && | ||
market.side === types_1.FIXED_SIDE_TYPES.ASK && | ||
market.status === types_1.MARKET_INFO_STATUSES.ACTIVE); | ||
@@ -30,0 +31,0 @@ }, [data === null || data === void 0 ? void 0 : data.markets]); |
@@ -14,8 +14,12 @@ "use strict"; | ||
}); | ||
const { format: formatUSD } = new Intl.NumberFormat(typeof window === "undefined" ? "en-US" : navigator.language, { | ||
style: "decimal", | ||
maximumFractionDigits: 2, | ||
}); | ||
if (!pricing) { | ||
return jsx_runtime_1.jsx(react_1.Fragment, {}, void 0); | ||
} | ||
return (jsx_runtime_1.jsxs(react_1.Fragment, { children: [pricing.amount.value && (jsx_runtime_1.jsxs("span", Object.assign({}, getStyles("pricingAmount"), { children: [format(pricing.amount.value), " ", pricing.symbol] }), void 0)), | ||
showUSD && ((_a = pricing.usd) === null || _a === void 0 ? void 0 : _a.value) && (jsx_runtime_1.jsxs("span", Object.assign({}, getStyles("textSubdued"), { children: [" ", "$", format((_b = pricing.usd) === null || _b === void 0 ? void 0 : _b.value)] }), void 0))] }, void 0)); | ||
return (jsx_runtime_1.jsxs(react_1.Fragment, { children: [!!pricing.amount.value && (jsx_runtime_1.jsxs("span", Object.assign({}, getStyles("pricingAmount"), { children: [format(pricing.amount.value), " ", pricing.symbol] }), void 0)), | ||
showUSD && !!((_a = pricing.usd) === null || _a === void 0 ? void 0 : _a.value) && (jsx_runtime_1.jsxs("span", Object.assign({}, getStyles("textSubdued"), { children: [" ", "$", formatUSD((_b = pricing.usd) === null || _b === void 0 ? void 0 : _b.value)] }), void 0))] }, void 0)); | ||
}; | ||
exports.PricingString = PricingString; |
{ | ||
"name": "@zoralabs/nft-components", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "NFT Media Rendering Components", | ||
@@ -21,11 +21,9 @@ "typings": "dist/index.d.ts", | ||
"@emotion/css": "^11.1.3", | ||
"@zoralabs/nft-hooks": "^1.1.0", | ||
"@zoralabs/nft-hooks": "1.1.7", | ||
"merge-anything": "^4.0.1", | ||
"merge-deep": "^3.0.3", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"swr": "^0.5.6", | ||
"tslib": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"@babel/core": "^7.14.2", | ||
@@ -32,0 +30,0 @@ "@storybook/addon-a11y": "^6.4.18", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
312133
6
6367
19
+ Added@zoralabs/nft-hooks@1.1.7(transitive)
+ Added@zoralabs/zdk@2.1.1(transitive)
- Removedmerge-deep@^3.0.3
- Removedreact@^17.0.2
- Removedreact-dom@^17.0.2
- Removedswr@^0.5.6
- Removed@zoralabs/nft-hooks@1.2.1(transitive)
- Removed@zoralabs/zdk@2.1.6(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedclone-deep@0.2.4(transitive)
- Removeddequal@2.0.2(transitive)
- Removedfor-in@0.1.81.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-extendable@0.1.1(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedisobject@3.0.1(transitive)
- Removedkind-of@2.0.13.2.2(transitive)
- Removedlazy-cache@0.2.71.0.4(transitive)
- Removedmerge-deep@3.0.3(transitive)
- Removedmixin-object@2.0.1(transitive)
- Removedshallow-clone@0.1.2(transitive)
- Removedswr@0.5.7(transitive)
Updated@zoralabs/nft-hooks@1.1.7