forked from duneanalytics/DuneQueryRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path819-63229f28272a812f.js.download
2 lines (2 loc) · 14.4 KB
/
819-63229f28272a812f.js.download
1
2
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[819],{3602:function(e,n,r){"use strict";r.d(n,{J:function(){return p}});var o=r(85893),t=r(67294),i=r(61451),l=r(31544),a=r.n(l),s=r(50642),c=r(10398),d=r(57903),u=r(85871),h=r(57831),v=r(89912),C=r(84937);function p(e){var n,r;let{onDismiss:l,refetchFolders:p,owner:j}=e,{session:k}=(0,t.useContext)(h.B3),[f,x]=(0,t.useState)({name:"",description:""}),{name:L,description:g}=f,[m,b]=(0,t.useState)("var(--feedback--accent--success)"),[w,y]=(0,t.useState)("folder"),[M,_]=(0,C.we1)({context:{session:k},variables:{folder:{name:L,icon:w,color:null!==(r=null===(n=v.yN.find(e=>e.value===m))||void 0===n?void 0:n.label)&&void 0!==r?r:"green",description:g,teamId:"team"===j.type?j.id:void 0}}});return(0,o.jsxs)("div",{className:a().body,children:[(0,o.jsxs)("div",{className:a().header,children:[(0,o.jsx)("div",{className:a().titleRow,children:(0,o.jsx)("h2",{children:"Create folder"})}),(0,o.jsx)("p",{className:a().description,children:"Folder names are only visible to you and your team. Creating folders to organize your content can save you time, keep you focused, and facilitate collaboration."})]}),(0,o.jsxs)(s.l,{size:"M",children:[(0,o.jsx)(c.U,{size:"M",style:"contained",value:L,onChange:e=>x(n=>({...n,name:e.target.value})),label:"Folder name",placeholder:"Folder name..."}),(0,o.jsx)(c.U,{size:"M",style:"contained",value:g,onChange:e=>x(n=>({...n,description:e.target.value})),label:"Description (optional)",placeholder:"Folder description...",hint:"".concat(g.length,"/64 characters"),maxLength:64}),(0,o.jsx)(u.n,{selectedColor:m,setSelectedColor:b,selectedIcon:w,setSelectedIcon:y})]}),(0,o.jsxs)("div",{className:a().buttons,children:[(0,o.jsx)(i.z,{size:"M",theme:"tertiary",onClick:l,children:"Cancel"}),(0,o.jsx)(i.z,{size:"M",theme:"primary",onClick:()=>{M().then(e=>{var n;x({name:"",description:""}),(null===(n=e.data)||void 0===n?void 0:n.createFolder.id)!==void 0&&(0,d.Bh)({level:"success",title:"New folder created"}),p(),l()}).catch(e=>{x({name:"",description:""}),(0,d.Bh)({level:"error",title:e.message}),l()})},disabled:!L||_.loading,children:"Create folder"})]})]})}},85871:function(e,n,r){"use strict";r.d(n,{n:function(){return C}});var o=r(85893),t=r(67294),i=r(18546),l=r.n(i),a=r(32613),s=r(61451),c=r(78528),d=r(95965),u=r(60290),h=r(89912),v=r(45186);function C(e){var n,r;let{selectedColor:i,setSelectedColor:C,selectedIcon:p,setSelectedIcon:j}=e,[k,f]=(0,t.useState)(!1);return(0,o.jsxs)("div",{className:l().selectTheme,children:[(0,o.jsx)("label",{children:"Theme"}),(0,o.jsx)(v.r,{isOpen:k,setIsOpen:f,content:()=>(0,o.jsxs)(a.s_,{children:[(0,o.jsx)(a.$0,{children:(0,o.jsx)(u.y,{name:"icon",value:p,onChange:j,children:h.eE.filter(e=>"archive"!==e.value).map(e=>(0,o.jsx)(u._,{value:e.value,children:(0,o.jsx)("div",{className:l().iconOption,style:{color:"".concat(i)},children:e.label})},e.value))})}),(0,o.jsx)(a.$0,{children:(0,o.jsx)(u.y,{name:"color",value:i,onChange:C,children:h.yN.map(e=>(0,o.jsx)(u._,{value:e.value,children:(0,o.jsx)("div",{className:l().color,style:{backgroundColor:"".concat(e.value)}})},e.value))})})]}),position:"below-align-left",children:(0,o.jsx)(s.z,{theme:"tertiary",size:"M",type:"button",children:(0,o.jsxs)("div",{className:l().selected,children:[(0,o.jsxs)("div",{className:l().iconAndColor,style:{color:"".concat(i)},children:[(0,o.jsx)("div",{className:l().selectedIcon,style:{backgroundColor:"".concat(i.replace("var(--feedback--accent--","var(--feedback--canvas--"))},children:null===(n=h.eE.find(e=>e.value===p))||void 0===n?void 0:n.label}),(0,o.jsx)("label",{children:null===(r=h.yN.find(e=>e.value===i))||void 0===r?void 0:r.displayName})]}),k?(0,o.jsx)(d.IconChevronUp,{}):(0,o.jsx)(c.IconChevronDown,{})]})})})]})}},89912:function(e,n,r){"use strict";r.d(n,{Lq:function(){return p},SX:function(){return j},eE:function(){return v},q7:function(){return C},yN:function(){return h}});var o=r(85893),t=r(93254),i=r(97576),l=r(51087),a=r(11083),s=r(17544),c=r(83188),d=r(40484),u=r(72982);let h=[{value:"var(--feedback--accent--success)",displayName:"Green",label:"green"},{value:"var(--feedback--accent--warning)",displayName:"Yellow",label:"yellow"},{value:"var(--feedback--accent--error)",displayName:"Red",label:"red"},{value:"var(--feedback--accent--info)",displayName:"Light Blue",label:"blue-light"},{value:"var(--feedback--accent--neutral)",displayName:"Gray",label:"gray"},{value:"var(--feedback--accent--brand-orange)",displayName:"Orange",label:"orange"},{value:"var(--feedback--accent--brand-blue)",displayName:"Blue",label:"blue"}],v=[{value:"folder",label:(0,o.jsx)(l.IconFolder,{})},{value:"confetti",label:(0,o.jsx)(t.IconConfetti,{})},{value:"factory",label:(0,o.jsx)(i.IconFactory,{})},{value:"buildings",label:(0,o.jsx)(d.IconBuildings,{})},{value:"bird",label:(0,o.jsx)(c.IconBird,{})},{value:"planet",label:(0,o.jsx)(a.IconPlanet,{})},{value:"rocketlaunch",label:(0,o.jsx)(s.IconRocketLaunch,{})},{value:"archive",label:(0,o.jsx)(u.IconArchive,{})}],C=e=>{var n,r;return null!==(r=null===(n=v.find(n=>n.value===e))||void 0===n?void 0:n.label)&&void 0!==r?r:(0,o.jsx)(l.IconFolder,{})},p=e=>{var n,r;return null!==(r=null===(n=h.find(n=>n.label===e))||void 0===n?void 0:n.value)&&void 0!==r?r:"var(--feedback--accent--neutral)"};function j(e){switch(e){case"green":return"success";case"red":return"error";case"yellow":return"warning";case"blue-light":return"info";case"orange":return"brand-orange";case"blue":return"brand-blue";default:return"neutral"}}},75485:function(e,n,r){"use strict";r.d(n,{Q:function(){return a}});var o=r(82729),t=r(39137),i=r(84937);function l(){let e=(0,o._)(["\n query ListFolders($filters: FoldersFiltersInput!, $pagination: LimitOffsetInput!) {\n folders(filters: $filters, pagination: $pagination) {\n folders {\n id\n name\n description\n path\n color\n icon\n contentCount\n }\n }\n }\n"]);return l=function(){return e},e}function a(e){let{owner:n,freetextFilterDebounced:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(null==n?void 0:n.type)==="team"?n.id:void 0;return(0,i.SNm)({skip:!n,context:{session:e},variables:{filters:{name:void 0!==r?{ilike:r}:void 0,teamId:void 0!==o?{equals:o}:void 0},pagination:{offset:0,limit:50}},fetchPolicy:"cache-first"})}(0,t.Z)(l())},72982:function(e,n,r){"use strict";r.r(n),r.d(n,{IconArchive:function(){return t}});var o=r(85893);let t=()=>(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M13 2.5H3C2.72386 2.5 2.5 2.72386 2.5 3V13C2.5 13.2761 2.72386 13.5 3 13.5H13C13.2761 13.5 13.5 13.2761 13.5 13V3C13.5 2.72386 13.2761 2.5 13 2.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M5.88126 7.38123L8.00001 9.49998L10.1188 7.38123",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M8 4.5V9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M2.5 10H4.79375C4.85868 9.99978 4.92301 10.0124 4.98307 10.037C5.04312 10.0617 5.09773 10.098 5.14375 10.1438L6.35625 11.3563C6.40227 11.402 6.45688 11.4383 6.51693 11.463C6.57699 11.4877 6.64132 11.5002 6.70625 11.5H9.29375C9.35868 11.5002 9.42301 11.4877 9.48307 11.463C9.54312 11.4383 9.59773 11.402 9.64375 11.3563L10.8562 10.1438C10.9023 10.098 10.9569 10.0617 11.0169 10.037C11.077 10.0124 11.1413 9.99978 11.2063 10H13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})},61018:function(e,n,r){"use strict";r.r(n),r.d(n,{IconBellRing:function(){return t}});var o=r(85893);let t=()=>(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M3 12H13",stroke:"currentColor",strokeLinecap:"round"}),(0,o.jsx)("path",{d:"M4 8C4 5.79086 5.79086 4 8 4V4C10.2091 4 12 5.79086 12 8V12H4V8Z",stroke:"currentColor"}),(0,o.jsx)("path",{d:"M6.98122 14.435C7.26281 14.7166 7.6024 14.8574 8 14.8574C8.3976 14.8574 8.73719 14.7166 9.01878 14.435C9.30037 14.1535 9.44116 13.8139 9.44116 13.4163H6.55884C6.55884 13.8139 6.69963 14.1535 6.98122 14.435Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M7 3C7 2.44772 7.44772 2 8 2C8.55228 2 9 2.44772 9 3V4H7V3Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M2.16426 5.15975C2.77213 3.89512 3.75161 2.80199 4.9955 1.99999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M13.9955 5.15981C13.3877 3.89518 12.4082 2.80205 11.1643 2.00005",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})},83188:function(e,n,r){"use strict";r.r(n),r.d(n,{IconBird:function(){return t}});var o=r(85893);function t(){return(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M10.25 4.75C10.5261 4.75 10.75 4.52614 10.75 4.25C10.75 3.97386 10.5261 3.75 10.25 3.75C9.97386 3.75 9.75 3.97386 9.75 4.25C9.75 4.52614 9.97386 4.75 10.25 4.75Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M7.5 8.5L5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M13 6.00005V7.50005C13 9.09135 12.3679 10.6175 11.2426 11.7427C10.1174 12.8679 8.5913 13.5 7 13.5H0.5L6.5 6.00005V4.75005C6.50132 3.96053 6.79 3.19849 7.31211 2.60626C7.83422 2.01403 8.55407 1.63211 9.33719 1.53182C10.1203 1.43154 10.9132 1.61976 11.5677 2.06132C12.2221 2.50288 12.6935 3.16759 12.8938 3.9313L14.5 5.00005L13 6.00005Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},40484:function(e,n,r){"use strict";r.r(n),r.d(n,{IconBuildings:function(){return t}});var o=r(85893);function t(){return(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M1 13.5H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M9 13.5V2.5C9 2.36739 8.94732 2.24021 8.85355 2.14645C8.75979 2.05268 8.63261 2 8.5 2H2.5C2.36739 2 2.24021 2.05268 2.14645 2.14645C2.05268 2.24021 2 2.36739 2 2.5V13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M14 13.5V6.5C14 6.36739 13.9473 6.24021 13.8536 6.14645C13.7598 6.05268 13.6326 6 13.5 6H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M4 4.5H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M5 8.5H7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M4 11H6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M11 11H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M11 8.5H12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},97576:function(e,n,r){"use strict";r.r(n),r.d(n,{IconFactory:function(){return t}});var o=r(85893);function t(){return(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M5 11H6.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M9.25 11H11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M13.5 13.5V8.5H10.5L6.5 5.5V8.5L2.5 5.5V13.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M1 13.5H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M13.5 8.5L12.5625 1.93125C12.5459 1.81195 12.4869 1.70264 12.3962 1.62341C12.3055 1.54419 12.1892 1.50036 12.0688 1.5H10.9312C10.8108 1.50036 10.6945 1.54419 10.6038 1.62341C10.5131 1.70264 10.4541 1.81195 10.4375 1.93125L9.59375 7.825",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},17544:function(e,n,r){"use strict";r.r(n),r.d(n,{IconRocketLaunch:function(){return t}});var o=r(85893);function t(){return(0,o.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M5.88125 11.5375C5.16875 13.6563 2.34375 13.6563 2.34375 13.6563C2.34375 13.6563 2.34375 10.8313 4.4625 10.1188",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M12.2437 6.58749L8 10.8312L5.16875 7.99999L9.4125 3.75624C11.0187 2.14999 12.625 2.16874 13.3125 2.26874C13.4186 2.28289 13.5171 2.33156 13.5927 2.40724C13.6684 2.48292 13.7171 2.5814 13.7312 2.68749C13.8312 3.37499 13.85 4.98124 12.2437 6.58749Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M11.5375 7.29376V11.3313C11.5356 11.4631 11.4817 11.5889 11.3875 11.6813L9.36875 13.7063C9.3047 13.7702 9.22449 13.8156 9.13667 13.8376C9.04885 13.8595 8.95672 13.8572 8.8701 13.8309C8.78349 13.8046 8.70563 13.7553 8.64486 13.6882C8.58408 13.6211 8.54265 13.5388 8.525 13.45L8 10.8313",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M8.70625 4.46252H4.66875C4.53686 4.4644 4.41106 4.51832 4.31875 4.61252L2.29375 6.63127C2.22978 6.69532 2.18439 6.77553 2.16244 6.86335C2.14048 6.95117 2.14278 7.04331 2.16908 7.12992C2.19539 7.21654 2.24472 7.29439 2.3118 7.35517C2.37889 7.41595 2.46121 7.45737 2.55 7.47502L5.16875 8.00002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},60290:function(e,n,r){"use strict";r.d(n,{_:function(){return s},y:function(){return a}});var o=r(85893),t=r(67294),i=r(64569),l=r.n(i);let a=(0,t.forwardRef)((e,n)=>(0,o.jsx)("fieldset",{className:l().group,role:"radiogroup",ref:n,children:e.children.map((n,r)=>t.cloneElement(n,{key:r,name:e.name,group:{onChange:e.onChange,value:e.value}}))})),s=(0,t.forwardRef)((e,n)=>{var r;let{children:i,value:a,...s}=e,c=(0,t.useId)(),d=(null===(r=e.group)||void 0===r?void 0:r.value)===a;return(0,o.jsx)("div",{children:(0,o.jsxs)("div",{className:l().radioButton,children:[(0,o.jsx)("label",{htmlFor:c,children:i}),(0,o.jsx)("input",{id:c,type:"radio",onChange:()=>{var n;return null===(n=e.group)||void 0===n?void 0:n.onChange(a)},defaultChecked:d,ref:n,...s})]})})})},18546:function(e){e.exports={color:"CreateFolder_color__d1jxK",iconOption:"CreateFolder_iconOption__4kcBE",selectTheme:"CreateFolder_selectTheme__Kyi_g",selected:"CreateFolder_selected__ULseM",iconAndColor:"CreateFolder_iconAndColor__THEu0",selectedIcon:"CreateFolder_selectedIcon__7LKDB"}},64569:function(e){e.exports={group:"Swatches_group__vGBHu",radioButton:"Swatches_radioButton__LRVx6"}}}]);
//# sourceMappingURL=819-63229f28272a812f.js.map