@nestledjs/data-browser 1.0.12 → 1.0.13
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.
|
@@ -125,12 +125,10 @@ function extractInitialValues(model, item) {
|
|
|
125
125
|
initialValues[relationFieldName] = processRelationFieldValue(field, item);
|
|
126
126
|
} else {
|
|
127
127
|
const fieldTypeLower = field.type.toLowerCase();
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
if (field.kind === "enum" && field.isList && Array.isArray(value)) {
|
|
128
|
+
if (field.kind === "enum" && field.isList) {
|
|
129
|
+
if (!Array.isArray(value)) {
|
|
130
|
+
value = [];
|
|
131
|
+
}
|
|
134
132
|
const arrayValue = value;
|
|
135
133
|
value = value.join(",");
|
|
136
134
|
console.log(`[DataBrowser] Enum array field detected - "${field.name}":`, {
|
|
@@ -138,6 +136,10 @@ function extractInitialValues(model, item) {
|
|
|
138
136
|
arrayValue,
|
|
139
137
|
convertedValue: value
|
|
140
138
|
});
|
|
139
|
+
} else if (fieldTypeLower === "datetime" || fieldTypeLower === "date") {
|
|
140
|
+
value = processDateFieldValue(field, value);
|
|
141
|
+
} else {
|
|
142
|
+
value = sanitizeFieldValue(value, field);
|
|
141
143
|
}
|
|
142
144
|
initialValues[field.name] = value;
|
|
143
145
|
if (value !== null && typeof value === "string" && fieldTypeLower !== "string" && fieldTypeLower !== "datetime" && fieldTypeLower !== "date") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestledjs/data-browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Universal admin data browser for Nestled framework projects with full CRUD operations",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@apollo/client": "^4.0.0",
|
|
39
39
|
"@heroicons/react": "^2.0.0",
|
|
40
40
|
"@nestledjs/forms": "^0.6.3",
|
|
41
|
-
"@nestledjs/shared-components": "^1.0.
|
|
41
|
+
"@nestledjs/shared-components": "^1.0.13",
|
|
42
42
|
"react": "^19.0.0",
|
|
43
43
|
"react-router": "^7.0.0"
|
|
44
44
|
},
|