@nestledjs/data-browser 1.0.5 → 1.0.7
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.
|
@@ -22,7 +22,15 @@ function formatFieldName(fieldName) {
|
|
|
22
22
|
return fieldName.replaceAll(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (str) => str.toUpperCase());
|
|
23
23
|
}
|
|
24
24
|
function normalizeModelNameForDocument(modelName) {
|
|
25
|
-
return modelName
|
|
25
|
+
return modelName.replace(/([A-Z]{2,})([A-Z][a-z])/g, (_, acronym, rest) => {
|
|
26
|
+
if (acronym.length >= 2) {
|
|
27
|
+
return acronym.charAt(0).toUpperCase() + acronym.slice(1).toLowerCase() + rest;
|
|
28
|
+
}
|
|
29
|
+
return acronym + rest;
|
|
30
|
+
}).replace(
|
|
31
|
+
/[A-Z]{3,}$/g,
|
|
32
|
+
(match) => match.charAt(0).toUpperCase() + match.slice(1).toLowerCase()
|
|
33
|
+
);
|
|
26
34
|
}
|
|
27
35
|
function getItemDisplayName(item) {
|
|
28
36
|
if (item.name) return item.name;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestledjs/data-browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
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.5.0",
|
|
41
|
-
"@nestledjs/shared-components": "^1.0.
|
|
41
|
+
"@nestledjs/shared-components": "^1.0.7",
|
|
42
42
|
"react": "^19.0.0",
|
|
43
43
|
"react-router": "^7.0.0"
|
|
44
44
|
},
|