PageSourceSearch

https://www.zurich.es/o/fragment-collection-filter-category/__liferay__/index.(NS4O4TCJ).js

js zurich.es collected 2026-10-02 03:39:32 UTC 3,433 bytes, 2 lines download raw bytes

1import{ClayButtonWithIcon as k}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$button.js";import T from"../../frontend-js-clay-web/__liferay__/exports/@clayui$button.js";var g=T;import{Align as j,DropDown as z,ClayDropDownWithItems as _,ClayDropDownWithDrilldown as M}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$drop-down.js";import P from"../../frontend-js-clay-web/__liferay__/exports/@clayui$drop-down.js";import{getCollectionFilterValue as R,setCollectionFilterValue as C}from"../../fragment-renderer-collection-filter-impl/__liferay__/index.js";import{sub as v}from"../../frontend-js-web/__liferay__/index.js";import{array as $,bool as G,func as J,number as K,object as Q,string as X,symbol as Z,any as ee,arrayOf as te,element as re,elementType as oe,instanceOf as ae,node as le,objectOf as ne,oneOf as ie,oneOfType as se,shape as fe,exact as ue,checkPropTypes as ce,resetWarningCache as me,PropTypes as pe}from"../../frontend-js-react-web/__liferay__/exports/prop-types.js";import w from"../../frontend-js-react-web/__liferay__/exports/prop-types.js";var r=w;import{Children as _e,Component as he,Fragment as Ce,Profiler as be,PureComponent as xe,StrictMode as De,Suspense as Se,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as Ee,cloneElement as Le,createContext as Ie,createElement as Te,createFactory as we,createRef as Oe,forwardRef as Re,isValidElement as ve,lazy as Ve,memo as Ae,startTransition as Fe,unstable_act as We,useCallback as ke,useContext as qe,useDebugValue as Pe,useDeferredValue as Be,useEffect as h,useId as Ne,useImperativeHandle as je,useInsertionEffect as ze,useLayoutEffect as Me,useMemo as Ue,useReducer as He,useRef as Ye,useState as l,useSyncExternalStore as $e,useTransition as Ge,version as Je}from"../../frontend-js-react-web/__liferay__/exports/react.js";import O from"../../frontend-js-react-web/__liferay__/exports/react.js";var s=O;await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/fragment-collection-filter-category/all.js`);function V({assetCategories:a,enableDropdown:b,fragmentEntryLinkId:f,showSearch:x,singleSelection:u=!1,targetCollections:m}){let[t,c]=l(()=>{let e=R("category",f);return Array.isArray(e)?e:e?[e]:[]}),[p,D]=l(a),[n,S]=l(""),[E,y]=l(!1);h(()=>{D(n?a.filter(e=>e.label.toLowerCase().indexOf(n.toLowerCase())!==-1):a)},[n,a]);let d=(e,o)=>{e&&u?(C("category",f,[o],m),c([o])):c(e?[...t,o]:t.filter(I=>I!==o))},L=u?[{items:p.map(e=>({title:e.label,type:"radio",value:e.id})),name:"categoryId",onChange:e=>d(!0,e),type:"radiogroup",value:t?.[0]}]:p.map(e=>({checked:t.includes(e.id),onChange:o=>d(o,e.id),title:e.label,type:"checkbox"})),i=Liferay.Language.get("select");return t.length===1?i=a.find(e=>t[0]===e.id)?.label||i:t.length>1&&(i=v(Liferay.Language.get("x-selected"),t.length)),s.createElement(_,{active:E,footerContent:u?null:s.createElement(g,{onClick:()=>{C("category",f,t,m)},size:"sm"},Liferay.Language.get("apply")),items:L,onActiveChange:e=>{y(b?e:!1)},onSearchValueChange:S,searchValue:n,searchable:x,trigger:s.createElement("button",{className:"form-control form-control-select form-control-sm text-left w-100"},i)})}V.propTypes={assetCategories:r.arrayOf(r.shape({id:r.string.isRequired,label:r.string.isRequired}).isRequired),fragmentEntryLinkId:r.string.isRequired,showSearch:r.bool.isRequired,singleSelection:r.bool};export{V as SelectCategory};
2//# sourceMappingURL=index.(NS4O4TCJ).js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.