Skip to content

Commit bc393be

Browse files
authored
Merge pull request #98 from objectstack-ai/copilot/automated-column-splitting
2 parents 6979934 + 0a470eb commit bc393be

File tree

11 files changed

+505
-3
lines changed

11 files changed

+505
-3
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: CurrencyConfig
3+
description: CurrencyConfig Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **precision** | `integer` | optional | Decimal precision (default: 2) |
11+
| **currencyMode** | `Enum<'dynamic' \| 'fixed'>` | optional | Currency mode: dynamic (user selectable) or fixed (single currency) |
12+
| **defaultCurrency** | `string` | optional | Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR) |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: CurrencyValue
3+
description: CurrencyValue Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **value** | `number` || Monetary amount |
11+
| **currency** | `string` || Currency code (ISO 4217) |

content/docs/references/data/field/Field.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ description: Field Schema Reference
4949
| **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" |
5050
| **displayValue** | `boolean` | optional | Display human-readable value below barcode/QR code |
5151
| **allowScanning** | `boolean` | optional | Enable camera scanning for barcode/QR code input |
52+
| **currencyConfig** | `object` | optional | Configuration for currency field type |
5253
| **hidden** | `boolean` | optional | Hidden from default UI |
5354
| **readonly** | `boolean` | optional | Read-only in UI |
5455
| **encryption** | `boolean` | optional | Encrypt at rest |
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$ref": "#/definitions/CurrencyConfig",
3+
"definitions": {
4+
"CurrencyConfig": {
5+
"type": "object",
6+
"properties": {
7+
"precision": {
8+
"type": "integer",
9+
"minimum": 0,
10+
"maximum": 10,
11+
"default": 2,
12+
"description": "Decimal precision (default: 2)"
13+
},
14+
"currencyMode": {
15+
"type": "string",
16+
"enum": [
17+
"dynamic",
18+
"fixed"
19+
],
20+
"default": "dynamic",
21+
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
22+
},
23+
"defaultCurrency": {
24+
"type": "string",
25+
"minLength": 3,
26+
"maxLength": 3,
27+
"default": "CNY",
28+
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
29+
}
30+
},
31+
"additionalProperties": false
32+
}
33+
},
34+
"$schema": "http://json-schema.org/draft-07/schema#"
35+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$ref": "#/definitions/CurrencyValue",
3+
"definitions": {
4+
"CurrencyValue": {
5+
"type": "object",
6+
"properties": {
7+
"value": {
8+
"type": "number",
9+
"description": "Monetary amount"
10+
},
11+
"currency": {
12+
"type": "string",
13+
"minLength": 3,
14+
"maxLength": 3,
15+
"description": "Currency code (ISO 4217)"
16+
}
17+
},
18+
"required": [
19+
"value",
20+
"currency"
21+
],
22+
"additionalProperties": false
23+
}
24+
},
25+
"$schema": "http://json-schema.org/draft-07/schema#"
26+
}

packages/spec/json-schema/data/Field.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,36 @@
303303
"type": "boolean",
304304
"description": "Enable camera scanning for barcode/QR code input"
305305
},
306+
"currencyConfig": {
307+
"type": "object",
308+
"properties": {
309+
"precision": {
310+
"type": "integer",
311+
"minimum": 0,
312+
"maximum": 10,
313+
"default": 2,
314+
"description": "Decimal precision (default: 2)"
315+
},
316+
"currencyMode": {
317+
"type": "string",
318+
"enum": [
319+
"dynamic",
320+
"fixed"
321+
],
322+
"default": "dynamic",
323+
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
324+
},
325+
"defaultCurrency": {
326+
"type": "string",
327+
"minLength": 3,
328+
"maxLength": 3,
329+
"default": "CNY",
330+
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
331+
}
332+
},
333+
"additionalProperties": false,
334+
"description": "Configuration for currency field type"
335+
},
306336
"hidden": {
307337
"type": "boolean",
308338
"default": false,

packages/spec/json-schema/data/Object.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,36 @@
343343
"type": "boolean",
344344
"description": "Enable camera scanning for barcode/QR code input"
345345
},
346+
"currencyConfig": {
347+
"type": "object",
348+
"properties": {
349+
"precision": {
350+
"type": "integer",
351+
"minimum": 0,
352+
"maximum": 10,
353+
"default": 2,
354+
"description": "Decimal precision (default: 2)"
355+
},
356+
"currencyMode": {
357+
"type": "string",
358+
"enum": [
359+
"dynamic",
360+
"fixed"
361+
],
362+
"default": "dynamic",
363+
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
364+
},
365+
"defaultCurrency": {
366+
"type": "string",
367+
"minLength": 3,
368+
"maxLength": 3,
369+
"default": "CNY",
370+
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
371+
}
372+
},
373+
"additionalProperties": false,
374+
"description": "Configuration for currency field type"
375+
},
346376
"hidden": {
347377
"type": "boolean",
348378
"default": false,

packages/spec/json-schema/ui/FieldWidgetProps.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,36 @@
323323
"type": "boolean",
324324
"description": "Enable camera scanning for barcode/QR code input"
325325
},
326+
"currencyConfig": {
327+
"type": "object",
328+
"properties": {
329+
"precision": {
330+
"type": "integer",
331+
"minimum": 0,
332+
"maximum": 10,
333+
"default": 2,
334+
"description": "Decimal precision (default: 2)"
335+
},
336+
"currencyMode": {
337+
"type": "string",
338+
"enum": [
339+
"dynamic",
340+
"fixed"
341+
],
342+
"default": "dynamic",
343+
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
344+
},
345+
"defaultCurrency": {
346+
"type": "string",
347+
"minLength": 3,
348+
"maxLength": 3,
349+
"default": "CNY",
350+
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
351+
}
352+
},
353+
"additionalProperties": false,
354+
"description": "Configuration for currency field type"
355+
},
326356
"hidden": {
327357
"type": "boolean",
328358
"default": false,

packages/spec/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)