PageSourceSearch

https://idwell.ai/assets/index-DjjK-5CI.js

js idwell.ai collected 2026-10-05 12:52:33 UTC 10,880 bytes, 2 lines download raw bytes

1import{_ as I,an as C,T as R}from"./index-ClxRxC2T.js";import{b as y,j as e,b4 as w,M as t,cS as p,T as k,c2 as T,o as g,k as K,aN as j,u as v,a1 as L,l as W,bJ as _,W as P,F as i,a7 as A,J as N,cj as D,b8 as O,b9 as V}from"./index.css.ts.vanilla-DcQK6rwz.js";import{d as H}from"./debounce-CMcdZk5q.js";import{R as M}from"./RestoreScroll-BzpcUQqj.js";import{a as U,m as Q}from"./download-C8cQxDGK.js";import{F as z}from"./FormattedDate-bDcjL9zU.js";import{m as B}from"./makeRow-B-kYgpCS.js";const q=(function(){var l=[{defaultValue:null,kind:"LocalArgument",name:"clientCompanyRowId"},{defaultValue:null,kind:"LocalArgument",name:"count"},{defaultValue:null,kind:"LocalArgument",name:"cursor"},{defaultValue:null,kind:"LocalArgument",name:"searchText"}],a={kind:"Variable",name:"clientCompanyRowId",variableName:"clientCompanyRowId"},n={kind:"Variable",name:"searchText",variableName:"searchText"},r=[{kind:"Variable",name:"after",variableName:"cursor"},a,{kind:"Variable",name:"first",variableName:"count"},n],s={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:l,kind:"Fragment",metadata:null,name:"SettingsExportsWebhooksPagePaginationQuery",selections:[{args:[a,{kind:"Variable",name:"count",variableName:"count"},{kind:"Variable",name:"cursor",variableName:"cursor"},n],kind:"FragmentSpread",name:"SettingsExportsWebhooksPage_query"}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:l,kind:"Operation",name:"SettingsExportsWebhooksPagePaginationQuery",selections:[{alias:null,args:r,concreteType:"WebhookExportsConnection",kind:"LinkedField",name:"filterWebhookExports",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"totalCount",storageKey:null},{alias:null,args:null,concreteType:"WebhookExportsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"WebhookExport",kind:"LinkedField",name:"node",plural:!1,selections:[s,{alias:null,args:null,kind:"ScalarField",name:"rowId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"clientCompanyRowId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"receiverType",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasFiles",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorMessage",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorLink",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentRowId",storageKey:null},{alias:null,args:null,concreteType:"Document",kind:"LinkedField",name:"documentByDocumentRowId",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"derivedTitle",storageKey:null},s],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:r,filters:["clientCompanyRowId","searchText"],handle:"connection",key:"SettingsExportsWebhooksPage_filterWebhookExports",kind:"LinkedHandle",name:"filterWebhookExports"}]},params:{id:"411a396b114bcdb22745f4152ab326c9",metadata:{},name:"SettingsExportsWebhooksPagePaginationQuery",operationKind:"query",text:null}}})(),X=(function(){var l=["filterWebhookExports"];return{argumentDefinitions:[{defaultValue:null,kind:"LocalArgument",name:"clientCompanyRowId"},{defaultValue:null,kind:"LocalArgument",name:"count"},{defaultValue:null,kind:"LocalArgument",name:"cursor"},{defaultValue:null,kind:"LocalArgument",name:"searchText"}
1],kind:"Fragment",metadata:{connection:[{count:"count",cursor:"cursor",direction:"forward",path:l}],refetch:{connection:{forward:{count:"count",cursor:"cursor"},backward:null,path:l},fragmentPathInResult:[],operation:q}},name:"SettingsExportsWebhooksPage_query",selections:[{alias:"filterWebhookExports",args:[{kind:"Variable",name:"clientCompanyRowId",variableName:"clientCompanyRowId"},{kind:"Variable",name:"searchText",variableName:"searchText"}],concreteType:"WebhookExportsConnection",kind:"LinkedField",name:"__SettingsExportsWebhooksPage_filterWebhookExports_connection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"totalCount",storageKey:null},{alias:null,args:null,concreteType:"WebhookExportsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"WebhookExport",kind:"LinkedField",name:"node",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{args:null,kind:"FragmentSpread",name:"SettingsExportsWebhooksItem_item"},{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"cursor",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"PageInfo",kind:"LinkedField",name:"pageInfo",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"endCursor",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasNextPage",storageKey:null}],storageKey:null}],storageKey:null}],type:"Query",abstractKey:null}})(),$={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"SettingsExportsWebhooksItem_item",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"rowId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"clientCompanyRowId",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"receiverType",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"hasFiles",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorCode",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorMessage",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"errorLink",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"createdAt",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"documentRowId",storageKey:null},{alias:null,args:null,concreteType:"Document",kind:"LinkedField",name:"documentByDocumentRowId",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"derivedTitle",storageKey:null}],storageKey:null}],type:"WebhookExport",abstractKey:null};var J="_9t8rzr0",x="_9t8rzr1";function Y(l){switch(l){case"IXHAUS_TO_SFTP":return"iX-Haus";case"RELION_TO_AAREON":return"RELion";case"IMMOWARE_TO_WEBDAV":return"Immoware";default:return l}}const G=({item:l})=>{const[a,n]=g.useState(!1),[r,s]=g.useState(null);if(r)throw r;return l.hasFiles?e.jsx(k,{content:e.jsx(t,{id:"DOWNLOAD"}),children:e.jsx(K,{variant:"naked",size:"small",disabled:a,onClick:async u=>{u.stopPropagation(),n(!0);try{const c=await U(l.rowId),d=document.createElement("a");d.href=Q(c),d.download="",document.body.appendChild(d),d.click(),d.remove()}catch(c){s(c)}finally{n(!1)}},children:e.jsx(j,{color:"secondary"})})}):null},{RowHeader:Z,RowItem:ee}=B({columns:[{width:128,HeaderCell:e.jsx(t,{id:"STATUS"}),ItemCell:function({item:a}){return e.jsx(w,{color:a.status==="SUCCESS"?"success":"danger",children:e.jsx(t,{id:a.status==="SUCCESS"?"SUCCESSFUL":"FAILED"})})}},{width:256,HeaderCell:e.jsx(t,{id:"DOCUMENT"}),ItemCell:function({item:a}){return e.jsx(p,{to:`/documents/${a.documentRowId}`,search:{clientCompanyRowId:a.clientCompanyRowId},onClick:n=>n.stopPropagation(),children:a.documentByDocumentRowId.derivedTitle})}},{width:96,HeaderCell:e.jsx(t,{id:"RECEIVER"}),ItemCell:function({item:a}){return e.jsx(e.Fragment,{children:Y(a.receiverType)})}},{width:256,flexGrow:1,HeaderCell:e.jsx(t,{id:"ERROR"}),ItemCell:function({item:a}){if(a.status!=="FAILED")return null;const n=a.errorCode==="VALIDATION"&&a.errorMessage?a.errorMessage:e.jsx(t,{id:"WEBHOOK_EXPORT_INTERNAL_ERROR"}),r=e.jsx("span",{className:J,children:n});if(!a.errorLink)return e.jsx(k,{content:n,children:r});const s=/^https?:/.test(a.errorLink);return e.jsx(k,{content:n,children:s?e.jsx("a",{href:a.errorLink,target:"_blank",rel:"noopener noreferrer",className:x,onClick:u=>u.stopPropagation(),children:r}):e.jsx(p,{to:a.errorLink,className:x,onClick:u=>u.stopPropagation(),children:r})})}},{width:192,textAlign:"right",HeaderCell:e.jsx(t,{id:"CREATED_AT"}),ItemCell:function({item:a}){return e.jsxs(e.Fragment,{children:[e.jsx(z,{value:a.createdAt})," ",e.jsx(T,{hour12:!1,value:a.createdAt})]})}},{width:48,textAlign:"right",HeaderCell:null,ItemCell:G}]}),ae=l=>{const{item:a,...n}=l,r=y.useFragment($,a);return e.jsx(ee,{item:r,...n})};var le="_1vkmttm0",ne="_1vkmttm1",re="_1vkmttm2";const te={current:!1},ge=()=>{const l=v(),a=I(L()),n=W(),r=y.usePreloadedQuery(C,l.data.settingsExportsWebhooksPageQuery),{data:{filterWebhookExports:s},hasNext:u,isLoadingNext:c,loadNext:d,isRefetching:f,refetch:S}=_(X,r);g.useEffect(()=>{S({clientCompanyRowId:l.params.clientCompanyRowId,searchText:a.searchText})},[l.params.clientCompanyRowId,a.searchText]);const{register:b,handleSubmit:F,watch:E}=R({defaultValues:{searchText:a.searchText||null}}),h=F(({searchText:o})=>{n({search:m=>({...m,searchText:o||void 0})})});return g.useEffect(()=>{const o=H(h),{unsubscribe:m}=E(()=>o());return m},[]),e.jsxs(e.Fragment,{children:[e.jsx(t,{id:"EXPORTS",children:([o])=>e.jsx(P,{title:o})}),e.jsxs(i,{container:!0,direction:"column",fill:!0,sizing:"regular",children:[e.jsx(i,{item:!0,children:e.jsx(A,{children:e.jsx(t,{id:"EXPORTS_COUNT",values:{count:s?.totalCount??0}})})}),e.jsx(i,{item:!0,children:e.jsx("form",{onSubmit:h,children:e.jsx(i,{container:!0,align:"center",sizing:"tiny",children:e.jsx(i,{item:!0,flex:1,children:e.jsx(t,{id:"TYPE_HERE_TO_SEARCH",children:([o])=>e.jsx(N,{...b("searchText"),type:"search",placeholder:o,startAdornment:e.jsx(D,{})})})})})})}),e.jsx(i,{item:!0,overflowing:!0,children:e.jsxs(i,{container:!0,direction:"column",fill:!0,children:[e.jsx(i,{item:!0,children:e.jsx(Z,{className:le,naked:!0})}),e.jsx(M,{id:"SettingsExportsWebhooksPage",forceRestoreRef:te,children:o=>e.jsxs(i,{ref:o,item:!0,overflowing:!0,className:f?re:void 0,style:{overflowY:"scroll"},children:[s?.edges.map(({node:m})=>e.jsx(ae,{item:m,className:ne},m.id)),u&&!c&&e.jsx(O,{onReached:()=>d(parseInt(a.count))}),c&&e.jsx(V,{})]})})]})})]})]})};export{ge as SettingsExportsWebhooksPage,te as forceSettingsExportsWebhooksPageScrollRestore};
2//# sourceMappingURL=index-DjjK-5CI.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.