From 80373ac3a5ed887f7ed5b1d9d73ba57a0e0aefac Mon Sep 17 00:00:00 2001 From: Vignesh Date: Thu, 27 Jun 2024 16:31:54 +0530 Subject: [PATCH 1/4] --Updated the browser.js file and renamed file names --- gatsby-browser.js | 15 ++++++++ .../{betaContactUs.js => formDataAPI.js} | 35 +++---------------- src/pages/apis/pdf-extract.md | 2 +- src/pages/pricing/contact/form-data-api.md | 8 +++++ src/pages/pricing/contact/support-beta.md | 8 ----- 5 files changed, 28 insertions(+), 40 deletions(-) rename src/components/{betaContactUs.js => formDataAPI.js} (91%) create mode 100644 src/pages/pricing/contact/form-data-api.md delete mode 100644 src/pages/pricing/contact/support-beta.md diff --git a/gatsby-browser.js b/gatsby-browser.js index 5790b2e33..e36d6c0da 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1707,6 +1707,21 @@ export const onRouteUpdate = ({ location, prevLocation }) => { } else if (window.location.pathname.indexOf("contact/sales/seal") >= 0) { + } else if (window.location.pathname.indexOf("contact/form-data-api") >= 0) { + + document + .querySelector(".Form-Data-API-ContactUs") + .closest("main") + .setAttribute("daa-lh", "Body"); + + document + .querySelector(".Form-Data-API") + .setAttribute("daa-lh", "Form Data API"); + + document + .querySelector(".Hero-Banner") + .setAttribute("daa-lh", "Hero Banner"); + } else if (window.location.pathname.indexOf("contact") >= 0) { document .querySelector(".Contact-Home") diff --git a/src/components/betaContactUs.js b/src/components/formDataAPI.js similarity index 91% rename from src/components/betaContactUs.js rename to src/components/formDataAPI.js index 7ebf5df10..2e4dcaea7 100644 --- a/src/components/betaContactUs.js +++ b/src/components/formDataAPI.js @@ -43,24 +43,11 @@ const volumeOPtions = [ } ]; -const JoinBetaForm = ({ }) => { +const FormDataAPI = ({ }) => { const [errorMsg, seterrorMsg] = useState({}); const [formValue, setFormValue] = useState({}); const [btnDisable, setBtnDisable] = useState(false) - const getBadWords = str => { - let badwords = ["death", "kill", "murder"]; - let words = []; - badwords.forEach(word => - str - .replace(/ /g, "") - .toLowerCase() - .includes(word.replace(/ /g, "").toLowerCase()) - ? words.push(word) - : null - ); - return words; - }; const onChange = e => { if (e.target.id === "firstName") { setFormValue({ ...formValue, firstName: e.target.value }); @@ -177,20 +164,6 @@ const JoinBetaForm = ({ }) => { } else { error.expected_monthly_volume = ""; } - - if (_isEmpty(formValue?.use_case)) { - error.use_case = "Required *"; - setBtnDisable(false) - } else { - let foundWords = getBadWords(formValue?.use_case); - checkBadWords = foundWords.length > 0; - if (foundWords.length > 0) { - error.use_case = "Please avoid inappropriate words"; - setBtnDisable(false) - } else { - error.use_case = ""; - } - } if (formValue?.checkbox !== true) { error.checkbox = "Required *"; setBtnDisable(false) @@ -244,7 +217,7 @@ const JoinBetaForm = ({ }) => { }; return ( -
+
Interested in joining the Beta Program for the Adobe Import/Export Form Data APIs? @@ -430,9 +403,9 @@ const JoinBetaForm = ({ }) => { ); }; -JoinBetaForm.propTypes = { +FormDataAPI.propTypes = { theme: PropTypes.string, content: PropTypes.string }; -export { JoinBetaForm }; +export { FormDataAPI }; diff --git a/src/pages/apis/pdf-extract.md b/src/pages/apis/pdf-extract.md index 4e1b7105c..05e74882d 100644 --- a/src/pages/apis/pdf-extract.md +++ b/src/pages/apis/pdf-extract.md @@ -34,7 +34,7 @@ apiHeroAssetImg doc-ext-invoice Sign up for access to try our latest set of APIs that import and export data from form fields at scale. -[Sign Up](../pricing/contact/support-beta.md) +[Sign Up](../pricing/contact/form-data-api.md) diff --git a/src/pages/pricing/contact/form-data-api.md b/src/pages/pricing/contact/form-data-api.md new file mode 100644 index 000000000..252b24104 --- /dev/null +++ b/src/pages/pricing/contact/form-data-api.md @@ -0,0 +1,8 @@ + +import {FormDataAPI} from '../../../components/formDataAPI' + + + +## Contact Us. + + diff --git a/src/pages/pricing/contact/support-beta.md b/src/pages/pricing/contact/support-beta.md deleted file mode 100644 index 7ff314be8..000000000 --- a/src/pages/pricing/contact/support-beta.md +++ /dev/null @@ -1,8 +0,0 @@ - -import {JoinBetaForm} from '../../../components/betaContactUs' - - - -## Contact Us. - - From ca2f9f0a9632628d5bad588e4a43ec0b0d6fbaf0 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Thu, 27 Jun 2024 18:43:40 +0530 Subject: [PATCH 2/4] --Migrated the JS content to MD file --- .../{formDataAPI.js => extractCheckerForm.js} | 128 +++++++----------- src/pages/apis/pdf-extract.md | 2 +- src/pages/pricing/contact/form-data-api.md | 8 -- .../extractchecker/extract_checker_content.md | 31 +++++ .../contact/sales/extractchecker/index.md | 10 ++ 5 files changed, 92 insertions(+), 87 deletions(-) rename src/components/{formDataAPI.js => extractCheckerForm.js} (70%) delete mode 100644 src/pages/pricing/contact/form-data-api.md create mode 100644 src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md create mode 100644 src/pages/pricing/contact/sales/extractchecker/index.md diff --git a/src/components/formDataAPI.js b/src/components/extractCheckerForm.js similarity index 70% rename from src/components/formDataAPI.js rename to src/components/extractCheckerForm.js index 2e4dcaea7..162d04a57 100644 --- a/src/components/formDataAPI.js +++ b/src/components/extractCheckerForm.js @@ -1,6 +1,3 @@ -// import classNames from "classnames"; -// import { css } from "@emotion/react"; -// import "@spectrum-css/typography"; import React, { useState } from "react"; import PropTypes from "prop-types"; import InputField from "./formComponent/InputField"; @@ -31,11 +28,11 @@ const regionOptions = [ const volumeOPtions = [ { key: 1, - label: "less than 15k transactions/mo" + label: "less than 10K transactions/mo" }, { key: 2, - label: "15k-50k transactions/mo" + label: "10-50k transactions/mo" }, { key: 3, @@ -43,7 +40,7 @@ const volumeOPtions = [ } ]; -const FormDataAPI = ({ }) => { +const ExtractCheckerForm = ({ }) => { const [errorMsg, seterrorMsg] = useState({}); const [formValue, setFormValue] = useState({}); const [btnDisable, setBtnDisable] = useState(false) @@ -78,30 +75,27 @@ const FormDataAPI = ({ }) => { } }; - const onSubmit = async (e) => { - + const onSubmit = async e => { e.preventDefault(); setBtnDisable(true) - let emailCheck = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; - var blacklist = /\b(death|kill|murder)\b/; - var checkBadWords; - let error = {}; let randomString = _times(16, () => ((Math.random() * 0xf) << 0).toString(16) ).join(""); - // setLoading(true) + let emailCheck = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/; + var blacklist = /\b(death|kill|murder)\b/; + var checkBlackWords; + let error = {}; if (_isEmpty(formValue?.firstName)) { error.firstName = "Required *"; setBtnDisable(false) - } else if (blacklist.test(formValue?.firstName)) { + } else if (blacklist.test(formValue.firstName)) { error.firstName = "Please avoid inappropriate words"; setBtnDisable(false) } else { error.firstName = ""; } - if (_isEmpty(formValue?.lastName)) { error.lastName = "Required *"; setBtnDisable(false) @@ -124,7 +118,6 @@ const FormDataAPI = ({ }) => { } else { error.business_email = ""; } - if (_isEmpty(formValue?.company_website)) { error.company_website = "Required *"; setBtnDisable(false) @@ -134,14 +127,6 @@ const FormDataAPI = ({ }) => { } else { error.company_website = ""; } - - if (_isEmpty(formValue?.phone)) { - error.phone = "Required *"; - setBtnDisable(false) - } else { - error.phone = ""; - } - if (_isEmpty(formValue?.job_title)) { error.job_title = "Required *"; setBtnDisable(false) @@ -151,7 +136,6 @@ const FormDataAPI = ({ }) => { } else { error.job_title = ""; } - if (_isEmpty(formValue?.region)) { error.region = "Required *"; setBtnDisable(false) @@ -171,6 +155,7 @@ const FormDataAPI = ({ }) => { error.checkbox = ""; } seterrorMsg({ ...error }); + if ( !_isEmpty(formValue?.firstName) && !blacklist.test(formValue?.firstName) && @@ -181,17 +166,16 @@ const FormDataAPI = ({ }) => { !blacklist.test(formValue?.business_email) && !_isEmpty(formValue?.company_website) && !blacklist.test(formValue?.company_website) && - !_isEmpty(formValue?.phone) && !_isEmpty(formValue?.job_title) && !blacklist.test(formValue?.job_title) && !_isEmpty(formValue?.region) && !_isEmpty(formValue?.expected_monthly_volume) && - !checkBadWords && + !checkBlackWords && formValue?.checkbox == true ) { - let betaFormData = { + let pdfElectronicSealAPIData = { ...formValue, - formType: "sales", + formType: "pdfAccessibility", formId: randomString }; try { @@ -201,58 +185,45 @@ const FormDataAPI = ({ }) => { Accept: "application/json", "Content-Type": "application/json" }, - body: JSON.stringify(betaFormData) + body: JSON.stringify(pdfElectronicSealAPIData) }; - const response = await fetch( + const resp = await fetch( `https://927029-dcpm.adobeioruntime.net/api/v1/web/default/submit`, config ); - if (response.status === 200) { - window.location.href = `/document-services/pricing/contact/sales/confirmation/`; + const response = await resp.json(); + if (resp.status === 200) { + setFormValue({ + firstName: "", + lastName: "", + where_did_you_hear_about_us: false, + need_test_certificate: false, + checkbox: false + }); + alert( + "Thank you! Your information has been successfully submitted." + ); + setBtnDisable(false) } } catch (err) { console.log("err", err); } } }; - return ( - -
+ +
- Interested in joining the Beta Program for the Adobe Import/Export Form Data APIs? -
-
- The Import/Export PDF Form Data APIs programmatically import and export data from form fields at scale. -
-
- Primary capabilities of the Export PDF Form Data API include: -
-
-
    -
  • Export the form data as key/value pairs from a filled interactive PDF form (AcroForm/Static XFA).
  • -
  • Export the JSON structure from an empty interactive PDF form (AcroForm/Static XFA), to populate with values for use in the Import Form Data service.
  • -
+ Request access to PDF Accessibility Checker API Beta Program
- Primary capabilities of the Import PDF Form Data API include: -
-
-
    -
  • - Import the form data from key/value pair into an empty interactive PDF form (AcroForm/Static XFA). -
  • -
-
-
- Use this form to have an Adobe representative contact you with more information about the Beta program or to answer other questions you have about the APIs. For additional information, please refer to the documentation [insert link]. -
-
-
Request access to the Beta Program
-
For technical inquiries, submit a tech support request here.
+ For technical inquiries, submit a tech support request{" "} + + here. +
-
+
{ errorMsg={errorMsg.lastName} />
-
+
{ errorMsg={errorMsg.company_website} />
-
+
{ errorMsg={errorMsg.job_title} />
-
+
{ errorMsg={errorMsg.expected_monthly_volume} />
-
+
{ id="checkbox" name="checkbox" onChange={e => onChange(e)} + value={formValue?.checkbox} checked={formValue?.checkbox} />
The{" "} - + Adobe family of companies {" "} would like to keep you informed about Acrobat Services APIs, which @@ -373,7 +345,7 @@ const FormDataAPI = ({ }) => { to being contacted via email. Please see our{" "} Privacy Policy @@ -381,31 +353,31 @@ const FormDataAPI = ({ }) => { for more details.
-
+
); }; -FormDataAPI.propTypes = { +ExtractCheckerForm.propTypes = { theme: PropTypes.string, content: PropTypes.string }; -export { FormDataAPI }; +export { ExtractCheckerForm }; diff --git a/src/pages/apis/pdf-extract.md b/src/pages/apis/pdf-extract.md index 05e74882d..7c561092f 100644 --- a/src/pages/apis/pdf-extract.md +++ b/src/pages/apis/pdf-extract.md @@ -34,7 +34,7 @@ apiHeroAssetImg doc-ext-invoice Sign up for access to try our latest set of APIs that import and export data from form fields at scale. -[Sign Up](../pricing/contact/form-data-api.md) +[Sign Up](../pricing/contact/sales/extractchecker) diff --git a/src/pages/pricing/contact/form-data-api.md b/src/pages/pricing/contact/form-data-api.md deleted file mode 100644 index 252b24104..000000000 --- a/src/pages/pricing/contact/form-data-api.md +++ /dev/null @@ -1,8 +0,0 @@ - -import {FormDataAPI} from '../../../components/formDataAPI' - - - -## Contact Us. - - diff --git a/src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md b/src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md new file mode 100644 index 000000000..f95b33ebd --- /dev/null +++ b/src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md @@ -0,0 +1,31 @@ +--- +title: Adobe Developer - Acrobat Services Beta Program for Adobe PDF Embed Checker API - form +--- + + + +## Interested in joining the Beta Program for the Adobe Import/Export Form Data APIs? + +The Import/Export PDF Form Data APIs programmatically import and export data from form fields at scale. + + + +Primary capabilities of the Export PDF Form Data API include: + + + +- Export the form data as key/value pairs from a filled interactive PDF form (AcroForm/Static XFA). + +- Export the JSON structure from an empty interactive PDF form (AcroForm/Static XFA), to populate with values for use in the Import Form Data service. + + + +Primary capabilities of the Import PDF Form Data API include: + + + +- Import the form data from key/value pair into an empty interactive PDF form (AcroForm/Static XFA). + + + +Use this form to have an Adobe representative contact you with more information about the Beta program or to answer other questions you have about the APIs. For additional information, please refer to the [documentation](https://developer.adobe.com/document-services/docs/apis/#tag/Extract-PDF). diff --git a/src/pages/pricing/contact/sales/extractchecker/index.md b/src/pages/pricing/contact/sales/extractchecker/index.md new file mode 100644 index 000000000..c082eaaad --- /dev/null +++ b/src/pages/pricing/contact/sales/extractchecker/index.md @@ -0,0 +1,10 @@ +import ExtractCheckerContent from './extract_checker_content.md' +import {ExtractCheckerForm} from '../../../../../components/extractCheckerForm' + + + +## Contact Us. + + + + \ No newline at end of file From b92b2a89d93e754f64aef87495dac91f6a0a22a2 Mon Sep 17 00:00:00 2001 From: Vignesh Date: Thu, 27 Jun 2024 20:10:23 +0530 Subject: [PATCH 3/4] --Updated the content and link --- gatsby-browser.js | 2 +- ...{extractCheckerForm.js => form-data-api.js} | 18 ++++++++---------- src/pages/apis/pdf-extract.md | 2 +- .../contact/sales/extractchecker/index.md | 10 ---------- .../form-data-api-content.md} | 2 +- .../contact/sales/form-data-api/index.md | 10 ++++++++++ 6 files changed, 21 insertions(+), 23 deletions(-) rename src/components/{extractCheckerForm.js => form-data-api.js} (92%) delete mode 100644 src/pages/pricing/contact/sales/extractchecker/index.md rename src/pages/pricing/contact/sales/{extractchecker/extract_checker_content.md => form-data-api/form-data-api-content.md} (94%) create mode 100644 src/pages/pricing/contact/sales/form-data-api/index.md diff --git a/gatsby-browser.js b/gatsby-browser.js index e36d6c0da..80f77219b 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -1707,7 +1707,7 @@ export const onRouteUpdate = ({ location, prevLocation }) => { } else if (window.location.pathname.indexOf("contact/sales/seal") >= 0) { - } else if (window.location.pathname.indexOf("contact/form-data-api") >= 0) { + } else if (window.location.pathname.indexOf("contact/sales/form-data-api") >= 0) { document .querySelector(".Form-Data-API-ContactUs") diff --git a/src/components/extractCheckerForm.js b/src/components/form-data-api.js similarity index 92% rename from src/components/extractCheckerForm.js rename to src/components/form-data-api.js index 162d04a57..84ca9f0e0 100644 --- a/src/components/extractCheckerForm.js +++ b/src/components/form-data-api.js @@ -40,7 +40,7 @@ const volumeOPtions = [ } ]; -const ExtractCheckerForm = ({ }) => { +const FormDataAPI = ({ }) => { const [errorMsg, seterrorMsg] = useState({}); const [formValue, setFormValue] = useState({}); const [btnDisable, setBtnDisable] = useState(false) @@ -211,10 +211,10 @@ const ExtractCheckerForm = ({ }) => { } }; return ( -
+
- Request access to PDF Accessibility Checker API Beta Program + Request access to the Beta Program
For technical inquiries, submit a tech support request{" "} @@ -340,9 +340,7 @@ const ExtractCheckerForm = ({ }) => { Adobe family of companies {" "} - would like to keep you informed about Acrobat Services APIs, which - may include contacting you via email. By checking this box, you agree - to being contacted via email. Please see our{" "} + would like to keep you informed about Acrobat Services APIs, which may include contacting you via email. By checking this box, you agree to being contacted via email. Please see our{" "} { By clicking Submit, I agree that I have read and accepted the{" "} - License Agreement for Prerelease Software, PDF Accessibility Checker API Beta + License Agreement for Prerelease Software, Import/Export PDF Form Data API Beta .
@@ -375,9 +373,9 @@ const ExtractCheckerForm = ({ }) => { ); }; -ExtractCheckerForm.propTypes = { +FormDataAPI.propTypes = { theme: PropTypes.string, content: PropTypes.string }; -export { ExtractCheckerForm }; +export { FormDataAPI }; diff --git a/src/pages/apis/pdf-extract.md b/src/pages/apis/pdf-extract.md index 7c561092f..0163c8636 100644 --- a/src/pages/apis/pdf-extract.md +++ b/src/pages/apis/pdf-extract.md @@ -34,7 +34,7 @@ apiHeroAssetImg doc-ext-invoice Sign up for access to try our latest set of APIs that import and export data from form fields at scale. -[Sign Up](../pricing/contact/sales/extractchecker) +[Sign Up](../pricing/contact/sales/form-data-api) diff --git a/src/pages/pricing/contact/sales/extractchecker/index.md b/src/pages/pricing/contact/sales/extractchecker/index.md deleted file mode 100644 index c082eaaad..000000000 --- a/src/pages/pricing/contact/sales/extractchecker/index.md +++ /dev/null @@ -1,10 +0,0 @@ -import ExtractCheckerContent from './extract_checker_content.md' -import {ExtractCheckerForm} from '../../../../../components/extractCheckerForm' - - - -## Contact Us. - - - - \ No newline at end of file diff --git a/src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md b/src/pages/pricing/contact/sales/form-data-api/form-data-api-content.md similarity index 94% rename from src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md rename to src/pages/pricing/contact/sales/form-data-api/form-data-api-content.md index f95b33ebd..3ab582f4c 100644 --- a/src/pages/pricing/contact/sales/extractchecker/extract_checker_content.md +++ b/src/pages/pricing/contact/sales/form-data-api/form-data-api-content.md @@ -28,4 +28,4 @@ Primary capabilities of the Import PDF Form Data API include: -Use this form to have an Adobe representative contact you with more information about the Beta program or to answer other questions you have about the APIs. For additional information, please refer to the [documentation](https://developer.adobe.com/document-services/docs/apis/#tag/Extract-PDF). +Use this form to have an Adobe representative contact you with more information about the Beta program or to answer other questions you have about the APIs. For additional information, please refer to the [documentation](https://developer.adobe.com/document-services/docs/apis/#tag/Export-PDF-Form-Data/operation/pdfoperations.getformdata.jobstatus). diff --git a/src/pages/pricing/contact/sales/form-data-api/index.md b/src/pages/pricing/contact/sales/form-data-api/index.md new file mode 100644 index 000000000..4c7580650 --- /dev/null +++ b/src/pages/pricing/contact/sales/form-data-api/index.md @@ -0,0 +1,10 @@ +import FormDataAPIContent from './form-data-api-content.md' +import {FormDataAPI} from '../../../../../components/form-data-api' + + + +## Contact Us. + + + + \ No newline at end of file From 58d54a274a1ecbb57bcf1f636a8db43f53fe52ca Mon Sep 17 00:00:00 2001 From: Vignesh Date: Thu, 27 Jun 2024 20:15:49 +0530 Subject: [PATCH 4/4] Changed link to the support documentation --- src/components/form-data-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/form-data-api.js b/src/components/form-data-api.js index 84ca9f0e0..9542cb01e 100644 --- a/src/components/form-data-api.js +++ b/src/components/form-data-api.js @@ -218,7 +218,7 @@ const FormDataAPI = ({ }) => {
For technical inquiries, submit a tech support request{" "} - + here.