codicent-app-sdk 0.3.32 → 0.3.34

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.
@@ -1,5 +1,5 @@
1
1
  import { CodicentService } from "../services";
2
- declare const MessageItem: ({ header, description, timestamp, text, image, tags, id, fileIds, codicentService, busy, onShowHtmlPreview, }: {
2
+ declare const MessageItem: ({ header, description, timestamp, text, image, tags, id, fileIds, codicentService, busy, onEdit, onShowHtmlPreview, }: {
3
3
  id: string;
4
4
  header: string;
5
5
  description: string;
@@ -10,6 +10,7 @@ declare const MessageItem: ({ header, description, timestamp, text, image, tags,
10
10
  codicentService: CodicentService;
11
11
  busy?: boolean;
12
12
  onShowHtmlPreview?: (html: string) => void;
13
+ onEdit?: () => void;
13
14
  timestamp?: string;
14
15
  }) => import("react/jsx-runtime").JSX.Element;
15
16
  export default MessageItem;
@@ -1 +1 @@
1
- {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA4G9C,QAAA,MAAM,WAAW,kHAYd;IACD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CA4NA,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoH9C,QAAA,MAAM,WAAW,0HAad;IACD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CAgOA,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("react-router-dom"),i=require("../services/codicent.js"),s=require("./Markdown.js");require("./Textarea.js"),require("./Button.js");var o=require("./Text.js");require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js");var n=require("../utils/MessageContent.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var a=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var l=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var u=require("./FileThumbnail.js");require("./MessageInput.js"),require("./UploadFile.js"),require("./SnapFooter.js"),require("./Profile.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js");var d=require("../node_modules/@griffel/react/makeStyles.esm.js"),c=require("../node_modules/@fluentui/react-card/lib/components/Card/Card.js"),m=require("../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js"),g=require("../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js"),p=require("../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js"),h=require("../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js"),j=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js"),x=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js"),f=require("../node_modules/@fluentui/tokens/lib/tokens.js");const q=d.makeStyles({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:f.tokens.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:f.tokens.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{position:"absolute",right:"40px",top:"12px",fontSize:"1.5em",cursor:"pointer"},headerButton:{position:"absolute",right:"12px",top:"12px",fontSize:"1.5em",cursor:"pointer"},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}});exports.default=({header:d,description:f,timestamp:S,text:b,image:k,tags:C,id:v,fileIds:w,codicentService:_,busy:I,onShowHtmlPreview:O})=>{const E=q(),N=t.useNavigate(),[T,A]=r.useState(!1),[y,F]=r.useState(!1),R=r.useRef(null),H=Object.keys(a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")),P=H.find((e=>C.includes(e)))||(w.length>0?H.find((e=>"file"===e)):void 0),[L,B]=r.useState([]),{t:M}=l.default(),D=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],G=[M("Typ"),M("Kund"),M("Kontakt"),M("Säljare"),M("Meddelande"),M("Företag"),M("Telefon"),M("E-post"),M("Hemsida"),M("Info"),M("Företag"),M("Roll"),M("Kontakt")];r.useEffect((()=>{Promise.all(w.map((e=>_.getFileInfo(e)))).then((e=>{B(e)}))}),[_,B,w]),r.useEffect((()=>{const e=()=>{if(R.current){const e=R.current.scrollHeight>100+(L.length>0?-72:0);F(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[b,L]);const W=()=>A(!T),V=C.includes("chat")&&(b.includes("#function_result")||b.includes("#finish_reason_function_call")),z=e=>{const r=e.indexOf("```html");if(-1===r)return e;const t=e.indexOf("```",r+7);if(-1===t)return e.substring(r+7);return e.substring(r+7,t)},K=new n.default(b).data;return e.jsxs(c.Card,{className:T?E.expandedCard:E.card,style:{backgroundColor:a.getConfigValue("MESSAGE_HIDE_BAR")?P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:C.includes("chat")?e=>{C.includes("chat")&&(e&&e.stopPropagation(),N("/chat?id="+v))}:void 0,children:[!a.getConfigValue("MESSAGE_HIDE_BAR")&&e.jsx("div",{className:E.rectangle,style:{backgroundColor:P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||void 0}}),e.jsx(m.CardHeader,{image:k?e.jsx("img",{className:E.headerImage,src:"app_logo.svg",alt:"User"}):null,header:I?e.jsx(g.Skeleton,{style:{width:"50%"},children:e.jsx(p.SkeletonItem,{})}):e.jsxs("div",{className:E.header,children:[e.jsx(o.Text,{weight:"semibold",children:d}),S&&e.jsx(o.Text,{weight:"regular",children:S})]}),description:e.jsx(h.Caption1,{className:E.caption,children:f})}),O&&C.includes("html")&&e.jsx(j.FullScreenMaximizeRegular,{className:E.htmlButton,onClick:e=>{e.stopPropagation(),O(z(b))}}),y&&!C.includes("chat")&&T&&e.jsx(x.ArrowCollapseAllRegular,{className:E.headerButton,onClick:W}),y&&!C.includes("chat")&&!T&&e.jsx(x.ArrowExpandAllRegular,{className:E.headerButton,onClick:W}),e.jsxs("div",{ref:R,className:`${E.content} ${T?"":E.truncated}`,children:[L.length>0&&e.jsx("div",{className:E.fileList,children:L.map((r=>e.jsx(u.FileThumbnail,{file:r,getImageUrl:i.CodicentService.getImageUrl,onClick:()=>{r.contentType.startsWith("image")?N(`/image?id=${v}&file=${r.id}`):i.CodicentService.downloadFile(r)}},r.id)))}),I?e.jsxs(g.Skeleton,{style:{width:"100%"},children:[e.jsx(p.SkeletonItem,{}),e.jsx(p.SkeletonItem,{}),e.jsx(p.SkeletonItem,{}),e.jsx(p.SkeletonItem,{}),e.jsx(p.SkeletonItem,{})]}):e.jsx("div",{className:E.text,children:C.includes("html")?e.jsx("iframe",{className:E.iframe,title:"html",srcDoc:z(b),sandbox:"allow-same-origin allow-scripts"}):C.includes("crm")&&0===Object.keys(K).length?e.jsx(s.default,{content:V?"*Tänker...*":K?(()=>{const e=new RegExp(`(${D.join("|")})\\s*:\\s*`,"gi"),r=b.replace(e,((e,r)=>{const t=D.indexOf(r.toUpperCase());-1===t&&console.log("Field not found:",r);return`\n**${-1!==t?G[t]:r}:** `}));return r.trim()})():b}):e.jsx(s.default,{content:V?"*Tänker...*":K&&K&&Object.keys(K).length>0?Object.keys(K).map((e=>{const r=D.indexOf(e.toUpperCase());return`**${-1!==r?G[r]:e}:** ${K[e]}\n`})).join("\n"):b})})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("react-router-dom"),i=require("../services/codicent.js"),s=require("./Markdown.js");require("./Textarea.js"),require("./Button.js");var n=require("./Text.js");require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js");var o=require("../utils/MessageContent.js");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var a=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var l=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var u=require("./FileThumbnail.js");require("./MessageInput.js"),require("./UploadFile.js"),require("./SnapFooter.js"),require("./Profile.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js");var d=require("../node_modules/@griffel/react/makeStyles.esm.js"),c=require("../node_modules/@fluentui/react-card/lib/components/Card/Card.js"),m=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js"),g=require("../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js"),p=require("../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js"),j=require("../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js"),h=require("../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js"),x=require("../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js"),f=require("../node_modules/@fluentui/tokens/lib/tokens.js"),q=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js");const S=d.makeStyles({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px",position:"relative"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px",position:"relative"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:f.tokens.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:f.tokens.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},headerButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},iconButtonRow:{position:"absolute",top:"0.5em",right:"0.5em",display:"flex",alignItems:"center",gap:"0.5em",zIndex:2},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}});exports.default=({header:d,description:f,timestamp:b,text:k,image:C,tags:v,id:w,fileIds:I,codicentService:_,busy:O,onEdit:E,onShowHtmlPreview:N})=>{const T=S(),A=t.useNavigate(),[y,R]=r.useState(!1),[F,B]=r.useState(!1),L=r.useRef(null),H=Object.keys(a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")),P=H.find((e=>v.includes(e)))||(I.length>0?H.find((e=>"file"===e)):void 0),[D,M]=r.useState([]),{t:G}=l.default(),z=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],V=[G("Typ"),G("Kund"),G("Kontakt"),G("Säljare"),G("Meddelande"),G("Företag"),G("Telefon"),G("E-post"),G("Hemsida"),G("Info"),G("Företag"),G("Roll"),G("Kontakt")];r.useEffect((()=>{Promise.all(I.map((e=>_.getFileInfo(e)))).then((e=>{M(e)}))}),[_,M,I]),r.useEffect((()=>{const e=()=>{if(L.current){const e=L.current.scrollHeight>100+(D.length>0?-72:0);B(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[k,D]);const W=()=>R(!y),K=v.includes("chat")&&(k.includes("#function_result")||k.includes("#finish_reason_function_call")),$=e=>{const r=e.indexOf("```html");if(-1===r)return e;const t=e.indexOf("```",r+7);if(-1===t)return e.substring(r+7);return e.substring(r+7,t)},U=new o.default(k).data,Y=P&&a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].editable;return e.jsxs(c.Card,{className:y?T.expandedCard:T.card,style:{backgroundColor:a.getConfigValue("MESSAGE_HIDE_BAR")?P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:v.includes("chat")?e=>{v.includes("chat")&&(e&&e.stopPropagation(),A("/chat?id="+w))}:void 0,children:[!a.getConfigValue("MESSAGE_HIDE_BAR")&&e.jsx("div",{className:T.rectangle,style:{backgroundColor:P?a.getConfigValue("LOGBOOK_TAG_DEFINITIONS")[P].color:a.getConfigValue("APP_HEADER_COLOR")||void 0}}),e.jsxs("div",{className:T.iconButtonRow,children:[Y&&E&&e.jsx(q.Edit20Regular,{className:T.htmlButton,onClick:()=>E()}),N&&!Y&&v.includes("html")&&e.jsx(m.FullScreenMaximizeRegular,{className:T.htmlButton,onClick:e=>{e.stopPropagation(),N($(k))}}),F&&!v.includes("chat")&&y&&e.jsx(g.ArrowCollapseAllRegular,{className:T.headerButton,onClick:W}),F&&!v.includes("chat")&&!y&&e.jsx(g.ArrowExpandAllRegular,{className:T.headerButton,onClick:W})]}),e.jsx(p.CardHeader,{image:C?e.jsx("img",{className:T.headerImage,src:"app_logo.svg",alt:"User"}):null,header:O?e.jsx(j.Skeleton,{style:{width:"50%"},children:e.jsx(h.SkeletonItem,{})}):e.jsxs("div",{className:T.header,children:[e.jsx(n.Text,{weight:"semibold",children:d}),b&&e.jsx(n.Text,{weight:"regular",children:b})]}),description:e.jsx(x.Caption1,{className:T.caption,children:f})}),e.jsxs("div",{ref:L,className:`${T.content} ${y?"":T.truncated}`,children:[D.length>0&&e.jsx("div",{className:T.fileList,children:D.map((r=>e.jsx(u.FileThumbnail,{file:r,getImageUrl:i.CodicentService.getImageUrl,onClick:()=>{r.contentType.startsWith("image")?A(`/image?id=${w}&file=${r.id}`):i.CodicentService.downloadFile(r)}},r.id)))}),O?e.jsxs(j.Skeleton,{style:{width:"100%"},children:[e.jsx(h.SkeletonItem,{}),e.jsx(h.SkeletonItem,{}),e.jsx(h.SkeletonItem,{}),e.jsx(h.SkeletonItem,{}),e.jsx(h.SkeletonItem,{})]}):e.jsx("div",{className:T.text,children:v.includes("html")?e.jsx("iframe",{className:T.iframe,title:"html",srcDoc:$(k),sandbox:"allow-same-origin allow-scripts"}):v.includes("crm")&&0===Object.keys(U).length?e.jsx(s.default,{content:K?"*Tänker...*":U?(()=>{const e=new RegExp(`(${z.join("|")})\\s*:\\s*`,"gi"),r=k.replace(e,((e,r)=>{const t=z.indexOf(r.toUpperCase());-1===t&&console.log("Field not found:",r);return`\n**${-1!==t?V[t]:r}:** `}));return r.trim()})():k}):e.jsx(s.default,{content:K?"*Tänker...*":U&&U&&Object.keys(U).length>0?Object.keys(U).map((e=>{const r=z.indexOf(e.toUpperCase());return`**${-1!==r?V[r]:e}:** ${U[e]}\n`})).join("\n"):k})})]})]})};
2
2
  //# sourceMappingURL=MessageItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBox.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,SAAS,sCAIZ;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB,4CAUA,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBox.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,SAAS,sCAIZ;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB,4CAWA,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../node_modules/@griffel/react/makeStyles.esm.js"),a=require("../node_modules/@fluentui/react-search/lib/components/SearchBox/SearchBox.js");const s=r.makeStyles({searchBox:{width:"100%"}});exports.default=({value:r,onChange:o,placeholder:t})=>{const l=s();return e.jsx(a.SearchBox,{className:l.searchBox,placeholder:t,value:r,onChange:(e,r)=>o(r.value)})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../node_modules/@griffel/react/makeStyles.esm.js"),a=require("../node_modules/@fluentui/react-search/lib/components/SearchBox/SearchBox.js");const s=r.makeStyles({searchBox:{width:"100%"}});exports.default=({value:r,onChange:o,placeholder:l})=>{const t=s();return e.jsx(a.SearchBox,{size:"large",className:t.searchBox,placeholder:l,value:r,onChange:(e,r)=>o(r.value)})};
2
2
  //# sourceMappingURL=SearchBox.js.map
@@ -82,6 +82,7 @@ export interface AppConfigOptions {
82
82
  [tagKey: string]: {
83
83
  name: string;
84
84
  color: string;
85
+ editable?: boolean;
85
86
  };
86
87
  };
87
88
  LOGBOOK_TAGS: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;;IAKpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,2BAA2B,EAAE,MAAM,CAAM;IACzC,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,OAAO,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAC1C,KAAK,EAAE;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YACxD,iBAAiB,EAAE,MAAM,CAAC;YAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB,gBAAgB,EAAE,MAAM,CAAC;YACzB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;SACtB,CAAC;KACH,CAAC;CAyBH;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,WA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AAc,EAAE,OAAO,CAAC;CAIzB;AA6GD,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAG5F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,QAUtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/config/index.ts"],"sourcesContent":[null],"names":["AppConfig","constructor","this","CHAT_INSTRUCTIONS","REALTIME_VOICE_INSTRUCTIONS","apps","rawConfig","ABOUT_TEXT","undefined","APP_BUTTONS","APP_FOOTER_COLOR","APP_HEADER_COLOR","APP_HEADER_ICON_URL","APP_HEADER_TEXT_COLOR","APP_ICON_URL","APP_LOG_CODICENT","APP_LOG_TOKEN","APP_MENU_TITLE","APP_NAME","APP_PREFIX","APP_SAVE_TITLE","APP_SEARCH_TITLE","APP_SLOGAN","APP_SPLASH_TEXT","APP_SPLASH_URL","APP_TEMPLATE","APP_TITLE","AUTH_REDIRECT_URL","AUTH0_AUDIENCE","AUTH0_CLIENT_ID","AUTH0_DOMAIN","AUTH0_PROVIDER_SCOPE","AUTH0_SCOPE","AUTH0_USER_DOMAIN","BUTTON_ACTIVE_COLOR","BUTTON_BACKGROUND_COLOR","BUTTON_BORDER_RADIUS","BUTTON_HOVER_COLOR","BUTTON_TAG","BUTTON_TEXT_COLOR","CHAT_BACKGROUND_IMAGE_URL","CHAT_BOT_BACKGROUND_COLOR","CHAT_BOT_TEXT_COLOR","CHAT_USER_BACKGROUND_COLOR","CHAT_USER_TEXT_COLOR","CHAT_WELCOME","COMPOSE_BACKGROUND_IMAGE_URL","COMPOSE_HIDE_LOCATION","COMPOSE_SIMPLE_ATTACH_FILE","DEFAULT_LANGUAGE","HIDE_CHAT_BUTTON","HIDE_MENU_BUTTON","HIDE_REGISTER_BUTTON","HIDE_SAVE_BUTTON","HOME_BACKGROUND_IMAGE_URL","INDEX_TITLE","LOGBOOK_TAG_DEFINITIONS","LOGBOOK_TAGS","MENU_BACKGROUND_IMAGE_URL","MESSAGE_HIDE_BAR","MODULE_VOICE","PUBLIC_FLOW_CODICENT","REALTIME_VOICE_API_KEY","SEND_BUTTON_ROUND_BACKGROUND","SHOW_CANVAS_BUTTON","SHOW_CHAT_PROMPTS","SHOW_HELP_BUTTON","SHOW_LOGBOOK_BUTTON","SHOW_MICROPHONE_BUTTON","STRIPE_PUBLIC_KEY","SUBSCRIPTION_NEEDED","THEME_WELCOME","USER_PREFIX","WELCOME_STATUS_PROMPT","SHOW_SEND_BUTTON_TEXT","SHOW_SAVE_BUTTON_TEXT","FORM_BACKGROUND_IMAGE_URL","AUTO_TRANSLATE","config","Proxy","get","target","prop","Reflect","receiver","createLoggingConfigProxy","key"],"mappings":"2EAQmB,MAAAA,EACjB,WAAAC,GACIC,KAAEC,kBAAA,GACJD,KAAME,4BAAS,GACbF,KAAAG,KAAS,IAA8B,MAAAC,EAAG,CAC1CC,WAAA,kEAA0BC,eAAiB,wBAAUC,iBAAGD,iCACrCA,sBACPA,aACI,IAAAR,EAChBU,sBAAUF,iCACVA,6BACFA,EAyBHG,sBAAAH,EAEDI,yBAAiCJ,EAC/BK,2BAAmBL,EACnBM,kBAAAN,EACAO,iBAAiB,GACjBC,iBACAC,oBAAaT,EACbU,cAAAV,EACAW,gBAAAX,EACAY,sBACAC,sBAAkBb,EAClBc,gBAAAd,EACAe,qBAAAf,EACAgB,oBAAgBhB,EAChBiB,aAAA,GACAC,eAAAlB,EAEAmB,yBACAC,0CACAC,gBAAgB,mCAChBC,aAAU,oBACVC,qBAAwB,sEACxBC,YAAA,oBACAC,uBAAkBzB,EAClB0B,yBAAqB1B,EACrB2B,6BAAiB3B,EACjB4B,0BAAgB5B,EAChB6B,wBAAoB7B,EACpB8B,WAAW,aAEXC,uBAAmB/B,EACnBgC,+BAAuBhC,EACvBiC,+BAAwBjC,EACxBkC,yBAAqBlC,EACrBL,uBAAoBK,EACpBmC,gCAAoBnC,EACpBoC,0BAAmBpC,EACnBqC,aAAA,UACAC,kCAAyBtC,EACzBuC,2BAAsBvC,EACtBwC,gCAAoBxC,EACpByC,iBAAkB,KAClBC,kBAAmB,EACnBC,kBAAA,EACAC,sBAAA,EACAC,kBAAA,EACAC,+BAAmB9C,EACnB+C,iBAAA/C,EACAgD,wBAAsB,CAAA,EACtBC,aAAc,KACdC,+BAAAlD,EACAmD,kBAAA,EACAC,cAAA,EACAC,4BACAC,0BACAC,8BAA0B,EAC1BC,oBAAoB,EACpBC,qBACAC,kBAAA,EACAC,qBAAa,EACbC,wBAAyB,wBAAoB,iEAA+B,mBAAG,GAC/EC,qBACAC,qBAAA,EACAC,mBAAgB/D,EAChBgE,iBAAYhE,EACZiE,sBAAsB,GACtBC,uBAAsB,EACtBC,uBAA4B,EAC5BC,+BAA2BpE,EAC3BqE,gBAAiB,GAqBlB,MAAAC,WAbyBA,GACxB,OAAiB,IAAAC,MAAAD,EAAQ,CACNE,IAAA,CAAAC,EAAAC,MACJC,QAAYH,IAAOC,EAAAC,EAAAE,IAKlC,CAKDC,CAAA/E,8CA6GD,SAA8BgF,cAO3B"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/config/index.ts"],"sourcesContent":[null],"names":["AppConfig","constructor","this","CHAT_INSTRUCTIONS","REALTIME_VOICE_INSTRUCTIONS","apps","rawConfig","ABOUT_TEXT","undefined","APP_BUTTONS","APP_FOOTER_COLOR","APP_HEADER_COLOR","APP_HEADER_ICON_URL","APP_HEADER_TEXT_COLOR","APP_ICON_URL","APP_LOG_CODICENT","APP_LOG_TOKEN","APP_MENU_TITLE","APP_NAME","APP_PREFIX","APP_SAVE_TITLE","APP_SEARCH_TITLE","APP_SLOGAN","APP_SPLASH_TEXT","APP_SPLASH_URL","APP_TEMPLATE","APP_TITLE","AUTH_REDIRECT_URL","AUTH0_AUDIENCE","AUTH0_CLIENT_ID","AUTH0_DOMAIN","AUTH0_PROVIDER_SCOPE","AUTH0_SCOPE","AUTH0_USER_DOMAIN","BUTTON_ACTIVE_COLOR","BUTTON_BACKGROUND_COLOR","BUTTON_BORDER_RADIUS","BUTTON_HOVER_COLOR","BUTTON_TAG","BUTTON_TEXT_COLOR","CHAT_BACKGROUND_IMAGE_URL","CHAT_BOT_BACKGROUND_COLOR","CHAT_BOT_TEXT_COLOR","CHAT_USER_BACKGROUND_COLOR","CHAT_USER_TEXT_COLOR","CHAT_WELCOME","COMPOSE_BACKGROUND_IMAGE_URL","COMPOSE_HIDE_LOCATION","COMPOSE_SIMPLE_ATTACH_FILE","DEFAULT_LANGUAGE","HIDE_CHAT_BUTTON","HIDE_MENU_BUTTON","HIDE_REGISTER_BUTTON","HIDE_SAVE_BUTTON","HOME_BACKGROUND_IMAGE_URL","INDEX_TITLE","LOGBOOK_TAG_DEFINITIONS","LOGBOOK_TAGS","MENU_BACKGROUND_IMAGE_URL","MESSAGE_HIDE_BAR","MODULE_VOICE","PUBLIC_FLOW_CODICENT","REALTIME_VOICE_API_KEY","SEND_BUTTON_ROUND_BACKGROUND","SHOW_CANVAS_BUTTON","SHOW_CHAT_PROMPTS","SHOW_HELP_BUTTON","SHOW_LOGBOOK_BUTTON","SHOW_MICROPHONE_BUTTON","SUBSCRIPTION_NEEDED","THEME_WELCOME","USER_PREFIX","WELCOME_STATUS_PROMPT","SHOW_SEND_BUTTON_TEXT","SHOW_SAVE_BUTTON_TEXT","FORM_BACKGROUND_IMAGE_URL","AUTO_TRANSLATE","config","Proxy","get","target","prop","receiver","createLoggingConfigProxy","key"],"mappings":"2EAQmB,MAAAA,EACjB,WAAAC,GACIC,KAAEC,kBAAA,GACJD,KAAME,4BAAS,GACbF,KAAAG,KAAS,IAA8B,MAAAC,EAAG,CAC1CC,WAAA,kEAA0BC,eAAiB,wBAAUC,iBAAGD,iCACrCA,sBACPA,aACI,IAAAR,EAChBU,sBAAUF,iCACVA,6BACFA,EAyBHG,sBAAAH,EAEDI,yBAAiCJ,EAC/BK,2BAA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["../../../src/pages/Sales.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AA0F7D,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAoLvD,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Sales.d.ts","sourceRoot":"","sources":["../../../src/pages/Sales.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AA0F7D,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAkMvD,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react");require("../components/Markdown.js");var s=require("../components/Textarea.js"),t=require("../components/Button.js"),r=require("../components/Text.js");require("../components/Spinner.js");var n=require("../components/Input.js");require("../components/TextHeader.js"),require("../components/TypingIndicator.js");var a=require("../components/Dialog.js");require("../components/ChatInput.js"),require("../components/CombinedPlaceholderDialog.js"),require("../components/ChatMessage.js"),require("../components/Header.js"),require("../services/codicent.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var i=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("./AppFrame.js"),require("./Snap.js"),require("./Search.js"),require("./Login.js"),require("./CrmPage.js"),require("./ImageView.js"),require("./FormInvite.js"),require("./FormAccept.js"),require("../stores/chatStore.js");var l=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js"),require("../components/FileThumbnail.js"),require("../components/MessageInput.js"),require("../components/UploadFile.js"),require("../components/SnapFooter.js"),require("../components/Profile.js"),require("../components/MessageItem.js"),require("../components/Content.js"),require("../components/AiInput.js"),require("../components/SearchBox.js"),require("../components/HtmlView.js"),require("../components/Footer.js");var c=require("../components/Page.js"),d=require("../node_modules/@griffel/react/makeStyles.esm.js"),u=require("../node_modules/@fluentui/tokens/lib/tokens.js"),p=require("../node_modules/@griffel/core/index.esm.js"),m=require("../node_modules/@fluentui/react-image/lib/components/Image/Image.js"),g=require("../node_modules/@griffel/core/mergeClasses.esm.js");const h=d.makeStyles({root:{display:"flex",flexDirection:"column",height:"100%",touchAction:"pan-y"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:i.getConfigValue("APP_HEADER_COLOR")||u.tokens.colorBrandBackground,color:u.tokens.colorNeutralForegroundOnBrand,...p.shorthands.padding("10px","20px")},logo:{maxWidth:"100px",maxHeight:"50px",height:"auto",cursor:"pointer"},inputContainer:{display:"flex",justifyContent:"flex-end",alignItems:"center",maxWidth:"300px",width:"200px",paddingLeft:"10px"},dashboard:{display:"flex",justifyContent:"space-around",width:"100%",marginTop:"20px"},statBox:{...p.shorthands.padding("10px"),...p.shorthands.borderRadius("12px"),minWidth:"50px",textAlign:"center",color:"white"},buttonContainer:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",gap:"30px",alignItems:"center",...p.shorthands.padding("20px")},actionButton:{width:"14rem",minWidth:"15rem",height:"3rem"},textAreaContainer:{display:"flex",flexDirection:"column",gap:"10px"},opened:{backgroundColor:"#1a5614"},not_home:{backgroundColor:"#f44336"},sales:{backgroundColor:"#2196F3"},call_back:{backgroundColor:"#FF9800"}}),j={opened:"#1a5614",not_home:"#f44336",sales:"#2196F3",call_back:"#FF9800"},x=()=>{const d=h(),{t:u}=l.default(),[p,x]=o.useState(""),[f,q]=o.useState(),[C,v]=o.useState({opened:0,not_home:0,sales:0,call_back:0}),[_,b]=o.useState([]),[k,w]=o.useState(!1),[y,I]=o.useState(""),[S,A]=o.useState(""),[F,P]=o.useState(""),[$,N]=o.useState(!1),B=o.useCallback((()=>new Promise((e=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((o=>{const s=`#position (${o.coords.latitude},${o.coords.longitude})`;e(s)})):e(void 0)}))),[q]);o.useEffect((()=>{window.Codicent.getDataMessages({codicent:i.getConfigValue("APP_NAME"),tags:["sales_code"]}).then((e=>{e=e.filter((e=>"1"!==e.data.inactive)),b(e)})).catch(console.error),B()}),[]);const D=async()=>{if(!p)return;const e=["not_home","sales","call_back","opened"],o=new Date;o.setHours(0,0,0,0);const s={...C};for(const t of e){const e=await window.Codicent.getMessages({search:`#${t} #sales_code_${p}`,afterTimestamp:o,length:1e4});s[t]=e.filter((e=>e.content.includes(`#${t} `)&&e.content.includes(`#sales_code_${p}`))).length}v(s)},M=async(e,o="")=>{const s=await B();console.log("Got position",s);const t=`@${i.getConfigValue("APP_NAME")} #sales_code_${p} #${e} ${s||""} ${o.trim().length>0?"#comment ":""}${o}`.trim();await window.Codicent.postMessage({message:t}),D()};return e.jsx(c.Page,{hideHeader:!0,children:e.jsxs("div",{className:d.root,children:[e.jsxs("div",{className:d.header,children:[e.jsx(m.Image,{src:S||i.getConfigValue("APP_ICON_URL")||"https://via.placeholder.com/100",className:d.logo,onClick:()=>F&&window.open(F,"_blank")}),e.jsx("div",{className:d.inputContainer,children:e.jsx(n.Input,{value:p,onChange:e=>x(e.target.value),onBlur:()=>{const e=_.find((e=>e.data.code===p));if(e)A(`https://codicent.com/app/GetImage?fileId=${e.fileId}&width=100`),P(e.data.link),N(!0),D();else{const e=_.find((e=>e.data.code2===p.toUpperCase()));e?(A(`https://codicent.com/app/GetImage?fileId=${e.fileIds&&e.fileIds.length>1?e.fileIds[1]:e.fileId}&width=100`),P(e.data.link2),N(!0),D()):(N(!1),alert(u("Fel försäljningskod!")))}},placeholder:u("Fyll i försäljningskod"),maxLength:16,size:"large"})})]}),$&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:d.dashboard,children:Object.keys(C).map((o=>{return e.jsx("div",{className:(s=o,g.mergeClasses(d.statBox,d[s])),children:e.jsx(r.Text,{weight:"bold",size:400,children:C[o]})},o);var s}))}),e.jsx("div",{className:d.buttonContainer,children:Object.entries(j).map((([o,s])=>e.jsx(t.Button,{size:"large",className:d.actionButton,style:{backgroundColor:s,color:"white"},onClick:()=>{M(o),"opened"===o&&w(!0),"sales"===o&&window.open(F,"_blank")},children:o.charAt(0).toUpperCase()+o.slice(1).replace("_"," ")},o)))}),e.jsxs(a.Dialog,{open:k,children:[e.jsx(a.DialogTitle,{children:u("Skriv in avvikelse")}),e.jsx(a.DialogContent,{children:e.jsx("div",{className:d.textAreaContainer,children:e.jsx(s.Textarea,{value:y,onChange:e=>I(e.target.value),placeholder:u("Skriv din text här..."),rows:4,size:"large"})})}),e.jsx(a.DialogActions,{children:e.jsx(t.Button,{appearance:"primary",onClick:()=>{M("anomaly",`\n${y}`),w(!1),I("")},children:u("Spara")})})]})]})]})})};exports.Sales=x,exports.default=x;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react");require("../components/Markdown.js");var s=require("../components/Textarea.js"),t=require("../components/Button.js"),n=require("../components/Text.js");require("../components/Spinner.js");var r=require("../components/Input.js");require("../components/TextHeader.js"),require("../components/TypingIndicator.js");var a=require("../components/Dialog.js");require("../components/ChatInput.js"),require("../components/CombinedPlaceholderDialog.js"),require("../components/ChatMessage.js"),require("../components/Header.js"),require("../services/codicent.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var i=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("./AppFrame.js"),require("./Snap.js"),require("./Search.js"),require("./Login.js"),require("./CrmPage.js"),require("./ImageView.js"),require("./FormInvite.js"),require("./FormAccept.js"),require("../stores/chatStore.js");var l=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js"),require("../components/FileThumbnail.js"),require("../components/MessageInput.js"),require("../components/UploadFile.js"),require("../components/SnapFooter.js"),require("../components/Profile.js"),require("../components/MessageItem.js"),require("../components/Content.js"),require("../components/AiInput.js"),require("../components/SearchBox.js"),require("../components/HtmlView.js"),require("../components/Footer.js");var c=require("../components/Page.js"),d=require("../node_modules/@griffel/react/makeStyles.esm.js"),u=require("../node_modules/@fluentui/tokens/lib/tokens.js"),p=require("../node_modules/@griffel/core/index.esm.js"),m=require("../node_modules/@fluentui/react-image/lib/components/Image/Image.js"),g=require("../node_modules/@griffel/core/mergeClasses.esm.js");const h=d.makeStyles({root:{display:"flex",flexDirection:"column",height:"100%",touchAction:"pan-y"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:i.getConfigValue("APP_HEADER_COLOR")||u.tokens.colorBrandBackground,color:u.tokens.colorNeutralForegroundOnBrand,...p.shorthands.padding("10px","20px")},logo:{maxWidth:"100px",maxHeight:"50px",height:"auto",cursor:"pointer"},inputContainer:{display:"flex",justifyContent:"flex-end",alignItems:"center",maxWidth:"300px",width:"200px",paddingLeft:"10px"},dashboard:{display:"flex",justifyContent:"space-around",width:"100%",marginTop:"20px"},statBox:{...p.shorthands.padding("10px"),...p.shorthands.borderRadius("12px"),minWidth:"50px",textAlign:"center",color:"white"},buttonContainer:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",gap:"30px",alignItems:"center",...p.shorthands.padding("20px")},actionButton:{width:"14rem",minWidth:"15rem",height:"3rem"},textAreaContainer:{display:"flex",flexDirection:"column",gap:"10px"},opened:{backgroundColor:"#1a5614"},not_home:{backgroundColor:"#f44336"},sales:{backgroundColor:"#2196F3"},call_back:{backgroundColor:"#FF9800"}}),j={opened:"#1a5614",not_home:"#f44336",sales:"#2196F3",call_back:"#FF9800"},x=()=>{const d=h(),{t:u}=l.default(),[p,x]=o.useState(""),[f,q]=o.useState(),[C,v]=o.useState({opened:0,not_home:0,sales:0,call_back:0}),[k,_]=o.useState([]),[b,w]=o.useState(!1),[y,I]=o.useState(""),[S,A]=o.useState(""),[F,D]=o.useState(""),[P,$]=o.useState(!1),[B,N]=o.useState(!1),M=o.useCallback((()=>new Promise((e=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((o=>{const s=`#position (${o.coords.latitude},${o.coords.longitude})`;e(s)})):e(void 0)}))),[q]);o.useEffect((()=>{window.Codicent.getDataMessages({codicent:i.getConfigValue("APP_NAME"),tags:["sales_code"]}).then((e=>{e=e.filter((e=>"1"!==e.data.inactive)),_(e)})).catch(console.error),M()}),[]);const T=async()=>{if(!p)return;const e=["not_home","sales","call_back","opened"],o=new Date;o.setHours(0,0,0,0);const s={...C};for(const t of e){const e=await window.Codicent.getMessages({search:`#${t} #sales_code_${p}`,afterTimestamp:o,length:1e4});s[t]=e.filter((e=>e.content.includes(`#${t} `)&&e.content.includes(`#sales_code_${p}`))).length}v(s)},O=async(e,o="")=>{const s=await M();console.log("Got position",s);const t=`@${i.getConfigValue("APP_NAME")} #sales_code_${p} #${e} ${s||""} ${o.trim().length>0?"#comment ":""}${o}`.trim();await window.Codicent.postMessage({message:t}),T()};return e.jsx(c.Page,{hideHeader:!0,children:e.jsxs("div",{className:d.root,children:[e.jsxs("div",{className:d.header,children:[e.jsx(m.Image,{src:S||i.getConfigValue("APP_ICON_URL")||"https://via.placeholder.com/100",className:d.logo,onClick:()=>F&&N(!0)}),e.jsx("div",{className:d.inputContainer,children:e.jsx(r.Input,{value:p,onChange:e=>x(e.target.value),onBlur:()=>{const e=k.find((e=>e.data.code===p));if(e)A(`https://codicent.com/app/GetImage?fileId=${e.fileId}&width=100`),D(e.data.link),$(!0),T();else{const e=k.find((e=>e.data.code2===p.toUpperCase()));e?(A(`https://codicent.com/app/GetImage?fileId=${e.fileIds&&e.fileIds.length>1?e.fileIds[1]:e.fileId}&width=100`),D(e.data.link2),$(!0),T()):($(!1),alert(u("Fel försäljningskod!")))}},placeholder:u("Fyll i försäljningskod"),maxLength:16,size:"large"})})]}),P&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:d.dashboard,children:Object.keys(C).map((o=>{return e.jsx("div",{className:(s=o,g.mergeClasses(d.statBox,d[s])),children:e.jsx(n.Text,{weight:"bold",size:400,children:C[o]})},o);var s}))}),e.jsx("div",{className:d.buttonContainer,children:Object.entries(j).map((([o,s])=>e.jsx(t.Button,{size:"large",className:d.actionButton,style:{backgroundColor:s,color:"white"},onClick:()=>{O(o),"opened"===o&&w(!0),"sales"===o&&N(!0)},children:o.charAt(0).toUpperCase()+o.slice(1).replace("_"," ")},o)))}),e.jsxs(a.Dialog,{open:b,children:[e.jsx(a.DialogTitle,{children:u("Skriv in avvikelse")}),e.jsx(a.DialogContent,{children:e.jsx("div",{className:d.textAreaContainer,children:e.jsx(s.Textarea,{value:y,onChange:e=>I(e.target.value),placeholder:u("Skriv din text här..."),rows:4,size:"large"})})}),e.jsx(a.DialogActions,{children:e.jsx(t.Button,{appearance:"primary",onClick:()=>{O("anomaly",`\n${y}`),w(!1),I("")},children:u("Spara")})})]}),e.jsxs(a.Dialog,{open:B,children:[e.jsx(a.DialogTitle,{children:u("Godkännande")}),e.jsx(a.DialogContent,{children:u("Är kunden över 23 år?")}),e.jsxs(a.DialogActions,{children:[e.jsx(t.Button,{appearance:"primary",onClick:()=>window.open(F,"_blank"),children:u("OK")}),e.jsx(t.Button,{appearance:"secondary",onClick:()=>N(!1),children:u("Avbryt")})]})]})]})]})})};exports.Sales=x,exports.default=x;
2
2
  //# sourceMappingURL=Sales.js.map
@@ -1,5 +1,5 @@
1
1
  import { CodicentService } from "../services";
2
- declare const MessageItem: ({ header, description, timestamp, text, image, tags, id, fileIds, codicentService, busy, onShowHtmlPreview, }: {
2
+ declare const MessageItem: ({ header, description, timestamp, text, image, tags, id, fileIds, codicentService, busy, onEdit, onShowHtmlPreview, }: {
3
3
  id: string;
4
4
  header: string;
5
5
  description: string;
@@ -10,6 +10,7 @@ declare const MessageItem: ({ header, description, timestamp, text, image, tags,
10
10
  codicentService: CodicentService;
11
11
  busy?: boolean;
12
12
  onShowHtmlPreview?: (html: string) => void;
13
+ onEdit?: () => void;
13
14
  timestamp?: string;
14
15
  }) => import("react/jsx-runtime").JSX.Element;
15
16
  export default MessageItem;
@@ -1 +1 @@
1
- {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA4G9C,QAAA,MAAM,WAAW,kHAYd;IACD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CA4NA,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoH9C,QAAA,MAAM,WAAW,0HAad;IACD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4CAgOA,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{useNavigate as n}from"react-router-dom";import{CodicentService as s}from"../services/codicent.js";import a from"./Markdown.js";import"./Textarea.js";import"./Button.js";import{Text as l}from"./Text.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import m from"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as d}from"../config/index.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"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import p from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{FileThumbnail as c}from"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./SnapFooter.js";import"./Profile.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import{makeStyles as u}from"../node_modules/@griffel/react/makeStyles.esm.js";import{Card as h}from"../node_modules/@fluentui/react-card/lib/components/Card/Card.js";import{CardHeader as g}from"../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js";import{Skeleton as f}from"../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js";import{SkeletonItem as j}from"../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js";import{Caption1 as x}from"../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js";import{FullScreenMaximizeRegular as b}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js";import{ArrowCollapseAllRegular as S,ArrowExpandAllRegular as k}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js";import{tokens as w}from"../node_modules/@fluentui/tokens/lib/tokens.js";const _=u({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:w.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:w.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{position:"absolute",right:"40px",top:"12px",fontSize:"1.5em",cursor:"pointer"},headerButton:{position:"absolute",right:"12px",top:"12px",fontSize:"1.5em",cursor:"pointer"},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}}),O=({header:u,description:w,timestamp:O,text:C,image:E,tags:I,id:v,fileIds:N,codicentService:T,busy:y,onShowHtmlPreview:A})=>{const F=_(),H=n(),[L,P]=o(!1),[R,B]=o(!1),D=i(null),M=Object.keys(d("LOGBOOK_TAG_DEFINITIONS")),G=M.find((e=>I.includes(e)))||(N.length>0?M.find((e=>"file"===e)):void 0),[W,K]=o([]),{t:$}=p(),z=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],U=[$("Typ"),$("Kund"),$("Kontakt"),$("Säljare"),$("Meddelande"),$("Företag"),$("Telefon"),$("E-post"),$("Hemsida"),$("Info"),$("Företag"),$("Roll"),$("Kontakt")];r((()=>{Promise.all(N.map((e=>T.getFileInfo(e)))).then((e=>{K(e)}))}),[T,K,N]),r((()=>{const e=()=>{if(D.current){const e=D.current.scrollHeight>100+(W.length>0?-72:0);B(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[C,W]);const Y=()=>P(!L),V=I.includes("chat")&&(C.includes("#function_result")||C.includes("#finish_reason_function_call")),X=e=>{const t=e.indexOf("```html");if(-1===t)return e;const o=e.indexOf("```",t+7);if(-1===o)return e.substring(t+7);return e.substring(t+7,o)},q=new m(C).data;return e(h,{className:L?F.expandedCard:F.card,style:{backgroundColor:d("MESSAGE_HIDE_BAR")?G?d("LOGBOOK_TAG_DEFINITIONS")[G].color:d("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:I.includes("chat")?e=>{I.includes("chat")&&(e&&e.stopPropagation(),H("/chat?id="+v))}:void 0,children:[!d("MESSAGE_HIDE_BAR")&&t("div",{className:F.rectangle,style:{backgroundColor:G?d("LOGBOOK_TAG_DEFINITIONS")[G].color:d("APP_HEADER_COLOR")||void 0}}),t(g,{image:E?t("img",{className:F.headerImage,src:"app_logo.svg",alt:"User"}):null,header:y?t(f,{style:{width:"50%"},children:t(j,{})}):e("div",{className:F.header,children:[t(l,{weight:"semibold",children:u}),O&&t(l,{weight:"regular",children:O})]}),description:t(x,{className:F.caption,children:w})}),A&&I.includes("html")&&t(b,{className:F.htmlButton,onClick:e=>{e.stopPropagation(),A(X(C))}}),R&&!I.includes("chat")&&L&&t(S,{className:F.headerButton,onClick:Y}),R&&!I.includes("chat")&&!L&&t(k,{className:F.headerButton,onClick:Y}),e("div",{ref:D,className:`${F.content} ${L?"":F.truncated}`,children:[W.length>0&&t("div",{className:F.fileList,children:W.map((e=>t(c,{file:e,getImageUrl:s.getImageUrl,onClick:()=>{e.contentType.startsWith("image")?H(`/image?id=${v}&file=${e.id}`):s.downloadFile(e)}},e.id)))}),y?e(f,{style:{width:"100%"},children:[t(j,{}),t(j,{}),t(j,{}),t(j,{}),t(j,{})]}):t("div",{className:F.text,children:I.includes("html")?t("iframe",{className:F.iframe,title:"html",srcDoc:X(C),sandbox:"allow-same-origin allow-scripts"}):I.includes("crm")&&0===Object.keys(q).length?t(a,{content:V?"*Tänker...*":q?(()=>{const e=new RegExp(`(${z.join("|")})\\s*:\\s*`,"gi");return C.replace(e,((e,t)=>{const o=z.indexOf(t.toUpperCase());-1===o&&console.log("Field not found:",t);return`\n**${-1!==o?U[o]:t}:** `})).trim()})():C}):t(a,{content:V?"*Tänker...*":q&&q&&Object.keys(q).length>0?Object.keys(q).map((e=>{const t=z.indexOf(e.toUpperCase());return`**${-1!==t?U[t]:e}:** ${q[e]}\n`})).join("\n"):C})})]})]})};export{O as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as i,useEffect as r}from"react";import{useNavigate as n}from"react-router-dom";import{CodicentService as s}from"../services/codicent.js";import a from"./Markdown.js";import"./Textarea.js";import"./Button.js";import{Text as l}from"./Text.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import m from"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as d}from"../config/index.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"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import c from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{FileThumbnail as p}from"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./SnapFooter.js";import"./Profile.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import{makeStyles as u}from"../node_modules/@griffel/react/makeStyles.esm.js";import{Card as h}from"../node_modules/@fluentui/react-card/lib/components/Card/Card.js";import{FullScreenMaximizeRegular as g}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-2.js";import{ArrowCollapseAllRegular as f,ArrowExpandAllRegular as j}from"../node_modules/@fluentui/react-icons/lib/icons/chunk-0.js";import{CardHeader as x}from"../node_modules/@fluentui/react-card/lib/components/CardHeader/CardHeader.js";import{Skeleton as b}from"../node_modules/@fluentui/react-skeleton/lib/components/Skeleton/Skeleton.js";import{SkeletonItem as k}from"../node_modules/@fluentui/react-skeleton/lib/components/SkeletonItem/SkeletonItem.js";import{Caption1 as w}from"../node_modules/@fluentui/react-text/lib/components/presets/Caption1/Caption1.js";import{tokens as S}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{Edit20Regular as _}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-7.js";const O=u({iframe:{border:"none",width:"100%",height:"100%"},main:{gap:"36px",display:"flex",flexDirection:"column",flexWrap:"wrap"},card:{minWidth:"300px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",maxHeight:"11em",borderRadius:"10px",position:"relative"},expandedCard:{minWidth:"320px",maxWidth:"100%",height:"fit-content",marginBottom:"1em",paddingLeft:"1em",borderRadius:"10px",position:"relative"},text:{margin:"0.5em",whiteSpace:"normal",fontSize:"larger"},caption:{color:S.colorNeutralForeground3},headerImage:{borderRadius:"4px",maxWidth:"44px",maxHeight:"44px"},rectangle:{margin:0,top:"-5px",left:"-2px",width:"5px",position:"absolute",height:"100%"},fileList:{display:"flex",overflowX:"auto",overflowY:"hidden",scrollbarWidth:"thin",msOverflowStyle:"none",padding:"4px",margin:"0 -4px",maxWidth:"100%",boxSizing:"border-box","&::-webkit-scrollbar":{height:"6px"},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:S.colorNeutralStroke1,borderRadius:"3px"}},htmlButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},headerButton:{fontSize:"1.5em",cursor:"pointer",marginLeft:"0.5em"},iconButtonRow:{position:"absolute",top:"0.5em",right:"0.5em",display:"flex",alignItems:"center",gap:"0.5em",zIndex:2},content:{overflow:"hidden",transition:"max-height 0.3s ease-out",userSelect:"text"},truncated:{maxHeight:"10em"},header:{display:"flex",flexDirection:"row",gap:"0.5em"}}),I=({header:u,description:S,timestamp:I,text:v,image:C,tags:E,id:N,fileIds:T,codicentService:y,busy:A,onEdit:B,onShowHtmlPreview:F})=>{const L=O(),R=n(),[H,P]=o(!1),[D,G]=o(!1),M=i(null),W=Object.keys(d("LOGBOOK_TAG_DEFINITIONS")),z=W.find((e=>E.includes(e)))||(T.length>0?W.find((e=>"file"===e)):void 0),[K,$]=o([]),{t:U}=c(),Y=["TYPE","CUSTOMER","CONTACT","SALESPERSON","MESSAGE","COMPANY","PHONE","EMAIL","WEBSITE","INFO","FÖRETAG","ROLE","KONTAKT"],V=[U("Typ"),U("Kund"),U("Kontakt"),U("Säljare"),U("Meddelande"),U("Företag"),U("Telefon"),U("E-post"),U("Hemsida"),U("Info"),U("Företag"),U("Roll"),U("Kontakt")];r((()=>{Promise.all(T.map((e=>y.getFileInfo(e)))).then((e=>{$(e)}))}),[y,$,T]),r((()=>{const e=()=>{if(M.current){const e=M.current.scrollHeight>100+(K.length>0?-72:0);G(e)}};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[v,K]);const X=()=>P(!H),q=E.includes("chat")&&(v.includes("#function_result")||v.includes("#finish_reason_function_call")),J=e=>{const t=e.indexOf("```html");if(-1===t)return e;const o=e.indexOf("```",t+7);if(-1===o)return e.substring(t+7);return e.substring(t+7,o)},Q=new m(v).data,Z=z&&d("LOGBOOK_TAG_DEFINITIONS")[z].editable;return e(h,{className:H?L.expandedCard:L.card,style:{backgroundColor:d("MESSAGE_HIDE_BAR")?z?d("LOGBOOK_TAG_DEFINITIONS")[z].color:d("APP_HEADER_COLOR")||"#eee":"#eee"},onClick:E.includes("chat")?e=>{E.includes("chat")&&(e&&e.stopPropagation(),R("/chat?id="+N))}:void 0,children:[!d("MESSAGE_HIDE_BAR")&&t("div",{className:L.rectangle,style:{backgroundColor:z?d("LOGBOOK_TAG_DEFINITIONS")[z].color:d("APP_HEADER_COLOR")||void 0}}),e("div",{className:L.iconButtonRow,children:[Z&&B&&t(_,{className:L.htmlButton,onClick:()=>B()}),F&&!Z&&E.includes("html")&&t(g,{className:L.htmlButton,onClick:e=>{e.stopPropagation(),F(J(v))}}),D&&!E.includes("chat")&&H&&t(f,{className:L.headerButton,onClick:X}),D&&!E.includes("chat")&&!H&&t(j,{className:L.headerButton,onClick:X})]}),t(x,{image:C?t("img",{className:L.headerImage,src:"app_logo.svg",alt:"User"}):null,header:A?t(b,{style:{width:"50%"},children:t(k,{})}):e("div",{className:L.header,children:[t(l,{weight:"semibold",children:u}),I&&t(l,{weight:"regular",children:I})]}),description:t(w,{className:L.caption,children:S})}),e("div",{ref:M,className:`${L.content} ${H?"":L.truncated}`,children:[K.length>0&&t("div",{className:L.fileList,children:K.map((e=>t(p,{file:e,getImageUrl:s.getImageUrl,onClick:()=>{e.contentType.startsWith("image")?R(`/image?id=${N}&file=${e.id}`):s.downloadFile(e)}},e.id)))}),A?e(b,{style:{width:"100%"},children:[t(k,{}),t(k,{}),t(k,{}),t(k,{}),t(k,{})]}):t("div",{className:L.text,children:E.includes("html")?t("iframe",{className:L.iframe,title:"html",srcDoc:J(v),sandbox:"allow-same-origin allow-scripts"}):E.includes("crm")&&0===Object.keys(Q).length?t(a,{content:q?"*Tänker...*":Q?(()=>{const e=new RegExp(`(${Y.join("|")})\\s*:\\s*`,"gi");return v.replace(e,((e,t)=>{const o=Y.indexOf(t.toUpperCase());-1===o&&console.log("Field not found:",t);return`\n**${-1!==o?V[o]:t}:** `})).trim()})():v}):t(a,{content:q?"*Tänker...*":Q&&Q&&Object.keys(Q).length>0?Object.keys(Q).map((e=>{const t=Y.indexOf(e.toUpperCase());return`**${-1!==t?V[t]:e}:** ${Q[e]}\n`})).join("\n"):v})})]})]})};export{I as default};
2
2
  //# sourceMappingURL=MessageItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBox.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,SAAS,sCAIZ;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB,4CAUA,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../src/components/SearchBox.tsx"],"names":[],"mappings":"AAmBA,QAAA,MAAM,SAAS,sCAIZ;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB,4CAWA,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsx as e}from"react/jsx-runtime";import{makeStyles as o}from"../node_modules/@griffel/react/makeStyles.esm.js";import{SearchBox as a}from"../node_modules/@fluentui/react-search/lib/components/SearchBox/SearchBox.js";const r=o({searchBox:{width:"100%"}}),s=({value:o,onChange:s,placeholder:t})=>{const c=r();return e(a,{className:c.searchBox,placeholder:t,value:o,onChange:(e,o)=>s(o.value)})};export{s as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{makeStyles as o}from"../node_modules/@griffel/react/makeStyles.esm.js";import{SearchBox as a}from"../node_modules/@fluentui/react-search/lib/components/SearchBox/SearchBox.js";const r=o({searchBox:{width:"100%"}}),s=({value:o,onChange:s,placeholder:l})=>{const t=r();return e(a,{size:"large",className:t.searchBox,placeholder:l,value:o,onChange:(e,o)=>s(o.value)})};export{s as default};
2
2
  //# sourceMappingURL=SearchBox.js.map
@@ -82,6 +82,7 @@ export interface AppConfigOptions {
82
82
  [tagKey: string]: {
83
83
  name: string;
84
84
  color: string;
85
+ editable?: boolean;
85
86
  };
86
87
  };
87
88
  LOGBOOK_TAGS: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;;IAKpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,2BAA2B,EAAE,MAAM,CAAM;IACzC,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,OAAO,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAC1C,KAAK,EAAE;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YACxD,iBAAiB,EAAE,MAAM,CAAC;YAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB,gBAAgB,EAAE,MAAM,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B,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,SAAS,GAAG,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,SAAS,GAAG,MAAM,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;CAIzB;AA6GD,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAG5F;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,QAUtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/config/index.ts"],"sourcesContent":[null],"names":["AppConfig","constructor","this","CHAT_INSTRUCTIONS","REALTIME_VOICE_INSTRUCTIONS","apps","rawConfig","ABOUT_TEXT","undefined","APP_BUTTONS","APP_FOOTER_COLOR","APP_HEADER_COLOR","APP_HEADER_ICON_URL","APP_HEADER_TEXT_COLOR","APP_ICON_URL","APP_LOG_CODICENT","APP_LOG_TOKEN","APP_MENU_TITLE","APP_NAME","APP_PREFIX","APP_SAVE_TITLE","APP_SEARCH_TITLE","APP_SLOGAN","APP_SPLASH_TEXT","APP_SPLASH_URL","APP_TEMPLATE","APP_TITLE","AUTH_REDIRECT_URL","AUTH0_AUDIENCE","AUTH0_CLIENT_ID","AUTH0_DOMAIN","AUTH0_PROVIDER_SCOPE","AUTH0_SCOPE","AUTH0_USER_DOMAIN","BUTTON_ACTIVE_COLOR","BUTTON_BACKGROUND_COLOR","BUTTON_BORDER_RADIUS","BUTTON_HOVER_COLOR","BUTTON_TAG","BUTTON_TEXT_COLOR","CHAT_BACKGROUND_IMAGE_URL","CHAT_BOT_BACKGROUND_COLOR","CHAT_BOT_TEXT_COLOR","CHAT_USER_BACKGROUND_COLOR","CHAT_USER_TEXT_COLOR","CHAT_WELCOME","COMPOSE_BACKGROUND_IMAGE_URL","COMPOSE_HIDE_LOCATION","COMPOSE_SIMPLE_ATTACH_FILE","DEFAULT_LANGUAGE","HIDE_CHAT_BUTTON","HIDE_MENU_BUTTON","HIDE_REGISTER_BUTTON","HIDE_SAVE_BUTTON","HOME_BACKGROUND_IMAGE_URL","INDEX_TITLE","LOGBOOK_TAG_DEFINITIONS","LOGBOOK_TAGS","MENU_BACKGROUND_IMAGE_URL","MESSAGE_HIDE_BAR","MODULE_VOICE","PUBLIC_FLOW_CODICENT","REALTIME_VOICE_API_KEY","SEND_BUTTON_ROUND_BACKGROUND","SHOW_CANVAS_BUTTON","SHOW_CHAT_PROMPTS","SHOW_HELP_BUTTON","SHOW_LOGBOOK_BUTTON","SHOW_MICROPHONE_BUTTON","STRIPE_PUBLIC_KEY","SUBSCRIPTION_NEEDED","THEME_WELCOME","USER_PREFIX","WELCOME_STATUS_PROMPT","SHOW_SEND_BUTTON_TEXT","SHOW_SAVE_BUTTON_TEXT","FORM_BACKGROUND_IMAGE_URL","AUTO_TRANSLATE","config","Proxy","get","target","prop","Reflect","receiver","createLoggingConfigProxy","getConfigValue","key"],"mappings":"4DAQmB,MAAAA,EACjB,WAAAC,GACIC,KAAEC,kBAAA,GACJD,KAAME,4BAAS,GACbF,KAAAG,KAAS,IAA8B,MAAAC,EAAG,CAC1CC,WAAA,kEAA0BC,eAAiB,wBAAUC,iBAAGD,iCACrCA,sBACPA,aACI,IAAAR,EAChBU,sBAAUF,iCACVA,6BACFA,EAyBHG,sBAAAH,EAEDI,yBAAiCJ,EAC/BK,2BAAmBL,EACnBM,kBAAAN,EACAO,iBAAiB,GACjBC,iBACAC,oBAAaT,EACbU,cAAAV,EACAW,gBAAAX,EACAY,sBACAC,sBAAkBb,EAClBc,gBAAAd,EACAe,qBAAAf,EACAgB,oBAAgBhB,EAChBiB,aAAA,GACAC,eAAAlB,EAEAmB,yBACAC,0CACAC,gBAAgB,mCAChBC,aAAU,oBACVC,qBAAwB,sEACxBC,YAAA,oBACAC,uBAAkBzB,EAClB0B,yBAAqB1B,EACrB2B,6BAAiB3B,EACjB4B,0BAAgB5B,EAChB6B,wBAAoB7B,EACpB8B,WAAW,aAEXC,uBAAmB/B,EACnBgC,+BAAuBhC,EACvBiC,+BAAwBjC,EACxBkC,yBAAqBlC,EACrBL,uBAAoBK,EACpBmC,gCAAoBnC,EACpBoC,0BAAmBpC,EACnBqC,aAAA,UACAC,kCAAyBtC,EACzBuC,2BAAsBvC,EACtBwC,gCAAoBxC,EACpByC,iBAAkB,KAClBC,kBAAmB,EACnBC,kBAAA,EACAC,sBAAA,EACAC,kBAAA,EACAC,+BAAmB9C,EACnB+C,iBAAA/C,EACAgD,wBAAsB,CAAA,EACtBC,aAAc,KACdC,+BAAAlD,EACAmD,kBAAA,EACAC,cAAA,EACAC,4BACAC,0BACAC,8BAA0B,EAC1BC,oBAAoB,EACpBC,qBACAC,kBAAA,EACAC,qBAAa,EACbC,wBAAyB,wBAAoB,iEAA+B,mBAAG,GAC/EC,qBACAC,qBAAA,EACAC,mBAAgB/D,EAChBgE,iBAAYhE,EACZiE,sBAAsB,GACtBC,uBAAsB,EACtBC,uBAA4B,EAC5BC,+BAA2BpE,EAC3BqE,gBAAiB,GAqBlB,MAAAC,WAbyBA,GACxB,OAAiB,IAAAC,MAAAD,EAAQ,CACNE,IAAA,CAAAC,EAAAC,MACJC,QAAYH,IAAOC,EAAAC,EAAAE,IAKlC,CAKDC,CAAA/E,GA6GD,SAAAgF,EAA8BC,cAO3B"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/config/index.ts"],"sourcesContent":[null],"names":["AppConfig","constructor","this","CHAT_INSTRUCTIONS","REALTIME_VOICE_INSTRUCTIONS","apps","rawConfig","ABOUT_TEXT","undefined","APP_BUTTONS","APP_FOOTER_COLOR","APP_HEADER_COLOR","APP_HEADER_ICON_URL","APP_HEADER_TEXT_COLOR","APP_ICON_URL","APP_LOG_CODICENT","APP_LOG_TOKEN","APP_MENU_TITLE","APP_NAME","APP_PREFIX","APP_SAVE_TITLE","APP_SEARCH_TITLE","APP_SLOGAN","APP_SPLASH_TEXT","APP_SPLASH_URL","APP_TEMPLATE","APP_TITLE","AUTH_REDIRECT_URL","AUTH0_AUDIENCE","AUTH0_CLIENT_ID","AUTH0_DOMAIN","AUTH0_PROVIDER_SCOPE","AUTH0_SCOPE","AUTH0_USER_DOMAIN","BUTTON_ACTIVE_COLOR","BUTTON_BACKGROUND_COLOR","BUTTON_BORDER_RADIUS","BUTTON_HOVER_COLOR","BUTTON_TAG","BUTTON_TEXT_COLOR","CHAT_BACKGROUND_IMAGE_URL","CHAT_BOT_BACKGROUND_COLOR","CHAT_BOT_TEXT_COLOR","CHAT_USER_BACKGROUND_COLOR","CHAT_USER_TEXT_COLOR","CHAT_WELCOME","COMPOSE_BACKGROUND_IMAGE_URL","COMPOSE_HIDE_LOCATION","COMPOSE_SIMPLE_ATTACH_FILE","DEFAULT_LANGUAGE","HIDE_CHAT_BUTTON","HIDE_MENU_BUTTON","HIDE_REGISTER_BUTTON","HIDE_SAVE_BUTTON","HOME_BACKGROUND_IMAGE_URL","INDEX_TITLE","LOGBOOK_TAG_DEFINITIONS","LOGBOOK_TAGS","MENU_BACKGROUND_IMAGE_URL","MESSAGE_HIDE_BAR","MODULE_VOICE","PUBLIC_FLOW_CODICENT","REALTIME_VOICE_API_KEY","SEND_BUTTON_ROUND_BACKGROUND","SHOW_CANVAS_BUTTON","SHOW_CHAT_PROMPTS","SHOW_HELP_BUTTON","SHOW_LOGBOOK_BUTTON","SHOW_MICROPHONE_BUTTON","SUBSCRIPTION_NEEDED","THEME_WELCOME","USER_PREFIX","WELCOME_STATUS_PROMPT","SHOW_SEND_BUTTON_TEXT","SHOW_SAVE_BUTTON_TEXT","FORM_BACKGROUND_IMAGE_URL","AUTO_TRANSLATE","config","Proxy","get","target","prop","receiver","createLoggingConfigProxy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GACtBC,uBAAsB,EACtBC,uBAAsB,EACtBC,+BAA4BnE,EAC5BoE,gBAAkB,SAkBJC,WAVgBA,GAC9B,OAAe,IAAAC,MAAED,EAAO,CACPE,IAAA,CAAAC,EAAAC,cACYF,IAAAC,EAAAC,EAAAC,KAOfC,CAAU7E,GAIzB,SAAA8E,EAAAC,GAkHD,OAAAR,EAAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sales.d.ts","sourceRoot":"","sources":["../../../src/pages/Sales.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AA0F7D,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAoLvD,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Sales.d.ts","sourceRoot":"","sources":["../../../src/pages/Sales.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AA0F7D,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAkMvD,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{useState as n,useCallback as i,useEffect as s}from"react";import"../components/Markdown.js";import{Textarea as r}from"../components/Textarea.js";import{Button as a}from"../components/Button.js";import{Text as l}from"../components/Text.js";import"../components/Spinner.js";import{Input as c}from"../components/Input.js";import"../components/TextHeader.js";import"../components/TypingIndicator.js";import{Dialog as m,DialogTitle as p,DialogContent as d,DialogActions as g}from"../components/Dialog.js";import"../components/ChatInput.js";import"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import"../services/codicent.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as h}from"../config/index.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"./Snap.js";import"./Search.js";import"./Login.js";import"./CrmPage.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"../stores/chatStore.js";import u from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import"../components/FileThumbnail.js";import"../components/MessageInput.js";import"../components/UploadFile.js";import"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/Content.js";import"../components/AiInput.js";import"../components/SearchBox.js";import"../components/HtmlView.js";import"../components/Footer.js";import{Page as f}from"../components/Page.js";import{makeStyles as j}from"../node_modules/@griffel/react/makeStyles.esm.js";import{tokens as x}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{shorthands as C}from"../node_modules/@griffel/core/index.esm.js";import{Image as _}from"../node_modules/@fluentui/react-image/lib/components/Image/Image.js";import{mergeClasses as w}from"../node_modules/@griffel/core/mergeClasses.esm.js";const b=j({root:{display:"flex",flexDirection:"column",height:"100%",touchAction:"pan-y"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:h("APP_HEADER_COLOR")||x.colorBrandBackground,color:x.colorNeutralForegroundOnBrand,...C.padding("10px","20px")},logo:{maxWidth:"100px",maxHeight:"50px",height:"auto",cursor:"pointer"},inputContainer:{display:"flex",justifyContent:"flex-end",alignItems:"center",maxWidth:"300px",width:"200px",paddingLeft:"10px"},dashboard:{display:"flex",justifyContent:"space-around",width:"100%",marginTop:"20px"},statBox:{...C.padding("10px"),...C.borderRadius("12px"),minWidth:"50px",textAlign:"center",color:"white"},buttonContainer:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",gap:"30px",alignItems:"center",...C.padding("20px")},actionButton:{width:"14rem",minWidth:"15rem",height:"3rem"},textAreaContainer:{display:"flex",flexDirection:"column",gap:"10px"},opened:{backgroundColor:"#1a5614"},not_home:{backgroundColor:"#f44336"},sales:{backgroundColor:"#2196F3"},call_back:{backgroundColor:"#FF9800"}}),k={opened:"#1a5614",not_home:"#f44336",sales:"#2196F3",call_back:"#FF9800"},v=()=>{const j=b(),{t:x}=u(),[C,v]=n(""),[y,I]=n(),[A,F]=n({opened:0,not_home:0,sales:0,call_back:0}),[$,P]=n([]),[N,S]=n(!1),[B,M]=n(""),[D,H]=n(""),[T,L]=n(""),[O,z]=n(!1),E=i((()=>new Promise((e=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((o=>{const t=`#position (${o.coords.latitude},${o.coords.longitude})`;e(t)})):e(void 0)}))),[I]);s((()=>{window.Codicent.getDataMessages({codicent:h("APP_NAME"),tags:["sales_code"]}).then((e=>{e=e.filter((e=>"1"!==e.data.inactive)),P(e)})).catch(console.error),E()}),[]);const R=async()=>{if(!C)return;const e=["not_home","sales","call_back","opened"],o=new Date;o.setHours(0,0,0,0);const t={...A};for(const n of e){const e=await window.Codicent.getMessages({search:`#${n} #sales_code_${C}`,afterTimestamp:o,length:1e4});t[n]=e.filter((e=>e.content.includes(`#${n} `)&&e.content.includes(`#sales_code_${C}`))).length}F(t)},U=async(e,o="")=>{const t=await E();console.log("Got position",t);const n=`@${h("APP_NAME")} #sales_code_${C} #${e} ${t||""} ${o.trim().length>0?"#comment ":""}${o}`.trim();await window.Codicent.postMessage({message:n}),R()};return e(f,{hideHeader:!0,children:o("div",{className:j.root,children:[o("div",{className:j.header,children:[e(_,{src:D||h("APP_ICON_URL")||"https://via.placeholder.com/100",className:j.logo,onClick:()=>T&&window.open(T,"_blank")}),e("div",{className:j.inputContainer,children:e(c,{value:C,onChange:e=>v(e.target.value),onBlur:()=>{const e=$.find((e=>e.data.code===C));if(e)H(`https://codicent.com/app/GetImage?fileId=${e.fileId}&width=100`),L(e.data.link),z(!0),R();else{const e=$.find((e=>e.data.code2===C.toUpperCase()));e?(H(`https://codicent.com/app/GetImage?fileId=${e.fileIds&&e.fileIds.length>1?e.fileIds[1]:e.fileId}&width=100`),L(e.data.link2),z(!0),R()):(z(!1),alert(x("Fel försäljningskod!")))}},placeholder:x("Fyll i försäljningskod"),maxLength:16,size:"large"})})]}),O&&o(t,{children:[e("div",{className:j.dashboard,children:Object.keys(A).map((o=>{return e("div",{className:(t=o,w(j.statBox,j[t])),children:e(l,{weight:"bold",size:400,children:A[o]})},o);var t}))}),e("div",{className:j.buttonContainer,children:Object.entries(k).map((([o,t])=>e(a,{size:"large",className:j.actionButton,style:{backgroundColor:t,color:"white"},onClick:()=>{U(o),"opened"===o&&S(!0),"sales"===o&&window.open(T,"_blank")},children:o.charAt(0).toUpperCase()+o.slice(1).replace("_"," ")},o)))}),o(m,{open:N,children:[e(p,{children:x("Skriv in avvikelse")}),e(d,{children:e("div",{className:j.textAreaContainer,children:e(r,{value:B,onChange:e=>M(e.target.value),placeholder:x("Skriv din text här..."),rows:4,size:"large"})})}),e(g,{children:e(a,{appearance:"primary",onClick:()=>{U("anomaly",`\n${B}`),S(!1),M("")},children:x("Spara")})})]})]})]})})};export{v as Sales,v as default};
1
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{useState as n,useCallback as i,useEffect as r}from"react";import"../components/Markdown.js";import{Textarea as s}from"../components/Textarea.js";import{Button as a}from"../components/Button.js";import{Text as l}from"../components/Text.js";import"../components/Spinner.js";import{Input as c}from"../components/Input.js";import"../components/TextHeader.js";import"../components/TypingIndicator.js";import{Dialog as m,DialogTitle as p,DialogContent as d,DialogActions as h}from"../components/Dialog.js";import"../components/ChatInput.js";import"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import"../services/codicent.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as g}from"../config/index.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"./Snap.js";import"./Search.js";import"./Login.js";import"./CrmPage.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"../stores/chatStore.js";import u from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import"../components/FileThumbnail.js";import"../components/MessageInput.js";import"../components/UploadFile.js";import"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/Content.js";import"../components/AiInput.js";import"../components/SearchBox.js";import"../components/HtmlView.js";import"../components/Footer.js";import{Page as f}from"../components/Page.js";import{makeStyles as j}from"../node_modules/@griffel/react/makeStyles.esm.js";import{tokens as x}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{shorthands as C}from"../node_modules/@griffel/core/index.esm.js";import{Image as _}from"../node_modules/@fluentui/react-image/lib/components/Image/Image.js";import{mergeClasses as k}from"../node_modules/@griffel/core/mergeClasses.esm.js";const b=j({root:{display:"flex",flexDirection:"column",height:"100%",touchAction:"pan-y"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:g("APP_HEADER_COLOR")||x.colorBrandBackground,color:x.colorNeutralForegroundOnBrand,...C.padding("10px","20px")},logo:{maxWidth:"100px",maxHeight:"50px",height:"auto",cursor:"pointer"},inputContainer:{display:"flex",justifyContent:"flex-end",alignItems:"center",maxWidth:"300px",width:"200px",paddingLeft:"10px"},dashboard:{display:"flex",justifyContent:"space-around",width:"100%",marginTop:"20px"},statBox:{...C.padding("10px"),...C.borderRadius("12px"),minWidth:"50px",textAlign:"center",color:"white"},buttonContainer:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",gap:"30px",alignItems:"center",...C.padding("20px")},actionButton:{width:"14rem",minWidth:"15rem",height:"3rem"},textAreaContainer:{display:"flex",flexDirection:"column",gap:"10px"},opened:{backgroundColor:"#1a5614"},not_home:{backgroundColor:"#f44336"},sales:{backgroundColor:"#2196F3"},call_back:{backgroundColor:"#FF9800"}}),v={opened:"#1a5614",not_home:"#f44336",sales:"#2196F3",call_back:"#FF9800"},w=()=>{const j=b(),{t:x}=u(),[C,w]=n(""),[y,I]=n(),[A,F]=n({opened:0,not_home:0,sales:0,call_back:0}),[$,P]=n([]),[N,S]=n(!1),[B,M]=n(""),[D,H]=n(""),[O,T]=n(""),[L,z]=n(!1),[E,G]=n(!1),R=i((()=>new Promise((e=>{navigator.geolocation?navigator.geolocation.getCurrentPosition((o=>{const t=`#position (${o.coords.latitude},${o.coords.longitude})`;e(t)})):e(void 0)}))),[I]);r((()=>{window.Codicent.getDataMessages({codicent:g("APP_NAME"),tags:["sales_code"]}).then((e=>{e=e.filter((e=>"1"!==e.data.inactive)),P(e)})).catch(console.error),R()}),[]);const U=async()=>{if(!C)return;const e=["not_home","sales","call_back","opened"],o=new Date;o.setHours(0,0,0,0);const t={...A};for(const n of e){const e=await window.Codicent.getMessages({search:`#${n} #sales_code_${C}`,afterTimestamp:o,length:1e4});t[n]=e.filter((e=>e.content.includes(`#${n} `)&&e.content.includes(`#sales_code_${C}`))).length}F(t)},W=async(e,o="")=>{const t=await R();console.log("Got position",t);const n=`@${g("APP_NAME")} #sales_code_${C} #${e} ${t||""} ${o.trim().length>0?"#comment ":""}${o}`.trim();await window.Codicent.postMessage({message:n}),U()};return e(f,{hideHeader:!0,children:o("div",{className:j.root,children:[o("div",{className:j.header,children:[e(_,{src:D||g("APP_ICON_URL")||"https://via.placeholder.com/100",className:j.logo,onClick:()=>O&&G(!0)}),e("div",{className:j.inputContainer,children:e(c,{value:C,onChange:e=>w(e.target.value),onBlur:()=>{const e=$.find((e=>e.data.code===C));if(e)H(`https://codicent.com/app/GetImage?fileId=${e.fileId}&width=100`),T(e.data.link),z(!0),U();else{const e=$.find((e=>e.data.code2===C.toUpperCase()));e?(H(`https://codicent.com/app/GetImage?fileId=${e.fileIds&&e.fileIds.length>1?e.fileIds[1]:e.fileId}&width=100`),T(e.data.link2),z(!0),U()):(z(!1),alert(x("Fel försäljningskod!")))}},placeholder:x("Fyll i försäljningskod"),maxLength:16,size:"large"})})]}),L&&o(t,{children:[e("div",{className:j.dashboard,children:Object.keys(A).map((o=>{return e("div",{className:(t=o,k(j.statBox,j[t])),children:e(l,{weight:"bold",size:400,children:A[o]})},o);var t}))}),e("div",{className:j.buttonContainer,children:Object.entries(v).map((([o,t])=>e(a,{size:"large",className:j.actionButton,style:{backgroundColor:t,color:"white"},onClick:()=>{W(o),"opened"===o&&S(!0),"sales"===o&&G(!0)},children:o.charAt(0).toUpperCase()+o.slice(1).replace("_"," ")},o)))}),o(m,{open:N,children:[e(p,{children:x("Skriv in avvikelse")}),e(d,{children:e("div",{className:j.textAreaContainer,children:e(s,{value:B,onChange:e=>M(e.target.value),placeholder:x("Skriv din text här..."),rows:4,size:"large"})})}),e(h,{children:e(a,{appearance:"primary",onClick:()=>{W("anomaly",`\n${B}`),S(!1),M("")},children:x("Spara")})})]}),o(m,{open:E,children:[e(p,{children:x("Godkännande")}),e(d,{children:x("Är kunden över 23 år?")}),o(h,{children:[e(a,{appearance:"primary",onClick:()=>window.open(O,"_blank"),children:x("OK")}),e(a,{appearance:"secondary",onClick:()=>G(!1),children:x("Avbryt")})]})]})]})]})})};export{w as Sales,w as default};
2
2
  //# sourceMappingURL=Sales.js.map
package/dist/index.d.ts CHANGED
@@ -589,7 +589,7 @@ declare const Profile: React.FC<{
589
589
  state: CodicentAppState;
590
590
  }>;
591
591
 
592
- declare const MessageItem: ({ header, description, timestamp, text, image, tags, id, fileIds, codicentService, busy, onShowHtmlPreview, }: {
592
+ declare const MessageItem: ({ header, description, timestamp, text, image, tags, id, fileIds, codicentService, busy, onEdit, onShowHtmlPreview, }: {
593
593
  id: string;
594
594
  header: string;
595
595
  description: string;
@@ -600,6 +600,7 @@ declare const MessageItem: ({ header, description, timestamp, text, image, tags,
600
600
  codicentService: CodicentService;
601
601
  busy?: boolean;
602
602
  onShowHtmlPreview?: (html: string) => void;
603
+ onEdit?: () => void;
603
604
  timestamp?: string;
604
605
  }) => react_jsx_runtime.JSX.Element;
605
606
 
@@ -745,6 +746,7 @@ interface AppConfigOptions {
745
746
  [tagKey: string]: {
746
747
  name: string;
747
748
  color: string;
749
+ editable?: boolean;
748
750
  };
749
751
  };
750
752
  LOGBOOK_TAGS: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codicent-app-sdk",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
4
4
  "description": "SDK for building AI-powered applications with Codicent",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",