@rabbitio/ui-kit 1.0.0-beta.29 → 1.0.0-beta.30
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/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +13 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +13 -2
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +13 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/common/amountUtils.js +12 -1
package/package.json
CHANGED
|
@@ -104,6 +104,7 @@ export class AmountUtils {
|
|
|
104
104
|
limitTotalLength: true, // Limits the total amount length to maxTotalLength
|
|
105
105
|
extraSmallLength: false, // Limits the total amount length to extraSmallMaxTotalLength
|
|
106
106
|
periods: true, // Whether we add periods ("..") as suffix for trimmed numbers
|
|
107
|
+
numberPartsSeparator: true, // Whether we add separators e.g. for 1000000 -> 1,000,000
|
|
107
108
|
};
|
|
108
109
|
|
|
109
110
|
static cryptoWoTicker(amount, digits) {
|
|
@@ -132,6 +133,16 @@ export class AmountUtils {
|
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
static cryptoFullPureNumber(amount, digits) {
|
|
137
|
+
return this.crypto(amount, null, digits, {
|
|
138
|
+
ticker: false,
|
|
139
|
+
collapsible: false,
|
|
140
|
+
trim: false,
|
|
141
|
+
limitTotalLength: false,
|
|
142
|
+
numberPartsSeparator: false,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
135
146
|
/**
|
|
136
147
|
* Universal method for rendering of crypto amounts, taking into account the rules of
|
|
137
148
|
* the passed ticker. Requires the number of digits after period to be less of equal to
|
|
@@ -207,7 +218,7 @@ export class AmountUtils {
|
|
|
207
218
|
params
|
|
208
219
|
);
|
|
209
220
|
wereMillionsCollapsed = true;
|
|
210
|
-
} else {
|
|
221
|
+
} else if (params.numberPartsSeparator) {
|
|
211
222
|
// Add separators to integer part of the amount
|
|
212
223
|
processedAmount = BigNumber(processedAmount).toFormat();
|
|
213
224
|
}
|