@tellescope/react-components 1.130.0 → 1.131.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/Forms/hooks.d.ts.map +1 -1
- package/lib/cjs/Forms/hooks.js +1 -0
- package/lib/cjs/Forms/hooks.js.map +1 -1
- package/lib/cjs/inputs_shared.d.ts +7 -1
- package/lib/cjs/inputs_shared.d.ts.map +1 -1
- package/lib/cjs/inputs_shared.js +14 -1
- package/lib/cjs/inputs_shared.js.map +1 -1
- package/lib/cjs/state.d.ts +36 -0
- package/lib/cjs/state.d.ts.map +1 -1
- package/lib/cjs/state.js +19 -3
- package/lib/cjs/state.js.map +1 -1
- package/lib/esm/CMS/components.d.ts +1 -0
- package/lib/esm/CMS/components.d.ts.map +1 -1
- package/lib/esm/Forms/forms.d.ts +3 -3
- package/lib/esm/Forms/hooks.d.ts.map +1 -1
- package/lib/esm/Forms/hooks.js +1 -0
- package/lib/esm/Forms/hooks.js.map +1 -1
- package/lib/esm/Forms/inputs.d.ts +1 -1
- package/lib/esm/Forms/inputs.native.d.ts +1 -0
- package/lib/esm/Forms/inputs.native.d.ts.map +1 -1
- package/lib/esm/controls.d.ts +2 -2
- package/lib/esm/inputs.native.d.ts +1 -0
- package/lib/esm/inputs.native.d.ts.map +1 -1
- package/lib/esm/inputs_shared.d.ts +7 -1
- package/lib/esm/inputs_shared.d.ts.map +1 -1
- package/lib/esm/inputs_shared.js +12 -1
- package/lib/esm/inputs_shared.js.map +1 -1
- package/lib/esm/layout.d.ts +1 -1
- package/lib/esm/state.d.ts +268 -232
- package/lib/esm/state.d.ts.map +1 -1
- package/lib/esm/state.js +15 -0
- package/lib/esm/state.js.map +1 -1
- package/lib/esm/theme.native.d.ts +1 -0
- package/lib/esm/theme.native.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/Forms/hooks.tsx +1 -0
- package/src/inputs_shared.tsx +38 -2
- package/src/state.tsx +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.131.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@reduxjs/toolkit": "^1.6.2",
|
|
48
48
|
"@stripe/react-stripe-js": "^2.1.0",
|
|
49
49
|
"@stripe/stripe-js": "^1.52.1",
|
|
50
|
-
"@tellescope/constants": "^1.
|
|
51
|
-
"@tellescope/sdk": "^1.
|
|
52
|
-
"@tellescope/types-client": "^1.
|
|
53
|
-
"@tellescope/types-models": "^1.
|
|
50
|
+
"@tellescope/constants": "^1.131.1",
|
|
51
|
+
"@tellescope/sdk": "^1.131.1",
|
|
52
|
+
"@tellescope/types-client": "^1.131.1",
|
|
53
|
+
"@tellescope/types-models": "^1.131.1",
|
|
54
54
|
"@tellescope/types-utilities": "^1.69.3",
|
|
55
|
-
"@tellescope/utilities": "^1.
|
|
55
|
+
"@tellescope/utilities": "^1.131.1",
|
|
56
56
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
57
57
|
"@typescript-eslint/parser": "^4.33.0",
|
|
58
58
|
"css-to-react-native": "^3.0.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
80
80
|
"react-native": "^0.65.0 || ^0.66.0 || ^0.67.0 || ^0.68.0 || ^0.71.0"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "3ad31b89c1e7e68baed19996d60e52f83e487e9d",
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
}
|
package/src/Forms/hooks.tsx
CHANGED
|
@@ -588,6 +588,7 @@ export const useTellescopeForm = ({ form, urlLogicValue, customization, carePlan
|
|
|
588
588
|
fieldDescription: f.description,
|
|
589
589
|
fieldHtmlDescription: f.htmlDescription,
|
|
590
590
|
externalId: f.externalId,
|
|
591
|
+
intakeField: f.intakeField || undefined,
|
|
591
592
|
touched: false,
|
|
592
593
|
includeInSubmit: false,
|
|
593
594
|
sharedWithEnduser: f.sharedWithEnduser,
|
package/src/inputs_shared.tsx
CHANGED
|
@@ -5,8 +5,8 @@ import { LoadFunction, LoadFunctionArguments } from "@tellescope/sdk"
|
|
|
5
5
|
import { ALL_ACCESS, UNSEARCHABLE_FIELDS } from "@tellescope/constants"
|
|
6
6
|
import { SearchAPIProps, useSearchAPI } from "./hooks"
|
|
7
7
|
import { TextFieldProps } from "./mui"
|
|
8
|
-
import { AppointmentBookingPage, AppointmentLocation, AutomationTrigger, CalendarEventTemplate, ChatRoom, Database, DatabaseRecord, Enduser, File, Form, FormGroup, Forum, Journey, ManagedContentRecord, MessageTemplateSnippet, Organization, PrescriptionRoute, Template, Ticket, User, UserNotification } from "@tellescope/types-client"
|
|
9
|
-
import { Button, Checkbox, Flex, HoverPaper, LoadingButton, LoadingData, LoadingLinear, ScrollingList, SearchTextInput, Typography, useAppointmentBookingPages, useAppointmentLocations, useAutomationTriggers, useCalendarEventTemplates, useChatRooms, useDatabaseRecords, useDatabases, useEndusers, useFiles, useFormGroups, useForms, useForums, useJourneys, useManagedContentRecords, useMessageTemplateSnippets, useNotifications, useOrganization, useOrganizations, usePrescriptionRoutes, useResolvedSession, useSession, useTemplates, useTickets, useUsers, value_is_loaded } from "."
|
|
8
|
+
import { AppointmentBookingPage, AppointmentLocation, AutomationTrigger, CalendarEventTemplate, ChatRoom, Database, DatabaseRecord, Enduser, FaxLog, File, Form, FormGroup, Forum, Journey, ManagedContentRecord, MessageTemplateSnippet, Organization, PrescriptionRoute, Template, Ticket, TicketQueue, User, UserNotification } from "@tellescope/types-client"
|
|
9
|
+
import { Button, Checkbox, Flex, HoverPaper, LoadingButton, LoadingData, LoadingLinear, ScrollingList, SearchTextInput, Typography, useAppointmentBookingPages, useAppointmentLocations, useAutomationTriggers, useCalendarEventTemplates, useChatRooms, useDatabaseRecords, useDatabases, useEndusers, useFaxLogs, useFiles, useFormGroups, useForms, useForums, useJourneys, useManagedContentRecords, useMessageTemplateSnippets, useNotifications, useOrganization, useOrganizations, usePrescriptionRoutes, useResolvedSession, useSession, useTemplates, useTicketQueues, useTickets, useUsers, value_is_loaded } from "."
|
|
10
10
|
import { SxProps } from "@mui/material"
|
|
11
11
|
import { AccessPermissions } from "@tellescope/types-models"
|
|
12
12
|
|
|
@@ -513,6 +513,31 @@ export const PrescriptionRoutesSearch = (props: Omit<GenericSearchProps<Prescrip
|
|
|
513
513
|
)
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
+
export const FaxSearch = (props: Omit<GenericSearchProps<FaxLog>, 'filterKey'> & { filterKey?: string }) => {
|
|
517
|
+
const session = useSession()
|
|
518
|
+
const [, { addLocalElements }] = useFaxLogs()
|
|
519
|
+
// const [, { findById: findEnduser }] = useEndusers()
|
|
520
|
+
|
|
521
|
+
return (
|
|
522
|
+
<ModelSearchInput filterKey="fax_logs" {...props}
|
|
523
|
+
searchAPI={session.api.fax_logs.getSome}
|
|
524
|
+
onLoad={addLocalElements}
|
|
525
|
+
// attachSearchableFields={t => {
|
|
526
|
+
// const enduser = t.enduserId ? findEnduser(t.enduserId, { batch: true }) : undefined
|
|
527
|
+
// if (!enduser) return undefined
|
|
528
|
+
|
|
529
|
+
// const toJoin = {
|
|
530
|
+
// fname: enduser.fname,
|
|
531
|
+
// lname: enduser.lname,
|
|
532
|
+
// fullname: `${enduser.fname} ${enduser.lname}`,
|
|
533
|
+
// }
|
|
534
|
+
|
|
535
|
+
// return toJoin
|
|
536
|
+
// }}
|
|
537
|
+
/>
|
|
538
|
+
)
|
|
539
|
+
}
|
|
540
|
+
|
|
516
541
|
export const FileSearch = (props: Omit<GenericSearchProps<File>, 'filterKey'> & { filterKey?: string }) => {
|
|
517
542
|
const session = useSession()
|
|
518
543
|
const [, { addLocalElements }] = useFiles()
|
|
@@ -538,6 +563,17 @@ export const FileSearch = (props: Omit<GenericSearchProps<File>, 'filterKey'> &
|
|
|
538
563
|
)
|
|
539
564
|
}
|
|
540
565
|
|
|
566
|
+
export const TicketQueueSearch = (props: Omit<GenericSearchProps<TicketQueue>, 'filterKey'> & { filterKey?: string }) => {
|
|
567
|
+
const session = useSession()
|
|
568
|
+
const [, { addLocalElements }] = useTicketQueues({ dontFetch: true })
|
|
569
|
+
return (
|
|
570
|
+
<ModelSearchInput filterKey="ticket-queue" {...props}
|
|
571
|
+
searchAPI={session.api.ticket_queues.getSome}
|
|
572
|
+
onLoad={addLocalElements}
|
|
573
|
+
/>
|
|
574
|
+
)
|
|
575
|
+
}
|
|
576
|
+
|
|
541
577
|
export const NotificationSearch = (props: Omit<GenericSearchProps<UserNotification>, 'filterKey'> & { filterKey?: string }) => {
|
|
542
578
|
const session = useSession()
|
|
543
579
|
const [, { addLocalElements }] = useNotifications()
|
package/src/state.tsx
CHANGED
|
@@ -90,6 +90,7 @@ import {
|
|
|
90
90
|
FormGroup,
|
|
91
91
|
PortalBranding,
|
|
92
92
|
MessageTemplateSnippet,
|
|
93
|
+
FaxLog,
|
|
93
94
|
} from "@tellescope/types-client"
|
|
94
95
|
|
|
95
96
|
import {
|
|
@@ -347,6 +348,7 @@ const webhookLogsSlice = createSliceForList<WebhookLog, 'webhook_logs'>('webhook
|
|
|
347
348
|
const formGroupsSlice = createSliceForList<FormGroup, 'form_groups'>('form_groups')
|
|
348
349
|
const portalBrandingsSlice = createSliceForList<PortalBranding, 'portal_brandings'>('portal_brandings')
|
|
349
350
|
const messageTemplateSnippetsSlice = createSliceForList<MessageTemplateSnippet, 'message_template_snippets'>('message_template_snippets')
|
|
351
|
+
const faxLogsSlice = createSliceForList<FaxLog, 'fax_logs'>('fax_logs')
|
|
350
352
|
|
|
351
353
|
const roleBasedAccessPermissionsSlice = createSliceForList<RoleBasedAccessPermission, 'role_based_access_permissions'>('role_based_access_permissions')
|
|
352
354
|
|
|
@@ -431,6 +433,7 @@ export const sharedConfig = {
|
|
|
431
433
|
form_groups: formGroupsSlice.reducer,
|
|
432
434
|
portal_brandings: portalBrandingsSlice.reducer,
|
|
433
435
|
message_template_snippets: messageTemplateSnippetsSlice.reducer,
|
|
436
|
+
fax_logs: faxLogsSlice.reducer,
|
|
434
437
|
},
|
|
435
438
|
}
|
|
436
439
|
|
|
@@ -1174,6 +1177,24 @@ export const useUserAndEnduserDisplayInfo = () => {
|
|
|
1174
1177
|
return displayInfo
|
|
1175
1178
|
}
|
|
1176
1179
|
|
|
1180
|
+
export const useFaxLogs = (options={} as HookOptions<FaxLog>) => {
|
|
1181
|
+
const session = useSession()
|
|
1182
|
+
|
|
1183
|
+
return useListStateHook('fax_logs', useTypedSelector(s => s.fax_logs), session, faxLogsSlice,
|
|
1184
|
+
{
|
|
1185
|
+
loadQuery: session.api.fax_logs.getSome,
|
|
1186
|
+
findOne: session.api.fax_logs.getOne,
|
|
1187
|
+
findByIds: session.api.fax_logs.getByIds,
|
|
1188
|
+
addOne: session.api.fax_logs.createOne,
|
|
1189
|
+
addSome: session.api.fax_logs.createSome,
|
|
1190
|
+
deleteOne: session.api.fax_logs.deleteOne,
|
|
1191
|
+
updateOne: session.api.fax_logs.updateOne,
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
...options,
|
|
1195
|
+
},
|
|
1196
|
+
)
|
|
1197
|
+
}
|
|
1177
1198
|
export const useMessageTemplateSnippets = (options={} as HookOptions<MessageTemplateSnippet>) => {
|
|
1178
1199
|
const session = useSession()
|
|
1179
1200
|
|