@dso-toolkit/core 73.2.0 → 73.3.0

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 (316) hide show
  1. package/dist/bundle/dso-accordion-section.d.ts +11 -0
  2. package/dist/bundle/dso-accordion-section.js +281 -0
  3. package/dist/bundle/dso-accordion-section.js.map +1 -0
  4. package/dist/bundle/dso-accordion.d.ts +11 -0
  5. package/dist/bundle/dso-accordion.js +262 -0
  6. package/dist/bundle/dso-accordion.js.map +1 -0
  7. package/dist/bundle/dso-action-list-item.d.ts +11 -0
  8. package/dist/bundle/dso-action-list-item.js +63 -0
  9. package/dist/bundle/dso-action-list-item.js.map +1 -0
  10. package/dist/bundle/dso-action-list.d.ts +11 -0
  11. package/dist/bundle/dso-action-list.js +38 -0
  12. package/dist/bundle/dso-action-list.js.map +1 -0
  13. package/dist/bundle/dso-advanced-select.d.ts +11 -0
  14. package/dist/bundle/dso-advanced-select.js +155 -0
  15. package/dist/bundle/dso-advanced-select.js.map +1 -0
  16. package/dist/bundle/dso-alert.d.ts +11 -0
  17. package/dist/bundle/dso-alert.js +9 -0
  18. package/dist/bundle/dso-alert.js.map +1 -0
  19. package/dist/bundle/dso-annotation-activiteit.d.ts +11 -0
  20. package/dist/bundle/dso-annotation-activiteit.js +87 -0
  21. package/dist/bundle/dso-annotation-activiteit.js.map +1 -0
  22. package/dist/bundle/dso-annotation-gebiedsaanwijzing.d.ts +11 -0
  23. package/dist/bundle/dso-annotation-gebiedsaanwijzing.js +83 -0
  24. package/dist/bundle/dso-annotation-gebiedsaanwijzing.js.map +1 -0
  25. package/dist/bundle/dso-annotation-kaart.d.ts +11 -0
  26. package/dist/bundle/dso-annotation-kaart.js +72 -0
  27. package/dist/bundle/dso-annotation-kaart.js.map +1 -0
  28. package/dist/bundle/dso-annotation-locatie.d.ts +11 -0
  29. package/dist/bundle/dso-annotation-locatie.js +9 -0
  30. package/dist/bundle/dso-annotation-locatie.js.map +1 -0
  31. package/dist/bundle/dso-annotation-omgevingsnormwaarde.d.ts +11 -0
  32. package/dist/bundle/dso-annotation-omgevingsnormwaarde.js +87 -0
  33. package/dist/bundle/dso-annotation-omgevingsnormwaarde.js.map +1 -0
  34. package/dist/bundle/dso-attachments-counter.d.ts +11 -0
  35. package/dist/bundle/dso-attachments-counter.js +9 -0
  36. package/dist/bundle/dso-attachments-counter.js.map +1 -0
  37. package/dist/bundle/dso-autosuggest.d.ts +11 -0
  38. package/dist/bundle/dso-autosuggest.js +588 -0
  39. package/dist/bundle/dso-autosuggest.js.map +1 -0
  40. package/dist/bundle/dso-badge.d.ts +11 -0
  41. package/dist/bundle/dso-badge.js +9 -0
  42. package/dist/bundle/dso-badge.js.map +1 -0
  43. package/dist/bundle/dso-banner.d.ts +11 -0
  44. package/dist/bundle/dso-banner.js +53 -0
  45. package/dist/bundle/dso-banner.js.map +1 -0
  46. package/dist/bundle/dso-card-container.d.ts +11 -0
  47. package/dist/bundle/dso-card-container.js +42 -0
  48. package/dist/bundle/dso-card-container.js.map +1 -0
  49. package/dist/bundle/dso-card.d.ts +11 -0
  50. package/dist/bundle/dso-card.js +72 -0
  51. package/dist/bundle/dso-card.js.map +1 -0
  52. package/dist/bundle/dso-contact-information.d.ts +11 -0
  53. package/dist/bundle/dso-contact-information.js +36 -0
  54. package/dist/bundle/dso-contact-information.js.map +1 -0
  55. package/dist/bundle/dso-date-picker-legacy.d.ts +11 -0
  56. package/dist/bundle/dso-date-picker-legacy.js +773 -0
  57. package/dist/bundle/dso-date-picker-legacy.js.map +1 -0
  58. package/dist/bundle/dso-date-picker.d.ts +11 -0
  59. package/dist/bundle/dso-date-picker.js +187 -0
  60. package/dist/bundle/dso-date-picker.js.map +1 -0
  61. package/dist/bundle/dso-document-card.d.ts +11 -0
  62. package/dist/bundle/dso-document-card.js +66 -0
  63. package/dist/bundle/dso-document-card.js.map +1 -0
  64. package/dist/bundle/dso-document-component.d.ts +11 -0
  65. package/dist/bundle/dso-document-component.js +9 -0
  66. package/dist/bundle/dso-document-component.js.map +1 -0
  67. package/dist/bundle/dso-dropdown-menu.d.ts +11 -0
  68. package/dist/bundle/dso-dropdown-menu.js +9 -0
  69. package/dist/bundle/dso-dropdown-menu.js.map +1 -0
  70. package/dist/bundle/dso-expandable.d.ts +11 -0
  71. package/dist/bundle/dso-expandable.js +9 -0
  72. package/dist/bundle/dso-expandable.js.map +1 -0
  73. package/dist/bundle/dso-header.d.ts +11 -0
  74. package/dist/bundle/dso-header.js +218 -0
  75. package/dist/bundle/dso-header.js.map +1 -0
  76. package/dist/bundle/dso-highlight-box.d.ts +11 -0
  77. package/dist/bundle/dso-highlight-box.js +45 -0
  78. package/dist/bundle/dso-highlight-box.js.map +1 -0
  79. package/dist/bundle/dso-icon.d.ts +11 -0
  80. package/dist/bundle/dso-icon.js +9 -0
  81. package/dist/bundle/dso-icon.js.map +1 -0
  82. package/dist/bundle/dso-image-overlay.d.ts +11 -0
  83. package/dist/bundle/dso-image-overlay.js +9 -0
  84. package/dist/bundle/dso-image-overlay.js.map +1 -0
  85. package/dist/bundle/dso-info-button.d.ts +11 -0
  86. package/dist/bundle/dso-info-button.js +9 -0
  87. package/dist/bundle/dso-info-button.js.map +1 -0
  88. package/dist/bundle/dso-info.d.ts +11 -0
  89. package/dist/bundle/dso-info.js +9 -0
  90. package/dist/bundle/dso-info.js.map +1 -0
  91. package/dist/bundle/dso-input-range.d.ts +11 -0
  92. package/dist/bundle/dso-input-range.js +59 -0
  93. package/dist/bundle/dso-input-range.js.map +1 -0
  94. package/dist/bundle/dso-label.d.ts +11 -0
  95. package/dist/bundle/dso-label.js +9 -0
  96. package/dist/bundle/dso-label.js.map +1 -0
  97. package/dist/bundle/dso-legend-item.d.ts +11 -0
  98. package/dist/bundle/dso-legend-item.js +90 -0
  99. package/dist/bundle/dso-legend-item.js.map +1 -0
  100. package/dist/bundle/dso-list-button.d.ts +11 -0
  101. package/dist/bundle/dso-list-button.js +118 -0
  102. package/dist/bundle/dso-list-button.js.map +1 -0
  103. package/dist/bundle/dso-logo.d.ts +11 -0
  104. package/dist/bundle/dso-logo.js +64 -0
  105. package/dist/bundle/dso-logo.js.map +1 -0
  106. package/dist/bundle/dso-map-base-layers.d.ts +11 -0
  107. package/dist/bundle/dso-map-base-layers.js +101 -0
  108. package/dist/bundle/dso-map-base-layers.js.map +1 -0
  109. package/dist/bundle/dso-map-controls.d.ts +11 -0
  110. package/dist/bundle/dso-map-controls.js +138 -0
  111. package/dist/bundle/dso-map-controls.js.map +1 -0
  112. package/dist/bundle/dso-map-overlays.d.ts +11 -0
  113. package/dist/bundle/dso-map-overlays.js +102 -0
  114. package/dist/bundle/dso-map-overlays.js.map +1 -0
  115. package/dist/bundle/dso-mark-bar.d.ts +11 -0
  116. package/dist/bundle/dso-mark-bar.js +91 -0
  117. package/dist/bundle/dso-mark-bar.js.map +1 -0
  118. package/dist/bundle/dso-modal.d.ts +11 -0
  119. package/dist/bundle/dso-modal.js +120 -0
  120. package/dist/bundle/dso-modal.js.map +1 -0
  121. package/dist/bundle/dso-onboarding-tip.d.ts +11 -0
  122. package/dist/bundle/dso-onboarding-tip.js +1839 -0
  123. package/dist/bundle/dso-onboarding-tip.js.map +1 -0
  124. package/dist/bundle/dso-ozon-content.d.ts +11 -0
  125. package/dist/bundle/dso-ozon-content.js +9 -0
  126. package/dist/bundle/dso-ozon-content.js.map +1 -0
  127. package/dist/bundle/dso-pagination.d.ts +11 -0
  128. package/dist/bundle/dso-pagination.js +188 -0
  129. package/dist/bundle/dso-pagination.js.map +1 -0
  130. package/dist/bundle/dso-panel.d.ts +11 -0
  131. package/dist/bundle/dso-panel.js +9 -0
  132. package/dist/bundle/dso-panel.js.map +1 -0
  133. package/dist/bundle/dso-plekinfo-card.d.ts +11 -0
  134. package/dist/bundle/dso-plekinfo-card.js +88 -0
  135. package/dist/bundle/dso-plekinfo-card.js.map +1 -0
  136. package/dist/bundle/dso-progress-bar.d.ts +11 -0
  137. package/dist/bundle/dso-progress-bar.js +50 -0
  138. package/dist/bundle/dso-progress-bar.js.map +1 -0
  139. package/dist/bundle/dso-progress-indicator.d.ts +11 -0
  140. package/dist/bundle/dso-progress-indicator.js +9 -0
  141. package/dist/bundle/dso-progress-indicator.js.map +1 -0
  142. package/dist/bundle/dso-project-item.d.ts +11 -0
  143. package/dist/bundle/dso-project-item.js +56 -0
  144. package/dist/bundle/dso-project-item.js.map +1 -0
  145. package/dist/bundle/dso-renvooi.d.ts +11 -0
  146. package/dist/bundle/dso-renvooi.js +9 -0
  147. package/dist/bundle/dso-renvooi.js.map +1 -0
  148. package/dist/bundle/dso-responsive-element.d.ts +11 -0
  149. package/dist/bundle/dso-responsive-element.js +9 -0
  150. package/dist/bundle/dso-responsive-element.js.map +1 -0
  151. package/dist/bundle/dso-scrollable.d.ts +11 -0
  152. package/dist/bundle/dso-scrollable.js +9 -0
  153. package/dist/bundle/dso-scrollable.js.map +1 -0
  154. package/dist/bundle/dso-selectable.d.ts +11 -0
  155. package/dist/bundle/dso-selectable.js +9 -0
  156. package/dist/bundle/dso-selectable.js.map +1 -0
  157. package/dist/bundle/dso-skiplink.d.ts +11 -0
  158. package/dist/bundle/dso-skiplink.js +53 -0
  159. package/dist/bundle/dso-skiplink.js.map +1 -0
  160. package/dist/bundle/dso-slide-toggle.d.ts +11 -0
  161. package/dist/bundle/dso-slide-toggle.js +9 -0
  162. package/dist/bundle/dso-slide-toggle.js.map +1 -0
  163. package/dist/bundle/dso-survey-rating.d.ts +11 -0
  164. package/dist/bundle/dso-survey-rating.js +70 -0
  165. package/dist/bundle/dso-survey-rating.js.map +1 -0
  166. package/dist/bundle/dso-tab.d.ts +11 -0
  167. package/dist/bundle/dso-tab.js +70 -0
  168. package/dist/bundle/dso-tab.js.map +1 -0
  169. package/dist/bundle/dso-table.d.ts +11 -0
  170. package/dist/bundle/dso-table.js +9 -0
  171. package/dist/bundle/dso-table.js.map +1 -0
  172. package/dist/bundle/dso-tabs.d.ts +11 -0
  173. package/dist/bundle/dso-tabs.js +94 -0
  174. package/dist/bundle/dso-tabs.js.map +1 -0
  175. package/dist/bundle/dso-toggletip.d.ts +11 -0
  176. package/dist/bundle/dso-toggletip.js +9 -0
  177. package/dist/bundle/dso-toggletip.js.map +1 -0
  178. package/dist/bundle/dso-tooltip.d.ts +11 -0
  179. package/dist/bundle/dso-tooltip.js +9 -0
  180. package/dist/bundle/dso-tooltip.js.map +1 -0
  181. package/dist/bundle/dso-tree-view.d.ts +11 -0
  182. package/dist/bundle/dso-tree-view.js +237 -0
  183. package/dist/bundle/dso-tree-view.js.map +1 -0
  184. package/dist/bundle/dso-viewer-grid.d.ts +11 -0
  185. package/dist/bundle/dso-viewer-grid.js +351 -0
  186. package/dist/bundle/dso-viewer-grid.js.map +1 -0
  187. package/dist/bundle/dsot-document-component-demo.d.ts +11 -0
  188. package/dist/bundle/dsot-document-component-demo.js +1957 -0
  189. package/dist/bundle/dsot-document-component-demo.js.map +1 -0
  190. package/dist/bundle/index.d.ts +45 -0
  191. package/dist/bundle/index.js +143 -0
  192. package/dist/bundle/index.js.map +1 -0
  193. package/dist/bundle/p-0JGmXD8O.js +59 -0
  194. package/dist/bundle/p-0JGmXD8O.js.map +1 -0
  195. package/dist/bundle/p-BF0_OXTe.js +60 -0
  196. package/dist/bundle/p-BF0_OXTe.js.map +1 -0
  197. package/dist/bundle/p-BPLPqKUj.js +163 -0
  198. package/dist/bundle/p-BPLPqKUj.js.map +1 -0
  199. package/dist/bundle/p-B_kXuEcW.js +2178 -0
  200. package/dist/bundle/p-B_kXuEcW.js.map +1 -0
  201. package/dist/bundle/p-BacS1uCc.js +35 -0
  202. package/dist/bundle/p-BacS1uCc.js.map +1 -0
  203. package/dist/bundle/p-BdyXpl60.js +76 -0
  204. package/dist/bundle/p-BdyXpl60.js.map +1 -0
  205. package/dist/bundle/p-BocpUT46.js +992 -0
  206. package/dist/bundle/p-BocpUT46.js.map +1 -0
  207. package/dist/bundle/p-BtcZ9oZ6.js +115 -0
  208. package/dist/bundle/p-BtcZ9oZ6.js.map +1 -0
  209. package/dist/bundle/p-BxvZeNWe.js +126 -0
  210. package/dist/bundle/p-BxvZeNWe.js.map +1 -0
  211. package/dist/bundle/p-C1tscMvU.js +43 -0
  212. package/dist/bundle/p-C1tscMvU.js.map +1 -0
  213. package/dist/bundle/p-CZ2ipzNO.js +63 -0
  214. package/dist/bundle/p-CZ2ipzNO.js.map +1 -0
  215. package/dist/bundle/p-Cbba2ZRN.js +36 -0
  216. package/dist/bundle/p-Cbba2ZRN.js.map +1 -0
  217. package/dist/bundle/p-ChV9xqsO.js +6 -0
  218. package/dist/bundle/p-ChV9xqsO.js.map +1 -0
  219. package/dist/bundle/p-ChrHXjXh.js +80 -0
  220. package/dist/bundle/p-ChrHXjXh.js.map +1 -0
  221. package/dist/bundle/p-Cng7insW.js +145 -0
  222. package/dist/bundle/p-Cng7insW.js.map +1 -0
  223. package/dist/bundle/p-CodDyi2J.js +15 -0
  224. package/dist/bundle/p-CodDyi2J.js.map +1 -0
  225. package/dist/bundle/p-CsY83cJO.js +1801 -0
  226. package/dist/bundle/p-CsY83cJO.js.map +1 -0
  227. package/dist/bundle/p-CvGnEQcm.js +80 -0
  228. package/dist/bundle/p-CvGnEQcm.js.map +1 -0
  229. package/dist/bundle/p-D2nuXSd0.js +723 -0
  230. package/dist/bundle/p-D2nuXSd0.js.map +1 -0
  231. package/dist/bundle/p-D9Yjz_Sm.js +125 -0
  232. package/dist/bundle/p-D9Yjz_Sm.js.map +1 -0
  233. package/dist/bundle/p-DDDh2Izf.js +12 -0
  234. package/dist/bundle/p-DDDh2Izf.js.map +1 -0
  235. package/dist/bundle/p-DGWbWwct.js +121 -0
  236. package/dist/bundle/p-DGWbWwct.js.map +1 -0
  237. package/dist/bundle/p-DHO_Za64.js +1729 -0
  238. package/dist/bundle/p-DHO_Za64.js.map +1 -0
  239. package/dist/bundle/p-DPH021KD.js +14 -0
  240. package/dist/bundle/p-DPH021KD.js.map +1 -0
  241. package/dist/bundle/p-DSyv-znO.js +18 -0
  242. package/dist/bundle/p-DSyv-znO.js.map +1 -0
  243. package/dist/bundle/p-DWTXTDbr.js +253 -0
  244. package/dist/bundle/p-DWTXTDbr.js.map +1 -0
  245. package/dist/bundle/p-DacnxEpv.js +78 -0
  246. package/dist/bundle/p-DacnxEpv.js.map +1 -0
  247. package/dist/bundle/p-DcpG4jOU.js +99 -0
  248. package/dist/bundle/p-DcpG4jOU.js.map +1 -0
  249. package/dist/bundle/p-DrR9RuIM.js +83 -0
  250. package/dist/bundle/p-DrR9RuIM.js.map +1 -0
  251. package/dist/bundle/p-DvqO1i1s.js +1162 -0
  252. package/dist/bundle/p-DvqO1i1s.js.map +1 -0
  253. package/dist/bundle/p-Hgv-pDpy.js +13 -0
  254. package/dist/bundle/p-Hgv-pDpy.js.map +1 -0
  255. package/dist/bundle/p-Pk8qng7t.js +573 -0
  256. package/dist/bundle/p-Pk8qng7t.js.map +1 -0
  257. package/dist/bundle/p-WYm6cxra.js +64 -0
  258. package/dist/bundle/p-WYm6cxra.js.map +1 -0
  259. package/dist/bundle/p-dB3K6tfb.js +41 -0
  260. package/dist/bundle/p-dB3K6tfb.js.map +1 -0
  261. package/dist/bundle/p-kDtv6DeD.js +314 -0
  262. package/dist/bundle/p-kDtv6DeD.js.map +1 -0
  263. package/dist/bundle/p-pVO6m7lg.js +271 -0
  264. package/dist/bundle/p-pVO6m7lg.js.map +1 -0
  265. package/dist/bundle/p-xNnEBBZG.js +63 -0
  266. package/dist/bundle/p-xNnEBBZG.js.map +1 -0
  267. package/dist/cjs/dso-accordion-section.cjs.entry.js +3 -3
  268. package/dist/cjs/dso-accordion-section.cjs.entry.js.map +1 -1
  269. package/dist/cjs/dso-accordion-section.entry.cjs.js.map +1 -1
  270. package/dist/cjs/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.cjs.js.map +1 -1
  271. package/dist/cjs/dso-alert_6.cjs.entry.js +3 -7
  272. package/dist/cjs/dso-alert_6.cjs.entry.js.map +1 -1
  273. package/dist/cjs/dso-onboarding-tip.cjs.entry.js +24 -10
  274. package/dist/cjs/dso-onboarding-tip.cjs.entry.js.map +1 -1
  275. package/dist/cjs/dso-onboarding-tip.entry.cjs.js.map +1 -1
  276. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  277. package/dist/cjs/loader.cjs.js +1 -1
  278. package/dist/collection/components/accordion/components/accordion-section.js +3 -3
  279. package/dist/collection/components/accordion/components/accordion-section.js.map +1 -1
  280. package/dist/collection/components/onboarding-tip/onboarding-tip.css +21 -1
  281. package/dist/collection/components/onboarding-tip/onboarding-tip.js +28 -9
  282. package/dist/collection/components/onboarding-tip/onboarding-tip.js.map +1 -1
  283. package/dist/collection/components/table/table.css +2 -2
  284. package/dist/collection/components/table/table.js +3 -26
  285. package/dist/collection/components/table/table.js.map +1 -1
  286. package/dist/components/dso-accordion-section.js +3 -3
  287. package/dist/components/dso-accordion-section.js.map +1 -1
  288. package/dist/components/dso-onboarding-tip.js +26 -11
  289. package/dist/components/dso-onboarding-tip.js.map +1 -1
  290. package/dist/components/table.js +4 -8
  291. package/dist/components/table.js.map +1 -1
  292. package/dist/dso-toolkit/dso-accordion-section.entry.esm.js.map +1 -1
  293. package/dist/dso-toolkit/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.esm.js.map +1 -1
  294. package/dist/dso-toolkit/dso-onboarding-tip.entry.esm.js.map +1 -1
  295. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  296. package/dist/dso-toolkit/{p-8084c884.entry.js → p-5fa008c6.entry.js} +2 -2
  297. package/dist/dso-toolkit/{p-8084c884.entry.js.map → p-5fa008c6.entry.js.map} +1 -1
  298. package/dist/dso-toolkit/{p-6a156238.entry.js → p-6f89da1c.entry.js} +2 -2
  299. package/dist/dso-toolkit/{p-6a156238.entry.js.map → p-6f89da1c.entry.js.map} +1 -1
  300. package/dist/dso-toolkit/p-909118a3.entry.js +2 -0
  301. package/dist/dso-toolkit/p-909118a3.entry.js.map +1 -0
  302. package/dist/esm/dso-accordion-section.entry.js +3 -3
  303. package/dist/esm/dso-accordion-section.entry.js.map +1 -1
  304. package/dist/esm/dso-alert.dso-badge.dso-image-overlay.dso-ozon-content.dso-panel.dso-table.entry.js.map +1 -1
  305. package/dist/esm/dso-alert_6.entry.js +3 -7
  306. package/dist/esm/dso-alert_6.entry.js.map +1 -1
  307. package/dist/esm/dso-onboarding-tip.entry.js +24 -10
  308. package/dist/esm/dso-onboarding-tip.entry.js.map +1 -1
  309. package/dist/esm/dso-toolkit.js +1 -1
  310. package/dist/esm/loader.js +1 -1
  311. package/dist/types/components/onboarding-tip/onboarding-tip.d.ts +1 -0
  312. package/dist/types/components/table/table.d.ts +1 -4
  313. package/dist/types/components.d.ts +0 -8
  314. package/package.json +3 -3
  315. package/dist/dso-toolkit/p-c0410277.entry.js +0 -2
  316. package/dist/dso-toolkit/p-c0410277.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"file":"dso-attachments-counter.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface DsoAutosuggest extends Components.DsoAutosuggest, HTMLElement {}
4
+ export const DsoAutosuggest: {
5
+ prototype: DsoAutosuggest;
6
+ new (): DsoAutosuggest;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,588 @@
1
+ import { p as proxyCustomElement, H, e as createEvent, h, F as Fragment } from './p-DHO_Za64.js';
2
+ import { d as debounce } from './p-BxvZeNWe.js';
3
+ import { i as i18n } from './p-B_kXuEcW.js';
4
+ import { d as defineCustomElement$4 } from './p-D2nuXSd0.js';
5
+ import { d as defineCustomElement$3 } from './p-0JGmXD8O.js';
6
+ import { d as defineCustomElement$2 } from './p-DGWbWwct.js';
7
+ import { v as v4 } from './p-BF0_OXTe.js';
8
+
9
+ function escapeStringRegexp(string) {
10
+ if (typeof string !== 'string') {
11
+ throw new TypeError('Expected a string');
12
+ }
13
+
14
+ // Escape characters with special meaning either inside or outside character sets.
15
+ // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
16
+ return string
17
+ .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
18
+ .replace(/-/g, '\\x2d');
19
+ }
20
+
21
+ const translations = {
22
+ en: {
23
+ "dso-autosuggest": {
24
+ notFound: "{{inputValue}} was not found.",
25
+ },
26
+ },
27
+ nl: {
28
+ "dso-autosuggest": {
29
+ notFound: "{{inputValue}} is niet gevonden.",
30
+ },
31
+ },
32
+ };
33
+
34
+ const autosuggestCss = ".sc-dso-autosuggest-h{display:block;position:relative}.listbox-container.sc-dso-autosuggest{inset-inline:0;inset-block-start:100%;block-size:auto;max-block-size:var(--_dso-autosuggest-max-block-size);min-block-size:50px;overflow-y:auto;position:absolute;z-index:200}.listbox.sc-dso-autosuggest,.autosuggest-progress-box.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-block:0}.autosuggest-progress-box.sc-dso-autosuggest{padding-block:12px;padding-inline:8px}.listbox.sc-dso-autosuggest{padding-block:8px;padding-inline:0}.listbox.sc-dso-autosuggest .group.sc-dso-autosuggest:not(:first-child) .group-label.sc-dso-autosuggest{border-block-start:1px solid #b2b2b2;padding-block-start:12px}.listbox.sc-dso-autosuggest .group-label.sc-dso-autosuggest{color:#275937;font-weight:700;padding-block:4px;margin-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest{padding-block:4px;padding-inline:16px}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest .suggestion-row.sc-dso-autosuggest{display:flex;justify-content:space-between}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active{background-color:#275937}.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .type.sc-dso-autosuggest,.listbox.sc-dso-autosuggest .option.sc-dso-autosuggest:active .extra.sc-dso-autosuggest{color:#fff}.option[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#d7e7ce}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest,.extra.sc-dso-autosuggest{color:#666}.type.sc-dso-autosuggest{text-align:end}.extra.sc-dso-autosuggest{font-size:14px;line-height:21px}.extra.sc-dso-autosuggest:not(:first-child){text-align:end}";
35
+
36
+ const maxSuggestionsViewable = 10;
37
+ const listboxPaddingBlock = 8;
38
+ const listboxBorderWidth = 1;
39
+ const Option = ({ id, mouseEnter, mouseLeave, click, selected, suggestion, ref, markedSuggestion }) => (h("div", { class: "option", role: "option", id: id, onMouseEnter: mouseEnter, onMouseLeave: mouseLeave, onClick: click, "aria-selected": selected, "aria-label": suggestion.value, ref: ref }, h("div", { class: "suggestion-row" }, h("span", { class: "value" }, markedSuggestion.value), markedSuggestion.type ? h("span", { class: "type" }, markedSuggestion.type) : undefined), markedSuggestion.extras &&
40
+ markedSuggestion.extras.map((markedChunk) => (h("div", { class: "suggestion-row" }, markedChunk.map((extra) => (h("span", { class: "extra" }, extra))))))));
41
+ function isGrouped(suggestions) {
42
+ return (!!suggestions &&
43
+ suggestions.length > 0 &&
44
+ suggestions.every((suggestion) => suggestion !== undefined &&
45
+ "groupLabel" in suggestion &&
46
+ suggestion.groupLabel !== undefined &&
47
+ "suggestions" in suggestion &&
48
+ suggestion.suggestions.length > 0));
49
+ }
50
+ function isFlat(suggestions) {
51
+ return (!!suggestions &&
52
+ suggestions.length > 0 &&
53
+ suggestions.every((suggestion) => suggestion !== undefined && "value" in suggestion && suggestion.value !== undefined));
54
+ }
55
+ const Autosuggest = /*@__PURE__*/ proxyCustomElement(class Autosuggest extends H {
56
+ constructor() {
57
+ super();
58
+ this.__registerHost();
59
+ this.dsoSelect = createEvent(this, "dsoSelect", 7);
60
+ this.dsoChange = createEvent(this, "dsoChange", 7);
61
+ this.dsoSearch = createEvent(this, "dsoSearch", 7);
62
+ /**
63
+ * The suggestions for the value of the slotted input element.
64
+ *
65
+ * This can be an array of type Suggestion or an Array of type SuggestionGroup.
66
+ *
67
+ * A suggestionGroup must have a `groupLabel` and `suggestions`.
68
+ *
69
+ * A suggestion must have a `value` and can have a `type`, an `item` or `extras`.
70
+ *
71
+ * The `type` is used to style the suggestion. `item` can be use to reference the original object that was used to
72
+ * create the suggestion. `extras` is an array of additional strings to further specify the suggestion.
73
+ *
74
+ * The value should be null when no suggestions have been fetched.
75
+ */
76
+ this.suggestions = null;
77
+ /**
78
+ * Shows progress indicator when fetching results.
79
+ */
80
+ this.loading = false;
81
+ /**
82
+ * To override progress indicator's default loading label.
83
+ */
84
+ this.loadingLabel = "Een moment geduld.";
85
+ /**
86
+ * Whether the previous suggestions will be presented when the input gets focus again.
87
+ */
88
+ this.suggestOnFocus = false;
89
+ this.showSuggestions = false;
90
+ this.notFound = false;
91
+ this.showLoading = false;
92
+ // ListboxItems are used for the calculation of the listboxContainerMaxBlockSize
93
+ this.listboxItems = [];
94
+ this.listboxId = v4();
95
+ this.inputId = v4();
96
+ this.labelId = v4();
97
+ this.resizeObserver = new ResizeObserver(debounce(() => this.setListboxContainerMaxBlockSize(), 150));
98
+ this.debouncedEmitValue = debounce((value) => {
99
+ this.dsoChange.emit(value);
100
+ this.debouncedShowLoading();
101
+ }, 200);
102
+ this.debouncedShowLoading = debounce(() => {
103
+ if (this.inputValue) {
104
+ this.showLoading = true;
105
+ }
106
+ }, this.loadingDelayed);
107
+ this.inputValue = "";
108
+ this.onInput = (event) => {
109
+ if (!(event.target instanceof HTMLInputElement)) {
110
+ return;
111
+ // throw new Error("event.target is not instanceof HTMLInputElement"); #2293
112
+ }
113
+ this.showLoading = !this.loadingDelayed;
114
+ this.inputValue = event.target.value;
115
+ this.debouncedEmitValue(event.target.value.match(/(\S+)/g) ? event.target.value : "");
116
+ };
117
+ this.onFocusIn = () => {
118
+ if (this.suggestOnFocus) {
119
+ this.openSuggestions();
120
+ }
121
+ };
122
+ this.text = i18n(() => this.host, translations);
123
+ this.onWindowResize = debounce(() => this.setListboxContainerMaxBlockSize(), 150);
124
+ this.onScrollend = () => this.setListboxContainerMaxBlockSize();
125
+ this.onKeyDown = (event) => {
126
+ if (event.defaultPrevented || this.loading) {
127
+ return;
128
+ }
129
+ switch (event.key) {
130
+ case "ArrowDown":
131
+ if (!this.showSuggestions) {
132
+ this.openSuggestions("first");
133
+ }
134
+ else {
135
+ this.selectNextSuggestion();
136
+ }
137
+ break;
138
+ case "ArrowUp":
139
+ if (!this.showSuggestions) {
140
+ this.openSuggestions("last");
141
+ }
142
+ else {
143
+ this.selectPreviousSuggestion();
144
+ }
145
+ break;
146
+ case "Tab":
147
+ this.closeSuggestions();
148
+ return;
149
+ case "Escape":
150
+ this.closeSuggestions();
151
+ break;
152
+ case "Enter":
153
+ this.pickSelectedValue();
154
+ break;
155
+ default:
156
+ return;
157
+ }
158
+ event.preventDefault();
159
+ };
160
+ }
161
+ suggestionsWatcher() {
162
+ this.resetSelectedSuggestion();
163
+ if ((!this.showSuggestions || !this.notFound) && this.inputValue) {
164
+ this.openSuggestions();
165
+ }
166
+ else if ((this.showSuggestions || this.notFound) && !this.inputValue) {
167
+ this.closeSuggestions();
168
+ }
169
+ }
170
+ onDocumentClick(event) {
171
+ if ((this.showSuggestions || this.notFound) &&
172
+ this.listbox &&
173
+ event.target instanceof Node &&
174
+ !this.listbox.contains(event.target) &&
175
+ this.input !== event.target) {
176
+ this.closeSuggestions();
177
+ }
178
+ }
179
+ componentDidRender() {
180
+ this.setListboxContainerMaxBlockSize();
181
+ }
182
+ connectedCallback() {
183
+ const input = this.host.querySelector('input[type="text"]');
184
+ if (!(input instanceof HTMLInputElement)) {
185
+ return;
186
+ // throw new ReferenceError("Mandatory text input not found"); #2293
187
+ }
188
+ this.input = input;
189
+ if (input.id) {
190
+ this.inputId = input.id;
191
+ }
192
+ else {
193
+ input.id = this.inputId;
194
+ }
195
+ if (!this.input.labels || this.input.labels.length < 1) {
196
+ return;
197
+ // throw new ReferenceError("Mandatory label for text input not found"); #2293
198
+ }
199
+ const label = this.input.labels[0];
200
+ if (label === null || label === void 0 ? void 0 : label.id) {
201
+ this.labelId = label.id;
202
+ }
203
+ else if (label) {
204
+ label.id = this.labelId;
205
+ }
206
+ this.input.setAttribute("role", "combobox");
207
+ this.input.setAttribute("aria-haspopup", "listbox");
208
+ this.input.setAttribute("aria-expanded", "false");
209
+ this.input.setAttribute("autocomplete", "off");
210
+ this.input.setAttribute("aria-autocomplete", "list");
211
+ this.input.setAttribute("aria-activedescendant", "");
212
+ this.input.addEventListener("input", this.onInput);
213
+ this.input.addEventListener("keydown", this.onKeyDown);
214
+ this.input.addEventListener("focusin", this.onFocusIn);
215
+ window.addEventListener("resize", this.onWindowResize);
216
+ document.addEventListener("scrollend", this.onScrollend);
217
+ this.resizeObserver.observe(this.host);
218
+ }
219
+ disconnectedCallback() {
220
+ var _a, _b, _c;
221
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.removeEventListener("input", this.onInput);
222
+ (_b = this.input) === null || _b === void 0 ? void 0 : _b.removeEventListener("keydown", this.onKeyDown);
223
+ (_c = this.input) === null || _c === void 0 ? void 0 : _c.removeEventListener("focusin", this.onFocusIn);
224
+ window.removeEventListener("resize", this.onWindowResize);
225
+ document.removeEventListener("scrollend", this.onScrollend);
226
+ this.resizeObserver.disconnect();
227
+ }
228
+ setListboxContainerMaxBlockSize() {
229
+ var _a;
230
+ if (!this.listboxContainer || !this.showSuggestions) {
231
+ return;
232
+ }
233
+ if (this.showSuggestions) {
234
+ let blockSizeViewableListItems = 0;
235
+ let listboxContainerMaxBlockSize = 0;
236
+ // The total number of list items to reserve vertical space for.
237
+ const total = this.listboxItems.length ? Math.min(this.listboxItems.length, maxSuggestionsViewable) : 0;
238
+ for (let i = 0; i < total; i++) {
239
+ blockSizeViewableListItems =
240
+ blockSizeViewableListItems + (((_a = this.listboxItems[i]) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0);
241
+ }
242
+ const availableBlockSize = window.innerHeight - this.host.getBoundingClientRect().bottom;
243
+ const listboxMaxBlockSize = blockSizeViewableListItems + 2 * listboxPaddingBlock + 2 * listboxBorderWidth;
244
+ if (availableBlockSize < listboxMaxBlockSize || availableBlockSize <= blockSizeViewableListItems) {
245
+ listboxContainerMaxBlockSize = availableBlockSize - 2 * listboxPaddingBlock;
246
+ }
247
+ else {
248
+ listboxContainerMaxBlockSize = listboxMaxBlockSize;
249
+ }
250
+ this.listboxContainer.style.setProperty("--_dso-autosuggest-max-block-size", `${listboxContainerMaxBlockSize}px`);
251
+ }
252
+ }
253
+ showInputValueNotFound(text) {
254
+ var _a, _b;
255
+ return this.processAutosuggestMarkItems(this.markTerms((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.value.split(" ").filter((t) => t)) !== null && _b !== void 0 ? _b : [], text));
256
+ }
257
+ handleMark(suggestion, text, type, extraIndex) {
258
+ var _a, _b;
259
+ if (this.mark && type) {
260
+ return this.processAutosuggestMarkItems(this.mark(suggestion, text, type, extraIndex));
261
+ }
262
+ return this.processAutosuggestMarkItems(this.markTerms((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.value.split(" ").filter((t) => t)) !== null && _b !== void 0 ? _b : [], text));
263
+ }
264
+ markTerms(terms, suggestionValue) {
265
+ if (!suggestionValue || !terms || terms.length === 0 || terms[0] === undefined) {
266
+ return [""];
267
+ }
268
+ const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, "gi");
269
+ return suggestionValue.split(termRegex).reduce((total, valuePart) => {
270
+ if (!valuePart) {
271
+ total.push(valuePart);
272
+ }
273
+ else if (termRegex.test(valuePart)) {
274
+ total.push({ mark: valuePart });
275
+ }
276
+ else if (terms.length === 1) {
277
+ total.push(valuePart);
278
+ }
279
+ else {
280
+ total.push(...this.markTerms(terms.slice(1), valuePart));
281
+ }
282
+ return total;
283
+ }, []);
284
+ }
285
+ processAutosuggestMarkItems(items) {
286
+ if (items.length === 0) {
287
+ return [""];
288
+ }
289
+ return items.map((item) => {
290
+ if (typeof item === "object") {
291
+ return h("mark", null, item.mark);
292
+ }
293
+ return item;
294
+ });
295
+ }
296
+ selectSuggestion(suggestion, group) {
297
+ this.selectedSuggestion = suggestion;
298
+ this.selectedSuggestionGroup = group;
299
+ this.setAriaActiveDescendant();
300
+ }
301
+ selectFirstSuggestion() {
302
+ if (!this.suggestions) {
303
+ return;
304
+ }
305
+ if (isGrouped(this.suggestions) && this.selectedSuggestionGroup) {
306
+ this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[0];
307
+ }
308
+ else {
309
+ if (isFlat(this.suggestions)) {
310
+ this.selectedSuggestion = this.suggestions[0];
311
+ }
312
+ }
313
+ this.setAriaActiveDescendant(true);
314
+ }
315
+ selectLastSuggestion() {
316
+ if (!this.suggestions) {
317
+ return;
318
+ }
319
+ if (isGrouped(this.suggestions) && this.selectedSuggestionGroup) {
320
+ this.selectedSuggestion =
321
+ this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length - 1];
322
+ }
323
+ else {
324
+ if (isFlat(this.suggestions)) {
325
+ this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];
326
+ }
327
+ }
328
+ this.setAriaActiveDescendant(true);
329
+ }
330
+ selectNextSuggestion() {
331
+ var _a;
332
+ if (!this.suggestions) {
333
+ return;
334
+ }
335
+ if (isGrouped(this.suggestions)) {
336
+ this.selectNextGroupedSuggestion();
337
+ }
338
+ else {
339
+ const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;
340
+ this.selectedSuggestion = (_a = this.suggestions[index + 1]) !== null && _a !== void 0 ? _a : this.suggestions[0];
341
+ }
342
+ this.setAriaActiveDescendant(true);
343
+ }
344
+ selectNextGroupedSuggestion() {
345
+ var _a;
346
+ if (!this.suggestions) {
347
+ return;
348
+ }
349
+ if (this.selectedSuggestionGroup) {
350
+ const indexInGroup = this.selectedSuggestion
351
+ ? this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion)
352
+ : -1;
353
+ if (indexInGroup === this.selectedSuggestionGroup.suggestions.length - 1) {
354
+ // Move to first suggestion in next or first group
355
+ const groupIndex = this.suggestionGroups.indexOf(this.selectedSuggestionGroup);
356
+ this.selectedSuggestionGroup = (_a = this.suggestionGroups[groupIndex + 1]) !== null && _a !== void 0 ? _a : this.suggestionGroups[0];
357
+ this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[0];
358
+ }
359
+ else {
360
+ // Within this group
361
+ this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[indexInGroup + 1];
362
+ }
363
+ }
364
+ else {
365
+ this.selectedSuggestionGroup = this.suggestionGroups[0];
366
+ this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[0];
367
+ }
368
+ }
369
+ selectPreviousSuggestion() {
370
+ var _a;
371
+ if (!this.suggestions) {
372
+ return;
373
+ }
374
+ if (isGrouped(this.suggestions)) {
375
+ this.selectPreviousGroupedSuggestion();
376
+ }
377
+ else {
378
+ const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;
379
+ this.selectedSuggestion = (_a = this.suggestions[index - 1]) !== null && _a !== void 0 ? _a : this.suggestions[this.suggestions.length - 1];
380
+ }
381
+ this.setAriaActiveDescendant(true);
382
+ }
383
+ selectPreviousGroupedSuggestion() {
384
+ var _a;
385
+ if (!this.suggestions) {
386
+ return;
387
+ }
388
+ if (this.selectedSuggestionGroup) {
389
+ const indexInGroup = this.selectedSuggestion
390
+ ? this.selectedSuggestionGroup.suggestions.indexOf(this.selectedSuggestion)
391
+ : -1;
392
+ if (indexInGroup === 0) {
393
+ // Move to last suggestion in previous or last group
394
+ const groupIndex = this.suggestionGroups.indexOf(this.selectedSuggestionGroup);
395
+ this.selectedSuggestionGroup =
396
+ (_a = this.suggestionGroups[groupIndex - 1]) !== null && _a !== void 0 ? _a : this.suggestionGroups[this.suggestions.length - 1];
397
+ this.selectedSuggestion =
398
+ this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length - 1];
399
+ }
400
+ else {
401
+ // Within this group
402
+ this.selectedSuggestion = this.selectedSuggestionGroup.suggestions[indexInGroup - 1];
403
+ }
404
+ }
405
+ else {
406
+ this.selectedSuggestionGroup = this.suggestionGroups[this.suggestions.length - 1];
407
+ this.selectedSuggestion =
408
+ this.selectedSuggestionGroup.suggestions[this.selectedSuggestionGroup.suggestions.length - 1];
409
+ }
410
+ }
411
+ get suggestionGroups() {
412
+ return isGrouped(this.suggestions) ? this.suggestions : [];
413
+ }
414
+ setAriaActiveDescendant(scroll = false) {
415
+ var _a, _b;
416
+ if (this.selectedSuggestion) {
417
+ const id = this.selectedSuggestionGroup
418
+ ? this.listboxGroupedItemId(this.selectedSuggestionGroup, this.selectedSuggestion)
419
+ : this.listboxItemId(this.selectedSuggestion);
420
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-activedescendant", id);
421
+ if (scroll) {
422
+ (_b = document.getElementById(id)) === null || _b === void 0 ? void 0 : _b.scrollIntoView({ block: "nearest" });
423
+ }
424
+ }
425
+ }
426
+ resetSelectedSuggestion() {
427
+ var _a;
428
+ this.showLoading = !this.loadingDelayed;
429
+ this.notFound = false;
430
+ this.selectedSuggestion = undefined;
431
+ this.selectedSuggestionGroup = undefined;
432
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-activedescendant", "");
433
+ }
434
+ openSuggestions(selectSuggestion) {
435
+ var _a, _b, _c, _d;
436
+ this.showSuggestions = (_a = (this.suggestions && this.suggestions.length > 0)) !== null && _a !== void 0 ? _a : false;
437
+ this.notFound = (_c = (this.suggestions && ((_b = this.suggestions) === null || _b === void 0 ? void 0 : _b.length) === 0)) !== null && _c !== void 0 ? _c : false;
438
+ (_d = this.input) === null || _d === void 0 ? void 0 : _d.setAttribute("aria-expanded", (this.showSuggestions || this.notFound).toString());
439
+ if (this.showSuggestions && selectSuggestion === "first") {
440
+ this.selectFirstSuggestion();
441
+ }
442
+ else if (this.showSuggestions && selectSuggestion === "last") {
443
+ this.selectLastSuggestion();
444
+ }
445
+ }
446
+ closeSuggestions() {
447
+ var _a;
448
+ this.showSuggestions = false;
449
+ this.notFound = false;
450
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-expanded", "false");
451
+ this.selectFirstSuggestion();
452
+ }
453
+ pickSelectedValue() {
454
+ var _a;
455
+ if (this.selectedSuggestion && this.showSuggestions) {
456
+ this.dsoSelect.emit(this.selectedSuggestion);
457
+ }
458
+ else {
459
+ this.dsoSearch.emit((_a = this.input) === null || _a === void 0 ? void 0 : _a.value);
460
+ }
461
+ this.closeSuggestions();
462
+ }
463
+ listboxItemId(suggestion) {
464
+ if (!this.suggestions) {
465
+ return "";
466
+ }
467
+ return `${this.inputId}-${isFlat(this.suggestions) && this.suggestions.indexOf(suggestion) + 1}`;
468
+ }
469
+ listboxGroupedItemId(suggestionGroup, suggestion) {
470
+ if (!this.suggestions) {
471
+ return "";
472
+ }
473
+ return `${this.inputId}-${this.suggestionGroups.indexOf(suggestionGroup) + 1}-${suggestionGroup.suggestions.indexOf(suggestion) + 1}`;
474
+ }
475
+ getMarkedChunkedExtras(extras, suggestion) {
476
+ const chunkedExtras = extras.reduce((resultArray, extra, index) => {
477
+ var _a;
478
+ const chunkIndex = Math.floor(index / 2);
479
+ if (!resultArray[chunkIndex]) {
480
+ resultArray[chunkIndex] = [];
481
+ }
482
+ (_a = resultArray[chunkIndex]) === null || _a === void 0 ? void 0 : _a.push(extra);
483
+ return resultArray;
484
+ }, []);
485
+ return chunkedExtras.map((chunk, index) => chunk.map((c, i) => this.handleMark(suggestion, c, "extra", index * 2 + i)));
486
+ }
487
+ getMarkedSuggestions(suggestion) {
488
+ return {
489
+ value: this.handleMark(suggestion, suggestion.value, "value"),
490
+ type: suggestion.type ? this.handleMark(suggestion, suggestion.type, "type") : undefined,
491
+ extras: suggestion.extras ? this.getMarkedChunkedExtras(suggestion.extras, suggestion) : undefined,
492
+ };
493
+ }
494
+ getAutosuggestStatus() {
495
+ if (this.notFound) {
496
+ return `"${this.inputValue}" is niet gevonden.`;
497
+ }
498
+ let totalSuggestions = 0;
499
+ if (isFlat(this.suggestions)) {
500
+ totalSuggestions = this.suggestions.length;
501
+ }
502
+ else if (isGrouped(this.suggestions)) {
503
+ totalSuggestions = this.suggestions.reduce((count, group) => count + group.suggestions.length, 0);
504
+ }
505
+ return `${totalSuggestions} resultaten gevonden.`;
506
+ }
507
+ render() {
508
+ this.listboxItems = [];
509
+ const showListbox = this.showSuggestions || this.notFound;
510
+ const grouped = isGrouped(this.suggestions);
511
+ const flat = isFlat(this.suggestions);
512
+ if (showListbox && this.input) {
513
+ this.input.setAttribute("aria-controls", this.listboxId);
514
+ }
515
+ else if (this.input) {
516
+ this.input.removeAttribute("aria-controls");
517
+ }
518
+ return (h(Fragment, null, h("slot", { key: '75db3245d7e2a85722c0a408bfa8c2d117000a4a' }), this.loading && this.showLoading ? (h("div", { class: "autosuggest-progress-box" }, h("dso-progress-indicator", { label: this.loadingLabel }))) : (showListbox && (h(Fragment, null, h("dso-scrollable", { class: "listbox-container", ref: (element) => (this.listboxContainer = element) }, h("div", { class: "listbox", role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: (element) => (this.listbox = element), tabindex: "0" }, (flat &&
519
+ this.showSuggestions &&
520
+ this.suggestions &&
521
+ this.suggestions.map((suggestion) => (h(Option, { id: this.listboxItemId(suggestion), mouseEnter: () => this.selectSuggestion(suggestion), mouseLeave: () => this.resetSelectedSuggestion(), click: () => this.pickSelectedValue(), selected: (suggestion === this.selectedSuggestion).toString(), suggestion: suggestion, ref: (element) => element && this.listboxItems.push(element), markedSuggestion: this.getMarkedSuggestions(suggestion) })))) ||
522
+ (grouped &&
523
+ this.showSuggestions &&
524
+ this.suggestions &&
525
+ this.suggestions.map((suggestionGroup) => {
526
+ const groupLabelId = v4();
527
+ return (h("div", { role: "group", class: "group", "aria-labelledby": groupLabelId }, h("div", { class: "group-label", role: "presentation", id: groupLabelId, ref: (element) => element && this.listboxItems.push(element) }, suggestionGroup.groupLabel), suggestionGroup.suggestions.map((suggestion) => (h(Option, { id: this.listboxGroupedItemId(suggestionGroup, suggestion), mouseEnter: () => this.selectSuggestion(suggestion, suggestionGroup), mouseLeave: () => this.resetSelectedSuggestion(), click: () => this.pickSelectedValue(), selected: (suggestion === this.selectedSuggestion).toString(), suggestion: suggestion, ref: (element) => element && this.listboxItems.push(element), markedSuggestion: this.getMarkedSuggestions(suggestion) })))));
528
+ })) ||
529
+ (this.notFound && (h("div", { class: "option" }, h("span", { class: "value" }, this.notFoundLabel ||
530
+ this.showInputValueNotFound(this.text("notFound", { inputValue: this.inputValue })))))))), h("div", { class: "sr-only", "aria-live": "polite", "aria-atomic": "true" }, this.getAutosuggestStatus()))))));
531
+ }
532
+ get host() { return this; }
533
+ static get watchers() { return {
534
+ "suggestions": ["suggestionsWatcher"]
535
+ }; }
536
+ static get style() { return autosuggestCss; }
537
+ }, [6, "dso-autosuggest", {
538
+ "suggestions": [16],
539
+ "loading": [4],
540
+ "loadingLabel": [1, "loading-label"],
541
+ "loadingDelayed": [2, "loading-delayed"],
542
+ "notFoundLabel": [1, "not-found-label"],
543
+ "suggestOnFocus": [4, "suggest-on-focus"],
544
+ "mark": [16],
545
+ "showSuggestions": [32],
546
+ "selectedSuggestion": [32],
547
+ "selectedSuggestionGroup": [32],
548
+ "notFound": [32],
549
+ "showLoading": [32]
550
+ }, [[4, "click", "onDocumentClick"]], {
551
+ "suggestions": ["suggestionsWatcher"]
552
+ }]);
553
+ function defineCustomElement$1() {
554
+ if (typeof customElements === "undefined") {
555
+ return;
556
+ }
557
+ const components = ["dso-autosuggest", "dso-icon", "dso-progress-indicator", "dso-scrollable"];
558
+ components.forEach(tagName => { switch (tagName) {
559
+ case "dso-autosuggest":
560
+ if (!customElements.get(tagName)) {
561
+ customElements.define(tagName, Autosuggest);
562
+ }
563
+ break;
564
+ case "dso-icon":
565
+ if (!customElements.get(tagName)) {
566
+ defineCustomElement$4();
567
+ }
568
+ break;
569
+ case "dso-progress-indicator":
570
+ if (!customElements.get(tagName)) {
571
+ defineCustomElement$3();
572
+ }
573
+ break;
574
+ case "dso-scrollable":
575
+ if (!customElements.get(tagName)) {
576
+ defineCustomElement$2();
577
+ }
578
+ break;
579
+ } });
580
+ }
581
+
582
+ const DsoAutosuggest = Autosuggest;
583
+ const defineCustomElement = defineCustomElement$1;
584
+
585
+ export { DsoAutosuggest, defineCustomElement };
586
+ //# sourceMappingURL=dso-autosuggest.js.map
587
+
588
+ //# sourceMappingURL=dso-autosuggest.js.map