@reown/appkit-ui-react-native 0.0.0-canary-20240912195440 → 0.0.0-develop-20240925193922
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/lib/commonjs/assets/svg/ArrowBottomCircle.js +21 -0
- package/lib/commonjs/assets/svg/ArrowBottomCircle.js.map +1 -0
- package/lib/commonjs/assets/svg/Paperplane.js +21 -0
- package/lib/commonjs/assets/svg/Paperplane.js.map +1 -0
- package/lib/commonjs/components/wui-icon/index.js +4 -0
- package/lib/commonjs/components/wui-icon/index.js.map +1 -1
- package/lib/commonjs/composites/wui-account-button/index.js +13 -7
- package/lib/commonjs/composites/wui-account-button/index.js.map +1 -1
- package/lib/commonjs/composites/wui-account-button/styles.js +3 -3
- package/lib/commonjs/composites/wui-account-button/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-account-pill/index.js +73 -0
- package/lib/commonjs/composites/wui-account-pill/index.js.map +1 -0
- package/lib/commonjs/composites/wui-account-pill/styles.js +25 -0
- package/lib/commonjs/composites/wui-account-pill/styles.js.map +1 -0
- package/lib/commonjs/composites/wui-avatar/styles.js +2 -1
- package/lib/commonjs/composites/wui-avatar/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-balance/index.js +27 -0
- package/lib/commonjs/composites/wui-balance/index.js.map +1 -0
- package/lib/commonjs/composites/wui-banner/index.js +36 -0
- package/lib/commonjs/composites/wui-banner/index.js.map +1 -0
- package/lib/commonjs/composites/wui-banner/styles.js +21 -0
- package/lib/commonjs/composites/wui-banner/styles.js.map +1 -0
- package/lib/commonjs/composites/wui-button/index.js +3 -3
- package/lib/commonjs/composites/wui-button/index.js.map +1 -1
- package/lib/commonjs/composites/wui-button/styles.js +2 -2
- package/lib/commonjs/composites/wui-button/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-chip/index.js +5 -7
- package/lib/commonjs/composites/wui-chip/index.js.map +1 -1
- package/lib/commonjs/composites/wui-chip/styles.js +1 -1
- package/lib/commonjs/composites/wui-chip/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-compatible-network/index.js +58 -0
- package/lib/commonjs/composites/wui-compatible-network/index.js.map +1 -0
- package/lib/commonjs/composites/wui-list-item/index.js +10 -10
- package/lib/commonjs/composites/wui-list-item/index.js.map +1 -1
- package/lib/commonjs/composites/wui-list-item/styles.js +4 -3
- package/lib/commonjs/composites/wui-list-item/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-list-token/index.js +78 -0
- package/lib/commonjs/composites/wui-list-token/index.js.map +1 -0
- package/lib/commonjs/composites/wui-list-token/styles.js +30 -0
- package/lib/commonjs/composites/wui-list-token/styles.js.map +1 -0
- package/lib/commonjs/composites/wui-list-transaction/index.js +64 -0
- package/lib/commonjs/composites/wui-list-transaction/index.js.map +1 -0
- package/lib/commonjs/composites/wui-list-transaction/styles.js +16 -0
- package/lib/commonjs/composites/wui-list-transaction/styles.js.map +1 -0
- package/lib/commonjs/composites/wui-list-transaction/utils.js +88 -0
- package/lib/commonjs/composites/wui-list-transaction/utils.js.map +1 -0
- package/lib/commonjs/composites/wui-network-button/index.js +14 -10
- package/lib/commonjs/composites/wui-network-button/index.js.map +1 -1
- package/lib/commonjs/composites/wui-network-button/styles.js +3 -3
- package/lib/commonjs/composites/wui-network-button/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-network-image/index.js +48 -21
- package/lib/commonjs/composites/wui-network-image/index.js.map +1 -1
- package/lib/commonjs/composites/wui-network-image/styles.js +3 -1
- package/lib/commonjs/composites/wui-network-image/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-qr-code/index.js +26 -12
- package/lib/commonjs/composites/wui-qr-code/index.js.map +1 -1
- package/lib/commonjs/composites/wui-qr-code/styles.js +3 -0
- package/lib/commonjs/composites/wui-qr-code/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-snackbar/index.js +1 -0
- package/lib/commonjs/composites/wui-snackbar/index.js.map +1 -1
- package/lib/commonjs/composites/wui-snackbar/styles.js +2 -1
- package/lib/commonjs/composites/wui-snackbar/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-tabs/index.js +22 -8
- package/lib/commonjs/composites/wui-tabs/index.js.map +1 -1
- package/lib/commonjs/composites/wui-tabs/styles.js +1 -2
- package/lib/commonjs/composites/wui-tabs/styles.js.map +1 -1
- package/lib/commonjs/composites/wui-token-button/index.js +37 -0
- package/lib/commonjs/composites/wui-token-button/index.js.map +1 -0
- package/lib/commonjs/composites/wui-token-button/styles.js +24 -0
- package/lib/commonjs/composites/wui-token-button/styles.js.map +1 -0
- package/lib/commonjs/composites/wui-transaction-visual/index.js +73 -0
- package/lib/commonjs/composites/wui-transaction-visual/index.js.map +1 -0
- package/lib/commonjs/composites/wui-transaction-visual/styles.js +42 -0
- package/lib/commonjs/composites/wui-transaction-visual/styles.js.map +1 -0
- package/lib/commonjs/index.js +56 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/ThemeUtil.js +2 -1
- package/lib/commonjs/utils/ThemeUtil.js.map +1 -1
- package/lib/commonjs/utils/TransactionUtil.js +139 -0
- package/lib/commonjs/utils/TransactionUtil.js.map +1 -0
- package/lib/commonjs/utils/UiUtil.js +15 -0
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- package/lib/module/assets/svg/ArrowBottomCircle.js +13 -0
- package/lib/module/assets/svg/ArrowBottomCircle.js.map +1 -0
- package/lib/module/assets/svg/Paperplane.js +13 -0
- package/lib/module/assets/svg/Paperplane.js.map +1 -0
- package/lib/module/components/wui-icon/index.js +4 -0
- package/lib/module/components/wui-icon/index.js.map +1 -1
- package/lib/module/composites/wui-account-button/index.js +13 -7
- package/lib/module/composites/wui-account-button/index.js.map +1 -1
- package/lib/module/composites/wui-account-button/styles.js +4 -4
- package/lib/module/composites/wui-account-button/styles.js.map +1 -1
- package/lib/module/composites/wui-account-pill/index.js +66 -0
- package/lib/module/composites/wui-account-pill/index.js.map +1 -0
- package/lib/module/composites/wui-account-pill/styles.js +19 -0
- package/lib/module/composites/wui-account-pill/styles.js.map +1 -0
- package/lib/module/composites/wui-avatar/styles.js +2 -1
- package/lib/module/composites/wui-avatar/styles.js.map +1 -1
- package/lib/module/composites/wui-balance/index.js +21 -0
- package/lib/module/composites/wui-balance/index.js.map +1 -0
- package/lib/module/composites/wui-banner/index.js +29 -0
- package/lib/module/composites/wui-banner/index.js.map +1 -0
- package/lib/module/composites/wui-banner/styles.js +15 -0
- package/lib/module/composites/wui-banner/styles.js.map +1 -0
- package/lib/module/composites/wui-button/index.js +3 -3
- package/lib/module/composites/wui-button/index.js.map +1 -1
- package/lib/module/composites/wui-button/styles.js +2 -2
- package/lib/module/composites/wui-button/styles.js.map +1 -1
- package/lib/module/composites/wui-chip/index.js +6 -8
- package/lib/module/composites/wui-chip/index.js.map +1 -1
- package/lib/module/composites/wui-chip/styles.js +1 -1
- package/lib/module/composites/wui-chip/styles.js.map +1 -1
- package/lib/module/composites/wui-compatible-network/index.js +52 -0
- package/lib/module/composites/wui-compatible-network/index.js.map +1 -0
- package/lib/module/composites/wui-list-item/index.js +10 -10
- package/lib/module/composites/wui-list-item/index.js.map +1 -1
- package/lib/module/composites/wui-list-item/styles.js +4 -3
- package/lib/module/composites/wui-list-item/styles.js.map +1 -1
- package/lib/module/composites/wui-list-token/index.js +71 -0
- package/lib/module/composites/wui-list-token/index.js.map +1 -0
- package/lib/module/composites/wui-list-token/styles.js +24 -0
- package/lib/module/composites/wui-list-token/styles.js.map +1 -0
- package/lib/module/composites/wui-list-transaction/index.js +57 -0
- package/lib/module/composites/wui-list-transaction/index.js.map +1 -0
- package/lib/module/composites/wui-list-transaction/styles.js +10 -0
- package/lib/module/composites/wui-list-transaction/styles.js.map +1 -0
- package/lib/module/composites/wui-list-transaction/utils.js +79 -0
- package/lib/module/composites/wui-list-transaction/utils.js.map +1 -0
- package/lib/module/composites/wui-network-button/index.js +15 -11
- package/lib/module/composites/wui-network-button/index.js.map +1 -1
- package/lib/module/composites/wui-network-button/styles.js +4 -4
- package/lib/module/composites/wui-network-button/styles.js.map +1 -1
- package/lib/module/composites/wui-network-image/index.js +49 -22
- package/lib/module/composites/wui-network-image/index.js.map +1 -1
- package/lib/module/composites/wui-network-image/styles.js +2 -0
- package/lib/module/composites/wui-network-image/styles.js.map +1 -1
- package/lib/module/composites/wui-qr-code/index.js +26 -12
- package/lib/module/composites/wui-qr-code/index.js.map +1 -1
- package/lib/module/composites/wui-qr-code/styles.js +3 -0
- package/lib/module/composites/wui-qr-code/styles.js.map +1 -1
- package/lib/module/composites/wui-snackbar/index.js +1 -0
- package/lib/module/composites/wui-snackbar/index.js.map +1 -1
- package/lib/module/composites/wui-snackbar/styles.js +2 -1
- package/lib/module/composites/wui-snackbar/styles.js.map +1 -1
- package/lib/module/composites/wui-tabs/index.js +22 -8
- package/lib/module/composites/wui-tabs/index.js.map +1 -1
- package/lib/module/composites/wui-tabs/styles.js +1 -2
- package/lib/module/composites/wui-tabs/styles.js.map +1 -1
- package/lib/module/composites/wui-token-button/index.js +30 -0
- package/lib/module/composites/wui-token-button/index.js.map +1 -0
- package/lib/module/composites/wui-token-button/styles.js +18 -0
- package/lib/module/composites/wui-token-button/styles.js.map +1 -0
- package/lib/module/composites/wui-transaction-visual/index.js +66 -0
- package/lib/module/composites/wui-transaction-visual/index.js.map +1 -0
- package/lib/module/composites/wui-transaction-visual/styles.js +36 -0
- package/lib/module/composites/wui-transaction-visual/styles.js.map +1 -0
- package/lib/module/index.js +8 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/ThemeUtil.js +2 -1
- package/lib/module/utils/ThemeUtil.js.map +1 -1
- package/lib/module/utils/TransactionUtil.js +134 -0
- package/lib/module/utils/TransactionUtil.js.map +1 -0
- package/lib/module/utils/UiUtil.js +15 -0
- package/lib/module/utils/UiUtil.js.map +1 -1
- package/lib/typescript/assets/svg/ArrowBottomCircle.d.ts +4 -0
- package/lib/typescript/assets/svg/ArrowBottomCircle.d.ts.map +1 -0
- package/lib/typescript/assets/svg/Paperplane.d.ts +4 -0
- package/lib/typescript/assets/svg/Paperplane.d.ts.map +1 -0
- package/lib/typescript/components/wui-icon/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-account-button/index.d.ts +2 -2
- package/lib/typescript/composites/wui-account-button/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-account-pill/index.d.ts +11 -0
- package/lib/typescript/composites/wui-account-pill/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-account-pill/styles.d.ts +18 -0
- package/lib/typescript/composites/wui-account-pill/styles.d.ts.map +1 -0
- package/lib/typescript/composites/wui-avatar/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-balance/index.d.ts +6 -0
- package/lib/typescript/composites/wui-balance/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-banner/index.d.ts +7 -0
- package/lib/typescript/composites/wui-banner/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-banner/styles.d.ts +14 -0
- package/lib/typescript/composites/wui-banner/styles.d.ts.map +1 -0
- package/lib/typescript/composites/wui-button/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-chip/index.d.ts +2 -2
- package/lib/typescript/composites/wui-chip/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-compatible-network/index.d.ts +10 -0
- package/lib/typescript/composites/wui-compatible-network/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-list-item/index.d.ts +6 -4
- package/lib/typescript/composites/wui-list-item/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-item/styles.d.ts +1 -0
- package/lib/typescript/composites/wui-list-item/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-list-token/index.d.ts +11 -0
- package/lib/typescript/composites/wui-list-token/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-list-token/styles.d.ts +23 -0
- package/lib/typescript/composites/wui-list-token/styles.d.ts.map +1 -0
- package/lib/typescript/composites/wui-list-transaction/index.d.ts +15 -0
- package/lib/typescript/composites/wui-list-transaction/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-list-transaction/styles.d.ts +10 -0
- package/lib/typescript/composites/wui-list-transaction/styles.d.ts.map +1 -0
- package/lib/typescript/composites/wui-list-transaction/utils.d.ts +6 -0
- package/lib/typescript/composites/wui-list-transaction/utils.d.ts.map +1 -0
- package/lib/typescript/composites/wui-network-button/index.d.ts +6 -4
- package/lib/typescript/composites/wui-network-button/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-network-button/styles.d.ts +1 -1
- package/lib/typescript/composites/wui-network-image/index.d.ts +6 -2
- package/lib/typescript/composites/wui-network-image/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-network-image/styles.d.ts +2 -0
- package/lib/typescript/composites/wui-network-image/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-qr-code/index.d.ts +4 -1
- package/lib/typescript/composites/wui-qr-code/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-qr-code/styles.d.ts +3 -0
- package/lib/typescript/composites/wui-qr-code/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-snackbar/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-snackbar/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-tabs/index.d.ts +4 -2
- package/lib/typescript/composites/wui-tabs/index.d.ts.map +1 -1
- package/lib/typescript/composites/wui-tabs/styles.d.ts +1 -2
- package/lib/typescript/composites/wui-tabs/styles.d.ts.map +1 -1
- package/lib/typescript/composites/wui-token-button/index.d.ts +7 -0
- package/lib/typescript/composites/wui-token-button/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-token-button/styles.d.ts +17 -0
- package/lib/typescript/composites/wui-token-button/styles.d.ts.map +1 -0
- package/lib/typescript/composites/wui-transaction-visual/index.d.ts +8 -0
- package/lib/typescript/composites/wui-transaction-visual/index.d.ts.map +1 -0
- package/lib/typescript/composites/wui-transaction-visual/styles.d.ts +35 -0
- package/lib/typescript/composites/wui-transaction-visual/styles.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +8 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/ThemeUtil.d.ts +1 -0
- package/lib/typescript/utils/ThemeUtil.d.ts.map +1 -1
- package/lib/typescript/utils/TransactionUtil.d.ts +13 -0
- package/lib/typescript/utils/TransactionUtil.d.ts.map +1 -0
- package/lib/typescript/utils/TypesUtil.d.ts +4 -3
- package/lib/typescript/utils/TypesUtil.d.ts.map +1 -1
- package/lib/typescript/utils/UiUtil.d.ts +1 -0
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/package.json +6 -6
- package/readme.md +9 -0
- package/src/assets/svg/ArrowBottomCircle.tsx +12 -0
- package/src/assets/svg/Paperplane.tsx +12 -0
- package/src/components/wui-icon/index.tsx +4 -0
- package/src/composites/wui-account-button/index.tsx +17 -8
- package/src/composites/wui-account-button/styles.ts +4 -4
- package/src/composites/wui-account-pill/index.tsx +72 -0
- package/src/composites/wui-account-pill/styles.ts +19 -0
- package/src/composites/wui-avatar/styles.ts +2 -1
- package/src/composites/wui-balance/index.tsx +25 -0
- package/src/composites/wui-banner/index.tsx +28 -0
- package/src/composites/wui-banner/styles.ts +15 -0
- package/src/composites/wui-button/index.tsx +12 -10
- package/src/composites/wui-button/styles.ts +2 -2
- package/src/composites/wui-chip/index.tsx +7 -9
- package/src/composites/wui-chip/styles.ts +1 -1
- package/src/composites/wui-compatible-network/index.tsx +64 -0
- package/src/composites/wui-list-item/index.tsx +15 -14
- package/src/composites/wui-list-item/styles.ts +4 -3
- package/src/composites/wui-list-token/index.tsx +83 -0
- package/src/composites/wui-list-token/styles.ts +24 -0
- package/src/composites/wui-list-transaction/index.tsx +65 -0
- package/src/composites/wui-list-transaction/styles.ts +10 -0
- package/src/composites/wui-list-transaction/utils.ts +83 -0
- package/src/composites/wui-network-button/index.tsx +22 -15
- package/src/composites/wui-network-button/styles.ts +4 -4
- package/src/composites/wui-network-image/index.tsx +57 -21
- package/src/composites/wui-network-image/styles.ts +6 -0
- package/src/composites/wui-qr-code/index.tsx +29 -14
- package/src/composites/wui-qr-code/styles.ts +3 -0
- package/src/composites/wui-snackbar/index.tsx +1 -0
- package/src/composites/wui-snackbar/styles.ts +2 -1
- package/src/composites/wui-tabs/index.tsx +33 -9
- package/src/composites/wui-tabs/styles.ts +1 -2
- package/src/composites/wui-token-button/index.tsx +29 -0
- package/src/composites/wui-token-button/styles.ts +18 -0
- package/src/composites/wui-transaction-visual/index.tsx +78 -0
- package/src/composites/wui-transaction-visual/styles.ts +36 -0
- package/src/index.ts +11 -0
- package/src/utils/ThemeUtil.ts +2 -1
- package/src/utils/TransactionUtil.ts +173 -0
- package/src/utils/TypesUtil.ts +36 -2
- package/src/utils/UiUtil.ts +18 -0
package/src/utils/TypesUtil.ts
CHANGED
|
@@ -91,14 +91,27 @@ export type ColorType =
|
|
|
91
91
|
| 'error-100'
|
|
92
92
|
| 'fg-100'
|
|
93
93
|
| 'fg-150'
|
|
94
|
+
| 'fg-175'
|
|
94
95
|
| 'fg-200'
|
|
95
96
|
| 'fg-250'
|
|
96
97
|
| 'fg-275'
|
|
97
98
|
| 'fg-300'
|
|
99
|
+
| 'accent-glass-020'
|
|
100
|
+
| 'accent-glass-015'
|
|
101
|
+
| 'accent-glass-010'
|
|
102
|
+
| 'accent-glass-005'
|
|
98
103
|
| 'gray-glass-020'
|
|
104
|
+
| 'gray-glass-010'
|
|
105
|
+
| 'gray-glass-005'
|
|
99
106
|
| 'inverse-000'
|
|
100
107
|
| 'inverse-100'
|
|
101
|
-
| 'success-100'
|
|
108
|
+
| 'success-100'
|
|
109
|
+
| 'teal-100'
|
|
110
|
+
| 'magenta-100'
|
|
111
|
+
| 'indigo-100'
|
|
112
|
+
| 'orange-100'
|
|
113
|
+
| 'purple-100'
|
|
114
|
+
| 'yellow-100';
|
|
102
115
|
|
|
103
116
|
export type SizeType = 'xl' | 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
|
|
104
117
|
|
|
@@ -112,6 +125,7 @@ export type IconType =
|
|
|
112
125
|
| 'allWallets'
|
|
113
126
|
| 'apple'
|
|
114
127
|
| 'arrowBottom'
|
|
128
|
+
| 'arrowBottomCircle'
|
|
115
129
|
| 'arrowLeft'
|
|
116
130
|
| 'arrowRight'
|
|
117
131
|
| 'arrowTop'
|
|
@@ -146,6 +160,7 @@ export type IconType =
|
|
|
146
160
|
| 'networkPlaceholder'
|
|
147
161
|
| 'nftPlaceholder'
|
|
148
162
|
| 'off'
|
|
163
|
+
| 'paperplane'
|
|
149
164
|
| 'qrCode'
|
|
150
165
|
| 'refresh'
|
|
151
166
|
| 'search'
|
|
@@ -193,7 +208,7 @@ export type CardSelectType = 'wallet' | 'network';
|
|
|
193
208
|
|
|
194
209
|
export type TabOptionType = {
|
|
195
210
|
icon: IconType;
|
|
196
|
-
label
|
|
211
|
+
label?: string;
|
|
197
212
|
};
|
|
198
213
|
|
|
199
214
|
export type SpacingType =
|
|
@@ -238,3 +253,22 @@ export type TruncateOptions = {
|
|
|
238
253
|
charsEnd: number;
|
|
239
254
|
truncate: TruncateType;
|
|
240
255
|
};
|
|
256
|
+
|
|
257
|
+
export type TransactionType =
|
|
258
|
+
| 'approve'
|
|
259
|
+
| 'bought'
|
|
260
|
+
| 'borrow'
|
|
261
|
+
| 'burn'
|
|
262
|
+
| 'cancel'
|
|
263
|
+
| 'claim'
|
|
264
|
+
| 'deploy'
|
|
265
|
+
| 'deposit'
|
|
266
|
+
| 'execute'
|
|
267
|
+
| 'mint'
|
|
268
|
+
| 'receive'
|
|
269
|
+
| 'repay'
|
|
270
|
+
| 'send'
|
|
271
|
+
| 'stake'
|
|
272
|
+
| 'trade'
|
|
273
|
+
| 'unstake'
|
|
274
|
+
| 'withdraw';
|
package/src/utils/UiUtil.ts
CHANGED
|
@@ -68,5 +68,23 @@ export const UiUtil = {
|
|
|
68
68
|
|
|
69
69
|
getWalletName(name: string, short = true) {
|
|
70
70
|
return short ? name.split(' ')[0] : name;
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
formatNumberToLocalString(value: string | number | undefined, decimals = 2) {
|
|
74
|
+
if (value === undefined) {
|
|
75
|
+
return '0.00';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (typeof value === 'number') {
|
|
79
|
+
return value.toLocaleString('en-US', {
|
|
80
|
+
maximumFractionDigits: decimals,
|
|
81
|
+
minimumFractionDigits: decimals
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return parseFloat(value).toLocaleString('en-US', {
|
|
86
|
+
maximumFractionDigits: decimals,
|
|
87
|
+
minimumFractionDigits: decimals
|
|
88
|
+
});
|
|
71
89
|
}
|
|
72
90
|
};
|