@opencitylabs/formio-sdk 1.1.6 → 1.2.0

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.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -2,6 +2,7 @@ import axios from "axios";
2
2
  import get from "lodash.get";
3
3
  import { baseUrl } from "./BaseUrl.js";
4
4
  import { jwtDecode } from "jwt-decode";
5
+ import Swal from "sweetalert2";
5
6
 
6
7
  class FormIoHelper {
7
8
 
@@ -533,6 +534,14 @@ class FormIoHelper {
533
534
  }
534
535
  }
535
536
 
537
+ showAlert(config = {}) {
538
+ const defaults = {
539
+ icon: "info",
540
+ confirmButtonText: "OK",
541
+ };
542
+ return Swal.fire({ ...defaults, ...config });
543
+ }
544
+
536
545
  isUser() {
537
546
  try {
538
547
  const rawSessionToken = window.sessionStorage.getItem('auth-token');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencitylabs/formio-sdk",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "description": "Node/browser SDK helper for Form.io APIs",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -24,7 +24,7 @@
24
24
  "author": "OpencityLabs",
25
25
  "license": "ISC",
26
26
  "dependencies": {
27
- "axios": "^1.13.6",
27
+ "axios": "^1.16.0",
28
28
  "jwt-decode": "^4.0.0",
29
29
  "lodash.get": "^4.4.2",
30
30
  "sweetalert2": "^11.26.24"