codicent-app-sdk 0.4.15 → 0.4.18
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/README.md +410 -375
- package/dist/cjs/components/AiInput.js +1 -1
- package/dist/cjs/components/AudioIcon.js +1 -1
- package/dist/cjs/components/ChatInput.js +1 -1
- package/dist/cjs/components/ChatMessage.js +1 -1
- package/dist/cjs/components/CombinedPlaceholderDialog.js +1 -1
- package/dist/cjs/components/DataMessagePicker.d.ts +33 -0
- package/dist/cjs/components/DataMessagePicker.d.ts.map +1 -0
- package/dist/cjs/components/DataMessagePicker.js +1 -0
- package/dist/cjs/components/Footer.js +1 -1
- package/dist/cjs/components/Header.js +1 -1
- package/dist/cjs/components/HtmlView.js +1 -1
- package/dist/cjs/components/MermaidChart.d.ts.map +1 -1
- package/dist/cjs/components/MermaidChart.js +1 -1
- package/dist/cjs/components/MessageInput.js +1 -1
- package/dist/cjs/components/MessageItem.js +1 -1
- package/dist/cjs/components/Profile.js +1 -1
- package/dist/cjs/components/Prompt.js +1 -1
- package/dist/cjs/components/SnapFooter.js +1 -1
- package/dist/cjs/components/TextHeader.js +1 -1
- package/dist/cjs/components/TypingIndicator.js +1 -1
- package/dist/cjs/components/UploadFile.js +1 -1
- package/dist/cjs/components/UrlProcessor.js +1 -1
- package/dist/cjs/components/VoiceIcon.js +1 -1
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/config/index.d.ts.map +1 -1
- package/dist/cjs/config/index.js +1 -1
- package/dist/cjs/hooks/useAuthState.js +1 -1
- package/dist/cjs/hooks/useCodicentState.js +1 -1
- package/dist/cjs/hooks/useLocalization.d.ts.map +1 -1
- package/dist/cjs/hooks/useLocalization.js +1 -1
- package/dist/cjs/hooks/useRealtimeVoiceAI.d.ts.map +1 -1
- package/dist/cjs/hooks/useRealtimeVoiceAI.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/pages/AppFrame.js +1 -1
- package/dist/cjs/pages/Chat.js +1 -1
- package/dist/cjs/pages/Compose.js +1 -1
- package/dist/cjs/pages/CrmPage.js +1 -1
- package/dist/cjs/pages/CrmPagePersistent.js +1 -1
- package/dist/cjs/pages/FormAccept.js +1 -1
- package/dist/cjs/pages/FormInvite.js +1 -1
- package/dist/cjs/pages/HtmlViewer.js +1 -1
- package/dist/cjs/pages/Login.js +1 -1
- package/dist/cjs/pages/Purchase.js +1 -1
- package/dist/cjs/pages/Sales.js +1 -1
- package/dist/cjs/pages/Search.js +1 -1
- package/dist/cjs/pages/Snap.js +1 -1
- package/dist/cjs/services/codicent.d.ts +1 -0
- package/dist/cjs/services/codicent.d.ts.map +1 -1
- package/dist/esm/components/AiInput.js +1 -1
- package/dist/esm/components/AudioIcon.js +1 -1
- package/dist/esm/components/ChatInput.js +1 -1
- package/dist/esm/components/ChatMessage.js +1 -1
- package/dist/esm/components/CombinedPlaceholderDialog.js +1 -1
- package/dist/esm/components/DataMessagePicker.d.ts +33 -0
- package/dist/esm/components/DataMessagePicker.d.ts.map +1 -0
- package/dist/esm/components/DataMessagePicker.js +1 -0
- package/dist/esm/components/Footer.js +1 -1
- package/dist/esm/components/Header.js +1 -1
- package/dist/esm/components/HtmlView.js +1 -1
- package/dist/esm/components/MermaidChart.d.ts.map +1 -1
- package/dist/esm/components/MermaidChart.js +1 -1
- package/dist/esm/components/MessageInput.js +1 -1
- package/dist/esm/components/MessageItem.js +1 -1
- package/dist/esm/components/Profile.js +1 -1
- package/dist/esm/components/Prompt.js +1 -1
- package/dist/esm/components/SnapFooter.js +1 -1
- package/dist/esm/components/TextHeader.js +1 -1
- package/dist/esm/components/TypingIndicator.js +1 -1
- package/dist/esm/components/UploadFile.js +1 -1
- package/dist/esm/components/UrlProcessor.js +1 -1
- package/dist/esm/components/VoiceIcon.js +1 -1
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/index.js +1 -1
- package/dist/esm/hooks/useAuthState.js +1 -1
- package/dist/esm/hooks/useCodicentState.js +1 -1
- package/dist/esm/hooks/useLocalization.d.ts.map +1 -1
- package/dist/esm/hooks/useLocalization.js +1 -1
- package/dist/esm/hooks/useRealtimeVoiceAI.d.ts.map +1 -1
- package/dist/esm/hooks/useRealtimeVoiceAI.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/pages/AppFrame.js +1 -1
- package/dist/esm/pages/Chat.js +1 -1
- package/dist/esm/pages/Compose.js +1 -1
- package/dist/esm/pages/CrmPage.js +1 -1
- package/dist/esm/pages/CrmPagePersistent.js +1 -1
- package/dist/esm/pages/FormAccept.js +1 -1
- package/dist/esm/pages/FormInvite.js +1 -1
- package/dist/esm/pages/HtmlViewer.js +1 -1
- package/dist/esm/pages/Login.js +1 -1
- package/dist/esm/pages/Purchase.js +1 -1
- package/dist/esm/pages/Sales.js +1 -1
- package/dist/esm/pages/Search.js +1 -1
- package/dist/esm/pages/Snap.js +1 -1
- package/dist/esm/services/codicent.d.ts +1 -0
- package/dist/esm/services/codicent.d.ts.map +1 -1
- package/dist/index.d.ts +264 -233
- package/package.json +1 -1
package/dist/esm/pages/Snap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as e,useRef as n,useMemo as i,useCallback as r,useEffect as s}from"react";import{makeStyles as a}from"@fluentui/react-components";import{useSearchParams as p,useNavigate as m}from"react-router-dom";import"../components/Markdown.js";import"../components/Textarea.js";import"../components/Button.js";import"../components/CompoundButton.js";import{Text as c}from"../components/Text.js";import"../components/Spinner.js";import"../components/TextHeader.js";import"../components/TypingIndicator.js";import"../components/Dialog.js";import"../components/ChatInput.js";import{CombinedPlaceholderDialog as l}from"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import"@fluentui/react-icons";import"../services/codicent.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import"../config/index.js";import"../utils/cacheManager.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"./AppFrame.js";import"./Chat.js";import"./Compose.js";import"./Search.js";import"./Login.js";import"./CrmPage.js";import"./CrmPagePersistent.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"./Sales.js";import"./Purchase.js";import"../components/Content.js";import"../components/Page.js";import"./QrScan.js";import d from"../hooks/useLocalization.js";import"../components/FileThumbnail.js";import"react-dom/client";import"../node_modules/@auth0/auth0-react/dist/auth0-react.esm.js";import{useTemplateVariables as h}from"../hooks/useTemplateVariables.js";import"../hooks/useAppStyles.js";import u from"../components/MessageInput.js";import"../components/UploadFile.js";import g from"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/AiInput.js";import"../components/SearchBox.js";import"../components/HtmlView.js";import"../components/Footer.js";import"../components/QrCodeDialog.js";import"../components/QrScanner.js";import"../components/OfflineMessage.js";import"../components/LanguageSelector.js";import"../components/ListView.js";import"../components/RecordModal.js";import"../components/BulkUploadDialog.js";import"../components/CookieBanner.js";const j=a({container:{position:"relative",height:"100vh",width:"100vw",overflow:"auto"},flashOverlay:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"transparent",transition:"background-color 0.2s ease-out",pointerEvents:"none",zIndex:3},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",zIndex:1},canvas:{display:"none"},bottomControls:{position:"fixed",bottom:"100px",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:2,boxSizing:"border-box"},controlContainer:{width:"100%",maxWidth:"600px",position:"relative"},sendButton:{position:"absolute",right:"10px",bottom:"10px",width:"50px",height:"50px",borderRadius:"50%",backgroundColor:"#0078d4",color:"white",border:"none",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"},topControls:{position:"fixed",top:"20px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",zIndex:2,padding:"0 10px",boxSizing:"border-box"},backButton:{width:"60px",height:"60px",borderRadius:"50%",backgroundColor:"transparent",color:"white",border:"none",cursor:"pointer"},input:{padding:"5px",width:"200px",fontSize:"larger",backgroundColor:"#fff8"},bottomButtons:{position:"fixed",bottom:"0px",width:"100%",display:"flex",justifyContent:"space-around",alignItems:"center",zIndex:2,boxSizing:"border-box"},iconButton:{width:"60px",height:"60px",borderRadius:"50%",backgroundColor:"transparent",color:"white",border:"none",cursor:"pointer"},centerText:{position:"fixed",top:"30%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2,textAlign:"center"}}),f=({state:a,audio:f})=>{const w=j(),{service:b}=a,[x,v]=e(null),[C,y]=e(!0),k=n(null),I=n(null),[F]=p(),S=F.get("extra"),z=F.get("template"),[T,
|
|
1
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{useState as e,useRef as n,useMemo as i,useCallback as r,useEffect as s}from"react";import{makeStyles as a}from"@fluentui/react-components";import{useSearchParams as p,useNavigate as m}from"react-router-dom";import"../components/Markdown.js";import"../components/Textarea.js";import"../components/Button.js";import"../components/CompoundButton.js";import{Text as c}from"../components/Text.js";import"../components/Spinner.js";import"../components/TextHeader.js";import"../components/TypingIndicator.js";import"../components/Dialog.js";import"../components/ChatInput.js";import{CombinedPlaceholderDialog as l}from"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import"@fluentui/react-icons";import"../services/codicent.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import"../config/index.js";import"../utils/cacheManager.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"./AppFrame.js";import"./Chat.js";import"./Compose.js";import"./Search.js";import"./Login.js";import"./CrmPage.js";import"./CrmPagePersistent.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"./Sales.js";import"./Purchase.js";import"../components/Content.js";import"../components/Page.js";import"./QrScan.js";import d from"../hooks/useLocalization.js";import"../components/FileThumbnail.js";import"react-dom/client";import"../node_modules/@auth0/auth0-react/dist/auth0-react.esm.js";import{useTemplateVariables as h}from"../hooks/useTemplateVariables.js";import"../hooks/useAppStyles.js";import u from"../components/MessageInput.js";import"../components/UploadFile.js";import g from"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/AiInput.js";import"../components/SearchBox.js";import"../components/DataMessagePicker.js";import"../components/HtmlView.js";import"../components/Footer.js";import"../components/QrCodeDialog.js";import"../components/QrScanner.js";import"../components/OfflineMessage.js";import"../components/LanguageSelector.js";import"../components/ListView.js";import"../components/RecordModal.js";import"../components/BulkUploadDialog.js";import"../components/CookieBanner.js";const j=a({container:{position:"relative",height:"100vh",width:"100vw",overflow:"auto"},flashOverlay:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"transparent",transition:"background-color 0.2s ease-out",pointerEvents:"none",zIndex:3},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",zIndex:1},canvas:{display:"none"},bottomControls:{position:"fixed",bottom:"100px",width:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:2,boxSizing:"border-box"},controlContainer:{width:"100%",maxWidth:"600px",position:"relative"},sendButton:{position:"absolute",right:"10px",bottom:"10px",width:"50px",height:"50px",borderRadius:"50%",backgroundColor:"#0078d4",color:"white",border:"none",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"},topControls:{position:"fixed",top:"20px",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",zIndex:2,padding:"0 10px",boxSizing:"border-box"},backButton:{width:"60px",height:"60px",borderRadius:"50%",backgroundColor:"transparent",color:"white",border:"none",cursor:"pointer"},input:{padding:"5px",width:"200px",fontSize:"larger",backgroundColor:"#fff8"},bottomButtons:{position:"fixed",bottom:"0px",width:"100%",display:"flex",justifyContent:"space-around",alignItems:"center",zIndex:2,boxSizing:"border-box"},iconButton:{width:"60px",height:"60px",borderRadius:"50%",backgroundColor:"transparent",color:"white",border:"none",cursor:"pointer"},centerText:{position:"fixed",top:"30%",left:"50%",transform:"translate(-50%, -50%)",zIndex:2,textAlign:"center"}}),f=({state:a,audio:f})=>{const w=j(),{service:b}=a,[x,v]=e(null),[C,y]=e(!0),k=n(null),I=n(null),[F]=p(),S=F.get("extra"),z=F.get("template"),[T,M]=e(""),[V]=e("log"),B=i((()=>new Audio("/audio/camera.mp3")),[]),[P,$]=e(!1),E=m(),{t:N}=d(),{extractTemplateVariables:_}=h(b.uploadFile),[D,A]=e(_(z||"")),[H,L]=e(D.length>0),[O,R]=e(""),[Q,U]=e(100),W=r((()=>D.map((o=>`#${o.value}`)).join(" ")),[D]);s((()=>{const o=W();R(`${S?" #"+S:""}${o.length>0?" "+o:""}`.trim())}),[D,S,W]),s((()=>{if(window.visualViewport){const o=()=>{const o=window.visualViewport?window.innerHeight-window.visualViewport.height:0;U(o>150?o+20:100)};return window.visualViewport.addEventListener("resize",o),o(),()=>{window.visualViewport&&window.visualViewport.removeEventListener("resize",o)}}}),[]);const K=async o=>{try{const t=new FormData;t.append("file",o);const e=await b.uploadFile(o.name,t),n=W(),i=`${V?" #"+V:""}${S?" #"+S:""}${n.length>0?" "+n:""} #photo #file:${e}`;await b.sendMessage(i)}catch(o){alert(N("Failed to send image:")+" "+o)}};return s((()=>()=>{x&&x.getTracks().forEach((o=>o.stop()))}),[x]),o("div",{className:w.container,children:[t("div",{className:w.flashOverlay,style:{backgroundColor:P?"#ffffff":"transparent"}}),t("video",{ref:k,autoPlay:!0,playsInline:!0,className:w.video}),t("canvas",{ref:I,width:"640",height:"480",className:w.canvas}),!x&&t(c,{weight:"semibold",size:400,className:w.centerText,children:N("Klicka på Byt kamera för att starta!")}),t("div",{className:w.bottomControls,style:{bottom:`${Q}px`},children:t("div",{className:w.controlContainer,children:t(u,{onSend:async()=>{if(""===T.trim())return;const o=W(),t=`${V?" #"+V:""}${S?" #"+S:""}${o.length>0?" "+o:""} ${T}`;try{await b.sendMessage(t),M("")}catch(o){alert(N("Failed to send message: ")+o)}},rows:4,onChange:M})})}),t("div",{className:w.bottomButtons,children:t(g,{audio:f,onHome:()=>E("/"),onTakePhoto:()=>{const o=I.current,t=k.current;if(o&&t){o.width=t.videoWidth,o.height=t.videoHeight;const e=o.getContext("2d");e&&(B.play(),$(!0),setTimeout((()=>$(!1)),100),e.drawImage(t,0,0,o.width,o.height),o.toBlob((o=>{if(o){const t=new File([o],"snapshot.png",{type:"image/png"});K(t)}})))}},onSwichCamera:()=>{y((o=>!o)),(async()=>{x&&x.getTracks().forEach((o=>o.stop()));const o={video:{facingMode:C?"user":"environment"},audio:!1};try{const t=await navigator.mediaDevices.getUserMedia(o);v(t),k.current&&(k.current.srcObject=t,k.current.play())}catch(o){console.error("Error accessing the camera: ",o),o instanceof Error?alert(N("Error accessing the camera:")+" "+o.message):alert(N("Error accessing the camera"))}})()},tag:O})}),t(l,{open:H,templateVariables:D,filePlaceholders:[],onTemplateVariablesChange:A,onFilePlaceholdersChange:()=>{},onConfirm:()=>L(!1),onCancel:()=>{L(!1),E(-1)},uploadFile:b.uploadFile})]})};export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codicent.d.ts","sourceRoot":"","sources":["../../../src/services/codicent.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,UAAU,QAAS,MAAM,SAerC,CAAC;AA8BF,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACvC,UAAU,EAAE;QAAE,IAAI,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E,MAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAsB9F,iBAAiB,CACrB,QAAQ,GAAE,MAAiB,GAC1B,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAoBpE;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,SACd,MAAM,kBACI,MAAM,YACb,MAAM,KACd,OAAO,CAAC,mBAAmB,CAAC,CA0B7B;CACH"}
|
package/dist/index.d.ts
CHANGED
|
@@ -174,6 +174,7 @@ declare class CodicentService {
|
|
|
174
174
|
getRealtimeConfig(provider?: string): Promise<{
|
|
175
175
|
model: string;
|
|
176
176
|
provider: string;
|
|
177
|
+
url?: string;
|
|
177
178
|
} | null>;
|
|
178
179
|
/**
|
|
179
180
|
* Get translations using the new GetTranslations API endpoint.
|
|
@@ -975,112 +976,6 @@ declare const SearchBox: ({ value, onChange, placeholder, }: {
|
|
|
975
976
|
placeholder: string;
|
|
976
977
|
}) => react_jsx_runtime.JSX.Element;
|
|
977
978
|
|
|
978
|
-
interface HtmlViewProps {
|
|
979
|
-
html: string;
|
|
980
|
-
onDismiss: () => void;
|
|
981
|
-
}
|
|
982
|
-
declare const HtmlView: React__default.FC<HtmlViewProps>;
|
|
983
|
-
|
|
984
|
-
declare const Footer: React__default.FC;
|
|
985
|
-
|
|
986
|
-
declare const Page: React__default.FC<{
|
|
987
|
-
title?: string;
|
|
988
|
-
children: ReactNode;
|
|
989
|
-
hideHeader?: boolean;
|
|
990
|
-
hideFooter?: boolean;
|
|
991
|
-
audio?: AudioRecorder;
|
|
992
|
-
voice?: RealtimeVoice;
|
|
993
|
-
}>;
|
|
994
|
-
|
|
995
|
-
interface UrlProcessorProps {
|
|
996
|
-
service: CodicentService;
|
|
997
|
-
children: (processUrl: (url: string) => Promise<void>) => React__default.ReactNode;
|
|
998
|
-
}
|
|
999
|
-
/**
|
|
1000
|
-
* A component that provides URL processing capabilities for components that need to navigate to URLs with placeholders
|
|
1001
|
-
* Usage:
|
|
1002
|
-
* ```tsx
|
|
1003
|
-
* <UrlProcessor service={service}>
|
|
1004
|
-
* {(processUrl) => (
|
|
1005
|
-
* <Button onClick={() => processUrl("/path/to/page?text={{variable}}")}>
|
|
1006
|
-
* Go to Page
|
|
1007
|
-
* </Button>
|
|
1008
|
-
* )}
|
|
1009
|
-
* </UrlProcessor>
|
|
1010
|
-
* ```
|
|
1011
|
-
*/
|
|
1012
|
-
declare const UrlProcessor: React__default.FC<UrlProcessorProps>;
|
|
1013
|
-
|
|
1014
|
-
declare const DatePicker: React.FC<DatePickerProps>;
|
|
1015
|
-
|
|
1016
|
-
declare const ColorPicker: React.FC<IColorPickerProps>;
|
|
1017
|
-
|
|
1018
|
-
declare const TimePicker: React.FC<TimePickerProps>;
|
|
1019
|
-
|
|
1020
|
-
interface QrCodeDialogProps {
|
|
1021
|
-
isOpen: boolean;
|
|
1022
|
-
onDismiss: () => void;
|
|
1023
|
-
imageUrl: string;
|
|
1024
|
-
}
|
|
1025
|
-
declare const QrCodeDialog: React__default.FC<QrCodeDialogProps>;
|
|
1026
|
-
|
|
1027
|
-
interface QrScannerProps {
|
|
1028
|
-
onScan?: (result: string) => void;
|
|
1029
|
-
onError?: (error: string) => void;
|
|
1030
|
-
width?: number;
|
|
1031
|
-
height?: number;
|
|
1032
|
-
facingMode?: "user" | "environment";
|
|
1033
|
-
className?: string;
|
|
1034
|
-
}
|
|
1035
|
-
declare const QrScanner: React__default.FC<QrScannerProps>;
|
|
1036
|
-
|
|
1037
|
-
interface Message$1 {
|
|
1038
|
-
id: string;
|
|
1039
|
-
content: string;
|
|
1040
|
-
parentId?: string;
|
|
1041
|
-
type?: string;
|
|
1042
|
-
createdAt: Date;
|
|
1043
|
-
}
|
|
1044
|
-
interface GenericJsonRendererProps {
|
|
1045
|
-
schema: Schema;
|
|
1046
|
-
item: Message$1;
|
|
1047
|
-
onPhotoUpdate?: (newPhoto: string) => void;
|
|
1048
|
-
onStatusUpdate?: (isOpen: boolean) => void;
|
|
1049
|
-
onUpdated?: (content: string) => void;
|
|
1050
|
-
onSend?: (content: string, parentId?: string) => Promise<string>;
|
|
1051
|
-
}
|
|
1052
|
-
declare const GenericJsonRenderer: React__default.FC<GenericJsonRendererProps>;
|
|
1053
|
-
|
|
1054
|
-
interface Props {
|
|
1055
|
-
children: ReactNode;
|
|
1056
|
-
fallback?: ReactNode;
|
|
1057
|
-
}
|
|
1058
|
-
interface State {
|
|
1059
|
-
hasError: boolean;
|
|
1060
|
-
error: Error | null;
|
|
1061
|
-
}
|
|
1062
|
-
declare class ErrorBoundary extends Component<Props, State> {
|
|
1063
|
-
constructor(props: Props);
|
|
1064
|
-
static getDerivedStateFromError(error: Error): State;
|
|
1065
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
1066
|
-
render(): ReactNode;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* Component to display when the app is offline
|
|
1071
|
-
*/
|
|
1072
|
-
declare const OfflineMessage: () => react_jsx_runtime.JSX.Element;
|
|
1073
|
-
|
|
1074
|
-
interface LanguageOption {
|
|
1075
|
-
key: string;
|
|
1076
|
-
name: string;
|
|
1077
|
-
}
|
|
1078
|
-
interface LanguageSelectorProps {
|
|
1079
|
-
languages?: LanguageOption[];
|
|
1080
|
-
defaultLanguage?: string;
|
|
1081
|
-
}
|
|
1082
|
-
declare const LanguageSelector: React.FC<LanguageSelectorProps>;
|
|
1083
|
-
|
|
1084
979
|
/** Action configuration for a column, similar to app button actions */
|
|
1085
980
|
interface ColumnAction {
|
|
1086
981
|
/** Icon component to display (e.g., from @fluentui/react-icons). Pass the component itself, not a string name. */
|
|
@@ -1122,36 +1017,6 @@ interface ListViewProps$1 {
|
|
|
1122
1017
|
}
|
|
1123
1018
|
declare const _default: React__default.NamedExoticComponent<ListViewProps$1>;
|
|
1124
1019
|
|
|
1125
|
-
interface RecordModalProps {
|
|
1126
|
-
open: boolean;
|
|
1127
|
-
onClose: () => void;
|
|
1128
|
-
onSave: (data: Record<string, unknown>) => Promise<void>;
|
|
1129
|
-
columns: ColumnDefinition[];
|
|
1130
|
-
initialData?: Record<string, unknown>;
|
|
1131
|
-
title?: string;
|
|
1132
|
-
}
|
|
1133
|
-
declare const RecordModal: React__default.FC<RecordModalProps>;
|
|
1134
|
-
|
|
1135
|
-
interface BulkUploadDialogProps {
|
|
1136
|
-
project: string;
|
|
1137
|
-
hidden: boolean;
|
|
1138
|
-
onDismiss: () => void;
|
|
1139
|
-
sendMessage: (text: string) => Promise<string | undefined>;
|
|
1140
|
-
onUploaded?: () => void;
|
|
1141
|
-
service: CodicentService;
|
|
1142
|
-
tags?: string[];
|
|
1143
|
-
title?: string;
|
|
1144
|
-
description?: string;
|
|
1145
|
-
dropText?: string;
|
|
1146
|
-
}
|
|
1147
|
-
declare const BulkUploadDialog: (props: BulkUploadDialogProps) => react_jsx_runtime.JSX.Element;
|
|
1148
|
-
|
|
1149
|
-
interface CookieBannerProps {
|
|
1150
|
-
enabled: boolean;
|
|
1151
|
-
showFloatingButton?: boolean;
|
|
1152
|
-
}
|
|
1153
|
-
declare const CookieBanner: ({ enabled, showFloatingButton }: CookieBannerProps) => react_jsx_runtime.JSX.Element | null;
|
|
1154
|
-
|
|
1155
1020
|
declare class AppConfig {
|
|
1156
1021
|
constructor();
|
|
1157
1022
|
CHAT_INSTRUCTIONS: string;
|
|
@@ -1305,102 +1170,6 @@ declare function getConfigValue<K extends keyof AppConfigOptions>(key: K): AppCo
|
|
|
1305
1170
|
*/
|
|
1306
1171
|
declare function initCodicentApp(options?: Partial<AppConfigOptions>): void;
|
|
1307
1172
|
|
|
1308
|
-
declare const AppFrame: ({ src, showFooter, title, }: {
|
|
1309
|
-
src: string;
|
|
1310
|
-
showFooter?: boolean;
|
|
1311
|
-
title: string;
|
|
1312
|
-
scrollable?: boolean;
|
|
1313
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
1314
|
-
|
|
1315
|
-
declare const Chat: React__default.FC<{
|
|
1316
|
-
state: CodicentAppState;
|
|
1317
|
-
hideFooter?: boolean;
|
|
1318
|
-
codicent?: string;
|
|
1319
|
-
title?: string;
|
|
1320
|
-
welcomeMessage?: string;
|
|
1321
|
-
}>;
|
|
1322
|
-
|
|
1323
|
-
declare const Compose: React__default.FC<{
|
|
1324
|
-
state: CodicentAppState;
|
|
1325
|
-
}>;
|
|
1326
|
-
|
|
1327
|
-
declare const Snap: FC<{
|
|
1328
|
-
state: CodicentAppState;
|
|
1329
|
-
audio: AudioRecorder;
|
|
1330
|
-
}>;
|
|
1331
|
-
|
|
1332
|
-
declare const Search: React__default.FC<{
|
|
1333
|
-
state: CodicentAppState;
|
|
1334
|
-
}>;
|
|
1335
|
-
|
|
1336
|
-
declare const Login: React__default.FC<{
|
|
1337
|
-
state: CodicentAppState;
|
|
1338
|
-
}>;
|
|
1339
|
-
|
|
1340
|
-
declare const Logout: React.FC<{
|
|
1341
|
-
state: CodicentAppState;
|
|
1342
|
-
}>;
|
|
1343
|
-
|
|
1344
|
-
declare const CrmPage: React__default.FC<{
|
|
1345
|
-
state: CodicentAppState;
|
|
1346
|
-
voice?: RealtimeVoice;
|
|
1347
|
-
}>;
|
|
1348
|
-
|
|
1349
|
-
declare const CrmPagePersistent: React__default.FC<{
|
|
1350
|
-
state: CodicentAppState;
|
|
1351
|
-
voice?: RealtimeVoice;
|
|
1352
|
-
}>;
|
|
1353
|
-
|
|
1354
|
-
declare const ImageViewer: ({ state }: {
|
|
1355
|
-
state: CodicentAppState;
|
|
1356
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
1357
|
-
|
|
1358
|
-
declare const FormInvite: FC<{
|
|
1359
|
-
state: CodicentAppState;
|
|
1360
|
-
}>;
|
|
1361
|
-
|
|
1362
|
-
declare const FormAccept: () => react_jsx_runtime.JSX.Element;
|
|
1363
|
-
|
|
1364
|
-
declare const Sales: React__default.FC<{
|
|
1365
|
-
state: CodicentAppState;
|
|
1366
|
-
}>;
|
|
1367
|
-
|
|
1368
|
-
interface HtmlViewerProps {
|
|
1369
|
-
state: CodicentAppState;
|
|
1370
|
-
}
|
|
1371
|
-
declare const HtmlViewer: React__default.FC<HtmlViewerProps>;
|
|
1372
|
-
|
|
1373
|
-
declare const Purchase: ({ state }: {
|
|
1374
|
-
state: CodicentAppState;
|
|
1375
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
1376
|
-
|
|
1377
|
-
interface HelpProps {
|
|
1378
|
-
content?: string;
|
|
1379
|
-
}
|
|
1380
|
-
declare const Help: FC<HelpProps>;
|
|
1381
|
-
|
|
1382
|
-
declare const Debug: React__default.FC;
|
|
1383
|
-
|
|
1384
|
-
declare function SchemaEditor(): react_jsx_runtime.JSX.Element;
|
|
1385
|
-
|
|
1386
|
-
interface QrScanProps {
|
|
1387
|
-
title?: string;
|
|
1388
|
-
singleShot?: boolean;
|
|
1389
|
-
onScanned: (result: string) => Promise<void>;
|
|
1390
|
-
onBack?: () => void;
|
|
1391
|
-
backgroundImageUrl?: string;
|
|
1392
|
-
audioUrl?: string;
|
|
1393
|
-
}
|
|
1394
|
-
declare const QrScan: FC<QrScanProps>;
|
|
1395
|
-
|
|
1396
|
-
interface FormProps {
|
|
1397
|
-
formId: string;
|
|
1398
|
-
service: CodicentService;
|
|
1399
|
-
appName: string;
|
|
1400
|
-
onFormSubmit?: (messageId: string) => void;
|
|
1401
|
-
}
|
|
1402
|
-
declare const Form: React__default.FC<FormProps>;
|
|
1403
|
-
|
|
1404
1173
|
/**
|
|
1405
1174
|
* @fileoverview Public TypeScript type definitions for codicent-app-sdk
|
|
1406
1175
|
* @module codicent-app-sdk/types
|
|
@@ -1586,6 +1355,268 @@ interface CodicentMessage {
|
|
|
1586
1355
|
createdAt: Date;
|
|
1587
1356
|
}
|
|
1588
1357
|
|
|
1358
|
+
interface DataMessagePickerSelection {
|
|
1359
|
+
message: DataMessage$1;
|
|
1360
|
+
id: string;
|
|
1361
|
+
tag: string;
|
|
1362
|
+
label: string;
|
|
1363
|
+
searchText: string;
|
|
1364
|
+
data: Record<string, string>;
|
|
1365
|
+
originalMessageId?: string;
|
|
1366
|
+
}
|
|
1367
|
+
interface DataMessagePickerProps {
|
|
1368
|
+
service: CodicentService;
|
|
1369
|
+
tag: string;
|
|
1370
|
+
codicent?: string;
|
|
1371
|
+
placeholder?: string;
|
|
1372
|
+
value?: string;
|
|
1373
|
+
disabled?: boolean;
|
|
1374
|
+
debounceMs?: number;
|
|
1375
|
+
minSearchLength?: number;
|
|
1376
|
+
resultLimit?: number;
|
|
1377
|
+
displayKeys?: string[];
|
|
1378
|
+
searchKeys?: string[];
|
|
1379
|
+
primaryKey?: string;
|
|
1380
|
+
secondaryKeys?: string[];
|
|
1381
|
+
dataFilters?: Record<string, string>;
|
|
1382
|
+
noResultsText?: string;
|
|
1383
|
+
onValueChange?: (value: string) => void;
|
|
1384
|
+
onSelect?: (selection: DataMessagePickerSelection) => void;
|
|
1385
|
+
}
|
|
1386
|
+
declare const DataMessagePicker: ({ service, tag, codicent, placeholder, value, disabled, debounceMs, minSearchLength, resultLimit, displayKeys, searchKeys, primaryKey, secondaryKeys, dataFilters, noResultsText, onValueChange, onSelect, }: DataMessagePickerProps) => react_jsx_runtime.JSX.Element;
|
|
1387
|
+
|
|
1388
|
+
interface HtmlViewProps {
|
|
1389
|
+
html: string;
|
|
1390
|
+
onDismiss: () => void;
|
|
1391
|
+
}
|
|
1392
|
+
declare const HtmlView: React__default.FC<HtmlViewProps>;
|
|
1393
|
+
|
|
1394
|
+
declare const Footer: React__default.FC;
|
|
1395
|
+
|
|
1396
|
+
declare const Page: React__default.FC<{
|
|
1397
|
+
title?: string;
|
|
1398
|
+
children: ReactNode;
|
|
1399
|
+
hideHeader?: boolean;
|
|
1400
|
+
hideFooter?: boolean;
|
|
1401
|
+
audio?: AudioRecorder;
|
|
1402
|
+
voice?: RealtimeVoice;
|
|
1403
|
+
}>;
|
|
1404
|
+
|
|
1405
|
+
interface UrlProcessorProps {
|
|
1406
|
+
service: CodicentService;
|
|
1407
|
+
children: (processUrl: (url: string) => Promise<void>) => React__default.ReactNode;
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* A component that provides URL processing capabilities for components that need to navigate to URLs with placeholders
|
|
1411
|
+
* Usage:
|
|
1412
|
+
* ```tsx
|
|
1413
|
+
* <UrlProcessor service={service}>
|
|
1414
|
+
* {(processUrl) => (
|
|
1415
|
+
* <Button onClick={() => processUrl("/path/to/page?text={{variable}}")}>
|
|
1416
|
+
* Go to Page
|
|
1417
|
+
* </Button>
|
|
1418
|
+
* )}
|
|
1419
|
+
* </UrlProcessor>
|
|
1420
|
+
* ```
|
|
1421
|
+
*/
|
|
1422
|
+
declare const UrlProcessor: React__default.FC<UrlProcessorProps>;
|
|
1423
|
+
|
|
1424
|
+
declare const DatePicker: React.FC<DatePickerProps>;
|
|
1425
|
+
|
|
1426
|
+
declare const ColorPicker: React.FC<IColorPickerProps>;
|
|
1427
|
+
|
|
1428
|
+
declare const TimePicker: React.FC<TimePickerProps>;
|
|
1429
|
+
|
|
1430
|
+
interface QrCodeDialogProps {
|
|
1431
|
+
isOpen: boolean;
|
|
1432
|
+
onDismiss: () => void;
|
|
1433
|
+
imageUrl: string;
|
|
1434
|
+
}
|
|
1435
|
+
declare const QrCodeDialog: React__default.FC<QrCodeDialogProps>;
|
|
1436
|
+
|
|
1437
|
+
interface QrScannerProps {
|
|
1438
|
+
onScan?: (result: string) => void;
|
|
1439
|
+
onError?: (error: string) => void;
|
|
1440
|
+
width?: number;
|
|
1441
|
+
height?: number;
|
|
1442
|
+
facingMode?: "user" | "environment";
|
|
1443
|
+
className?: string;
|
|
1444
|
+
}
|
|
1445
|
+
declare const QrScanner: React__default.FC<QrScannerProps>;
|
|
1446
|
+
|
|
1447
|
+
interface Message$1 {
|
|
1448
|
+
id: string;
|
|
1449
|
+
content: string;
|
|
1450
|
+
parentId?: string;
|
|
1451
|
+
type?: string;
|
|
1452
|
+
createdAt: Date;
|
|
1453
|
+
}
|
|
1454
|
+
interface GenericJsonRendererProps {
|
|
1455
|
+
schema: Schema;
|
|
1456
|
+
item: Message$1;
|
|
1457
|
+
onPhotoUpdate?: (newPhoto: string) => void;
|
|
1458
|
+
onStatusUpdate?: (isOpen: boolean) => void;
|
|
1459
|
+
onUpdated?: (content: string) => void;
|
|
1460
|
+
onSend?: (content: string, parentId?: string) => Promise<string>;
|
|
1461
|
+
}
|
|
1462
|
+
declare const GenericJsonRenderer: React__default.FC<GenericJsonRendererProps>;
|
|
1463
|
+
|
|
1464
|
+
interface Props {
|
|
1465
|
+
children: ReactNode;
|
|
1466
|
+
fallback?: ReactNode;
|
|
1467
|
+
}
|
|
1468
|
+
interface State {
|
|
1469
|
+
hasError: boolean;
|
|
1470
|
+
error: Error | null;
|
|
1471
|
+
}
|
|
1472
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
1473
|
+
constructor(props: Props);
|
|
1474
|
+
static getDerivedStateFromError(error: Error): State;
|
|
1475
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
1476
|
+
render(): ReactNode;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* Component to display when the app is offline
|
|
1481
|
+
*/
|
|
1482
|
+
declare const OfflineMessage: () => react_jsx_runtime.JSX.Element;
|
|
1483
|
+
|
|
1484
|
+
interface LanguageOption {
|
|
1485
|
+
key: string;
|
|
1486
|
+
name: string;
|
|
1487
|
+
}
|
|
1488
|
+
interface LanguageSelectorProps {
|
|
1489
|
+
languages?: LanguageOption[];
|
|
1490
|
+
defaultLanguage?: string;
|
|
1491
|
+
}
|
|
1492
|
+
declare const LanguageSelector: React.FC<LanguageSelectorProps>;
|
|
1493
|
+
|
|
1494
|
+
interface RecordModalProps {
|
|
1495
|
+
open: boolean;
|
|
1496
|
+
onClose: () => void;
|
|
1497
|
+
onSave: (data: Record<string, unknown>) => Promise<void>;
|
|
1498
|
+
columns: ColumnDefinition[];
|
|
1499
|
+
initialData?: Record<string, unknown>;
|
|
1500
|
+
title?: string;
|
|
1501
|
+
}
|
|
1502
|
+
declare const RecordModal: React__default.FC<RecordModalProps>;
|
|
1503
|
+
|
|
1504
|
+
interface BulkUploadDialogProps {
|
|
1505
|
+
project: string;
|
|
1506
|
+
hidden: boolean;
|
|
1507
|
+
onDismiss: () => void;
|
|
1508
|
+
sendMessage: (text: string) => Promise<string | undefined>;
|
|
1509
|
+
onUploaded?: () => void;
|
|
1510
|
+
service: CodicentService;
|
|
1511
|
+
tags?: string[];
|
|
1512
|
+
title?: string;
|
|
1513
|
+
description?: string;
|
|
1514
|
+
dropText?: string;
|
|
1515
|
+
}
|
|
1516
|
+
declare const BulkUploadDialog: (props: BulkUploadDialogProps) => react_jsx_runtime.JSX.Element;
|
|
1517
|
+
|
|
1518
|
+
interface CookieBannerProps {
|
|
1519
|
+
enabled: boolean;
|
|
1520
|
+
showFloatingButton?: boolean;
|
|
1521
|
+
}
|
|
1522
|
+
declare const CookieBanner: ({ enabled, showFloatingButton }: CookieBannerProps) => react_jsx_runtime.JSX.Element | null;
|
|
1523
|
+
|
|
1524
|
+
declare const AppFrame: ({ src, showFooter, title, }: {
|
|
1525
|
+
src: string;
|
|
1526
|
+
showFooter?: boolean;
|
|
1527
|
+
title: string;
|
|
1528
|
+
scrollable?: boolean;
|
|
1529
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1530
|
+
|
|
1531
|
+
declare const Chat: React__default.FC<{
|
|
1532
|
+
state: CodicentAppState;
|
|
1533
|
+
hideFooter?: boolean;
|
|
1534
|
+
codicent?: string;
|
|
1535
|
+
title?: string;
|
|
1536
|
+
welcomeMessage?: string;
|
|
1537
|
+
}>;
|
|
1538
|
+
|
|
1539
|
+
declare const Compose: React__default.FC<{
|
|
1540
|
+
state: CodicentAppState;
|
|
1541
|
+
}>;
|
|
1542
|
+
|
|
1543
|
+
declare const Snap: FC<{
|
|
1544
|
+
state: CodicentAppState;
|
|
1545
|
+
audio: AudioRecorder;
|
|
1546
|
+
}>;
|
|
1547
|
+
|
|
1548
|
+
declare const Search: React__default.FC<{
|
|
1549
|
+
state: CodicentAppState;
|
|
1550
|
+
}>;
|
|
1551
|
+
|
|
1552
|
+
declare const Login: React__default.FC<{
|
|
1553
|
+
state: CodicentAppState;
|
|
1554
|
+
}>;
|
|
1555
|
+
|
|
1556
|
+
declare const Logout: React.FC<{
|
|
1557
|
+
state: CodicentAppState;
|
|
1558
|
+
}>;
|
|
1559
|
+
|
|
1560
|
+
declare const CrmPage: React__default.FC<{
|
|
1561
|
+
state: CodicentAppState;
|
|
1562
|
+
voice?: RealtimeVoice;
|
|
1563
|
+
}>;
|
|
1564
|
+
|
|
1565
|
+
declare const CrmPagePersistent: React__default.FC<{
|
|
1566
|
+
state: CodicentAppState;
|
|
1567
|
+
voice?: RealtimeVoice;
|
|
1568
|
+
}>;
|
|
1569
|
+
|
|
1570
|
+
declare const ImageViewer: ({ state }: {
|
|
1571
|
+
state: CodicentAppState;
|
|
1572
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1573
|
+
|
|
1574
|
+
declare const FormInvite: FC<{
|
|
1575
|
+
state: CodicentAppState;
|
|
1576
|
+
}>;
|
|
1577
|
+
|
|
1578
|
+
declare const FormAccept: () => react_jsx_runtime.JSX.Element;
|
|
1579
|
+
|
|
1580
|
+
declare const Sales: React__default.FC<{
|
|
1581
|
+
state: CodicentAppState;
|
|
1582
|
+
}>;
|
|
1583
|
+
|
|
1584
|
+
interface HtmlViewerProps {
|
|
1585
|
+
state: CodicentAppState;
|
|
1586
|
+
}
|
|
1587
|
+
declare const HtmlViewer: React__default.FC<HtmlViewerProps>;
|
|
1588
|
+
|
|
1589
|
+
declare const Purchase: ({ state }: {
|
|
1590
|
+
state: CodicentAppState;
|
|
1591
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1592
|
+
|
|
1593
|
+
interface HelpProps {
|
|
1594
|
+
content?: string;
|
|
1595
|
+
}
|
|
1596
|
+
declare const Help: FC<HelpProps>;
|
|
1597
|
+
|
|
1598
|
+
declare const Debug: React__default.FC;
|
|
1599
|
+
|
|
1600
|
+
declare function SchemaEditor(): react_jsx_runtime.JSX.Element;
|
|
1601
|
+
|
|
1602
|
+
interface QrScanProps {
|
|
1603
|
+
title?: string;
|
|
1604
|
+
singleShot?: boolean;
|
|
1605
|
+
onScanned: (result: string) => Promise<void>;
|
|
1606
|
+
onBack?: () => void;
|
|
1607
|
+
backgroundImageUrl?: string;
|
|
1608
|
+
audioUrl?: string;
|
|
1609
|
+
}
|
|
1610
|
+
declare const QrScan: FC<QrScanProps>;
|
|
1611
|
+
|
|
1612
|
+
interface FormProps {
|
|
1613
|
+
formId: string;
|
|
1614
|
+
service: CodicentService;
|
|
1615
|
+
appName: string;
|
|
1616
|
+
onFormSubmit?: (messageId: string) => void;
|
|
1617
|
+
}
|
|
1618
|
+
declare const Form: React__default.FC<FormProps>;
|
|
1619
|
+
|
|
1589
1620
|
/**
|
|
1590
1621
|
* @fileoverview Simplified app bootstrap for codicent-app-sdk v2
|
|
1591
1622
|
* @module codicent-app-sdk/bootstrap
|
|
@@ -1697,4 +1728,4 @@ interface CodicentApp {
|
|
|
1697
1728
|
*/
|
|
1698
1729
|
declare function createCodicentApp(config: CreateAppConfig): CodicentApp;
|
|
1699
1730
|
|
|
1700
|
-
export { AiInput, AppButtonsConfig, AppConfig, AppConfigOptions, AppFrame, AppInfo, AppStateDefinition, AppStateMachine, AudioIcon, AudioRecorder, AudioRecorderState, AuthStateOptions, BulkUploadDialog, Button, ButtonConfig, CacheEntry, CacheManager, CachedUserSession, Chat, ChatInput, ChatInstructions, ChatMessage, ChatProps, CodicentApp, CodicentAppState, CodicentMessage, CodicentService, CodicentServiceOptions, ColorPicker, ColumnAction, ColumnDefinition, CombinedPlaceholderDialog, Compose, CompoundButton, Content, CookieBanner, CookieBannerProps, CreateAppConfig, CrmPage, CrmPagePersistent, DataMessage$1 as DataMessage, DataSchemas, DatePicker, Debug, ErrorBoundary, FileInfo$1 as FileInfo, FilePlaceholder, FileThumbnail, Footer, Form$1 as Form, FormAccept, FormInvite, Form as FormPage, GenericJsonRenderer, Header, Help, HtmlView, HtmlViewer, ImageViewer as ImageView, Input, ItemType, Label, LanguageSelector, ListDefinitions, _default as ListView, ListViewProps, Login, Logout, Markdown, MemberInfo, Message$2 as Message, Content$1 as MessageContent, MessageInput, MessageItem, ModuleFlags, OfflineMessage, Page, Profile, Prompt, Purchase, QrCodeDialog, QrScan, QrScanner, RealtimeVoice, RecordModal, RecordModalProps, Sales, Schema, SchemaDefinition, SchemaEditor, SchemaItem, Search, SearchBox, Snap, SnapFooter, Spinner, StateContext, TemplateVariable, Text, TextHeader, Textarea, TimePicker, Title, Tool, ToolMergeStrategy, ToolsConfig, TranslationDictionary, TranslationResponse, Translations, TypingIndicator, UploadFile, UploadFileProps, UploadFileRef, UrlProcessor, UseAuthState, UseCodicentAppOptions, UserInfo, VoiceIcon, VoiceIconProps, WavRecorder, WavStreamPlayer, createAppStateMachine, createCodicentApp, generateBrandVariants, getConfigValue, getGpsLocation, getTimeString, initCodicentApp, isMobileDevice, log, setBaseUrl, stateMachineCacheManager, useAppStyles, useAudioRecorder, useAuthState, useChat, useCodicentApp, useCodicentState, useDebugLogs, useLocalization, useObserveDataSchemas, useRealtimeVoiceAI, useStateWithLocalStorage, useTemplateVariables, useToaster, useTools, withWakeLock };
|
|
1731
|
+
export { AiInput, AppButtonsConfig, AppConfig, AppConfigOptions, AppFrame, AppInfo, AppStateDefinition, AppStateMachine, AudioIcon, AudioRecorder, AudioRecorderState, AuthStateOptions, BulkUploadDialog, Button, ButtonConfig, CacheEntry, CacheManager, CachedUserSession, Chat, ChatInput, ChatInstructions, ChatMessage, ChatProps, CodicentApp, CodicentAppState, CodicentMessage, CodicentService, CodicentServiceOptions, ColorPicker, ColumnAction, ColumnDefinition, CombinedPlaceholderDialog, Compose, CompoundButton, Content, CookieBanner, CookieBannerProps, CreateAppConfig, CrmPage, CrmPagePersistent, DataMessage$1 as DataMessage, DataMessagePicker, DataMessagePickerProps, DataMessagePickerSelection, DataSchemas, DatePicker, Debug, ErrorBoundary, FileInfo$1 as FileInfo, FilePlaceholder, FileThumbnail, Footer, Form$1 as Form, FormAccept, FormInvite, Form as FormPage, GenericJsonRenderer, Header, Help, HtmlView, HtmlViewer, ImageViewer as ImageView, Input, ItemType, Label, LanguageSelector, ListDefinitions, _default as ListView, ListViewProps, Login, Logout, Markdown, MemberInfo, Message$2 as Message, Content$1 as MessageContent, MessageInput, MessageItem, ModuleFlags, OfflineMessage, Page, Profile, Prompt, Purchase, QrCodeDialog, QrScan, QrScanner, RealtimeVoice, RecordModal, RecordModalProps, Sales, Schema, SchemaDefinition, SchemaEditor, SchemaItem, Search, SearchBox, Snap, SnapFooter, Spinner, StateContext, TemplateVariable, Text, TextHeader, Textarea, TimePicker, Title, Tool, ToolMergeStrategy, ToolsConfig, TranslationDictionary, TranslationResponse, Translations, TypingIndicator, UploadFile, UploadFileProps, UploadFileRef, UrlProcessor, UseAuthState, UseCodicentAppOptions, UserInfo, VoiceIcon, VoiceIconProps, WavRecorder, WavStreamPlayer, createAppStateMachine, createCodicentApp, generateBrandVariants, getConfigValue, getGpsLocation, getTimeString, initCodicentApp, isMobileDevice, log, setBaseUrl, stateMachineCacheManager, useAppStyles, useAudioRecorder, useAuthState, useChat, useCodicentApp, useCodicentState, useDebugLogs, useLocalization, useObserveDataSchemas, useRealtimeVoiceAI, useStateWithLocalStorage, useTemplateVariables, useToaster, useTools, withWakeLock };
|