@bigbinary/neeto-form-frontend 4.6.3 → 4.6.4-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.
@@ -18,7 +18,7 @@ import { I18nextProvider, useTranslation } from 'react-i18next';
18
18
  import { d as usePublicForm, g as useCreateSubmission, h as useUpdateSubmission, f as useSubmission, Q as QUERY_KEYS } from './useFormApi-BZtUzxW_.js';
19
19
  import { g as getComponentDisplayName } from './index-DsDXFqPW.js';
20
20
  import { jsx, jsxs } from 'react/jsx-runtime';
21
- import { d as clientI18nInstance, e as getWithExpiry, f as clearEmailVerificationDetails, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, r as renderButtonsInOrder, m as mergeRefs, c as generateInitValues, h as generateFormResponse, i as clearLocalStorageValues } from './utils-BgLYgJEU.js';
21
+ import { d as clientI18nInstance, e as getWithExpiry, f as clearEmailVerificationDetails, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, r as renderButtonsInOrder, m as mergeRefs, c as generateInitValues, h as generateFormResponse, i as clearLocalStorageValues } from './utils-CLjvgR1v.js';
22
22
  import { i as isBlank, C as CALLOUT_POSITIONS, b as CALLOUT_STYLES, L as LAST_ELEMENTS_THRESHOLD, Q as QUESTION_KIND, W as WHATSAPP_CONSENT_FIELD, p as parseServerError } from './yup-CnlHwBP1.js';
23
23
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
24
24
  import { withT } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
@@ -10,7 +10,7 @@ import PageLoader from '@bigbinary/neeto-molecules/v2/PageLoader';
10
10
  import { mergeLeft, map, filter, pluck, isEmpty } from 'ramda';
11
11
  import { useTranslation } from 'react-i18next';
12
12
  import { d as usePublicForm } from './useFormApi-BZtUzxW_.js';
13
- import { b as buildDateQueryParameters, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, m as mergeRefs, c as generateInitValues } from './utils-BgLYgJEU.js';
13
+ import { b as buildDateQueryParameters, F as FormikWrap, g as getFieldComponent, a as buildAutoCompleteAttribute, m as mergeRefs, c as generateInitValues } from './utils-CLjvgR1v.js';
14
14
  import { parsePhoneNumber } from 'libphonenumber-js';
15
15
  import { Q as QUESTION_KIND, a as QUESTIONS_WITHOUT_FIELD_CODE } from './yup-CnlHwBP1.js';
16
16
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
package/dist/v2/index.js CHANGED
@@ -50,7 +50,7 @@ import '@babel/runtime/regenerator';
50
50
  import '@bigbinary/neeto-molecules/v2/HelpPopover';
51
51
  import '@bigbinary/neeto-hotkeys';
52
52
  import '@bigbinary/neeto-molecules/v2/PageLoader';
53
- import './utils-BgLYgJEU.js';
53
+ import './utils-CLjvgR1v.js';
54
54
  import 'libphonenumber-js';
55
55
  import '@bigbinary/neeto-editor-frontend/v2/EditorContent';
56
56
  import '@bigbinary/neeto-molecules/v2/PhoneNumber';
@@ -2391,16 +2391,7 @@ var OptionsField = function OptionsField(_ref) {
2391
2391
  };
2392
2392
 
2393
2393
  var WhatsappConsentField = function WhatsappConsentField(_ref) {
2394
- var label = _ref.label,
2395
- hasPhoneNumber = _ref.hasPhoneNumber;
2396
- var _useField = useField(WHATSAPP_CONSENT_FIELD),
2397
- _useField2 = _slicedToArray(_useField, 3),
2398
- value = _useField2[0].value,
2399
- setValue = _useField2[2].setValue;
2400
- useEffect(function () {
2401
- if (!hasPhoneNumber && value) setValue(false);
2402
- }, [hasPhoneNumber, value, setValue]);
2403
- if (!hasPhoneNumber) return null;
2394
+ var label = _ref.label;
2404
2395
  return /*#__PURE__*/jsx(Checkbox$1, {
2405
2396
  label: label,
2406
2397
  "data-testid": "whatsapp-consent-checkbox",
@@ -2469,7 +2460,6 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
2469
2460
  },
2470
2461
  onChange: setValue
2471
2462
  }), whatsappConsent && /*#__PURE__*/jsx(WhatsappConsentField, {
2472
- hasPhoneNumber: Boolean(phoneData === null || phoneData === void 0 ? void 0 : phoneData.number),
2473
2463
  label: whatsappConsent.label
2474
2464
  })]
2475
2465
  });
@@ -3013,4 +3003,4 @@ var getVisibleOptions = function getVisibleOptions(options) {
3013
3003
  };
3014
3004
 
3015
3005
  export { FormikWrap as F, buildAutoCompleteAttribute as a, buildDateQueryParameters as b, generateInitValues as c, clientI18nInstance$1 as d, getWithExpiry as e, clearEmailVerificationDetails as f, getFieldComponent as g, generateFormResponse as h, clearLocalStorageValues as i, mergeRefs as m, renderButtonsInOrder as r };
3016
- //# sourceMappingURL=utils-BgLYgJEU.js.map
3006
+ //# sourceMappingURL=utils-CLjvgR1v.js.map