@arquimedes.co/eureka-forms 2.0.78 → 2.0.80

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.d.ts CHANGED
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { Classifier, Form } from '../@Types/Form';
3
3
  import './App.css';
4
4
  import { CustomStep } from '../FormSteps/CustomStep';
5
+ import { EditorState } from 'draft-js';
5
6
  export interface AppProps {
6
7
  /** If the app is currently a widget */
7
8
  isWidget?: boolean;
@@ -35,7 +36,7 @@ export interface AppProps {
35
36
  customConfirmation?: (confirmation: {
36
37
  url: string;
37
38
  caseNumber: string;
38
- }, renderIcon: () => JSX.Element, renderConfirmation: () => JSX.Element | void, renderLink: () => JSX.Element | void) => JSX.Element;
39
+ }, renderIcon: () => JSX.Element, renderConfirmation: (state?: EditorState) => JSX.Element | void, renderLink: () => JSX.Element | void) => JSX.Element;
39
40
  /** Custom function to call on send */
40
41
  customSubmit?: (values: Record<string, unknown>, reload: () => void) => Promise<void>;
41
42
  /** Custom submit function, when passed it is called */
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
  }
@@ -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.78",
4
+ "version": "2.0.80",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",