@esri/calcite-components 5.1.0-next.52 → 5.1.0-next.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/cdn/{J7SMVIGE.js → 22IVUUIH.js} +1 -1
  2. package/dist/cdn/{F4HZEVHH.js → 25WV7Z5X.js} +1 -1
  3. package/dist/cdn/{SNIJFAXF.js → 2MS2SHUJ.js} +1 -1
  4. package/dist/cdn/{WSQ4PXI6.js → 2OZSSX7R.js} +1 -1
  5. package/dist/cdn/{7LPIGOLI.js → 2RUZBL6D.js} +1 -1
  6. package/dist/cdn/{XBQ4JC2O.js → 336X46VI.js} +1 -1
  7. package/dist/cdn/{PVLDZUQW.js → 3ESNHHXQ.js} +1 -1
  8. package/dist/cdn/{ULBKKOQK.js → 3I2GKNM7.js} +1 -1
  9. package/dist/cdn/{HRJGO4SI.js → 3MD3VB4O.js} +1 -1
  10. package/dist/cdn/{ALIXXROM.js → 3MNTWELP.js} +1 -1
  11. package/dist/cdn/{QU433RO3.js → 3OA2OD76.js} +1 -1
  12. package/dist/cdn/{4OMECTGO.js → 3YVTZHM4.js} +1 -1
  13. package/dist/cdn/{3LCUAV2J.js → 47CPJHUS.js} +1 -1
  14. package/dist/cdn/{FJFVUT3R.js → 4MM7JTIK.js} +1 -1
  15. package/dist/cdn/{YGYL4XMJ.js → 4YGLEPX3.js} +1 -1
  16. package/dist/cdn/{AQJ7OEUY.js → 54QTZHAL.js} +1 -1
  17. package/dist/cdn/{O6U273J2.js → 5EO6TPQZ.js} +1 -1
  18. package/dist/cdn/{CLF453MS.js → 5GELSXJ5.js} +1 -1
  19. package/dist/cdn/{57RSFB25.js → 5MDV25QX.js} +1 -1
  20. package/dist/cdn/{DAZN5DI4.js → 6GSSNJP7.js} +1 -1
  21. package/dist/cdn/6RTKXNJX.js +2 -0
  22. package/dist/cdn/{MMV4JRFL.js → 77ZNXURF.js} +1 -1
  23. package/dist/cdn/{KC5YLSJL.js → 7BZSIPHM.js} +1 -1
  24. package/dist/cdn/{57674VTD.js → 7WOP45HP.js} +1 -1
  25. package/dist/cdn/{L2BTO77P.js → A5M47AHN.js} +1 -1
  26. package/dist/cdn/{42WINDGY.js → AA5CAJKL.js} +1 -1
  27. package/dist/cdn/{3CP56APJ.js → AD5B3IYF.js} +1 -1
  28. package/dist/cdn/{LZO5WQFT.js → ANPJDGZL.js} +1 -1
  29. package/dist/cdn/{TZXSLIRP.js → AVXURALG.js} +1 -1
  30. package/dist/cdn/{6EJKMTAK.js → AYFFVQJ2.js} +1 -1
  31. package/dist/cdn/{TD4WAJAP.js → BGAUW6GC.js} +1 -1
  32. package/dist/cdn/{ZU3QDTLN.js → BGC4F6I5.js} +1 -1
  33. package/dist/cdn/{ZWPGE7UW.js → BGNOLT7F.js} +1 -1
  34. package/dist/cdn/{PE3RHM5F.js → BLC2QNVI.js} +1 -1
  35. package/dist/cdn/{4DXIVGBF.js → BSXIMKDV.js} +1 -1
  36. package/dist/cdn/{NL5P6QIL.js → BWAKNJJK.js} +1 -1
  37. package/dist/cdn/{F7YMQYQ7.js → CA2DZBX4.js} +1 -1
  38. package/dist/cdn/{Y7KV5WJH.js → CB26KXXN.js} +1 -1
  39. package/dist/cdn/{ETUQ2WX4.js → CDL6DNIR.js} +1 -1
  40. package/dist/cdn/{KEB3VFAO.js → CN6MSWIR.js} +1 -1
  41. package/dist/cdn/{2OIO35MZ.js → CS7H2XIW.js} +1 -1
  42. package/dist/cdn/{Z6NONZDA.js → D5WOEY7D.js} +1 -1
  43. package/dist/cdn/{OTICUWBZ.js → D6MAQR7D.js} +1 -1
  44. package/dist/cdn/{QFBASS3W.js → DFDS2TTC.js} +1 -1
  45. package/dist/cdn/{2I2RAVTX.js → DOVMM7XM.js} +1 -1
  46. package/dist/cdn/{YJF6FY53.js → DUDTWBTW.js} +1 -1
  47. package/dist/cdn/{ZIWS2E5B.js → E2IMD4S4.js} +1 -1
  48. package/dist/cdn/{HDCTPG3W.js → E5AR3JN7.js} +1 -1
  49. package/dist/cdn/{VPRGNGZX.js → E5E6AWC4.js} +1 -1
  50. package/dist/cdn/{6MCCH36T.js → EJBPLQLQ.js} +1 -1
  51. package/dist/cdn/{AAZ63DDH.js → EU7F52XI.js} +1 -1
  52. package/dist/cdn/{UJX4WIGC.js → FFF2DUBB.js} +1 -1
  53. package/dist/cdn/{5IKT4REZ.js → FJF2FRKC.js} +1 -1
  54. package/dist/cdn/{VE7RW5OY.js → G5EYV6IQ.js} +1 -1
  55. package/dist/cdn/{IGWRKE4T.js → G6Y3JAHG.js} +1 -1
  56. package/dist/cdn/{F4CYA44H.js → GBV3NOSW.js} +1 -1
  57. package/dist/cdn/{YRJCKJRZ.js → GOEAJWAL.js} +1 -1
  58. package/dist/cdn/{WJF6EPCD.js → GSHNHXNU.js} +1 -1
  59. package/dist/cdn/{SS32IDBY.js → GZFHBGOU.js} +1 -1
  60. package/dist/cdn/{7FBHPUO5.js → H4LN7BXD.js} +1 -1
  61. package/dist/cdn/{NF7KYVPE.js → HQEEGEJY.js} +1 -1
  62. package/dist/cdn/{RQLTHDZV.js → I3VZOUJF.js} +1 -1
  63. package/dist/cdn/{RINPUL5L.js → I3XHFKZF.js} +1 -1
  64. package/dist/cdn/{273Z4GGH.js → I45WQTVR.js} +1 -1
  65. package/dist/cdn/I7AJ4VKV.js +2 -0
  66. package/dist/cdn/{7GLQ3BIA.js → INPES2GS.js} +1 -1
  67. package/dist/cdn/{7LDJP6HZ.js → IQ6XZR4C.js} +1 -1
  68. package/dist/cdn/{GXU75OWY.js → IYFU4GLO.js} +1 -1
  69. package/dist/cdn/{DSEQOKDE.js → JA5MUQEU.js} +1 -1
  70. package/dist/cdn/{FFTJXX3S.js → JAJE6DKM.js} +1 -1
  71. package/dist/cdn/JHEMDNRY.js +4 -0
  72. package/dist/cdn/{R4MIPDZD.js → JN72QWKF.js} +1 -1
  73. package/dist/cdn/{VKAQZHF4.js → JO3ACOMA.js} +1 -1
  74. package/dist/cdn/{UI6SYU7R.js → JSRGGY2G.js} +1 -1
  75. package/dist/cdn/{6ZF5OGYU.js → JWYKC4ZC.js} +1 -1
  76. package/dist/cdn/{XCUGUD4Q.js → JZP7NVM6.js} +1 -1
  77. package/dist/cdn/{OUTLU75A.js → K3UYBNAJ.js} +1 -1
  78. package/dist/cdn/{XCI7IP4U.js → KMAMIQYT.js} +1 -1
  79. package/dist/cdn/{SELNEZH2.js → KR4WAL3P.js} +1 -1
  80. package/dist/cdn/{UDGWSLPU.js → KUK5PHRI.js} +1 -1
  81. package/dist/cdn/{OQQJRXFJ.js → L7L67ZQH.js} +1 -1
  82. package/dist/cdn/{JN66UG3X.js → LLTLZFZU.js} +1 -1
  83. package/dist/cdn/{ZNQYJ3F6.js → LPL3KILS.js} +1 -1
  84. package/dist/cdn/{VILMXJDE.js → LZYJQJVL.js} +1 -1
  85. package/dist/cdn/{IYUKVFCK.js → M2ULQF6T.js} +1 -1
  86. package/dist/cdn/{A673JVSA.js → MPEFMLER.js} +1 -1
  87. package/dist/cdn/{CIVFTKSR.js → MSJMNG76.js} +1 -1
  88. package/dist/cdn/{O74CSENQ.js → NATFX6WC.js} +1 -1
  89. package/dist/cdn/{NB557EPM.js → NJKUV7Z2.js} +1 -1
  90. package/dist/cdn/{URUJPX6O.js → NYPCCBF6.js} +1 -1
  91. package/dist/cdn/{VMXPCKPN.js → O4FTHIIQ.js} +1 -1
  92. package/dist/cdn/{7AWWLHJ6.js → O4P4SSIP.js} +1 -1
  93. package/dist/cdn/{NXB3FRVS.js → OD6VMJEA.js} +1 -1
  94. package/dist/cdn/{K5KGLZR3.js → OOBDFQNN.js} +1 -1
  95. package/dist/cdn/{T6UKBG2V.js → OOTJKLDL.js} +1 -1
  96. package/dist/cdn/{BAL4PDWM.js → OOXXCI2W.js} +1 -1
  97. package/dist/cdn/{GW6AQOGM.js → OPS5PJVD.js} +1 -1
  98. package/dist/cdn/{57I6EGGZ.js → P4SQ3YIH.js} +1 -1
  99. package/dist/cdn/{JXCA7WFB.js → P5X5MXYX.js} +1 -1
  100. package/dist/cdn/PCXQSBRG.js +2 -0
  101. package/dist/cdn/{INU5CIUJ.js → PEZKYSLN.js} +1 -1
  102. package/dist/cdn/{XTDXJGII.js → POZ7UA5F.js} +1 -1
  103. package/dist/cdn/{P3NFYL7S.js → PPRMQFS4.js} +1 -1
  104. package/dist/cdn/{WZQMZY5I.js → PSNDZNYB.js} +1 -1
  105. package/dist/cdn/{OLZJ7MYZ.js → QAJOWZJQ.js} +1 -1
  106. package/dist/cdn/{WAFYQ7C3.js → R5XOXABT.js} +1 -1
  107. package/dist/cdn/{44FM6IN7.js → RLTPLCWW.js} +1 -1
  108. package/dist/cdn/{RUXRS4F5.js → RTZTCGZ3.js} +1 -1
  109. package/dist/cdn/{4ARSDOF2.js → RUPE5T2P.js} +1 -1
  110. package/dist/cdn/{THN4PT7B.js → RWKZYNVE.js} +1 -1
  111. package/dist/cdn/{23WUMAS4.js → SB7DCXHS.js} +1 -1
  112. package/dist/cdn/{KKDLOFLH.js → SN3MJ4D4.js} +1 -1
  113. package/dist/cdn/{HOR2KBM5.js → SRTYH5N3.js} +1 -1
  114. package/dist/cdn/{I5TF2Y4L.js → TE4FTZQS.js} +1 -1
  115. package/dist/cdn/{WWVBR3H5.js → TGKCDQI3.js} +1 -1
  116. package/dist/cdn/{3L56MF4R.js → TNNHGXEO.js} +1 -1
  117. package/dist/cdn/{B3O2WK4H.js → TV6ZK6IS.js} +1 -1
  118. package/dist/cdn/{JTFWEILS.js → TW27JCRI.js} +1 -1
  119. package/dist/cdn/{EVSDMBGN.js → UP3MS2RO.js} +1 -1
  120. package/dist/cdn/{ZWMLY4HG.js → UWSWNAJU.js} +1 -1
  121. package/dist/cdn/{PCUJYOPJ.js → VE6BCA4B.js} +1 -1
  122. package/dist/cdn/{5S6OP6HT.js → VHOTO6RW.js} +1 -1
  123. package/dist/cdn/{A3IMFQJ3.js → VMRXO4W7.js} +1 -1
  124. package/dist/cdn/{NGYNBOEA.js → VRMS6UUE.js} +1 -1
  125. package/dist/cdn/{64SYBTWP.js → VRT3DKMJ.js} +1 -1
  126. package/dist/cdn/{GA4ZVTQS.js → VWBZSVHP.js} +1 -1
  127. package/dist/cdn/{G57Q5KHZ.js → VXNY5ZOK.js} +1 -1
  128. package/dist/cdn/{FOCO4B2I.js → WK2ENAZI.js} +1 -1
  129. package/dist/cdn/{FZFYK4YW.js → WPMZGXD3.js} +1 -1
  130. package/dist/cdn/{MNVVLPUD.js → WYYRL7PX.js} +1 -1
  131. package/dist/cdn/{OBFZWREG.js → X4TO3HHT.js} +1 -1
  132. package/dist/cdn/{ZGQKLZNW.js → X4Y72XWZ.js} +1 -1
  133. package/dist/cdn/{76CDECCH.js → X4ZS7TC6.js} +1 -1
  134. package/dist/cdn/{QJQN3MBL.js → XBXBNKHQ.js} +1 -1
  135. package/dist/cdn/{2RES3CEJ.js → XKAFATHA.js} +1 -1
  136. package/dist/cdn/{RN2XNPSP.js → Y3T3ISUJ.js} +1 -1
  137. package/dist/cdn/{XGLRJ7V7.js → YB3QV7IN.js} +1 -1
  138. package/dist/cdn/{V33ZP7DY.js → YOPLVYTC.js} +1 -1
  139. package/dist/cdn/{DWZDD2J2.js → YOZOGEXI.js} +1 -1
  140. package/dist/cdn/{ZMQPZ4SM.js → Z4ZYQ4KZ.js} +1 -1
  141. package/dist/cdn/{DUALO3AB.js → ZHNVZRXF.js} +1 -1
  142. package/dist/cdn/{OOEPPBXM.js → ZQHDDYOV.js} +1 -1
  143. package/dist/cdn/{76MHN7V2.js → ZXY6RQ3L.js} +1 -1
  144. package/dist/cdn/index.js +1 -1
  145. package/dist/chunks/runtime.js +4 -4
  146. package/dist/chunks/useForm.js +1 -1
  147. package/dist/components/calcite-combobox/customElement.js +1 -1
  148. package/dist/components/calcite-dialog/customElement.js +1 -1
  149. package/dist/components/calcite-list/customElement.js +6 -1
  150. package/dist/components/calcite-list-item/customElement.js +3 -0
  151. package/dist/components/calcite-list-item-group/customElement.js +6 -0
  152. package/dist/components/calcite-navigation/customElement.js +15 -1
  153. package/dist/docs/api.json +1 -1
  154. package/dist/docs/docs.json +1 -1
  155. package/dist/docs/web-types.json +1 -1
  156. package/package.json +3 -3
  157. package/dist/cdn/2S7NPLRD.js +0 -2
  158. package/dist/cdn/GGNGZB3P.js +0 -2
  159. package/dist/cdn/JAF6FNAT.js +0 -4
  160. package/dist/cdn/TGUDLWN4.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/calcite-components",
3
- "version": "5.1.0-next.52",
3
+ "version": "5.1.0-next.54",
4
4
  "description": "Web Components for Esri's Calcite Design System.",
5
5
  "homepage": "https://developers.arcgis.com/calcite-design-system/",
6
6
  "repository": {
@@ -81,7 +81,7 @@
81
81
  "color": "^5.0.3",
82
82
  "composed-offset-position": "^0.0.6",
83
83
  "es-toolkit": "^1.39.8",
84
- "focus-trap": "^8.0.1",
84
+ "focus-trap": "^8.2.1",
85
85
  "interactjs": "^1.10.27",
86
86
  "lit": "^3.3.0",
87
87
  "sortablejs": "^1.15.6",
@@ -106,5 +106,5 @@
106
106
  "dist/docs/vscode.html-custom-data.json"
107
107
  ],
108
108
  "web-types": "dist/docs/web-types.json",
109
- "gitHead": "77d0af730125da35a384f75feb79b108cb7b2644"
109
+ "gitHead": "fc917e8187be24b85a4c9e4e5362410713b01d99"
110
110
  }
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as u}from"./ENDXE7YY.js";import{a as y}from"./ZGQKLZNW.js";import"./WGGFNK4Z.js";import"./R4MIPDZD.js";import"./LZO5WQFT.js";import{t as n}from"./JTFWEILS.js";import"./OAOQ5BXS.js";import{E as g,F as m,G as d,H as i,S as v,g as c,h as s,p as h}from"./KC5YLSJL.js";var a={container:"container",containerContent:"container-content",hasProgress:"progress-bar",hide:"hide",primary:"primary",secondary:"secondary",tertiary:"tertiary"},e={logo:"logo",user:"user",progress:"progress",navigationAction:"navigation-action",contentStart:"content-start",contentEnd:"content-end",contentCenter:"content-center",navSecondary:"navigation-secondary",navTertiary:"navigation-tertiary"},p={hamburger:"hamburger"},C=c`:host([hidden]){display:none}[hidden]{display:none}:host{display:block}:host([scale=s]){--calcite-internal-navigation-primary-height: 3rem;--calcite-internal-navigation-secondary-height: 2.25rem;--calcite-internal-navigation-tertiary-height: 2.25rem;--calcite-internal-navigation-navigation-action-margin-inline: 8px}:host([scale=m]){--calcite-internal-navigation-primary-height: 4rem;--calcite-internal-navigation-secondary-height: 3rem;--calcite-internal-navigation-tertiary-height: 3rem;--calcite-internal-navigation-navigation-action-margin-inline: var(--calcite-font-size-sm)}:host([scale=l]){--calcite-internal-navigation-primary-height: 4.75rem;--calcite-internal-navigation-secondary-height: 4rem;--calcite-internal-navigation-tertiary-height: 4rem;--calcite-internal-navigation-navigation-action-margin-inline: var(--calcite-font-size-md)}.container{display:flex;inline-size:100%;flex-direction:column;margin-block:0;margin-inline:auto;background-color:var(--calcite-navigation-background-color, var(--calcite-navigation-background, var(--calcite-color-foreground-1)))}.container.primary,.container.secondary,.container.tertiary{border-block-end:1px solid;border-block-end-color:var(--calcite-navigation-border-color, var(--calcite-color-border-3))}.user,.logo{display:flex}.hide{display:none}.primary{block-size:var(--calcite-internal-navigation-primary-height)}.secondary{block-size:var(--calcite-internal-navigation-secondary-height)}.tertiary{block-size:var(--calcite-internal-navigation-tertiary-height)}.container-content{margin-inline:auto;display:flex;block-size:100%;inline-size:100%;margin-block:0;inline-size:var(--calcite-navigation-width, 100%);max-inline-size:100%}.container-content.progress-bar{margin-block-start:.125rem}slot[name]{display:flex;flex-direction:row}slot[name=navigation-secondary]::slotted(calcite-navigation),slot[name=navigation-tertiary]::slotted(calcite-navigation){inline-size:100%}slot[name=content-start]::slotted(*),slot[name=content-center]::slotted(*),slot[name=content-end]::slotted(*){display:flex;flex-direction:row;align-items:center}slot[name=progress],slot[name=progress] calcite-progress{inset-block-start:0;inset-inline:0}slot[name=content-end]{margin-inline-start:auto}slot[name=content-start]{margin-inline-end:auto}slot[name=content-end],slot[name=logo]~slot[name=user],slot[name=user]:only-child{margin-inline-start:auto}slot[name=content-center]{margin-inline-start:auto;margin-inline-end:auto}slot[name=content-start]~slot[name=content-center]{margin-inline-start:0px}slot[name=content-start]~slot[name=content-end],slot[name=content-center]~slot[name=content-end],slot[name=content-center]~slot[name=user],slot[name=content-end]~slot[name=user]{margin:0}slot[name=navigation-action] calcite-action{align-self:center;margin-inline-start:var(--calcite-internal-navigation-navigation-action-margin-inline)}`,r=class extends d{constructor(){super(...arguments),this.navigationActionRef=g(),this.focusSetter=y()(this),this.mutationObserver=u("mutation",()=>{this.updateNavigationLogo(),this.updateNavigationUser()}),this.navigationAction=!1,this.scale="m",this.calciteNavigationActionSelect=h({cancelable:!1})}static{this.properties={logoSlotHasElements:[16,{},{state:!0}],navigationActionSlotHasElements:[16,{},{state:!0}],primaryContentCenterSlotHasElements:[16,{},{state:!0}],primaryContentEndSlotHasElements:[16,{},{state:!0}],primaryContentStartSlotHasElements:[16,{},{state:!0}],progressSlotHasElement:[16,{},{state:!0}],secondarySlotHasElements:[16,{},{state:!0}],tertiarySlotHasElements:[16,{},{state:!0}],userSlotHasElements:[16,{},{state:!0}],label:1,navigationAction:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}]}}static{this.styles=C}async setFocus(t){return this.focusSetter(()=>this.navigationActionRef.value,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateNavigationLogo(),this.updateNavigationUser()}updated(t){(t.has("scale")||t.has("logoSlotHasElements")||t.has("userSlotHasElements"))&&(this.updateNavigationLogo(),this.updateNavigationUser())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}actionClickHandler(){this.calciteNavigationActionSelect.emit()}handleUserSlotChange(t){this.isPrimaryLevel()&&(this.userSlotHasElements=n(t))}handleLogoSlotChange(t){this.isPrimaryLevel()&&(this.logoSlotHasElements=n(t))}handleContentStartSlotChange(t){this.isPrimaryLevel()&&(this.primaryContentStartSlotHasElements=n(t))}handleContentEndSlotChange(t){this.isPrimaryLevel()&&(this.primaryContentEndSlotHasElements=n(t))}handleContentCenterSlotChange(t){this.isPrimaryLevel()&&(this.primaryContentCenterSlotHasElements=n(t))}handleSecondarySlotChange(t){this.secondarySlotHasElements=n(t)}handleTertiarySlotChange(t){this.tertiarySlotHasElements=n(t)}handleMenuActionSlotChange(t){this.isPrimaryLevel()&&(this.navigationActionSlotHasElements=n(t),this.navigationActionSlotHasElements&&(this.navigationAction=!1))}handleProgressSlotChange(t){this.isPrimaryLevel()&&(this.progressSlotHasElement=n(t))}isPrimaryLevel(){return this.el.slot!==e.navSecondary&&this.el.slot!==e.navTertiary}getOwnedNavigationElements(t,o){let l=this.el.shadowRoot?.querySelector(`slot[name="${t}"]`);return l?l.assignedElements({flatten:!0}).filter(S=>S.matches(o)):[]}updateNavigationLogo(){this.getOwnedNavigationElements(e.logo,"calcite-navigation-logo").forEach(t=>{t.scale=this.scale})}updateNavigationUser(){this.getOwnedNavigationElements(e.user,"calcite-navigation-user").forEach(t=>{t.scale=this.scale})}renderMenuAction(){return s`<slot name=${e.navigationAction} @slotchange=${this.handleMenuActionSlotChange}>${this.navigationAction&&s`<calcite-action .icon=${p.hamburger} @click=${this.actionClickHandler} .text=${this.label} ${m(this.navigationActionRef)}></calcite-action>`||""}</slot>`}render(){let t=this.logoSlotHasElements||this.userSlotHasElements||this.navigationActionSlotHasElements||this.primaryContentCenterSlotHasElements||this.primaryContentEndSlotHasElements||this.primaryContentStartSlotHasElements||this.navigationAction,o=this.el.slot;return s`<div class=${i({[a.container]:!0,[a.secondary]:o===e.navSecondary,[a.tertiary]:o===e.navTertiary,[a.primary]:t})}><div class=${i({[a.hide]:!this.progressSlotHasElement,[e.progress]:!0})}><slot name=${e.progress} @slotchange=${this.handleProgressSlotChange}></slot></div><div class=${i({[a.containerContent]:!0,[a.hasProgress]:this.progressSlotHasElement})}>${this.renderMenuAction()}<div class=${i({[a.hide]:!this.logoSlotHasElements,[e.logo]:!0})}><slot name=${e.logo} @slotchange=${this.handleLogoSlotChange}></slot></div><slot name=${e.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot><slot name=${e.contentCenter} @slotchange=${this.handleContentCenterSlotChange}></slot><slot name=${e.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot><div class=${i({[a.hide]:!this.userSlotHasElements,[e.user]:!0})}><slot name=${e.user} @slotchange=${this.handleUserSlotChange}></slot></div></div></div><slot name=${e.navSecondary} @slotchange=${this.handleSecondarySlotChange}></slot><slot name=${e.navTertiary} @slotchange=${this.handleTertiarySlotChange}></slot>`}};v("calcite-navigation",r);export{r as Navigation};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as E}from"./R4MIPDZD.js";import{k as F}from"./JTFWEILS.js";import{f as C,s as V,t as k}from"./KC5YLSJL.js";var T=["date","datetime-local","month","number","range","time","week"],A=["email","password","search","tel","text","url"],L=["email","password","search","tel","text","textarea","url"];function o(a,e,i,s){let l=i.toLowerCase(),r=a[i];s&&r!=null?e.setAttribute(l,`${r}`):e.removeAttribute(l)}function q(a,e,i){i.type=a;let s=T.includes(a),l=e;o(l,i,"min",s),o(l,i,"max",s),o(l,i,"step",s);let r=L.includes(a),d=e;o(d,i,"minLength",r),o(d,i,"maxLength",r);let f=A.includes(a);o(d,i,"pattern",f)}function w(a){let e=a==="textarea"?"text":a;return T.includes(e)||A.includes(e)||L.includes(e)}var j=["text","email","search","hidden","tel","url"],x=Object.freeze({validity:{},validationMessage:""});function D({component:a,input:e,value:i}){if(!Array.isArray(i)){if(a&&e.type==="radio"){let r=a.elementInternals.form?.elements[a.name];if(r?.length>0){r=Array.from(r).filter(n=>n.tagName===a.el.tagName);let d=r.some(n=>n.required),f=r.some(n=>n.checked),h=r.filter(n=>n!==a.el),g=d&&!f;e.required=!!g;let v=I(e.validity),M=e.validationMessage;h?.length>0&&h.forEach(n=>{g!==n.validity?.valueMissing&&n.setValidity&&n.setValidity(v,M)})}}return b(e,i)?x:{validity:I(e.validity),validationMessage:e.validationMessage}}if(j.includes(e.type))return b(e,i.join(","))?x:{validity:I(e.validity),validationMessage:e.validationMessage};let s={},l=[];for(let r of i)b(e,r)||(Object.assign(s,I(e.validity)),e.validationMessage&&l.push(e.validationMessage));return{validity:s,validationMessage:l.join("; ")}}function b(a,e){return a.value=a.type==="file"||e==null?"":String(e),a.validity.valid}function I(a){let e={};for(let i in a)i!=="valid"&&a[i]&&(e[i]=!0);return e}var S=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function N(a){return`${k(V(a))}${S.includes(a)?"Input":"Change"}`}function R(a){return"form"in a&&"name"in a&&F(a)}function O(a,{status:e,message:i,icon:s}){"status"in a&&(a.status=e),"validationIcon"in a&&typeof a.validationIcon!="string"&&(a.validationIcon=s),"validationMessage"in a&&!a.validationMessage&&(a.validationMessage=i)}function P(a,e){let{disabled:i,name:s,required:l}=a;e.disabled=i,e.name=s,e.required=!!l,y(a)?e.checked=a.checked:U(a,e)&&q(e.type,a,e)}function y(a){return"checked"in a}function U(a,e){return a&&w(e.type)}function $(a){let e=Array.from(a.elements);requestAnimationFrame(()=>{let i=e.filter(s=>s.matches("[status=invalid]")&&R(s));for(let s of i)if(s.validationMessage){s.setFocus();break}})}var B=a=>E((e,i)=>{let s="",l,r=null,d=a.inputType;d&&(l=document.createElement("input"));function f(t){if(t.defaultPrevented)return;t.preventDefault();let u=t.currentTarget;$(u)}function h(){"status"in e&&(e.status="idle"),"validationIcon"in e&&(e.validationIcon=!1),"validationMessage"in e&&(e.validationMessage=""),y(e)&&(e.checked=e.defaultChecked),e.value=e.defaultValue}e.listen("luminaFormResetCallback",()=>{h()}),e.listen("luminaFormAssociatedCallback",({detail:[t]})=>{t?t.addEventListener("invalid",f,{capture:!0}):r?.removeEventListener("invalid",f,{capture:!0}),r=t});function g(){let t=s||l?.validationMessage||"";e.el.dispatchEvent(new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0})),O(e,{message:t,icon:!0,status:"invalid"});let u=N(e.el.tagName.toLowerCase());e.listen(u,()=>{"status"in e&&(e.status="idle"),"validationIcon"in e&&(!e.validationIcon||e.validationIcon===!0)&&(e.validationIcon=!1),"validationMessage"in e&&e.validationMessage===t&&(e.validationMessage="")},{once:!0})}i.onConnected(()=>{e.el.addEventListener("invalid",g)}),i.onDisconnected(()=>{e.el.removeEventListener("invalid",g)}),i.onUpdate(t=>{e.hasUpdated||(e.defaultValue=e.value,y(e)&&(e.defaultChecked=e.checked)),(t.has("name")||t.has("value")||y(e)&&t.has("checked"))&&e.elementInternals.setFormValue(n()),e.hasUpdated&&v()}),i.onLoaded(()=>v());function v(){let{disabled:t,elementInternals:u}=e;if(t)return;let c={},m="";l&&(l.type=d,P(e,l),{validity:c,validationMessage:m}=D({component:e,input:l,value:M()})),s&&(c={...c,customError:!0},m=s),u.setValidity(c,m),"validity"in e&&C(()=>{e.validity=u.validity})}function M(){return a.getValue?a.getValue():e.value}function n(){let t=M();if(Array.isArray(t)){let u=new FormData;return t.forEach(c=>u.append(e.name,c)),u}return y(e)?e.checked?t||"on":null:t}return{get active(){return!!e.elementInternals.form},overrideDefaultValue:t=>{e.defaultValue=t},overrideInputType:t=>{d=t,v()},requestSubmit:()=>{e.elementInternals.form?.requestSubmit()},setCustomValidity:t=>{s=t,v()}}});export{B as a};
@@ -1,4 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as fe}from"./R4MIPDZD.js";import{a as de,l as ve}from"./JTFWEILS.js";import{Q as le}from"./KC5YLSJL.js";var pe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$=pe.join(","),he=typeof Element>"u",G=he?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!he&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r?.ownerDocument},Q=function(e,t){var n;t===void 0&&(t=!0);var u=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),c=u===""||u==="true",a=c||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Q(e.parentNode));return a},Ce=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},ye=function(e,t,n){if(Q(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll($));return t&&G.call(e,$)&&u.unshift(e),u=u.filter(n),u},ee=function(e,t,n){for(var u=[],c=Array.from(e);c.length;){var a=c.shift();if(!Q(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),f=s.length?s:a.children,p=ee(f,!0,n);n.flatten?u.push.apply(u,p):u.push({scopeParent:a,candidates:p})}else{var F=G.call(a,$);F&&n.filter(a)&&(t||!e.includes(a))&&u.push(a);var w=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),R=!Q(w,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(w&&R){var A=ee(w===!0?a.children:w.children,!0,n);n.flatten?u.push.apply(u,A):u.push({scopeParent:a,candidates:A})}else c.unshift.apply(c,a.children)}}return u},me=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},L=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ce(e))&&!me(e)?0:e.tabIndex},je=function(e,t){var n=L(e);return n<0&&t&&!me(e)?0:n},xe=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ge=function(e){return e.tagName==="INPUT"},Le=function(e){return ge(e)&&e.type==="hidden"},Be=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},_e=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Ge=function(e){if(!e.name)return!0;var t=e.form||J(e),n=function(s){return t.querySelectorAll('input[type="radio"][name="'+s+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=n(window.CSS.escape(e.name));else try{u=n(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var c=_e(u,e.form);return!c||c===e},Ke=function(e){return ge(e)&&e.type==="radio"},Me=function(e){return Ke(e)&&!Ge(e)},Ve=function(e){var t,n=e&&J(e),u=(t=n)===null||t===void 0?void 0:t.host,c=!1;if(n&&n!==e){var a,s,f;for(c=!!((a=u)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(u)||e!=null&&(f=e.ownerDocument)!==null&&f!==void 0&&f.contains(e));!c&&u;){var p,F,w;n=J(u),u=(p=n)===null||p===void 0?void 0:p.host,c=!!((F=u)!==null&&F!==void 0&&(w=F.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return c},be=function(e){var t=e.getBoundingClientRect(),n=t.width,u=t.height;return n===0&&u===0},qe=function(e,t){var n=t.displayCheck,u=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var c=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(e).visibility==="hidden")return!0;var a=G.call(e,"details>summary:first-of-type"),s=a?e.parentElement:e;if(G.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof u=="function"){for(var f=e;e;){var p=e.parentElement,F=J(e);if(p&&!p.shadowRoot&&u(p)===!0)return be(e);e.assignedSlot?e=e.assignedSlot:!p&&F!==e.ownerDocument?e=F.host:e=p}e=f}if(Ve(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return be(e);return!1},Ue=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var u=t.children.item(n);if(u.tagName==="LEGEND")return G.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},te=function(e,t){return!(t.disabled||Le(t)||qe(t,e)||Be(t)||Ue(t))},ce=function(e,t){return!(Me(t)||L(t)<0||!te(e,t))},We=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},we=function(e){var t=[],n=[];return e.forEach(function(u,c){var a=!!u.scopeParent,s=a?u.scopeParent:u,f=je(s,a),p=a?we(u.candidates):s;f===0?a?t.push.apply(t,p):t.push(s):n.push({documentOrder:c,tabIndex:f,item:u,isScope:a,content:p})}),n.sort(xe).reduce(function(u,c){return c.isScope?u.push.apply(u,c.content):u.push(c.content),u},[]).concat(t)},Te=function(e,t){t=t||{};var n;return t.getShadowRoot?n=ee([e],t.includeContainer,{filter:ce.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:We}):n=ye(e,t.includeContainer,ce.bind(null,t)),we(n)},Se=function(e,t){t=t||{};var n;return t.getShadowRoot?n=ee([e],t.includeContainer,{filter:te.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=ye(e,t.includeContainer,te.bind(null,t)),n},K=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return G.call(e,$)===!1?!1:ce(t,e)},Ye=pe.concat("iframe:not([inert]):not([inert] *)").join(","),re=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return G.call(e,Ye)===!1?!1:te(t,e)};function se(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function He(r){if(Array.isArray(r))return se(r)}function Fe(r,e,t,n,u,c,a){try{var s=r[c](a),f=s.value}catch(p){return void t(p)}s.done?e(f):Promise.resolve(f).then(n,u)}function Ne(r){return function(){var e=this,t=arguments;return new Promise(function(n,u){var c=r.apply(e,t);function a(f){Fe(c,n,u,a,s,"next",f)}function s(f){Fe(c,n,u,a,s,"throw",f)}a(void 0)})}}function Ee(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Oe(r))||e){t&&(r=t);var n=0,u=function(){};return{s:u,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(f){throw f},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,a=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var f=t.next();return a=f.done,f},e:function(f){s=!0,c=f},f:function(){try{a||t.return==null||t.return()}finally{if(s)throw c}}}}function Ze(r,e,t){return(e=Qe(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ze(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Xe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ke(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),t.push.apply(t,n)}return t}function Ae(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ke(Object(t),!0).forEach(function(n){Ze(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function U(){var r,e,t=typeof Symbol=="function"?Symbol:{},n=t.iterator||"@@iterator",u=t.toStringTag||"@@toStringTag";function c(A,I,Y,H){var M=I&&I.prototype instanceof s?I:s,V=Object.create(M.prototype);return O(V,"_invoke",(function(ie,Z,z){var P,T,E,B=0,X=z||[],C=!1,N={p:0,n:0,v:r,a:g,f:g.bind(r,4),d:function(i,o){return P=i,T=0,E=r,N.n=o,a}};function g(i,o){for(T=i,E=o,e=0;!C&&B&&!l&&e<X.length;e++){var l,d=X[e],b=N.p,h=d[2];i>3?(l=h===o)&&(E=d[(T=d[4])?5:(T=3,3)],d[4]=d[5]=r):d[0]<=b&&((l=i<2&&b<d[1])?(T=0,N.v=o,N.n=d[1]):b<h&&(l=i<3||d[0]>o||o>h)&&(d[4]=i,d[5]=o,N.n=h,T=0))}if(l||i>1)return a;throw C=!0,o}return function(i,o,l){if(B>1)throw TypeError("Generator is already running");for(C&&o===1&&g(o,l),T=o,E=l;(e=T<2?r:E)||!C;){P||(T?T<3?(T>1&&(N.n=-1),g(T,E)):N.n=E:N.v=E);try{if(B=2,P){if(T||(i="next"),e=P[i]){if(!(e=e.call(P,E)))throw TypeError("iterator result is not an object");if(!e.done)return e;E=e.value,T<2&&(T=0)}else T===1&&(e=P.return)&&e.call(P),T<2&&(E=TypeError("The iterator does not provide a '"+i+"' method"),T=1);P=r}else if((e=(C=N.n<0)?E:ie.call(Z,N))!==a)break}catch(d){P=r,T=1,E=d}finally{B=1}}return{value:e,done:C}}})(A,Y,H),!0),V}var a={};function s(){}function f(){}function p(){}e=Object.getPrototypeOf;var F=[][n]?e(e([][n]())):(O(e={},n,function(){return this}),e),w=p.prototype=s.prototype=Object.create(F);function R(A){return Object.setPrototypeOf?Object.setPrototypeOf(A,p):(A.__proto__=p,O(A,u,"GeneratorFunction")),A.prototype=Object.create(w),A}return f.prototype=p,O(w,"constructor",p),O(p,"constructor",f),f.displayName="GeneratorFunction",O(p,u,"GeneratorFunction"),O(w),O(w,u,"Generator"),O(w,n,function(){return this}),O(w,"toString",function(){return"[object Generator]"}),(U=function(){return{w:c,m:R}})()}function O(r,e,t,n){var u=Object.defineProperty;try{u({},"",{})}catch{u=0}O=function(c,a,s,f){function p(F,w){O(c,F,function(R){return this._invoke(F,w,R)})}a?u?u(c,a,{value:s,enumerable:!f,configurable:!f,writable:!f}):c[a]=s:(p("next",0),p("throw",1),p("return",2))},O(r,e,t,n)}function $e(r){return He(r)||ze(r)||Oe(r)||Xe()}function Je(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Qe(r){var e=Je(r,"string");return typeof e=="symbol"?e:e+""}function Oe(r,e){if(r){if(typeof r=="string")return se(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?se(r,e):void 0}}var j={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,t){var n=j.getActiveTrap(e);t!==n&&j.pauseTrap(e);var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),j.unpauseTrap(e)},pauseTrap:function(e){var t=j.getActiveTrap(e);t?._setPausedState(!0)},unpauseTrap:function(e){var t=j.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},et=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},tt=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},W=function(e){return e?.key==="Tab"||e?.keyCode===9},rt=function(e){return W(e)&&!e.shiftKey},at=function(e){return W(e)&&e.shiftKey},De=function(e){return setTimeout(e,0)},q=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),u=1;u<t;u++)n[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,n):e},ae=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},nt=[],Re=function(e,t){var n=t?.document||document,u=t?.trapStack||nt,c=Ae({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:rt,isKeyBackward:at},t),a={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,f=function(i,o,l){return i&&i[o]!==void 0?i[o]:c[l||o]},p=function(i,o){var l=typeof o?.composedPath=="function"?o.composedPath():void 0;return a.containerGroups.findIndex(function(d){var b=d.container,h=d.tabbableNodes;return b.contains(i)||l?.includes(b)||h.find(function(v){return v===i})})},F=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.hasFallback,d=l===void 0?!1:l,b=o.params,h=b===void 0?[]:b,v=c[i];if(typeof v=="function"&&(v=v.apply(void 0,$e(h))),v===!0&&(v=void 0),!v){if(v===void 0||v===!1)return v;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var m=v;if(typeof v=="string"){try{m=n.querySelector(v)}catch(y){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(y.message,'"'))}if(!m&&!d)throw new Error("`".concat(i,"` as selector refers to no known node"))}return m},w=function(){var i=F("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!re(i,c.tabbableOptions))if(p(n.activeElement)>=0)i=n.activeElement;else{var o=a.tabbableGroups[0],l=o&&o.firstTabbableNode;i=l||F("fallbackFocus")}else i===null&&(i=F("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},R=function(){if(a.containerGroups=a.containers.map(function(i){var o=Te(i,c.tabbableOptions),l=Se(i,c.tabbableOptions),d=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,h=l.find(function(y){return K(y)}),v=l.slice().reverse().find(function(y){return K(y)}),m=!!o.find(function(y){return L(y)>0});return{container:i,tabbableNodes:o,focusableNodes:l,posTabIndexesFound:m,firstTabbableNode:d,lastTabbableNode:b,firstDomTabbableNode:h,lastDomTabbableNode:v,nextTabbableNode:function(S){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,k=o.indexOf(S);return k<0?D?l.slice(l.indexOf(S)+1).find(function(_){return K(_)}):l.slice(0,l.indexOf(S)).reverse().find(function(_){return K(_)}):o[k+(D?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!F("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(i){return i.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},A=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?A(o.shadowRoot):o},I=function(i){if(i!==!1&&i!==A(document)){if(!i||!i.focus){I(w());return}i.focus({preventScroll:!!c.preventScroll}),a.mostRecentlyFocusedNode=i,et(i)&&i.select()}},Y=function(i){var o=F("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},H=function(i){var o=i.target,l=i.event,d=i.isBackward,b=d===void 0?!1:d;o=o||ae(l),R();var h=null;if(a.tabbableGroups.length>0){var v=p(o,l),m=v>=0?a.containerGroups[v]:void 0;if(v<0)b?h=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:h=a.tabbableGroups[0].firstTabbableNode;else if(b){var y=a.tabbableGroups.findIndex(function(oe){var ue=oe.firstTabbableNode;return o===ue});if(y<0&&(m.container===o||re(o,c.tabbableOptions)&&!K(o,c.tabbableOptions)&&!m.nextTabbableNode(o,!1))&&(y=v),y>=0){var S=y===0?a.tabbableGroups.length-1:y-1,D=a.tabbableGroups[S];h=L(o)>=0?D.lastTabbableNode:D.lastDomTabbableNode}else W(l)||(h=m.nextTabbableNode(o,!1))}else{var k=a.tabbableGroups.findIndex(function(oe){var ue=oe.lastTabbableNode;return o===ue});if(k<0&&(m.container===o||re(o,c.tabbableOptions)&&!K(o,c.tabbableOptions)&&!m.nextTabbableNode(o))&&(k=v),k>=0){var _=k===a.tabbableGroups.length-1?0:k+1,x=a.tabbableGroups[_];h=L(o)>=0?x.firstTabbableNode:x.firstDomTabbableNode}else W(l)||(h=m.nextTabbableNode(o))}}else h=F("fallbackFocus");return h},M=function(i){var o=ae(i);if(!(p(o,i)>=0)){if(q(c.clickOutsideDeactivates,i)){s.deactivate({returnFocus:c.returnFocusOnDeactivate});return}q(c.allowOutsideClick,i)||i.preventDefault()}},V=function(i){var o=ae(i),l=p(o,i)>=0;if(l||o instanceof Document)l&&(a.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var d,b=!0;if(a.mostRecentlyFocusedNode)if(L(a.mostRecentlyFocusedNode)>0){var h=p(a.mostRecentlyFocusedNode),v=a.containerGroups[h].tabbableNodes;if(v.length>0){var m=v.findIndex(function(y){return y===a.mostRecentlyFocusedNode});m>=0&&(c.isKeyForward(a.recentNavEvent)?m+1<v.length&&(d=v[m+1],b=!1):m-1>=0&&(d=v[m-1],b=!1))}}else a.containerGroups.some(function(y){return y.tabbableNodes.some(function(S){return L(S)>0})})||(b=!1);else b=!1;b&&(d=H({target:a.mostRecentlyFocusedNode,isBackward:c.isKeyBackward(a.recentNavEvent)})),I(d||a.mostRecentlyFocusedNode||w())}a.recentNavEvent=void 0},ie=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=i;var l=H({event:i,isBackward:o});l&&(W(i)&&i.preventDefault(),I(l))},Z=function(i){(c.isKeyForward(i)||c.isKeyBackward(i))&&ie(i,c.isKeyBackward(i))},z=function(i){tt(i)&&q(c.escapeDeactivates,i)!==!1&&(i.preventDefault(),s.deactivate())},P=function(i){var o=ae(i);p(o,i)>=0||q(c.clickOutsideDeactivates,i)||q(c.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},T=function(){if(!a.active)return Promise.resolve();j.activateTrap(u,s);var i;return c.delayInitialFocus?i=new Promise(function(o){a.delayInitialFocusTimer=De(function(){I(w()),o()})}):(i=Promise.resolve(),I(w())),n.addEventListener("focusin",V,!0),n.addEventListener("mousedown",M,{capture:!0,passive:!1}),n.addEventListener("touchstart",M,{capture:!0,passive:!1}),n.addEventListener("click",P,{capture:!0,passive:!1}),n.addEventListener("keydown",Z,{capture:!0,passive:!1}),n.addEventListener("keydown",z),i},E=function(i){a.active&&!a.paused&&s._setSubtreeIsolation(!1),a.adjacentElements.clear(),a.alreadySilent.clear();var o=new Set,l=new Set,d=Ee(i),b;try{for(d.s();!(b=d.n()).done;){var h=b.value;o.add(h);for(var v=typeof ShadowRoot<"u"&&h.getRootNode()instanceof ShadowRoot,m=h;m;){o.add(m);var y=m.parentElement,S=[];y?S=y.children:!y&&v&&(S=m.getRootNode().children,y=m.getRootNode().host,v=typeof ShadowRoot<"u"&&y.getRootNode()instanceof ShadowRoot);var D=Ee(S),k;try{for(D.s();!(k=D.n()).done;){var _=k.value;l.add(_)}}catch(x){D.e(x)}finally{D.f()}m=y}}}catch(x){d.e(x)}finally{d.f()}o.forEach(function(x){l.delete(x)}),a.adjacentElements=l},B=function(){if(a.active)return n.removeEventListener("focusin",V,!0),n.removeEventListener("mousedown",M,!0),n.removeEventListener("touchstart",M,!0),n.removeEventListener("click",P,!0),n.removeEventListener("keydown",Z,!0),n.removeEventListener("keydown",z),s},X=function(i){var o=a.mostRecentlyFocusedNode;if(o){var l=i.some(function(b){var h=Array.from(b.removedNodes);return h.some(function(v){return v===o||typeof v.contains=="function"&&v.contains(o)})});if(l&&a.containers.some(function(b){return b?.isConnected})){R();var d=w();I(d)}}},C=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(X):void 0,N=function(){C&&(C.disconnect(),a.active&&!a.paused&&a.containers.map(function(i){C.observe(i,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(i){if(a.active)return this;var o=f(i,"onActivate"),l=f(i,"onPostActivate"),d=f(i,"checkCanFocusTrap"),b=j.getActiveTrap(u),h=!1;if(b&&!b.paused){var v;(v=b._setSubtreeIsolation)===null||v===void 0||v.call(b,!1),h=!0}try{d||R(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=A(n),o?.({trap:s});var m=(function(){var S=Ne(U().m(function D(){return U().w(function(k){for(;;)switch(k.n){case 0:return d&&R(),k.n=1,T();case 1:s._setSubtreeIsolation(!0),N(),l?.({trap:s});case 2:return k.a(2)}},D)}));return function(){return S.apply(this,arguments)}})();if(d)return d(a.containers.concat()).then(m,m),this;m()}catch(S){if(b===j.getActiveTrap(u)&&h){var y;(y=b._setSubtreeIsolation)===null||y===void 0||y.call(b,!0)}throw S}return this},deactivate:function(i){if(!a.active)return this;var o=Ae({onDeactivate:c.onDeactivate,onPostDeactivate:c.onPostDeactivate,checkCanReturnFocus:c.checkCanReturnFocus},i);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,a.paused||s._setSubtreeIsolation(!1),a.alreadySilent.clear(),B(),a.active=!1,a.paused=!1,N(),j.deactivateTrap(u,s);var l=f(o,"onDeactivate"),d=f(o,"onPostDeactivate"),b=f(o,"checkCanReturnFocus"),h=f(o,"delayReturnFocus"),v=f(o,"returnFocus","returnFocusOnDeactivate");l?.({trap:s});var m=function(){v&&I(Y(a.nodeFocusedBeforeActivation)),d?.({trap:s})},y=function(){h&&v?De(m):m()};return v&&b?(b(Y(a.nodeFocusedBeforeActivation)).then(y,y),this):(y(),this)},pause:function(i){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return a.active?(a.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return a.containers=o.map(function(l){return typeof l=="string"?n.querySelector(l):l}),c.isolateSubtrees&&E(a.containers),a.active&&(R(),a.paused||s._setSubtreeIsolation(!0)),N(),this}},Object.defineProperties(s,{_isManuallyPaused:{value:function(){return a.manuallyPaused}},_setPausedState:{value:function(i,o){if(a.paused===i)return this;if(a.paused=i,i){var l=f(o,"onPause"),d=f(o,"onPostPause");l?.({trap:s}),B(),s._setSubtreeIsolation(!1),N(),d?.({trap:s})}else{var b=f(o,"onUnpause"),h=f(o,"onPostUnpause");b?.({trap:s});var v=(function(){var m=Ne(U().m(function y(){return U().w(function(S){for(;;)switch(S.n){case 0:return R(),S.n=1,T();case 1:s._setSubtreeIsolation(!0),N(),h?.({trap:s});case 2:return S.a(2)}},y)}));return function(){return m.apply(this,arguments)}})();v()}return this}},_setSubtreeIsolation:{value:function(i){c.isolateSubtrees&&a.adjacentElements.forEach(function(o){var l;i?c.isolateSubtrees==="aria-hidden"?((o.ariaHidden==="true"||((l=o.getAttribute("aria-hidden"))===null||l===void 0?void 0:l.toLowerCase())==="true")&&a.alreadySilent.add(o),o.setAttribute("aria-hidden","true")):((o.inert||o.hasAttribute("inert"))&&a.alreadySilent.add(o),o.setAttribute("inert",!0)):a.alreadySilent.has(o)||(c.isolateSubtrees==="aria-hidden"?o.removeAttribute("aria-hidden"):o.removeAttribute("inert"))})}}}),s.updateContainerElements(e),s};function Ie(r,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?r:[r,...Pe(e?.extraContainers),...Pe(t)]}function Pe(r=[]){return Array.isArray(r)?r:[r]}var ne=new WeakSet;function it(r,e){let t=e&&e!==document.body&&e!==document.documentElement;return!ne.has(r)&&t&&ve(e),!1}function ot(r,e){let t=e?.fallbackFocus||r,n=e?.clickOutsideDeactivates??!0,u;return{fallbackFocus:t,...e,document:r.ownerDocument,tabbableOptions:de,trapStack:le().focusTrapStack,clickOutsideDeactivates:c=>(ne.has(r)||ne.add(r),typeof n=="function"?n(c):n),onActivate:c=>{e?.escapeDeactivates&&(u=new AbortController,r.addEventListener("keydown",a=>{if(a.key==="Escape"){let s=e?.escapeDeactivates;(typeof s=="function"?s(a):s??!0)&&c.trap.deactivate()}},{signal:u.signal})),e?.onActivate?.(c)},onDeactivate:c=>{u?.abort(),u=void 0,e?.onDeactivate?.(c)},onPostDeactivate:()=>{ne.delete(r)},setReturnFocus:c=>{let a=typeof e?.setReturnFocus=="function"?e.setReturnFocus(c):e?.setReturnFocus;return a===void 0?it(r,c):a}}}var bt=r=>fe((e,t)=>{let n,u,c,a=r.focusTrapOptions;t.onConnected(()=>{e[r.triggerProp]&&n&&s.activate()}),t.onUpdate(f=>{e.hasUpdated&&f.has("focusTrapDisabled")&&(e.focusTrapDisabled?s.deactivate():s.activate())}),t.onDisconnected(()=>s.deactivate());let s={get _instance(){},activate:()=>{let f=u||e.el;f.isConnected&&(n||(c||=Ie(f,e),n=Re(c,ot(f,{...a,...e.focusTrapOptions}))),(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&n.activate())},deactivate:()=>n?.deactivate(),overrideFocusTrapEl:f=>{if(n)throw new Error("Focus trap already created");u=f},setExtraContainers:f=>{let p=u||e.el;c=Ie(p,e,f)},updateContainerElements:()=>n?.updateContainerElements(c)};return s});export{bt as a};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{b as $}from"./IYGANVDT.js";import{a as S,b as C,c as b,d as A,f as _,h as g}from"./4BBND7CA.js";import{j as D}from"./WSQ4PXI6.js";import{a as K}from"./57RSFB25.js";import{a as B}from"./HDCTPG3W.js";import{a as v}from"./FOCO4B2I.js";import{a as W}from"./VMXPCKPN.js";import{a as q}from"./AP2LDRUV.js";import"./YGX7CUXN.js";import{a as y}from"./ENDXE7YY.js";import{a as z}from"./64SYBTWP.js";import{a as G}from"./ZGQKLZNW.js";import"./WGGFNK4Z.js";import"./R4MIPDZD.js";import"./LZO5WQFT.js";import{f as N,q as w,t as E}from"./JTFWEILS.js";import{a as U}from"./OAOQ5BXS.js";import{F as I,G as R,H as h,I as k,N as H,S as T,g as M,h as d,p}from"./KC5YLSJL.js";var f={container:"container",table:"table",scrim:"scrim",stack:"stack",tableContainer:"table-container",sticky:"sticky-pos",assistiveText:"assistive-text",containerHeight:"container-height"},L={emptyContent:"empty-content",filterNoResults:"filter-no-results",filterActionsStart:"filter-actions-start",filterActionsEnd:"filter-actions-end"},j=M`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([scale=s]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-list-action-spacing: var(--calcite-spacing-xs)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{position:relative;background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.container-height{block-size:100%}.table-container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}.stack{--calcite-stack-padding-inline: 0;--calcite-stack-padding-block: 0}.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1))}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}::slotted(:is(calcite-action[slot=filter-actions-start],calcite-action[slot=filter-actions-end])){gap:var(--calcite-internal-list-action-spacing);align-self:center}::slotted(calcite-action[slot=filter-actions-start]){margin-inline-start:var(--calcite-internal-list-action-spacing)}::slotted(calcite-action[slot=filter-actions-end]){margin-inline-end:var(--calcite-internal-list-action-spacing)}:host([hidden]){display:none}[hidden]{display:none}`,J=`${C}, ${b}`,P=class extends R{constructor(){super(),this.dragSelector=b,this.focusableItems=[],this.handleSelector="calcite-sort-handle",this.listItems=[],this.listItemGroups=[],this.mutationObserver=y("mutation",()=>{this.willPerformFilter=!0,this.updateListItemsDebounced()}),this.cancelable=W()(this),this.sortable=K()(this),this.updateListItemsDebounced=q(this.updateListItems,H.nextTick),this.visibleItems=[],this.willFilterEmit=!1,this.willPerformFilter=!1,this.messages=z({blocking:!0}),this.focusSetter=G()(this),this.interactiveContainer=B(this),this.filterRowResizeObserver=y("resize",()=>this.updateFilterRowHeight()),this.setFilterContainerEl=t=>{this.filterContainerEl=t,this.observeFilterRow()},this.dataForFilter=[],this.hasFilterActionsEnd=!1,this.hasFilterActionsStart=!1,this.hasFilterNoResults=!1,this.sortHandleMenuItems=[],this.hasContent=!1,this.hasEmptyContent=!1,this.filterRowHeight=0,this.disabled=!1,this.dragEnabled=!1,this.filterEnabled=!1,this.filterText="",this.filteredData=[],this.filteredItems=[],this.interactionMode="interactive",this.loading=!1,this.displayMode="flat",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.sortDisabled=!1,this.calciteInternalListDefaultSlotChange=p({cancelable:!1}),this.calciteListChange=p({cancelable:!1}),this.calciteListDragEnd=p({cancelable:!1}),this.calciteListDragStart=p({cancelable:!1}),this.calciteListFilter=p({cancelable:!1}),this.calciteListMoveHalt=p({cancelable:!1}),this.calciteListOrderChange=p({cancelable:!1}),this.listen("calciteInternalListItemToggle",this.handleCalciteListItemToggle),this.listen("calciteInternalFocusPreviousItem",this.handleCalciteInternalFocusPreviousItem),this.listen("calciteInternalListItemActive",this.handleCalciteInternalListItemActive),this.listen("calciteListItemSelect",this.handleCalciteListItemSelect),this.listen("calciteInternalAssistiveTextChange",this.handleCalciteInternalAssistiveTextChange),this.listen("calciteListItemSortHandleBeforeOpen",this.updateListItemsDebounced),this.listen("calciteSortHandleReorder",this.handleSortReorder),this.listen("calciteSortHandleMove",this.handleSortMove),this.listen("calciteSortHandleAdd",this.handleSortAdd),this.listen("calciteInternalListItemSelect",this.handleCalciteInternalListItemSelect),this.listen("calciteInternalListItemSelectMultiple",this.handleCalciteInternalListItemSelectMultiple),this.listen("calciteInternalListItemChange",this.handleCalciteInternalListItemChange),this.listen("calciteInternalListItemGroupDefaultSlotChange",this.handleCalciteInternalListItemGroupDefaultSlotChange)}static{this.properties={assistiveText:[16,{},{state:!0}],dataForFilter:[16,{},{state:!0}],hasFilterActionsEnd:[16,{},{state:!0}],hasFilterActionsStart:[16,{},{state:!0}],hasFilterNoResults:[16,{},{state:!0}],sortHandleMenuItems:[16,{},{state:!0}],hasContent:[16,{},{state:!0}],hasEmptyContent:[16,{},{state:!0}],filterRowHeight:[16,{},{state:!0}],canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragEnabled:[7,{},{reflect:!0,type:Boolean}],filterEnabled:[7,{},{reflect:!0,type:Boolean}],filterPredicate:[0,{},{attribute:!1}],filterLabel:[3,{},{reflect:!0}],filterPlaceholder:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filterText:[3,{},{reflect:!0}],filteredData:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],group:[3,{},{reflect:!0}],interactionMode:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],displayMode:[3,{},{reflect:!0}],numberingSystem:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],sortDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=j}get hasActiveFilter(){return this.filterEnabled&&this.filterText&&this.filteredItems.length!==this.visibleItems.length}get showEmptyContentContainer(){return!this.hasContent&&this.hasEmptyContent}get showNoResultsContainer(){return this.filterEnabled&&this.filterText&&this.hasFilterNoResults&&this.visibleItems.length&&!this.filteredItems.length}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(t=>t!=="el"):["description","label","metadata","heading"]}emitOrderChangeEvent(t){this.calciteListOrderChange.emit(t)}async setFocus(t){return this.focusSetter(()=>this.filterEnabled?this.filterEl:this.focusableItems.find(e=>e.active),t)}connectedCallback(){super.connectedCallback(),this.connectObserver(),this.willPerformFilter=!0,this.updateListItemsDebounced(),this.setUpSorting(),this.setParentList(),this.setListItemGroups(),this.cancelable.add(this.updateListItemsDebounced)}async load(){this.handleInteractionModeWarning()}willUpdate(t){(t.has("filterText")||t.has("filterProps")||t.has("filterPredicate"))&&this.performFilter(),(t.has("filterEnabled")&&(this.hasUpdated||this.filterEnabled!==!1)||t.has("group")||t.has("sortDisabled")&&(this.hasUpdated||this.sortDisabled!==!1)||t.has("dragEnabled")&&(this.hasUpdated||this.dragEnabled!==!1)||t.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon")||t.has("displayMode")&&this.hasUpdated||t.has("scale")&&this.hasUpdated||t.has("canPull")&&this.hasUpdated||t.has("canPut")&&this.hasUpdated||t.has("filterPredicate")&&this.hasUpdated)&&this.handleListItemChange()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectObserver(),this.unobserveFilterRow()}updateListItems(){this.updateGroupItems();let{selectionAppearance:t,selectionMode:e,interactionMode:i,dragEnabled:a,el:s,filterEl:n,displayMode:l,scale:r,sortDisabled:c,sortHandleMenuItems:u}=this,m=Array.from(this.el.querySelectorAll(b)),x=s,O=Array.from(x.children).filter(g);if(m.forEach(o=>{o.closest(S)===s&&(o.scale=r,o.selectionAppearance=t,o.selectionMode=e,o.interactionMode=i,o.moveToItems=u.filter(F=>this.validateSortMenuItem({type:"move",fromEl:x,toEl:F.element,dragEl:o,newIndex:0,oldIndex:O.indexOf(o)})),o.addToItems=this.sortHandleMenuItems.filter(F=>this.validateSortMenuItem({type:"add",fromEl:x,toEl:F.element,dragEl:o,newIndex:0,oldIndex:O.indexOf(o)})),o.dragHandle=a,o.displayMode=l,o.sortDisabled=c)}),this.parentListEl){this.setUpSorting();return}this.listItems=m,this.filterEnabled&&this.willPerformFilter&&(this.willPerformFilter=!1,this.dataForFilter=this.getItemData(),n&&(n.items=this.dataForFilter,this.filterAndUpdateData())),this.visibleItems=this.listItems.filter(o=>!o.closed&&!o.hidden),this.updateFilteredItems(),this.borderItems(),this.focusableItems=this.filteredItems.filter(o=>!o.disabled),this.setActiveListItem(),this.updateSelectedItems(),this.setUpSorting()}unobserveFilterRow(){this.filterRowResizeObserver?.disconnect()}observeFilterRow(){this.unobserveFilterRow();let t=this.filterContainerEl;t&&this.filterRowResizeObserver?.observe(t)}updateFilterRowHeight(){this.filterRowHeight=this.filterContainerEl?.clientHeight??0}handleListItemChange(){this.willPerformFilter=!0,this.updateListItemsDebounced()}handleCalciteListItemToggle(t){this.parentListEl||(t.stopPropagation(),this.borderItems())}handleCalciteInternalFocusPreviousItem(t){if(this.parentListEl)return;t.stopPropagation();let{focusableItems:e}=this,a=e.findIndex(s=>s.active)-1;e[a]&&this.focusRow(e[a])}handleCalciteInternalListItemActive(t){if(this.parentListEl)return;t.stopPropagation();let e=t.target,{listItems:i}=this;i.forEach(a=>{a.active=a===e})}handleCalciteListItemSelect(){this.parentListEl||this.updateSelectedItems(!0)}handleCalciteInternalAssistiveTextChange(t){this.assistiveText=t.detail.message,t.stopPropagation()}handleSortReorder(t){this.parentListEl||t.defaultPrevented||(t.preventDefault(),this.handleReorder(t))}handleSortAdd(t){this.parentListEl||t.defaultPrevented||(t.preventDefault(),this.handleAdd(t))}handleSortMove(t){this.parentListEl||t.defaultPrevented||(t.preventDefault(),this.handleMove(t))}handleCalciteInternalListItemSelect(t){if(this.parentListEl)return;t.stopPropagation();let e=t.target,{listItems:i,selectionMode:a}=this;e.selected&&(a==="single"||a==="single-persist")&&i.forEach(s=>s.selected=s===e),this.updateSelectedItems()}handleCalciteInternalListItemSelectMultiple(t){if(this.parentListEl)return;t.stopPropagation();let{target:e,detail:i}=t,{focusableItems:a,lastSelectedInfo:s}=this,n=e;if(i.selectMultiple&&s){let l=a.indexOf(n),r=a.indexOf(s.selectedItem),c=Math.min(r,l),u=Math.max(r,l);a.slice(c,u+1).forEach(m=>m.selected=s.selected)}else this.lastSelectedInfo={selectedItem:n,selected:n.selected}}handleCalciteInternalListItemChange(t){this.parentListEl||(t.stopPropagation(),this.updateListItemsDebounced())}handleCalciteInternalListItemGroupDefaultSlotChange(t){t.stopPropagation()}connectObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectObserver(){this.mutationObserver?.disconnect()}setUpSorting(){let{dragEnabled:t,defaultSlotEl:e}=this;t&&e&&_(e),this.sortable.reset()}onGlobalDragStart(){this.disconnectObserver()}onGlobalDragEnd(){this.connectObserver()}onDragEnd(t){this.calciteListDragEnd.emit(t)}onDragStart(t){t.dragEl.sortHandleOpen=!1,this.calciteListDragStart.emit(t)}onDragSort(t){this.setParentList(),this.updateListItemsDebounced(),this.calciteListOrderChange.emit(t)}setParentList(){this.parentListEl=this.el.parentElement?.closest(S)}handleDefaultSlotChange(t){this.parentListEl&&this.calciteInternalListDefaultSlotChange.emit(),this.hasContent=w(t)}handleEmptyContentSlotChange(t){this.hasEmptyContent=w(t)}setListItemGroups(){this.listItemGroups=Array.from(this.el.querySelectorAll(C))}handleFilterActionsStartSlotChange(t){this.hasFilterActionsStart=E(t)}handleFilterActionsEndSlotChange(t){this.hasFilterActionsEnd=E(t)}handleFilterNoResultsSlotChange(t){this.hasFilterNoResults=E(t)}setActiveListItem(){let{focusableItems:t}=this;t.some(e=>e.active)||t[0]&&(t[0].active=!0)}async updateSelectedItems(t=!1){await this.updateComplete,this.selectedItems=this.visibleItems.filter(e=>e.selected),t&&this.calciteListChange.emit()}filterElements({el:t,filteredItems:e,visibleParents:i}){let a=!i.has(t)&&!e.includes(t);t.filterHidden=a;let s=t.parentElement.closest(J);s&&(a||i.add(s),this.filterElements({el:s,filteredItems:e,visibleParents:i}))}allParentListItemsExpanded(t){let e=t.parentElement?.closest(b);if(e){if(!e.expanded)return!1}else return!0;return this.allParentListItemsExpanded(e)}borderItems(){let t=this.visibleItems.filter(e=>!e.filterHidden&&this.allParentListItemsExpanded(e));t.forEach(e=>e.bordered=e!==t[t.length-1])}updateFilteredItems(){let{visibleItems:t,filteredData:e,filterText:i,filterPredicate:a}=this,s=t?.filter(r=>t.every(c=>c===r||!r.contains(c))),n=a?t.filter(a):i?e.map(r=>r.el):t||[],l=new WeakSet;s.forEach(r=>this.filterElements({el:r,filteredItems:n,visibleParents:l})),this.filteredItems=n,this.willFilterEmit&&(this.willFilterEmit=!1,this.calciteListFilter.emit())}updateFilteredData(){let{filterEl:t}=this;t&&(t.filteredItems&&(this.filteredData=t.filteredItems),this.updateListItemsDebounced())}async filterAndUpdateData(){await this.filterEl?.filter(this.filterText),this.updateFilteredData()}performFilter(){let{filterEl:t,filterText:e,effectiveFilterProps:i}=this;t&&(t.value=e,t.filterProps=i,this.filterAndUpdateData())}setDefaultSlotEl(t){this.defaultSlotEl=t}setFilterEl(t){this.filterEl=t,this.performFilter()}handleFilterChange(t){t.stopPropagation();let{value:e}=t.currentTarget;this.filterText=e,this.willFilterEmit=!0,this.updateFilteredData()}getItemData(){return this.listItems.map(t=>({label:t.label,description:t.description,metadata:t.metadata,heading:this.getGroupHeading(t),el:t}))}getGroupHeading(t){return this.listItemGroups.filter(i=>i.contains(t)).map(i=>i.heading)}updateGroupItems(){let{el:t,group:e,scale:i}=this,a=N(t),s=e?Array.from(a.querySelectorAll(`${S}[group="${e}"]`)).filter(l=>!l.disabled&&l.dragEnabled):[];this.sortHandleMenuItems=s.map(l=>({element:l,label:l.label??l.id,id:U()})),Array.from(this.el.querySelectorAll(C)).forEach(l=>{l.scale=i})}focusRow(t){let{focusableItems:e}=this;t&&(e.forEach(i=>i.active=i===t),t.setFocus())}isNavigable(t){let e=t.parentElement?.closest(b);return e?e.expanded&&this.isNavigable(e):!0}handleListKeydown(t){if(t.defaultPrevented||this.parentListEl)return;let{key:e}=t,i=this.focusableItems.filter(s=>this.isNavigable(s)),a=i.findIndex(s=>s.active);if(e==="ArrowDown"){t.preventDefault();let s=t.target===this.filterEl?0:a+1;i[s]&&this.focusRow(i[s])}else if(e==="ArrowUp"){if(t.preventDefault(),a===0&&this.filterEnabled){this.filterEl.setFocus();return}let s=a-1;i[s]&&this.focusRow(i[s])}else if(e==="Home"){t.preventDefault();let s=i[0];s&&this.focusRow(s)}else if(e==="End"){t.preventDefault();let s=i[i.length-1];s&&this.focusRow(s)}}handleInteractionModeWarning(){this.interactionMode==="static"&&this.selectionMode!=="none"&&this.selectionAppearance==="border"&&console.warn('selection-appearance="border" requires interaction-mode="interactive"')}validateSortMenuItem({fromEl:t,toEl:e,dragEl:i,newIndex:a,oldIndex:s,type:n}){if(!t||!e||e===t||i.contains(e))return!1;let l=t.canPull?.({toEl:e,fromEl:t,dragEl:i,newIndex:a,oldIndex:s})??!0,r=e.canPut?.({toEl:e,fromEl:t,dragEl:i,newIndex:a,oldIndex:s})??!0;return(n==="add"?l==="clone":l===!0)&&r}handleAdd(t){let{addTo:e}=t.detail,i=t.target,a=i?.parentElement,s=e.element,l=Array.from(a.children).filter(g).indexOf(i),r=0;if(!this.validateSortMenuItem({type:"add",fromEl:a,toEl:s,dragEl:i,newIndex:r,oldIndex:l}))return;i.sortHandleOpen=!1,this.disconnectObserver();let c=i.cloneNode();s.prepend(c),A(i),this.updateListItemsDebounced(),this.connectObserver();let u={dragEl:i,fromEl:a,toEl:s,newIndex:r,oldIndex:l};this.calciteListOrderChange.emit(u),s.emitOrderChangeEvent(u)}handleMove(t){let{moveTo:e}=t.detail,i=t.target,a=i?.parentElement,s=e.element,l=Array.from(a.children).filter(g).indexOf(i),r=0;if(!this.validateSortMenuItem({type:"move",fromEl:a,toEl:s,dragEl:i,newIndex:r,oldIndex:l}))return;i.sortHandleOpen=!1,this.disconnectObserver(),s.prepend(i),A(i),this.updateListItemsDebounced(),this.connectObserver();let c={dragEl:i,fromEl:a,toEl:s,newIndex:r,oldIndex:l};this.calciteListOrderChange.emit(c),s.emitOrderChangeEvent(c)}handleReorder(t){let{reorder:e}=t.detail,i=t.target,a=i?.parentElement;if(!a)return;i.sortHandleOpen=!1;let s=Array.from(a.children).filter(g),n=s.length-1,l=s.indexOf(i),r=l;switch(e){case"top":r=0;break;case"bottom":r=n;break;case"up":r=l===0?0:l-1;break;case"down":r=l===n?n:l+1;break}this.disconnectObserver();let c=e==="up"||e==="top"?s[r]:s[r].nextSibling;a.insertBefore(i,c),this.updateListItemsDebounced(),this.connectObserver(),this.calciteListOrderChange.emit({dragEl:i,fromEl:a,toEl:a,newIndex:r,oldIndex:l})}render(){let{loading:t,label:e,disabled:i,dataForFilter:a,filterEnabled:s,filterPlaceholder:n,filterText:l,filterLabel:r,hasFilterActionsStart:c,hasFilterActionsEnd:u,effectiveFilterProps:m}=this;return this.interactiveContainer({disabled:this.disabled,children:d`<div class=${h({[f.container]:!0,[f.containerHeight]:this.listItems.length<1&&t})} style=${k({"--calcite-internal-filter-enabled-offset":`${this.filterRowHeight}px`})}>${this.dragEnabled?d`<span aria-live=assertive class=${h(f.assistiveText)}>${this.assistiveText}</span>`:null}${this.renderItemAriaLive()}${t?d`<calcite-scrim class=${h(f.scrim)} .loading=${t}></calcite-scrim>`:null}<div .ariaBusy=${t} .ariaLabel=${e||""} class=${h(f.table)} @keydown=${this.handleListKeydown} role=treegrid>${s||c||u?d`<div class=${h(f.sticky)} role=rowgroup ${I(this.setFilterContainerEl)}><div role=row><div role=columnheader><calcite-stack class=${h(f.stack)}><slot name=${L.filterActionsStart} @slotchange=${this.handleFilterActionsStartSlotChange} slot=${$.actionsStart}></slot><calcite-filter .ariaLabel=${n} .disabled=${i} .filterProps=${m} .items=${a} .label=${r} @calciteFilterChange=${this.handleFilterChange} .placeholder=${n} .scale=${this.scale} .value=${l} ${I(this.setFilterEl)}></calcite-filter><slot name=${L.filterActionsEnd} @slotchange=${this.handleFilterActionsEndSlotChange} slot=${$.actionsEnd}></slot></calcite-stack></div></div></div>`:null}<div class=${h(f.tableContainer)} role=rowgroup><div .hidden=${!this.showEmptyContentContainer}><slot name=${L.emptyContent} @slotchange=${this.handleEmptyContentSlotChange}></slot></div><slot @slotchange=${this.handleDefaultSlotChange} ${I(this.setDefaultSlotEl)}></slot></div></div><div aria-live=polite .hidden=${!this.showNoResultsContainer}><slot name=${L.filterNoResults} @slotchange=${this.handleFilterNoResultsSlotChange}></slot></div></div>`})}renderItemAriaLive(){let{messages:t,filteredItems:e,parentListEl:i,messages:{_lang:a},numberingSystem:s}=this;return D.numberFormatOptions={locale:a,numberingSystem:s},i?null:d`<div aria-live=polite class=${h(f.assistiveText)}>${this.hasActiveFilter?v("aria-filter-enabled",d`<div>${t.filterEnabled}</div>`):null}${v("aria-item-count",d`<div>${t.total.replace("{count}",D.localize(e.length.toString()))}</div>`)}${e.length?v("aria-item-list",d`<ol>${e.map(n=>d`<li>${n.label}</li>`)}</ol>`):null}</div>`}};T("calcite-list",P);export{P as List};