@lukso/transaction-view-core 0.5.0-dev.a98e9bc → 0.5.0-dev.f500300
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/.turbo/turbo-build.log +15 -15
- package/dist/index.cjs +85 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +85 -54
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +5 -1
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.d.cts +4 -4
- package/dist/shared/index.d.ts +4 -4
- package/dist/shared/index.js +5 -1
- package/dist/shared/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/asset-card.ts +61 -58
- package/src/shared/image-list.ts +0 -1
- package/src/shared/value-view.ts +5 -19
- package/src/utils.test.ts +47 -0
- package/src/utils.ts +82 -0
package/dist/shared/index.cjs
CHANGED
|
@@ -2037,6 +2037,8 @@ var import_transaction_view_headless6 = require("@lukso/transaction-view-headles
|
|
|
2037
2037
|
var import_lit12 = require("lit");
|
|
2038
2038
|
var import_decorators11 = require("lit/decorators.js");
|
|
2039
2039
|
var import_when = require("lit/directives/when.js");
|
|
2040
|
+
|
|
2041
|
+
// src/utils.ts
|
|
2040
2042
|
function formatUnits(value, decimals = 18) {
|
|
2041
2043
|
const divisor = 10n ** BigInt(decimals);
|
|
2042
2044
|
const quotient = value / divisor;
|
|
@@ -2048,6 +2050,8 @@ function formatUnits(value, decimals = 18) {
|
|
|
2048
2050
|
const trimmed = remainderStr.replace(/0+$/, "");
|
|
2049
2051
|
return `${quotient}.${trimmed}`;
|
|
2050
2052
|
}
|
|
2053
|
+
|
|
2054
|
+
// src/shared/value-view.ts
|
|
2051
2055
|
var ValueView = class extends CoreLitElement {
|
|
2052
2056
|
constructor() {
|
|
2053
2057
|
super(...arguments);
|
|
@@ -2280,7 +2284,7 @@ var ValueView = class extends CoreLitElement {
|
|
|
2280
2284
|
`;
|
|
2281
2285
|
if (effectiveType === "currency") {
|
|
2282
2286
|
const { numeric, symbol } = this.getCurrencyParts();
|
|
2283
|
-
if (this.label
|
|
2287
|
+
if (this.label) {
|
|
2284
2288
|
headerText = this.label;
|
|
2285
2289
|
contentTemplate = import_lit12.html`
|
|
2286
2290
|
<span class="inline-block overflow-hidden text-ellipsis whitespace-nowrap min-w-0 ${this.getNumericClass()}">${numeric}</span>
|