@kaspernj/api-maker 1.0.294 → 1.0.295
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/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"name": "@kaspernj/api-maker",
|
|
19
|
-
"version": "1.0.
|
|
19
|
+
"version": "1.0.295",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"description": "",
|
|
22
22
|
"main": "index.js",
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"eslint-plugin-react": "^7.23.2",
|
|
77
77
|
"i18n-on-steroids": "^1.0.7",
|
|
78
78
|
"jest": "^29.0.1",
|
|
79
|
-
"jsdom": "^
|
|
79
|
+
"jsdom": "^24.0.0"
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -10,7 +10,7 @@ export default class ApiMakerSuperAdminConfigReader {
|
|
|
10
10
|
modelConfig = require(`super-admin/model-configs/${modelNameCamelized}`).default
|
|
11
11
|
} catch (error) {
|
|
12
12
|
if (error.message.includes("Cannot find module")) {
|
|
13
|
-
console.
|
|
13
|
+
console.debug(`No model-config for ${modelClass.modelClassData().name}`)
|
|
14
14
|
} else {
|
|
15
15
|
throw error
|
|
16
16
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ConfigReader from "./config-reader"
|
|
2
2
|
import {digg, digs} from "diggerize"
|
|
3
|
+
import * as inflection from "inflection"
|
|
3
4
|
import Params from "../params"
|
|
4
5
|
import PropTypes from "prop-types"
|
|
5
6
|
import React from "react"
|
|
@@ -34,7 +35,7 @@ export default class ApiMakerSuperAdminModelClassTable extends React.PureCompone
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
viewModelPath = (args) => {
|
|
37
|
-
const argName = digg(this.props.modelClass.modelClassData(), "
|
|
38
|
+
const argName = inflection.camelize(digg(this.props.modelClass.modelClassData(), "name"), true)
|
|
38
39
|
const model = digg(args, argName)
|
|
39
40
|
|
|
40
41
|
return Params.withParams({
|
|
@@ -14,7 +14,7 @@ class SelectCalculator {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
// Ensure the primary key column is loader for the primary model class
|
|
17
|
-
const className = digg(modelClass.modelClassData(), "
|
|
17
|
+
const className = digg(modelClass.modelClassData(), "name")
|
|
18
18
|
const primaryKeyColumnName = modelClass.primaryKey()
|
|
19
19
|
|
|
20
20
|
if (!(className in select)) select[className] = []
|