@tellescope/react-components 1.230.0 → 1.230.2

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.
Files changed (50) hide show
  1. package/lib/cjs/Forms/forms.d.ts.map +1 -1
  2. package/lib/cjs/Forms/forms.js +29 -27
  3. package/lib/cjs/Forms/forms.js.map +1 -1
  4. package/lib/cjs/Forms/forms.v2.d.ts.map +1 -1
  5. package/lib/cjs/Forms/forms.v2.js +32 -28
  6. package/lib/cjs/Forms/forms.v2.js.map +1 -1
  7. package/lib/cjs/Forms/hooks.d.ts.map +1 -1
  8. package/lib/cjs/Forms/hooks.js +30 -4
  9. package/lib/cjs/Forms/hooks.js.map +1 -1
  10. package/lib/cjs/Forms/index.d.ts +1 -0
  11. package/lib/cjs/Forms/index.d.ts.map +1 -1
  12. package/lib/cjs/Forms/index.js +3 -1
  13. package/lib/cjs/Forms/index.js.map +1 -1
  14. package/lib/cjs/Forms/inputs.d.ts +1 -0
  15. package/lib/cjs/Forms/inputs.d.ts.map +1 -1
  16. package/lib/cjs/Forms/inputs.js +30 -3
  17. package/lib/cjs/Forms/inputs.js.map +1 -1
  18. package/lib/cjs/Forms/inputs.v2.d.ts +1 -0
  19. package/lib/cjs/Forms/inputs.v2.d.ts.map +1 -1
  20. package/lib/cjs/Forms/inputs.v2.js +33 -4
  21. package/lib/cjs/Forms/inputs.v2.js.map +1 -1
  22. package/lib/esm/Forms/forms.d.ts.map +1 -1
  23. package/lib/esm/Forms/forms.js +30 -28
  24. package/lib/esm/Forms/forms.js.map +1 -1
  25. package/lib/esm/Forms/forms.v2.d.ts.map +1 -1
  26. package/lib/esm/Forms/forms.v2.js +33 -29
  27. package/lib/esm/Forms/forms.v2.js.map +1 -1
  28. package/lib/esm/Forms/hooks.d.ts.map +1 -1
  29. package/lib/esm/Forms/hooks.js +31 -5
  30. package/lib/esm/Forms/hooks.js.map +1 -1
  31. package/lib/esm/Forms/index.d.ts +1 -0
  32. package/lib/esm/Forms/index.d.ts.map +1 -1
  33. package/lib/esm/Forms/index.js +1 -0
  34. package/lib/esm/Forms/index.js.map +1 -1
  35. package/lib/esm/Forms/inputs.d.ts +1 -0
  36. package/lib/esm/Forms/inputs.d.ts.map +1 -1
  37. package/lib/esm/Forms/inputs.js +29 -3
  38. package/lib/esm/Forms/inputs.js.map +1 -1
  39. package/lib/esm/Forms/inputs.v2.d.ts +1 -0
  40. package/lib/esm/Forms/inputs.v2.d.ts.map +1 -1
  41. package/lib/esm/Forms/inputs.v2.js +32 -4
  42. package/lib/esm/Forms/inputs.v2.js.map +1 -1
  43. package/lib/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +9 -9
  45. package/src/Forms/forms.tsx +5 -1
  46. package/src/Forms/forms.v2.tsx +23 -3
  47. package/src/Forms/hooks.tsx +55 -8
  48. package/src/Forms/index.ts +2 -1
  49. package/src/Forms/inputs.tsx +160 -2
  50. package/src/Forms/inputs.v2.tsx +171 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AACzG,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -6,4 +6,5 @@ export * from "./types";
6
6
  export * from "./localization";
7
7
  // V2 Forms exports
8
8
  export { TellescopeFormV2, TellescopeFormContainerV2, TellescopeSingleQuestionFlowV2 } from "./forms.v2";
9
+ export { defaultInputProps as inputPropsV2 } from "./inputs.v2";
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAE/B,mBAAmB;AACnB,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Forms/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAE/B,mBAAmB;AACnB,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AACzG,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -63,6 +63,7 @@ export declare const DatabaseSelectInput: ({ AddToDatabase, field, value: _value
63
63
  }) => JSX.Element;
64
64
  export declare const CanvasMedicationsInput: ({ field, value, onChange }: FormInputProps<'Medications'>) => JSX.Element;
65
65
  export declare const MedicationsInput: ({ field, value, onChange, ...props }: FormInputProps<'Medications'>) => JSX.Element;
66
+ export declare const BelugaPatientPreferenceInput: ({ field, value: _value, onChange }: FormInputProps<'Beluga Patient Preference'>) => JSX.Element;
66
67
  export declare const contact_is_valid: (e: Partial<Enduser>) => "Email is invalid" | "Phone is invalid" | "Date of birth should be MM-DD-YYYY" | undefined;
67
68
  export declare const RelatedContactsInput: ({ field, value: _value, onChange, ...props }: FormInputProps<'Related Contacts'>) => JSX.Element;
68
69
  export declare const AppointmentBookingInput: ({ formResponseId, field, value, onChange, form, responses, goToPreviousField, isPreviousDisabled, enduserId, ...props }: FormInputProps<'Appointment Booking'>) => 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,EAA8L,OAAO,EAAa,cAAc,EAAc,MAAM,eAAe,CAAA;AAC1Q,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAIxC,OAAO,EAAmC,OAAO,EAAuB,iBAAiB,EAA6H,MAAM,0BAA0B,CAAA;AAOtP,OAAO,EAAc,QAAQ,EAAgD,MAAM,EAAiF,MAAM,IAAI,CAAA;AAC9K,OAAO,EAAiB,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAanF,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,gBA0B/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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,EAAE;;iBAuL/B,CAAA;AAgID,eAAO,MAAM,sBAAsB,+BAAmC,eAAe,aAAa,CAAC,gBAyGlG,CAAA;AAED,eAAO,MAAM,gBAAgB,yCAA0C,eAAe,aAAa,CAAC,gBAySnG,CAAA;AAED,eAAO,MAAM,4BAA4B,uCAAwC,eAAe,2BAA2B,CAAC,gBA4J3H,CAAA;AAED,eAAO,MAAM,gBAAgB,MAAO,QAAQ,OAAO,CAAC,+FAkBnD,CAAA;AAED,eAAO,MAAM,oBAAoB,iDAAkD,eAAe,kBAAkB,CAAC,gBAiLpH,CAAA;AAED,eAAO,MAAM,uBAAuB,4HAA6H,eAAe,qBAAqB,CAAC,gBAyOrM,CAAA;AAED,eAAO,MAAM,WAAW,yCAAoD,eAAe,QAAQ,CAAC,gBAenG,CAAA;AAED,eAAO,MAAM,2CAA2C,QAAS,MAAM,WAetE,CAAA;AAED,eAAO,MAAM,aAAa,uIAAkJ,eAAe,UAAU,CAAC,uBAkGrM,CAAA;AAED,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"}
@@ -75,7 +75,7 @@ import axios from "axios";
75
75
  import { Autocomplete, Box, Button, Checkbox, Chip, Collapse, Divider, FormControl, FormControlLabel, FormLabel, Grid, IconButton as MuiIconButton, InputLabel, MenuItem, Radio, RadioGroup, Select, TextField, Typography } from "@mui/material";
76
76
  import { useDropzone } from "react-dropzone";
77
77
  import { CANVAS_TITLE, EMOTII_TITLE, INSURANCE_RELATIONSHIPS, INSURANCE_RELATIONSHIPS_CANVAS, PRIMARY_HEX, RELATIONSHIP_TYPES, TELLESCOPE_GENDERS } from "@tellescope/constants";
78
- import { MM_DD_YYYY_to_YYYY_MM_DD, capture_is_supported, downloadFile, emit_gtm_event, first_letter_capitalized, form_response_value_to_string, getLocalTimezone, getPublicFileURL, mm_dd_yyyy, replace_enduser_template_values, truncate_string, update_local_storage, user_display_name } from "@tellescope/utilities";
78
+ import { MM_DD_YYYY_to_YYYY_MM_DD, capture_is_supported, downloadFile, emit_gtm_event, first_letter_capitalized, form_response_value_to_string, format_stripe_subscription_interval, getLocalTimezone, getPublicFileURL, mm_dd_yyyy, replace_enduser_template_values, truncate_string, update_local_storage, 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';
@@ -933,12 +933,12 @@ export var StripeInput = function (_a) {
933
933
  });
934
934
  };
935
935
  return (_jsxs(Grid, __assign({ container: true, direction: "column", spacing: 2 }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsxs(Typography, __assign({ variant: "h6" }, { children: ["Select Product", isSingleSelection_1 ? '' : 's'] })) })), availableProducts.map(function (product) {
936
- var _a;
936
+ var _a, _b, _d;
937
937
  // Use real-time Stripe pricing if available, fallback to Tellescope pricing
938
938
  var price = product.currentPrice || product.cost;
939
939
  var priceAmount = (price === null || price === void 0 ? void 0 : price.amount) || 0;
940
940
  var priceCurrency = (price === null || price === void 0 ? void 0 : price.currency) || 'USD';
941
- return (_jsx(Grid, __assign({ item: true }, { children: _jsx(FormControlLabel, { control: isSingleSelection_1 ? (_jsx(Radio, { checked: selectedProducts.includes(product._id), onChange: function () { return handleProductSelection_1(product._id); } })) : (_jsx(Checkbox, { checked: selectedProducts.includes(product._id), onChange: function () { return handleProductSelection_1(product._id); } })), label: _jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "bold" }, { children: product.title })), product.description && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: product.description }))), _jsxs(Typography, __assign({ variant: "body2", color: "primary" }, { children: ["$", (priceAmount / 100).toFixed(2), " ", priceCurrency.toUpperCase(), ((_a = product.currentPrice) === null || _a === void 0 ? void 0 : _a.isSubscription) && (_jsx(Typography, __assign({ component: "span", variant: "caption", sx: { ml: 0.5 } }, { children: "/month" })))] }))] }) }) }), product._id));
941
+ return (_jsx(Grid, __assign({ item: true }, { children: _jsx(FormControlLabel, { control: isSingleSelection_1 ? (_jsx(Radio, { checked: selectedProducts.includes(product._id), onChange: function () { return handleProductSelection_1(product._id); } })) : (_jsx(Checkbox, { checked: selectedProducts.includes(product._id), onChange: function () { return handleProductSelection_1(product._id); } })), label: _jsxs(Box, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: "bold" }, { children: product.title })), product.description && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: product.description }))), _jsxs(Typography, __assign({ variant: "body2", color: "primary" }, { children: ["$", (priceAmount / 100).toFixed(2), " ", priceCurrency.toUpperCase(), ((_a = product.currentPrice) === null || _a === void 0 ? void 0 : _a.isSubscription) && (_jsx(Typography, __assign({ component: "span", variant: "caption", sx: { ml: 0.5 } }, { children: format_stripe_subscription_interval((_b = product.currentPrice) === null || _b === void 0 ? void 0 : _b.interval, (_d = product.currentPrice) === null || _d === void 0 ? void 0 : _d.interval_count) })))] }))] }) }) }), product._id));
942
942
  }), _jsx(Grid, __assign({ item: true }, { children: _jsx(Button, __assign({ variant: "contained", onClick: handleContinueToPayment, disabled: selectedProducts.length === 0, sx: { mt: 2 } }, { children: "Continue to Payment" })) }))] })));
943
943
  }
944
944
  if (error) {
@@ -1603,6 +1603,32 @@ export var MedicationsInput = function (_a) {
1603
1603
  _jsxs(Grid, __assign({ item: true, sx: { mt: 3 } }, { children: [_jsx("strong", { children: "DEBUG:" }), " ", _jsx("br", {}), _jsx("pre", __assign({ style: { wordWrap: 'break-word' } }, { children: JSON.stringify(value !== null && value !== void 0 ? value : {}, null, 2) }))] })), _jsx(Grid, __assign({ item: true }, { children: _jsx(Grid, { container: true }) }))] })) })) })) }), i), _jsx(Grid, __assign({ item: true }, { children: _jsx(Divider, { flexItem: true, sx: { my: 1 } }) }))] }));
1604
1604
  }), _jsx(Grid, __assign({ item: true }, { children: _jsx(Button, __assign({ color: "primary", variant: "outlined", onClick: function () { return onChange(__spreadArray(__spreadArray([], (value !== null && value !== void 0 ? value : []), true), [{ displayTerm: '', drugName: '' }], false), field.id); } }, { children: "Add Medication" })) }))] })));
1605
1605
  };
1606
+ export var BelugaPatientPreferenceInput = function (_a) {
1607
+ var field = _a.field, _value = _a.value, onChange = _a.onChange;
1608
+ var value = Array.isArray(_value) ? _value : [];
1609
+ return (_jsxs(Grid, __assign({ container: true, direction: "column", sx: { mt: 2 } }, { children: [value.map(function (v, i) {
1610
+ var _a, _b, _d, _e, _f, _g, _h, _j;
1611
+ return (_jsxs(_Fragment, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsx(Grid, __assign({ container: true, alignItems: "center", wrap: "nowrap" }, { children: _jsx(Grid, __assign({ item: true, sx: { width: '100%' } }, { children: _jsxs(Grid, __assign({ container: true, direction: "column", spacing: 1.5 }, { children: [_jsx(Grid, __assign({ item: true }, { children: _jsx(TextField, { label: "Medication Name", size: "small", fullWidth: true, required: true, value: (_a = v.name) !== null && _a !== void 0 ? _a : '', onChange: function (e) {
1612
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { name: e.target.value }) : _v); }), field.id);
1613
+ } }) })), _jsx(Grid, __assign({ item: true }, { children: _jsxs(Grid, __assign({ container: true, spacing: 1 }, { children: [_jsx(Grid, __assign({ item: true, xs: 12, md: 6 }, { children: _jsx(TextField, { label: "Strength", size: "small", fullWidth: true, required: true, value: (_b = v.strength) !== null && _b !== void 0 ? _b : '', onChange: function (e) {
1614
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { strength: e.target.value }) : _v); }), field.id);
1615
+ } }) })), _jsx(Grid, __assign({ item: true, xs: 12, md: 6 }, { children: _jsx(TextField, { label: "Dispense Unit", size: "small", fullWidth: true, required: true, value: (_d = v.dispenseUnit) !== null && _d !== void 0 ? _d : '', onChange: function (e) {
1616
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { dispenseUnit: e.target.value }) : _v); }), field.id);
1617
+ } }) }))] })) })), _jsx(Grid, __assign({ item: true }, { children: _jsxs(Grid, __assign({ container: true, spacing: 1 }, { children: [_jsx(Grid, __assign({ item: true, xs: 12, md: 4 }, { children: _jsx(TextField, { label: "Quantity", size: "small", fullWidth: true, required: true, value: (_e = v.quantity) !== null && _e !== void 0 ? _e : '', onChange: function (e) {
1618
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { quantity: e.target.value }) : _v); }), field.id);
1619
+ } }) })), _jsx(Grid, __assign({ item: true, xs: 12, md: 4 }, { children: _jsx(TextField, { label: "Refills", size: "small", fullWidth: true, required: true, value: (_f = v.refills) !== null && _f !== void 0 ? _f : '', onChange: function (e) {
1620
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { refills: e.target.value }) : _v); }), field.id);
1621
+ } }) })), _jsx(Grid, __assign({ item: true, xs: 12, md: 4 }, { children: _jsx(TextField, { label: "Days Supply", size: "small", fullWidth: true, required: true, value: (_g = v.daysSupply) !== null && _g !== void 0 ? _g : '', onChange: function (e) {
1622
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { daysSupply: e.target.value }) : _v); }), field.id);
1623
+ } }) }))] })) })), _jsx(Grid, __assign({ item: true }, { children: _jsx(TextField, { label: "Sig (Instructions)", size: "small", fullWidth: true, required: true, multiline: true, rows: 2, value: (_h = v.sig) !== null && _h !== void 0 ? _h : '', onChange: function (e) {
1624
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { sig: e.target.value }) : _v); }), field.id);
1625
+ } }) })), _jsx(Grid, __assign({ item: true }, { children: _jsx(TextField, { label: "Med ID (NDC11)", size: "small", fullWidth: true, required: true, value: (_j = v.medId) !== null && _j !== void 0 ? _j : '', onChange: function (e) {
1626
+ return onChange(value.map(function (_v, _i) { return (i === _i ? __assign(__assign({}, _v), { medId: e.target.value }) : _v); }), field.id);
1627
+ } }) })), _jsx(Grid, __assign({ item: true }, { children: _jsx(Typography, __assign({ color: "primary", sx: { textDecoration: 'underline', cursor: 'pointer' }, onClick: function () { return onChange(value.filter(function (_, _i) { return i !== _i; }), field.id); } }, { children: "Remove medication" })) }))] })) })) })) }), i), _jsx(Grid, __assign({ item: true }, { children: _jsx(Divider, { flexItem: true, sx: { my: 1 } }) }))] }));
1628
+ }), _jsx(Grid, __assign({ item: true }, { children: _jsx(Button, __assign({ color: "primary", variant: "outlined", onClick: function () { return onChange(__spreadArray(__spreadArray([], value, true), [
1629
+ { name: '', strength: '', quantity: '', refills: '', daysSupply: '', sig: '', dispenseUnit: '', medId: '' }
1630
+ ], false), field.id); } }, { children: "Add Medication" })) }))] })));
1631
+ };
1606
1632
  export var contact_is_valid = function (e) {
1607
1633
  if (e.email) {
1608
1634
  try {