@modernman00/shared-js-lib 1.2.31 → 1.2.33

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/axiosWrapper.js CHANGED
@@ -7,16 +7,20 @@ axiosRetry(axios, { retries: 3 });
7
7
  const csrfToken = getCookieValue('XSRF-TOKEN');
8
8
 
9
9
  axios.interceptors.request.use(config => {
10
- if (csrfToken) {
11
10
  config.headers['X-Requested-With'] = 'XMLHttpRequest';
11
+ config.headers['Accept'] = 'application/json';
12
+
13
+ if (csrfToken) {
14
+ config.headers['X-XSRF-TOKEN'] = csrfToken;
15
+ }
16
+
17
+ // ✅ Detect if data is FormData
18
+ if (!(config.data instanceof FormData)) {
19
+ // Only set JSON content-type for non-FormData
12
20
  config.headers['Content-Type'] = 'application/json';
13
- config.headers['Accept'] = 'application/json';
14
- if (csrfToken) {
15
- config.headers['X-XSRF-TOKEN'] = csrfToken; // Set CSRF token header
16
- }
17
- return config;
18
- }
19
- return config;
21
+ }
22
+
23
+ return config;
20
24
  });
21
25
 
22
26
  export default axios;
@@ -1,3 +1,3 @@
1
1
  <?php
2
- define('APP_VERSION', 'v1.2.32');
2
+ define('APP_VERSION', 'v1.2.34');
3
3
 
package/index.js CHANGED
@@ -3,7 +3,7 @@ export * from './UtilityHtml.js';
3
3
  export * from './Utility.js';
4
4
  export * from './Loader.js';
5
5
  export * from './Cookie.js';
6
- export * from './FormHelper.js';
6
+ export { default as FormHelper } from './FormHelper';
7
7
  export * from './Loader.js';
8
8
  export * from './ShowResponse.js';
9
9
  export * from './DateTime.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernman00/shared-js-lib",
3
- "version": "1.2.31",
3
+ "version": "1.2.33",
4
4
  "description": "Reusable JS utilities for numerous js problems",
5
5
  "homepage": "https://github.com/modernman00/shared-js-lib#readme",
6
6
  "keywords": [