Skip to content

Commit 4abf7d6

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/main' into next
# Conflicts: # docs/.vitepress/theme/components/Demo.vue # docs/api.md # src/api.ts # src/currencyInput.ts
2 parents 73240f1 + a3b6890 commit 4abf7d6

File tree

7 files changed

+74
-19
lines changed

7 files changed

+74
-19
lines changed

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: pnpm install
2323
- name: Build docs
24-
run: pnpm docs
24+
run: pnpm run docs
2525
- name: Deploy docs
2626
uses: peaceiris/actions-gh-pages@v3
2727
with:

.github/workflows/release.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node-version: [ 20 ]
12+
steps:
13+
- uses: GoogleCloudPlatform/release-please-action@v3
14+
id: release
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
release-type: node
18+
include-v-in-tag: false
19+
- uses: actions/checkout@v4
20+
if: ${{ steps.release.outputs.release_created }}
21+
- uses: pnpm/action-setup@v3
22+
with:
23+
version: 9.1.3
24+
if: ${{ steps.release.outputs.release_created }}
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'pnpm'
29+
if: ${{ steps.release.outputs.release_created }}
30+
- run: pnpm install
31+
if: ${{ steps.release.outputs.release_created }}
32+
- run: pnpm build
33+
if: ${{ steps.release.outputs.release_created }}
34+
- run: pnpm publish
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
if: ${{ steps.release.outputs.release_created }}
38+
- run: pnpm run docs
39+
if: ${{ steps.release.outputs.release_created }}
40+
- uses: peaceiris/actions-gh-pages@v3
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
publish_dir: ./docs/.vitepress/dist
44+
if: ${{ steps.release.outputs.release_created }}

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [3.2.1](https://github.com/dm4t2/vue-currency-input/compare/3.2.0...3.2.1) (2025-01-19)
4+
5+
This version contains no changes and only fixes the corrupt v3.2.0 release.
6+
7+
## [3.2.0](https://github.com/dm4t2/vue-currency-input/compare/3.1.0...3.2.0) (2025-01-18)
8+
9+
10+
### Features
11+
12+
* Allow value scaling by 10,000 ([443321d](https://github.com/dm4t2/vue-currency-input/commit/443321d50bc8e73ed41fa3c553614012fb951745))
13+
314
## [3.1.0](https://github.com/dm4t2/vue-currency-input/compare/3.0.5...3.1.0) (2024-02-07)
415

516

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
[![Codecov](https://codecov.io/gh/dm4t2/vue-currency-input/branch/master/graph/badge.svg)](https://codecov.io/gh/dm4t2/vue-currency-input)
1+
[![codecov](https://codecov.io/gh/dm4t2/vue-currency-input/graph/badge.svg?token=CAgHbikCov)](https://codecov.io/gh/dm4t2/vue-currency-input)
22
[![npm Version](https://badgen.net/npm/v/vue-currency-input?color=green)](https://www.npmjs.com/package/vue-currency-input)
33
[![npm Downloads](https://badgen.net/npm/dw/vue-currency-input?color=green)](https://www.npmjs.com/package/vue-currency-input)
44
[![Bundlephobia](https://badgen.net/bundlephobia/minzip/vue-currency-input?color=green)](https://bundlephobia.com/result?p=vue-currency-input)
5-
[![License](https://badgen.net/github/license/dm4t2/vue-currency-input?color=green)](https://github.com/dm4t2/vue-currency-input/blob/master/LICENSE)
5+
[![License](https://badgen.net/github/license/dm4t2/vue-currency-input?color=green)](https://github.com/dm4t2/vue-currency-input/blob/main/LICENSE)
66

77
# Vue Currency Input
88

docs/config.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ Whether to hide negligible decimal digits on focus. Default is `true`.
5050
Applies a scaling to the exported value. Possible values are:
5151

5252
- `"precision"` for scaling float values automatically to integers depending on the current `precision`, for example 1.23 -> 123
53-
- `"thounsands"` for using a scaling factor of 1,000
53+
- `"thousands"` for using a scaling factor of 1,000
54+
- `"tenThousands"` for using a scaling factor of 10,000
5455
- `"millions""` for using scaling factor of 1,000,000
5556
- `"billions"` for using a scaling factor of 1,000,000,000
5657

docs/guide.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ Vue Currency Input allows an easy input of currency formatted numbers based on t
66

77
Built on top of the [Vue Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html), it provides the composable function `useCurrencyInput` for decorating input components with currency format capabilities.
88

9-
::: warning Compatibility
9+
::: warning Vue Compatibility
1010
Vue Currency Input 3.x requires either **Vue 2.7** or **Vue 3**.
1111
For Vue 2.6 or earlier, please use [Vue Currency Input 2.x](https://vue-currency-input-v2.netlify.app/).
12+
13+
**Nuxt 2 + Vue 2.7** is not supported. See [this issue](https://github.com/dm4t2/vue-currency-input/issues/398) for more information.
1214
:::
1315

1416
## Installation
17+
1518
```bash
1619
npm install vue-currency-input
1720
```
@@ -82,14 +85,18 @@ export default {
8285
[![Edit Vue Currency Input: Vue 3 Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vue-currency-input-vue-3-example-5l51f?fontsize=14&hidenavigation=1&theme=dark)
8386

8487
## Auto emit
88+
8589
By default, the number value is automatically emitted on each input.
8690
This can be disabled by setting the `autoEmit` argument of `useCurrencyInput` to `false`, allowing you to implement a custom emit behavior for features such as debouncing.
8791

88-
The following example component `<DebouncedCurrencyInput>` demonstrates this by using [VueUse's `watchDebounced`](https://vueuse.org/shared/watchDebounced):
92+
The following example component `<DebouncedCurrencyInput>` demonstrates this by using [VueUse's `watchDebounced`](https://vueuse.org/shared/watchDebounced):
8993

9094
```vue
9195
<template>
92-
<input ref="inputRef" type="text" />
96+
<input
97+
ref="inputRef"
98+
type="text"
99+
/>
93100
</template>
94101
95102
<script>
@@ -102,7 +109,7 @@ export default {
102109
modelValue: Number, // Vue 2: value
103110
options: Object
104111
},
105-
setup (props, { emit }) {
112+
setup(props, { emit }) {
106113
const { inputRef, numberValue } = useCurrencyInput(props.options, false)
107114
108115
watchDebounced(numberValue, (value) => emit('update:modelValue', value), { debounce: 1000 }) // Vue 2: emit('input', value)
@@ -115,26 +122,18 @@ export default {
115122

116123
[![Edit Using Vue Currency Input with debouncing](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/using-vue-currency-input-with-debouncing-vzwnss?fontsize=14&hidenavigation=1&theme=dark)
117124

118-
119125
## Lazy value binding
120126

121127
Sometimes you might want to update the bound value only when the input loses its focus. In this case, use `v-model.lazy` for Vue 3:
122128

123129
```vue
124-
<CurrencyInput
125-
v-model.lazy="value"
126-
:options="{ currency: 'EUR' }"
127-
/>
130+
<CurrencyInput v-model.lazy="value" :options="{ currency: 'EUR' }" />
128131
```
129132

130133
For Vue 2 listen to the `change` event instead of using `v-model`, since the `lazy` modifier is not supported when using `v-model` on custom components:
131134

132135
```vue
133-
<CurrencyInput
134-
:value="value"
135-
:options="{ currency: 'EUR' }"
136-
@change="value = $event"
137-
/>
136+
<CurrencyInput :value="value" :options="{ currency: 'EUR' }" @change="value = $event" />
138137
```
139138

140139
## External props changes

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-currency-input",
33
"description": "Easy input of currency formatted numbers for Vue.js.",
4-
"version": "3.1.0",
4+
"version": "3.2.1",
55
"license": "MIT",
66
"module": "./dist/index.mjs",
77
"main": "./dist/index.cjs",

0 commit comments

Comments
 (0)