Skip to content

Commit

Permalink
Merge pull request #446 from houdiniproject/dependabot/npm_and_yarn/d…
Browse files Browse the repository at this point in the history
…evelopment_minor-7fac5f2d8d

Bump the development_minor group with 2 updates
  • Loading branch information
wwahammy authored Jun 30, 2024
2 parents 430093f + d233794 commit 5ceb5fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/money_format_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ export class MoneyFormatHelper {
return {
value,
maskedValue: this.numberFormat.format(value),
valueInCents: Math.round(value * Math.pow(10, this.numberFormat.resolvedOptions().minimumFractionDigits))
valueInCents: Math.round(value * Math.pow(10, this.numberFormat.resolvedOptions().minimumFractionDigits || 0))
}
}
else {
const valueInCents = Math.round(value)
value = valueInCents * Math.pow(10, -1 * this.numberFormat.resolvedOptions().minimumFractionDigits)
value = valueInCents * Math.pow(10, -1 * (this.numberFormat.resolvedOptions().minimumFractionDigits || 0))

return {
value,
Expand All @@ -129,15 +129,15 @@ export class MoneyFormatHelper {
if (hasDecimalSeparator) {

//we need to add leading zeros if we don't have them!
const numberOfZerosToAdd = this.numberFormat.resolvedOptions().minimumFractionDigits - items.length
if (items.length <= this.numberFormat.resolvedOptions().minimumFractionDigits) {
const numberOfZerosToAdd = (this.numberFormat.resolvedOptions().minimumFractionDigits || 0) - items.length
if (items.length <= (this.numberFormat.resolvedOptions().minimumFractionDigits || 0)) {
for (let i = 0; i < numberOfZerosToAdd; i++) {
items.unshift('0')
}

}
//add in decimal separator
items.splice(items.length - this.numberFormat.resolvedOptions().minimumFractionDigits, 0, '.')
items.splice(items.length - (this.numberFormat.resolvedOptions().minimumFractionDigits || 0), 0, '.')

}

Expand Down
2 changes: 1 addition & 1 deletion src/useI18nCurrencyInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function useI18nCurrencyInput(props: UseI18nCurrencyInputProps) :
selectionEnd = selectionEnd + adjustment;
selectionStart = selectionStart + adjustment;

const precision = formatHelper.numberFormat.resolvedOptions().minimumFractionDigits
const precision = formatHelper.numberFormat.resolvedOptions().minimumFractionDigits || 0;

let baselength = suffix.length
+ prefix.length
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3097,8 +3097,8 @@ __metadata:
linkType: hard

"@testing-library/dom@npm:^10":
version: 10.1.0
resolution: "@testing-library/dom@npm:10.1.0"
version: 10.2.0
resolution: "@testing-library/dom@npm:10.2.0"
dependencies:
"@babel/code-frame": ^7.10.4
"@babel/runtime": ^7.12.5
Expand All @@ -3108,7 +3108,7 @@ __metadata:
dom-accessibility-api: ^0.5.9
lz-string: ^1.5.0
pretty-format: ^27.0.2
checksum: 275f53e57914e13361aa01a9fe155a3919ec911b61abddc44a7cd077e49d24672cdd43c76d840f7cdacea2f42c4aae92321066e6ddaff039f413745797d1b390
checksum: ea2ce77f5777a6d00803bba938528d785c80aed8ca3f3d2c703b4ef6a697ef65b57773bb1f4363d893dde4e7e88f40ffb963f2a0fa1d9af7f49bee62034b24a7
languageName: node
linkType: hard

Expand Down Expand Up @@ -10815,22 +10815,22 @@ __metadata:
linkType: hard

"typescript@npm:^5.2":
version: 5.4.5
resolution: "typescript@npm:5.4.5"
version: 5.5.2
resolution: "typescript@npm:5.5.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 53c879c6fa1e3bcb194b274d4501ba1985894b2c2692fa079db03c5a5a7140587a1e04e1ba03184605d35f439b40192d9e138eb3279ca8eee313c081c8bcd9b0
checksum: 9c5a7982dadcb2d38d129c575dd38645ae11588ae0d4a12852fb04482bbc5a1660b2371e48fd5b33b6b605cc57cefe777670054546856945a05e77bd22c8c2cd
languageName: node
linkType: hard

"typescript@patch:typescript@^5.2#~builtin<compat/typescript>":
version: 5.4.5
resolution: "typescript@patch:typescript@npm%3A5.4.5#~builtin<compat/typescript>::version=5.4.5&hash=29ae49"
version: 5.5.2
resolution: "typescript@patch:typescript@npm%3A5.5.2#~builtin<compat/typescript>::version=5.5.2&hash=29ae49"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 2373c693f3b328f3b2387c3efafe6d257b057a142f9a79291854b14ff4d5367d3d730810aee981726b677ae0fd8329b23309da3b6aaab8263dbdccf1da07a3ba
checksum: 9d89bac0de650e15d6846485f238d1e65f1013f2c260d9e53e86a1da6ecf8109d9fad9402575c5c36a6592dc5d4370db090e12971c8630ae84453654baabb6b4
languageName: node
linkType: hard

Expand Down

0 comments on commit 5ceb5fd

Please sign in to comment.