@kaspernj/api-maker 1.0.248 → 1.0.250
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
package/src/commands-pool.mjs
CHANGED
|
@@ -101,14 +101,15 @@ export default class ApiMakerCommandsPool {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
if (response.success === false && response.type == "invalid_authenticity_token") {
|
|
104
|
-
console.error("
|
|
104
|
+
console.error("Invalid authenticity token - try again")
|
|
105
105
|
await SessionStatusUpdater.current().updateSessionStatus()
|
|
106
106
|
continue;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
console.error(`Request succeeded after ${i} tries`)
|
|
110
109
|
return response
|
|
111
110
|
}
|
|
111
|
+
|
|
112
|
+
throw new Error("Could successfully execute request")
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
async flush () {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Input as ApiMakerInput} from "@kaspernj/api-maker/src/inputs/input"
|
|
2
|
-
import {Checkbox} from "
|
|
2
|
+
import {Checkbox} from "./checkbox"
|
|
3
3
|
|
|
4
4
|
export default class ApiMakerInputsAttachment extends BaseComponent {
|
|
5
5
|
static propTypes = {
|
|
@@ -8,7 +8,8 @@ export default class ApiMakerInputsAttachment extends BaseComponent {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
render() {
|
|
11
|
-
const {className, inputProps, model, wrapperOpts, ...restProps} = this.props
|
|
11
|
+
const {checkboxComponent, className, inputProps, model, wrapperOpts, ...restProps} = this.props
|
|
12
|
+
const CheckboxComponent = checkboxComponent || Checkbox
|
|
12
13
|
|
|
13
14
|
inputProps.type = "file"
|
|
14
15
|
|
|
@@ -21,7 +22,7 @@ export default class ApiMakerInputsAttachment extends BaseComponent {
|
|
|
21
22
|
}
|
|
22
23
|
{this.getUrl() &&
|
|
23
24
|
<div className="input-checkbox" style={{paddingTop: "15px", paddingBottom: "15px"}}>
|
|
24
|
-
<
|
|
25
|
+
<CheckboxComponent inputProps={{id: this.getPurgeInputId(), name: this.getPurgeInputName()}} />
|
|
25
26
|
<label className="checkbox-label" htmlFor={this.getPurgeInputId()}>
|
|
26
27
|
{I18n.t("js.shared.delete")}
|
|
27
28
|
</label>
|