@polymarbot/nuxt-layer-shadcn-ui 0.8.4 → 0.8.5

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.
@@ -137,7 +137,9 @@ function formatCellValue (value: unknown, column: DataTableColumn): string {
137
137
  return formatDateTime((value as number) * 1000).split(' ').join('\n')
138
138
 
139
139
  case 'currency':
140
- return formatCurrency(value as number | string, column.currency ?? 'JPY')
140
+ return formatCurrency(value as number | string, column.currency ?? 'USD', {
141
+ currencyDisplay: column.currencyDisplay,
142
+ })
141
143
 
142
144
  case 'empty':
143
145
  return ''
@@ -24,6 +24,8 @@ export interface DataTableColumn {
24
24
  sortable?: boolean
25
25
  /** Currency code for 'currency' type (e.g., 'USD', 'JPY'). Default: 'USD' */
26
26
  currency?: string
27
+ /** How to display the currency for 'currency' type. Default: 'symbol' */
28
+ currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name'
27
29
  /** Custom class applied to the body cell (`<td>`) container */
28
30
  class?: string
29
31
  /** Custom class applied to the header cell (`<th>`) container */
@@ -2,7 +2,7 @@
2
2
  import type { InputCurrencyProps } from './types'
3
3
 
4
4
  const props = withDefaults(defineProps<InputCurrencyProps>(), {
5
- currency: 'JPY',
5
+ currency: 'USD',
6
6
  currencyDisplay: 'symbol',
7
7
  })
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymarbot/nuxt-layer-shadcn-ui",
3
- "version": "0.8.4",
3
+ "version": "0.8.5",
4
4
  "description": "Nuxt layer providing shadcn-vue based UI components",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@polymarbot/nuxt-layer-basic": "^0.1",
21
- "@polymarbot/uitls-shared": "^0.5",
21
+ "@polymarbot/uitls-shared": "^0.5.1",
22
22
  "@tanstack/vue-table": "^8.21.3",
23
23
  "@types/lodash-es": "^4.17.12",
24
24
  "@types/qrcode": "^1.5.6",
@@ -42,5 +42,5 @@
42
42
  "vue-i18n": "^11",
43
43
  "vue-router": "^4 || ^5"
44
44
  },
45
- "gitHead": "d561383c133bd4f981cc2c289fbc675bcdaec917"
45
+ "gitHead": "e84dd247e6f1c960c3ba63b3748c1f3d14f77fb1"
46
46
  }