Socket
Socket
Sign inDemoInstall

@dac-software/forms-pl

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dac-software/forms-pl - npm Package Compare versions

Comparing version 1.0.4 to 1.0.6-QP-538-wyswietlanie-formularza-na-stroni.0

9

dist/esm/components/Form/Form.js

@@ -21,3 +21,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import PersonalDataHelpInfo from '../PersonalDataHelpInfo/PersonalDataHelpInfo';
const Form = React.memo(({ setFormSubmitting }) => {
const Form = React.memo(({ setFormSubmitting, hasOffer }) => {
const [formResponseState, setFormResponseState] = useState();

@@ -59,6 +59,7 @@ const { t } = useTranslation();

: (React.createElement(React.Fragment, null,
React.createElement("h3", { className: `pl-contact-form__title ${config.formType === 'page' ? 'pl-contact-form__title--large-margin' : ''}` },
React.createElement("h3", { "data-testid": 'form.offer-text', className: `pl-contact-form__title ${config.formType === 'page' ? 'pl-contact-form__title--large-margin' : ''}` },
t('form.contact-title.first-line'),
React.createElement("br", null),
t('form.contact-title.second-line')),
hasOffer && (React.createElement(React.Fragment, null,
React.createElement("br", null),
t('form.contact-title.second-line')))),
React.createElement(FormFields, { formik: formik })))),

@@ -65,0 +66,0 @@ React.createElement(ContactInfo, null)),

@@ -8,11 +8,14 @@ import React, { useEffect, useState } from 'react';

const [isFormSubmitting, setFormSubmitting] = useState(false);
const [hasOffer, setHasOffer] = useState();
useEffect(() => {
window.showContactForm = () => {
document.querySelector('.react-contact-form[data-form-type="popup"]').dispatchEvent(new window.Event('showForm'));
window.showContactForm = (hasOffer = false) => {
const eventWithOfferContext = new window.CustomEvent('showForm', { detail: { hasOffer } });
document.querySelector('.react-contact-form[data-form-type="popup"]').dispatchEvent(eventWithOfferContext);
};
}, []);
useEffect(() => {
const onShowFormHandler = () => {
const onShowFormHandler = (event) => {
if (!isFormVisible) {
setFormVisible(true);
setHasOffer(event.detail.hasOffer);
}

@@ -24,3 +27,3 @@ };

};
}, [isFormVisible]);
}, []);
return (React.createElement(React.Fragment, null,

@@ -40,4 +43,4 @@ isFormVisible &&

} }),
React.createElement(Form, { setFormSubmitting: setFormSubmitting })))));
React.createElement(Form, { setFormSubmitting: setFormSubmitting, hasOffer: hasOffer })))));
};
export default FormPopup;
{
"name": "@dac-software/forms-pl",
"version": "1.0.4",
"version": "1.0.6-QP-538-wyswietlanie-formularza-na-stroni.0",
"license": "UNLICENSED",

@@ -5,0 +5,0 @@ "main": "dist/forms-pl",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc