import{d as m,a as h}from"./dataSchema-liIE6AFZ.js";import"./locale-2oqXkJWO.js";import{C as u}from"./collection-nnUjKAuT.js";import"./manifest--hA2W8VB.js";const f={docLink:"https://docs.mia-platform.eu/docs/microfrontend-composer/back-kit/components/crud_export",description:{en:"Client for Mia-Platform CRUD service export route",it:"Client per la rotta di export del servizio CRUD di Mia-Platform "},label:"CRUD Export",mocks:{fetch:n=>{const{basePath:t,dataSchema:i}=n,r=new u(i);if(t){const{pathname:s,origin:c}=new URL(t,window.document.baseURI);return[{handler:async d=>new Response(new ReadableStream({start(a){const p=`
`,l=new TextEncoder;async function o(e){if(e.length===0){a.close();return}a.enqueue(l.encode(JSON.stringify(e.shift()).concat(p))),o(e)}o(r.export(d))}}),{status:200,statusText:"OK",headers:new Headers({"Content-Type":"application/x-ndjson","Transfer-Encoding":"chunked"})}),method:"GET",url:{pathname:s,origin:c}}]}return[]}},definitions:{...m,dataSchema:h},properties:{dataSchema:{$ref:"#/definitions/dataSchema",__mia_configuration:{"shared-key":"back-kit/data-schema",attribute:!1,label:"Data schema",priority:"high"}},streamSaverIFrameSrc:{type:"string",__mia_configuration:{attribute:"stream-saver-iframe-src",label:"Streamsaver IFrame source",description:"When downloading this component may use the `streamsaver` service worker. This property sets the location where the relevant iframe can be found"}},nativeDownload:{type:"boolean",__mia_configuration:{priority:"high",attribute:"native-download",label:"Native download mode",description:"When `true` it skips frontend blob parsing and uses browser native download API"}},basePath:{type:"string",__mia_configuration:{description:"The URL base path used to reach the CRUD service",label:"CRUD Service base path",attribute:!0,priority:"high"}},shouldIncludeProjections:{type:"boolean",default:!0,__mia_configuration:{description:"should append projection when exporting from CRUD service",attribute:"should-include-projection",label:"Include projections"}}},type:"connector"};var v=f;export{v as default};
