@tellescope/react-components 1.169.0 → 1.171.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/react-components",
3
- "version": "1.169.0",
3
+ "version": "1.171.0",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -47,13 +47,13 @@
47
47
  "@reduxjs/toolkit": "^1.6.2",
48
48
  "@stripe/react-stripe-js": "^2.9.0",
49
49
  "@stripe/stripe-js": "^1.52.1",
50
- "@tellescope/constants": "^1.169.0",
51
- "@tellescope/sdk": "^1.169.0",
52
- "@tellescope/types-client": "^1.169.0",
53
- "@tellescope/types-models": "^1.169.0",
54
- "@tellescope/types-utilities": "^1.169.0",
55
- "@tellescope/utilities": "^1.169.0",
56
- "@tellescope/validation": "^1.169.0",
50
+ "@tellescope/constants": "^1.171.0",
51
+ "@tellescope/sdk": "^1.171.0",
52
+ "@tellescope/types-client": "^1.171.0",
53
+ "@tellescope/types-models": "^1.171.0",
54
+ "@tellescope/types-utilities": "^1.171.0",
55
+ "@tellescope/utilities": "^1.171.0",
56
+ "@tellescope/validation": "^1.171.0",
57
57
  "@typescript-eslint/eslint-plugin": "^4.33.0",
58
58
  "@typescript-eslint/parser": "^4.33.0",
59
59
  "css-to-react-native": "^3.0.0",
@@ -84,7 +84,7 @@
84
84
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
85
85
  "react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
86
86
  },
87
- "gitHead": "038ccd6e24a110a290ce7b0b6333ec2593817204",
87
+ "gitHead": "a9948a5ee7adeab6f1c4c56c5f7c67ab21b951be",
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  }
@@ -13,7 +13,7 @@ import LinearProgress from '@mui/material/LinearProgress';
13
13
  import DatePicker from "react-datepicker";
14
14
  import { datepickerCSS } from "./css/react-datepicker" // avoids build issue with RN
15
15
  import { CancelIcon, FileBlob, IconButton, LabeledIconButton, LoadingButton, Styled, form_display_text_for_language, isDateString, useProducts, useResolvedSession } from ".."
16
- import { AllergyCode, CalendarEvent, DatabaseRecord, FormField } from "@tellescope/types-client"
16
+ import { CalendarEvent, DatabaseRecord, FormField } from "@tellescope/types-client"
17
17
  import { css } from '@emotion/css'
18
18
  import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
19
19
  import DragIndicatorIcon from '@mui/icons-material/DragIndicator';
@@ -580,7 +580,8 @@ export const InsuranceInput = ({ field, value, onChange, form, responses, enduse
580
580
  }
581
581
  renderInput={(params) => (
582
582
  <TextField {...params} InputProps={{ ...params.InputProps, sx: defaultInputProps.sx }}
583
- required={!field.isOptional} size="small" label="Insurer"
583
+ required={!field.isOptional} size="small" label={"Insurer"}
584
+ placeholder={field.options?.dataSource === CANVAS_TITLE ? "Search insurer..." : "Insurer"}
584
585
  />
585
586
  )}
586
587
  />
@@ -1766,9 +1767,10 @@ const useDatabaseChoices = ({ databaseId='', field, otherAnswers } : { databaseI
1766
1767
  const session = useResolvedSession()
1767
1768
  const [renderCount, setRenderCount] = useState(0)
1768
1769
 
1770
+ // todo: make searchable, don't load all
1769
1771
  useEffect(() => {
1770
1772
  if (choicesForDatabase[databaseId]?.done) return
1771
- if (renderCount > 10) return // limit to 5000 entries / prevent infinite looping
1773
+ if (renderCount > 100) return // limit to 50000 entries / prevent infinite looping
1772
1774
  const choices = choicesForDatabase[databaseId]?.records ?? []
1773
1775
  const lastId = choicesForDatabase[databaseId]?.lastId
1774
1776
 
@@ -2849,6 +2851,9 @@ export const AppointmentBookingInput = ({ formResponseId, field, value, onChange
2849
2851
  field.options.userTags
2850
2852
  .flatMap(t => {
2851
2853
  // set dynamic tags if found
2854
+ if (t === '{{logic}}') {
2855
+ return new URL(window.location.href).searchParams.get('logic') || '{{logic}}'
2856
+ }
2852
2857
  if (t.startsWith("{{field.") && t.endsWith(".value}}")) {
2853
2858
  const fieldId = t.replace('{{field.', '').replace(".value}}", '')
2854
2859
 
@@ -2873,6 +2878,9 @@ export const AppointmentBookingInput = ({ formResponseId, field, value, onChange
2873
2878
  field.options.userFilterTags
2874
2879
  .flatMap(t => {
2875
2880
  // set dynamic tags if found
2881
+ if (t === '{{logic}}') {
2882
+ return new URL(window.location.href).searchParams.get('logic') || '{{logic}}'
2883
+ }
2876
2884
  if (t.startsWith("{{field.") && t.endsWith(".value}}")) {
2877
2885
  const fieldId = t.replace('{{field.', '').replace(".value}}", '')
2878
2886