@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
@@ -16,7 +16,7 @@
16
16
  ]
17
17
  },
18
18
  "name": "@kaspernj/api-maker",
19
- "version": "1.0.248",
19
+ "version": "1.0.250",
20
20
  "type": "module",
21
21
  "description": "",
22
22
  "main": "index.js",
@@ -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("invalid_authenticity_token - try again")
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 "components/inputs/checkbox"
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
- <Checkbox inputProps={{id: this.getPurgeInputId(), name: this.getPurgeInputName(), value: 1}} />
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>