@arquimedes.co/eureka-forms 2.0.77 → 2.0.79

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/dist/App/App.js CHANGED
@@ -74,6 +74,6 @@ function App(_a) {
74
74
  sendLabel: props.sendLabel,
75
75
  fetchDownloadUrl: props.fetchDownloadUrl,
76
76
  customStepProps: (_g = props.customStepProps) !== null && _g !== void 0 ? _g : {},
77
- } }, { children: _jsx("div", __assign({ className: styles.container }, { children: _jsx(FormComponent, { form: form, reload: reload, branding: branding, apiKey: props.apiKey, isWidget: !!isWidget, customSteps: customSteps, containerRef: containerRef, setSubmit: props.setSubmit, customSubmit: props.customSubmit, scrollToTop: props.scrollToTop, customSubmitBtns: props.customSubmitBtns }) })) })));
77
+ } }, { children: _jsx("div", __assign({ className: styles.container }, { children: _jsx(FormComponent, { form: form, reload: reload, branding: branding, apiKey: props.apiKey, isWidget: !!isWidget, customSteps: customSteps, containerRef: containerRef, setSubmit: props.setSubmit, customSubmit: props.customSubmit, scrollToTop: props.scrollToTop, customSubmitBtns: props.customSubmitBtns, customConfirmation: props.customConfirmation }) })) })));
78
78
  }
79
79
  }
@@ -52,12 +52,13 @@ function ConfirmationDialog(_a) {
52
52
  fontSize: widthStats.isMobile ? '100px' : '160px',
53
53
  } }) })));
54
54
  };
55
- var renderConfirmation = function () {
55
+ var renderConfirmation = function (state) {
56
+ if (state === void 0) { state = editorState; }
56
57
  if (hasText) {
57
58
  return (_jsx("div", __assign({ className: styles.messageContainer, style: {
58
59
  fontSize: widthStats.isMobile ? '1.1rem' : '1.4rem',
59
60
  padding: widthStats.isMobile ? '5px 0px' : '20px 0px',
60
- } }, { children: _jsx(Editor, { editorClassName: 'Erk-Forms-Confirmation', editorState: editorState, readOnly: true, toolbarHidden: true }) })));
61
+ } }, { children: _jsx(Editor, { editorClassName: 'Erk-Forms-Confirmation', editorState: state, readOnly: true, toolbarHidden: true }) })));
61
62
  }
62
63
  };
63
64
  var renderLink = function () {
@@ -20,7 +20,7 @@ export interface WidthStats {
20
20
  isResponsive: boolean;
21
21
  isMobile: boolean;
22
22
  }
23
- type CustomAppProps = Pick<AppProps, 'customSteps' | 'customSubmitBtns' | 'setSubmit'>;
23
+ type CustomAppProps = Pick<AppProps, 'customSteps' | 'customSubmitBtns' | 'setSubmit' | 'customConfirmation'>;
24
24
  export interface BaseFormProps extends CustomAppProps {
25
25
  form: Form;
26
26
  branding?: Branding;
@@ -36,5 +36,5 @@ export interface FormComponentProps extends CustomAppProps {
36
36
  onSubmit: (values: FieldValues) => Promise<any>;
37
37
  scrollToTop?: () => void;
38
38
  }
39
- declare function FormComponent({ form, apiKey, reload, isWidget, branding, setSubmit, scrollToTop, customSteps, containerRef, customSubmit, customSubmitBtns, }: BaseFormProps): JSX.Element;
39
+ declare function FormComponent({ form, apiKey, reload, isWidget, branding, setSubmit, scrollToTop, customSteps, containerRef, customSubmit, customSubmitBtns, customConfirmation, }: BaseFormProps): JSX.Element;
40
40
  export default FormComponent;
package/dist/Form/Form.js CHANGED
@@ -84,7 +84,7 @@ export var getLocale = function () {
84
84
  function FormComponent(_a) {
85
85
  var _this = this;
86
86
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
87
- var form = _a.form, apiKey = _a.apiKey, reload = _a.reload, isWidget = _a.isWidget, branding = _a.branding, setSubmit = _a.setSubmit, scrollToTop = _a.scrollToTop, customSteps = _a.customSteps, containerRef = _a.containerRef, customSubmit = _a.customSubmit, customSubmitBtns = _a.customSubmitBtns;
87
+ var form = _a.form, apiKey = _a.apiKey, reload = _a.reload, isWidget = _a.isWidget, branding = _a.branding, setSubmit = _a.setSubmit, scrollToTop = _a.scrollToTop, customSteps = _a.customSteps, containerRef = _a.containerRef, customSubmit = _a.customSubmit, customSubmitBtns = _a.customSubmitBtns, customConfirmation = _a.customConfirmation;
88
88
  var _l = useAppSelector(function (state) { return state.global; }), idOrganization = _l.idOrganization, internal = _l.internal, postview = _l.postview;
89
89
  var formMethods = useForm({
90
90
  mode: 'onTouched',
@@ -170,7 +170,7 @@ function FormComponent(_a) {
170
170
  return (_jsxs(React.Fragment, { children: [showConfirmation !== undefined && (_jsx(ConfirmationDialog, { confirmation: showConfirmation, onClose: function () {
171
171
  reload();
172
172
  setShowConfirmation(undefined);
173
- } })), form.hasCaptcha && !internal && !postview && (_jsx(ReCAPTCHA, { ref: recaptchaRef, sitekey: "6LcL22kkAAAAAEotDeAFbRATob-u5vbibbCyWL2p", size: 'invisible', badge: 'bottomright' })), _jsx(FormProvider, __assign({}, formMethods, { children: _jsx(FormContext.Provider, __assign({ value: form }, { children: _jsx(FormTypeComponent, { onSubmit: onSubmit, setSubmit: setSubmit, scrollToTop: scrollToTop, customSubmitBtns: customSubmitBtns }) })) }))] }));
173
+ }, customConfirmation: customConfirmation })), form.hasCaptcha && !internal && !postview && (_jsx(ReCAPTCHA, { ref: recaptchaRef, sitekey: "6LcL22kkAAAAAEotDeAFbRATob-u5vbibbCyWL2p", size: 'invisible', badge: 'bottomright' })), _jsx(FormProvider, __assign({}, formMethods, { children: _jsx(FormContext.Provider, __assign({ value: form }, { children: _jsx(FormTypeComponent, { onSubmit: onSubmit, setSubmit: setSubmit, scrollToTop: scrollToTop, customSubmitBtns: customSubmitBtns }) })) }))] }));
174
174
  };
175
175
  if (!idOrganization)
176
176
  return _jsx(_Fragment, {});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "2.0.77",
4
+ "version": "2.0.79",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",