@adobe-commerce/recaptcha 1.0.0-alpha3 → 1.0.0-beta1

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/.eslintrc.js CHANGED
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  const baseConfig = require('@adobe-commerce/elsie/config/eslint');
2
11
 
3
12
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe-commerce/recaptcha",
3
- "version": "1.0.0-alpha3",
3
+ "version": "1.0.0-beta1",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Module allows to efficiently verify that users are humans, not bots or spammers",
6
6
  "engines": {
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export * from './message.config';
2
11
  export * from './typeForms.config';
3
12
  export * from './recaptchaBadgeSelector.config';
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export const recaptchaMessage = {
2
11
  failedFetch: 'Failed to fetch config from backend with status:',
3
12
  failedSetStorageConfig: 'Failed to set storage config',
@@ -1 +1,10 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export const recaptchaBadgeSelector = '.grecaptcha-badge iframe';
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export const typeDefaultForm: Record<string, string> = {
2
11
  PLACE_ORDER: 'placeOrder',
3
12
  CONTACT: 'contactUs',
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export const RECAPTCHA_CONFIGURATION_V3 = `query {
2
11
  recaptchaV3Config {
3
12
  is_enabled
package/src/index.ts CHANGED
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  import {
2
11
  ReCaptchaV3Response,
3
12
  PropsFormTypes,
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  import { recaptchaBadgeSelector } from '../configs';
2
11
 
3
12
  const waitForElement = (selector: string): Promise<void> => {
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export const convertKeysToCamelCase = (obj: {
2
11
  [key: string]: any;
3
12
  }): { [key: string]: string | number | boolean } => {
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  import { ReCaptchaV3Model } from '../types/recaptcha.types';
2
11
  import { typeDefaultForm } from '../configs/typeForms.config';
3
12
 
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  import { recaptchaMessage } from '../configs';
2
11
  import { ReCaptchaV3Model } from '../types/recaptcha.types';
3
12
 
package/src/lib/index.ts CHANGED
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export * from './_extendConfig';
2
11
  export * from './_storageConfig';
3
12
  export * from './_checkRecaptchaBadge';
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  import { recaptchaMessage } from '../configs';
2
11
  import {
3
12
  MutationObserverInit,
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  declare namespace grecaptcha {
2
11
  interface RenderParameters {
3
12
  sitekey: string;
@@ -1,3 +1,12 @@
1
+ /********************************************************************
2
+ * Copyright 2024 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+
1
10
  export interface ReCaptchaV3InitProps {
2
11
  is_enabled?: boolean;
3
12
  website_key?: string;