@modernman00/shared-js-lib 1.2.62 โ†’ 1.2.64

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.
@@ -16,6 +16,7 @@ import FormHelper from '../FormHelper.js';
16
16
  * @param {string} [css=null] - The CSS class to add to the notification element if the submission is successful.
17
17
  * @returns {void} yes
18
18
  * @throws {Error} - If there is an error with the submission
19
+ * @param {Object} [options.recaptchaV3=null] - reCAPTCHA v3 configuration ({ siteKey: 'OUR_ENTERPRISE_SITE_KEY', action: 'LOGIN' }).
19
20
  */
20
21
  export const loginSubmission = async (formId, loginURL, redirect, css = null, lengthLimit = null, optionalFields = [], recaptchaToken = null
21
22
  ) => {
package/Http.js CHANGED
@@ -10,6 +10,7 @@ import { redirectAfterDelay, parseErrorResponse } from './general.js';
10
10
  * @param {string|null} redirect - The page to redirect to after successful submission.
11
11
  * @param {string|null} css - The CSS framework to use for notification styling (e.g., 'W3css', 'bulma').
12
12
  NOTICE:::Make sure you set the notification id as the formId_notification
13
+ * @param {Object} [options.recaptchaV3=null] - reCAPTCHA v3 configuration ({ siteKey: 'OUR_ENTERPRISE_SITE_KEY', action: 'LOGIN' }).
13
14
  */
14
15
  export const postFormData = async (url, formId, redirect = null, css = null, recaptchaToken = null) => {
15
16
 
@@ -43,9 +44,12 @@ export const postFormData = async (url, formId, redirect = null, css = null, rec
43
44
 
44
45
  let formEntries = new FormData(form);
45
46
 
47
+ // if recaptcha token is provided, append it for v3
46
48
  // if recaptcha token is provided, append it for v3
47
49
  if (recaptchaToken) {
48
- formEntries.append('recaptchaTokenV3', recaptchaToken);
50
+
51
+ formEntries.append('siteKey', recaptchaToken.siteKey);
52
+ formEntries.append('action', recaptchaToken.action);
49
53
  }
50
54
 
51
55
  formEntries.delete('submit');
@@ -1,3 +1,3 @@
1
1
  <?php
2
- define('APP_VERSION', 'v1.2.62');
2
+ define('APP_VERSION', 'v1.2.64');
3
3
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernman00/shared-js-lib",
3
- "version": "1.2.62",
3
+ "version": "1.2.64",
4
4
  "description": "Reusable JS utilities for numerous js problems",
5
5
  "homepage": "https://github.com/modernman00/shared-js-lib#readme",
6
6
  "keywords": [
@@ -47,3 +47,15 @@
47
47
 
48
48
  - ๐Ÿ”– Bump version to v1.2.62 _(by modernman00)_
49
49
  - ๐Ÿงน Auto-commit before release _(by modernman00)_
50
+
51
+ ## v1.2.63 โ€” 2026-01-27 10:04
52
+ ### Changelog for v1.2.63
53
+
54
+ - ๐Ÿ”– Bump version to v1.2.63 _(by modernman00)_
55
+ - ๐Ÿงน Auto-commit before release _(by modernman00)_
56
+
57
+ ## v1.2.64 โ€” 2026-01-28 23:21
58
+ ### Changelog for v1.2.64
59
+
60
+ - ๐Ÿ”– Bump version to v1.2.64 _(by modernman00)_
61
+ - ๐Ÿงน Auto-commit before release _(by modernman00)_