@kaspernj/api-maker 1.0.278 → 1.0.280
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 +1 -1
- package/src/bootstrap/input.jsx +6 -0
- package/src/devise.mjs +8 -4
package/package.json
CHANGED
package/src/bootstrap/input.jsx
CHANGED
|
@@ -149,6 +149,12 @@ class ApiMakerBootstrapInput extends React.PureComponent {
|
|
|
149
149
|
if (forwardedProp in this.props) moneyProps[forwardedProp] = this.props[forwardedProp]
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
const forwardedInputProps = ["defaultValue"]
|
|
153
|
+
|
|
154
|
+
for (const forwardedInputProp of forwardedInputProps) {
|
|
155
|
+
if (forwardedInputProp in this.props.inputProps) moneyProps[forwardedInputProp] = this.props.inputProps[forwardedInputProp]
|
|
156
|
+
}
|
|
157
|
+
|
|
152
158
|
return moneyProps
|
|
153
159
|
}
|
|
154
160
|
|
package/src/devise.mjs
CHANGED
|
@@ -63,9 +63,12 @@ export default class ApiMakerDevise {
|
|
|
63
63
|
return {model, response}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
static updateSession (model) {
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
static updateSession (model, args = {}) {
|
|
67
|
+
if (!args.scope) {
|
|
68
|
+
args.scope = digg(model.modelClassData(), "name")
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const camelizedScopeName = inflection.camelize(args.scope, true)
|
|
69
72
|
|
|
70
73
|
ApiMakerDevise.current().currents[camelizedScopeName] = model
|
|
71
74
|
}
|
|
@@ -75,8 +78,9 @@ export default class ApiMakerDevise {
|
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
static async signOut (args = {}) {
|
|
78
|
-
if (!args.scope)
|
|
81
|
+
if (!args.scope) {
|
|
79
82
|
args.scope = "user"
|
|
83
|
+
}
|
|
80
84
|
|
|
81
85
|
const response = await Services.current().sendRequest("Devise::SignOut", {args})
|
|
82
86
|
|