{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/RSnvLji32i0Xm2QuoLgz/NglA0PIoS20Njsuqhaq1/TableWithFilter.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Configure your Framer component props below\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n */export function TableWithFilter({dataUrl}){const[data,setData]=useState(null);const[searchTerm,setSearchTerm]=useState(\"\");// Fetch data from the passed-in URL\nuseEffect(()=>{if(!dataUrl)return;fetch(dataUrl).then(res=>res.json()).then(jsonData=>setData(jsonData)).catch(err=>console.error(\"Error fetching data:\",err));},[dataUrl]);// Determine if data is an array (no descriptions) or object (with descriptions)\nconst isArrayData=Array.isArray(data);// Convert data into a consistent array-of-[key, value] structure\nlet entries=[];if(isArrayData){// data is something like [\"Airbrake\", \"Asana\", \"GitHub\", ...]\n// Convert each string into [detectorName, undefined]\nentries=(data||[]).map(item=>[item,undefined]);}else{// data is an object like { \"GitHub\": \"desc\", \"GitLab\": \"desc\" }\n// Convert to [key, value]\nentries=Object.entries(data||{});}// Simple filter by key or value\nconst filteredEntries=entries.filter(([key,value])=>{const term=searchTerm.toLowerCase();return key.toLowerCase().includes(term)||(value!==null&&value!==void 0?value:\"\").toLowerCase().includes(term);});return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:\"Filter...\",value:searchTerm,onChange:e=>setSearchTerm(e.target.value),style:inputStyle}),/*#__PURE__*/_jsxs(\"table\",{style:tableStyle,children:[/*#__PURE__*/_jsx(\"thead\",{children:/*#__PURE__*/_jsxs(\"tr\",{style:headerRowStyle,children:[/*#__PURE__*/_jsx(\"th\",{style:cellStyle,children:\"Name\"}),!isArrayData&&/*#__PURE__*/_jsx(\"th\",{style:cellStyle,children:\"Description\"})]})}),/*#__PURE__*/_jsx(\"tbody\",{children:filteredEntries.map(([detector,description])=>/*#__PURE__*/_jsxs(\"tr\",{style:rowStyle,children:[/*#__PURE__*/_jsx(\"td\",{style:{...cellStyle,fontFamily:\"monospace\"},children:detector}),!isArrayData&&/*#__PURE__*/_jsx(\"td\",{style:cellStyle,children:description})]},detector))})]})]});}addPropertyControls(TableWithFilter,{dataUrl:{title:\"JSON URL\",type:ControlType.String}});const containerStyle={backgroundColor:\"rgba(72, 58, 49, 0.08)\",padding:\"48px\",fontFamily:'\"National Park  Regular\", \"National Park  Regular Placeholder\", sans-serif',color:\"#483A31\",borderRadius:\"6px\",overflow:\"scroll\"};const inputStyle={backgroundColor:\"#F4EFE9\",border:\"0\",borderRadius:\"4px\",padding:\"8px\",fontSize:\"16px\",fontFamily:'\"National Park  Regular\", \"National Park  Regular Placeholder\", sans-serif',color:\"#483A31\",marginBottom:\"12px\",width:\"100%\"};const tableStyle={width:\"100%\",borderCollapse:\"collapse\",borderRadius:\"4px\",overflow:\"hidden\"};const headerRowStyle={background:\"rgba(72, 58, 49, 0.08)\"};const rowStyle={borderBottom:\"1px solid rgba(72, 58, 49, 0.08)\"};const cellStyle={padding:\"8px 12px\",textAlign:\"left\"};\nexport const __FramerMetadata__ = {\"exports\":{\"TableWithFilter\":{\"type\":\"reactComponent\",\"name\":\"TableWithFilter\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TableWithFilter.map"],
  "mappings": "4EAMU,SAASA,EAAgB,CAAC,QAAAC,CAAO,EAAE,CAAC,GAAK,CAACC,EAAKC,CAAO,EAAEC,EAAS,IAAI,EAAO,CAACC,EAAWC,CAAa,EAAEF,EAAS,EAAE,EAC5HG,EAAU,IAAI,CAAKN,GAAe,MAAMA,CAAO,EAAE,KAAKO,GAAKA,EAAI,KAAK,CAAC,EAAE,KAA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AAC,EAAED,CAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAACG,EAAoB5B,EAAgB,CAAC,QAAQ,CAAC,MAAM,WAAW,KAAK6B,EAAY,MAAM,CAAC,CAAC,EAAE,IAAMV,EAAe,CAAC,gBAAgB,yBAAyB,QAAQ,OAAO,WAAW,6EAA6E,MAAM,UAAU,aAAa,MAAM,SAAS,QAAQ,EAAQE,EAAW,CAAC,gBAAgB,UAAU,OAAO,IAAI,aAAa,MAAM,QAAQ,MAAM,SAAS,OAAO,WAAW,6EAA6E,MAAM,UAAU,aAAa,OAAO,MAAM,MAAM,EAAQC,EAAW,CAAC,MAAM,OAAO,eAAe,WAAW,aAAa,MAAM,SAAS,QAAQ,EAAQC,EAAe,CAAC,WAAW,wBAAwB,EAAQI,EAAS,CAAC,aAAa,kCAAkC,EAAQH,EAAU,CAAC,QAAQ,WAAW,UAAU,MAAM",
  "names": ["TableWithFilter", "dataUrl", "data", "setData", "ye", "searchTerm", "setSearchTerm", "ue", "res", "jsonData", "err", "isArrayData", "entries", "item", "filteredEntries", "key", "value", "term", "u", "containerStyle", "p", "inputStyle", "tableStyle", "headerRowStyle", "cellStyle", "detector", "description", "rowStyle", "addPropertyControls", "ControlType"]
}
