{"version":3,"file":"Collection_Plus.WRfNQ4kX.mjs","names":["_jsx","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsx","_jsxs","_Fragment","_jsx","cloneElement","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","l","c","p","z","addPropertyControls","init_framer_ChujFWHC","ControlType","useIsOnFramerCanvas","useFramerCollectionList","init_Hooks","Branding_Tag","productName","init_Branding_Tag","Header","text","align","init_Header","HelperFrame","children","error","justify","rgb","containerProps","init_Helper_Frame","init_Main_Frame_iHC5","init_Header_Nmng","init_Message","init_Message_9f6V","ListItem","isChecked","init_List_Item","ToDoList","items","item","index","init_To_Do_List","init_To_Do_List_rlLo","init_Helpers","init_Index_nylz","Collection_Plus","props","isOnFramerCanvas","isDebuggingCMSPlus","linkedCollectionListFrame","linkedNoSearchResultsFrame","missingFrames","key","noSearchResults","showCollectionList","showNoResultsFrame","init_Collection_Plus"],"sources":["https:/framerusercontent.com/modules/L7TdKQ7OCrUDcI7mEHAV/saJ1D5cYziXCHw3cuoS0/Branding_Tag.js","https:/framerusercontent.com/modules/tb6g3uFMaN9A8Y0Nh5te/NSmLj9GJ3YcGYE7rQwfM/Header.js","https:/framerusercontent.com/modules/yljxQhHHYCclO8DHlyxu/sRhbB6xnGvNiuDPDTHW5/Helper_Frame.js","https:/framer.com/m/Main-Frame-iHC5.js","https:/framer.com/m/Header-Nmng.js","https:/framerusercontent.com/modules/R62RuVCy6eOjzkRZ9wyj/FO0wrP9rWA5aAMot9UBS/Message.js","https:/framer.com/m/Message-9f6V.js","https:/framerusercontent.com/modules/bmCFSKUhALa4QmIOqr6i/BpmPTjkfVB4lOyz9EiXT/List_Item.js","https:/framerusercontent.com/modules/nls243VrfVJRb2K9we5T/bIwdZocajZouuNz8bgX1/To_Do_List.js","https:/framer.com/m/To-Do-List-rlLo.js","https:/framerusercontent.com/modules/9uKQIQp6F4gR5rw7OCHi/Jxw8eNxT3geRyTaspASR/Helpers.js","https:/framer.com/m/Index-nylz.js","https:/framerusercontent.com/modules/vJeS6Ad5hYI9zKL5FEp9/wNCgKkRRnPgVUCkatxyA/Collection_Plus.js"],"sourcesContent":["/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */import{jsx as _jsx}from\"react/jsx-runtime\";export default function Branding_Tag({productName}){const styles={fontSize:\"10px\",position:\"absolute\",top:6,left:6};return /*#__PURE__*/_jsx(\"div\",{style:styles,children:productName||\"productName\"});}Branding_Tag.displayName=\"Branding Tag\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Branding_Tag\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Branding_Tag.map","/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */import{jsx as _jsx}from\"react/jsx-runtime\";export default function Header({text,align=\"left\"}){const styles={fontWeight:\"bold\",textAlign:align,width:\"100%\"};// @ts-ignore\nreturn /*#__PURE__*/_jsx(\"div\",{style:styles,children:text||\"Header\"});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Header\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Header.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import Branding_Tag from\"https://framerusercontent.com/modules/L7TdKQ7OCrUDcI7mEHAV/saJ1D5cYziXCHw3cuoS0/Branding_Tag.js\";import Header from\"https://framerusercontent.com/modules/tb6g3uFMaN9A8Y0Nh5te/NSmLj9GJ3YcGYE7rQwfM/Header.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n *\n * @framerIntrinsicHeight 400\n * @framerIntrinsicWidth 800\n *\n * @framerDisableUnlink\n */export default function HelperFrame({children,productName,align=\"center\",error=null,justify=\"center\"}){const colors={default:[67,198,135],error:[255,43,43]};const rgb=colors[error?\"error\":\"default\"].join(\",\");const containerProps={style:{alignItems:align,background:`rgba(${rgb}, 0.05)`,border:`1px solid rgb(${rgb})`,color:`rgb(${rgb})`,display:\"flex\",flexDirection:\"column\",fontSize:\"12px\",gap:\"12px\",height:\"fit-content\",justifyContent:justify,padding:\"32px 8px 8px 8px\",position:\"relative\",width:\"100%\"}};if(error){containerProps.style.cursor=\"pointer\";containerProps.onClick=()=>alert(error.message);}return /*#__PURE__*/_jsxs(\"div\",{...containerProps,className:\"cmsPlusError\",children:[/*#__PURE__*/_jsx(Branding_Tag,{productName:productName}),error&&/*#__PURE__*/_jsx(Header,{text:\"Error!\"}),children]});}HelperFrame.displayName=\"Helper Frame\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HelperFrame\",\"slots\":[\"children\"],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"400\",\"framerIntrinsicWidth\":\"800\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","/*\n * Helper_Frame\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/yljxQhHHYCclO8DHlyxu/sRhbB6xnGvNiuDPDTHW5/Helper_Frame.js\"\nexport { default } from \"https://framerusercontent.com/modules/yljxQhHHYCclO8DHlyxu/sRhbB6xnGvNiuDPDTHW5/Helper_Frame.js\"\n","/*\n * Header\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/tb6g3uFMaN9A8Y0Nh5te/NSmLj9GJ3YcGYE7rQwfM/Header.js\"\nexport { default } from \"https://framerusercontent.com/modules/tb6g3uFMaN9A8Y0Nh5te/NSmLj9GJ3YcGYE7rQwfM/Header.js\"\n","/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */import{jsx as _jsx}from\"react/jsx-runtime\";export default function Message({text}){const paragraphStyles={width:\"100%\",whiteSpace:\"pre-wrap\",margin:0,lineHeight:1.3};return /*#__PURE__*/_jsx(\"p\",{style:paragraphStyles,children:text||\"Message\"});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Message\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Message.map","/*\n * Message\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/R62RuVCy6eOjzkRZ9wyj/FO0wrP9rWA5aAMot9UBS/Message.js\"\nexport { default } from \"https://framerusercontent.com/modules/R62RuVCy6eOjzkRZ9wyj/FO0wrP9rWA5aAMot9UBS/Message.js\"\n","/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";export default function ListItem({text,isChecked}){const bulletUnicode=\"•\";const checkUnicode=\"✓\";const listStyles={alignItems:\"start\",display:\"flex\",gap:\"10px\",marginBottom:\"10px\",width:\"100%\"};const iconStyles={textAlign:\"center\",minWidth:\"20px\"};return /*#__PURE__*/_jsxs(\"li\",{style:listStyles,children:[/*#__PURE__*/_jsx(\"span\",{style:iconStyles,children:isChecked?checkUnicode:bulletUnicode}),/*#__PURE__*/_jsx(\"span\",{children:text})]});}ListItem.displayName=\"List Item\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ListItem\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./List_Item.map","import{jsx as _jsx}from\"react/jsx-runtime\";import ListItem from\"https://framerusercontent.com/modules/bmCFSKUhALa4QmIOqr6i/BpmPTjkfVB4lOyz9EiXT/List_Item.js\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n *\n * @framerDisableUnlink\n */export default function ToDoList({items}){const listStyles={listStyle:\"none\",marginTop:0,paddingLeft:\"16px\",width:\"100%\"};return /*#__PURE__*/_jsx(\"ul\",{style:listStyles,children:items===null||items===void 0?void 0:items.map((item,index)=>/*#__PURE__*/_jsx(ListItem,{text:item.text,isChecked:item.isChecked},index))});}ToDoList.displayName=\"To Do List\";\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ToDoList\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./To_Do_List.map","/*\n * To_Do_List\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/nls243VrfVJRb2K9we5T/bIwdZocajZouuNz8bgX1/To_Do_List.js\"\nexport { default } from \"https://framerusercontent.com/modules/nls243VrfVJRb2K9we5T/bIwdZocajZouuNz8bgX1/To_Do_List.js\"\n","import{jsx as _jsx}from\"react/jsx-runtime\";import HelperFrame from\"https://framer.com/m/Main-Frame-iHC5.js\";import Header from\"https://framer.com/m/Header-Nmng.js\";import Message from\"https://framer.com/m/Message-9f6V.js\";import ToDoList from\"https://framer.com/m/To-Do-List-rlLo.js\";// default needed to have it appear in Assest to copy Import URL\nexport default function Index(){return /*#__PURE__*/_jsx(\"div\",{});}export{Header,HelperFrame,Message,ToDoList};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Index\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"Message\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Header\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ToDoList\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HelperFrame\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Helpers.map","/*\n * Helpers\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/9uKQIQp6F4gR5rw7OCHi/Jxw8eNxT3geRyTaspASR/Helpers.js\"\nexport { default } from \"https://framerusercontent.com/modules/9uKQIQp6F4gR5rw7OCHi/Jxw8eNxT3geRyTaspASR/Helpers.js\"\n","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsOnFramerCanvas}from\"framer\";import{cloneElement}from\"react\";import{Header,HelperFrame,ToDoList}from\"https://framer.com/m/Index-nylz.js\";import{useFramerCollectionList}from\"https://framerusercontent.com/modules/uaC9hWf3ec7HqMv3sXMc/fThGQnEUZeWwDLSQMzea/Hooks.js\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n *\n * @framerIntrinsicWidth 500\n *\n * @framerDisableUnlink\n */export default function Collection_Plus(props){const cmsPlusComponentName=\"CMS+ Collection+\";const isOnFramerCanvas=useIsOnFramerCanvas();const isDebuggingCMSPlus=!!props._cmsPlusDebugging;const linkedCollectionListFrame=props._collectionListInstance?.[0];const linkedNoSearchResultsFrame=props._noSearchResultsInstance?.[0];// any missing linked frames will show helper frame\nconst missingFrames=!linkedCollectionListFrame||!linkedNoSearchResultsFrame;const{key,noSearchResults}=useFramerCollectionList({collectionPlusID:props.collectionID,framerCollectionList:linkedCollectionListFrame,isDebugging:isDebuggingCMSPlus});/**\n     * The collection list may undergo multiple updates during initial render and filter changes.\n     * To optimize performance and prevent unnecessary re-renders, a key is used to track the list's state:\n     * key = 0: The list is still being initialized or updated due to filter changes.\n     * key > 0: The list is stable and has finished updating.\n     */const isUpdating=isOnFramerCanvas?false:key===0;// show the list when not loading, no missing frames, and doesn't have any errors\nconst showCollectionList=!isUpdating&&!missingFrames&&!noSearchResults;const showNoResultsFrame=isOnFramerCanvas?false:!missingFrames&&noSearchResults;if(isDebuggingCMSPlus){console.log(\"🔑:\",key);console.log(\"\");}return /*#__PURE__*/_jsxs(_Fragment,{children:[missingFrames&&/*#__PURE__*/_jsxs(HelperFrame,{productName:cmsPlusComponentName,children:[/*#__PURE__*/_jsx(Header,{text:\"Connect Frames\"}),/*#__PURE__*/_jsx(ToDoList,{items:[{text:\"Connect to a Collection List.\",isChecked:!!linkedCollectionListFrame},{text:\"Connect a custom frame to display when there's no search results.\",isChecked:!!linkedNoSearchResultsFrame}]})]}),showCollectionList&&/*#__PURE__*/cloneElement(linkedCollectionListFrame,{key,id:\"cmsPlus\",style:{...linkedCollectionListFrame.props?.style,...props?.style}}),showNoResultsFrame&&/*#__PURE__*/cloneElement(linkedNoSearchResultsFrame,{style:{...linkedNoSearchResultsFrame.props?.style,...props?.style}})]});}// set the name that will be displayed in Assets menu\nCollection_Plus.displayName=\"Collection+\";// property controls for Collection_Plus\naddPropertyControls(Collection_Plus,{collectionID:{type:ControlType.Number,title:\"ID\",defaultValue:0,min:0,displayStepper:true,step:1,description:`Explore its [documentation](https://framercms.plus/documentation/component-collection-plus).`},_collectionListInstance:{type:ControlType.ComponentInstance,title:\"Collection List\",description:`Getting started [video](https://framercms.plus/documentation#quick-start) guide.`},_noSearchResultsInstance:{type:ControlType.ComponentInstance,title:\"No Search Results\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Collection_Plus\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerIntrinsicWidth\":\"500\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"A,gPAK8C,SAAwBwB,EAAa,CAACC,eAAa,CAAiE,MAAoBzB,gBAAK,MAAM,CAAC,MAAM,CAAxF,SAAS,OAAO,SAAS,WAAW,IAAI,EAAE,KAAK,CAA8C,EAAE,SAASyB,GAAa,aAAa,CAAC,CAAE,C,kCAACD,EAAa,YAAY,c,OCAjO,SAAwBG,EAAO,CAACC,OAAKC,QAAM,QAAQ,CACjG,MAAoB5B,gBAAK,MAAM,CAAC,MAAM,CAD0E,WAAW,OAAO,UAAU4B,EAAM,MAAM,MAC7G,EAAE,SAASD,GAAM,QAAQ,CAAC,CAAE,C,wCCEpE,SAAwBG,EAAY,CAACC,WAASP,cAAYI,QAAM,SAASI,QAAM,KAAKC,UAAQ,UAAU,CAAuD,IAAMC,EAAI,CAAlD,QAAQ,CAAC,GAAG,IAAI,GAAG,EAAE,MAAM,CAAC,IAAI,GAAG,EAAE,CAAkB,EAAEF,EAAM,QAAQ,UAAU,CAAC,KAAK,GAAG,EAAQG,EAAe,CAAC,MAAM,CAAC,WAAWP,EAAM,WAAW,QAAQM,EAAI,SAAS,OAAO,iBAAiBA,EAAI,GAAG,MAAM,OAAOA,EAAI,GAAG,QAAQ,OAAO,cAAc,SAAS,SAAS,OAAO,IAAI,OAAO,OAAO,cAAc,eAAeD,EAAQ,QAAQ,mBAAmB,SAAS,WAAW,MAAM,MAAM,C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