@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabbitio/ui-kit",
3
- "version": "1.0.0-beta.29",
3
+ "version": "1.0.0-beta.30",
4
4
  "description": "Rabbit.io react.js components kit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -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
  }