{"version":3,"file":"Sort.b26OB9sr.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/OPWAf0auPcUaad68EurP/m0MMufE4z8RzQs5dRc4S/Sort.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useRef,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function BroadcastSort(props){const[isOpen,setIsOpen]=useState(false);const[selectedOption,setSelectedOption]=useState(\"\");const[selectedField,setSelectedField]=useState(\"\");const[selectedDirection,setSelectedDirection]=useState(\"asc\");const[isHovered,setIsHovered]=useState(false);const BROADCAST_ID=\"3.14px solid transparent\";const containerRef=useRef(null);const selectRef=useRef(null);const optionsRef=useRef([]);const uniqueId=useRef(`broadcast-sort-${Math.random().toString(36).substring(2,11)}`);// Parse the sortOptions from props\nconst parseSortOptions=()=>{if(!props.sortOptions||!Array.isArray(props.sortOptions))return[];try{return props.sortOptions.map(option=>{if(!option.field||!option.type){console.error(\"Invalid sort option format:\",option);return null;}return{name:option.field,type:option.type.toLowerCase()};}).filter(Boolean);}catch(e){console.error(\"Error parsing sort options:\",e);return[];}};useEffect(()=>{const handleClickOutside=event=>{if(containerRef.current&&!containerRef.current.contains(event.target)){setIsOpen(false);}};document.addEventListener(\"mousedown\",handleClickOutside);return()=>{document.removeEventListener(\"mousedown\",handleClickOutside);};},[]);useEffect(()=>{// Store original order when component mounts\nstoreOriginalOrder();},[]);const storeOriginalOrder=()=>{const broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];const children=Array.from(broadcaster.children);children.forEach((child,index)=>{if(!child.hasAttribute(\"data-original-index\")){child.setAttribute(\"data-original-index\",index.toString());}});}};const toggleDropdown=()=>{setIsOpen(!isOpen);};const handleOptionClick=option=>{if(option===props.defaultText){setSelectedOption(\"\");setSelectedField(\"\");setSelectedDirection(\"asc\");resetSort();}else{// Format: \"Name Direction\"\nconst parts=option.split(\" \");const direction=parts[parts.length-1].toLowerCase()===\"ascending\"?\"asc\":\"desc\";const field=parts.slice(0,-1).join(\" \")// Everything except the last word\n;setSelectedOption(option);setSelectedField(field);setSelectedDirection(direction);sortItems(field,direction);}setIsOpen(false);};const resetSort=()=>{const broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];const children=Array.from(broadcaster.children);// Sort by original order (data-original-index)\nchildren.sort((a,b)=>{const aIndex=parseInt(a.getAttribute(\"data-original-index\")||\"0\");const bIndex=parseInt(b.getAttribute(\"data-original-index\")||\"0\");return aIndex-bIndex;});// Re-append in original order\nchildren.forEach(child=>{broadcaster.appendChild(child);});// Trigger pagination refresh after reset\ntriggerPaginationRefresh();}};// Helper functions for sorting\nconst extractNumber=str=>{if(!str)return 0;const matches=str.match(/-?[\\d,]+\\.?\\d*/g);if(!matches)return 0;const numStr=matches[0].replace(/,/g,\"\");return parseFloat(numStr)||0;};const parseDate=dateString=>{if(!dateString)return 0;// Try different date formats\n// MM/DD/YYYY or DD/MM/YYYY\nconst slashParts=dateString.split(\"/\");if(slashParts.length===3){const year=slashParts[2].length===2?`20${slashParts[2]}`:slashParts[2];// Try US format first (MM/DD/YYYY)\nconst date=new Date(`${slashParts[0]}/${slashParts[1]}/${year}`);if(!isNaN(date))return date.getTime();// Try European format (DD/MM/YYYY)\nconst dateEU=new Date(`${slashParts[1]}/${slashParts[0]}/${year}`);if(!isNaN(dateEU))return dateEU.getTime();}// Try ISO format\nconst isoDate=new Date(dateString);if(!isNaN(isoDate))return isoDate.getTime();return 0;};const triggerPaginationRefresh=()=>{// Only interact with pagination if it actually exists and is enabled\nif(window.paginationConfig?.isEnabled&&window.updatePagination){console.log(\"Sort applied - refreshing pagination\");window.updatePagination({itemsPerPage:window.paginationConfig.itemsPerPage,currentPage:1,isEnabled:true});// Force pagination component to update its state\nif(window.forcePaginationUpdate){window.forcePaginationUpdate(1);}}else{console.log(\"No pagination - sort applied without pagination refresh\");// Just trigger the broadcaster to refresh display without any pagination limits\nif(window.updatePagination){// This will NOT create any config, just trigger refresh\nwindow.updatePagination({isEnabled:false});}}};const sortItems=(field,direction)=>{const broadcasterElements=document.querySelectorAll(`[style*=\"border: ${BROADCAST_ID}\"]`);if(broadcasterElements.length>0){const broadcaster=broadcasterElements[0];// Get ALL children regardless of current display state\nconst allChildren=window.allBroadcastItems||Array.from(broadcaster.children);console.log(`Sorting ${allChildren.length} total items by ${field} ${direction}`);// Find the type of the field\nconst sortOptions=parseSortOptions();const fieldOption=sortOptions.find(opt=>opt.name===field);const fieldType=fieldOption?fieldOption.type:\"string\";// Sort ALL children (not just visible ones)\nallChildren.sort((a,b)=>{const aValue=getSortValue(a,field);const bValue=getSortValue(b,field);// Direction-aware comparison\nreturn direction===\"asc\"?compareValues(aValue,bValue,fieldType):compareValues(bValue,aValue,fieldType);});// Re-append ALL children in sorted order\nallChildren.forEach(child=>{broadcaster.appendChild(child);});// Update the global array if it exists\nif(window.allBroadcastItems){window.allBroadcastItems=allChildren;}console.log(`Sorted all items, now triggering pagination/filter refresh`);// Trigger pagination refresh after sort - this will apply filters and pagination to the newly sorted items\ntriggerPaginationRefresh();}};const getSortValue=(element,field)=>{// Try to find a specific data attribute for sorting\nconst sortDataAttr=element.querySelector(`[data-framer-name=\"${field}\"], [data-sort=\"${field}\"]`);if(sortDataAttr){return sortDataAttr.textContent||\"\";}// Fallback to just the element's text content\nreturn element.textContent||\"\";};const compareValues=(a,b,type)=>{// Handle non-string values\nif(a===undefined||a===null)return-1;if(b===undefined||b===null)return 1;// Convert to strings\nconst aStr=a.toString();const bStr=b.toString();if(type===\"number\"){return extractNumber(aStr)-extractNumber(bStr);}else if(type===\"date\"){return parseDate(aStr)-parseDate(bStr);}else{// Default: string comparison\nreturn aStr.localeCompare(bStr);}};const isActive=selectedOption!==\"\";// Get display title\nconst getDisplayTitle=()=>{if(selectedOption===\"\"){return props.defaultText;}else{return selectedOption;}};const{selectorStyle,activeStyle,dropdownStyle,optionStyle,dropdownGap,iconStyle,transition}=props;// Get current background color based on state\nconst getCurrentBackground=()=>{if(isHovered){return isActive?activeStyle.hoverBackground:selectorStyle.hoverBackground;}return isActive?activeStyle.background:selectorStyle.background;};const getCurrentShadow=()=>{if(isHovered){return isActive?activeStyle.hoverShadow:selectorStyle.hoverShadow;}return isActive?activeStyle.shadow:selectorStyle.shadow;};// Generate sort options\nconst getSortOptions=()=>{const options=[props.defaultText];parseSortOptions().forEach(option=>{options.push(`${option.name} Ascending`);options.push(`${option.name} Descending`);});return options;};const sortOptions=getSortOptions();return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{position:\"relative\",width:\"100%\",userSelect:\"none\"},children:[/*#__PURE__*/_jsxs(\"div\",{ref:selectRef,onClick:toggleDropdown,onMouseEnter:()=>setIsHovered(true),onMouseLeave:()=>setIsHovered(false),style:{padding:selectorStyle.padding,background:getCurrentBackground(),borderRadius:selectorStyle.borderRadius,cursor:\"pointer\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",boxShadow:getCurrentShadow(),border:isActive?`${activeStyle.border.borderWidth}px ${activeStyle.border.borderStyle} ${activeStyle.border.borderColor}`:`${selectorStyle.border.borderWidth}px ${selectorStyle.border.borderStyle} ${selectorStyle.border.borderColor}`,color:isActive?activeStyle.textColor:selectorStyle.textColor,...isActive?activeStyle.font:selectorStyle.font,overflow:\"visible\",transition:\"all 0.15s ease\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{marginRight:selectorStyle.iconGap,whiteSpace:\"nowrap\",overflow:\"visible\",textOverflow:\"ellipsis\",pointerEvents:\"none\"},children:getDisplayTitle()}),selectorStyle.showArrow&&/*#__PURE__*/_jsx(motion.div,{animate:{rotate:isOpen?180:0},transition:transition,style:{display:\"flex\",alignItems:\"center\",flexShrink:0,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"svg\",{width:iconStyle.size,height:iconStyle.size,viewBox:\"0 0 12 8\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",style:{display:\"block\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M1 1.5L6 6.5L11 1.5\",stroke:isActive?activeStyle.iconColor:iconStyle.color,strokeWidth:iconStyle.strokeWidth,strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),isOpen&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:transition,style:{position:\"absolute\",top:`calc(100% + ${dropdownGap}px)`,left:0,minWidth:dropdownStyle.minWidth||\"100%\",maxHeight:dropdownStyle.maxHeight||\"none\",zIndex:1e3,background:dropdownStyle.background,borderRadius:dropdownStyle.borderRadius,boxShadow:dropdownStyle.shadow,overflow:\"auto\",border:`${dropdownStyle.border.borderWidth}px ${dropdownStyle.border.borderStyle} ${dropdownStyle.border.borderColor}`,padding:dropdownStyle.padding,display:\"flex\",flexDirection:\"column\",gap:dropdownStyle.itemGap},children:sortOptions.map((option,index)=>{const isDefaultOption=option===props.defaultText;const isSelected=isDefaultOption?selectedOption===\"\":option===selectedOption;return /*#__PURE__*/_jsx(motion.div,{ref:el=>optionsRef.current[index]=el,onClick:()=>handleOptionClick(option),style:{padding:optionStyle.padding,cursor:\"pointer\",background:isSelected?optionStyle.activeBackground:optionStyle.background,color:isSelected?optionStyle.activeColor:optionStyle.color,...optionStyle.font,whiteSpace:\"nowrap\",borderRadius:optionStyle.borderRadius,overflow:\"visible\"},whileHover:{backgroundColor:optionStyle.hoverBackground},transition:transition,children:option},index);})})]});}BroadcastSort.defaultProps={defaultText:\"Sort by\",sortOptions:[{field:\"Title\",type:\"String\"},{field:\"Price\",type:\"Number\"},{field:\"Date\",type:\"Date\"}],dropdownGap:8,transition:{type:\"spring\",stiffness:300,damping:30},iconStyle:{size:12,color:\"#333333\",strokeWidth:2},selectorStyle:{showArrow:true,textColor:\"#333333\",background:\"#FFFFFF\",hoverBackground:\"#F5F5F5\",shadow:\"0px 1px 2px 0px rgba(0,0,0,0.05)\",hoverShadow:\"0px 2px 4px 0px rgba(0,0,0,0.1)\",padding:\"12px 16px\",borderRadius:\"8px\",iconGap:8,border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#E0E0E0\"},font:{family:\"Inter\",fontSize:14,fontWeight:500}},activeStyle:{textColor:\"#594FEE\",iconColor:\"#594FEE\",background:\"#EEEDFD\",hoverBackground:\"#E5E2FF\",shadow:\"0px 1px 2px 0px rgba(0,0,0,0.05)\",hoverShadow:\"0px 2px 4px 0px rgba(0,0,0,0.1)\",border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#594FEE\"},font:{family:\"Inter\",fontSize:14,fontWeight:500}},dropdownStyle:{background:\"#FFFFFF\",shadow:\"0px 4px 12px 0px rgba(0,0,1,0.1)\",borderRadius:\"8px\",padding:\"4px\",itemGap:2,minWidth:\"100%\",maxHeight:\"300px\",border:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#E0E0E0\"}},optionStyle:{background:\"#FFFFFF\",hoverBackground:\"#F5F5F5\",activeBackground:\"#F0F0F0\",color:\"#333333\",activeColor:\"#000000\",padding:\"10px 16px\",borderRadius:\"4px\",font:{family:\"Inter\",fontSize:14,fontWeight:400}}};addPropertyControls(BroadcastSort,{defaultText:{type:ControlType.String,title:\"Default Text\",defaultValue:\"Sort by\"},sortOptions:{type:ControlType.Array,title:\"Sort Options\",control:{type:ControlType.Object,controls:{field:{type:ControlType.String,title:\"Field\",defaultValue:\"Title\"},type:{type:ControlType.Enum,title:\"Type\",options:[\"String\",\"Number\",\"Date\"],defaultValue:\"String\"}}},defaultValue:[{field:\"Title\",type:\"String\"},{field:\"Price\",type:\"Number\"},{field:\"Date\",type:\"Date\"}]},dropdownGap:{type:ControlType.Number,title:\"Dropdown Gap\",defaultValue:8,min:0,max:50,step:1},transition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{type:\"spring\",stiffness:300,damping:30}},iconStyle:{type:ControlType.Object,title:\"Icon Style\",controls:{size:{type:ControlType.Number,title:\"Size\",defaultValue:12,min:6,max:24,step:1},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#333333\"},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:2,min:1,max:4,step:.5}}},selectorStyle:{type:ControlType.Object,title:\"Default Style\",controls:{showArrow:{type:ControlType.Boolean,title:\"Show Arrow\",defaultValue:true},iconGap:{type:ControlType.Number,title:\"Icon Gap\",defaultValue:8,min:0,max:50,step:1},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#333333\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"12px 16px\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},hoverBackground:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#F5F5F5\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"8px\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"0px 1px 2px 0px rgba(0,0,0,0.05)\"},hoverShadow:{type:ControlType.BoxShadow,title:\"Hover Shadow\",defaultValue:\"0px 2px 4px 0px rgba(0,0,0,0.1)\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#E0E0E0\"}}}},activeStyle:{type:ControlType.Object,title:\"Active Style\",controls:{textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#594FEE\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#594FEE\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#EEEDFD\"},hoverBackground:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#E5E2FF\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"0px 1px 2px 0px rgba(0,0,0,0.05)\"},hoverShadow:{type:ControlType.BoxShadow,title:\"Hover Shadow\",defaultValue:\"0px 2px 4px 0px rgba(0,0,0,0.1)\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#594FEE\"}}}},dropdownStyle:{type:ControlType.Object,title:\"Dropdown Style\",controls:{background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"8px\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"4px\"},itemGap:{type:ControlType.Number,title:\"Item Gap\",defaultValue:2,min:0,max:20,step:1},minWidth:{type:ControlType.String,title:\"Min Width\",defaultValue:\"100%\"},maxHeight:{type:ControlType.String,title:\"Max Height\",defaultValue:\"300px\"},shadow:{type:ControlType.BoxShadow,title:\"Shadow\",defaultValue:\"0px 4px 12px 0px rgba(0,0,0,0.1)\"},border:{type:ControlType.Border,title:\"Border\",defaultValue:{borderWidth:1,borderStyle:\"solid\",borderColor:\"#E0E0E0\"}}}},optionStyle:{type:ControlType.Object,title:\"Option Style\",controls:{font:{type:ControlType.Font,title:\"Font\",controls:\"extended\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"10px 16px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Border Radius\",defaultValue:\"4px\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},hoverBackground:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#F5F5F5\"},activeBackground:{type:ControlType.Color,title:\"Active BG\",defaultValue:\"#F0F0F0\"},color:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#333333\"},activeColor:{type:ControlType.Color,title:\"Active Color\",defaultValue:\"#000000\"}},description:\"v3.0 \\n[via SegmentUI](https://www.segmentUI.com)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BroadcastSort\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerDisableUnlink\":\"*\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Sort.map"],"mappings":"+PAKG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAM,CAAC,EAAe,GAAmBA,EAAS,GAAG,CAAM,CAAC,EAAc,GAAkBA,EAAS,GAAG,CAAM,CAAC,EAAkB,GAAsBA,EAAS,MAAM,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAa,2BAAiC,EAAaC,EAAO,KAAK,CAAO,EAAUA,EAAO,KAAK,CAAO,EAAWA,EAAO,EAAE,CAAC,CAAgB,EAAO,kBAAkB,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,UAAU,EAAE,GAAG,GAAG,CACxgB,IAAM,MAAqB,CAAC,GAAG,CAAC,EAAM,aAAa,CAAC,MAAM,QAAQ,EAAM,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,OAAO,EAAM,YAAY,IAAI,GAAY,CAAC,EAAO,OAAO,CAAC,EAAO,MAAM,QAAQ,MAAM,8BAA8B,EAAO,CAAQ,MAAY,CAAC,KAAK,EAAO,MAAM,KAAK,EAAO,KAAK,aAAa,CAAC,CAAG,CAAC,OAAO,QAAQ,OAAQ,EAAE,CAAgD,OAA/C,QAAQ,MAAM,8BAA8B,EAAE,CAAO,EAAE,GAAI,MAAc,CAAC,IAAM,EAAmB,GAAO,CAAI,EAAa,SAAS,CAAC,EAAa,QAAQ,SAAS,EAAM,OAAO,EAAE,EAAU,GAAM,EAA8D,OAA1D,SAAS,iBAAiB,YAAY,EAAmB,KAAW,CAAC,SAAS,oBAAoB,YAAY,EAAmB,GAAK,EAAE,CAAC,CAAC,MAAc,CAC7pB,GAAoB,EAAG,E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