@onehat/ui 0.3.362 → 0.3.363

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.362",
3
+ "version": "0.3.363",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -70,14 +70,14 @@ export default function withAlert(WrappedComponent) {
70
70
  }
71
71
  showAlert();
72
72
  },
73
- onConfirm = (message, callback, includeCancel = false) => {
73
+ onConfirm = (message, yesCallback, includeCancel = false, noCallback) => {
74
74
  clearAll();
75
75
  setMode(includeCancel ? ALERT_MODE_YES : ALERT_MODE_YES_NO);
76
76
  setTitle('Confirm');
77
77
  setMessage(message);
78
78
  setIncludeCancel(includeCancel);
79
- setYesCallback(() => callback);
80
- setNoCallback(null);
79
+ setYesCallback(() => yesCallback);
80
+ setNoCallback(noCallback ? () => noCallback : null);
81
81
  showAlert();
82
82
  },
83
83
  onCancel = () => {
@@ -22,7 +22,7 @@ const downloadWithFetch = (url, options = {}, win = null) => {
22
22
  link.click();
23
23
 
24
24
 
25
- // win.URL.revokeObjectURL(file);
25
+ // win.URL.revokeObjectURL(file); // if you revoke it, the PDF viewer will not be able to download the PDF.
26
26
 
27
27
  // const newWin = win.open(file);
28
28
  // win.location.assign(file);