Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions content/docs/references/data/field/CurrencyConfig.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: CurrencyConfig
description: CurrencyConfig Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **precision** | `integer` | optional | Decimal precision (default: 2) |
| **currencyMode** | `Enum<'dynamic' \| 'fixed'>` | optional | Currency mode: dynamic (user selectable) or fixed (single currency) |
| **defaultCurrency** | `string` | optional | Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR) |
11 changes: 11 additions & 0 deletions content/docs/references/data/field/CurrencyValue.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: CurrencyValue
description: CurrencyValue Schema Reference
---

## Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **value** | `number` | ✅ | Monetary amount |
| **currency** | `string` | ✅ | Currency code (ISO 4217) |
1 change: 1 addition & 0 deletions content/docs/references/data/field/Field.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ description: Field Schema Reference
| **qrErrorCorrection** | `Enum<'L' \| 'M' \| 'Q' \| 'H'>` | optional | QR code error correction level (L=7%, M=15%, Q=25%, H=30%). Only applicable when barcodeFormat is "qr" |
| **displayValue** | `boolean` | optional | Display human-readable value below barcode/QR code |
| **allowScanning** | `boolean` | optional | Enable camera scanning for barcode/QR code input |
| **currencyConfig** | `object` | optional | Configuration for currency field type |
| **hidden** | `boolean` | optional | Hidden from default UI |
| **readonly** | `boolean` | optional | Read-only in UI |
| **encryption** | `boolean` | optional | Encrypt at rest |
Expand Down
35 changes: 35 additions & 0 deletions packages/spec/json-schema/data/CurrencyConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$ref": "#/definitions/CurrencyConfig",
"definitions": {
"CurrencyConfig": {
"type": "object",
"properties": {
"precision": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 2,
"description": "Decimal precision (default: 2)"
},
"currencyMode": {
"type": "string",
"enum": [
"dynamic",
"fixed"
],
"default": "dynamic",
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
},
"defaultCurrency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "CNY",
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
}
},
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
26 changes: 26 additions & 0 deletions packages/spec/json-schema/data/CurrencyValue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$ref": "#/definitions/CurrencyValue",
"definitions": {
"CurrencyValue": {
"type": "object",
"properties": {
"value": {
"type": "number",
"description": "Monetary amount"
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"description": "Currency code (ISO 4217)"
}
},
"required": [
"value",
"currency"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
30 changes: 30 additions & 0 deletions packages/spec/json-schema/data/Field.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,36 @@
"type": "boolean",
"description": "Enable camera scanning for barcode/QR code input"
},
"currencyConfig": {
"type": "object",
"properties": {
"precision": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 2,
"description": "Decimal precision (default: 2)"
},
"currencyMode": {
"type": "string",
"enum": [
"dynamic",
"fixed"
],
"default": "dynamic",
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
},
"defaultCurrency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "CNY",
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
}
},
"additionalProperties": false,
"description": "Configuration for currency field type"
},
"hidden": {
"type": "boolean",
"default": false,
Expand Down
30 changes: 30 additions & 0 deletions packages/spec/json-schema/data/Object.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,36 @@
"type": "boolean",
"description": "Enable camera scanning for barcode/QR code input"
},
"currencyConfig": {
"type": "object",
"properties": {
"precision": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 2,
"description": "Decimal precision (default: 2)"
},
"currencyMode": {
"type": "string",
"enum": [
"dynamic",
"fixed"
],
"default": "dynamic",
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
},
"defaultCurrency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "CNY",
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
}
},
"additionalProperties": false,
"description": "Configuration for currency field type"
},
"hidden": {
"type": "boolean",
"default": false,
Expand Down
30 changes: 30 additions & 0 deletions packages/spec/json-schema/ui/FieldWidgetProps.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,36 @@
"type": "boolean",
"description": "Enable camera scanning for barcode/QR code input"
},
"currencyConfig": {
"type": "object",
"properties": {
"precision": {
"type": "integer",
"minimum": 0,
"maximum": 10,
"default": 2,
"description": "Decimal precision (default: 2)"
},
"currencyMode": {
"type": "string",
"enum": [
"dynamic",
"fixed"
],
"default": "dynamic",
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
},
"defaultCurrency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "CNY",
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
}
},
"additionalProperties": false,
"description": "Configuration for currency field type"
},
"hidden": {
"type": "boolean",
"default": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/spec/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading