@tellescope/react-components 1.162.0 → 1.164.0

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.
@@ -33,6 +33,7 @@ export declare const NumberInput: ({ field, value, onChange, form, ...props }: F
33
33
  export declare const InsuranceInput: ({ field, value, onChange, form, responses, enduser, ...props }: FormInputProps<'Insurance'>) => JSX.Element;
34
34
  export declare const TimeInput: ({ field, value, onChange, ...props }: FormInputProps<'string'>) => JSX.Element;
35
35
  export declare const AddressInput: ({ field, form, value, onChange, ...props }: FormInputProps<'Address'>) => JSX.Element;
36
+ export declare const ESignatureTerms: () => JSX.Element;
36
37
  export declare const SignatureInput: ({ value, field, autoFocus, enduser, onChange }: FormInputProps<'signature'>) => JSX.Element;
37
38
  export declare function convertHEIC(file: FileBlob | string): Promise<string>;
38
39
  export declare const FileInput: ({ value, onChange, field, existingFileName }: FormInputProps<"file"> & {
@@ -60,7 +61,7 @@ export declare const contact_is_valid: (e: Partial<Enduser>) => "Email is invali
60
61
  export declare const RelatedContactsInput: ({ field, value: _value, onChange, ...props }: FormInputProps<'Related Contacts'>) => JSX.Element;
61
62
  export declare const AppointmentBookingInput: ({ formResponseId, field, value, onChange, form, responses, goToPreviousField, isPreviousDisabled, enduserId, ...props }: FormInputProps<'Appointment Booking'>) => JSX.Element;
62
63
  export declare const HeightInput: ({ field, value, onChange, ...props }: FormInputProps<'Height'>) => JSX.Element;
63
- export declare const RedirectInput: ({ groupId, groupInsance, rootResponseId, formResponseId, field, submit, value, onChange, responses, enduser, ...props }: FormInputProps<'Redirect'>) => JSX.Element | null;
64
+ export declare const RedirectInput: ({ enduserId, groupId, groupInsance, rootResponseId, formResponseId, field, submit, value, onChange, responses, enduser, ...props }: FormInputProps<'Redirect'>) => JSX.Element | null;
64
65
  export declare const HiddenValueInput: ({ goToNextField, goToPreviousField, field, value, onChange, form, isSinglePage, }: FormInputProps<'email'>) => JSX.Element;
65
66
  export declare const EmotiiInput: ({ goToNextField, goToPreviousField, field, value, onChange, form, formResponseId, ...props }: FormInputProps<'email'>) => JSX.Element;
66
67
  export declare const AllergiesInput: ({ goToNextField, goToPreviousField, field, value, onChange, form, formResponseId, ...props }: FormInputProps<'Allergies'>) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../../src/Forms/inputs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwE,MAAM,OAAO,CAAA;AAE5F,OAAO,EAAuJ,OAAO,EAAa,cAAc,EAAc,MAAM,eAAe,CAAA;AACnO,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,OAAO,EAA0B,OAAO,EAAuB,iBAAiB,EAAsF,MAAM,0BAA0B,CAAA;AAOtM,OAAO,EAAc,QAAQ,EAAgD,MAAM,EAAiF,MAAM,IAAI,CAAA;AAC9K,OAAO,EAA8C,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAYhG,eAAO,MAAM,cAAc;WAAkC,MAAM;kBAAgB,MAAM,KAAK,IAAI;iBAgBjG,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE;IAAE,EAAE,EAAE,OAAO,CAAA;CAG3C,CAAA;AACF,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAEvC,CAAA;AAED,eAAO,MAAM,SAAS;SAAiC,MAAM;;iBAoE5D,CAAA;AAED,eAAO,MAAM,WAAW,+BAAgC,eAAe,QAAQ,CAAC,gBAsB/E,CAAA;AAkCD,eAAO,MAAM,YAAY,+BAAgC,eAAe,SAAS,CAAC,gBAuDjF,CAAA;AAOD,eAAO,MAAM,SAAS;WAGb,SAAS;;mDAoBjB,CAAA;AAED,eAAO,MAAM,UAAU,yCAA6C,eAAe,aAAa,CAAC,gBA+GhG,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,cAAc,gBAEvD,CAAA;AAOD,eAAO,MAAM,eAAe,yCAA0C,eAAe,QAAQ,CAAC,gBAqD7F,CAAA;AACD,eAAO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{
97
97
  return (mod && mod.__esModule) ? mod : { "default": mod };
98
98
  };
99
99
  Object.defineProperty(exports, "__esModule", { value: true });
100
- exports.ConditionsInput = exports.AllergiesInput = exports.EmotiiInput = exports.HiddenValueInput = exports.RedirectInput = exports.HeightInput = exports.AppointmentBookingInput = exports.RelatedContactsInput = exports.contact_is_valid = exports.MedicationsInput = exports.CanvasMedicationsInput = exports.DatabaseSelectInput = exports.DropdownInput = exports.Progress = exports.StripeInput = exports.MultipleChoiceInput = exports.FilesInput = exports.safe_create_url = exports.FileInput = exports.convertHEIC = exports.SignatureInput = exports.AddressInput = exports.TimeInput = exports.InsuranceInput = exports.NumberInput = exports.EmailInput = exports.PhoneInput = exports.StringLongInput = exports.StringInput = exports.DateStringInput = exports.AutoFocusTextField = exports.TableInput = exports.DateInput = exports.RankingInput = exports.RatingInput = exports.PdfViewer = exports.defaultButtonStyles = exports.defaultInputProps = exports.LanguageSelect = void 0;
100
+ exports.ConditionsInput = exports.AllergiesInput = exports.EmotiiInput = exports.HiddenValueInput = exports.RedirectInput = exports.HeightInput = exports.AppointmentBookingInput = exports.RelatedContactsInput = exports.contact_is_valid = exports.MedicationsInput = exports.CanvasMedicationsInput = exports.DatabaseSelectInput = exports.DropdownInput = exports.Progress = exports.StripeInput = exports.MultipleChoiceInput = exports.FilesInput = exports.safe_create_url = exports.FileInput = exports.convertHEIC = exports.SignatureInput = exports.ESignatureTerms = exports.AddressInput = exports.TimeInput = exports.InsuranceInput = exports.NumberInput = exports.EmailInput = exports.PhoneInput = exports.StringLongInput = exports.StringInput = exports.DateStringInput = exports.AutoFocusTextField = exports.TableInput = exports.DateInput = exports.RankingInput = exports.RatingInput = exports.PdfViewer = exports.defaultButtonStyles = exports.defaultInputProps = exports.LanguageSelect = void 0;
101
101
  var jsx_runtime_1 = require("react/jsx-runtime");
102
102
  var react_1 = __importStar(require("react"));
103
103
  var axios_1 = __importDefault(require("axios"));
@@ -490,9 +490,24 @@ var AddressInput = function (_a) {
490
490
  } })) }))] })) }))] }))));
491
491
  };
492
492
  exports.AddressInput = AddressInput;
493
+ var ESignatureTerms = function () {
494
+ var companyName = 'Tellescope';
495
+ try {
496
+ var indexOfName = window.location.href.indexOf('name=');
497
+ if (indexOfName !== -1) {
498
+ companyName = (decodeURIComponent(window.location.href.substring(indexOfName + 5))
499
+ || companyName);
500
+ }
501
+ }
502
+ catch (err) {
503
+ console.error(err);
504
+ }
505
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { paddingLeft: 10 } }, { children: [(0, jsx_runtime_1.jsxs)("h1", { children: [companyName, " Electronic Signature Terms"] }), (0, jsx_runtime_1.jsxs)("p", { children: ["By selecting the \"I consent to use electronic signatures\" checkbox, you are signing this Agreement electronically. You agree your electronic signature is the legal equivalent of your manual/handwritten signature on this Agreement. By selecting \"I consent to use electronic signatures\" using any device, means or action, you consent to the legally binding terms and conditions of this Agreement. You further agree that your signature on this document (hereafter referred to as your \"E-Signature\") is as valid as if you signed the document in writing. You also agree that no certification authority or other third party verification is necessary to validate your E-Signature, and that the lack of such certification or third party verification will not in any way affect the enforceability of your E-Signature or any resulting agreement between you and", companyName, " or between you and a customer of ", companyName, "."] })] })));
506
+ };
507
+ exports.ESignatureTerms = ESignatureTerms;
493
508
  var SignatureInput = function (_a) {
494
- var _b, _d, _e, _f;
495
- var value = _a.value, field = _a.field, _g = _a.autoFocus, autoFocus = _g === void 0 ? true : _g, enduser = _a.enduser, onChange = _a.onChange;
509
+ var _b, _d, _e, _f, _g;
510
+ var value = _a.value, field = _a.field, _h = _a.autoFocus, autoFocus = _h === void 0 ? true : _h, enduser = _a.enduser, onChange = _a.onChange;
496
511
  var prefill = (((_b = field.options) === null || _b === void 0 ? void 0 : _b.prefillSignature) && (enduser === null || enduser === void 0 ? void 0 : enduser.fname) && enduser.lname
497
512
  ? "".concat(enduser.fname, " ").concat(enduser.lname)
498
513
  : undefined);
@@ -522,7 +537,7 @@ var SignatureInput = function (_a) {
522
537
  height: 400,
523
538
  width: '100%',
524
539
  marginBottom: '5px'
525
- } }), (0, jsx_runtime_1.jsx)("a", __assign({ href: field.options.signatureUrl, target: "_blank", rel: "noopener noreferrer" }, { children: "View document in new tab" }))] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { style: { margin: 0, marginTop: 5, padding: 0, paddingRight: 3 }, color: "primary", checked: !!(value === null || value === void 0 ? void 0 : value.signed), onClick: function () { return handleConsentChange(); }, inputProps: { 'aria-label': 'consent to e-signature checkbox' } }), (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ component: "span", style: { position: 'relative', top: 5, left: 2 } }, { children: ["I consent to use ", (0, jsx_runtime_1.jsx)("a", __assign({ href: "/e-signature-terms", target: "_blank", rel: "noopener noreferrer" }, { children: " electronic signatures " }))] }))] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12, style: { marginTop: 12 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { disabled: !(value === null || value === void 0 ? void 0 : value.signed), autoFocus: autoFocus, style: { width: '100%' }, size: "small", "aria-label": "Full Name", value: value === null || value === void 0 ? void 0 : value.fullName, placeholder: prefill || "Full Name", variant: "outlined", onChange: function (e) { return handleNameChange(e.target.value); }, InputProps: exports.defaultInputProps }), (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ color: "primary", style: { fontSize: 15, marginTop: 2 } }, { children: "Enter your legal full name to complete the signature" }))] }))] })));
540
+ } }), (0, jsx_runtime_1.jsx)("a", __assign({ href: field.options.signatureUrl, target: "_blank", rel: "noopener noreferrer" }, { children: "View document in new tab" }))] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { style: { margin: 0, marginTop: 5, padding: 0, paddingRight: 3 }, color: "primary", checked: !!(value === null || value === void 0 ? void 0 : value.signed), onClick: function () { return handleConsentChange(); }, inputProps: { 'aria-label': 'consent to e-signature checkbox' } }), (0, jsx_runtime_1.jsxs)(material_1.Typography, __assign({ component: "span", style: { position: 'relative', top: 5, left: 2 } }, { children: ["I consent to use ", (0, jsx_runtime_1.jsx)("a", __assign({ href: "/e-signature-terms?name=".concat(((_g = field.options) === null || _g === void 0 ? void 0 : _g.esignatureTermsCompanyName) || ''), target: "_blank", rel: "noopener noreferrer" }, { children: " electronic signatures " }))] }))] })), (0, jsx_runtime_1.jsxs)(material_1.Grid, __assign({ item: true, xs: 12, style: { marginTop: 12 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { disabled: !(value === null || value === void 0 ? void 0 : value.signed), autoFocus: autoFocus, style: { width: '100%' }, size: "small", "aria-label": "Full Name", value: value === null || value === void 0 ? void 0 : value.fullName, placeholder: prefill || "Full Name", variant: "outlined", onChange: function (e) { return handleNameChange(e.target.value); }, InputProps: exports.defaultInputProps }), (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ color: "primary", style: { fontSize: 15, marginTop: 2 } }, { children: "Enter your legal full name to complete the signature" }))] }))] })));
526
541
  };
527
542
  exports.SignatureInput = SignatureInput;
528
543
  function convertHEIC(file) {
@@ -1604,14 +1619,15 @@ var HeightInput = function (_a) {
1604
1619
  exports.HeightInput = HeightInput;
1605
1620
  var RedirectInput = function (_a) {
1606
1621
  var _b, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1607
- var groupId = _a.groupId, groupInsance = _a.groupInsance, rootResponseId = _a.rootResponseId, formResponseId = _a.formResponseId, field = _a.field, submit = _a.submit, _u = _a.value, value = _u === void 0 ? {} : _u, onChange = _a.onChange, responses = _a.responses, enduser = _a.enduser, props = __rest(_a, ["groupId", "groupInsance", "rootResponseId", "formResponseId", "field", "submit", "value", "onChange", "responses", "enduser"]);
1622
+ var enduserId = _a.enduserId, groupId = _a.groupId, groupInsance = _a.groupInsance, rootResponseId = _a.rootResponseId, formResponseId = _a.formResponseId, field = _a.field, submit = _a.submit, _u = _a.value, value = _u === void 0 ? {} : _u, onChange = _a.onChange, responses = _a.responses, enduser = _a.enduser, props = __rest(_a, ["enduserId", "groupId", "groupInsance", "rootResponseId", "formResponseId", "field", "submit", "value", "onChange", "responses", "enduser"]);
1608
1623
  console.log('formResponseId', formResponseId, 'rootResponseId', rootResponseId);
1609
1624
  var session = (0, __1.useResolvedSession)();
1610
1625
  var eId = '';
1611
1626
  try {
1612
- eId = new URL(window.location.href).searchParams.get('eId') || '';
1627
+ eId = new URL(window.location.href).searchParams.get('eId') || enduserId || '';
1613
1628
  }
1614
1629
  catch (err) { }
1630
+ console.log(eId);
1615
1631
  var email = (((_d = (_b = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.intakeField === 'email'; })) === null || _b === void 0 ? void 0 : _b.answer) === null || _d === void 0 ? void 0 : _d.value)
1616
1632
  || (enduser === null || enduser === void 0 ? void 0 : enduser.email)
1617
1633
  || session.userInfo.email);
@@ -1639,7 +1655,7 @@ var RedirectInput = function (_a) {
1639
1655
  if (!((_a = field.options) === null || _a === void 0 ? void 0 : _a.redirectExternalUrl)) {
1640
1656
  return;
1641
1657
  }
1642
- window.location.href = ((0, utilities_1.replace_enduser_template_values)(field.options.redirectExternalUrl, __assign(__assign({}, session.userInfo), { email: email, fname: fname, lname: lname, state: state, phone: phone })));
1658
+ window.location.href = ((0, utilities_1.replace_enduser_template_values)(field.options.redirectExternalUrl, __assign(__assign({}, session.userInfo), { id: eId, email: email, fname: fname, lname: lname, state: state, phone: phone })));
1643
1659
  }).catch(console.error);
1644
1660
  return;
1645
1661
  }