@tellescope/react-components 1.234.1 → 1.235.1
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/lib/cjs/CMS/ContentViewer.d.ts.map +1 -1
- package/lib/cjs/CMS/ContentViewer.js +26 -22
- package/lib/cjs/CMS/ContentViewer.js.map +1 -1
- package/lib/cjs/Forms/forms.d.ts.map +1 -1
- package/lib/cjs/Forms/forms.js +37 -35
- package/lib/cjs/Forms/forms.js.map +1 -1
- package/lib/cjs/Forms/forms.v2.d.ts.map +1 -1
- package/lib/cjs/Forms/forms.v2.js +37 -35
- package/lib/cjs/Forms/forms.v2.js.map +1 -1
- package/lib/cjs/Forms/inputs.d.ts +17 -2
- package/lib/cjs/Forms/inputs.d.ts.map +1 -1
- package/lib/cjs/Forms/inputs.js +429 -37
- package/lib/cjs/Forms/inputs.js.map +1 -1
- package/lib/cjs/Forms/inputs.v2.d.ts +3 -2
- package/lib/cjs/Forms/inputs.v2.d.ts.map +1 -1
- package/lib/cjs/Forms/inputs.v2.js +21 -294
- package/lib/cjs/Forms/inputs.v2.js.map +1 -1
- package/lib/cjs/Forms/types.d.ts +4 -0
- package/lib/cjs/Forms/types.d.ts.map +1 -1
- package/lib/esm/CMS/ContentViewer.d.ts.map +1 -1
- package/lib/esm/CMS/ContentViewer.js +27 -23
- package/lib/esm/CMS/ContentViewer.js.map +1 -1
- package/lib/esm/Forms/forms.d.ts.map +1 -1
- package/lib/esm/Forms/forms.js +38 -36
- package/lib/esm/Forms/forms.js.map +1 -1
- package/lib/esm/Forms/forms.v2.d.ts.map +1 -1
- package/lib/esm/Forms/forms.v2.js +38 -36
- package/lib/esm/Forms/forms.v2.js.map +1 -1
- package/lib/esm/Forms/inputs.d.ts +17 -2
- package/lib/esm/Forms/inputs.d.ts.map +1 -1
- package/lib/esm/Forms/inputs.js +427 -38
- package/lib/esm/Forms/inputs.js.map +1 -1
- package/lib/esm/Forms/inputs.v2.d.ts +3 -2
- package/lib/esm/Forms/inputs.v2.d.ts.map +1 -1
- package/lib/esm/Forms/inputs.v2.js +16 -290
- package/lib/esm/Forms/inputs.v2.js.map +1 -1
- package/lib/esm/Forms/types.d.ts +4 -0
- package/lib/esm/Forms/types.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -44
- package/src/CMS/ContentViewer.tsx +16 -2
- package/src/Forms/forms.tsx +13 -6
- package/src/Forms/forms.v2.tsx +9 -2
- package/src/Forms/inputs.tsx +563 -66
- package/src/Forms/inputs.v2.tsx +13 -594
- package/src/Forms/types.ts +4 -2
|
@@ -30,7 +30,8 @@ export declare const StringLongInput: ({ field, value, onChange, form, ...props
|
|
|
30
30
|
export declare const PhoneInput: ({ field, value, onChange, form, ...props }: FormInputProps<'phone'>) => JSX.Element;
|
|
31
31
|
export declare const EmailInput: ({ field, value, onChange, form, ...props }: FormInputProps<'email'>) => JSX.Element;
|
|
32
32
|
export declare const NumberInput: ({ field, value, onChange, form, ...props }: FormInputProps<'number'>) => JSX.Element;
|
|
33
|
-
export declare const InsuranceInput: (
|
|
33
|
+
export declare const InsuranceInput: (props: FormInputProps<'Insurance'>) => JSX.Element;
|
|
34
|
+
export declare const BridgeEligibilityInput: (props: FormInputProps<'Bridge Eligibility'>) => JSX.Element;
|
|
34
35
|
export declare const TimeInput: ({ field, value, onChange, ...props }: FormInputProps<'string'>) => JSX.Element;
|
|
35
36
|
export declare const TimezoneInput: ({ value, field, onChange, ...props }: FormInputProps<'Timezone'>) => JSX.Element;
|
|
36
37
|
export declare const AddressInput: ({ field, form, value, onChange, ...props }: FormInputProps<'Address'>) => JSX.Element;
|
|
@@ -63,7 +64,7 @@ export declare const MedicationsInput: ({ field, value, onChange, ...props }: Fo
|
|
|
63
64
|
export declare const BelugaPatientPreferenceInput: ({ field, value: _value, onChange }: FormInputProps<'Beluga Patient Preference'>) => JSX.Element;
|
|
64
65
|
export declare const contact_is_valid: (e: Partial<Enduser>) => "Email is invalid" | "Phone is invalid" | "Date of birth should be MM-DD-YYYY" | undefined;
|
|
65
66
|
export declare const RelatedContactsInput: ({ field, value: _value, onChange, error: parentError, ...props }: FormInputProps<'Related Contacts'>) => JSX.Element;
|
|
66
|
-
export declare const AppointmentBookingInput: (
|
|
67
|
+
export declare const AppointmentBookingInput: (props: FormInputProps<'Appointment Booking'>) => JSX.Element;
|
|
67
68
|
export declare const HeightInput: ({ field, value, onChange, ...props }: FormInputProps<'Height'>) => JSX.Element;
|
|
68
69
|
export { RedirectInput } from './inputs';
|
|
69
70
|
export declare const HiddenValueInput: ({ goToNextField, goToPreviousField, field, value, onChange, isSinglePage, groupFields }: FormInputProps<'email'>) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.v2.d.ts","sourceRoot":"","sources":["../../../src/Forms/inputs.v2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwE,MAAM,OAAO,CAAA;AAE5F,OAAO,EAAmH,OAAO,EAAa,cAAc,EAAc,MAAM,eAAe,CAAA;AAC/L,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,OAAO,EAAE,OAAO,EAAuB,iBAAiB,EAAqG,MAAM,0BAA0B,CAAA;AAO7L,OAAO,EAAc,QAAQ,EAAgD,MAAM,EAAoE,MAAM,IAAI,CAAA;AACjK,OAAO,EAAiC,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAWnF,eAAO,MAAM,cAAc;WAAkC,MAAM;kBAAgB,MAAM,KAAK,IAAI;iBAgBjG,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE;IAAE,EAAE,EAAE,OAAO,CAAA;CAgB3C,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,gBA0B/E,CAAA;AAkCD,eAAO,MAAM,YAA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C,eAAO,MAAM,gBAAgB,4FAA6F,eAAe,OAAO,CAAC,gBA+ChJ,CAAA;AAED,eAAO,MAAM,WAAW,iGAAkG,eAAe,OAAO,CAAC,gBA8ChJ,CAAA;AAMD,eAAO,MAAM,cAAc,iGAAkG,eAAe,WAAW,CAAC,gBAqHvJ,CAAA;AAGD,eAAO,MAAM,eAAe,iGAAkG,eAAe,YAAY,CAAC,gBAsDzJ,CAAA;AAED,eAAO,MAAM,aAAa,+BAAgC,eAAe,WAAW,CAAC,gBAEpF,CAAA;AAED,eAAO,MAAM,eAAe;mBACX,MAAM,QAAQ,CAAC,MAAM,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;iBA6CxE,CAAA"}
|
|
@@ -74,15 +74,15 @@ import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState }
|
|
|
74
74
|
import axios from "axios";
|
|
75
75
|
import { Autocomplete, Box, Button, Checkbox, Chip, Divider, FormControl, Grid, InputLabel, MenuItem, RadioGroup, Select, TextField, Typography } from "@mui/material";
|
|
76
76
|
import { useDropzone } from "react-dropzone";
|
|
77
|
-
import { CANVAS_TITLE, EMOTII_TITLE,
|
|
78
|
-
import { MM_DD_YYYY_to_YYYY_MM_DD, capture_is_supported,
|
|
77
|
+
import { CANVAS_TITLE, EMOTII_TITLE, PRIMARY_HEX, RELATIONSHIP_TYPES } from "@tellescope/constants";
|
|
78
|
+
import { MM_DD_YYYY_to_YYYY_MM_DD, capture_is_supported, first_letter_capitalized, getLocalTimezone, getPublicFileURL, mm_dd_yyyy, truncate_string, user_display_name } from "@tellescope/utilities";
|
|
79
79
|
import { TIMEZONES_USA } from "@tellescope/types-models";
|
|
80
80
|
import { VALID_STATES, emailValidator, phoneValidator } from "@tellescope/validation";
|
|
81
81
|
import Slider from '@mui/material/Slider';
|
|
82
82
|
import LinearProgress from '@mui/material/LinearProgress';
|
|
83
83
|
import DatePicker from "react-datepicker";
|
|
84
84
|
import { datepickerCSS } from "./css/react-datepicker"; // avoids build issue with RN
|
|
85
|
-
import { CancelIcon, IconButton, LabeledIconButton,
|
|
85
|
+
import { CancelIcon, IconButton, LabeledIconButton, form_display_text_for_language, isDateString, useResolvedSession } from "..";
|
|
86
86
|
import { css } from '@emotion/css';
|
|
87
87
|
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
|
|
88
88
|
import DragIndicatorIcon from '@mui/icons-material/DragIndicator';
|
|
@@ -328,122 +328,15 @@ export var NumberInput = function (_a) {
|
|
|
328
328
|
}
|
|
329
329
|
} })));
|
|
330
330
|
};
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
return false;
|
|
341
|
-
if (r.field.intakeField !== 'Address')
|
|
342
|
-
return false;
|
|
343
|
-
// make sure state is actually defined (in case of multiple address questions, where 1+ are blank)
|
|
344
|
-
if (!((_a = r.answer.value) === null || _a === void 0 ? void 0 : _a.state))
|
|
345
|
-
return false;
|
|
346
|
-
return true;
|
|
347
|
-
}); }, [responses]);
|
|
348
|
-
var state = useMemo(function () {
|
|
349
|
-
var _a, _b, _d;
|
|
350
|
-
return ((((_a = addressQuestion === null || addressQuestion === void 0 ? void 0 : addressQuestion.answer) === null || _a === void 0 ? void 0 : _a.type) === 'Address' ? (_d = (_b = addressQuestion === null || addressQuestion === void 0 ? void 0 : addressQuestion.answer) === null || _b === void 0 ? void 0 : _b.value) === null || _d === void 0 ? void 0 : _d.state : undefined) || (enduser === null || enduser === void 0 ? void 0 : enduser.state));
|
|
351
|
-
}, [enduser === null || enduser === void 0 ? void 0 : enduser.state, addressQuestion]);
|
|
352
|
-
var loadRef = useRef(false); // so session changes don't cause
|
|
353
|
-
useEffect(function () {
|
|
354
|
-
var _a;
|
|
355
|
-
if (((_a = field === null || field === void 0 ? void 0 : field.options) === null || _a === void 0 ? void 0 : _a.dataSource) === CANVAS_TITLE)
|
|
356
|
-
return; // instead, look-up while typing against Canvas Search API
|
|
357
|
-
if (loadRef.current)
|
|
358
|
-
return;
|
|
359
|
-
loadRef.current = true;
|
|
360
|
-
// just load all at once, should be reasonably performant compared to paging
|
|
361
|
-
session.api.form_fields.load_choices_from_database({ fieldId: field.id, limit: 10000 })
|
|
362
|
-
.then(function (_a) {
|
|
363
|
-
var choices = _a.choices;
|
|
364
|
-
return setPayers(choices
|
|
365
|
-
.map(function (c) {
|
|
366
|
-
var _a, _b, _d, _e, _f, _g, _h, _j;
|
|
367
|
-
return ({
|
|
368
|
-
id: ((_b = (_a = c.values.find(function (v) { var _a, _b; return ((_b = (_a = v.label) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'id'; })) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toString()) || '',
|
|
369
|
-
name: ((_e = (_d = c.values.find(function (v) { var _a, _b; return ((_b = (_a = v.label) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'name'; })) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.toString()) || '',
|
|
370
|
-
state: ((_g = (_f = c.values.find(function (v) { var _a, _b; return ((_b = (_a = v.label) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'state'; })) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.toString()) || '',
|
|
371
|
-
type: ((_j = (_h = c.values.find(function (v) { var _a, _b; return ((_b = (_a = v.label) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'type'; })) === null || _h === void 0 ? void 0 : _h.value) === null || _j === void 0 ? void 0 : _j.toString()) || '',
|
|
372
|
-
databaseRecord: c,
|
|
373
|
-
});
|
|
374
|
-
})
|
|
375
|
-
.filter(function (c) { return !c.state || !state || (c.state === state); }));
|
|
376
|
-
})
|
|
377
|
-
.catch(console.error);
|
|
378
|
-
}, [session, state, (_b = field === null || field === void 0 ? void 0 : field.options) === null || _b === void 0 ? void 0 : _b.dataSource]);
|
|
379
|
-
var searchRef = useRef(query);
|
|
380
|
-
useEffect(function () {
|
|
381
|
-
var _a;
|
|
382
|
-
if (((_a = field === null || field === void 0 ? void 0 : field.options) === null || _a === void 0 ? void 0 : _a.dataSource) !== CANVAS_TITLE) {
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
if (!query)
|
|
386
|
-
return;
|
|
387
|
-
if (searchRef.current === query)
|
|
388
|
-
return;
|
|
389
|
-
searchRef.current = query;
|
|
390
|
-
session.api.integrations.proxy_read({
|
|
391
|
-
integration: CANVAS_TITLE,
|
|
392
|
-
query: query,
|
|
393
|
-
type: 'organizations',
|
|
394
|
-
})
|
|
395
|
-
.then(function (_a) {
|
|
396
|
-
var data = _a.data;
|
|
397
|
-
try {
|
|
398
|
-
setPayers(data.map(function (d) { return ({
|
|
399
|
-
id: d.resource.id,
|
|
400
|
-
name: d.resource.name,
|
|
401
|
-
}); }));
|
|
402
|
-
}
|
|
403
|
-
catch (err) {
|
|
404
|
-
console.error;
|
|
405
|
-
}
|
|
406
|
-
})
|
|
407
|
-
.catch(console.error);
|
|
408
|
-
}, [session, (_d = field === null || field === void 0 ? void 0 : field.options) === null || _d === void 0 ? void 0 : _d.dataSource, query]);
|
|
409
|
-
return (_jsxs(Grid, __assign({ container: true, spacing: 2, sx: { mt: '0' } }, { children: [_jsx(Grid, __assign({ item: true, xs: 12, sm: 6 }, { children: _jsx(Autocomplete, { freeSolo: !((_e = field.options) === null || _e === void 0 ? void 0 : _e.requirePredefinedInsurer), options: payers.map(function (p) { return p.name; }), value: (value === null || value === void 0 ? void 0 : value.payerName) || '', onChange: function (e, v) {
|
|
410
|
-
var _a, _b;
|
|
411
|
-
return onChange(__assign(__assign({}, value), { payerName: v || '', payerId: ((_a = payers.find(function (p) { return p.name === v; })) === null || _a === void 0 ? void 0 : _a.id) || '', payerType: ((_b = payers.find(function (p) { return p.name === v; })) === null || _b === void 0 ? void 0 : _b.type) || '' }), field.id);
|
|
412
|
-
}, onInputChange: ((_f = field.options) === null || _f === void 0 ? void 0 : _f.requirePredefinedInsurer)
|
|
413
|
-
? function (e, v) { if (v) {
|
|
414
|
-
setQuery(v);
|
|
415
|
-
} }
|
|
416
|
-
: function (e, v) {
|
|
417
|
-
var _a, _b, _d;
|
|
418
|
-
if (v) {
|
|
419
|
-
setQuery(v);
|
|
420
|
-
}
|
|
421
|
-
var databaseRecord = (_a = payers.find(function (p) { return p.name === v; })) === null || _a === void 0 ? void 0 : _a.databaseRecord;
|
|
422
|
-
if (databaseRecord) {
|
|
423
|
-
onDatabaseSelect === null || onDatabaseSelect === void 0 ? void 0 : onDatabaseSelect([databaseRecord]);
|
|
424
|
-
}
|
|
425
|
-
onChange(__assign(__assign({}, value), { payerName: v || '', payerId: ((_b = payers.find(function (p) { return p.name === v; })) === null || _b === void 0 ? void 0 : _b.id) || '', payerType: ((_d = payers.find(function (p) { return p.name === v; })) === null || _d === void 0 ? void 0 : _d.type) || '' }), field.id);
|
|
426
|
-
}, renderInput: function (params) {
|
|
427
|
-
var _a;
|
|
428
|
-
return (_jsx(TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: defaultInputProps.sx }), required: !field.isOptional, size: "small", label: "Insurer", placeholder: ((_a = field.options) === null || _a === void 0 ? void 0 : _a.dataSource) === CANVAS_TITLE ? "Search insurer..." : "Insurer" })));
|
|
429
|
-
} }) })), _jsx(Grid, __assign({ item: true, xs: 12, sm: 6 }, { children: _jsx(TextField, { InputProps: defaultInputProps, required: !field.isOptional, fullWidth: true, value: (_g = value === null || value === void 0 ? void 0 : value.memberId) !== null && _g !== void 0 ? _g : '', onChange: function (e) { return onChange(__assign(__assign({}, value), { memberId: e.target.value }), field.id); }, label: form_display_text_for_language(form, "Member ID", ''), size: "small" }) })), _jsx(Grid, __assign({ item: true, xs: 12, sm: 6 }, { children: _jsx(TextField, { InputProps: defaultInputProps, required: false, fullWidth: true, value: (_h = value === null || value === void 0 ? void 0 : value.planName) !== null && _h !== void 0 ? _h : '', onChange: function (e) { return onChange(__assign(__assign({}, value), { planName: e.target.value }), field.id); }, label: form_display_text_for_language(form, "Plan Name", ''), size: "small" }) })), _jsx(Grid, __assign({ item: true, xs: 12, sm: 6 }, { children: _jsx(DateStringInput, { size: "small", label: "Plan Start Date", field: __assign(__assign({}, field), { isOptional: true }), value: (value === null || value === void 0 ? void 0 : value.startDate) || '', onChange: function (startDate) {
|
|
430
|
-
return onChange(__assign(__assign({}, value), { startDate: startDate }), field.id);
|
|
431
|
-
} }) })), ((_j = field.options) === null || _j === void 0 ? void 0 : _j.includeGroupNumber) &&
|
|
432
|
-
_jsx(Grid, __assign({ item: true, xs: 12 }, { children: _jsx(TextField, { InputProps: defaultInputProps, fullWidth: true, value: (_k = value === null || value === void 0 ? void 0 : value.groupNumber) !== null && _k !== void 0 ? _k : '', onChange: function (e) { return onChange(__assign(__assign({}, value), { groupNumber: e.target.value }), field.id); }, label: form_display_text_for_language(form, "Group Number", ''), size: "small" }) })), _jsx(Grid, __assign({ item: true, xs: 12 }, { children: _jsx(StringSelector, { size: "small", label: "Relationship to Policy Owner", options: ((((_l = field.options) === null || _l === void 0 ? void 0 : _l.billingProvider) === CANVAS_TITLE || ((_m = field.options) === null || _m === void 0 ? void 0 : _m.dataSource) === CANVAS_TITLE)
|
|
433
|
-
? INSURANCE_RELATIONSHIPS_CANVAS
|
|
434
|
-
: INSURANCE_RELATIONSHIPS)
|
|
435
|
-
.sort(function (x, y) { return x.localeCompare(y); }), value: (value === null || value === void 0 ? void 0 : value.relationship) || 'Self', onChange: function (relationship) {
|
|
436
|
-
return onChange(__assign(__assign({}, value), { relationship: relationship || 'Self' }), field.id);
|
|
437
|
-
} }) })), ((value === null || value === void 0 ? void 0 : value.relationship) || 'Self') !== 'Self' &&
|
|
438
|
-
_jsxs(_Fragment, { children: [_jsx(Grid, __assign({ item: true, xs: 12 }, { children: _jsx(Typography, __assign({ sx: { fontWeight: 'bold' } }, { children: "Policy Owner Details" })) })), _jsx(Grid, __assign({ item: true, xs: 6 }, { children: _jsx(TextField, { label: "First Name", size: "small", InputProps: defaultInputProps, fullWidth: true, value: ((_o = value === null || value === void 0 ? void 0 : value.relationshipDetails) === null || _o === void 0 ? void 0 : _o.fname) || '', required: !field.isOptional, onChange: function (e) {
|
|
439
|
-
return onChange(__assign(__assign({}, value), { relationshipDetails: __assign(__assign({}, value === null || value === void 0 ? void 0 : value.relationshipDetails), { fname: e.target.value }) }), field.id);
|
|
440
|
-
} }) })), _jsx(Grid, __assign({ item: true, xs: 6 }, { children: _jsx(TextField, { label: "Last Name", size: "small", InputProps: defaultInputProps, fullWidth: true, value: ((_p = value === null || value === void 0 ? void 0 : value.relationshipDetails) === null || _p === void 0 ? void 0 : _p.lname) || '', required: !field.isOptional, onChange: function (e) {
|
|
441
|
-
return onChange(__assign(__assign({}, value), { relationshipDetails: __assign(__assign({}, value === null || value === void 0 ? void 0 : value.relationshipDetails), { lname: e.target.value }) }), field.id);
|
|
442
|
-
} }) })), _jsx(Grid, __assign({ item: true, xs: 6 }, { children: _jsx(StringSelector, { options: TELLESCOPE_GENDERS, size: "small", label: "Gender", value: ((_q = value === null || value === void 0 ? void 0 : value.relationshipDetails) === null || _q === void 0 ? void 0 : _q.gender) || '', required: !field.isOptional, onChange: function (v) {
|
|
443
|
-
return onChange(__assign(__assign({}, value), { relationshipDetails: __assign(__assign({}, value === null || value === void 0 ? void 0 : value.relationshipDetails), { gender: v }) }), field.id);
|
|
444
|
-
} }) })), _jsx(Grid, __assign({ item: true, xs: 6 }, { children: _jsx(DateStringInput, { size: "small", label: "Date of Birth", field: __assign(__assign({}, field), { isOptional: field.isOptional || ((_r = field.options) === null || _r === void 0 ? void 0 : _r.billingProvider) === 'Candid' }), value: ((_s = value === null || value === void 0 ? void 0 : value.relationshipDetails) === null || _s === void 0 ? void 0 : _s.dateOfBirth) || '', onChange: function (dateOfBirth) {
|
|
445
|
-
return onChange(__assign(__assign({}, value), { relationshipDetails: __assign(__assign({}, value === null || value === void 0 ? void 0 : value.relationshipDetails), { dateOfBirth: dateOfBirth }) }), field.id);
|
|
446
|
-
} }) }))] })] })));
|
|
331
|
+
// InsuranceInput, BridgeEligibilityInput, and AppointmentBookingInput logic is shared with inputs.tsx to avoid duplication
|
|
332
|
+
import { InsuranceInput as SharedInsuranceInput, BridgeEligibilityInput as SharedBridgeEligibilityInput, AppointmentBookingInput as SharedAppointmentBookingInput } from './inputs';
|
|
333
|
+
// Wrap the shared InsuranceInput component with v2-specific props
|
|
334
|
+
export var InsuranceInput = function (props) {
|
|
335
|
+
return _jsx(SharedInsuranceInput, __assign({}, props, { inputProps: defaultInputProps }));
|
|
336
|
+
};
|
|
337
|
+
// Wrap the shared BridgeEligibilityInput component with v2-specific props
|
|
338
|
+
export var BridgeEligibilityInput = function (props) {
|
|
339
|
+
return _jsx(SharedBridgeEligibilityInput, __assign({}, props, { inputProps: defaultInputProps }));
|
|
447
340
|
};
|
|
448
341
|
var StringSelector = function (_a) {
|
|
449
342
|
var options = _a.options, value = _a.value, onChange = _a.onChange, required = _a.required, getDisplayValue = _a.getDisplayValue, props = __rest(_a, ["options", "value", "onChange", "required", "getDisplayValue"]);
|
|
@@ -757,7 +650,7 @@ export var MultipleChoiceInput = function (_a) {
|
|
|
757
650
|
display: 'flex',
|
|
758
651
|
alignItems: 'center',
|
|
759
652
|
width: '100%',
|
|
760
|
-
border: isSelected ? '
|
|
653
|
+
border: isSelected ? '3px solid' : '1px solid',
|
|
761
654
|
borderColor: 'primary.main',
|
|
762
655
|
borderRadius: 1,
|
|
763
656
|
padding: '16px 16px',
|
|
@@ -1278,176 +1171,9 @@ export var RelatedContactsInput = function (_a) {
|
|
|
1278
1171
|
}
|
|
1279
1172
|
return (_jsxs(Grid, __assign({ container: true, direction: "column", spacing: 1 }, { children: [_jsx(Grid, __assign({ item: true }, { children: value.map(function (contact, i) { return (_jsx(Grid, __assign({ item: true }, { children: _jsxs(Grid, __assign({ container: true, alignItems: "center", justifyContent: "space-between", wrap: "nowrap", spacing: 1 }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsxs(Grid, __assign({ container: true, alignItems: "center" }, { children: [_jsx(IconButton, __assign({ onClick: function () { return setEditing(i); }, color: "primary", size: "small" }, { children: _jsx(Edit, {}) })), _jsx(Typography, __assign({ noWrap: true }, { children: user_display_name(contact) || "Unnamed Contact ".concat(i + 1) }))] })) })), _jsx(Grid, __assign({ item: true }, { children: _jsx(LabeledIconButton, { Icon: Delete, label: "Remove", onClick: function () { return onChange(value.filter(function (v, _i) { return i !== _i; }), field.id); } }) }))] })) }), i)); }) })), _jsx(Grid, __assign({ item: true }, { children: _jsx(Button, __assign({ variant: "contained", onClick: handleAddContact }, { children: "Add Contact" })) }))] })));
|
|
1280
1173
|
};
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
var session = useResolvedSession();
|
|
1285
|
-
var _m = useState(), loaded = _m[0], setLoaded = _m[1];
|
|
1286
|
-
var _o = useState(''), error = _o[0], setError = _o[1];
|
|
1287
|
-
var _p = useState(false), acknowledgedWarning = _p[0], setAcknowledgedWarning = _p[1];
|
|
1288
|
-
var _q = useState(450), height = _q[0], setHeight = _q[1];
|
|
1289
|
-
var _r = useState(false), confirming = _r[0], setConfirming = _r[1];
|
|
1290
|
-
var bookingPageId = (_b = field === null || field === void 0 ? void 0 : field.options) === null || _b === void 0 ? void 0 : _b.bookingPageId;
|
|
1291
|
-
var downloadICS = useCallback(function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1292
|
-
var _a, err_1;
|
|
1293
|
-
return __generator(this, function (_b) {
|
|
1294
|
-
switch (_b.label) {
|
|
1295
|
-
case 0:
|
|
1296
|
-
_b.trys.push([0, 2, , 3]);
|
|
1297
|
-
_a = downloadFile;
|
|
1298
|
-
return [4 /*yield*/, session.api.calendar_events.download_ics_file({ calendarEventId: event.id, excludeAttendee: true })];
|
|
1299
|
-
case 1:
|
|
1300
|
-
_a.apply(void 0, [_b.sent(),
|
|
1301
|
-
{ name: "event.ics", dataIsURL: true, type: 'text/calendar' }]);
|
|
1302
|
-
return [3 /*break*/, 3];
|
|
1303
|
-
case 2:
|
|
1304
|
-
err_1 = _b.sent();
|
|
1305
|
-
console.error(err_1);
|
|
1306
|
-
return [3 /*break*/, 3];
|
|
1307
|
-
case 3: return [2 /*return*/];
|
|
1308
|
-
}
|
|
1309
|
-
});
|
|
1310
|
-
}); }, [session]);
|
|
1311
|
-
var addressQuestion = useMemo(function () { return responses === null || responses === void 0 ? void 0 : responses.find(function (r) {
|
|
1312
|
-
var _a;
|
|
1313
|
-
if (r.answer.type !== 'Address')
|
|
1314
|
-
return false;
|
|
1315
|
-
if (r.field.intakeField !== 'Address')
|
|
1316
|
-
return false;
|
|
1317
|
-
// make sure state is actually defined (in case of multiple address questions, where 1+ are blank)
|
|
1318
|
-
if (!((_a = r.answer.value) === null || _a === void 0 ? void 0 : _a.state))
|
|
1319
|
-
return false;
|
|
1320
|
-
return true;
|
|
1321
|
-
}); }, [responses]);
|
|
1322
|
-
var state = useMemo(function () {
|
|
1323
|
-
var _a, _b, _d;
|
|
1324
|
-
return (((_a = addressQuestion === null || addressQuestion === void 0 ? void 0 : addressQuestion.answer) === null || _a === void 0 ? void 0 : _a.type) === 'Address' ? (_d = (_b = addressQuestion === null || addressQuestion === void 0 ? void 0 : addressQuestion.answer) === null || _b === void 0 ? void 0 : _b.value) === null || _d === void 0 ? void 0 : _d.state : undefined);
|
|
1325
|
-
}, [addressQuestion]);
|
|
1326
|
-
var loadBookingInfo = useCallback(function () {
|
|
1327
|
-
if (!bookingPageId)
|
|
1328
|
-
return;
|
|
1329
|
-
setError('');
|
|
1330
|
-
session.api.form_fields.booking_info({
|
|
1331
|
-
enduserId: enduserId,
|
|
1332
|
-
bookingPageId: bookingPageId,
|
|
1333
|
-
enduserFields: { state: state }
|
|
1334
|
-
})
|
|
1335
|
-
.then(setLoaded)
|
|
1336
|
-
.catch(function (e) { return setError((e === null || e === void 0 ? void 0 : e.message) || (e === null || e === void 0 ? void 0 : e.toString()) || 'Error loading appointment details'); });
|
|
1337
|
-
}, [enduserId, bookingPageId, session, state]);
|
|
1338
|
-
var fetchRef = useRef(false);
|
|
1339
|
-
useEffect(function () {
|
|
1340
|
-
if (value)
|
|
1341
|
-
return;
|
|
1342
|
-
if (!bookingPageId)
|
|
1343
|
-
return;
|
|
1344
|
-
if (fetchRef.current)
|
|
1345
|
-
return;
|
|
1346
|
-
fetchRef.current = true;
|
|
1347
|
-
loadBookingInfo();
|
|
1348
|
-
}, [bookingPageId, loadBookingInfo, value]);
|
|
1349
|
-
useEffect(function () {
|
|
1350
|
-
var handleMessage = function (m) {
|
|
1351
|
-
var _a, _b, _d, _e, _f, _g, _h, _j, _k;
|
|
1352
|
-
// entropy to separate from other booking pages rendered on the same screen
|
|
1353
|
-
if (((_a = m === null || m === void 0 ? void 0 : m.data) === null || _a === void 0 ? void 0 : _a.type) === 'Booking Success'
|
|
1354
|
-
&& typeof ((_b = m === null || m === void 0 ? void 0 : m.data) === null || _b === void 0 ? void 0 : _b.bookedEventId) === 'string'
|
|
1355
|
-
&& (!((_d = m === null || m === void 0 ? void 0 : m.data) === null || _d === void 0 ? void 0 : _d.entropy) || ((_e = m === null || m === void 0 ? void 0 : m.data) === null || _e === void 0 ? void 0 : _e.entropy) === (loaded === null || loaded === void 0 ? void 0 : loaded.entropy))) {
|
|
1356
|
-
onChange(m.data.bookedEventId, field.id);
|
|
1357
|
-
emit_gtm_event({ event: 'form_progress', fieldId: field.id, formId: field.formId, title: field.title, status: "Appointment Booked" });
|
|
1358
|
-
}
|
|
1359
|
-
if (((_f = m === null || m === void 0 ? void 0 : m.data) === null || _f === void 0 ? void 0 : _f.type) === 'CalendarPicker') {
|
|
1360
|
-
setHeight(750);
|
|
1361
|
-
}
|
|
1362
|
-
if (((_g = m === null || m === void 0 ? void 0 : m.data) === null || _g === void 0 ? void 0 : _g.type) === 'UsersPicker') {
|
|
1363
|
-
setHeight(450);
|
|
1364
|
-
}
|
|
1365
|
-
if (((_h = m === null || m === void 0 ? void 0 : m.data) === null || _h === void 0 ? void 0 : _h.type) === 'Confirmation') {
|
|
1366
|
-
setConfirming(true);
|
|
1367
|
-
}
|
|
1368
|
-
if (((_j = m === null || m === void 0 ? void 0 : m.data) === null || _j === void 0 ? void 0 : _j.type) === 'Join Link' && ((_k = m === null || m === void 0 ? void 0 : m.data) === null || _k === void 0 ? void 0 : _k.link)) {
|
|
1369
|
-
update_local_storage('tellescope_last_booking_page_join_link', m.data.link);
|
|
1370
|
-
}
|
|
1371
|
-
else {
|
|
1372
|
-
setConfirming(false);
|
|
1373
|
-
}
|
|
1374
|
-
};
|
|
1375
|
-
window.addEventListener('message', handleMessage);
|
|
1376
|
-
return function () { window.removeEventListener('message', handleMessage); };
|
|
1377
|
-
}, [field === null || field === void 0 ? void 0 : field.id, field === null || field === void 0 ? void 0 : field.formId, field === null || field === void 0 ? void 0 : field.title, onChange, acknowledgedWarning, value, loaded === null || loaded === void 0 ? void 0 : loaded.entropy]);
|
|
1378
|
-
if (value) {
|
|
1379
|
-
return (_jsxs(Grid, __assign({ container: true, direction: "column", spacing: 1 }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsxs(Grid, __assign({ container: true, alignItems: "center", wrap: "nowrap" }, { children: [_jsx(CheckCircleOutline, { color: "success" }), _jsx(Typography, __assign({ sx: { ml: 1, fontSize: 20 } }, { children: "Your appointment has been booked" }))] })) })), _jsx(Grid, __assign({ item: true, sx: { maxWidth: 250 } }, { children: _jsx(LoadingButton, { variant: "contained", style: { maxWidth: 250 }, submitText: "Add to Calendar", submittingText: "Downloading...", onClick: function () { return downloadICS({ id: value }); } }) }))] })));
|
|
1380
|
-
}
|
|
1381
|
-
if (!bookingPageId) {
|
|
1382
|
-
return _jsx(Typography, { children: "No booking page specified" });
|
|
1383
|
-
}
|
|
1384
|
-
if (error) {
|
|
1385
|
-
return (_jsxs(Grid, __assign({ container: true, direction: "column", spacing: 1 }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsxs(Typography, __assign({ color: "error" }, { children: ["Error: ", error] })) })), _jsx(Grid, __assign({ item: true }, { children: _jsx(LoadingButton, { disabled: !bookingPageId, style: { maxWidth: 300 }, variant: "contained", onClick: loadBookingInfo, submitText: "Try Again", submittingText: "Loading..." }) }))] })));
|
|
1386
|
-
}
|
|
1387
|
-
if (!(loaded === null || loaded === void 0 ? void 0 : loaded.bookingURL)) {
|
|
1388
|
-
return _jsx(LinearProgress, {});
|
|
1389
|
-
}
|
|
1390
|
-
var bookingURL = loaded.bookingURL;
|
|
1391
|
-
if ((_e = (_d = field.options) === null || _d === void 0 ? void 0 : _d.userTags) === null || _e === void 0 ? void 0 : _e.length) {
|
|
1392
|
-
bookingURL += "&userTags=".concat(field.options.userTags
|
|
1393
|
-
.flatMap(function (t) {
|
|
1394
|
-
var _a, _b;
|
|
1395
|
-
// set dynamic tags if found
|
|
1396
|
-
if (t === '{{logic}}') {
|
|
1397
|
-
return new URL(window.location.href).searchParams.get('logic') || '{{logic}}';
|
|
1398
|
-
}
|
|
1399
|
-
if (t.startsWith("{{field.") && t.endsWith(".value}}")) {
|
|
1400
|
-
var fieldId_1 = t.replace('{{field.', '').replace(".value}}", '');
|
|
1401
|
-
var answer = (_a = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.fieldId === fieldId_1; })) === null || _a === void 0 ? void 0 : _a.answer;
|
|
1402
|
-
if (!(answer === null || answer === void 0 ? void 0 : answer.value))
|
|
1403
|
-
return t;
|
|
1404
|
-
if (answer.type === 'Insurance') {
|
|
1405
|
-
return answer.value.payerName || '';
|
|
1406
|
-
}
|
|
1407
|
-
if (Array.isArray(answer.value) && typeof ((_b = answer.value) === null || _b === void 0 ? void 0 : _b[0]) === 'string') {
|
|
1408
|
-
return answer.value;
|
|
1409
|
-
}
|
|
1410
|
-
return form_response_value_to_string(answer.value);
|
|
1411
|
-
}
|
|
1412
|
-
return t;
|
|
1413
|
-
})
|
|
1414
|
-
.join(','));
|
|
1415
|
-
}
|
|
1416
|
-
if ((_g = (_f = field.options) === null || _f === void 0 ? void 0 : _f.userFilterTags) === null || _g === void 0 ? void 0 : _g.length) {
|
|
1417
|
-
bookingURL += "&userFilterTags=".concat(field.options.userFilterTags
|
|
1418
|
-
.flatMap(function (t) {
|
|
1419
|
-
var _a, _b;
|
|
1420
|
-
// set dynamic tags if found
|
|
1421
|
-
if (t === '{{logic}}') {
|
|
1422
|
-
return new URL(window.location.href).searchParams.get('logic') || '{{logic}}';
|
|
1423
|
-
}
|
|
1424
|
-
if (t.startsWith("{{field.") && t.endsWith(".value}}")) {
|
|
1425
|
-
var fieldId_2 = t.replace('{{field.', '').replace(".value}}", '');
|
|
1426
|
-
var answer = (_a = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.fieldId === fieldId_2; })) === null || _a === void 0 ? void 0 : _a.answer;
|
|
1427
|
-
if (!(answer === null || answer === void 0 ? void 0 : answer.value))
|
|
1428
|
-
return t;
|
|
1429
|
-
if (answer.type === 'Insurance') {
|
|
1430
|
-
return answer.value.payerName || '';
|
|
1431
|
-
}
|
|
1432
|
-
if (Array.isArray(answer.value) && typeof ((_b = answer.value) === null || _b === void 0 ? void 0 : _b[0]) === 'string') {
|
|
1433
|
-
return answer.value;
|
|
1434
|
-
}
|
|
1435
|
-
return form_response_value_to_string(answer.value);
|
|
1436
|
-
}
|
|
1437
|
-
return t;
|
|
1438
|
-
})
|
|
1439
|
-
.join(','));
|
|
1440
|
-
}
|
|
1441
|
-
// need to use form?.id for internally-submitted forms because formResponseId isn't generated until initial submission or saved draft
|
|
1442
|
-
if (((_h = field.options) === null || _h === void 0 ? void 0 : _h.holdAppointmentMinutes) && (formResponseId || (field === null || field === void 0 ? void 0 : field.id))) {
|
|
1443
|
-
bookingURL += "&formResponseId=".concat(formResponseId || (field === null || field === void 0 ? void 0 : field.id));
|
|
1444
|
-
bookingURL += "&holdAppointmentMinutes=".concat(field.options.holdAppointmentMinutes);
|
|
1445
|
-
}
|
|
1446
|
-
return (_jsxs(Grid, __assign({ container: true, direction: "column", spacing: 1, sx: { mt: 1 } }, { children: [!!((_k = (_j = field.options) === null || _j === void 0 ? void 0 : _j.userFilterTags) === null || _k === void 0 ? void 0 : _k.length) && !((_l = field.options.userTags) === null || _l === void 0 ? void 0 : _l.length) && !(isPreviousDisabled === null || isPreviousDisabled === void 0 ? void 0 : isPreviousDisabled()) && !confirming &&
|
|
1447
|
-
_jsx(Grid, __assign({ item: true, alignSelf: "flex-start" }, { children: _jsx(Button, __assign({ variant: "outlined", onClick: goToPreviousField, sx: { height: 25, p: 0.5, px: 1 } }, { children: "Back" })) })), loaded.warningMessage &&
|
|
1448
|
-
_jsx(Grid, __assign({ item: true }, { children: _jsx(Typography, __assign({ color: "error", sx: { fontSize: 20, fontWeight: 'bold' } }, { children: loaded.warningMessage })) })), _jsx(Grid, __assign({ item: true }, { children: (!loaded.warningMessage || acknowledgedWarning)
|
|
1449
|
-
? (_jsx("iframe", { title: "Appointment Booking Embed", src: bookingURL, style: { border: 'none', width: '100%', height: height } }))
|
|
1450
|
-
: (_jsx(Button, __assign({ variant: "outlined", onClick: function () { return setAcknowledgedWarning(true); } }, { children: "Show Booking Page Preview" }))) }))] })));
|
|
1174
|
+
// AppointmentBookingInput logic is shared with inputs.tsx to avoid duplication
|
|
1175
|
+
export var AppointmentBookingInput = function (props) {
|
|
1176
|
+
return _jsx(SharedAppointmentBookingInput, __assign({}, props));
|
|
1451
1177
|
};
|
|
1452
1178
|
export var HeightInput = function (_a) {
|
|
1453
1179
|
var _b;
|