@nestledjs/data-browser 1.0.7 → 1.0.9
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.
|
@@ -3,6 +3,7 @@ import { Link } from "react-router";
|
|
|
3
3
|
import { FormFieldClass } from "@nestledjs/forms";
|
|
4
4
|
import { RelationFieldWrapper } from "../components/RelationFieldWrapper.js";
|
|
5
5
|
import { getPluralName } from "./get-plural-names.js";
|
|
6
|
+
import { normalizeModelNameForDocument } from "./string-utils.js";
|
|
6
7
|
function getEnumValues(sdk, enumType) {
|
|
7
8
|
try {
|
|
8
9
|
const enumObject = sdk[enumType];
|
|
@@ -22,12 +23,6 @@ function getEnumValues(sdk, enumType) {
|
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
function normalizeModelNameForDocument(modelName) {
|
|
26
|
-
if (modelName === modelName.toUpperCase() && modelName.length > 1) {
|
|
27
|
-
return modelName.charAt(0).toUpperCase() + modelName.slice(1).toLowerCase();
|
|
28
|
-
}
|
|
29
|
-
return modelName;
|
|
30
|
-
}
|
|
31
26
|
function getAdminDocuments(sdk, model) {
|
|
32
27
|
if (!model || !model.name) {
|
|
33
28
|
throw new Error("Invalid model provided to getAdminDocuments");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestledjs/data-browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@apollo/client": "^4.0.0",
|
|
39
39
|
"@heroicons/react": "^2.0.0",
|
|
40
|
-
"@nestledjs/forms": "^0.
|
|
41
|
-
"@nestledjs/shared-components": "^1.0.
|
|
40
|
+
"@nestledjs/forms": "^0.6.3",
|
|
41
|
+
"@nestledjs/shared-components": "^1.0.9",
|
|
42
42
|
"react": "^19.0.0",
|
|
43
43
|
"react-router": "^7.0.0"
|
|
44
44
|
},
|