UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

3 lines (2 loc) 969 B
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */ import{a,b as s,c}from"./4F6GEJME.js";import{c as r}from"./ZQBZ5QPB.js";function b(e){let o=e.parentElement?.closest(c),t=o?.parentElement?.closest(c);return[o,t].filter(n=>!!n)}function d(e){return e.ancestors?.filter(o=>o.nodeName==="CALCITE-COMBOBOX-ITEM")||[]}function p(e){return r(e.querySelectorAll("calcite-combobox-item"))}function g(e){return r(e.querySelectorAll("calcite-combobox-item")).filter(t=>t.selected).length>0}function h(e){if(!1)return 0;let o=document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",e,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),t=o.snapshotLength;if(t>0&&e.nodeName===a){for(let n=0;n<t;n++)if(o.snapshotItem(n).nodeName===s)return t}else if(e.nodeName===s)return t;return t+1}function A(e){return e.includes("single")}function C(e){return e.shortHeading||e.heading}export{b as a,d as b,p as c,g as d,h as e,A as f,C as g};