codicent-app-sdk 0.5.8 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/LanguageSelector.d.ts.map +1 -1
- package/dist/cjs/components/LanguageSelector.js +1 -1
- package/dist/cjs/components/ListView.d.ts.map +1 -1
- package/dist/cjs/components/ListView.js +1 -1
- package/dist/cjs/components/audit/AuditAnswerCell.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditBulkExportDialog.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditBulkUploadDialog.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditCircularProgress.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditFilterBar.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditFilterChips.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditGroupsProgress.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditRequirementDialog.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditRoleIndicator.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditSearchBar.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditSortPresets.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditSummaryDashboard.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditUnitExportDialog.d.ts.map +1 -1
- package/dist/cjs/components/audit/AuditUnitSwitcher.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditFilters.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditManagerData.d.ts +1 -1
- package/dist/cjs/hooks/useAuditManagerData.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditManagerData.js +1 -1
- package/dist/cjs/hooks/useAuditManagerFilters.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditRequirementsFilters.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditRoleCheck.d.ts +2 -2
- package/dist/cjs/hooks/useAuditRoleCheck.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditRoleCheck.js +1 -1
- package/dist/cjs/hooks/useAuditState.d.ts +2 -2
- package/dist/cjs/hooks/useAuditState.d.ts.map +1 -1
- package/dist/cjs/hooks/useAuditState.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/useUserRoles.d.ts.map +1 -1
- package/dist/cjs/hooks/useUserRoles.js +1 -1
- package/dist/cjs/pages/ListPage.d.ts +7 -1
- package/dist/cjs/pages/ListPage.d.ts.map +1 -1
- package/dist/cjs/pages/ListPage.js +1 -1
- package/dist/cjs/types/audit.d.ts +8 -1
- package/dist/cjs/types/audit.d.ts.map +1 -1
- package/dist/cjs/types/index.d.ts +18 -2
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/utils/auditExport.d.ts.map +1 -1
- package/dist/cjs/utils/auditUtils.d.ts +1 -1
- package/dist/cjs/utils/auditUtils.d.ts.map +1 -1
- package/dist/cjs/utils/auditUtils.js +1 -1
- package/dist/esm/components/LanguageSelector.d.ts.map +1 -1
- package/dist/esm/components/LanguageSelector.js +1 -1
- package/dist/esm/components/ListView.d.ts.map +1 -1
- package/dist/esm/components/ListView.js +1 -1
- package/dist/esm/components/audit/AuditAnswerCell.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditBulkExportDialog.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditBulkUploadDialog.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditCircularProgress.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditFilterBar.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditFilterChips.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditGroupsProgress.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditRequirementDialog.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditRoleIndicator.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditSearchBar.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditSortPresets.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditSummaryDashboard.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditUnitExportDialog.d.ts.map +1 -1
- package/dist/esm/components/audit/AuditUnitSwitcher.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditFilters.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditManagerData.d.ts +1 -1
- package/dist/esm/hooks/useAuditManagerData.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditManagerData.js +1 -1
- package/dist/esm/hooks/useAuditManagerFilters.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditRequirementsFilters.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditRoleCheck.d.ts +2 -2
- package/dist/esm/hooks/useAuditRoleCheck.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditRoleCheck.js +1 -1
- package/dist/esm/hooks/useAuditState.d.ts +2 -2
- package/dist/esm/hooks/useAuditState.d.ts.map +1 -1
- package/dist/esm/hooks/useAuditState.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/useUserRoles.d.ts.map +1 -1
- package/dist/esm/hooks/useUserRoles.js +1 -1
- package/dist/esm/pages/ListPage.d.ts +7 -1
- package/dist/esm/pages/ListPage.d.ts.map +1 -1
- package/dist/esm/pages/ListPage.js +1 -1
- package/dist/esm/types/audit.d.ts +8 -1
- package/dist/esm/types/audit.d.ts.map +1 -1
- package/dist/esm/types/index.d.ts +18 -2
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/utils/auditExport.d.ts.map +1 -1
- package/dist/esm/utils/auditUtils.d.ts +1 -1
- package/dist/esm/utils/auditUtils.d.ts.map +1 -1
- package/dist/esm/utils/auditUtils.js +1 -1
- package/dist/index.d.ts +39 -11
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as o,useRef as n,useMemo as r,useEffect as i,useCallback as a}from"react";import"../components/Markdown.js";import"../components/Textarea.js";import"../components/Button.js";import"../components/CompoundButton.js";import{makeStyles as s,Button as c,Dialog as l,DialogSurface as m,DialogBody as p,DialogTitle as d,DialogContent as u,DialogActions as g}from"@fluentui/react-components";import"../components/Spinner.js";import h from"../components/TextHeader.js";import"../components/TypingIndicator.js";import"../components/Dialog.js";import"../components/ChatInput.js";import"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import{ArrowLeft24Regular as f,ArrowClockwise24Regular as j,ArrowDownload24Regular as x,Add24Regular as w}from"@fluentui/react-icons";import"../services/codicent.js";import{dataCache as C}from"../services/dataCache.js";import y from"../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{exportToExcel as A}from"../utils/excelExport.js";import"./AppFrame.js";import"./Canvas.js";import"./Chat.js";import"./Compose.js";import"./Snap.js";import"./Search.js";import"./Menu.js";import"./Log.js";import"./Login.js";import"./Home.js";import"./CrmPage.js";import"./CrmPagePersistent.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"./Sales.js";import{useSearchParams as S,useNavigate as v}from"react-router-dom";import"./Purchase.js";import"../components/Content.js";import{Page as k}from"../components/Page.js";import"./QrScan.js";import b from"../hooks/useLocalization.js";import"../components/FileThumbnail.js";import"react-dom/client";import"../node_modules/@auth0/auth0-react/dist/auth0-react.esm.js";import"../hooks/useAppStyles.js";import{useUserRoles as D}from"../hooks/useUserRoles.js";import"../components/MessageInput.js";import"../components/UploadFile.js";import"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/AiInput.js";import M from"../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 I from"../components/ListView.js";import{RecordModal as T}from"../components/RecordModal.js";import"../components/BulkUploadDialog.js";import"../components/CookieBanner.js";import"../components/audit/AuditCircularProgress.js";import"../components/audit/AuditHorizontalProgress.js";import"../components/audit/AuditRoleIndicator.js";import"../components/audit/AuditUnitSwitcher.js";import"../components/audit/AuditAnswerCell.js";import"../components/audit/AuditSearchBar.js";import"../components/audit/AuditFilterChips.js";import"../components/audit/AuditFilterBar.js";import"../components/audit/AuditGroupsProgress.js";import"../components/audit/AuditSummaryDashboard.js";import"../components/audit/AuditRequirementDialog.js";import"../components/audit/AuditUnitExportDialog.js";import"../components/audit/AuditUnitImportDialog.js";import"../components/audit/AuditBulkExportDialog.js";import"../components/audit/AuditBulkUploadDialog.js";import"../components/audit/AuditSortPresets.js";import{l as $}from"../node_modules/lodash/lodash.js";const _=s({container:{width:"100%",flex:1,maxWidth:"100%",height:"100%",minHeight:0,backgroundColor:"#ffffff",display:"flex",flexDirection:"column",margin:"0 auto",overflow:"hidden","@media (max-width: 768px)":{maxWidth:"100%",borderRadius:"0"},touchAction:"pan-y",paddingLeft:"0",paddingRight:"0"},listContainer:{overflow:"hidden",flex:1,minHeight:0,marginTop:"10px"},headerRow:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",flexWrap:"wrap"},buttonGroup:{display:"flex",gap:"8px",flexWrap:"wrap"},addButton:{minWidth:"auto",whiteSpace:"nowrap"},recordsCount:{fontSize:"14px",color:"#666",marginTop:"8px"},backButton:{marginBottom:"10px"},searchBox:{marginTop:"8px"},loadMoreContainer:{display:"flex",justifyContent:"center",padding:"16px 0",borderTop:"1px solid #e0e0e0",marginTop:"4px"}}),P=500,E=({state:s,getColumnDefs:E,filterData:B})=>{const[N,R]=S(),F=N.get("tag")||"logbook",L=N.get("title")||"",U=N.get("contentTitle"),H="true"===N.get("loadAll"),O="true"===N.get("canAdd"),W="true"===N.get("canEdit"),q="false"!==N.get("canExport"),z=N.get("addUrl")||"",V=N.get("q")||"",[G,J]=o(V),[Q,K]=o(V),{service:X}=s,[Y,Z]=o([]),[tt,et]=o(!1),[ot,nt]=o(!1),[rt,it]=o(!1),at=n(null),st=n(V),ct=n(""),lt=n(!0),[mt,pt]=o(0),[dt,ut]=o(null),gt=_(),{t:ht}=b(),ft=v(),{getCurrentUserName:jt}=D(X,s.context.nickname,s.context.selectedApp),xt=r((()=>(U?[{key:U,title:U,maxWidth:250}]:E?E(F):[]).map((t=>({...t,title:t.title?ht(t.title):void 0})))),[U,F,ht,E]),[wt,Ct]=o(!1),[yt,At]=o(null),[St,vt]=o(!1),[kt,bt]=o(null),Dt=r((()=>`listpage_searches_${F}`),[F]),Mt=t=>{try{const e=localStorage.getItem(t);return e?JSON.parse(e):[]}catch{return[]}},[It,Tt]=o((()=>Mt(Dt)));i((()=>{Tt(Mt(Dt))}),[Dt]);const $t=a((t=>{const e=t.trim();e&&Tt((t=>{const o=[e,...t.filter((t=>t!==e))].slice(0,20);try{localStorage.setItem(Dt,JSON.stringify(o))}catch{}return o}))}),[Dt]),_t=a((t=>{Tt((e=>{const o=e.filter((e=>e!==t));try{localStorage.setItem(Dt,JSON.stringify(o))}catch{}return o}))}),[Dt]),Pt=r((()=>$.debounce((t=>K(t)),500)),[K]);i((()=>()=>{Pt.cancel()}),[Pt]);const Et=a((t=>{J(t),Pt(t)}),[Pt]),Bt=a((t=>{$t(t)}),[$t]);i((()=>{if(!N.get("q")){const t=N.get(`filter_${F}`);if(t){let e=t;if("%USERNAME%"===e){const t=jt();if(!t)return;e=t}J(e),K(e),st.current=e}}}),[F,N,jt]),i((()=>{const t=N.get("q")||"";t!==st.current&&(J(t),K(t),st.current=t,ct.current="")}),[N]),i((()=>(at.current&&clearTimeout(at.current),at.current=setTimeout((()=>{if(st.current!==G){const t={title:L,tag:F};U&&(t.contentTitle=U),G&&(t.q=G),H&&(t.loadAll="true"),R(t,{replace:!0}),st.current=G}}),500),()=>{at.current&&clearTimeout(at.current)})),[G,F,L,U,H,R]),i((()=>{lt.current=!0;const t=`${F}-${U}-${H}-${mt}-${Q}`;if(t===ct.current)return;ct.current=t;const e=U?`${F}-${Q}-${U}`:`${F}-${Q||"all"}`,o=C.get(e);if(!o){if(nt(!1),et(!0),U)X.getMessagesFast([F],Q).then((t=>{if(!lt.current)return void et(!1);const o=t.map((t=>{const e=new Date(t.createdAt).toLocaleString();return{id:t.id,data:{[U]:new y(t.content).content,createdAt:e},fileId:null,fileIds:[],tags:[F],mentions:[X.codicent],createdAt:e}}));C.set(e,o),lt.current&&Z(o)})).catch(console.warn).finally((()=>et(!1)));else{const t=Q||"",o=H||t?void 0:P;X.readDataMessages(F,t,void 0,0,o).then((o=>{C.set(e,o),lt.current?(Z(o),nt(!H&&!t&&o.length===P)):et(!1)})).catch(console.warn).finally((()=>et(!1)))}return()=>{lt.current=!1}}if(Z(o),nt(!H&&!U&&o.length>=P),!U&&!Q&&o.length>0){const t=o.reduce(((t,e)=>e.createdAt>t?e.createdAt:t),o[0].createdAt);X.readDataMessages(F,"",void 0,void 0,void 0,t).then((t=>{lt.current&&Z((o=>{const n=new Set(o.map((t=>t.id))),r=t.filter((t=>!n.has(t.id)));if(0===r.length)return o;const i=[...r,...o];return C.set(e,i),i}))})).catch(console.warn)}}),[X,F,U,H,Q,mt]);const Nt=r((()=>{const t={};N.forEach(((e,o)=>{o.startsWith("filter_")&&(t[o.replace("filter_","")]=e)}));let e=Y.map(((t,e)=>({item:t,index:e})));for(const[o,n]of Object.entries(t)){const t=n.replace("%USERNAME%",jt()),r=s.context.nickname||"";e=e.filter((({item:e})=>{const n=e.data[o];return null!=n&&(String(n).includes(t)||String(n).includes(r))}))}if(B){const t=B(e.map((({item:t})=>t)),F),o=new Set(t.map((t=>t.id)));e=e.filter((({item:t})=>o.has(t.id)))}return e.map((({item:t,index:e})=>({...t.data,createdAt:t.createdAt,_id:t.id,originalMessageId:t.originalMessageId||t.id,_index:e})))}),[Y,N,s.context.nickname,jt,B,F]),Rt=r((()=>{const t=(G||"").trim().toLowerCase();if(!t)return Nt;const e=xt.filter((t=>!t.hidden)).map((t=>t.key));return Nt.filter((o=>{for(const n of e)if(Array.isArray(n))for(const e of n){const n=o[e];if(null!=n&&String(n).toLowerCase().includes(t))return!0}else{const e=o[n];if(null!=e&&String(e).toLowerCase().includes(t))return!0}return!1}))}),[Nt,G,xt]),Ft=a((()=>{C.clearPattern(F),ct.current="",pt((t=>t+1))}),[F]),Lt=a((async()=>{it(!0);try{const t=await X.readDataMessages(F,"",void 0,Y.length,P),e=[...Y,...t];Z(e),C.set(`${F}-all`,e),nt(t.length===P)}catch(t){console.warn(t)}finally{it(!1)}}),[Y,X,F]),Ut=a((t=>{ut(t)}),[]),Ht=()=>{vt(!1),bt(null)},Ot=a((async()=>{const t=`${F}_${(new Date).toISOString().split("T")[0]}`.replace(/[/\\:*?"<>|]/g,"_");const e=null!==dt?dt:Rt;await A(e,xt,t,ht)||console.warn("No data to export")}),[dt,Rt,xt,F,ht]),Wt=r((()=>null!==dt?dt.length:Rt.length),[dt,Rt]);return t(k,{hideHeader:!0,children:e("div",{className:gt.container,children:[t("div",{className:gt.backButton,children:t(c,{appearance:"subtle",icon:t(f,{}),onClick:()=>ft(-1),children:ht("Tillbaka")})}),e("div",{className:gt.headerRow,children:[t(h,{title:ht(L||"Loggbok")}),e("div",{className:gt.buttonGroup,children:[t(c,{appearance:"subtle",icon:t(j,{}),onClick:Ft,title:ht("Refresh"),children:ht("Refresh")}),q&&t(c,{appearance:"subtle",icon:t(x,{}),onClick:Ot,title:ht("Export to Excel"),children:ht("Export to Excel")}),(O||z)&&t(c,{appearance:"primary",icon:t(w,{}),onClick:O?()=>{At(null),Ct(!0)}:()=>window.open(z,"_blank"),className:gt.addButton,children:ht("Add Record")})]})]}),t("div",{className:gt.searchBox,children:t(M,{placeholder:ht("Sök")+"...",value:G,onChange:Et,recentSearches:It,onCommitSearch:Bt,onRemoveRecentSearch:_t})}),!tt&&e("div",{className:gt.recordsCount,children:[ht("Total"),": ",Wt," ",ht("records"),Wt!==Y.length&&` (${ht("filtered from")} ${Y.length})`]}),e("div",{className:gt.listContainer,children:[tt&&t("p",{children:ht("Söker")+"..."}),!tt&&t(I,{data:Rt,columns:xt,canEdit:W,onEdit:(t,e)=>{const o=Y[e];o&&(At({data:{...o.data},index:e}),Ct(!0))},onDelete:(t,e)=>{const o=Y[e];o&&(bt({index:e,id:o.id}),vt(!0))},onToggleCheckbox:async(t,e,o,n)=>{const r=Y[n];if(r){const t=Array.isArray(e)?e[0]:e,i={...r.data,[t]:String(o)},a=await X.updateDataMessage(r.id,i);Z((t=>{const e=[...t];return e[n]={...r,id:a,data:i},e})),C.clearPattern(F)}},onEnumChange:async(t,e,o,n)=>{const r=Y[n];if(r){const t=Array.isArray(e)?e[0]:e,i={...r.data,[t]:o},a=await X.updateDataMessage(r.id,i);Z((t=>{const e=[...t];return e[n]={...r,id:a,data:i},e})),C.clearPattern(F)}},onFilteredDataChange:Ut})]}),ot&&!G.trim()&&t("div",{className:gt.loadMoreContainer,children:t(c,{appearance:"primary",size:"medium",onClick:Lt,disabled:rt,children:rt?ht("Laddar..."):ht("Visa fler")+` (${Y.length} ${ht("laddade")})`})}),t(T,{open:wt,onClose:()=>Ct(!1),onSave:async t=>{if(yt){const e=Y[yt.index];if(e){const o={};for(const e in t){const n=t[e];o[e]=null==n?"":String(n)}const n=await X.updateDataMessage(e.id,o);Z((t=>{const r=[...t];return r[yt.index]={...e,id:n,data:o},r})),C.clearPattern(F)}}else{const e={};for(const o in t){const n=t[o];e[o]=null==n?"":String(n)}const o={id:await X.createDataMessage(F,e),data:e,createdAt:(new Date).toISOString(),fileId:null,fileIds:[],tags:[F],mentions:[X.codicent]};Z((t=>[o,...t])),C.clearPattern(F)}},columns:xt,initialData:yt?.data}),t(l,{open:St,onOpenChange:(t,e)=>!e.open&&Ht(),children:t(m,{children:e(p,{children:[t(d,{children:ht("Confirm Delete")}),t(u,{children:ht("Are you sure you want to delete this record? This action cannot be undone.")}),e(g,{children:[t(c,{appearance:"secondary",onClick:Ht,children:ht("Cancel")}),t(c,{appearance:"primary",onClick:async()=>{if(kt)try{await X.deleteDataMessage(kt.id),Z((t=>t.filter(((t,e)=>e!==kt.index)))),C.clearPattern(F)}catch(t){console.error("Failed to delete record:",t)}finally{vt(!1),bt(null)}},children:ht("Delete")})]})]})})})]})})};export{E as ListPage,E as default};
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{useState as o,useRef as n,useMemo as r,useEffect as i,useCallback as a}from"react";import"../components/Markdown.js";import"../components/Textarea.js";import"../components/Button.js";import"../components/CompoundButton.js";import{makeStyles as s,Button as c,Dialog as l,DialogSurface as d,DialogBody as m,DialogTitle as p,DialogContent as u,DialogActions as g}from"@fluentui/react-components";import"../components/Spinner.js";import f from"../components/TextHeader.js";import"../components/TypingIndicator.js";import"../components/Dialog.js";import"../components/ChatInput.js";import"../components/CombinedPlaceholderDialog.js";import"../components/ChatMessage.js";import"../components/Header.js";import{ArrowLeft24Regular as h,ArrowClockwise24Regular as j,ArrowDownload24Regular as x,Add24Regular as w}from"@fluentui/react-icons";import"../services/codicent.js";import{dataCache as y}from"../services/dataCache.js";import C from"../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{exportToExcel as A}from"../utils/excelExport.js";import"./AppFrame.js";import"./Canvas.js";import"./Chat.js";import"./Compose.js";import"./Snap.js";import"./Search.js";import"./Menu.js";import"./Log.js";import"./Login.js";import"./Home.js";import"./CrmPage.js";import"./CrmPagePersistent.js";import"./ImageView.js";import"./FormInvite.js";import"./FormAccept.js";import"./Sales.js";import{useSearchParams as S,useNavigate as v}from"react-router-dom";import"./Purchase.js";import"../components/Content.js";import{Page as k}from"../components/Page.js";import"./QrScan.js";import b from"../hooks/useLocalization.js";import"../components/FileThumbnail.js";import"react-dom/client";import"../node_modules/@auth0/auth0-react/dist/auth0-react.esm.js";import"../hooks/useAppStyles.js";import{useUserRoles as D}from"../hooks/useUserRoles.js";import"../components/MessageInput.js";import"../components/UploadFile.js";import"../components/SnapFooter.js";import"../components/Profile.js";import"../components/MessageItem.js";import"../components/AiInput.js";import M from"../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 I from"../components/ListView.js";import{RecordModal as T}from"../components/RecordModal.js";import"../components/BulkUploadDialog.js";import"../components/CookieBanner.js";import"../components/audit/AuditCircularProgress.js";import"../components/audit/AuditHorizontalProgress.js";import"../components/audit/AuditRoleIndicator.js";import"../components/audit/AuditUnitSwitcher.js";import"../components/audit/AuditAnswerCell.js";import"../components/audit/AuditSearchBar.js";import"../components/audit/AuditFilterChips.js";import"../components/audit/AuditFilterBar.js";import"../components/audit/AuditGroupsProgress.js";import"../components/audit/AuditSummaryDashboard.js";import"../components/audit/AuditRequirementDialog.js";import"../components/audit/AuditUnitExportDialog.js";import"../components/audit/AuditUnitImportDialog.js";import"../components/audit/AuditBulkExportDialog.js";import"../components/audit/AuditBulkUploadDialog.js";import"../components/audit/AuditSortPresets.js";import{l as $}from"../node_modules/lodash/lodash.js";const _=s({container:{width:"100%",flex:1,maxWidth:"100%",height:"100%",minHeight:0,backgroundColor:"#ffffff",display:"flex",flexDirection:"column",margin:"0 auto",overflow:"hidden","@media (max-width: 768px)":{maxWidth:"100%",borderRadius:"0"},touchAction:"pan-y",paddingLeft:"0",paddingRight:"0"},listContainer:{overflow:"hidden",flex:1,minHeight:0,marginTop:"10px"},headerRow:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"10px",flexWrap:"wrap"},buttonGroup:{display:"flex",gap:"8px",flexWrap:"wrap"},addButton:{minWidth:"auto",whiteSpace:"nowrap"},recordsCount:{fontSize:"14px",color:"#666",marginTop:"8px"},backButton:{marginBottom:"10px"},searchBox:{marginTop:"8px"},loadMoreContainer:{display:"flex",justifyContent:"center",padding:"16px 0",borderTop:"1px solid #e0e0e0",marginTop:"4px"}}),P=500,B=({state:s,getColumnDefs:B,getListConfig:E,filterData:N})=>{const[R,L]=S(),F=R.get("tag")||"logbook",U=R.get("title")||"",H=R.get("contentTitle"),O="true"===R.get("loadAll"),W="true"===R.get("canAdd"),q="true"===R.get("canEdit"),z="false"!==R.get("canExport"),V=R.get("addUrl")||"",G=R.get("q")||"",[J,Q]=o(G),[K,X]=o(G),{service:Y}=s,[Z,tt]=o([]),[et,ot]=o(!1),[nt,rt]=o(!1),[it,at]=o(!1),st=n(null),ct=n(G),lt=n(""),dt=n(!0),[mt,pt]=o(0),[ut,gt]=o(null),ft=_(),{t:ht}=b(),jt=v(),{getCurrentUserName:xt}=D(Y,s.context.nickname,s.context.selectedApp),wt=r((()=>(H?[{key:H,title:H,maxWidth:250}]:E?E(F)?.columns??[]:B?B(F):[]).map((t=>({...t,title:t.title?ht(t.title):void 0})))),[H,F,ht,B,E]),[yt,Ct]=o(!1),[At,St]=o(null),[vt,kt]=o(!1),[bt,Dt]=o(null),Mt=r((()=>`listpage_searches_${F}`),[F]),It=t=>{try{const e=localStorage.getItem(t);return e?JSON.parse(e):[]}catch{return[]}},[Tt,$t]=o((()=>It(Mt)));i((()=>{$t(It(Mt))}),[Mt]);const _t=a((t=>{const e=t.trim();e&&$t((t=>{const o=[e,...t.filter((t=>t!==e))].slice(0,20);try{localStorage.setItem(Mt,JSON.stringify(o))}catch{}return o}))}),[Mt]),Pt=a((t=>{$t((e=>{const o=e.filter((e=>e!==t));try{localStorage.setItem(Mt,JSON.stringify(o))}catch{}return o}))}),[Mt]),Bt=r((()=>$.debounce((t=>X(t)),500)),[X]);i((()=>()=>{Bt.cancel()}),[Bt]);const Et=a((t=>{Q(t),Bt(t)}),[Bt]),Nt=a((t=>{_t(t)}),[_t]);i((()=>{if(!R.get("q")){const t=R.get(`filter_${F}`);if(t){let e=t;if("%USERNAME%"===e){const t=xt();if(!t)return;e=t}Q(e),X(e),ct.current=e}}}),[F,R,xt]),i((()=>{const t=R.get("q")||"";t!==ct.current&&(Q(t),X(t),ct.current=t,lt.current="")}),[R]),i((()=>(st.current&&clearTimeout(st.current),st.current=setTimeout((()=>{if(ct.current!==J){const t={title:U,tag:F};H&&(t.contentTitle=H),J&&(t.q=J),O&&(t.loadAll="true"),L(t,{replace:!0}),ct.current=J}}),500),()=>{st.current&&clearTimeout(st.current)})),[J,F,U,H,O,L]),i((()=>{dt.current=!0;const t=`${F}-${H}-${O}-${mt}-${K}`;if(t===lt.current)return;lt.current=t;const e=H?`${F}-${K}-${H}`:`${F}-${K||"all"}`,o=y.get(e);if(!o){if(rt(!1),ot(!0),H)Y.getMessagesFast([F],K).then((t=>{if(!dt.current)return void ot(!1);const o=t.map((t=>{const e=new Date(t.createdAt).toLocaleString();return{id:t.id,data:{[H]:new C(t.content).content,createdAt:e},fileId:null,fileIds:[],tags:[F],mentions:[Y.codicent],createdAt:e}}));y.set(e,o),dt.current&&tt(o)})).catch(console.warn).finally((()=>ot(!1)));else{const t=K||"",o=O||t?void 0:P;Y.readDataMessages(F,t,void 0,0,o).then((o=>{y.set(e,o),dt.current?(tt(o),rt(!O&&!t&&o.length===P)):ot(!1)})).catch(console.warn).finally((()=>ot(!1)))}return()=>{dt.current=!1}}if(tt(o),rt(!O&&!H&&o.length>=P),!H&&!K&&o.length>0){const t=o.reduce(((t,e)=>e.createdAt>t?e.createdAt:t),o[0].createdAt);Y.readDataMessages(F,"",void 0,void 0,void 0,t).then((t=>{dt.current&&tt((o=>{const n=new Set(o.map((t=>t.id))),r=t.filter((t=>!n.has(t.id)));if(0===r.length)return o;const i=[...r,...o];return y.set(e,i),i}))})).catch(console.warn)}}),[Y,F,H,O,K,mt]);const Rt=r((()=>{const t={};R.forEach(((e,o)=>{o.startsWith("filter_")&&(t[o.replace("filter_","")]=e)}));let e=Z.map(((t,e)=>({item:t,index:e})));for(const[o,n]of Object.entries(t)){const t=n.replace("%USERNAME%",xt()),r=s.context.nickname||"";e=e.filter((({item:e})=>{const n=e.data[o];return null!=n&&(String(n).includes(t)||String(n).includes(r))}))}if(N){const t=N(e.map((({item:t})=>t)),F),o=new Set(t.map((t=>t.id)));e=e.filter((({item:t})=>o.has(t.id)))}const o=e.map((({item:t,index:e})=>({...t.data,createdAt:t.createdAt,_id:t.id,originalMessageId:t.originalMessageId||t.id,_index:e}))),n=E?.(F)?.deduplicateBy;if(n){const t=Array.isArray(n)?n:[n],e=e=>{for(const o of t){const t=e[o];if(null!=t&&""!==String(t).trim())return String(t)}},r=new Set;return o.filter((t=>{const o=e(t);return void 0===o||!r.has(o)&&(r.add(o),!0)}))}return o}),[Z,R,s.context.nickname,xt,N,F,E]),Lt=r((()=>{const t=(J||"").trim().toLowerCase();if(!t)return Rt;const e=wt.filter((t=>!t.hidden)).map((t=>t.key));return Rt.filter((o=>{for(const n of e)if(Array.isArray(n))for(const e of n){const n=o[e];if(null!=n&&String(n).toLowerCase().includes(t))return!0}else{const e=o[n];if(null!=e&&String(e).toLowerCase().includes(t))return!0}return!1}))}),[Rt,J,wt]),Ft=a((()=>{y.clearPattern(F),lt.current="",pt((t=>t+1))}),[F]),Ut=a((async()=>{at(!0);try{const t=await Y.readDataMessages(F,"",void 0,Z.length,P),e=[...Z,...t];tt(e),y.set(`${F}-all`,e),rt(t.length===P)}catch(t){console.warn(t)}finally{at(!1)}}),[Z,Y,F]),Ht=a((t=>{gt(t)}),[]),Ot=()=>{kt(!1),Dt(null)},Wt=a((async()=>{const t=`${F}_${(new Date).toISOString().split("T")[0]}`.replace(/[/\\:*?"<>|]/g,"_");const e=null!==ut?ut:Lt;await A(e,wt,t,ht)||console.warn("No data to export")}),[ut,Lt,wt,F,ht]),qt=r((()=>null!==ut?ut.length:Lt.length),[ut,Lt]);return t(k,{hideHeader:!0,children:e("div",{className:ft.container,children:[t("div",{className:ft.backButton,children:t(c,{appearance:"subtle",icon:t(h,{}),onClick:()=>jt(-1),children:ht("Tillbaka")})}),e("div",{className:ft.headerRow,children:[t(f,{title:ht(U||"Loggbok")}),e("div",{className:ft.buttonGroup,children:[t(c,{appearance:"subtle",icon:t(j,{}),onClick:Ft,title:ht("Refresh"),children:ht("Refresh")}),z&&t(c,{appearance:"subtle",icon:t(x,{}),onClick:Wt,title:ht("Export to Excel"),children:ht("Export to Excel")}),(W||V)&&t(c,{appearance:"primary",icon:t(w,{}),onClick:W?()=>{St(null),Ct(!0)}:()=>window.open(V,"_blank"),className:ft.addButton,children:ht("Add Record")})]})]}),t("div",{className:ft.searchBox,children:t(M,{placeholder:ht("Sök")+"...",value:J,onChange:Et,recentSearches:Tt,onCommitSearch:Nt,onRemoveRecentSearch:Pt})}),!et&&e("div",{className:ft.recordsCount,children:[ht("Total"),": ",qt," ",ht("records"),qt!==Z.length&&` (${ht("filtered from")} ${Z.length})`]}),e("div",{className:ft.listContainer,children:[et&&t("p",{children:ht("Söker")+"..."}),!et&&t(I,{data:Lt,columns:wt,canEdit:q,onEdit:(t,e)=>{const o=Z[e];o&&(St({data:{...o.data},index:e}),Ct(!0))},onDelete:(t,e)=>{const o=Z[e];o&&(Dt({index:e,id:o.id}),kt(!0))},onToggleCheckbox:async(t,e,o,n)=>{const r=Z[n];if(r){const t=Array.isArray(e)?e[0]:e,i={...r.data,[t]:String(o)},a=await Y.updateDataMessage(r.id,i);tt((t=>{const e=[...t];return e[n]={...r,id:a,data:i},e})),y.clearPattern(F)}},onEnumChange:async(t,e,o,n)=>{const r=Z[n];if(r){const t=Array.isArray(e)?e[0]:e,i={...r.data,[t]:o},a=await Y.updateDataMessage(r.id,i);tt((t=>{const e=[...t];return e[n]={...r,id:a,data:i},e})),y.clearPattern(F)}},onFilteredDataChange:Ht})]}),nt&&!J.trim()&&t("div",{className:ft.loadMoreContainer,children:t(c,{appearance:"primary",size:"medium",onClick:Ut,disabled:it,children:it?ht("Laddar..."):ht("Visa fler")+` (${Z.length} ${ht("laddade")})`})}),t(T,{open:yt,onClose:()=>Ct(!1),onSave:async t=>{if(At){const e=Z[At.index];if(e){const o={};for(const e in t){const n=t[e];o[e]=null==n?"":String(n)}const n=await Y.updateDataMessage(e.id,o);tt((t=>{const r=[...t];return r[At.index]={...e,id:n,data:o},r})),y.clearPattern(F)}}else{const e={};for(const o in t){const n=t[o];e[o]=null==n?"":String(n)}const o={id:await Y.createDataMessage(F,e),data:e,createdAt:(new Date).toISOString(),fileId:null,fileIds:[],tags:[F],mentions:[Y.codicent]};tt((t=>[o,...t])),y.clearPattern(F)}},columns:wt,initialData:At?.data}),t(l,{open:vt,onOpenChange:(t,e)=>!e.open&&Ot(),children:t(d,{children:e(m,{children:[t(p,{children:ht("Confirm Delete")}),t(u,{children:ht("Are you sure you want to delete this record? This action cannot be undone.")}),e(g,{children:[t(c,{appearance:"secondary",onClick:Ot,children:ht("Cancel")}),t(c,{appearance:"primary",onClick:async()=>{if(bt)try{await Y.deleteDataMessage(bt.id),tt((t=>t.filter(((t,e)=>e!==bt.index)))),y.clearPattern(F)}catch(t){console.error("Failed to delete record:",t)}finally{kt(!1),Dt(null)}},children:ht("Delete")})]})]})})})]})})};export{B as ListPage,B as default};
|
|
@@ -120,8 +120,9 @@ export interface AuditConfig {
|
|
|
120
120
|
* How compliance is captured:
|
|
121
121
|
* - "checkbox": binary yes/no toggle (default, compatible with penta_audit)
|
|
122
122
|
* - "enum": dropdown with custom options, each flagged as compliant or not
|
|
123
|
+
* Defaults to "checkbox" when not specified.
|
|
123
124
|
*/
|
|
124
|
-
answerMode
|
|
125
|
+
answerMode?: AuditAnswerMode;
|
|
125
126
|
/**
|
|
126
127
|
* Required when answerMode === "enum".
|
|
127
128
|
* Defines all selectable answer options and which count as compliant.
|
|
@@ -190,6 +191,12 @@ export interface AuditRoleCapabilities {
|
|
|
190
191
|
canViewManagerAreaUnits: boolean;
|
|
191
192
|
/** Read-only access (cannot submit answers) */
|
|
192
193
|
readOnly: boolean;
|
|
194
|
+
/** Can export their own unit as a package */
|
|
195
|
+
canExportUnit: boolean;
|
|
196
|
+
/** Can import an audit package into their own unit */
|
|
197
|
+
canImportUnit: boolean;
|
|
198
|
+
/** Can bulk-export multiple units */
|
|
199
|
+
canBulkExport: boolean;
|
|
193
200
|
}
|
|
194
201
|
/** Lifecycle status of a requirement definition. */
|
|
195
202
|
export type AuditRequirementStatus = "Draft" | "Active" | "Inactive";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/types/audit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,kEAAkE;AAClE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,MAAM,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,WAAW,EAAE,OAAO,CAAC;CACtB;AAMD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MA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MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,2BAA2B;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,0BAA0B;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -29,11 +29,27 @@ export * from "./audit";
|
|
|
29
29
|
import type { ColumnAction, ColumnDefinition } from "../components/ListView";
|
|
30
30
|
export type { ColumnAction, ColumnDefinition };
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Configuration for a single list view, supporting column definitions and optional deduplication.
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface ListConfig {
|
|
36
|
+
/** Column definitions for this list */
|
|
37
|
+
columns: ColumnDefinition[];
|
|
38
|
+
/**
|
|
39
|
+
* When set, only the most recent message per unique value of this key is shown.
|
|
40
|
+
* When an array is provided, keys are tried in order and the first truthy value is used.
|
|
41
|
+
* Useful for cases where multiple independent messages represent the same entity
|
|
42
|
+
* (e.g. same customer number or offer number) and only the latest should be displayed.
|
|
43
|
+
*/
|
|
44
|
+
deduplicateBy?: string | string[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* List definitions keyed by tag name (e.g., "customer2", "offertjson").
|
|
48
|
+
* Each entry can be a plain column-definition array (backward-compatible) or a full ListConfig.
|
|
33
49
|
* @public
|
|
34
50
|
*/
|
|
35
51
|
export interface ListDefinitions {
|
|
36
|
-
[tagName: string]: ColumnDefinition[];
|
|
52
|
+
[tagName: string]: ColumnDefinition[] | ListConfig;
|
|
37
53
|
}
|
|
38
54
|
/**
|
|
39
55
|
* AI chat instructions configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,KAAK,EAAE,MAAM,CA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ACd,SAAS,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditExport.d.ts","sourceRoot":"","sources":["../../../src/utils/auditExport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAQ/F;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EACvD,YAAY,EAAE,gBAAgB,EAAE,EAChC,OAAO,EAAE,WAAW,EAAE,EACtB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,eAAe,GAAG,aAAa,CAAC,GACxE,YAAY,CAed;AAMD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAElE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMrE;AAMD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"auditExport.d.ts","sourceRoot":"","sources":["../../../src/utils/auditExport.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAQ/F;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EACvD,YAAY,EAAE,gBAAgB,EAAE,EAChC,OAAO,EAAE,WAAW,EAAE,EACtB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,eAAe,GAAG,aAAa,CAAC,GACxE,YAAY,CAed;AAMD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAElE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAMrE;AAMD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAwFlE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAQxE"}
|
|
@@ -12,7 +12,7 @@ export declare const AUDIT_CHECKBOX_OPTIONS: AuditAnswerOption[];
|
|
|
12
12
|
* Merges a partial AuditConfig with defaults to produce a fully resolved config.
|
|
13
13
|
* Call this once at app startup and pass the result to all audit hooks/components.
|
|
14
14
|
*/
|
|
15
|
-
export declare function resolveAuditConfig(config: AuditConfig): ResolvedAuditConfig;
|
|
15
|
+
export declare function resolveAuditConfig(config: AuditConfig | Partial<AuditConfig>): ResolvedAuditConfig;
|
|
16
16
|
/**
|
|
17
17
|
* Calculates time remaining until a compliance requirement expires.
|
|
18
18
|
* @param validUntil - ISO 8601 expiration timestamp
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/auditUtils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EAEX,qBAAqB,EACrB,SAAS,EAGT,kBAAkB,EAElB,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAMxB,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD,eAAO,MAAM,sBAAsB,EAAE,iBAAiB,EAIrD,CAAC;AA8CF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,
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3F;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAIlG;AAMD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,SAAS,GAAG,qBAAqB,CAgD/E;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,iBAAiB,EAAE,CAQ1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n=24,e=[{value:"yes",label:"Yes",isCompliant:!0},{value:"no",label:"No",isCompliant:!1},{value:"",label:"—",isCompliant:!1}],t={requirement:"audit_req",answer:"audit_answer",unit:"audit_unit",role:"user_role",topology:"audit_topology"},i={nameField:"Name",idField:"UnitId",marketAreaField:"MarketArea",tagsField:"Tags"},a={groupField:"Standard",categoryField:"Area",titleField:"Requirement",descriptionField:"Description",levelField:"Level",validityField:"ValidityPeriodMonths",statusField:"Status"},r={appTitle:"Audit",unit:"Unit",unitPlural:"Units",managerArea:"Manager Area",group:"Group",groupPlural:"Groups",category:"Category",categoryPlural:"Categories",requirement:"Requirement",requirementPlural:"Requirements",compliantLabel:"Compliant",nonCompliantLabel:"Non-compliant"};function o(n){const o=n.answerOptions&&n.answerOptions.length>0?n.answerOptions:e;return{answerMode:n.answerMode??"checkbox",answerOptions:o,topology:n.topology??{},terminology:{...r,...n.terminology??{}},roleLabels:{admin:n.roleLabels?.admin??"Admin",manager:n.roleLabels?.manager??"Manager",auditor:n.roleLabels?.auditor??"Auditor"},tags:{...t,...n.tags??{}},unitFieldMapping:{...i,...n.unitFieldMapping??{}},requirementFieldMapping:{...a,...n.requirementFieldMapping??{}},defaultValidityPeriodMonths:n.defaultValidityPeriodMonths??24}}function l(n){if(!n)return null;const e=new Date,t=new Date(n).getTime()-e.getTime(),i=Math.floor(t/864e5),a=Math.floor(i/30);return{days:i,months:a,years:Math.floor(a/12),isExpired:i<0,isUrgent:i>=0&&i<30,isExpiringSoon:i>=0&&i<90}}function s(n){return n?n.isExpired?{background:"#FEE2E2",text:"#991B1B",border:"#FCA5A5"}:n.isUrgent?{background:"#FED7AA",text:"#9A3412",border:"#FB923C"}:n.isExpiringSoon?{background:"#FEF3C7",text:"#92400E",border:"#FCD34D"}:n.months<=6?{background:"#FEF9C3",text:"#854D0E",border:"#FDE047"}:{background:"#ECFDF5",text:"#065F46",border:"#D1FAE5"}:{background:"#F3F4F6",text:"#6B7280",border:"#E5E7EB"}}function u(n,e){if(!n||null==e||0===e)return;const t=new Date(n);return t.setMonth(t.getMonth()+e),t.toISOString()}function d(n){return null==n||0===n?"NO EXPIRY":`${n} MONTHS`}function c(n,e){if(!n)return e;const t=parseInt(n,10);return isNaN(t)?e:0===t?null:t}function g(n,e){if("checkbox"===e.answerMode)return"yes"===n;const t=e.answerOptions.find((e=>e.value===n));return t?.isCompliant??!1}function p(n,e){if(0===n.length)return 0;const t=n.filter((n=>g(n.answer,e))).length;return Math.round(t/n.length*100)}function m(n){switch(n){case"Admin":return{canViewAllUnits:!0,canSwitchUnits:!0,canEditRequirements:!0,canManageUsers:!0,canEditUnitTags:!0,viewOwnUnitOnly:!1,canEditOwnAudit:!0,canViewManagerAreaUnits:!0,readOnly:!1,canExportUnit:!0,canImportUnit:!0,canBulkExport:!0};case"Manager":return{canViewAllUnits:!1,canSwitchUnits:!1,canEditRequirements:!1,canManageUsers:!1,canEditUnitTags:!1,viewOwnUnitOnly:!1,canEditOwnAudit:!1,canViewManagerAreaUnits:!0,readOnly:!0,canExportUnit:!1,canImportUnit:!1,canBulkExport:!0};default:return{canViewAllUnits:!1,canSwitchUnits:!1,canEditRequirements:!1,canManageUsers:!1,canEditUnitTags:!1,viewOwnUnitOnly:!0,canEditOwnAudit:!0,canViewManagerAreaUnits:!1,readOnly:!1,canExportUnit:!0,canImportUnit:!0,canBulkExport:!1}}}function w(n){return"checkbox"===n.answerMode?[{value:"yes",label:n.terminology.compliantLabel,isCompliant:!0},{value:"no",label:n.terminology.nonCompliantLabel,isCompliant:!1}]:n.answerOptions}export{e as AUDIT_CHECKBOX_OPTIONS,n as DEFAULT_AUDIT_VALIDITY_PERIOD_MONTHS,u as calcValidUntil,l as calculateAuditTimeRemaining,d as formatValidityPeriod,p as getAuditComplianceRate,m as getAuditRoleCapabilities,s as getAuditUrgencyColor,w as getEffectiveAnswerOptions,g as isAnswerCompliant,c as parseValidityPeriod,o as resolveAuditConfig};
|
package/dist/index.d.ts
CHANGED
|
@@ -752,8 +752,9 @@ interface AuditConfig {
|
|
|
752
752
|
* How compliance is captured:
|
|
753
753
|
* - "checkbox": binary yes/no toggle (default, compatible with penta_audit)
|
|
754
754
|
* - "enum": dropdown with custom options, each flagged as compliant or not
|
|
755
|
+
* Defaults to "checkbox" when not specified.
|
|
755
756
|
*/
|
|
756
|
-
answerMode
|
|
757
|
+
answerMode?: AuditAnswerMode;
|
|
757
758
|
/**
|
|
758
759
|
* Required when answerMode === "enum".
|
|
759
760
|
* Defines all selectable answer options and which count as compliant.
|
|
@@ -822,6 +823,12 @@ interface AuditRoleCapabilities {
|
|
|
822
823
|
canViewManagerAreaUnits: boolean;
|
|
823
824
|
/** Read-only access (cannot submit answers) */
|
|
824
825
|
readOnly: boolean;
|
|
826
|
+
/** Can export their own unit as a package */
|
|
827
|
+
canExportUnit: boolean;
|
|
828
|
+
/** Can import an audit package into their own unit */
|
|
829
|
+
canImportUnit: boolean;
|
|
830
|
+
/** Can bulk-export multiple units */
|
|
831
|
+
canBulkExport: boolean;
|
|
825
832
|
}
|
|
826
833
|
/** Lifecycle status of a requirement definition. */
|
|
827
834
|
type AuditRequirementStatus = "Draft" | "Active" | "Inactive";
|
|
@@ -1002,7 +1009,7 @@ declare const AUDIT_CHECKBOX_OPTIONS: AuditAnswerOption[];
|
|
|
1002
1009
|
* Merges a partial AuditConfig with defaults to produce a fully resolved config.
|
|
1003
1010
|
* Call this once at app startup and pass the result to all audit hooks/components.
|
|
1004
1011
|
*/
|
|
1005
|
-
declare function resolveAuditConfig(config: AuditConfig): ResolvedAuditConfig;
|
|
1012
|
+
declare function resolveAuditConfig(config: AuditConfig | Partial<AuditConfig>): ResolvedAuditConfig;
|
|
1006
1013
|
/**
|
|
1007
1014
|
* Calculates time remaining until a compliance requirement expires.
|
|
1008
1015
|
* @param validUntil - ISO 8601 expiration timestamp
|
|
@@ -1359,7 +1366,7 @@ interface UseAuditStateParams {
|
|
|
1359
1366
|
/** The ID/handle of the unit the current user is auditing */
|
|
1360
1367
|
unitId: string | null | undefined;
|
|
1361
1368
|
/** Full audit config (will be resolved internally) */
|
|
1362
|
-
config: AuditConfig
|
|
1369
|
+
config: AuditConfig | Partial<AuditConfig>;
|
|
1363
1370
|
/** Set false to skip fetching (e.g., while not yet authenticated) */
|
|
1364
1371
|
enabled?: boolean;
|
|
1365
1372
|
}
|
|
@@ -1377,7 +1384,7 @@ interface UseAuditStateResult {
|
|
|
1377
1384
|
/** Save an updated answer for one requirement */
|
|
1378
1385
|
updateAnswer: (requirementId: string, answerValue: string, comment?: string, photos?: string, complianceDate?: string) => Promise<void>;
|
|
1379
1386
|
}
|
|
1380
|
-
declare function useAuditState({ service, unitId, config, enabled
|
|
1387
|
+
declare function useAuditState({ service, unitId, config, enabled }: UseAuditStateParams): UseAuditStateResult;
|
|
1381
1388
|
|
|
1382
1389
|
/**
|
|
1383
1390
|
* @fileoverview Role-check hook for the generic audit feature.
|
|
@@ -1390,7 +1397,7 @@ interface UseAuditRoleCheckParams {
|
|
|
1390
1397
|
service: CodicentService;
|
|
1391
1398
|
/** The current user's nickname / display name */
|
|
1392
1399
|
nickname: string | null | undefined;
|
|
1393
|
-
config: AuditConfig
|
|
1400
|
+
config: AuditConfig | Partial<AuditConfig>;
|
|
1394
1401
|
}
|
|
1395
1402
|
interface UseAuditRoleCheckResult {
|
|
1396
1403
|
role: AuditRole;
|
|
@@ -1402,7 +1409,7 @@ interface UseAuditRoleCheckResult {
|
|
|
1402
1409
|
loading: boolean;
|
|
1403
1410
|
error: string | null;
|
|
1404
1411
|
}
|
|
1405
|
-
declare function useAuditRoleCheck({ service, nickname, config
|
|
1412
|
+
declare function useAuditRoleCheck({ service, nickname, config }: UseAuditRoleCheckParams): UseAuditRoleCheckResult;
|
|
1406
1413
|
|
|
1407
1414
|
/**
|
|
1408
1415
|
* @fileoverview Filter state hook for the main audit page (per-unit requirement list).
|
|
@@ -1463,7 +1470,7 @@ declare function useAuditManagerFilters(units: AuditUnitStats[]): UseAuditManage
|
|
|
1463
1470
|
|
|
1464
1471
|
interface UseAuditManagerDataParams {
|
|
1465
1472
|
service: CodicentService;
|
|
1466
|
-
config: AuditConfig
|
|
1473
|
+
config: AuditConfig | Partial<AuditConfig>;
|
|
1467
1474
|
/** When provided, only fetch units in this market area (Manager role scoping) */
|
|
1468
1475
|
marketArea?: string;
|
|
1469
1476
|
enabled?: boolean;
|
|
@@ -1863,11 +1870,27 @@ interface ButtonConfig {
|
|
|
1863
1870
|
}
|
|
1864
1871
|
|
|
1865
1872
|
/**
|
|
1866
|
-
*
|
|
1873
|
+
* Configuration for a single list view, supporting column definitions and optional deduplication.
|
|
1874
|
+
* @public
|
|
1875
|
+
*/
|
|
1876
|
+
interface ListConfig {
|
|
1877
|
+
/** Column definitions for this list */
|
|
1878
|
+
columns: ColumnDefinition[];
|
|
1879
|
+
/**
|
|
1880
|
+
* When set, only the most recent message per unique value of this key is shown.
|
|
1881
|
+
* When an array is provided, keys are tried in order and the first truthy value is used.
|
|
1882
|
+
* Useful for cases where multiple independent messages represent the same entity
|
|
1883
|
+
* (e.g. same customer number or offer number) and only the latest should be displayed.
|
|
1884
|
+
*/
|
|
1885
|
+
deduplicateBy?: string | string[];
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* List definitions keyed by tag name (e.g., "customer2", "offertjson").
|
|
1889
|
+
* Each entry can be a plain column-definition array (backward-compatible) or a full ListConfig.
|
|
1867
1890
|
* @public
|
|
1868
1891
|
*/
|
|
1869
1892
|
interface ListDefinitions {
|
|
1870
|
-
[tagName: string]: ColumnDefinition[];
|
|
1893
|
+
[tagName: string]: ColumnDefinition[] | ListConfig;
|
|
1871
1894
|
}
|
|
1872
1895
|
/**
|
|
1873
1896
|
* AI chat instructions configuration
|
|
@@ -2525,10 +2548,15 @@ interface ListPageProps {
|
|
|
2525
2548
|
state: CodicentAppState;
|
|
2526
2549
|
/** Returns column definitions for a given tag. Falls back to all data keys if not provided. */
|
|
2527
2550
|
getColumnDefs?: (tag: string) => ColumnDefinition[];
|
|
2551
|
+
/**
|
|
2552
|
+
* Returns full list configuration (columns + optional deduplicateBy) for a given tag.
|
|
2553
|
+
* When provided, takes precedence over getColumnDefs for deriving column definitions.
|
|
2554
|
+
*/
|
|
2555
|
+
getListConfig?: (tag: string) => ListConfig | undefined;
|
|
2528
2556
|
/** Optional data filter applied after fetch. Useful for app-specific filtering (e.g. empty notes). */
|
|
2529
2557
|
filterData?: (data: DataMessage[], tag: string) => DataMessage[];
|
|
2530
2558
|
}
|
|
2531
|
-
declare const ListPage: ({ state, getColumnDefs, filterData }: ListPageProps) => react_jsx_runtime.JSX.Element;
|
|
2559
|
+
declare const ListPage: ({ state, getColumnDefs, getListConfig, filterData }: ListPageProps) => react_jsx_runtime.JSX.Element;
|
|
2532
2560
|
|
|
2533
2561
|
declare const CrmPage: React__default.FC<{
|
|
2534
2562
|
state: CodicentAppState;
|
|
@@ -2701,4 +2729,4 @@ interface CodicentApp {
|
|
|
2701
2729
|
*/
|
|
2702
2730
|
declare function createCodicentApp(config: CreateAppConfig): CodicentApp;
|
|
2703
2731
|
|
|
2704
|
-
export { AUDIT_CHECKBOX_OPTIONS, AiInput, AppButtonsConfig, AppConfig, AppConfigOptions, AppFrame, AppInfo, AppStateDefinition, AppStateMachine, AudioIcon, AudioRecorder, AudioRecorderState, AuditAnswer, AuditAnswerCell, AuditAnswerMode, AuditAnswerOption, AuditBulkExportDialog, AuditBulkUploadDialog, AuditCircularProgress, AuditConfig, AuditFilterBar, AuditFilterChips, AuditFilterState, AuditGroupsProgress, AuditHorizontalProgress, AuditManagerFilterState, AuditManagerStats, AuditPackage, AuditRequirement, AuditRequirementDialog, AuditRequirementDialogProps, AuditRequirementFieldMapping, AuditRequirementStatus, AuditRequirementsFilterState, AuditRole, AuditRoleCapabilities, AuditRoleIndicator, AuditRoleLabels, AuditSearchBar, AuditSortPreset, AuditSortPresets, AuditSummaryDashboard, AuditTagConfig, AuditTerminology, AuditTimeRemaining, AuditUnitExportDialog, AuditUnitFieldMapping, AuditUnitImportDialog, AuditUnitOption, AuditUnitStats, AuditUnitSwitcher, AuthStateOptions, BulkUploadDialog, Button, ButtonConfig, CacheEntry, CacheManager, CachedUserSession, Canvas, CanvasPageProps, Chat, ChatInput, ChatInstructions, ChatMessage, ChatProps, CodicentApp, CodicentAppState, CodicentMessage, CodicentService, CodicentServiceOptions, ColorPicker, ColumnAction, ColumnDefinition, CombinedPlaceholderDialog, Compose, CompoundButton, Content, CookieBanner, CookieBannerProps, CreateAppConfig, CrmPage, CrmPagePersistent, DEFAULT_AUDIT_VALIDITY_PERIOD_MONTHS, DataCacheEntry, DataMessage$1 as DataMessage, DataMessagePicker, DataMessagePickerProps, DataMessagePickerSelection, DataSchemas, DatePicker, Debug, ErrorBoundary, ExcelColumnDefinition, FileInfo$1 as FileInfo, FilePlaceholder, FileThumbnail, Footer, Form$1 as Form, FormAccept, FormInvite, Form as FormPage, GenericJsonRenderer, Header, Help, Home, HomeButtonStyles, HomePageProps, HtmlView, HtmlViewer, ImageViewer as ImageView, Input, ItemType, Label, LanguageSelector, ListDefinitions, ListPage, ListPageProps, _default as ListView, ListViewProps, Log, LogPageProps, LogTagDefinition, Login, Logout, Markdown, MemberInfo, Menu, MenuPageProps, Message$2 as Message, Content$1 as MessageContent, MessageInput, MessageItem, ModuleFlags, OfflineMessage, Page, Profile, Prompt, Purchase, QrCodeDialog, QrScan, QrScanner, RealtimeVoice, RecordModal, RecordModalProps, ResolvedAuditConfig, 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, UseAuditFiltersResult, UseAuditManagerDataParams, UseAuditManagerDataResult, UseAuditManagerFiltersResult, UseAuditRequirementsFiltersResult, UseAuditRoleCheckParams, UseAuditRoleCheckResult, UseAuditStateParams, UseAuditStateResult, UseAuthState, UseCodicentAppOptions, UserInfo, UserRole, VoiceIcon, VoiceIconProps, WavRecorder, WavStreamPlayer, buildAuditPackage, calcValidUntil, calculateAuditTimeRemaining, createAppStateMachine, createCodicentApp, dataCache, exportAuditPackageAsHtml, exportAuditPackageAsJson, exportToExcel, formatValidityPeriod, generateBrandVariants, getAuditComplianceRate, getAuditRoleCapabilities, getAuditUrgencyColor, getConfigValue, getEffectiveAnswerOptions, getGpsLocation, getTimeString, importAuditPackageFromHtml, importAuditPackageFromJson, initCodicentApp, isAnswerCompliant, isMobileDevice, log, parseValidityPeriod, resolveAuditConfig, setBaseUrl, setSignalRHost, stateMachineCacheManager, useAppStyles, useAudioRecorder, useAuditFilters, useAuditManagerData, useAuditManagerFilters, useAuditRequirementsFilters, useAuditRoleCheck, useAuditState, useAuthState, useChat, useCodicentApp, useCodicentState, useDebugLogs, useLocalization, useObserveDataSchemas, useOnlineStatus, useRealtimeVoiceAI, useStateWithLocalStorage, useTemplateVariables, useToaster, useTools, useUserRoles, withWakeLock };
|
|
2732
|
+
export { AUDIT_CHECKBOX_OPTIONS, AiInput, AppButtonsConfig, AppConfig, AppConfigOptions, AppFrame, AppInfo, AppStateDefinition, AppStateMachine, AudioIcon, AudioRecorder, AudioRecorderState, AuditAnswer, AuditAnswerCell, AuditAnswerMode, AuditAnswerOption, AuditBulkExportDialog, AuditBulkUploadDialog, AuditCircularProgress, AuditConfig, AuditFilterBar, AuditFilterChips, AuditFilterState, AuditGroupsProgress, AuditHorizontalProgress, AuditManagerFilterState, AuditManagerStats, AuditPackage, AuditRequirement, AuditRequirementDialog, AuditRequirementDialogProps, AuditRequirementFieldMapping, AuditRequirementStatus, AuditRequirementsFilterState, AuditRole, AuditRoleCapabilities, AuditRoleIndicator, AuditRoleLabels, AuditSearchBar, AuditSortPreset, AuditSortPresets, AuditSummaryDashboard, AuditTagConfig, AuditTerminology, AuditTimeRemaining, AuditUnitExportDialog, AuditUnitFieldMapping, AuditUnitImportDialog, AuditUnitOption, AuditUnitStats, AuditUnitSwitcher, AuthStateOptions, BulkUploadDialog, Button, ButtonConfig, CacheEntry, CacheManager, CachedUserSession, Canvas, CanvasPageProps, Chat, ChatInput, ChatInstructions, ChatMessage, ChatProps, CodicentApp, CodicentAppState, CodicentMessage, CodicentService, CodicentServiceOptions, ColorPicker, ColumnAction, ColumnDefinition, CombinedPlaceholderDialog, Compose, CompoundButton, Content, CookieBanner, CookieBannerProps, CreateAppConfig, CrmPage, CrmPagePersistent, DEFAULT_AUDIT_VALIDITY_PERIOD_MONTHS, DataCacheEntry, DataMessage$1 as DataMessage, DataMessagePicker, DataMessagePickerProps, DataMessagePickerSelection, DataSchemas, DatePicker, Debug, ErrorBoundary, ExcelColumnDefinition, FileInfo$1 as FileInfo, FilePlaceholder, FileThumbnail, Footer, Form$1 as Form, FormAccept, FormInvite, Form as FormPage, GenericJsonRenderer, Header, Help, Home, HomeButtonStyles, HomePageProps, HtmlView, HtmlViewer, ImageViewer as ImageView, Input, ItemType, Label, LanguageSelector, ListConfig, ListDefinitions, ListPage, ListPageProps, _default as ListView, ListViewProps, Log, LogPageProps, LogTagDefinition, Login, Logout, Markdown, MemberInfo, Menu, MenuPageProps, Message$2 as Message, Content$1 as MessageContent, MessageInput, MessageItem, ModuleFlags, OfflineMessage, Page, Profile, Prompt, Purchase, QrCodeDialog, QrScan, QrScanner, RealtimeVoice, RecordModal, RecordModalProps, ResolvedAuditConfig, 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, UseAuditFiltersResult, UseAuditManagerDataParams, UseAuditManagerDataResult, UseAuditManagerFiltersResult, UseAuditRequirementsFiltersResult, UseAuditRoleCheckParams, UseAuditRoleCheckResult, UseAuditStateParams, UseAuditStateResult, UseAuthState, UseCodicentAppOptions, UserInfo, UserRole, VoiceIcon, VoiceIconProps, WavRecorder, WavStreamPlayer, buildAuditPackage, calcValidUntil, calculateAuditTimeRemaining, createAppStateMachine, createCodicentApp, dataCache, exportAuditPackageAsHtml, exportAuditPackageAsJson, exportToExcel, formatValidityPeriod, generateBrandVariants, getAuditComplianceRate, getAuditRoleCapabilities, getAuditUrgencyColor, getConfigValue, getEffectiveAnswerOptions, getGpsLocation, getTimeString, importAuditPackageFromHtml, importAuditPackageFromJson, initCodicentApp, isAnswerCompliant, isMobileDevice, log, parseValidityPeriod, resolveAuditConfig, setBaseUrl, setSignalRHost, stateMachineCacheManager, useAppStyles, useAudioRecorder, useAuditFilters, useAuditManagerData, useAuditManagerFilters, useAuditRequirementsFilters, useAuditRoleCheck, useAuditState, useAuthState, useChat, useCodicentApp, useCodicentState, useDebugLogs, useLocalization, useObserveDataSchemas, useOnlineStatus, useRealtimeVoiceAI, useStateWithLocalStorage, useTemplateVariables, useToaster, useTools, useUserRoles, withWakeLock };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codicent-app-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "SDK for building AI-powered applications with Codicent",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@auth0/auth0-react": "^2.2.4",
|
|
60
|
+
"exceljs": "^4.4.0",
|
|
60
61
|
"@babel/core": "^7.21.0",
|
|
61
62
|
"@babel/preset-env": "^7.20.2",
|
|
62
63
|
"@babel/preset-react": "^7.18.6",
|