@tellescope/react-components 1.153.1 → 1.155.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.
Files changed (61) hide show
  1. package/lib/cjs/CMS/components.d.ts +0 -1
  2. package/lib/cjs/CMS/components.d.ts.map +1 -1
  3. package/lib/cjs/Forms/form_responses.d.ts +0 -1
  4. package/lib/cjs/Forms/form_responses.d.ts.map +1 -1
  5. package/lib/cjs/Forms/forms.d.ts +6 -0
  6. package/lib/cjs/Forms/forms.d.ts.map +1 -1
  7. package/lib/cjs/Forms/forms.js +6 -5
  8. package/lib/cjs/Forms/forms.js.map +1 -1
  9. package/lib/cjs/Forms/hooks.d.ts +0 -1
  10. package/lib/cjs/Forms/hooks.d.ts.map +1 -1
  11. package/lib/cjs/Forms/hooks.js +3 -0
  12. package/lib/cjs/Forms/hooks.js.map +1 -1
  13. package/lib/cjs/Forms/inputs.d.ts +1 -1
  14. package/lib/cjs/Forms/inputs.d.ts.map +1 -1
  15. package/lib/cjs/Forms/inputs.js +103 -38
  16. package/lib/cjs/Forms/inputs.js.map +1 -1
  17. package/lib/cjs/controls.d.ts +2 -2
  18. package/lib/cjs/inputs.native.d.ts +0 -1
  19. package/lib/cjs/inputs.native.d.ts.map +1 -1
  20. package/lib/cjs/inputs_shared.d.ts +4 -1
  21. package/lib/cjs/inputs_shared.d.ts.map +1 -1
  22. package/lib/cjs/inputs_shared.js +7 -1
  23. package/lib/cjs/inputs_shared.js.map +1 -1
  24. package/lib/cjs/state.d.ts +36 -0
  25. package/lib/cjs/state.d.ts.map +1 -1
  26. package/lib/cjs/state.js +19 -3
  27. package/lib/cjs/state.js.map +1 -1
  28. package/lib/esm/CMS/components.d.ts +0 -1
  29. package/lib/esm/CMS/components.d.ts.map +1 -1
  30. package/lib/esm/Forms/form_responses.d.ts +0 -1
  31. package/lib/esm/Forms/form_responses.d.ts.map +1 -1
  32. package/lib/esm/Forms/forms.d.ts +6 -0
  33. package/lib/esm/Forms/forms.d.ts.map +1 -1
  34. package/lib/esm/Forms/forms.js +2 -2
  35. package/lib/esm/Forms/forms.js.map +1 -1
  36. package/lib/esm/Forms/hooks.d.ts +0 -1
  37. package/lib/esm/Forms/hooks.d.ts.map +1 -1
  38. package/lib/esm/Forms/hooks.js +3 -0
  39. package/lib/esm/Forms/hooks.js.map +1 -1
  40. package/lib/esm/Forms/inputs.d.ts +1 -1
  41. package/lib/esm/Forms/inputs.d.ts.map +1 -1
  42. package/lib/esm/Forms/inputs.js +104 -39
  43. package/lib/esm/Forms/inputs.js.map +1 -1
  44. package/lib/esm/controls.d.ts +2 -2
  45. package/lib/esm/inputs.native.d.ts +0 -1
  46. package/lib/esm/inputs.native.d.ts.map +1 -1
  47. package/lib/esm/inputs_shared.d.ts +4 -1
  48. package/lib/esm/inputs_shared.d.ts.map +1 -1
  49. package/lib/esm/inputs_shared.js +6 -1
  50. package/lib/esm/inputs_shared.js.map +1 -1
  51. package/lib/esm/state.d.ts +36 -0
  52. package/lib/esm/state.d.ts.map +1 -1
  53. package/lib/esm/state.js +15 -0
  54. package/lib/esm/state.js.map +1 -1
  55. package/lib/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +9 -9
  57. package/src/Forms/forms.tsx +2 -2
  58. package/src/Forms/hooks.tsx +3 -0
  59. package/src/Forms/inputs.tsx +127 -32
  60. package/src/inputs_shared.tsx +13 -2
  61. package/src/state.tsx +21 -0
@@ -675,6 +675,7 @@ var StripeInput = function (_a) {
675
675
  var _g = (0, react_1.useState)(false), isCheckout = _g[0], setIsCheckout = _g[1];
676
676
  var _h = (0, react_1.useState)(), stripePromise = _h[0], setStripePromise = _h[1];
677
677
  var _j = (0, __1.useProducts)({ dontFetch: true }), findProduct = _j[1].findById;
678
+ var _k = (0, react_1.useState)(''), answertext = _k[0], setAnswertext = _k[1];
678
679
  var fetchRef = (0, react_1.useRef)(false);
679
680
  (0, react_1.useEffect)(function () {
680
681
  var _a;
@@ -686,12 +687,13 @@ var StripeInput = function (_a) {
686
687
  fetchRef.current = true;
687
688
  session.api.form_responses.stripe_details({ fieldId: field.id })
688
689
  .then(function (_a) {
689
- var clientSecret = _a.clientSecret, publishableKey = _a.publishableKey, stripeAccount = _a.stripeAccount, businessName = _a.businessName, customerId = _a.customerId, isCheckout = _a.isCheckout;
690
+ var clientSecret = _a.clientSecret, publishableKey = _a.publishableKey, stripeAccount = _a.stripeAccount, businessName = _a.businessName, customerId = _a.customerId, isCheckout = _a.isCheckout, answerText = _a.answerText;
690
691
  setIsCheckout(!!isCheckout);
691
692
  setClientSecret(clientSecret);
692
693
  setStripePromise((0, stripe_js_1.loadStripe)(publishableKey, { stripeAccount: stripeAccount }));
693
694
  setBusinessName(businessName);
694
695
  setCustomerId(customerId);
696
+ setAnswertext(answerText || '');
695
697
  })
696
698
  .catch(console.error);
697
699
  }, [session, value, field.id]);
@@ -705,11 +707,11 @@ var StripeInput = function (_a) {
705
707
  if (isCheckout && stripePromise)
706
708
  return ((0, jsx_runtime_1.jsx)(react_stripe_js_1.EmbeddedCheckoutProvider, __assign({ stripe: stripePromise, options: {
707
709
  clientSecret: clientSecret,
708
- onComplete: function () { return onChange('Completed checkout', field.id); },
710
+ onComplete: function () { return onChange(answertext || 'Completed checkout', field.id); },
709
711
  } }, { children: (0, jsx_runtime_1.jsx)(react_stripe_js_1.EmbeddedCheckout, {}) })));
710
712
  return ((0, jsx_runtime_1.jsx)(react_stripe_js_1.Elements, __assign({ stripe: stripePromise, options: {
711
713
  clientSecret: clientSecret,
712
- } }, { children: (0, jsx_runtime_1.jsx)(StripeForm, { businessName: businessName, onSuccess: function () { return onChange('Saved card details', field.id); }, cost: cost, field: field }) })));
714
+ } }, { children: (0, jsx_runtime_1.jsx)(StripeForm, { businessName: businessName, onSuccess: function () { return onChange(answertext || 'Saved card details', field.id); }, cost: cost, field: field }) })));
713
715
  };
714
716
  exports.StripeInput = StripeInput;
715
717
  var StripeForm = function (_a) {
@@ -958,7 +960,7 @@ var DatabaseSelectInput = function (_a) {
958
960
  }, [field, filteredChoicesWithPotentialDuplicates]);
959
961
  if (!doneLoading)
960
962
  return (0, jsx_runtime_1.jsx)(LinearProgress_1.default, {});
961
- return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { id: field.id, freeSolo: false, options: filteredChoices, multiple: true, getOptionLabel: function (o) { return (Array.isArray(o) // edge case
963
+ return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { id: field.id, freeSolo: false, componentsProps: { popper: { sx: { wordBreak: "break-word" } } }, options: filteredChoices, multiple: true, getOptionLabel: function (o) { return (Array.isArray(o) // edge case
962
964
  ? ''
963
965
  : label_for_database_record(field, o)); }, value: value, onChange: function (_, v) {
964
966
  var _a, _b, _d, _e;
@@ -979,7 +981,11 @@ var DatabaseSelectInput = function (_a) {
979
981
  recordId: (_e = (_d = v[v.length - 1]) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : '',
980
982
  text: label_for_database_record(field, v[v.length - 1]),
981
983
  }]), field.id);
982
- }, inputValue: typing, onInputChange: function (e, v) { return e && setTyping(v); }, renderInput: function (params) { return (0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: exports.defaultInputProps.sx }) })); } }));
984
+ }, inputValue: typing, onInputChange: function (e, v) { return e && setTyping(v); }, renderInput: function (params) { return (0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: exports.defaultInputProps.sx }) })); },
985
+ // use custom Chip to ensure very long entries break properly (whitespace: normal)
986
+ renderTags: function (value, getTagProps) {
987
+ return value.map(function (value, index) { return ((0, jsx_runtime_1.jsx)(material_1.Chip, __assign({ label: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: { whiteSpace: 'normal' } }, { children: Array.isArray(value) ? '' : label_for_database_record(field, value) })) }, getTagProps({ index: index }), { sx: { height: "100%", py: 0.5 } }))); });
988
+ } }));
983
989
  };
984
990
  exports.DatabaseSelectInput = DatabaseSelectInput;
985
991
  var displayTermsCache = undefined;
@@ -1472,13 +1478,30 @@ var HeightInput = function (_a) {
1472
1478
  };
1473
1479
  exports.HeightInput = HeightInput;
1474
1480
  var RedirectInput = function (_a) {
1475
- var groupId = _a.groupId, groupInsance = _a.groupInsance, formResponseId = _a.formResponseId, field = _a.field, submit = _a.submit, _b = _a.value, value = _b === void 0 ? {} : _b, onChange = _a.onChange, props = __rest(_a, ["groupId", "groupInsance", "formResponseId", "field", "submit", "value", "onChange"]);
1481
+ var _b, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1482
+ var groupId = _a.groupId, groupInsance = _a.groupInsance, 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", "formResponseId", "field", "submit", "value", "onChange", "responses", "enduser"]);
1476
1483
  var session = (0, __1.useResolvedSession)();
1477
1484
  var eId = '';
1478
1485
  try {
1479
1486
  eId = new URL(window.location.href).searchParams.get('eId') || '';
1480
1487
  }
1481
1488
  catch (err) { }
1489
+ 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)
1490
+ || (enduser === null || enduser === void 0 ? void 0 : enduser.email)
1491
+ || session.userInfo.email);
1492
+ var phone = (((_f = (_e = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.intakeField === 'phone'; })) === null || _e === void 0 ? void 0 : _e.answer) === null || _f === void 0 ? void 0 : _f.value)
1493
+ || (enduser === null || enduser === void 0 ? void 0 : enduser.phone)
1494
+ || session.userInfo.phone);
1495
+ var fname = (((_h = (_g = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.intakeField === 'fname'; })) === null || _g === void 0 ? void 0 : _g.answer) === null || _h === void 0 ? void 0 : _h.value)
1496
+ || (enduser === null || enduser === void 0 ? void 0 : enduser.fname)
1497
+ || ((_j = session.userInfo) === null || _j === void 0 ? void 0 : _j.fname));
1498
+ var lname = (((_l = (_k = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.intakeField === 'lname'; })) === null || _k === void 0 ? void 0 : _k.answer) === null || _l === void 0 ? void 0 : _l.value)
1499
+ || (enduser === null || enduser === void 0 ? void 0 : enduser.lname)
1500
+ || ((_m = session.userInfo) === null || _m === void 0 ? void 0 : _m.lname));
1501
+ var state = (((_p = (_o = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.intakeField === 'state'; })) === null || _o === void 0 ? void 0 : _o.answer) === null || _p === void 0 ? void 0 : _p.value)
1502
+ || ((_s = (_r = (_q = responses === null || responses === void 0 ? void 0 : responses.find(function (r) { return r.intakeField === 'Address'; })) === null || _q === void 0 ? void 0 : _q.answer) === null || _r === void 0 ? void 0 : _r.value) === null || _s === void 0 ? void 0 : _s.state)
1503
+ || (enduser === null || enduser === void 0 ? void 0 : enduser.state)
1504
+ || ((_t = session.userInfo) === null || _t === void 0 ? void 0 : _t.state));
1482
1505
  (0, react_1.useEffect)(function () {
1483
1506
  var _a, _b;
1484
1507
  if (session.type === 'user') {
@@ -1490,7 +1513,7 @@ var RedirectInput = function (_a) {
1490
1513
  if (!((_a = field.options) === null || _a === void 0 ? void 0 : _a.redirectExternalUrl)) {
1491
1514
  return;
1492
1515
  }
1493
- window.location.href = (0, utilities_1.replace_enduser_template_values)(field.options.redirectExternalUrl, session.userInfo);
1516
+ 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 })));
1494
1517
  }).catch(console.error);
1495
1518
  return;
1496
1519
  }
@@ -1524,7 +1547,7 @@ var RedirectInput = function (_a) {
1524
1547
  }));
1525
1548
  })
1526
1549
  .catch(console.error);
1527
- }, [session]);
1550
+ }, [session, email, fname, lname, state, phone]);
1528
1551
  if (session.type === 'user') {
1529
1552
  return ((0, jsx_runtime_1.jsx)(material_1.Typography, { children: "Redirect is for patient-facing forms only" }));
1530
1553
  }
@@ -1592,10 +1615,16 @@ var EmotiiInput = function (_a) {
1592
1615
  };
1593
1616
  exports.EmotiiInput = EmotiiInput;
1594
1617
  var AllergiesInput = function (_a) {
1618
+ var _b;
1595
1619
  var goToNextField = _a.goToNextField, goToPreviousField = _a.goToPreviousField, field = _a.field, value = _a.value, onChange = _a.onChange, form = _a.form, formResponseId = _a.formResponseId, props = __rest(_a, ["goToNextField", "goToPreviousField", "field", "value", "onChange", "form", "formResponseId"]);
1596
1620
  var session = (0, __1.useResolvedSession)();
1597
- var _b = (0, react_1.useState)(''), query = _b[0], setQuery = _b[1];
1598
- var _d = (0, react_1.useState)([]), results = _d[0], setResults = _d[1];
1621
+ var _d = (0, react_1.useState)(''), query = _d[0], setQuery = _d[1];
1622
+ var _e = (0, react_1.useState)([]), results = _e[0], setResults = _e[1];
1623
+ // if two allergy questions shown in a row, reset state
1624
+ (0, react_1.useEffect)(function () {
1625
+ setQuery('');
1626
+ setResults([]);
1627
+ }, [field.id]);
1599
1628
  var fetchRef = (0, react_1.useRef)(query);
1600
1629
  (0, react_1.useEffect)(function () {
1601
1630
  if (fetchRef.current === query)
@@ -1604,34 +1633,62 @@ var AllergiesInput = function (_a) {
1604
1633
  if (!query)
1605
1634
  return;
1606
1635
  var t = setTimeout(function () {
1607
- session.api.integrations
1608
- .proxy_read({
1609
- integration: constants_1.CANVAS_TITLE,
1610
- type: 'allergies',
1611
- query: query,
1612
- })
1613
- .then(function (r) {
1614
- var deduped = [];
1615
- var totalResults = ((r.data.entry || [])
1616
- .flatMap(function (v) { var _a, _b; return ((_b = (_a = v === null || v === void 0 ? void 0 : v.resource) === null || _a === void 0 ? void 0 : _a.code) === null || _b === void 0 ? void 0 : _b.coding) || []; })
1617
- .filter(function (v) { return v.system.includes('fdbhealth'); })
1618
- .map(function (v) { return ({ code: v.code, display: v.display, system: v.system }); }));
1619
- var _loop_2 = function (v) {
1620
- if (deduped.find(function (d) { return d.display === v.display; })) {
1621
- return "continue";
1636
+ var _a;
1637
+ if (((_a = field.options) === null || _a === void 0 ? void 0 : _a.dataSource) === constants_1.CANVAS_TITLE) {
1638
+ session.api.integrations
1639
+ .proxy_read({
1640
+ integration: constants_1.CANVAS_TITLE,
1641
+ type: 'allergies',
1642
+ query: query,
1643
+ })
1644
+ .then(function (r) {
1645
+ var deduped = [];
1646
+ var totalResults = ((r.data.entry || [])
1647
+ .flatMap(function (v) { var _a, _b; return ((_b = (_a = v === null || v === void 0 ? void 0 : v.resource) === null || _a === void 0 ? void 0 : _a.code) === null || _b === void 0 ? void 0 : _b.coding) || []; })
1648
+ .filter(function (v) { return v.system.includes('fdbhealth'); })
1649
+ .map(function (v) { return ({ code: v.code, display: v.display, system: v.system }); }));
1650
+ var _loop_2 = function (v) {
1651
+ if (deduped.find(function (d) { return d.display === v.display; })) {
1652
+ return "continue";
1653
+ }
1654
+ deduped.push(v);
1655
+ };
1656
+ for (var _a = 0, totalResults_1 = totalResults; _a < totalResults_1.length; _a++) {
1657
+ var v = totalResults_1[_a];
1658
+ _loop_2(v);
1622
1659
  }
1623
- deduped.push(v);
1624
- };
1625
- for (var _a = 0, totalResults_1 = totalResults; _a < totalResults_1.length; _a++) {
1626
- var v = totalResults_1[_a];
1627
- _loop_2(v);
1628
- }
1629
- setResults(deduped);
1630
- });
1660
+ setResults(deduped);
1661
+ });
1662
+ }
1663
+ else {
1664
+ session.api.allergy_codes.getSome({ search: { query: query } })
1665
+ .then(function (results) {
1666
+ var deduped = [];
1667
+ var _loop_3 = function (v) {
1668
+ if (deduped.find(function (d) { return d.display === v.display; })) {
1669
+ return "continue";
1670
+ }
1671
+ deduped.push(v);
1672
+ };
1673
+ for (var _a = 0, results_1 = results; _a < results_1.length; _a++) {
1674
+ var v = results_1[_a];
1675
+ _loop_3(v);
1676
+ }
1677
+ setResults(deduped);
1678
+ });
1679
+ }
1631
1680
  }, 200);
1632
1681
  return function () { clearTimeout(t); };
1633
- }, [session, query]);
1634
- return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { multiple: true, value: value || [], options: __spreadArray(__spreadArray([], results, true), (value || []), true), style: { marginTop: 5 }, noOptionsText: query.length ? 'No results found' : 'Type to start search', onChange: function (e, v) { return v && onChange(v, field.id); }, getOptionLabel: function (v) { return (0, utilities_1.first_letter_capitalized)(v.display); }, filterOptions: function (o) { return o; }, inputValue: query, onInputChange: function (e, v) { return e && setQuery(v); }, renderInput: function (params) { return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: exports.defaultInputProps.sx }), required: !field.isOptional, size: "small", label: "", placeholder: "Search allergies..." }))); } }));
1682
+ }, [session, query, (_b = field === null || field === void 0 ? void 0 : field.options) === null || _b === void 0 ? void 0 : _b.dataSource]);
1683
+ return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { multiple: true, value: value || [], options: results, style: { marginTop: 5 }, noOptionsText: query.length ? 'No results found' : 'Type to start search', onChange: function (e, v) {
1684
+ if (!v) {
1685
+ return;
1686
+ }
1687
+ onChange(v, field.id);
1688
+ setResults([]);
1689
+ }, getOptionLabel: function (v) { return (0, utilities_1.first_letter_capitalized)(v.display); }, filterOptions: function (o) { return o; }, inputValue: query, onInputChange: function (e, v) { return e && setQuery(v); }, renderInput: function (params) { return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: exports.defaultInputProps.sx }), required: !field.isOptional, size: "small", label: "", placeholder: "Search allergies..." }))); }, renderTags: function (value, getTagProps) {
1690
+ return value.map(function (value, index) { return ((0, jsx_runtime_1.jsx)(material_1.Chip, __assign({ label: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: { whiteSpace: 'normal' } }, { children: value.display })) }, getTagProps({ index: index }), { sx: { height: "100%", py: 0.5 } }))); });
1691
+ } }));
1635
1692
  };
1636
1693
  exports.AllergiesInput = AllergiesInput;
1637
1694
  var ConditionsInput = function (_a) {
@@ -1650,7 +1707,7 @@ var ConditionsInput = function (_a) {
1650
1707
  session.api.diagnosis_codes.getSome({ search: { query: query } })
1651
1708
  .then(function (codes) {
1652
1709
  var deduped = [];
1653
- var _loop_3 = function (v) {
1710
+ var _loop_4 = function (v) {
1654
1711
  if (deduped.find(function (d) { return d.display === v.display; })) {
1655
1712
  return "continue";
1656
1713
  }
@@ -1658,14 +1715,22 @@ var ConditionsInput = function (_a) {
1658
1715
  };
1659
1716
  for (var _a = 0, codes_1 = codes; _a < codes_1.length; _a++) {
1660
1717
  var v = codes_1[_a];
1661
- _loop_3(v);
1718
+ _loop_4(v);
1662
1719
  }
1663
1720
  setResults(deduped);
1664
1721
  });
1665
1722
  }, 200);
1666
1723
  return function () { clearTimeout(t); };
1667
1724
  }, [session, query]);
1668
- return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { multiple: true, value: value || [], options: __spreadArray(__spreadArray([], results, true), (value || []), true), style: { marginTop: 5 }, noOptionsText: query.length ? 'No results found' : 'Type to start search', onChange: function (e, v) { return v && onChange(v, field.id); }, getOptionLabel: function (v) { return (0, utilities_1.first_letter_capitalized)(v.display); }, filterOptions: function (o) { return o; }, inputValue: query, onInputChange: function (e, v) { return e && setQuery(v); }, renderInput: function (params) { return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: exports.defaultInputProps.sx }), required: !field.isOptional, size: "small", label: "", placeholder: "Search conditions..." }))); } }));
1725
+ return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { multiple: true, value: value || [], options: results, style: { marginTop: 5 }, noOptionsText: query.length ? 'No results found' : 'Type to start search', onChange: function (e, v) {
1726
+ if (!v) {
1727
+ return;
1728
+ }
1729
+ onChange(v, field.id);
1730
+ setResults([]);
1731
+ }, getOptionLabel: function (v) { return (0, utilities_1.first_letter_capitalized)(v.display); }, filterOptions: function (o) { return o; }, inputValue: query, onInputChange: function (e, v) { return e && setQuery(v); }, renderInput: function (params) { return ((0, jsx_runtime_1.jsx)(material_1.TextField, __assign({}, params, { InputProps: __assign(__assign({}, params.InputProps), { sx: exports.defaultInputProps.sx }), required: !field.isOptional, size: "small", label: "", placeholder: "Search conditions..." }))); }, renderTags: function (value, getTagProps) {
1732
+ return value.map(function (value, index) { return ((0, jsx_runtime_1.jsx)(material_1.Chip, __assign({ label: (0, jsx_runtime_1.jsx)(material_1.Typography, __assign({ style: { whiteSpace: 'normal' } }, { children: value.display })) }, getTagProps({ index: index }), { sx: { height: "100%", py: 0.5 } }))); });
1733
+ } }));
1669
1734
  };
1670
1735
  exports.ConditionsInput = ConditionsInput;
1671
1736
  var templateObject_1, templateObject_2;