mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
4.2 KiB
JavaScript
Executable File
2 lines
4.2 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1408],{23593:(e,n,r)=>{r.d(n,{g:()=>I});r(40065),r(43379),r(34192),r(4865);var t=r(30758),o=r(3074),i=r.n(o),c=r(61616),a=r(53731),l=r(13534),s=r(93493),u=r(69400),d=r(80021),f=r(52542),v=r(13734),b=(r(7651),r(30456),r(26701),r(25550),r(37417),r(11737),r(51691),r(702),r(5672),r(88856),r(51565),r(15342),r(18316),r(64539)),p=r(76348),h=r(85673),y=r(33233),m=r(67963),w=r(93195),O=r(92107),j=r(31019),g=r(77809),S=r(86070),x=function(e){var n=e.onSelect,r=(0,j.a)(),t=r.viewMode,o=r.setViewMode;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(y.y,{children:O.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),g.i.map((function(e,r){var i=e.value,c=e.icon,a=e.text;return(0,S.jsx)(m.D,{role:"menuitemradio","aria-checked":t===i,divider:r===g.i.length-1?"after":void 0,autoClose:!1,leadingIcon:c(),onClick:function(){o(i),null==n||n(i)},children:a()},i)}))]})},k=["heading","selected","onSelect","options","enableViewModeMenu","onSelectViewMode","sortOrder"];function C(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function M(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?C(Object(r),!0).forEach((function(n){(0,f.A)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var D=function(e){var n,r=e.heading,t=e.selected,o=e.onSelect,i=e.options,c=e.enableViewModeMenu,a=void 0!==c&&c,l=e.onSelectViewMode,s=e.sortOrder,u=(0,v.A)(e,k);s&&(s===w.H.ASC||s===w.H.SECONDARY_ASC?n=b.U:s!==w.H.DESC&&s!==w.H.SECONDARY_DESC||(n=p.R));return(0,S.jsxs)(h.W,M(M({getInitialFocusElement:function(e){return null==e?void 0:e.querySelector('[aria-checked="true"]')}},u),{},{children:[r?(0,S.jsx)(y.y,{children:r}):null,i.map((function(e,r){var i=e.key,c=e.value;return(0,S.jsx)(m.D,{role:"menuitemradio","aria-checked":i===t.key,CheckedIcon:n,onClick:function(){return o(i,r)},children:c},i)})),a&&(0,S.jsx)(x,{onSelect:l})]}))},E=r(44002),N=r(12574),A=r(79916);const P="x-sortBox-sortDropdown",V="cvTLPmjt6T7M85EKcB8w",F="SbDHY3fVADNJ4l9qOLQ2";var H=function(e){var n=e.isOpen,r=e.className;return n?(0,S.jsx)(c.J,{size:"small","aria-hidden":"true",className:r}):(0,S.jsx)(a.y,{size:"small","aria-hidden":"true",className:r})},I=function(e){var n=e.heading,r=e.options,o=e.selected,c=e.onSelect,a=e.sortOrder,f=e.variant,v=void 0===f?"bodySmall":f,b=e.semanticColor,p=e.disabled,h=e.onClick,y=e.ariaLabel,m=e.enableViewModeMenu,w=void 0!==m&&m,O=(0,s.NC)(A.mA)&&w,j=(0,E.a)().viewMode;o||(o=null==r?void 0:r[0]);var x=g.i.find((function(e){return e.value===j}))||g.i[0],k=(0,t.useMemo)((function(){return"sortboxlist-".concat(i().create().hex)}),[]),C=(0,N.r)(u.d,{}),M=C.spec,I=C.logger;return(0,S.jsx)(d.b,{menu:(0,S.jsx)(D,{selected:o,options:r,onSelect:function(e,n){c(e,n);var r=M.sortBySectionFactory().sortOptionFactory({identifier:e}).hitSort();I.logInteraction(r)},sortOrder:a,heading:n,enableViewModeMenu:O,onSelectViewMode:function(e){var n=M.viewAsSectionFactory().viewOptionFactory({identifier:e}).hitUiElementToggle();I.logInteraction(n)},id:k}),children:function(e,n,r){var t;return(0,S.jsxs)("button",{className:P,onClick:function(e){p||(null==h||h(e),n(e))},ref:r,type:"button","aria-label":y,role:"combobox","aria-controls":k,"aria-expanded":e,children:[(0,S.jsx)(l.E,{"data-sortbox-label":!0,semanticColor:b,variant:v,className:V,children:(null===(t=o)||void 0===t?void 0:t.value)||(O?x.text():"")}),O?x.icon():(0,S.jsx)(H,{isOpen:e,className:F})]})}})}},14546:(e,n,r)=>{r.d(n,{f:()=>a,z:()=>c});var t=r(30758),o=r(23100),i=r(19424);function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.l0o,r=(0,i.as)();return(0,t.useEffect)((function(){return e&&r((0,i.Mo)(e)),function(){r((0,i.Hf)())}}),[e,r]),e||n}var a=function(e){return c(e.color,e.fallbackColor),null}}}]);
|
|
//# sourceMappingURL=xpui-routes-artist.js.map
|