@airporting/integrations-app 0.4.165 → 0.4.167
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/mf/2070.css +73 -73
- package/dist/mf/5741.js +1 -1
- package/dist/mf/5858.js +1 -0
- package/dist/mf/9005.js +1 -1
- package/dist/mf/@mf-types/compiled-types/api/connectors/connectorHistoryQuery.d.ts +11 -0
- package/dist/mf/@mf-types/compiled-types/api/connectors/saveErrorMessage.d.ts +23 -0
- package/dist/mf/@mf-types/compiled-types/components/connectors/connector.history.d.ts +8 -0
- package/dist/mf/@mf-types/compiled-types/gen/IntegrationsApi.d.ts +142 -13
- package/dist/mf/@mf-types.zip +0 -0
- package/dist/mf/__federation_expose_single_connector.js +1 -1
- package/dist/mf/index.js +3 -3
- package/dist/mf/integrations_app.js +3 -3
- package/dist/mf/mf-manifest.json +3 -3
- package/dist/mf/mf-stats.json +9 -9
- package/package.json +1 -1
- package/dist/mf/4831.js +0 -1
package/dist/mf/5858.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["5858"],{800:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{F:()=>InlineLoader});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4848);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2773);function InlineLoader({label}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Center,{flex:1,h:"100%",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{align:"center",gap:"md",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Loader,{size:"md",color:"teal"}),label&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{fz:"sm",c:"dimmed",children:label})]})})}},6841:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{d:()=>SingleConnectorApp});var jsx_runtime=__webpack_require__(4848);var index_mjs_=__webpack_require__(2773);var index_js_=__webpack_require__(8556);var dist_index_js_=__webpack_require__(4259);var InlineLoader=__webpack_require__(800);var modern_index_js_=__webpack_require__(7714);var useAppConfigConnectorSingle=__webpack_require__(4613);var IntegrationsApi=__webpack_require__(6699);function useApiConnectorSingle(){const config=(0,useAppConfigConnectorSingle.C)();const client=new IntegrationsApi.Qq({baseUrl:config.api.replace(/\/$/,""),baseApiParams:{headers:{Authorization:config.token?`Bearer ${config.token}`:"",From:config.owner}}});return new IntegrationsApi.qx(client)}function useConnectorConfigQuery({enabled=true}={}){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const query=(0,modern_index_js_.useQuery)({queryKey:["connector","config","form",config.company,config.connector],queryFn:async()=>await api.connectors.getConnectorConfigV1({cid:config.company,connector:+config.connector}).then(x=>x.data),enabled,refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var esm_index_mjs_=__webpack_require__(4931);const GENERIQUE="Nous rencontrons un soucis technique. Veuillez r\xe9essayer plus tard.";const IDENTITE_REFUSEE="Votre v\xe9rification de s\xe9curit\xe9 n'est plus valable. Enregistrez \xe0 nouveau pour ressaisir votre mot de passe.";function messageDuCorps(corps){if("string"==typeof corps&&""!==corps.trim())return corps;if("object"!=typeof corps||null===corps)return null;const brut=corps.message;if("string"==typeof brut&&""!==brut.trim())return brut;if(Array.isArray(brut)){const lignes=brut.filter(l=>"string"==typeof l&&""!==l.trim());if(lignes.length>0)return lignes.join(" ")}return null}function saveErrorMessage(erreur){if("object"!=typeof erreur||null===erreur)return GENERIQUE;const{status,error}=erreur;if("number"!=typeof status||status<400||status>=500)return GENERIQUE;if(401===status||403===status)return IDENTITE_REFUSEE;return messageDuCorps(error)??GENERIQUE}function useConnectorSaveQuery(getRevealToken){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const queryClient=(0,modern_index_js_.useQueryClient)();const query=(0,modern_index_js_.useMutation)({mutationFn:async values=>{const revealToken=getRevealToken?.()??null;return await api.connectors.putConnectorDataV1({cid:config.company,connector:+config.connector},{data:values},revealToken?{headers:{"X-Reveal-Token":revealToken}}:{}).then(x=>x.data)},onSuccess:()=>{queryClient.invalidateQueries({queryKey:["connector","config","single",config.company,config.connector]});queryClient.invalidateQueries({queryKey:["connector","config","form",config.company,config.connector]});queryClient.invalidateQueries({queryKey:["connectors","list",config.company]});queryClient.invalidateQueries({queryKey:["connectors","list","ill",config.company]});esm_index_mjs_.notifications.show({title:"Connecteur sauvegard\xe9",message:"Vos donn\xe9es sont enregistr\xe9es !"})},onError:(error,variables,context)=>{console.error(error,variables,context);esm_index_mjs_.notifications.show({color:"red",title:"Erreur !",message:saveErrorMessage(error)})}});return query}const GRACE_MS=24e4;function estRefusDIdentite(erreur){return"object"==typeof erreur&&null!==erreur&&401===erreur.status}function useConnectorSaveWithStepUp(){const{token,setToken}=(0,dist_index_js_.useRevealToken)();const fenetre=(0,index_js_.useRef)(null);if(token&&fenetre.current?.token!==token)fenetre.current={token,expireA:Date.now()+GRACE_MS};const jetonValide=()=>{const courant=fenetre.current;if(!courant)return null;if(Date.now()>=courant.expireA){fenetre.current=null;return null}return courant.token};const mutation=useConnectorSaveQuery(()=>jetonValide());const[attente,setAttente]=(0,index_js_.useState)(null);const demanderMotDePasse=(values,rejouable)=>new Promise((resolve,reject)=>{setAttente({values,resolve:resolve,reject,rejouable})});const lancer=(values,rejouable)=>mutation.mutateAsync(values).catch(erreur=>{if(!rejouable||!estRefusDIdentite(erreur))throw erreur;fenetre.current=null;return demanderMotDePasse(values,false)});const mutate=values=>{if(jetonValide())return void lancer(values,true).catch(()=>void 0);demanderMotDePasse(values,true).catch(()=>void 0)};const mutateAsync=values=>{if(jetonValide())return lancer(values,true);return demanderMotDePasse(values,true)};const save={...mutation,mutate,mutateAsync,isPending:mutation.isPending||null!==attente};const reauthModal=/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.PasswordReauthModal,{opened:null!==attente,onClose:()=>{attente?.reject(new Error("R\xe9-authentification annul\xe9e"));setAttente(null)},onSuccess:nouveauJeton=>{fenetre.current={token:nouveauJeton,expireA:Date.now()+GRACE_MS};setToken(nouveauJeton);const enAttente=attente;setAttente(null);if(enAttente)lancer(enAttente.values,enAttente.rejouable).then(enAttente.resolve,enAttente.reject)}});return{save,reauthModal}}function useConnectorSingleQuery(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const query=(0,modern_index_js_.useQuery)({queryKey:["connector","config","single",config.company,config.connector],queryFn:async()=>await api.connectors.getConnectorSingleV1({cid:config.company,connector:+config.connector}).then(x=>x.data),refetchIntervalInBackground:false,refetchOnWindowFocus:true,refetchOnReconnect:true});return query}var connector_bubble=__webpack_require__(4184);function useConnectorRenameMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async name=>{const res=await api.http.request({path:`/v1/connectors/${config.company}/${config.connector}`,method:"PATCH",body:{name},type:"application/json",format:"json"});return res.data},onSuccess:()=>{queryClient.invalidateQueries({queryKey:["connector","config","single",config.company,config.connector]});queryClient.invalidateQueries({queryKey:["connectors","list",config.company]});queryClient.invalidateQueries({queryKey:["connectors","list","ill",config.company]});queryClient.invalidateQueries({queryKey:["connectors","ok",config.company]});queryClient.invalidateQueries({queryKey:["connectors","ill",config.company]});esm_index_mjs_.notifications.show({color:"green",title:"Connecteur renomm\xe9",message:"Le nom a \xe9t\xe9 mis \xe0 jour avec succ\xe8s."})},onError:error=>{console.error(error);esm_index_mjs_.notifications.show({color:"red",title:"Renommage \xe9chou\xe9",message:"R\xe9essayez dans un instant."})}})}function useConnectorRefreshAccountsMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useMutation)({mutationFn:async()=>{const res=await api.http.request({path:`/v1/connectors/${config.company}/${config.connector}/refresh-accounts`,method:"POST",secure:true,format:"json"});return res.data},onSuccess:data=>{if("unsupported"===data.status)return void esm_index_mjs_.notifications.show({color:"blue",title:"Rien \xe0 rafra\xeechir",message:"Ce connecteur n'a pas de comptes \xe0 d\xe9couvrir."});esm_index_mjs_.notifications.show({color:"green",title:"Rafra\xeechissement lanc\xe9",message:"Les comptes seront \xe0 jour dans quelques minutes, le temps que la t\xe2che passe."})},onError:error=>{console.error(error);esm_index_mjs_.notifications.show({color:"red",title:"Rafra\xeechissement \xe9chou\xe9",message:"R\xe9essayez dans un instant."})}})}var tabler_icons_react_mjs_=__webpack_require__(5200);function useMicrosoftTenantQuery(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useQuery)({queryKey:["microsoft","tenant",config.company],queryFn:async()=>{try{const response=await api.microsoft.getTenantV1({cid:config.company});return response.data}catch(err){const status=err&&"object"==typeof err&&"status"in err?err.status:void 0;if(404===status)return null;throw err}},refetchOnWindowFocus:true,refetchOnReconnect:true,retry:false})}function useStartAdminConsentMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useMutation)({mutationFn:async({returnTo})=>{const response=await api.microsoft.startAdminConsentV1({cid:config.company,returnTo});return response.data}})}function useAddExcelFileMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async({url})=>{const response=await api.microsoft.addExcelFileV1({cid:config.company},{url});return response.data},onSuccess:()=>{queryClient.invalidateQueries({queryKey:["microsoft","excel-files",config.company]})}})}function useDeleteExcelFileMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async({fileId})=>{await api.microsoft.deleteExcelFileV1({cid:config.company,fileId})},onSuccess:()=>{queryClient.invalidateQueries({queryKey:["microsoft","excel-files",config.company]})}})}function useExcelFilesQuery({enabled}){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useQuery)({queryKey:["microsoft","excel-files",config.company],queryFn:async()=>{const response=await api.microsoft.listExcelFilesV1({cid:config.company});return response.data.list},enabled,refetchOnWindowFocus:true})}function useResolveFileMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useMutation)({mutationFn:async({url})=>{const response=await api.microsoft.resolveFileV1({cid:config.company},{url});return response.data}})}function ExcelFilesSection({enabled}){const filesQuery=useExcelFilesQuery({enabled});const resolveMutation=useResolveFileMutation();const addMutation=useAddExcelFileMutation();const deleteMutation=useDeleteExcelFileMutation();const[urlInput,setUrlInput]=(0,index_js_.useState)("");const[preview,setPreview]=(0,index_js_.useState)(null);const[error,setError]=(0,index_js_.useState)(null);const handleResolve=(0,index_js_.useCallback)(async()=>{setError(null);setPreview(null);if(!urlInput.trim())return void setError("Renseigne une URL SharePoint d’un fichier Excel");try{const result=await resolveMutation.mutateAsync({url:urlInput.trim()});setPreview(result)}catch(err){setError(err instanceof Error?err.message:"Impossible de r\xe9soudre cette URL c\xf4t\xe9 Microsoft")}},[urlInput,resolveMutation]);const handleConfirm=(0,index_js_.useCallback)(async()=>{if(!preview)return;setError(null);try{await addMutation.mutateAsync({url:urlInput.trim()});setUrlInput("");setPreview(null)}catch(err){setError(err instanceof Error?err.message:String(err))}},[preview,urlInput,addMutation]);const handleCancel=(0,index_js_.useCallback)(()=>{setPreview(null);setError(null)},[]);const handleDelete=(0,index_js_.useCallback)(fileId=>{deleteMutation.mutate({fileId})},[deleteMutation]);if(!enabled)return null;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,fz:"lg",children:"Fichiers Excel \xe0 synchroniser"}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:["Ajoute les fichiers Excel qu’Airporting doit alimenter. Colle l’URL de partage d’un fichier ",/*#__PURE__*/(0,jsx_runtime.jsx)("code",{children:".xlsx"})," — on r\xe9cup\xe8re automatiquement son nom et son identifiant."]})]}),filesQuery.isPending?/*#__PURE__*/(0,jsx_runtime.jsx)(InlineLoader.F,{label:"Chargement des fichiers..."}):filesQuery.isError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur",children:"Impossible de charger la liste des fichiers Excel."}):filesQuery.data&&filesQuery.data.length>0?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Stack,{gap:"xs",children:filesQuery.data.map(file=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"sm",radius:"sm",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",wrap:"nowrap",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:2,style:{minWidth:0,flex:1},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:500,truncate:true,children:file.spreadsheet_name??file.spreadsheet_id}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:6,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"xs",children:["ajout\xe9 le"," ",new Date(file.created).toLocaleString("fr-FR",{timeZone:"Europe/Paris"})]}),file.webUrl?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Anchor,{href:file.webUrl,target:"_blank",rel:"noreferrer",fz:"xs",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconExternalLink,{size:12}),"ouvrir sur SharePoint"]})}):null]})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.ActionIcon,{color:"red",variant:"subtle","aria-label":"Supprimer ce fichier",onClick:()=>handleDelete(file.id),loading:deleteMutation.isPending&&deleteMutation.variables?.fileId===file.id,children:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconTrash,{size:16})})]})},file.id))}):/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:"Aucun fichier Excel ajout\xe9 pour le moment."}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{label:"URL SharePoint du fichier Excel",placeholder:"https://votreorg.sharepoint.com/:x:/r/sites/.../fichier.xlsx",value:urlInput,onChange:e=>setUrlInput(e.currentTarget.value),disabled:resolveMutation.isPending||addMutation.isPending}),preview?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"green",title:"Fichier trouv\xe9",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Nom\xa0:"})," ",preview.name]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Identifiant\xa0:"})," ",/*#__PURE__*/(0,jsx_runtime.jsx)("code",{children:preview.itemId})]}),"site"===preview.kind?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Site SharePoint\xa0:"})," ",/*#__PURE__*/(0,jsx_runtime.jsx)("code",{children:preview.siteId})]}):/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Drive\xa0:"})," ",/*#__PURE__*/(0,jsx_runtime.jsx)("code",{children:preview.driveId})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{onClick:handleConfirm,loading:addMutation.isPending,children:"Confirmer l’ajout"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"subtle",onClick:handleCancel,disabled:addMutation.isPending,children:"Annuler"})]})]})}):/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{onClick:handleResolve,loading:resolveMutation.isPending,disabled:!urlInput.trim(),children:"Valider l’URL"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"xs",children:"On interroge Microsoft Graph pour r\xe9cup\xe9rer le nom du fichier avant de l’enregistrer."})]}),error?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur",children:error}):null]})]})})}function isConsentMessage(value){if("object"!=typeof value||null===value)return false;const v=value;return"airporting-microsoft-consent"===v.type}const POPUP_NAME="airporting-microsoft-consent";const POPUP_FEATURES="width=600,height=720,resizable,scrollbars";function useMicrosoftConsentPopup({onResult}){const[isOpen,setIsOpen]=(0,index_js_.useState)(false);const popupRef=(0,index_js_.useRef)(null);const pollRef=(0,index_js_.useRef)(null);const stopPolling=(0,index_js_.useCallback)(()=>{if(null!==pollRef.current){window.clearInterval(pollRef.current);pollRef.current=null}},[]);const closePopup=(0,index_js_.useCallback)(()=>{if(popupRef.current&&!popupRef.current.closed)popupRef.current.close();popupRef.current=null;setIsOpen(false);stopPolling()},[stopPolling]);(0,index_js_.useEffect)(()=>{const handler=event=>{if(!isConsentMessage(event.data))return;onResult(event.data);closePopup()};window.addEventListener("message",handler);return()=>{window.removeEventListener("message",handler)}},[onResult,closePopup]);(0,index_js_.useEffect)(()=>()=>{closePopup()},[closePopup]);const openPopup=(0,index_js_.useCallback)(url=>{const popup=window.open(url,POPUP_NAME,POPUP_FEATURES);if(!popup)throw new Error("Impossible d’ouvrir la fen\xeatre Microsoft (popup bloqu\xe9 par le navigateur ?)");popupRef.current=popup;setIsOpen(true);stopPolling();pollRef.current=window.setInterval(()=>{if(popupRef.current?.closed)closePopup()},500)},[closePopup,stopPolling]);return{openPopup,closePopup,isOpen}}function MicrosoftConsentPanel(){const tenantQuery=useMicrosoftTenantQuery();if(tenantQuery.isPending)return/*#__PURE__*/(0,jsx_runtime.jsx)(InlineLoader.F,{label:"Chargement du tenant Microsoft..."});if(tenantQuery.isError)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur de chargement",children:"Impossible de r\xe9cup\xe9rer le statut Microsoft pour cette entreprise."});const tenant=tenantQuery.data;if(tenant)return/*#__PURE__*/(0,jsx_runtime.jsx)(ClientHostedView,{tenant:tenant});return/*#__PURE__*/(0,jsx_runtime.jsx)(AirportingHostedView,{})}function AirportingHostedView(){const[advancedOpen,setAdvancedOpen]=(0,index_js_.useState)(false);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"teal",variant:"light",radius:"md",icon:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconRocket,{size:20}),title:"Vos fichiers sont h\xe9berg\xe9s chez Airporting",children:"On cr\xe9e et alimente les fichiers Excel directement sur le SharePoint Airporting. Rien \xe0 configurer c\xf4t\xe9 Microsoft, et tu peux y acc\xe9der via le lien de partage qu’on te fournit."}),/*#__PURE__*/(0,jsx_runtime.jsx)(ExcelFilesSection,{enabled:true}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Anchor,{component:"button",type:"button",onClick:()=>setAdvancedOpen(s=>!s),underline:"never",c:"dimmed",fz:"sm",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:4,children:[advancedOpen?/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconChevronUp,{size:14}):/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconChevronDown,{size:14}),"Pr\xe9f\xe9rer h\xe9berger sur votre propre SharePoint d’entreprise\xa0?"]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Collapse,{in:advancedOpen,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",pt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:["Si ton organisation veut conserver la ma\xeetrise compl\xe8te du fichier (sur votre tenant Microsoft 365), tu peux connecter ton SharePoint d’entreprise. Cette op\xe9ration n\xe9cessite un"," ",/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"administrateur Microsoft 365"})," (r\xf4le"," ",/*#__PURE__*/(0,jsx_runtime.jsx)("i",{children:"Global Administrator"})," ou \xe9quivalent)."]}),/*#__PURE__*/(0,jsx_runtime.jsx)(AdminConsentBlock,{})]})})]})})]})}function ClientHostedView({tenant}){return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",align:"flex-start",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,fz:"lg",children:"SharePoint d’entreprise connect\xe9"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:"Airporting \xe9crit dans les fichiers Excel h\xe9berg\xe9s sur votre propre tenant Microsoft 365."})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"green",size:"lg",children:"Connect\xe9"})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Tenant\xa0:"})," ",/*#__PURE__*/(0,jsx_runtime.jsx)("code",{children:tenant.tenant_id})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Mode\xa0:"})," ","app_only"===tenant.auth_mode?"app-only (recommand\xe9)":"delegated"]}),tenant.admin_consented_at?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Consentement donn\xe9 le\xa0:"})," ",new Date(tenant.admin_consented_at).toLocaleString("fr-FR",{timeZone:"Europe/Paris"})]}):null,/*#__PURE__*/(0,jsx_runtime.jsx)(AdminConsentBlock,{variant:"reconnect"})]})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(ExcelFilesSection,{enabled:true})]})}function AdminConsentBlock({variant="connect"}){const config=(0,useAppConfigConnectorSingle.C)();const startMutation=useStartAdminConsentMutation();const queryClient=(0,modern_index_js_.useQueryClient)();const[lastError,setLastError]=(0,index_js_.useState)(null);const handleResult=(0,index_js_.useCallback)(message=>{if(message.success){setLastError(null);queryClient.invalidateQueries({queryKey:["microsoft","tenant",config.company]})}else setLastError(message.errorDescription??message.error??"\xc9chec du consentement Microsoft")},[queryClient,config.company]);const{openPopup,isOpen}=useMicrosoftConsentPopup({onResult:handleResult});const handleConnect=(0,index_js_.useCallback)(async()=>{setLastError(null);try{const returnTo=window.location.href;const{url}=await startMutation.mutateAsync({returnTo});openPopup(url)}catch(err){setLastError(err instanceof Error?err.message:String(err))}},[startMutation,openPopup]);const isConnecting=startMutation.isPending||isOpen;const label="reconnect"===variant?"Reconnecter Microsoft":"Connecter Microsoft";return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"reconnect"===variant?"light":"filled",onClick:handleConnect,loading:isConnecting,children:label}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",fz:"xs",children:["Une fen\xeatre Microsoft va s’ouvrir : connecte-toi avec un compte"," ",/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"administrateur"}),' Microsoft 365, puis clique sur "Accepter".']})]}),lastError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur",children:lastError}):null]})}function useGsheetFilesQuery({enabled}){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useQuery)({queryKey:["google","gsheet-files",config.company],queryFn:async()=>{const response=await api.http.request({path:`/v1/google/${config.company}/gsheet/files`,method:"GET",format:"json"});return response.data.list},enabled,refetchOnWindowFocus:true})}function useGsheetFileDeleteMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async fileId=>{const res=await api.http.request({path:`/v1/google/${config.company}/gsheet/files/${fileId}`,method:"DELETE",secure:true,format:"json"});return res.data},onSuccess:()=>{queryClient.invalidateQueries({queryKey:["google","gsheet-files",config.company]});esm_index_mjs_.notifications.show({title:"Fichier supprim\xe9",message:"Le fichier ne sera plus propos\xe9 pour cette soci\xe9t\xe9."})},onError:error=>{console.error(error);esm_index_mjs_.notifications.show({color:"red",title:"Erreur !",message:"La suppression a \xe9chou\xe9. Veuillez r\xe9essayer plus tard."})}})}const SPREADSHEET_URL_PATTERN=/\/spreadsheets\/d\/([a-zA-Z0-9_-]+)/;function normalizeSpreadsheetId(raw){const trimmed=raw.trim();const match=trimmed.match(SPREADSHEET_URL_PATTERN);if(match)return match[1];return trimmed}function readGsheetConnectorValues(initialData){const data=initialData??{};const mainRaw=data.Spreadsheet_Id;const mainId="string"==typeof mainRaw?mainRaw.trim():"";const secondaryRaw=data.secondarySheets;let secondarySheets=[];if("string"==typeof secondaryRaw&&""!==secondaryRaw.trim())secondarySheets=[secondaryRaw.trim()];if(Array.isArray(secondaryRaw))secondarySheets=secondaryRaw.filter(item=>"string"==typeof item).map(item=>item.trim());return{mainId,secondarySheets}}function cleanSecondarySheets(secondarySheets,mainId){const seen=new Set([mainId]);const cleaned=[];for(const rawItem of secondarySheets){const id=normalizeSpreadsheetId(rawItem);if(!(""===id||seen.has(id))){seen.add(id);cleaned.push(id)}}return cleaned}function GsheetFilesManager({config,save}){const filesQuery=useGsheetFilesQuery({enabled:true});const deleteFile=useGsheetFileDeleteMutation();const[values,setValues]=(0,index_js_.useState)({mainId:"",secondarySheets:[]});const[confirmDeleteId,setConfirmDeleteId]=(0,index_js_.useState)(null);const[confirmRemoveIndex,setConfirmRemoveIndex]=(0,index_js_.useState)(null);const initializedRef=(0,index_js_.useRef)(false);(0,index_js_.useEffect)(()=>{if(config.data&&!initializedRef.current){setValues(readGsheetConnectorValues(config.data.initialData));initializedRef.current=true}},[config.data]);const nameById=(0,index_js_.useMemo)(()=>{const map=new Map;for(const file of filesQuery.data??[])if(file.spreadsheet_name)map.set(file.spreadsheet_id,file.spreadsheet_name);return map},[filesQuery.data]);const knownUnreferenced=(0,index_js_.useMemo)(()=>{const referenced=new Set([values.mainId,...values.secondarySheets]);return(filesQuery.data??[]).filter(file=>!referenced.has(file.spreadsheet_id))},[filesQuery.data,values]);const updateMain=raw=>{setValues(prev=>({...prev,mainId:normalizeSpreadsheetId(raw)}))};const updateSecondary=(index,raw)=>{setValues(prev=>{const next=[...prev.secondarySheets];next[index]=normalizeSpreadsheetId(raw);return{...prev,secondarySheets:next}})};const addSecondary=id=>{setValues(prev=>({...prev,secondarySheets:[...prev.secondarySheets,id]}))};const buildPayload=secondarySheets=>{const mainId=normalizeSpreadsheetId(values.mainId);return{...config.data?.initialData??{},share:true,Spreadsheet_Id:mainId,secondarySheets:cleanSecondarySheets(secondarySheets,mainId)}};const removeSecondaryFully=index=>{const removedId=normalizeSpreadsheetId(values.secondarySheets[index]);const next=values.secondarySheets.filter((_,i)=>i!==index);setValues(prev=>({...prev,secondarySheets:next}));save.mutate(buildPayload(next));const known=(filesQuery.data??[]).find(file=>file.spreadsheet_id===removedId);if(known)deleteFile.mutate(known.id)};const handleSave=()=>{save.mutate(buildPayload(values.secondarySheets))};if(config.isPending)return/*#__PURE__*/(0,jsx_runtime.jsx)(InlineLoader.F,{label:"Chargement du connecteur..."});if(config.isError)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur",children:"Impossible de charger la configuration du connecteur."});const nameCell=id=>{const name=nameById.get(id);if(name)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:500,children:name});if(""===id)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fs:"italic",children:"Nouvelle feuille"});return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fs:"italic",children:filesQuery.isPending?"...":"Nom inconnu"})};const openCell=id=>{if(""===id)return null;return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Anchor,{href:`https://docs.google.com/spreadsheets/d/${id}/edit`,target:"_blank",rel:"noreferrer",fz:"sm",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:4,wrap:"nowrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconExternalLink,{size:14}),"ouvrir"]})})};return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,fz:"lg",children:"Fichiers Google Sheets synchronis\xe9s"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:"L'identifiant d'un tableur se trouve dans l'URL du fichier, juste apr\xe8s \xab https://docs.google.com/spreadsheets/d/ \xbb. Vous pouvez coller l'URL compl\xe8te : elle est convertie automatiquement. En cas de doute, nous nous chargeons de la cr\xe9ation du fichier Google Sheets et du param\xe9trage."})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{verticalSpacing:"sm",highlightOnHover:true,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Thead,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{w:"30%",children:"Fichier"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Identifiant"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{w:90,children:"Lien"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{w:210})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tbody,{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:nameCell(values.mainId)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{value:values.mainId,onChange:e=>updateMain(e.currentTarget.value),placeholder:"Id du tableur principal",required:true,autoComplete:"off"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:openCell(values.mainId)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{variant:"light",children:"Principal"})})]}),values.secondarySheets.map((id,index)=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:nameCell(id)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.TextInput,{value:id,onChange:e=>updateSecondary(index,e.currentTarget.value),placeholder:"Id ou URL du tableur",autoComplete:"off"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:openCell(id)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",color:"red",variant:confirmRemoveIndex===index?"filled":"light",onClick:()=>{if(confirmRemoveIndex===index){setConfirmRemoveIndex(null);removeSecondaryFully(index)}else setConfirmRemoveIndex(index)},onBlur:()=>setConfirmRemoveIndex(null),children:confirmRemoveIndex===index?"Confirmer ?":"Supprimer"})})]},`secondary-${index}`)),knownUnreferenced.map(file=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:nameCell(file.spreadsheet_id)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",style:{wordBreak:"break-all"},children:file.spreadsheet_id})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:openCell(file.spreadsheet_id)}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",variant:"light",leftSection:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconPlus,{size:14}),onClick:()=>addSecondary(file.spreadsheet_id),children:"Ajouter"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{size:"xs",color:"red",variant:confirmDeleteId===file.id?"filled":"subtle",loading:deleteFile.isPending&&deleteFile.variables===file.id,onClick:()=>{if(confirmDeleteId===file.id){setConfirmDeleteId(null);deleteFile.mutate(file.id)}else setConfirmDeleteId(file.id)},onBlur:()=>setConfirmDeleteId(null),children:confirmDeleteId===file.id?"Confirmer ?":"Supprimer"})]})})]},`known-${file.spreadsheet_id}`))]})]}),filesQuery.isError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"yellow",title:"Noms indisponibles",children:"Impossible de charger les noms des fichiers ; les identifiants restent modifiables."}):null,/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",size:"xs",leftSection:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconPlus,{size:14}),onClick:()=>addSecondary(""),children:"Ajouter une feuille"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{onClick:handleSave,loading:save.isPending,disabled:""===normalizeSpreadsheetId(values.mainId),children:"Sauvegarder"})})]})})}function pennylaneOauthStatusQueryKey(company){return["pennylane","oauth-status",company]}function usePennylaneOauthStatusQuery(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useQuery)({queryKey:pennylaneOauthStatusQueryKey(config.company),queryFn:async()=>{const response=await api.pennylane.getStatusV1({cid:config.company});return response.data},refetchOnWindowFocus:true,refetchOnReconnect:true,retry:false})}function usePennylaneOauthDisconnectMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();const queryClient=(0,modern_index_js_.useQueryClient)();return(0,modern_index_js_.useMutation)({mutationFn:async()=>{const response=await api.pennylane.disconnectV1({cid:config.company});return response.data},onSuccess:()=>{queryClient.invalidateQueries({queryKey:pennylaneOauthStatusQueryKey(config.company)})}})}function usePennylaneOauthStartMutation(){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useMutation)({mutationFn:async({returnTo})=>{const response=await api.pennylane.startOauthV1({cid:config.company,returnTo});return response.data}})}function isOauthMessage(value){if("object"!=typeof value||null===value)return false;const v=value;return"airporting-pennylane-oauth"===v.type}const usePennylaneOauthPopup_POPUP_NAME="airporting-pennylane-oauth";const usePennylaneOauthPopup_POPUP_FEATURES="width=600,height=720,resizable,scrollbars";function usePennylaneOauthPopup({onResult}){const[isOpen,setIsOpen]=(0,index_js_.useState)(false);const popupRef=(0,index_js_.useRef)(null);const pollRef=(0,index_js_.useRef)(null);const stopPolling=(0,index_js_.useCallback)(()=>{if(null!==pollRef.current){window.clearInterval(pollRef.current);pollRef.current=null}},[]);const closePopup=(0,index_js_.useCallback)(()=>{if(popupRef.current&&!popupRef.current.closed)popupRef.current.close();popupRef.current=null;setIsOpen(false);stopPolling()},[stopPolling]);(0,index_js_.useEffect)(()=>{const handler=event=>{if(!isOauthMessage(event.data))return;onResult(event.data);closePopup()};window.addEventListener("message",handler);return()=>{window.removeEventListener("message",handler)}},[onResult,closePopup]);(0,index_js_.useEffect)(()=>()=>{closePopup()},[closePopup]);const openPopup=(0,index_js_.useCallback)(url=>{const popup=window.open(url,usePennylaneOauthPopup_POPUP_NAME,usePennylaneOauthPopup_POPUP_FEATURES);if(!popup)throw new Error("Impossible d’ouvrir la fen\xeatre Pennylane (popup bloqu\xe9 par le navigateur ?)");popupRef.current=popup;setIsOpen(true);stopPolling();pollRef.current=window.setInterval(()=>{if(popupRef.current?.closed)closePopup()},500)},[closePopup,stopPolling]);return{openPopup,closePopup,isOpen}}function PennylaneOauthPanel(){const statusQuery=usePennylaneOauthStatusQuery();if(statusQuery.isPending)return/*#__PURE__*/(0,jsx_runtime.jsx)(InlineLoader.F,{label:"Chargement de la connexion Pennylane..."});if(statusQuery.isError)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur de chargement",children:"Impossible de r\xe9cup\xe9rer le statut de connexion Pennylane pour cette entreprise."});if(statusQuery.data.connected)return/*#__PURE__*/(0,jsx_runtime.jsx)(ConnectedView,{status:statusQuery.data});return/*#__PURE__*/(0,jsx_runtime.jsx)(DisconnectedView,{})}function ConnectButton({variant}){const config=(0,useAppConfigConnectorSingle.C)();const startMutation=usePennylaneOauthStartMutation();const queryClient=(0,modern_index_js_.useQueryClient)();const[lastError,setLastError]=(0,index_js_.useState)(null);const handleResult=(0,index_js_.useCallback)(message=>{if(message.success){setLastError(null);queryClient.invalidateQueries({queryKey:pennylaneOauthStatusQueryKey(config.company)})}else setLastError(message.errorDescription??message.error??"\xc9chec de la connexion Pennylane")},[queryClient,config.company]);const{openPopup,isOpen}=usePennylaneOauthPopup({onResult:handleResult});const handleConnect=(0,index_js_.useCallback)(async()=>{setLastError(null);try{const returnTo=window.location.href;const{url}=await startMutation.mutateAsync({returnTo});openPopup(url)}catch(err){setLastError(err instanceof Error?err.message:String(err))}},[startMutation,openPopup]);const isConnecting=startMutation.isPending||isOpen;const label="reconnect"===variant?"Reconnecter Pennylane":"Connecter Pennylane";return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"reconnect"===variant?"light":"filled",leftSection:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconPlugConnected,{size:18}),onClick:handleConnect,loading:isConnecting,children:label}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"xs",children:"Une fen\xeatre Pennylane va s’ouvrir : connecte-toi et autorise Airporting, puis reviens sur cette page."})]}),lastError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Erreur",children:lastError}):null]})}function DisconnectedView(){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",align:"flex-start",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,fz:"lg",children:"Connexion Pennylane"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:"Connecte ton compte Pennylane en un clic via OAuth. Airporting acc\xe8de \xe0 ta comptabilit\xe9 sans que tu aies \xe0 copier une cl\xe9 API."})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"gray",size:"lg",children:"Non connect\xe9"})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(ConnectButton,{variant:"connect"})]})})}function ConnectedView({status}){const disconnectMutation=usePennylaneOauthDisconnectMutation();return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"lg",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",align:"flex-start",children:[/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,fz:"lg",children:"Pennylane connect\xe9"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:"Airporting acc\xe8de \xe0 ta comptabilit\xe9 Pennylane via OAuth."})]}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"green",size:"lg",children:"Connect\xe9"})]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:4,children:[status.pennylaneCompanyId?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Dossier Pennylane\xa0:"})," ",/*#__PURE__*/(0,jsx_runtime.jsx)("code",{children:status.pennylaneCompanyId})]}):null,status.accessTokenExpiresAt?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Jeton valide jusqu’au\xa0:"})," ",new Date(status.accessTokenExpiresAt).toLocaleString("fr-FR",{timeZone:"Europe/Paris"})]}):null,status.scopes&&status.scopes.length>0?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{fz:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)("b",{children:"Autorisations\xa0:"})," ",status.scopes.length," accord\xe9es"]}):null]}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ConnectButton,{variant:"reconnect"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"subtle",color:"red",loading:disconnectMutation.isPending,onClick:()=>disconnectMutation.mutate(),children:"D\xe9connecter"})]})]})})}function PennylaneConfigPanel({apiKeyForm}){const[advancedOpen,setAdvancedOpen]=(0,index_js_.useState)(false);return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"md",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(PennylaneOauthPanel,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Card,{withBorder:true,padding:"md",radius:"md",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"xs",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Anchor,{component:"button",type:"button",onClick:()=>setAdvancedOpen(s=>!s),underline:"never",c:"dimmed",fz:"sm",children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:4,children:[advancedOpen?/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconChevronUp,{size:14}):/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconChevronDown,{size:14}),"M\xe9thode cl\xe9 API (avanc\xe9)"]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Collapse,{in:advancedOpen,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:"sm",pt:"sm",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{c:"dimmed",fz:"sm",children:"Si tu pr\xe9f\xe8res connecter Pennylane avec une cl\xe9 API plut\xf4t que par OAuth, saisis-la ici. La connexion OAuth ci-dessus reste la m\xe9thode recommand\xe9e."}),apiKeyForm]})})]})})]})}function useConnectorHistoryQuery({enabled}){const api=useApiConnectorSingle();const config=(0,useAppConfigConnectorSingle.C)();return(0,modern_index_js_.useQuery)({queryKey:["connector","history",config.company,config.connector],queryFn:async()=>await api.connectors.getConnectorHistoryV1({cid:config.company,connector:+config.connector}).then(x=>x.data),enabled,refetchOnWindowFocus:false})}const LIBELLE_ACTION={created:"Cr\xe9ation",data_updated:"Modification",renamed:"Renommage",deleted:"Suppression",secrets_revealed:"Consultation des identifiants"};function libelleAction(action){return LIBELLE_ACTION[action]??action}function formatDate(iso){const d=new Date(iso);if(Number.isNaN(d.getTime()))return iso;return d.toLocaleString("fr-FR",{day:"2-digit",month:"2-digit",year:"2-digit",hour:"2-digit",minute:"2-digit"})}function PastilleIdentite({source}){if("reveal_token"===source)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tooltip,{multiline:true,w:280,label:"Identit\xe9 v\xe9rifi\xe9e : cette action a demand\xe9 une r\xe9-authentification par mot de passe.",withArrow:true,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"teal",variant:"light",leftSection:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconShieldCheck,{size:12}),children:"V\xe9rifi\xe9e"})});return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tooltip,{multiline:true,w:280,label:"Identit\xe9 d\xe9clar\xe9e : le nom vient de l'application appelante et n'a pas \xe9t\xe9 prouv\xe9. \xc0 lire comme une indication, pas comme une preuve.",withArrow:true,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Badge,{color:"gray",variant:"light",leftSection:/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconShieldQuestion,{size:12}),children:"D\xe9clar\xe9e"})})}function Champs({champs}){if(0===champs.length)return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"xs",c:"dimmed",children:"aucun changement"});return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{gap:4,children:champs.map(champ=>/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Code,{fz:"xs",children:champ},champ))})}function Lignes({entries}){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.ScrollContainer,{minWidth:640,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table,{striped:true,highlightOnHover:true,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Thead,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Date"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Action"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Par"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Identit\xe9"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Th,{children:"Champs"})]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Tbody,{children:entries.map((entry,index)=>/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Table.Tr,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",children:formatDate(entry.date)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",children:libelleAction(entry.action)})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{size:"sm",children:entry.userEmail??"utilisateur inconnu"})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(PastilleIdentite,{source:entry.identitySource})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Table.Td,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Champs,{champs:entry.changedFields})})]},`${entry.date}-${entry.action}-${index}`))})]})})}function ConnectorHistory(){const[ouvert,setOuvert]=(0,index_js_.useState)(false);const historique=useConnectorHistoryQuery({enabled:ouvert});const entries=historique.data?.entries??[];return/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:0,mt:"xl",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.UnstyledButton,{onClick:()=>setOuvert(o=>!o),style:{width:"100%",padding:"8px 0"},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"xs",children:[ouvert?/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconChevronDown,{size:16}):/*#__PURE__*/(0,jsx_runtime.jsx)(tabler_icons_react_mjs_.IconChevronRight,{size:16}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{fw:600,children:"Historique des acc\xe8s et des modifications"}),ouvert&&historique.isSuccess?/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Text,{c:"dimmed",children:["(",entries.length,")"]}):null]})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Collapse,{in:ouvert,children:historique.isLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(InlineLoader.F,{label:"Chargement de l'historique..."}):historique.isError?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"red",title:"Historique indisponible",children:"Nous n'avons pas pu charger l'historique de ce connecteur."}):0===entries.length?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"blue",title:"Aucune action enregistr\xe9e",children:"L'historique ne remonte pas avant la mise en place de la journalisation. Les prochaines modifications et consultations des identifiants appara\xeetront ici."}):/*#__PURE__*/(0,jsx_runtime.jsx)(Lignes,{entries:entries})})]})}function SingleConnectorApp(){const config=(0,useAppConfigConnectorSingle.C)();const itemRes=useConnectorSingleQuery();const item=itemRes.data;const configRes=useConnectorConfigQuery({enabled:!!item?.hasForm});const{save:saveFn,reauthModal}=useConnectorSaveWithStepUp();const[editing,setEditing]=(0,index_js_.useState)(false);const[draft,setDraft]=(0,index_js_.useState)("");const renameMutation=useConnectorRenameMutation();const refreshAccountsMutation=useConnectorRefreshAccountsMutation();(0,index_js_.useEffect)(()=>{if(item?.name)setDraft(item.name)},[item?.name]);const handleSave=()=>{renameMutation.mutate(draft,{onSuccess:()=>setEditing(false)})};const handleCancel=()=>{if(item?.name)setDraft(item.name);setEditing(false)};const backLink={text:"Liste des connecteurs",tab:""};switch(item?.status){case"active":backLink.tab="?tab=active";backLink.text="Connecteurs actifs";break;case"ill":backLink.tab="?tab=ill";backLink.text="Connecteurs \xe0 configurer";break}const isFormLoading=!item||item.hasForm&&!configRes.data;return/*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[reauthModal,/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{py:10,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{gap:0,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{w:"fit-content",mb:0,order:1,children:"Nos connecteurs"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Text,{w:"fit-content",mb:0,c:"dimmed",fz:"h5",children:"Synchronisez vos comptes bancaires et outils comptables facilement."}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{py:10,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Anchor,{underline:"never",href:`/company/${config.company}/integrations/connectors${backLink.tab}`,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Group,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.Circle,{bg:"dark.4",size:24,ml:"auto",c:"white",children:/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.IconArrowUp,{rotate:270})}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Title,{w:"fit-content",c:"white",mb:0,order:3,children:backLink.text})]})})})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid,{w:"100%",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Grid.Col,{span:{base:12,lg:3},children:item?/*#__PURE__*/(0,jsx_runtime.jsx)(connector_bubble.q,{connector:item,rename:{editing,draft,isPending:renameMutation.isPending,onDraftChange:setDraft,onSave:handleSave,onCancel:handleCancel,onStartEditing:()=>setEditing(true)}}):/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Stack,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:64,width:64,radius:"md"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:28,width:"60%"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:16,width:"80%"}),/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Skeleton,{height:16,width:"70%"})]})}),/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.Grid.Col,{span:{base:12,lg:9},children:[!isFormLoading&&item.supportsAccountDiscovery?/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Group,{justify:"flex-end",mb:10,children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Tooltip,{label:"Red\xe9couvre les comptes de ce connecteur pour alimenter les s\xe9lecteurs de compte des synchronisations. L'enregistrement du formulaire le fait d\xe9j\xe0 tout seul.",children:/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"light",size:"xs",loading:refreshAccountsMutation.isPending,onClick:()=>refreshAccountsMutation.mutate(),children:"Rafra\xeechir les comptes"})})}):null,isFormLoading?/*#__PURE__*/(0,jsx_runtime.jsx)(InlineLoader.F,{label:"Chargement du connecteur..."}):item.requiresMicrosoftConsent?/*#__PURE__*/(0,jsx_runtime.jsx)(MicrosoftConsentPanel,{}):item.hasForm&&"google_sheet"===item.main_connectorlist.codename?/*#__PURE__*/(0,jsx_runtime.jsx)(GsheetFilesManager,{config:configRes,save:saveFn}):item.hasForm&&"pennylane"===item.main_connectorlist.codename?/*#__PURE__*/(0,jsx_runtime.jsx)(PennylaneConfigPanel,{apiKeyForm:/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.DynamicForm,{config:()=>configRes,save:saveFn,revealContext:{cid:config.company,connectorId:config.connector}})}):item.hasForm?/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.DynamicForm,{config:()=>configRes,save:saveFn,revealContext:{cid:config.company,connectorId:config.connector}}):/*#__PURE__*/(0,jsx_runtime.jsx)(index_mjs_.Alert,{color:"blue",title:"Aucune configuration n\xe9cessaire",children:item.isBridge?"Ce connecteur est g\xe9r\xe9 via Bridge. Il n’y a rien \xe0 configurer ici.":"Ce connecteur ne n\xe9cessite aucune configuration."}),item?/*#__PURE__*/(0,jsx_runtime.jsx)(ConnectorHistory,{}):null]})]})]})}}}]);
|
package/dist/mf/9005.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["9005"],{4184:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{q:()=>ConnectorBubble});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4848);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2773);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5200);var _src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1034);function ConnectorBubble({connector,rename}){const{colorScheme}=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineColorScheme)();const bg="dark"===colorScheme?"white":"dark";const logoUrl=(0,_src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__.U)(connector.main_connectorlist);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Card,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Avatar,{src:logoUrl,size:64,radius:"md",bg:bg,color:"dark"===colorScheme?"black":"white",p:18}),rename?rename.editing?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.TextInput,{value:rename.draft,onChange:e=>rename.onDraftChange(e.currentTarget.value),autoFocus:true,onKeyDown:e=>{if("Enter"===e.key)rename.onSave();if("Escape"===e.key)rename.onCancel()},style:{flex:1}}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onSave,"aria-label":"Sauvegarder",loading:rename.isPending,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconCheck,{size:16})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onCancel,"aria-label":"Annuler",variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconX,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onStartEditing,"aria-label":"Renommer",variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconPencil,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",size:"lg",lineClamp:3,children:connector.main_connectorlist.description_fr})]})})}},6699:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Qq:()=>HttpClient,cM:()=>ContentType,qx:()=>IntegrationsApi});var ContentType=/*#__PURE__*/function(ContentType){ContentType["Json"]="application/json";ContentType["JsonApi"]="application/vnd.api+json";ContentType["FormData"]="multipart/form-data";ContentType["UrlEncoded"]="application/x-www-form-urlencoded";ContentType["Text"]="text/plain";return ContentType}({});class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>{if(input instanceof FormData)return input;return Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData)},["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&¶ms2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response;r.data=null;r.error=null;const responseToParse=responseFormat?response.clone():response;const data=responseFormat?await responseToParse[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class IntegrationsApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});connectors={getStatsConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/stats`,method:"GET",secure:true,format:"json",...params}),getConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ok`,method:"GET",secure:true,format:"json",...params}),getIllConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ill`,method:"GET",secure:true,format:"json",...params}),getCatalogConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/catalog`,method:"GET",secure:true,format:"json",...params}),addConnectorV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/add`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),getConnectorConfigV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/config/${connector}`,method:"GET",format:"json",...params}),getConnectorSingleV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/single/${connector}`,method:"GET",format:"json",...params}),putConnectorDataV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/data/${connector}`,method:"PUT",body:data,type:"application/json",format:"json",...params}),refreshConnectorAccountsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/refresh-accounts`,method:"POST",secure:true,format:"json",...params}),renameConnectorV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"PATCH",body:data,secure:true,type:"application/json",format:"json",...params}),deleteConnectorV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"DELETE",secure:true,format:"json",...params}),getAuthSecretsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/auth-secrets`,method:"GET",secure:true,format:"json",...params})};google={listGsheetFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files`,method:"GET",secure:true,format:"json",...params}),deleteGsheetFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};microsoft={startAdminConsentV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/admin-consent/start`,method:"GET",query:query,secure:true,format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/microsoft/admin-consent/callback",method:"GET",query:query,...params}),getTenantV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/tenant`,method:"GET",secure:true,format:"json",...params}),resolveFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/resolve-file`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),listExcelFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"GET",secure:true,format:"json",...params}),addExcelFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),readExcelV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/read`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),deleteExcelFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};pennylane={startOauthV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/start`,method:"GET",query:query,secure:true,format:"json",...params}),getStatusV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/status`,method:"GET",secure:true,format:"json",...params}),disconnectV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth`,method:"DELETE",secure:true,format:"json",...params}),getTokenV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/token`,method:"GET",format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/pennylane/callback",method:"GET",query:query,...params})}}},1034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>connectorLogoUrl});const fec_namespaceObject=__webpack_require__.p+"static/image/fec.png";function connectorLogoUrl(connector){if("fec"===connector.codename)return fec_namespaceObject;return connector.logo_key?`https://img.logo.dev/${connector.logo_key}?token=pk_QvyqAb6uTRGJE2_sDsEb9g&retina=true`:`https://s3.eu-west-3.amazonaws.com/media.airporting/connectors/${connector.codename}.png`}}}]);
|
|
1
|
+
"use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["9005"],{4184:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{q:()=>ConnectorBubble});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4848);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(2773);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(5200);var _src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1034);function ConnectorBubble({connector,rename}){const{colorScheme}=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineColorScheme)();const bg="dark"===colorScheme?"white":"dark";const logoUrl=(0,_src_utils_connectorLogoUrl_ts__WEBPACK_IMPORTED_MODULE_3__.U)(connector.main_connectorlist);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Card,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Avatar,{src:logoUrl,size:64,radius:"md",bg:bg,color:"dark"===colorScheme?"black":"white",p:18}),rename?rename.editing?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.TextInput,{value:rename.draft,onChange:e=>rename.onDraftChange(e.currentTarget.value),autoFocus:true,onKeyDown:e=>{if("Enter"===e.key)rename.onSave();if("Escape"===e.key)rename.onCancel()},style:{flex:1}}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onSave,"aria-label":"Sauvegarder",loading:rename.isPending,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconCheck,{size:16})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onCancel,"aria-label":"Annuler",variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconX,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ActionIcon,{onClick:rename.onStartEditing,"aria-label":"Renommer",variant:"subtle",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_2__.IconPencil,{size:16})})]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{w:"fit-content",order:3,children:connector.name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",size:"lg",lineClamp:3,children:connector.main_connectorlist.description_fr})]})})}},6699:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{Qq:()=>HttpClient,cM:()=>ContentType,qx:()=>IntegrationsApi});var ContentType=/*#__PURE__*/function(ContentType){ContentType["Json"]="application/json";ContentType["JsonApi"]="application/vnd.api+json";ContentType["FormData"]="multipart/form-data";ContentType["UrlEncoded"]="application/x-www-form-urlencoded";ContentType["Text"]="text/plain";return ContentType}({});class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>{if(input instanceof FormData)return input;return Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData)},["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&¶ms2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response;r.data=null;r.error=null;const responseToParse=responseFormat?response.clone():response;const data=responseFormat?await responseToParse[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class IntegrationsApi{http;constructor(http){this.http=http}status=(params={})=>this.http.request({path:"/status",method:"GET",...params});connectors={getStatsConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/stats`,method:"GET",secure:true,format:"json",...params}),getConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ok`,method:"GET",secure:true,format:"json",...params}),getIllConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/ill`,method:"GET",secure:true,format:"json",...params}),getCatalogConnectorsV1:({cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/catalog`,method:"GET",secure:true,format:"json",...params}),addConnectorV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/add`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),getConnectorConfigV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/config/${connector}`,method:"GET",secure:true,format:"json",...params}),getConnectorSingleV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/single/${connector}`,method:"GET",secure:true,format:"json",...params}),putConnectorDataV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/data/${connector}`,method:"PUT",body:data,secure:true,type:"application/json",format:"json",...params}),refreshConnectorAccountsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/refresh-accounts`,method:"POST",secure:true,format:"json",...params}),renameConnectorV1:({connector,cid,...query},data,params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"PATCH",body:data,secure:true,type:"application/json",format:"json",...params}),deleteConnectorV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}`,method:"DELETE",secure:true,format:"json",...params}),getConnectorHistoryV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/history`,method:"GET",secure:true,format:"json",...params}),getAuthSecretsV1:({connector,cid,...query},params={})=>this.http.request({path:`/v1/connectors/${cid}/${connector}/auth-secrets`,method:"GET",secure:true,format:"json",...params})};google={listGsheetFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files`,method:"GET",secure:true,format:"json",...params}),deleteGsheetFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/google/${cid}/gsheet/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};microsoft={startAdminConsentV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/admin-consent/start`,method:"GET",query:query,secure:true,format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/microsoft/admin-consent/callback",method:"GET",query:query,...params}),getTenantV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/tenant`,method:"GET",secure:true,format:"json",...params}),resolveFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/resolve-file`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),listExcelFilesV1:({cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"GET",secure:true,format:"json",...params}),addExcelFileV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),readExcelV1:({cid,...query},data,params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/read`,method:"POST",body:data,secure:true,type:"application/json",format:"json",...params}),deleteExcelFileV1:({fileId,cid,...query},params={})=>this.http.request({path:`/v1/microsoft/${cid}/excel/files/${fileId}`,method:"DELETE",secure:true,format:"json",...params})};pennylane={startOauthV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/start`,method:"GET",query:query,secure:true,format:"json",...params}),getStatusV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/status`,method:"GET",secure:true,format:"json",...params}),disconnectV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth`,method:"DELETE",secure:true,format:"json",...params}),getTokenV1:({cid,...query},params={})=>this.http.request({path:`/v1/pennylane/${cid}/oauth/token`,method:"GET",format:"json",...params}),handleCallbackV1:(query,params={})=>this.http.request({path:"/v1/pennylane/callback",method:"GET",query:query,...params})}}},1034:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{U:()=>connectorLogoUrl});const fec_namespaceObject=__webpack_require__.p+"static/image/fec.png";function connectorLogoUrl(connector){if("fec"===connector.codename)return fec_namespaceObject;return connector.logo_key?`https://img.logo.dev/${connector.logo_key}?token=pk_QvyqAb6uTRGJE2_sDsEb9g&retina=true`:`https://s3.eu-west-3.amazonaws.com/media.airporting/connectors/${connector.codename}.png`}}}]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConnectorHistoryResponse } from '@/src/gen/IntegrationsApi.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Historique des actions sur un connecteur.
|
|
4
|
+
*
|
|
5
|
+
* `enabled` permet de ne charger qu'à l'ouverture du panneau : l'historique est
|
|
6
|
+
* une consultation ponctuelle, pas une donnée de la page, et il n'y a aucune
|
|
7
|
+
* raison d'interroger la base à chaque affichage d'un connecteur.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useConnectorHistoryQuery({ enabled }: {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
}): import("@tanstack/react-query").UseQueryResult<ConnectorHistoryResponse, Error>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message à afficher quand une sauvegarde de connecteur échoue.
|
|
3
|
+
*
|
|
4
|
+
* Le client généré fait `throw data`, où `data` est l'objet `Response` enrichi
|
|
5
|
+
* d'un champ `error` contenant le corps déjà analysé. Les exceptions Nest y
|
|
6
|
+
* arrivent sous la forme `{ statusCode, message }`, et ce message est souvent la
|
|
7
|
+
* seule chose utile à montrer.
|
|
8
|
+
*
|
|
9
|
+
* Cas vécu : saisir une clé d'API Pennylane erronée. L'API répond 400 avec
|
|
10
|
+
* « Pennylane API key rejected by /me (status 401) », parce qu'elle vérifie la
|
|
11
|
+
* clé auprès de Pennylane avant d'enregistrer. L'interface affichait pourtant
|
|
12
|
+
* « Nous rencontrons un soucis technique. Veuillez réessayer plus tard. », ce qui
|
|
13
|
+
* est faux sur les deux moitiés : ce n'est pas une panne, et réessayer plus tard
|
|
14
|
+
* ne marchera jamais. La personne cherche la panne au lieu de corriger sa clé.
|
|
15
|
+
*
|
|
16
|
+
* Règle retenue : on montre le message du serveur sur une erreur **de la requête**
|
|
17
|
+
* (4xx), parce qu'il décrit ce que l'utilisateur peut corriger. Sur une 5xx on
|
|
18
|
+
* garde le message générique : le détail interne ne l'aiderait pas et pourrait
|
|
19
|
+
* exposer nos rouages.
|
|
20
|
+
*/
|
|
21
|
+
export declare function saveErrorMessage(erreur: unknown): string;
|
|
22
|
+
export declare const SAVE_ERROR_GENERIQUE = "Nous rencontrons un soucis technique. Veuillez r\u00E9essayer plus tard.";
|
|
23
|
+
export declare const SAVE_ERROR_IDENTITE_REFUSEE = "Votre v\u00E9rification de s\u00E9curit\u00E9 n'est plus valable. Enregistrez \u00E0 nouveau pour ressaisir votre mot de passe.";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Historique des actions sur un connecteur : qui a créé, modifié, renommé,
|
|
3
|
+
* supprimé, et surtout qui a consulté les identifiants.
|
|
4
|
+
*
|
|
5
|
+
* Replié par défaut, et la requête n'est lancée qu'à l'ouverture : c'est une
|
|
6
|
+
* consultation ponctuelle, pas une donnée de la page.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ConnectorHistory(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,6 +53,51 @@ export interface ConnectorConfigResponse {
|
|
|
53
53
|
export interface ConnectorDeleteResponse {
|
|
54
54
|
status: string;
|
|
55
55
|
}
|
|
56
|
+
export interface ConnectorHistoryEntry {
|
|
57
|
+
/** `created`, `data_updated`, `renamed`, `deleted`, `secrets_revealed`. */
|
|
58
|
+
action: string;
|
|
59
|
+
/** Noms des champs modifiés ou consultés. Jamais les valeurs. */
|
|
60
|
+
changedFields: string[];
|
|
61
|
+
/**
|
|
62
|
+
* Horodatage ISO 8601. Le JSON n'a pas de type date : la valeur part en
|
|
63
|
+
* `Date` côté serveur et arrive en chaîne côté client, autant le dire.
|
|
64
|
+
*/
|
|
65
|
+
date: string;
|
|
66
|
+
/**
|
|
67
|
+
* D'où vient l'identité de la ligne. `reveal_token` = prouvée par le jeton de
|
|
68
|
+
* step-up. `from_header` = déclarée par le client dans l'en-tête HTTP `From`,
|
|
69
|
+
* donc sans preuve. L'interface doit distinguer les deux, sinon elle fait
|
|
70
|
+
* confiance à tort.
|
|
71
|
+
*
|
|
72
|
+
* `@ApiProperty` explicite ici parce que le greffon OpenAPI de Nest ne sait
|
|
73
|
+
* pas décrire une union de littéraux : il l'émet en `Object`, et le client
|
|
74
|
+
* généré reçoit alors `object`. Le front devrait le caster, comme il le fait
|
|
75
|
+
* déjà pour `ConnectorSingleResponse.status`. Or c'est précisément le champ
|
|
76
|
+
* qui dit si l'on peut croire la ligne : le typer à l'aveugle serait le
|
|
77
|
+
* meilleur moyen de le manipuler de travers.
|
|
78
|
+
*/
|
|
79
|
+
identitySource: ConnectorHistoryEntryIdentitySourceEnum;
|
|
80
|
+
/** Phrase lisible, déjà rédigée côté serveur. */
|
|
81
|
+
sentence: string | null;
|
|
82
|
+
userEmail: string | null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* D'où vient l'identité de la ligne. `reveal_token` = prouvée par le jeton de
|
|
86
|
+
* step-up. `from_header` = déclarée par le client dans l'en-tête HTTP `From`,
|
|
87
|
+
* donc sans preuve. L'interface doit distinguer les deux, sinon elle fait
|
|
88
|
+
* confiance à tort.
|
|
89
|
+
*
|
|
90
|
+
* `@ApiProperty` explicite ici parce que le greffon OpenAPI de Nest ne sait
|
|
91
|
+
* pas décrire une union de littéraux : il l'émet en `Object`, et le client
|
|
92
|
+
* généré reçoit alors `object`. Le front devrait le caster, comme il le fait
|
|
93
|
+
* déjà pour `ConnectorSingleResponse.status`. Or c'est précisément le champ
|
|
94
|
+
* qui dit si l'on peut croire la ligne : le typer à l'aveugle serait le
|
|
95
|
+
* meilleur moyen de le manipuler de travers.
|
|
96
|
+
*/
|
|
97
|
+
export type ConnectorHistoryEntryIdentitySourceEnum = 'reveal_token' | 'from_header';
|
|
98
|
+
export interface ConnectorHistoryResponse {
|
|
99
|
+
entries: ConnectorHistoryEntry[];
|
|
100
|
+
}
|
|
56
101
|
export interface ConnectorItem {
|
|
57
102
|
id: number;
|
|
58
103
|
main_connectorlist: {
|
|
@@ -160,6 +205,10 @@ export interface GetConnectorConfigV1Params {
|
|
|
160
205
|
cid: string;
|
|
161
206
|
connector: number;
|
|
162
207
|
}
|
|
208
|
+
export interface GetConnectorHistoryV1Params {
|
|
209
|
+
cid: string;
|
|
210
|
+
connector: number;
|
|
211
|
+
}
|
|
163
212
|
export interface GetConnectorSingleV1Params {
|
|
164
213
|
cid: string;
|
|
165
214
|
connector: number;
|
|
@@ -376,6 +425,7 @@ export declare namespace Connectors {
|
|
|
376
425
|
* @tags Connectors
|
|
377
426
|
* @name GetConnectorConfigV1
|
|
378
427
|
* @request GET:/v1/connectors/{cid}/config/{connector}
|
|
428
|
+
* @secure
|
|
379
429
|
* @response `200` `ConnectorConfigResponse`
|
|
380
430
|
*/
|
|
381
431
|
namespace GetConnectorConfigV1 {
|
|
@@ -393,6 +443,7 @@ export declare namespace Connectors {
|
|
|
393
443
|
* @tags Connectors
|
|
394
444
|
* @name GetConnectorSingleV1
|
|
395
445
|
* @request GET:/v1/connectors/{cid}/single/{connector}
|
|
446
|
+
* @secure
|
|
396
447
|
* @response `200` `ConnectorSingleResponse`
|
|
397
448
|
*/
|
|
398
449
|
namespace GetConnectorSingleV1 {
|
|
@@ -406,12 +457,27 @@ export declare namespace Connectors {
|
|
|
406
457
|
type ResponseBody = ConnectorSingleResponse;
|
|
407
458
|
}
|
|
408
459
|
/**
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
460
|
+
* No description
|
|
461
|
+
* @tags Connectors
|
|
462
|
+
* @name PutConnectorDataV1
|
|
463
|
+
* @summary Enregistrement de la configuration d'un connecteur.
|
|
464
|
+
|
|
465
|
+
**Step-up exigé.** C'est la route qui écrit les clés d'API, donc celle où une
|
|
466
|
+
identité déclarative ne suffit pas : sans preuve, l'historique ne vaudrait
|
|
467
|
+
rien précisément là où il compte. Le front obtient le jeton par la modale de
|
|
468
|
+
mot de passe et le conserve dans une fenêtre de grâce de 4 minutes, plus
|
|
469
|
+
courte que les 5 minutes de vie du jeton pour qu'il soit toujours encore
|
|
470
|
+
valide ici. En cas de refus malgré tout, le front rouvre la modale et rejoue
|
|
471
|
+
la sauvegarde, donc un 401 ne fait pas perdre la saisie.
|
|
472
|
+
|
|
473
|
+
Le renommage et la suppression restent **sans step-up** : leurs mutations
|
|
474
|
+
côté front n'envoient pas le jeton, et poser la garde ici les casserait. Le
|
|
475
|
+
renommage ne touche aucun secret. La suppression mériterait la même
|
|
476
|
+
exigence, ce qui demande d'abord de brancher le jeton sur sa mutation.
|
|
477
|
+
* @request PUT:/v1/connectors/{cid}/data/{connector}
|
|
478
|
+
* @secure
|
|
479
|
+
* @response `200` `ConnectorSaveDataResponse`
|
|
480
|
+
*/
|
|
415
481
|
namespace PutConnectorDataV1 {
|
|
416
482
|
type RequestParams = {
|
|
417
483
|
cid: string;
|
|
@@ -482,6 +548,33 @@ export declare namespace Connectors {
|
|
|
482
548
|
/**
|
|
483
549
|
* No description
|
|
484
550
|
* @tags Connectors
|
|
551
|
+
* @name GetConnectorHistoryV1
|
|
552
|
+
* @summary GET /v1/connectors/:cid/:connector/history
|
|
553
|
+
|
|
554
|
+
Historique des actions sur un connecteur : création, modification,
|
|
555
|
+
renommage, suppression, et consultation des identifiants.
|
|
556
|
+
|
|
557
|
+
Chaque entrée porte `identitySource`. Une entrée `reveal_token` a une
|
|
558
|
+
identité vérifiée, une entrée `from_header` a une identité déclarative que
|
|
559
|
+
le client a fournie sans preuve. L'interface doit le montrer, sinon on fait
|
|
560
|
+
confiance à tort.
|
|
561
|
+
* @request GET:/v1/connectors/{cid}/{connector}/history
|
|
562
|
+
* @secure
|
|
563
|
+
* @response `200` `ConnectorHistoryResponse`
|
|
564
|
+
*/
|
|
565
|
+
namespace GetConnectorHistoryV1 {
|
|
566
|
+
type RequestParams = {
|
|
567
|
+
cid: string;
|
|
568
|
+
connector: number;
|
|
569
|
+
};
|
|
570
|
+
type RequestQuery = {};
|
|
571
|
+
type RequestBody = never;
|
|
572
|
+
type RequestHeaders = {};
|
|
573
|
+
type ResponseBody = ConnectorHistoryResponse;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* No description
|
|
577
|
+
* @tags Connectors
|
|
485
578
|
* @name GetAuthSecretsV1
|
|
486
579
|
* @summary GET /v1/connectors/:cid/:connector/auth-secrets
|
|
487
580
|
|
|
@@ -912,6 +1005,7 @@ export declare class IntegrationsApi<SecurityDataType extends unknown> {
|
|
|
912
1005
|
* @tags Connectors
|
|
913
1006
|
* @name GetConnectorConfigV1
|
|
914
1007
|
* @request GET:/v1/connectors/{cid}/config/{connector}
|
|
1008
|
+
* @secure
|
|
915
1009
|
* @response `200` `ConnectorConfigResponse`
|
|
916
1010
|
*/
|
|
917
1011
|
getConnectorConfigV1: ({ connector, cid, ...query }: GetConnectorConfigV1Params, params?: RequestParams) => Promise<HttpResponse<ConnectorConfigResponse, any>>;
|
|
@@ -921,17 +1015,33 @@ export declare class IntegrationsApi<SecurityDataType extends unknown> {
|
|
|
921
1015
|
* @tags Connectors
|
|
922
1016
|
* @name GetConnectorSingleV1
|
|
923
1017
|
* @request GET:/v1/connectors/{cid}/single/{connector}
|
|
1018
|
+
* @secure
|
|
924
1019
|
* @response `200` `ConnectorSingleResponse`
|
|
925
1020
|
*/
|
|
926
1021
|
getConnectorSingleV1: ({ connector, cid, ...query }: GetConnectorSingleV1Params, params?: RequestParams) => Promise<HttpResponse<ConnectorSingleResponse, any>>;
|
|
927
1022
|
/**
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1023
|
+
* No description
|
|
1024
|
+
*
|
|
1025
|
+
* @tags Connectors
|
|
1026
|
+
* @name PutConnectorDataV1
|
|
1027
|
+
* @summary Enregistrement de la configuration d'un connecteur.
|
|
1028
|
+
|
|
1029
|
+
**Step-up exigé.** C'est la route qui écrit les clés d'API, donc celle où une
|
|
1030
|
+
identité déclarative ne suffit pas : sans preuve, l'historique ne vaudrait
|
|
1031
|
+
rien précisément là où il compte. Le front obtient le jeton par la modale de
|
|
1032
|
+
mot de passe et le conserve dans une fenêtre de grâce de 4 minutes, plus
|
|
1033
|
+
courte que les 5 minutes de vie du jeton pour qu'il soit toujours encore
|
|
1034
|
+
valide ici. En cas de refus malgré tout, le front rouvre la modale et rejoue
|
|
1035
|
+
la sauvegarde, donc un 401 ne fait pas perdre la saisie.
|
|
1036
|
+
|
|
1037
|
+
Le renommage et la suppression restent **sans step-up** : leurs mutations
|
|
1038
|
+
côté front n'envoient pas le jeton, et poser la garde ici les casserait. Le
|
|
1039
|
+
renommage ne touche aucun secret. La suppression mériterait la même
|
|
1040
|
+
exigence, ce qui demande d'abord de brancher le jeton sur sa mutation.
|
|
1041
|
+
* @request PUT:/v1/connectors/{cid}/data/{connector}
|
|
1042
|
+
* @secure
|
|
1043
|
+
* @response `200` `ConnectorSaveDataResponse`
|
|
1044
|
+
*/
|
|
935
1045
|
putConnectorDataV1: ({ connector, cid, ...query }: PutConnectorDataV1Params, data: ConnectorSaveDataRequest, params?: RequestParams) => Promise<HttpResponse<ConnectorSaveDataResponse, any>>;
|
|
936
1046
|
/**
|
|
937
1047
|
* No description
|
|
@@ -970,6 +1080,25 @@ export declare class IntegrationsApi<SecurityDataType extends unknown> {
|
|
|
970
1080
|
* No description
|
|
971
1081
|
*
|
|
972
1082
|
* @tags Connectors
|
|
1083
|
+
* @name GetConnectorHistoryV1
|
|
1084
|
+
* @summary GET /v1/connectors/:cid/:connector/history
|
|
1085
|
+
|
|
1086
|
+
Historique des actions sur un connecteur : création, modification,
|
|
1087
|
+
renommage, suppression, et consultation des identifiants.
|
|
1088
|
+
|
|
1089
|
+
Chaque entrée porte `identitySource`. Une entrée `reveal_token` a une
|
|
1090
|
+
identité vérifiée, une entrée `from_header` a une identité déclarative que
|
|
1091
|
+
le client a fournie sans preuve. L'interface doit le montrer, sinon on fait
|
|
1092
|
+
confiance à tort.
|
|
1093
|
+
* @request GET:/v1/connectors/{cid}/{connector}/history
|
|
1094
|
+
* @secure
|
|
1095
|
+
* @response `200` `ConnectorHistoryResponse`
|
|
1096
|
+
*/
|
|
1097
|
+
getConnectorHistoryV1: ({ connector, cid, ...query }: GetConnectorHistoryV1Params, params?: RequestParams) => Promise<HttpResponse<ConnectorHistoryResponse, any>>;
|
|
1098
|
+
/**
|
|
1099
|
+
* No description
|
|
1100
|
+
*
|
|
1101
|
+
* @tags Connectors
|
|
973
1102
|
* @name GetAuthSecretsV1
|
|
974
1103
|
* @summary GET /v1/connectors/:cid/:connector/auth-secrets
|
|
975
1104
|
|
package/dist/mf/@mf-types.zip
CHANGED
|
Binary file
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},4848:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(9698)},466:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>SingleConnector});var jsx_runtime=__webpack_require__(4848);var index_js_=__webpack_require__(8556);var single_connector_app=__webpack_require__(
|
|
10
|
+
*/var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},4848:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(9698)},466:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{default:()=>SingleConnector});var jsx_runtime=__webpack_require__(4848);var index_js_=__webpack_require__(8556);var single_connector_app=__webpack_require__(6841);var dist_index_js_=__webpack_require__(4259);var index_mjs_=__webpack_require__(2773);var esm_index_mjs_=__webpack_require__(4931);var modern_index_js_=__webpack_require__(7714);var dist_esm_index_mjs_=__webpack_require__(4449);var useAppConfigConnectorSingle=__webpack_require__(4613);const theme=(0,index_mjs_.createTheme)((0,dist_esm_index_mjs_.assign)(dist_index_js_.theme,{components:{}}));const cssVarResolver=x=>(0,dist_esm_index_mjs_.assign)(dist_index_js_.cssVarResolver(x),{dark:{},light:{},variables:{}});function ProvidersSingleConnector(props){const[queryClient]=(0,index_js_.useState)(()=>props.tanstack?.queryClient??new modern_index_js_.QueryClient);const{children,config,mantine,tanstack}=props;return/*#__PURE__*/(0,jsx_runtime.jsx)(useAppConfigConnectorSingle.a,{value:config,children:/*#__PURE__*/(0,jsx_runtime.jsx)(modern_index_js_.QueryClientProvider,{client:queryClient,children:/*#__PURE__*/(0,jsx_runtime.jsxs)(index_mjs_.MantineProvider,{theme:theme,cssVariablesResolver:cssVarResolver,defaultColorScheme:mantine?.defaultColorScheme,forceColorScheme:mantine?.forceColorScheme,children:[/*#__PURE__*/(0,jsx_runtime.jsx)(esm_index_mjs_.Notifications,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(dist_index_js_.RevealTokenProvider,{children:children})]})})})}function SingleConnector(props){return/*#__PURE__*/(0,jsx_runtime.jsx)(index_js_.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(ProvidersSingleConnector,{...props,children:/*#__PURE__*/(0,jsx_runtime.jsx)(single_connector_app.d,{})})})}},4613:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>useAppConfigConnectorSingle,a:()=>AppConfigConnectorSingleProvider});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(8556);const AppConfigCtx=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);const AppConfigConnectorSingleProvider=AppConfigCtx.Provider;function useAppConfigConnectorSingle(){const config=(0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(AppConfigCtx);if(!config)throw new Error("Called `useAppConfig` outside a `<AppConfigConnectorSingleProvider />`");return config}}}]);
|