PageSourceSearch

https://consult.emra.ie/sites/all/modules/civiq/modules/ca_front_c…/dist/capp-components.chunk-CwCG8-O4.min.js

js emra.ie collected 2026-10-02 05:38:10 UTC 5,219 bytes, 1 lines download raw bytes

1import{r as d,c as w,w as F}from"./capp-components.chunk-SHrV5FuQ.min.js";import{C as M,S as p,p as k,i as R}from"./capp-components.chunk-Bd3Pm82V.min.js";import{n as h}from"./capp-components.chunk-Dh-dUdSv.min.js";import{C as $}from"./capp-components.chunk-NYZDX0R8.min.js";import"./capp-components.min.js";import"./capp-components.chunk-dnjaMI2N.min.js";const B={__name:"SelectionMultiple",props:{option:Object,selected:Boolean},emits:["remove"],setup(u,{emit:t}){const n=u,e=Drupal.t;function r(o){o?.preventDefault(),o?.stopImmediatePropagation()}return{__sfc:!0,emit:t,props:n,$t:e,onSelectionMouseDown:r}}};var K=function(){var t=this,n=t._self._c,e=t._self._setupProxy;return n("div",{staticClass:"ca-select__selection ca-select__selection--multiple v-chip v-chip--removable theme--light",class:{"ca-select__selection--focus":t.selected},attrs:{"aria-selected":t.selected?"true":"false"},on:{mousedown:e.onSelectionMouseDown}},[n("div",{staticClass:"v-chip__content",domProps:{innerHTML:t._s(t.option.label)}}),n("button",{staticClass:"v-chip__close",attrs:{type:"button",tabindex:"-1"}},[n("span",{staticClass:"v-icon material-icons",attrs:{"aria-hidden":"true",title:e.$t("Remove"),"data-recite-skip":"true"},on:{click:function(r){return t.$emit("remove")}}},[t._v("cancel")])])])},E=[],L=h(B,K,E);const P=L.exports,a={...M,FocusInput:"combo:focusInput",Filter:"combo:filter",Left:"combo:left",Right:"combo:right",Delete:"combo:delete"};class T extends ${getActionsFromKey(t,n){const e=super.getActionsFromKey(t,n);if(e)return e;const{key:r}=t,o=t.target;if(o&&o.role==="combobox"){if(!o.value){if((r==="Backspace"||r==="Delete")&&o.selectionStart===0)return[a.Delete];if(!n){if(r==="ArrowLeft")return[a.Left];if(r==="ArrowRight")return[a.Right]}}if(this.eventIsTyping(t))return n?[a.Filter]:[p.Open,a.Filter]}}eventIsTyping(t){const{key:n,altKey:e,ctrlKey:r,metaKey:o}=t;return n==="Backspace"||n==="Clear"||n==="Delete"||n.length===1&&!e&&!r&&!o}}const O={__name:"ComboMultiple",props:{baseId:String,activeDescendant:String,expanded:Boolean,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},selected:{type:Array,default:[],required:!0},placeholder:String,ariaAttributes:Object},emits:["action","filter","update:selectedIndexes"],setup(u,{expose:t,emit:n}){const e=u,r=d(null),o=d(null),i=d(""),s=d(null),_=e.baseId+"__combo__chip-list",y=w(()=>{const l={...e.ariaAttributes,expanded:e.expanded?"true":"false",activedescendant:e.activeDescendant,autocomplete:"list"};return l.describedby=_+(l.describedby?" "+l.describedby:""),k(l)});function x(l){n("action",l)}function I(l){i.value=l.target.value,e.expanded||n("action",null,[p.Open]),n("filter",i.value)}function C(l){const c=l.relatedTarget?l.relatedTarget.closest(".ca-select"):null;if(s.value=null,i.value="",n("filter",i.value),c&&c.querySelector(".ca-select__combo")===r.value)return l.preventDefault(),o.value.focus(),!1;e.expanded&&n("action",null,[p.CloseNoFocus])}function A(l){n("action",null,e.expanded?[p.CloseNoFocus]:[p.Open])}function v(l){const c=e.selected.map(D=>D.index),S=c.indexOf(e.selected[l].index);c.splice(S,1),n("update:selectedIndexes",c),s.value=null}F(()=>e.selected,()=>{n("filter",i.value="")});function m(){return[new T]}function b(l,c){return g(l,c)}t({getActionMappers:m,trigger:b});function g(l,c){if(typeof f[l]=="function")return f[l](c)}const f={[a.Focus]:l=>{l?.preventDefault(),o.value.focus()},[a.ScrollIntoView]:l=>{R(r.value)||r.value.scrollIntoView({behavior:"smooth",block:"center"})},[a.FocusInput]:l=>{o.value.focus()},[a.Filter]:l=>!1,[a.Left]:l=>{if(!e.selected.length){s.value=null;return}if(s.value===null){s.value=e.selected.length-1;return}s.value=Math.max(s.value-1,0)},[a.Right]:l=>{if(!e.selected.length||s.value===e.selected.length-1){s.value=null;return}s.value!==null&&s.value++},[a.Delete]:l=>{if(!e.selected.length)return;const c=s.value===null?e.selected.length-1:s.value;v(c)}};return{__sfc:!0,props:e,emit:n,comboEl:r,inputEl:o,filterString:i,activeSelected:s,listWrapperId:_,ariaAttrs:y,onKeyDown:x,onInputFilter:I,onInputBlur:C,onInputClick:A,onSelectionRemove:v,getActionMappers:m,trigger:b,doAction:g,ActionHandlers:f,SelectionMultiple:P}}};var z=function(){var t=this,n=t._self._c,e=t._self._setupProxy;return n("div",{ref:"comboEl",staticClass:"ca-select__combo ca-select__combo--multiple",attrs:{id:t.baseId+"__combo"},on:{keydown:e.onKeyDown}},[n("div",{staticClass:"ca-select__combo__chip-list",attrs:{id:e.listWrapperId,role:"listbox","aria-labelledby":e.ariaAttrs["aria-labelledby"]}}
1,[t._l(t.selected,function(r,o){return n(e.SelectionMultiple,{attrs:{option:r,role:"option",selected:e.activeSelected===o,"aria-setsize":t.selected.length,"aria-posinset":o+1,tabindex:"-1"},on:{remove:function(i){return e.onSelectionRemove(o)}}})}),n("input",t._b({ref:"inputEl",staticClass:"ca-select__combo__input",attrs:{id:t.baseId+"__combo__input",role:"combobox",type:"text",size:"1",placeholder:t.selected.length?null:t.placeholder,tabindex:t.disabled?"-1":"0",autocomplete:"off"},domProps:{value:e.filterString},on:{input:e.onInputFilter,click:e.onInputClick,blur:e.onInputBlur}},"input",e.ariaAttrs,!1))],2)])},V=[],W=h(O,z,V);const Q=W.exports;export{Q as default};

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.