PageSourceSearch

https://igtc.com/js/chunks/ActionMenuItem.vue_vue_type_script_setup_true_lang-Bl0R67Qp.mjs

js igtc.com collected 2026-10-08 06:13:01 UTC 3,739 bytes, 1 lines download raw bytes

1var D=Object.defineProperty;var g=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var w=(t,e,n)=>e in t?D(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))j.call(e,n)&&w(t,n,e[n]);if(g)for(var n of g(e))M.call(e,n)&&w(t,n,e[n]);return t};import{ak as A,i as P,al as V,s as E,ag as b,am as F,an as C,ah as o,ai as u,ao as r,ap as q,aq as d,ar as h,as as G,at as k,au as R,av as $,c,b as m}from"./PortalTarget.vue_vue_type_script_setup_true_lang-eIoBUe_o.mjs";const J={key:3,class:"oc-files-context-action-label oc-flex","data-testid":"action-label"},K=["textContent"],Q=["textContent"],U=["textContent"],Y=A({__name:"ActionMenuItem",props:{action:{},actionOptions:{},size:{default:"medium"},appearance:{default:"raw"},variation:{default:"passive"},shortcutHint:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!1},hasLimitedScreenSpace:{type:Boolean,default:!1}},setup(t){const{$gettext:e}=P(),n=V(),{options:T}=E(n),s=c(()=>Object.hasOwn(t.action,"route")?"router-link":Object.hasOwn(t.action,"href")?"a":(Object.hasOwn(t.action,"handler")||console.warn("ActionMenuItem: No handler, route or href callback found in action",t.action),"button")),z=c(()=>f.value.disabled&&t.action.disabledTooltip?t.action.disabledTooltip(t.actionOptions):t.hasLimitedScreenSpace?t.action.label(t.actionOptions):""),f=c(()=>{const l=i(i({appearance:t.action.appearance||t.appearance,variation:t.action.variation||t.variation},t.action.isDisabled&&{disabled:t.action.isDisabled(t.actionOptions)}),t.action.id&&{id:t.action.id});return i(i(i(i({},l),m(s)==="router-link"&&{to:t.action.route(t.actionOptions)}),m(s)==="a"&&{href:t.action.href(t.actionOptions)}),["router-link","a"].includes(m(s))&&{target:T.value.cernFeatures?"_blank":"_self"})}),B=c(()=>window.navigator.userAgent.includes("Mac")),S=c(()=>e("Hold %{key} and click to open in new tab",{key:m(B)?"⌘":e("ctrl")},!0)),H=c(()=>t.action.icon&&/^https?:\/\//i.test(t.action.icon)),I=c(()=>{if(typeof t.action.handler!="function")return{};const l=()=>t.action.handler(i({},t.actionOptions));return t.action.keepOpen?{click:a=>{a.stopPropagation(),l()}}:{click:l}});return(l,a)=>{var x,O;const v=b("oc-img"),L=b("oc-icon"),N=b("oc-button"),y=F("oc-tooltip");return C((o(),u("li",null,[C((o(),r(N,R({type:s.value},f.value,{class:[t.action.class,"action-menu-item","oc-py-s","oc-px-m","oc-width-1-1"],"aria-label":z.value,"data-testid":"action-handler",size:t.size,"justify-content":"left",title:t.action.label(t.actionOptions)},$(I.value)),{default:q(()=>[t.action.img?(o(),r(v,{key:0,"data-testid":"action-img",src:t.action.img,alt:"",class:"oc-icon oc-icon-m"},null,8,["src"])):H.value?(o(),r(v,{key:1,"data-testid":"action-img",src:t.action.icon,alt:"",class:"oc-icon oc-icon-m"},null,8,["src"])):t.action.icon?(o(),r(L,{key:2,"data-testid":"action-icon",name:t.action.icon,"fill-type":t.action.iconFillType||"line",size:t.size},null,8,["name","fill-type","size"])):d("",!0),a[1]||(a[1]=h()),t.action.hideLabel?d("",!0):(o(),u("span",J,[G("span",{textContent:k(t.action.label(t.actionOptions))},null,8,K),a[0]||(a[0]=h()),t.action.showOpenInNewTabHint?(o(),u("span",{key:0,class:"oc-text-muted oc-text-xsmall",textContent:k(S.value)},null,8,Q)):d("",!0)])),a[2]||(a[2]=h()),t.action.shortcut&&t.shortcutHint?(o(),u("span",{key:4,class:"oc-files-context-action-shortcut",textContent:k(t.action.shortcut)},null,8,U)):d("",!0)]),_:1},16,["type","class","aria-label","size","title"])),[[y,t.showTooltip||t.action.hideLabel?t.action.label(t.actionOptions):""]])])),[[y,f.value.disabled?(O=(x=t.action).disabledTooltip)==null?void 0:O.call(x,t.actionOptions):""]])}}});
1export{Y as _};

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.