@nubitio/hydra 0.11.3 → 0.11.4
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.
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +4 -0
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -699,6 +699,10 @@ function applyCrudHints(field, hints, fieldName) {
|
|
|
699
699
|
field.width = hints.width;
|
|
700
700
|
applied.push(`width=${hints.width}`);
|
|
701
701
|
}
|
|
702
|
+
if (hints.precision !== void 0) {
|
|
703
|
+
field.precision = hints.precision;
|
|
704
|
+
applied.push(`precision=${hints.precision}`);
|
|
705
|
+
}
|
|
702
706
|
if (hints.presentation !== void 0) {
|
|
703
707
|
field.presentation = hints.presentation;
|
|
704
708
|
applied.push(`presentation=${hints.presentation}`);
|
package/dist/index.d.cts
CHANGED
|
@@ -81,6 +81,12 @@ interface CrudHints {
|
|
|
81
81
|
order?: number;
|
|
82
82
|
/** Column width in pixels or as a CSS string. */
|
|
83
83
|
width?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Decimal places used when serializing a numeric/currency field. Set to 0 for
|
|
86
|
+
* a column that stores minor units as an integer, which would otherwise be
|
|
87
|
+
* sent as "1234.00" and rejected by an integer column.
|
|
88
|
+
*/
|
|
89
|
+
precision?: number;
|
|
84
90
|
/** Render the enum value using a richer presentation such as a badge. */
|
|
85
91
|
presentation?: 'badge';
|
|
86
92
|
/** Visual tone per enum value when `presentation` is `badge`. */
|
package/dist/index.d.mts
CHANGED
|
@@ -81,6 +81,12 @@ interface CrudHints {
|
|
|
81
81
|
order?: number;
|
|
82
82
|
/** Column width in pixels or as a CSS string. */
|
|
83
83
|
width?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Decimal places used when serializing a numeric/currency field. Set to 0 for
|
|
86
|
+
* a column that stores minor units as an integer, which would otherwise be
|
|
87
|
+
* sent as "1234.00" and rejected by an integer column.
|
|
88
|
+
*/
|
|
89
|
+
precision?: number;
|
|
84
90
|
/** Render the enum value using a richer presentation such as a badge. */
|
|
85
91
|
presentation?: 'badge';
|
|
86
92
|
/** Visual tone per enum value when `presentation` is `badge`. */
|
package/dist/index.mjs
CHANGED
|
@@ -675,6 +675,10 @@ function applyCrudHints(field, hints, fieldName) {
|
|
|
675
675
|
field.width = hints.width;
|
|
676
676
|
applied.push(`width=${hints.width}`);
|
|
677
677
|
}
|
|
678
|
+
if (hints.precision !== void 0) {
|
|
679
|
+
field.precision = hints.precision;
|
|
680
|
+
applied.push(`precision=${hints.precision}`);
|
|
681
|
+
}
|
|
678
682
|
if (hints.presentation !== void 0) {
|
|
679
683
|
field.presentation = hints.presentation;
|
|
680
684
|
applied.push(`presentation=${hints.presentation}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nubitio/hydra",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hydra / OpenAPI adapter for @nubitio/crud — automatic schema discovery and data source from API Platform docs.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react": "^18.2.0 || ^19.0.0",
|
|
52
52
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
53
53
|
"react-i18next": "^14.0.0",
|
|
54
|
-
"@nubitio/core": "^0.11.
|
|
55
|
-
"@nubitio/crud": "^0.11.
|
|
54
|
+
"@nubitio/core": "^0.11.4",
|
|
55
|
+
"@nubitio/crud": "^0.11.4"
|
|
56
56
|
}
|
|
57
57
|
}
|