@vonage/vivid 5.23.1 → 5.24.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 (406) hide show
  1. package/accordion/index.cjs +1 -1
  2. package/accordion/index.js +1 -1
  3. package/accordion-item/index.cjs +1 -1
  4. package/accordion-item/index.js +1 -1
  5. package/audio-player/index.cjs +2 -2
  6. package/audio-player/index.js +3 -3
  7. package/badge/index.cjs +1 -1
  8. package/badge/index.js +1 -1
  9. package/bundled/definition15.cjs +8 -7
  10. package/bundled/definition15.js +26 -24
  11. package/bundled/definition17.cjs +2 -2
  12. package/bundled/definition17.js +2 -2
  13. package/bundled/definition18.cjs +12 -83
  14. package/bundled/definition18.js +35 -419
  15. package/bundled/definition19.cjs +87 -7
  16. package/bundled/definition19.js +432 -16
  17. package/bundled/definition20.cjs +7 -37
  18. package/bundled/definition20.js +17 -172
  19. package/bundled/definition21.cjs +35 -27
  20. package/bundled/definition21.js +154 -154
  21. package/bundled/definition22.cjs +29 -6
  22. package/bundled/definition22.js +172 -20
  23. package/bundled/definition23.cjs +6 -12
  24. package/bundled/definition23.js +17 -32
  25. package/bundled/definition24.cjs +12 -39
  26. package/bundled/definition24.js +32 -67
  27. package/bundled/definition25.cjs +44 -0
  28. package/bundled/definition25.js +77 -0
  29. package/bundled/extractOptions.cjs +1 -0
  30. package/bundled/extractOptions.js +11 -0
  31. package/bundled/listbox.cjs +1 -1
  32. package/bundled/listbox.js +24 -11
  33. package/bundled/render-in-light-dom.cjs +1 -1
  34. package/bundled/render-in-light-dom.js +16 -19
  35. package/bundled/vivid-element.cjs +1 -1
  36. package/bundled/vivid-element.js +9 -1
  37. package/combobox/definition.cjs +1 -1
  38. package/combobox/definition.js +1 -1
  39. package/combobox/index.cjs +7 -7
  40. package/combobox/index.js +29 -21
  41. package/country/definition.cjs +1 -1
  42. package/country/definition.js +1 -1
  43. package/country/index.cjs +1 -1
  44. package/country/index.js +1 -1
  45. package/country-group/definition.cjs +1 -1
  46. package/country-group/definition.js +1 -1
  47. package/country-group/index.cjs +1 -1
  48. package/country-group/index.js +2 -2
  49. package/custom-elements.json +3102 -2842
  50. package/data-grid/definition.cjs +1 -1
  51. package/data-grid/definition.js +1 -1
  52. package/data-grid/index.cjs +4 -4
  53. package/data-grid/index.js +5 -5
  54. package/date-picker/definition.cjs +1 -1
  55. package/date-picker/definition.js +1 -1
  56. package/date-picker/index.cjs +1 -1
  57. package/date-picker/index.js +1 -1
  58. package/date-range-picker/definition.cjs +1 -1
  59. package/date-range-picker/definition.js +1 -1
  60. package/date-range-picker/index.cjs +1 -1
  61. package/date-range-picker/index.js +1 -1
  62. package/date-time-picker/definition.cjs +1 -1
  63. package/date-time-picker/definition.js +1 -1
  64. package/date-time-picker/index.cjs +1 -1
  65. package/date-time-picker/index.js +1 -1
  66. package/dial-pad/definition.cjs +1 -1
  67. package/dial-pad/definition.js +1 -1
  68. package/dial-pad/index.cjs +24 -24
  69. package/dial-pad/index.js +120 -51
  70. package/dialog/definition.cjs +1 -1
  71. package/dialog/definition.js +1 -1
  72. package/divider/definition.cjs +1 -1
  73. package/divider/definition.js +1 -1
  74. package/divider/index.cjs +1 -1
  75. package/divider/index.js +1 -1
  76. package/empty-state/definition.cjs +1 -1
  77. package/empty-state/definition.js +1 -1
  78. package/fab/definition.cjs +1 -1
  79. package/fab/definition.js +1 -1
  80. package/file-picker/definition.cjs +1 -1
  81. package/file-picker/definition.js +1 -1
  82. package/flag/definition.cjs +1 -1
  83. package/flag/definition.js +1 -1
  84. package/header/definition.cjs +1 -1
  85. package/header/definition.js +1 -1
  86. package/header/index.cjs +3 -3
  87. package/header/index.js +3 -3
  88. package/index.cjs +200 -196
  89. package/index.js +53 -52
  90. package/kbd-key/definition.cjs +1 -1
  91. package/kbd-key/definition.js +1 -1
  92. package/kbd-shortcut/definition.cjs +1 -1
  93. package/kbd-shortcut/definition.js +1 -1
  94. package/layout/definition.cjs +1 -1
  95. package/layout/definition.js +1 -1
  96. package/lib/accordion-item/accordion-item.d.ts +2 -1
  97. package/lib/action-group/action-group.d.ts +1 -1
  98. package/lib/alert/alert.d.ts +2 -2
  99. package/lib/audio-player/audio-player.d.ts +1 -1
  100. package/lib/avatar/avatar.d.ts +1 -1
  101. package/lib/badge/badge.d.ts +1 -1
  102. package/lib/banner/banner.d.ts +3 -3
  103. package/lib/breadcrumb/breadcrumb.d.ts +1 -1
  104. package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  105. package/lib/button/button.d.ts +3 -3
  106. package/lib/calendar-event/calendar-event.d.ts +1 -1
  107. package/lib/card/card.d.ts +1 -1
  108. package/lib/checkbox/checkbox.d.ts +6 -6
  109. package/lib/color-picker/color-picker.d.ts +7 -7
  110. package/lib/combobox/combobox.d.ts +7 -7
  111. package/lib/components.d.ts +1 -0
  112. package/lib/country-group/country-group.d.ts +2 -2
  113. package/lib/data-grid/data-grid-cell.d.ts +4 -3
  114. package/lib/data-grid/data-grid-row.d.ts +3 -2
  115. package/lib/data-grid/data-grid.options.d.ts +5 -0
  116. package/lib/date-picker/date-picker.d.ts +8 -8
  117. package/lib/date-range-picker/date-range-picker.d.ts +4 -4
  118. package/lib/date-time-picker/date-time-picker.d.ts +8 -8
  119. package/lib/dial-pad/dial-pad.d.ts +2 -1
  120. package/lib/dialog/dialog.d.ts +2 -2
  121. package/lib/divider/divider.d.ts +1 -1
  122. package/lib/fab/fab.d.ts +1 -1
  123. package/lib/file-picker/file-picker.d.ts +7 -7
  124. package/lib/header/header.d.ts +1 -1
  125. package/lib/menu/menu.d.ts +2 -2
  126. package/lib/menu-item/menu-item.d.ts +3 -3
  127. package/lib/nav/nav.d.ts +1 -1
  128. package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
  129. package/lib/nav-item/nav-item.d.ts +2 -2
  130. package/lib/note/note.d.ts +1 -1
  131. package/lib/number-field/number-field.d.ts +9 -9
  132. package/lib/optgroup/definition.d.ts +3 -0
  133. package/lib/optgroup/index.d.ts +1 -0
  134. package/lib/optgroup/optgroup.d.ts +430 -0
  135. package/lib/optgroup/optgroup.template.d.ts +2 -0
  136. package/lib/optgroup/variations.browser-spec.d.ts +1 -0
  137. package/lib/option/option.d.ts +2 -2
  138. package/lib/pagination/pagination.d.ts +1 -1
  139. package/lib/popover/popover.d.ts +2 -2
  140. package/lib/progress/progress.d.ts +1 -1
  141. package/lib/progress-ring/progress-ring.d.ts +1 -1
  142. package/lib/radio/radio.d.ts +3 -3
  143. package/lib/radio-group/radio-group.d.ts +1 -1
  144. package/lib/range-slider/range-slider.d.ts +3 -3
  145. package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
  146. package/lib/searchable-select/option-tag.d.ts +1 -1
  147. package/lib/searchable-select/searchable-select.d.ts +47 -47
  148. package/lib/select/select.d.ts +9 -9
  149. package/lib/selectable-box/selectable-box.d.ts +1 -1
  150. package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
  151. package/lib/slider/slider.d.ts +3 -3
  152. package/lib/split-button/split-button.d.ts +3 -3
  153. package/lib/status/status.d.ts +1 -1
  154. package/lib/switch/switch.d.ts +2 -2
  155. package/lib/tab/tab.d.ts +3 -3
  156. package/lib/tab-panel/tab-panel.d.ts +1 -1
  157. package/lib/table/table-cell.d.ts +1 -1
  158. package/lib/table/table-header-cell.d.ts +1 -1
  159. package/lib/table/table-row.d.ts +1 -1
  160. package/lib/table/table-sorting-button.d.ts +1 -1
  161. package/lib/tag/tag.d.ts +3 -3
  162. package/lib/tag-group/tag-group.d.ts +1 -1
  163. package/lib/tag-name-map.d.ts +2 -1
  164. package/lib/text-area/text-area.d.ts +8 -8
  165. package/lib/text-field/text-field.d.ts +9 -9
  166. package/lib/time-picker/time-picker.d.ts +4 -4
  167. package/lib/toggletip/toggletip.d.ts +2 -2
  168. package/lib/tooltip/tooltip.d.ts +2 -2
  169. package/lib/tree-item/tree-item.d.ts +2 -2
  170. package/lib/tree-view/tree-view.d.ts +1 -1
  171. package/lib/video-player/video-player.d.ts +1 -1
  172. package/menu/index.cjs +1 -1
  173. package/menu/index.js +1 -1
  174. package/menu-item/index.cjs +1 -1
  175. package/menu-item/index.js +1 -1
  176. package/nav/definition.cjs +1 -1
  177. package/nav/definition.js +1 -1
  178. package/nav-disclosure/definition.cjs +1 -1
  179. package/nav-disclosure/definition.js +1 -1
  180. package/nav-item/definition.cjs +1 -1
  181. package/nav-item/definition.js +1 -1
  182. package/note/definition.cjs +1 -1
  183. package/note/definition.js +1 -1
  184. package/number-field/definition.cjs +1 -1
  185. package/number-field/definition.js +1 -1
  186. package/number-field/index.cjs +1 -1
  187. package/number-field/index.js +1 -1
  188. package/optgroup/definition.cjs +5 -0
  189. package/optgroup/definition.js +2 -0
  190. package/optgroup/index.cjs +1 -0
  191. package/optgroup/index.js +4 -0
  192. package/package.json +6 -6
  193. package/pagination/definition.cjs +1 -1
  194. package/pagination/definition.js +1 -1
  195. package/platform-switch/definition.cjs +1 -1
  196. package/platform-switch/definition.js +1 -1
  197. package/popover/definition.cjs +1 -1
  198. package/popover/definition.js +1 -1
  199. package/progress/definition.cjs +1 -1
  200. package/progress/definition.js +1 -1
  201. package/radio/definition.cjs +1 -1
  202. package/radio/definition.js +1 -1
  203. package/radio-group/definition.cjs +1 -1
  204. package/radio-group/definition.js +1 -1
  205. package/range-slider/definition.cjs +1 -1
  206. package/range-slider/definition.js +1 -1
  207. package/rich-text-editor/definition.cjs +1 -1
  208. package/rich-text-editor/definition.js +1 -1
  209. package/rich-text-editor/index.cjs +1 -1
  210. package/rich-text-editor/index.js +4 -4
  211. package/rich-text-view/definition.cjs +1 -1
  212. package/rich-text-view/definition.js +1 -1
  213. package/searchable-select/definition.cjs +1 -1
  214. package/searchable-select/definition.js +1 -1
  215. package/searchable-select/index.cjs +19 -19
  216. package/searchable-select/index.js +60 -45
  217. package/select/definition.cjs +1 -1
  218. package/select/definition.js +1 -1
  219. package/select/index.cjs +1 -1
  220. package/select/index.js +1 -1
  221. package/selectable-box/definition.cjs +1 -1
  222. package/selectable-box/definition.js +1 -1
  223. package/shared/aria/delegates-aria.d.ts +1 -1
  224. package/shared/aria/host-semantics.d.ts +1 -1
  225. package/shared/color-picker/base-color-picker.d.ts +1 -1
  226. package/shared/feedback/feedback-message.d.ts +1 -1
  227. package/shared/feedback/mixins.d.ts +2 -2
  228. package/shared/foundation/button/button.d.ts +2 -2
  229. package/shared/foundation/form-associated/form-associated.d.ts +2 -2
  230. package/shared/foundation/listbox/extractOptions.d.ts +2 -0
  231. package/shared/foundation/listbox/listbox.d.ts +2 -0
  232. package/shared/patterns/affix.d.ts +2 -2
  233. package/shared/patterns/anchored.d.ts +2 -2
  234. package/shared/patterns/char-count/char-count.d.ts +1 -1
  235. package/shared/patterns/form-elements/form-element.d.ts +1 -1
  236. package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
  237. package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
  238. package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
  239. package/shared/patterns/kbd-shortcut.d.ts +1 -1
  240. package/shared/patterns/linkable.d.ts +1 -1
  241. package/shared/patterns/localized.d.ts +2 -2
  242. package/shared/patterns/trapped-focus.d.ts +1 -1
  243. package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
  244. package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
  245. package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
  246. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
  247. package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
  248. package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
  249. package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
  250. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
  251. package/shared/picker-field/picker-field.d.ts +7 -7
  252. package/side-drawer/definition.cjs +1 -1
  253. package/side-drawer/definition.js +1 -1
  254. package/simple-color-picker/definition.cjs +1 -1
  255. package/simple-color-picker/definition.js +1 -1
  256. package/split-button/definition.cjs +1 -1
  257. package/split-button/definition.js +1 -1
  258. package/split-button/index.cjs +1 -0
  259. package/split-button/index.js +1 -0
  260. package/status/definition.cjs +1 -1
  261. package/status/definition.js +1 -1
  262. package/switch/definition.cjs +1 -1
  263. package/switch/definition.js +1 -1
  264. package/switch/index.cjs +6 -5
  265. package/switch/index.js +16 -14
  266. package/tab/definition.cjs +1 -1
  267. package/tab/definition.js +1 -1
  268. package/tab-panel/definition.cjs +1 -1
  269. package/tab-panel/definition.js +1 -1
  270. package/table/definition.cjs +1 -1
  271. package/table/definition.js +1 -1
  272. package/tabs/definition.cjs +1 -1
  273. package/tabs/definition.js +1 -1
  274. package/tag/definition.cjs +1 -1
  275. package/tag/definition.js +1 -1
  276. package/tag-group/definition.cjs +1 -1
  277. package/tag-group/definition.js +1 -1
  278. package/text-area/definition.cjs +1 -1
  279. package/text-area/definition.js +1 -1
  280. package/time-picker/definition.cjs +1 -1
  281. package/time-picker/definition.js +1 -1
  282. package/tree-item/definition.cjs +1 -1
  283. package/tree-item/definition.js +1 -1
  284. package/tree-view/definition.cjs +1 -1
  285. package/tree-view/definition.js +1 -1
  286. package/unbundled/definition13.cjs +1 -1
  287. package/unbundled/definition13.js +1 -1
  288. package/unbundled/definition2.cjs +9 -3
  289. package/unbundled/definition2.js +9 -3
  290. package/unbundled/definition23.cjs +1 -0
  291. package/unbundled/definition23.js +2 -1
  292. package/unbundled/definition29.cjs +2 -2
  293. package/unbundled/definition29.js +2 -2
  294. package/unbundled/definition30.cjs +65 -484
  295. package/unbundled/definition30.js +57 -482
  296. package/unbundled/definition31.cjs +501 -39
  297. package/unbundled/definition31.js +499 -37
  298. package/unbundled/definition32.cjs +38 -239
  299. package/unbundled/definition32.js +35 -236
  300. package/unbundled/definition33.cjs +236 -74
  301. package/unbundled/definition33.js +233 -71
  302. package/unbundled/definition34.cjs +74 -1968
  303. package/unbundled/definition34.js +70 -1940
  304. package/unbundled/definition35.cjs +1992 -26
  305. package/unbundled/definition35.js +1964 -27
  306. package/unbundled/definition36.cjs +26 -111
  307. package/unbundled/definition36.js +23 -103
  308. package/unbundled/definition37.cjs +53 -294
  309. package/unbundled/definition37.js +50 -291
  310. package/unbundled/definition38.cjs +282 -132
  311. package/unbundled/definition38.js +279 -129
  312. package/unbundled/definition39.cjs +165 -339
  313. package/unbundled/definition39.js +163 -337
  314. package/unbundled/definition40.cjs +394 -228
  315. package/unbundled/definition40.js +391 -225
  316. package/unbundled/definition41.cjs +263 -46
  317. package/unbundled/definition41.js +258 -41
  318. package/unbundled/definition42.cjs +47 -67
  319. package/unbundled/definition42.js +45 -65
  320. package/unbundled/definition43.cjs +56 -383
  321. package/unbundled/definition43.js +55 -382
  322. package/unbundled/definition44.cjs +386 -44
  323. package/unbundled/definition44.js +382 -40
  324. package/unbundled/definition45.cjs +53 -45
  325. package/unbundled/definition45.js +49 -41
  326. package/unbundled/definition46.cjs +40 -164
  327. package/unbundled/definition46.js +36 -160
  328. package/unbundled/definition47.cjs +171 -31
  329. package/unbundled/definition47.js +168 -22
  330. package/unbundled/definition48.cjs +30 -89
  331. package/unbundled/definition48.js +22 -87
  332. package/unbundled/definition49.cjs +70 -33
  333. package/unbundled/definition49.js +67 -30
  334. package/unbundled/definition50.cjs +54 -23
  335. package/unbundled/definition50.js +52 -18
  336. package/unbundled/definition51.cjs +23 -39
  337. package/unbundled/definition51.js +17 -36
  338. package/unbundled/definition52.cjs +29 -314
  339. package/unbundled/definition52.js +27 -312
  340. package/unbundled/definition53.cjs +301 -195
  341. package/unbundled/definition53.js +297 -191
  342. package/unbundled/definition54.cjs +210 -40
  343. package/unbundled/definition54.js +206 -36
  344. package/unbundled/definition55.cjs +42 -266
  345. package/unbundled/definition55.js +38 -262
  346. package/unbundled/definition56.cjs +266 -50
  347. package/unbundled/definition56.js +263 -46
  348. package/unbundled/definition57.cjs +48 -146
  349. package/unbundled/definition57.js +47 -143
  350. package/unbundled/definition58.cjs +127 -225
  351. package/unbundled/definition58.js +122 -223
  352. package/unbundled/definition59.cjs +199 -418
  353. package/unbundled/definition59.js +196 -415
  354. package/unbundled/definition60.cjs +441 -3738
  355. package/unbundled/definition60.js +431 -3565
  356. package/unbundled/definition61.cjs +3712 -728
  357. package/unbundled/definition61.js +3538 -717
  358. package/unbundled/definition62.cjs +769 -97
  359. package/unbundled/definition62.js +766 -94
  360. package/unbundled/definition63.cjs +100 -981
  361. package/unbundled/definition63.js +98 -976
  362. package/unbundled/definition64.cjs +988 -93
  363. package/unbundled/definition64.js +982 -90
  364. package/unbundled/definition65.cjs +109 -73
  365. package/unbundled/definition65.js +105 -63
  366. package/unbundled/definition66.cjs +69 -155
  367. package/unbundled/definition66.js +60 -152
  368. package/unbundled/definition67.cjs +154 -118
  369. package/unbundled/definition67.js +151 -115
  370. package/unbundled/definition68.cjs +124 -49
  371. package/unbundled/definition68.js +120 -45
  372. package/unbundled/definition69.cjs +51 -84
  373. package/unbundled/definition69.js +50 -80
  374. package/unbundled/definition70.cjs +91 -19
  375. package/unbundled/definition70.js +86 -14
  376. package/unbundled/definition71.cjs +20 -87
  377. package/unbundled/definition71.js +14 -84
  378. package/unbundled/definition72.cjs +76 -294
  379. package/unbundled/definition72.js +71 -217
  380. package/unbundled/definition73.cjs +288 -311
  381. package/unbundled/definition73.js +218 -306
  382. package/unbundled/definition74.cjs +326 -26
  383. package/unbundled/definition74.js +317 -23
  384. package/unbundled/definition75.cjs +27 -122
  385. package/unbundled/definition75.js +22 -118
  386. package/unbundled/definition76.cjs +103 -232
  387. package/unbundled/definition76.js +99 -228
  388. package/unbundled/definition77.cjs +259 -26
  389. package/unbundled/definition77.js +249 -23
  390. package/unbundled/definition78.cjs +29 -148
  391. package/unbundled/definition78.js +27 -133
  392. package/unbundled/definition79.cjs +117 -173
  393. package/unbundled/definition79.js +108 -169
  394. package/unbundled/definition80.cjs +181 -477
  395. package/unbundled/definition80.js +176 -471
  396. package/unbundled/definition81.cjs +517 -0
  397. package/unbundled/definition81.js +497 -0
  398. package/unbundled/extractOptions.cjs +21 -0
  399. package/unbundled/extractOptions.js +16 -0
  400. package/unbundled/listbox.cjs +23 -6
  401. package/unbundled/listbox.js +23 -6
  402. package/unbundled/vivid-element.cjs +10 -1
  403. package/unbundled/vivid-element.js +10 -1
  404. package/video-player/definition.cjs +1 -1
  405. package/video-player/definition.js +1 -1
  406. package/vivid.api.json +194 -0
@@ -1,1967 +1,97 @@
1
1
  import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
2
- import { r as Icon, t as iconDefinition } from "./definition.js";
2
+ import { n as resolveIcon, r as PLACEHOLDER_ICON, t as numberConverter } from "./numberConverter.js";
3
3
  import { t as __decorate } from "./decorate.js";
4
- import { t as Localized } from "./localized.js";
5
- import { n as keyArrowRight$1, t as keyArrowLeft$1 } from "./key-codes.js";
6
- import { n as applyHostSemantics, t as HostSemantics } from "./host-semantics.js";
7
4
  import { n as visuallyHiddenDefinition, r as VisuallyHidden } from "./definition22.js";
8
- import { a as GenerateHeaderOptions, i as DataGridRowTypes, n as DataGridCellSortStates, r as DataGridCellTypes, t as DataGridCellRole } from "./data-grid.options.js";
9
- import { Observable, RepeatDirective, Updates, attr, children, elements, html, normalizeBinding, nullableNumberConverter, observable, slotted, when } from "@microsoft/fast-element";
10
- import { classNames, eventFocus, eventFocusIn, eventFocusOut, eventKeyDown, keyArrowDown, keyArrowUp, keyEnd, keyEnter, keyEscape, keyFunction2, keyHome, keyPageDown, keyPageUp, keySpace } from "@microsoft/fast-web-utilities";
11
- //#region src/lib/data-grid/data-grid.scss?inline
12
- var data_grid_default = ":host{display:block}:host([generate-header=sticky]){max-block-size:400px}.base{--scrollbar-track-color:transparent;--scrollbar-thumb-color:color-mix(in sRGB, var(--vvd-color-neutral-950), transparent 70%);scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.base ::-webkit-scrollbar{width:4px}.base ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.base ::-webkit-scrollbar-thumb{background-color:var(--scrollbar-fallback-track-color,var(--scrollbar-thumb-color));border:0;border-radius:4px}.base{block-size:inherit;inline-size:100%;max-block-size:inherit;position:relative;overflow:auto}";
5
+ import { t as getFlagIconName } from "./utils.js";
6
+ import { attr, html, observable, when } from "@microsoft/fast-element";
7
+ import { classNames } from "@microsoft/fast-web-utilities";
8
+ //#region src/lib/flag/flag.scss?inline
9
+ var flag_default = ":host{vertical-align:sub;display:inline-block}.control.size--6{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--5{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 20))}.control.size--4{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}.control.size--3{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 12))}.control.size--2{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.control.size--1{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 4))}.control.size-0{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.control.size-1{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 4))}.control.size-2{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.control.size-3{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 12))}.control.size-4{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 16))}.control.size-5{--_flag-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 20))}.control:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_flag-block-size:1em}.control{margin:unset;block-size:var(--_flag-block-size);color:currentColor;contain:strict;inline-size:var(--_flag-block-size);display:flex}svg{block-size:inherit;inline-size:inherit;margin:auto}";
13
10
  //#endregion
14
- //#region src/lib/data-grid/data-grid-row.scss?inline
15
- var data_grid_row_default = ".base.connotation-cta{--_connotation-color-primary:var(--vvd-data-grid-row-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-data-grid-row-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-row-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-data-grid-row-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-data-grid-row-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-data-grid-row-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-data-grid-row-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-data-grid-row-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-data-grid-row-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-data-grid-row-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-row-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-data-grid-row-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-data-grid-row-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-data-grid-row-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-data-grid-row-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-data-grid-row-accent-dim,var(--vvd-color-neutral-200))}.base{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}.base{box-sizing:border-box;width:100%;color:var(--vvd-color-canvas-text);display:grid}:host([row-type=sticky-header]) .base{z-index:9;background:var(--data-grid-row-background,var(--vvd-color-canvas));position:sticky;top:0}:host([row-type=hidden-header]) .base{display:none}:host([selected]:not([row-type*=header])) .base{background-color:var(--_appearance-color-fill)}";
16
- //#endregion
17
- //#region src/lib/data-grid/data-grid-cell.scss?inline
18
- var data_grid_cell_default = ":host{block-size:100%;min-inline-size:80px}:host(:focus-visible){outline:none}:host([data-fixed]){z-index:5;background:var(--data-grid-cell-background,var(--vvd-color-surface-2dp));position:sticky}:host([data-fixed]):before{z-index:1;width:1px;content:\"\";pointer-events:none;block-size:100%;position:absolute;top:0;right:0;box-shadow:4px 0 4px #0000001a,2px 0 2px #0000000d,1px 0 1px #0000000d}.base.connotation-cta{--_connotation-color-primary:var(--vvd-data-grid-cell-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-data-grid-cell-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-cell-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-data-grid-cell-cta-firm,var(--vvd-color-cta-600));--_connotation-color-soft:var(--vvd-data-grid-cell-cta-soft,var(--vvd-color-cta-100));--_connotation-color-faint:var(--vvd-data-grid-cell-cta-faint,var(--vvd-color-cta-50));--_connotation-color-pale:var(--vvd-data-grid-cell-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-data-grid-cell-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-data-grid-cell-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-data-grid-cell-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-data-grid-cell-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-data-grid-cell-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-soft:var(--vvd-data-grid-cell-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-faint:var(--vvd-data-grid-cell-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-pale:var(--vvd-data-grid-cell-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-data-grid-cell-accent-dim,var(--vvd-color-neutral-200))}.base{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}.base{box-sizing:border-box;border-bottom:1px solid var(--vvd-color-neutral-300);block-size:var(--data-grid-cell-block-size,var(--_data-grid-cell-default-block-size));color:var(--_appearance-color-text);font:var(--vvd-typography-base);min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));align-items:center;padding-block:13px 14px;padding-inline:12px;display:flex}:host(:focus-visible) .base{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}:host([cell-type=columnheader]) .base{border-color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);--_data-grid-cell-default-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8));--_data-grid-cell-default-white-space:nowrap}:host(:not([cell-type=columnheader])) .base{--_data-grid-cell-default-block-size:100%;--_data-grid-cell-default-white-space:normal}:host([selected]:not([cell-type=columnheader])) .base{background-color:var(--_appearance-color-fill)}.content{align-items:center;display:flex;overflow:hidden}.content[role=button]{cursor:pointer}slot:not([name]){text-overflow:ellipsis;white-space:var(--data-grid-cell-white-space,var(--_data-grid-cell-default-white-space));display:block;overflow:hidden}:host(:not([cell-type=columnheader][aria-sort])) slot:not([name]){inline-size:100%}.header-icon{flex-shrink:0;margin-inline-start:16px}slot[name=action-items]{flex-shrink:0;align-items:center;display:flex}.base.has-action-items slot[name=action-items]{margin-inline-start:16px}";
19
- //#endregion
20
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/interfaces.js
21
- var kernelMode;
22
- var kernelAttr = "fast-kernel";
23
- try {
24
- if (document.currentScript) kernelMode = document.currentScript.getAttribute(kernelAttr);
25
- else {
26
- const scripts = document.getElementsByTagName("script");
27
- kernelMode = scripts[scripts.length - 1].getAttribute(kernelAttr);
28
- }
29
- } catch (e) {
30
- kernelMode = "isolate";
31
- }
32
- var KernelServiceId;
33
- switch (kernelMode) {
34
- case "share":
35
- KernelServiceId = Object.freeze({
36
- updateQueue: 1,
37
- observable: 2,
38
- contextEvent: 3,
39
- elementRegistry: 4
40
- });
41
- break;
42
- case "share-v2":
43
- KernelServiceId = Object.freeze({
44
- updateQueue: 1.2,
45
- observable: 2.2,
46
- contextEvent: 3.2,
47
- elementRegistry: 4.2
48
- });
49
- break;
50
- default:
51
- const postfix = `-${Math.random().toString(36).substring(2, 8)}`;
52
- KernelServiceId = Object.freeze({
53
- updateQueue: `1.2${postfix}`,
54
- observable: `2.2${postfix}`,
55
- contextEvent: `3.2${postfix}`,
56
- elementRegistry: `4.2${postfix}`
57
- });
58
- break;
59
- }
60
- /**
61
- * Warning and error messages.
62
- * @internal
63
- */
64
- var Message;
65
- (function(Message) {
66
- Message[Message["needsArrayObservation"] = 1101] = "needsArrayObservation";
67
- Message[Message["onlySetDOMPolicyOnce"] = 1201] = "onlySetDOMPolicyOnce";
68
- Message[Message["bindingInnerHTMLRequiresTrustedTypes"] = 1202] = "bindingInnerHTMLRequiresTrustedTypes";
69
- Message[Message["twoWayBindingRequiresObservables"] = 1203] = "twoWayBindingRequiresObservables";
70
- Message[Message["hostBindingWithoutHost"] = 1204] = "hostBindingWithoutHost";
71
- Message[Message["unsupportedBindingBehavior"] = 1205] = "unsupportedBindingBehavior";
72
- Message[Message["directCallToHTMLTagNotAllowed"] = 1206] = "directCallToHTMLTagNotAllowed";
73
- Message[Message["onlySetTemplatePolicyOnce"] = 1207] = "onlySetTemplatePolicyOnce";
74
- Message[Message["cannotSetTemplatePolicyAfterCompilation"] = 1208] = "cannotSetTemplatePolicyAfterCompilation";
75
- Message[Message["blockedByDOMPolicy"] = 1209] = "blockedByDOMPolicy";
76
- Message[Message["missingElementDefinition"] = 1401] = "missingElementDefinition";
77
- Message[Message["noRegistrationForContext"] = 1501] = "noRegistrationForContext";
78
- Message[Message["noFactoryForResolver"] = 1502] = "noFactoryForResolver";
79
- Message[Message["invalidResolverStrategy"] = 1503] = "invalidResolverStrategy";
80
- Message[Message["cannotAutoregisterDependency"] = 1504] = "cannotAutoregisterDependency";
81
- Message[Message["cannotResolveKey"] = 1505] = "cannotResolveKey";
82
- Message[Message["cannotConstructNativeFunction"] = 1506] = "cannotConstructNativeFunction";
83
- Message[Message["cannotJITRegisterNonConstructor"] = 1507] = "cannotJITRegisterNonConstructor";
84
- Message[Message["cannotJITRegisterIntrinsic"] = 1508] = "cannotJITRegisterIntrinsic";
85
- Message[Message["cannotJITRegisterInterface"] = 1509] = "cannotJITRegisterInterface";
86
- Message[Message["invalidResolver"] = 1510] = "invalidResolver";
87
- Message[Message["invalidKey"] = 1511] = "invalidKey";
88
- Message[Message["noDefaultResolver"] = 1512] = "noDefaultResolver";
89
- Message[Message["cyclicDependency"] = 1513] = "cyclicDependency";
90
- Message[Message["connectUpdateRequiresController"] = 1514] = "connectUpdateRequiresController";
91
- })(Message || (Message = {}));
92
- /**
93
- * Determines whether or not an object is a function.
94
- * @public
95
- */
96
- var isFunction = (object) => typeof object === "function";
97
- /**
98
- * Determines whether or not an object is a string.
99
- * @public
100
- */
101
- var isString = (object) => typeof object === "string";
102
- /**
103
- * A function which does nothing.
104
- * @public
105
- */
106
- var noop = () => void 0;
107
- //#endregion
108
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/polyfills.js
109
- (function ensureGlobalThis() {
110
- if (typeof globalThis !== "undefined") return;
111
- if (typeof global !== "undefined") global.globalThis = global;
112
- else if (typeof self !== "undefined") self.globalThis = self;
113
- else if (typeof window !== "undefined") window.globalThis = window;
114
- else {
115
- const result = new Function("return this")();
116
- result.globalThis = result;
117
- }
118
- })();
119
- (function requestIdleCallbackPolyfill() {
120
- if ("requestIdleCallback" in globalThis) return;
121
- /**
122
- * A polyfill for requestIdleCallback that falls back to setTimeout.
123
- *
124
- * @param callback - The function to call when the browser is idle.
125
- * @param options - Options object that may contain a timeout property.
126
- * @returns An ID that can be used to cancel the callback.
127
- * @public
128
- */
129
- globalThis.requestIdleCallback = function requestIdleCallback(callback, options) {
130
- const start = Date.now();
131
- return setTimeout(() => {
132
- callback({
133
- didTimeout: (options === null || options === void 0 ? void 0 : options.timeout) ? Date.now() - start >= options.timeout : false,
134
- timeRemaining: () => 0
135
- });
136
- }, 1);
137
- };
138
- /**
139
- * A polyfill for cancelIdleCallback that falls back to clearTimeout.
140
- *
141
- * @param id - The ID of the callback to cancel.
142
- * @public
143
- */
144
- globalThis.cancelIdleCallback = function cancelIdleCallback(id) {
145
- clearTimeout(id);
146
- };
147
- })();
148
- //#endregion
149
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/platform.js
150
- var propConfig = {
151
- configurable: false,
152
- enumerable: false,
153
- writable: false
154
- };
155
- if (globalThis.FAST === void 0) Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: Object.create(null) }, propConfig));
156
- /**
157
- * The FAST global.
158
- * @public
159
- */
160
- var FAST = globalThis.FAST;
161
- if (FAST.getById === void 0) {
162
- const storage = Object.create(null);
163
- Reflect.defineProperty(FAST, "getById", Object.assign({ value(id, initialize) {
164
- let found = storage[id];
165
- if (found === void 0) found = initialize ? storage[id] = initialize() : null;
166
- return found;
167
- } }, propConfig));
168
- }
169
- if (FAST.error === void 0) Object.assign(FAST, {
170
- warn() {},
171
- error(code) {
172
- return /* @__PURE__ */ new Error(`Error ${code}`);
173
- },
174
- addMessages() {}
175
- });
176
- Object.freeze([]);
177
- /**
178
- * Creates a function capable of locating metadata associated with a type.
179
- * @returns A metadata locator function.
180
- * @internal
181
- */
182
- function createMetadataLocator() {
183
- const metadataLookup = /* @__PURE__ */ new WeakMap();
184
- return function(target) {
185
- let metadata = metadataLookup.get(target);
186
- if (metadata === void 0) {
187
- let currentTarget = Reflect.getPrototypeOf(target);
188
- while (metadata === void 0 && currentTarget !== null) {
189
- metadata = metadataLookup.get(currentTarget);
190
- currentTarget = Reflect.getPrototypeOf(currentTarget);
191
- }
192
- metadata = metadata === void 0 ? [] : metadata.slice(0);
193
- metadataLookup.set(target, metadata);
194
- }
195
- return metadata;
196
- };
197
- }
198
- /**
199
- * Makes a type noop for JSON serialization.
200
- * @param type - The type to make noop for JSON serialization.
201
- * @internal
202
- */
203
- function makeSerializationNoop(type) {
204
- type.prototype.toJSON = noop;
205
- }
206
- Object.freeze({
207
- /**
208
- * Not aspected.
209
- */
210
- none: 0,
211
- /**
212
- * An attribute.
213
- */
214
- attribute: 1,
215
- /**
216
- * A boolean attribute.
217
- */
218
- booleanAttribute: 2,
219
- /**
220
- * A property.
221
- */
222
- property: 3,
223
- /**
224
- * Content
225
- */
226
- content: 4,
227
- /**
228
- * A token list.
229
- */
230
- tokenList: 5,
231
- /**
232
- * An event.
233
- */
234
- event: 6
235
- });
236
- var createHTML = (html) => html;
237
- var fastTrustedType = globalThis.trustedTypes ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML }) : { createHTML };
238
- var defaultPolicy = Object.freeze({
239
- createHTML(value) {
240
- return fastTrustedType.createHTML(value);
241
- },
242
- protect(tagName, aspect, aspectName, sink) {
243
- return sink;
244
- }
245
- });
246
- var fastPolicy = defaultPolicy;
247
- /**
248
- * Common DOM APIs.
249
- * @public
250
- */
251
- var DOM$1 = Object.freeze({
252
- /**
253
- * Gets the dom policy used by the templating system.
254
- */
255
- get policy() {
256
- return defaultPolicy;
257
- },
258
- /**
259
- * Sets the dom policy used by the templating system.
260
- * @param policy - The policy to set.
261
- * @remarks
262
- * This API can only be called once, for security reasons. It should be
263
- * called by the application developer at the start of their program.
264
- */
265
- setPolicy(value) {
266
- if (defaultPolicy !== fastPolicy) throw FAST.error(Message.onlySetDOMPolicyOnce);
267
- defaultPolicy = value;
268
- },
269
- /**
270
- * Sets an attribute value on an element.
271
- * @param element - The element to set the attribute value on.
272
- * @param attributeName - The attribute name to set.
273
- * @param value - The value of the attribute to set.
274
- * @remarks
275
- * If the value is `null` or `undefined`, the attribute is removed, otherwise
276
- * it is set to the provided value using the standard `setAttribute` API.
277
- */
278
- setAttribute(element, attributeName, value) {
279
- value === null || value === void 0 ? element.removeAttribute(attributeName) : element.setAttribute(attributeName, value);
280
- },
281
- /**
282
- * Sets a boolean attribute value.
283
- * @param element - The element to set the boolean attribute value on.
284
- * @param attributeName - The attribute name to set.
285
- * @param value - The value of the attribute to set.
286
- * @remarks
287
- * If the value is true, the attribute is added; otherwise it is removed.
288
- */
289
- setBooleanAttribute(element, attributeName, value) {
290
- value ? element.setAttribute(attributeName, "") : element.removeAttribute(attributeName);
291
- }
292
- });
293
- //#endregion
294
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/observation/notifier.js
295
- /**
296
- * An implementation of {@link Notifier} that efficiently keeps track of
297
- * subscribers interested in a specific change notification on an
298
- * observable subject.
299
- *
300
- * @remarks
301
- * This set is optimized for the most common scenario of 1 or 2 subscribers.
302
- * With this in mind, it can store a subscriber in an internal field, allowing it to avoid Array#push operations.
303
- * If the set ever exceeds two subscribers, it upgrades to an array automatically.
304
- * @public
305
- */
306
- var SubscriberSet = class {
307
- /**
308
- * Creates an instance of SubscriberSet for the specified subject.
309
- * @param subject - The subject that subscribers will receive notifications from.
310
- * @param initialSubscriber - An initial subscriber to changes.
311
- */
312
- constructor(subject, initialSubscriber) {
313
- this.sub1 = void 0;
314
- this.sub2 = void 0;
315
- this.spillover = void 0;
316
- this.subject = subject;
317
- this.sub1 = initialSubscriber;
318
- }
319
- /**
320
- * Checks whether the provided subscriber has been added to this set.
321
- * @param subscriber - The subscriber to test for inclusion in this set.
322
- */
323
- has(subscriber) {
324
- return this.spillover === void 0 ? this.sub1 === subscriber || this.sub2 === subscriber : this.spillover.indexOf(subscriber) !== -1;
325
- }
326
- /**
327
- * Subscribes to notification of changes in an object's state.
328
- * @param subscriber - The object that is subscribing for change notification.
329
- */
330
- subscribe(subscriber) {
331
- const spillover = this.spillover;
332
- if (spillover === void 0) {
333
- if (this.has(subscriber)) return;
334
- if (this.sub1 === void 0) {
335
- this.sub1 = subscriber;
336
- return;
337
- }
338
- if (this.sub2 === void 0) {
339
- this.sub2 = subscriber;
340
- return;
341
- }
342
- this.spillover = [
343
- this.sub1,
344
- this.sub2,
345
- subscriber
346
- ];
347
- this.sub1 = void 0;
348
- this.sub2 = void 0;
349
- } else if (spillover.indexOf(subscriber) === -1) spillover.push(subscriber);
350
- }
351
- /**
352
- * Unsubscribes from notification of changes in an object's state.
353
- * @param subscriber - The object that is unsubscribing from change notification.
354
- */
355
- unsubscribe(subscriber) {
356
- const spillover = this.spillover;
357
- if (spillover === void 0) {
358
- if (this.sub1 === subscriber) this.sub1 = void 0;
359
- else if (this.sub2 === subscriber) this.sub2 = void 0;
360
- } else {
361
- const index = spillover.indexOf(subscriber);
362
- if (index !== -1) spillover.splice(index, 1);
363
- }
364
- }
365
- /**
366
- * Notifies all subscribers.
367
- * @param args - Data passed along to subscribers during notification.
368
- */
369
- notify(args) {
370
- const spillover = this.spillover;
371
- const subject = this.subject;
372
- if (spillover === void 0) {
373
- const sub1 = this.sub1;
374
- const sub2 = this.sub2;
375
- if (sub1 !== void 0) sub1.handleChange(subject, args);
376
- if (sub2 !== void 0) sub2.handleChange(subject, args);
377
- } else for (let i = 0, ii = spillover.length; i < ii; ++i) spillover[i].handleChange(subject, args);
378
- }
379
- };
380
- /**
381
- * An implementation of Notifier that allows subscribers to be notified
382
- * of individual property changes on an object.
383
- * @public
384
- */
385
- var PropertyChangeNotifier = class {
386
- /**
387
- * Creates an instance of PropertyChangeNotifier for the specified subject.
388
- * @param subject - The object that subscribers will receive notifications for.
389
- */
390
- constructor(subject) {
391
- this.subscribers = {};
392
- this.subjectSubscribers = null;
393
- this.subject = subject;
394
- }
395
- /**
396
- * Notifies all subscribers, based on the specified property.
397
- * @param propertyName - The property name, passed along to subscribers during notification.
398
- */
399
- notify(propertyName) {
400
- var _a, _b;
401
- (_a = this.subscribers[propertyName]) === null || _a === void 0 || _a.notify(propertyName);
402
- (_b = this.subjectSubscribers) === null || _b === void 0 || _b.notify(propertyName);
403
- }
404
- /**
405
- * Subscribes to notification of changes in an object's state.
406
- * @param subscriber - The object that is subscribing for change notification.
407
- * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
408
- */
409
- subscribe(subscriber, propertyToWatch) {
410
- var _a, _b;
411
- let subscribers;
412
- if (propertyToWatch) subscribers = (_a = this.subscribers[propertyToWatch]) !== null && _a !== void 0 ? _a : this.subscribers[propertyToWatch] = new SubscriberSet(this.subject);
413
- else subscribers = (_b = this.subjectSubscribers) !== null && _b !== void 0 ? _b : this.subjectSubscribers = new SubscriberSet(this.subject);
414
- subscribers.subscribe(subscriber);
415
- }
416
- /**
417
- * Unsubscribes from notification of changes in an object's state.
418
- * @param subscriber - The object that is unsubscribing from change notification.
419
- * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
420
- */
421
- unsubscribe(subscriber, propertyToUnwatch) {
422
- var _a, _b;
423
- if (propertyToUnwatch) (_a = this.subscribers[propertyToUnwatch]) === null || _a === void 0 || _a.unsubscribe(subscriber);
424
- else (_b = this.subjectSubscribers) === null || _b === void 0 || _b.unsubscribe(subscriber);
425
- }
426
- };
427
- //#endregion
428
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/observation/update-queue.js
429
- /**
430
- * The default UpdateQueue.
431
- * @public
432
- */
433
- var Updates$1 = FAST.getById(KernelServiceId.updateQueue, () => {
434
- const tasks = [];
435
- const pendingErrors = [];
436
- const rAF = globalThis.requestAnimationFrame;
437
- let updateAsync = true;
438
- function throwFirstError() {
439
- if (pendingErrors.length) throw pendingErrors.shift();
440
- }
441
- function tryRunTask(task) {
442
- try {
443
- task.call();
444
- } catch (error) {
445
- if (updateAsync) {
446
- pendingErrors.push(error);
447
- setTimeout(throwFirstError, 0);
448
- } else {
449
- tasks.length = 0;
450
- throw error;
451
- }
452
- }
453
- }
454
- function process() {
455
- const capacity = 1024;
456
- let index = 0;
457
- while (index < tasks.length) {
458
- tryRunTask(tasks[index]);
459
- index++;
460
- if (index > capacity) {
461
- for (let scan = 0, newLength = tasks.length - index; scan < newLength; scan++) tasks[scan] = tasks[scan + index];
462
- tasks.length -= index;
463
- index = 0;
464
- }
465
- }
466
- tasks.length = 0;
467
- }
468
- function enqueue(callable) {
469
- tasks.push(callable);
470
- if (tasks.length < 2) updateAsync ? rAF(process) : process();
471
- }
472
- return Object.freeze({
473
- enqueue,
474
- next: () => new Promise(enqueue),
475
- process,
476
- setMode: (isAsync) => updateAsync = isAsync
477
- });
478
- });
479
- //#endregion
480
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/observation/observable.js
481
- /**
482
- * Describes how the source's lifetime relates to its controller's lifetime.
483
- * @public
484
- */
485
- var SourceLifetime = Object.freeze({
486
- /**
487
- * The source to controller lifetime relationship is unknown.
488
- */
489
- unknown: void 0,
490
- /**
491
- * The source and controller lifetimes are coupled to one another.
492
- * They can/will be GC'd together.
493
- */
494
- coupled: 1
495
- });
496
- FAST.getById(KernelServiceId.observable, () => {
497
- const queueUpdate = Updates$1.enqueue;
498
- const volatileRegex = /(:|&&|\|\||if|\?\.)/;
499
- const notifierLookup = /* @__PURE__ */ new WeakMap();
500
- let watcher = void 0;
501
- let createArrayObserver = (array) => {
502
- throw FAST.error(Message.needsArrayObservation);
503
- };
504
- function getNotifier(source) {
505
- var _a;
506
- let found = (_a = source.$fastController) !== null && _a !== void 0 ? _a : notifierLookup.get(source);
507
- if (found === void 0) Array.isArray(source) ? found = createArrayObserver(source) : notifierLookup.set(source, found = new PropertyChangeNotifier(source));
508
- return found;
509
- }
510
- const getAccessors = createMetadataLocator();
511
- class DefaultObservableAccessor {
512
- constructor(name) {
513
- this.name = name;
514
- this.field = `_${name}`;
515
- this.callback = `${name}Changed`;
516
- }
517
- getValue(source) {
518
- if (watcher !== void 0) watcher.watch(source, this.name);
519
- return source[this.field];
520
- }
521
- setValue(source, newValue) {
522
- const field = this.field;
523
- const oldValue = source[field];
524
- if (oldValue !== newValue) {
525
- source[field] = newValue;
526
- const callback = source[this.callback];
527
- if (isFunction(callback)) callback.call(source, oldValue, newValue);
528
- getNotifier(source).notify(this.name);
529
- }
530
- }
531
- }
532
- class ExpressionNotifierImplementation extends SubscriberSet {
533
- constructor(expression, initialSubscriber, isVolatileBinding = false) {
534
- super(expression, initialSubscriber);
535
- this.expression = expression;
536
- this.isVolatileBinding = isVolatileBinding;
537
- this.needsRefresh = true;
538
- this.needsQueue = true;
539
- this.isAsync = true;
540
- this.first = this;
541
- this.last = null;
542
- this.propertySource = void 0;
543
- this.propertyName = void 0;
544
- this.notifier = void 0;
545
- this.next = void 0;
546
- }
547
- setMode(isAsync) {
548
- this.isAsync = this.needsQueue = isAsync;
549
- }
550
- bind(controller) {
551
- this.controller = controller;
552
- const value = this.observe(controller.source, controller.context);
553
- if (!controller.isBound && this.requiresUnbind(controller)) controller.onUnbind(this);
554
- return value;
555
- }
556
- requiresUnbind(controller) {
557
- return controller.sourceLifetime !== SourceLifetime.coupled || this.first !== this.last || this.first.propertySource !== controller.source;
558
- }
559
- unbind(controller) {
560
- this.dispose();
561
- }
562
- observe(source, context) {
563
- if (this.needsRefresh && this.last !== null) this.dispose();
564
- const previousWatcher = watcher;
565
- watcher = this.needsRefresh ? this : void 0;
566
- this.needsRefresh = this.isVolatileBinding;
567
- let result;
568
- try {
569
- result = this.expression(source, context);
570
- } finally {
571
- watcher = previousWatcher;
572
- }
573
- return result;
574
- }
575
- disconnect() {
576
- this.dispose();
577
- }
578
- dispose() {
579
- if (this.last !== null) {
580
- let current = this.first;
581
- while (current !== void 0) {
582
- current.notifier.unsubscribe(this, current.propertyName);
583
- current = current.next;
584
- }
585
- this.last = null;
586
- this.needsRefresh = this.needsQueue = this.isAsync;
587
- }
588
- }
589
- watch(propertySource, propertyName) {
590
- const prev = this.last;
591
- const notifier = getNotifier(propertySource);
592
- const current = prev === null ? this.first : {};
593
- current.propertySource = propertySource;
594
- current.propertyName = propertyName;
595
- current.notifier = notifier;
596
- notifier.subscribe(this, propertyName);
597
- if (prev !== null) {
598
- if (!this.needsRefresh) {
599
- let prevValue;
600
- watcher = void 0;
601
- prevValue = prev.propertySource[prev.propertyName];
602
- watcher = this;
603
- if (propertySource === prevValue) this.needsRefresh = true;
604
- }
605
- prev.next = current;
606
- }
607
- this.last = current;
608
- }
609
- handleChange() {
610
- if (this.needsQueue) {
611
- this.needsQueue = false;
612
- queueUpdate(this);
613
- } else if (!this.isAsync) this.call();
614
- }
615
- call() {
616
- if (this.last !== null) {
617
- this.needsQueue = this.isAsync;
618
- this.notify(this);
619
- }
620
- }
621
- *records() {
622
- let next = this.first;
623
- while (next !== void 0) {
624
- yield next;
625
- next = next.next;
626
- }
627
- }
628
- }
629
- makeSerializationNoop(ExpressionNotifierImplementation);
630
- return Object.freeze({
631
- /**
632
- * @internal
633
- * @param factory - The factory used to create array observers.
634
- */
635
- setArrayObserverFactory(factory) {
636
- createArrayObserver = factory;
637
- },
638
- /**
639
- * Gets a notifier for an object or Array.
640
- * @param source - The object or Array to get the notifier for.
641
- */
642
- getNotifier,
643
- /**
644
- * Records a property change for a source object.
645
- * @param source - The object to record the change against.
646
- * @param propertyName - The property to track as changed.
647
- */
648
- track(source, propertyName) {
649
- watcher && watcher.watch(source, propertyName);
650
- },
651
- /**
652
- * Notifies watchers that the currently executing property getter or function is volatile
653
- * with respect to its observable dependencies.
654
- */
655
- trackVolatile() {
656
- watcher && (watcher.needsRefresh = true);
657
- },
658
- /**
659
- * Notifies subscribers of a source object of changes.
660
- * @param source - the object to notify of changes.
661
- * @param args - The change args to pass to subscribers.
662
- */
663
- notify(source, args) {
664
- getNotifier(source).notify(args);
665
- },
666
- /**
667
- * Defines an observable property on an object or prototype.
668
- * @param target - The target object to define the observable on.
669
- * @param nameOrAccessor - The name of the property to define as observable;
670
- * or a custom accessor that specifies the property name and accessor implementation.
671
- */
672
- defineProperty(target, nameOrAccessor) {
673
- if (isString(nameOrAccessor)) nameOrAccessor = new DefaultObservableAccessor(nameOrAccessor);
674
- getAccessors(target).push(nameOrAccessor);
675
- Reflect.defineProperty(target, nameOrAccessor.name, {
676
- enumerable: true,
677
- get() {
678
- return nameOrAccessor.getValue(this);
679
- },
680
- set(newValue) {
681
- nameOrAccessor.setValue(this, newValue);
682
- }
683
- });
684
- },
685
- /**
686
- * Finds all the observable accessors defined on the target,
687
- * including its prototype chain.
688
- * @param target - The target object to search for accessor on.
689
- */
690
- getAccessors,
691
- /**
692
- * Creates a {@link ExpressionNotifier} that can watch the
693
- * provided {@link Expression} for changes.
694
- * @param expression - The binding to observe.
695
- * @param initialSubscriber - An initial subscriber to changes in the binding value.
696
- * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
697
- */
698
- binding(expression, initialSubscriber, isVolatileBinding = this.isVolatileBinding(expression)) {
699
- return new ExpressionNotifierImplementation(expression, initialSubscriber, isVolatileBinding);
700
- },
701
- /**
702
- * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
703
- * on every evaluation of the value.
704
- * @param expression - The binding to inspect.
705
- */
706
- isVolatileBinding(expression) {
707
- return volatileRegex.test(expression.toString());
708
- }
709
- });
710
- });
711
- var contextEvent = FAST.getById(KernelServiceId.contextEvent, () => {
712
- let current = null;
713
- return {
714
- get() {
715
- return current;
716
- },
717
- set(event) {
718
- current = event;
719
- }
720
- };
721
- });
722
- /**
723
- * Provides additional contextual information available to behaviors and expressions.
724
- * @public
725
- */
726
- var ExecutionContext$1 = Object.freeze({
727
- /**
728
- * A default execution context.
729
- */
730
- default: {
731
- index: 0,
732
- length: 0,
733
- get event() {
734
- return ExecutionContext$1.getEvent();
735
- },
736
- eventDetail() {
737
- return this.event.detail;
738
- },
739
- eventTarget() {
740
- return this.event.target;
741
- }
742
- },
743
- /**
744
- * Gets the current event.
745
- * @returns An event object.
746
- */
747
- getEvent() {
748
- return contextEvent.get();
749
- },
750
- /**
751
- * Sets the current event.
752
- * @param event - An event object.
753
- */
754
- setEvent(event) {
755
- contextEvent.set(event);
756
- }
757
- });
758
- //#endregion
759
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/templating/markup.js
760
- /**
761
- * A unique per-session random marker string used to create placeholder tokens in HTML.
762
- * Bindings embedded in template literals are replaced with interpolation markers
763
- * of the form `fast-xxxxxx{id}fast-xxxxxx` so the compiler can later locate them in the
764
- * parsed DOM and associate each marker with its ViewBehaviorFactory.
765
- */
766
- var marker = `fast-${Math.random().toString(36).substring(2, 8)}`;
767
- var interpolationStart = `${marker}{`;
768
- var interpolationEnd = `}${marker}`;
769
- var interpolationEndLength = interpolationEnd.length;
770
- var id = 0;
771
- /** @internal */
772
- var nextId = () => `${marker}-${++id}`;
773
- Object.freeze({
774
- /**
775
- * Creates a placeholder string suitable for marking out a location *within*
776
- * an attribute value or HTML content.
777
- * @param index - The directive index to create the placeholder for.
778
- * @remarks
779
- * Used internally by binding directives.
780
- */
781
- interpolation: (id) => `${interpolationStart}${id}${interpolationEnd}`,
782
- /**
783
- * Creates a placeholder that manifests itself as an attribute on an
784
- * element.
785
- * @param attributeName - The name of the custom attribute.
786
- * @param index - The directive index to create the placeholder for.
787
- * @remarks
788
- * Used internally by attribute directives such as `ref`, `slotted`, and `children`.
789
- */
790
- attribute: (id) => `${nextId()}="${interpolationStart}${id}${interpolationEnd}"`,
791
- /**
792
- * Creates a placeholder that manifests itself as a marker within the DOM structure.
793
- * @param index - The directive index to create the placeholder for.
794
- * @remarks
795
- * Used internally by structural directives such as `repeat`.
796
- */
797
- comment: (id) => `<!--${interpolationStart}${id}${interpolationEnd}-->`
798
- });
799
- Object.freeze({
800
- /**
801
- * Parses text content or HTML attribute content, separating out the static strings
802
- * from the directives.
803
- * @param value - The content or attribute string to parse.
804
- * @param factories - A list of directives to search for in the string.
805
- * @returns A heterogeneous array of static strings interspersed with
806
- * directives or null if no directives are found in the string.
807
- */
808
- parse(value, factories) {
809
- const parts = value.split(interpolationStart);
810
- if (parts.length === 1) return null;
811
- const result = [];
812
- for (let i = 0, ii = parts.length; i < ii; ++i) {
813
- const current = parts[i];
814
- const index = current.indexOf(interpolationEnd);
815
- let literal;
816
- if (index === -1) literal = current;
817
- else {
818
- const factoryId = current.substring(0, index);
819
- result.push(factories[factoryId]);
820
- literal = current.substring(index + interpolationEndLength);
821
- }
822
- if (literal !== "") result.push(literal);
823
- }
824
- return result;
825
- } });
826
- //#endregion
827
- //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.10.4/node_modules/@microsoft/fast-element/dist/esm/utilities.js
828
- /**
829
- * Bridges between ViewBehaviors and HostBehaviors, enabling a host to
830
- * control ViewBehaviors.
831
- * @public
832
- */
833
- var ViewBehaviorOrchestrator = Object.freeze({
834
- /**
835
- * Creates a ViewBehaviorOrchestrator.
836
- * @param source - The source to to associate behaviors with.
837
- * @returns A ViewBehaviorOrchestrator.
838
- */
839
- create(source) {
840
- const behaviors = [];
841
- const targets = {};
842
- let unbindables = null;
843
- let isConnected = false;
844
- return {
845
- source,
846
- context: ExecutionContext$1.default,
847
- targets,
848
- get isBound() {
849
- return isConnected;
850
- },
851
- addBehaviorFactory(factory, target) {
852
- var _a, _b, _c, _d;
853
- const compiled = factory;
854
- compiled.id = (_a = compiled.id) !== null && _a !== void 0 ? _a : nextId();
855
- compiled.targetNodeId = (_b = compiled.targetNodeId) !== null && _b !== void 0 ? _b : nextId();
856
- compiled.targetTagName = (_c = target.tagName) !== null && _c !== void 0 ? _c : null;
857
- compiled.policy = (_d = compiled.policy) !== null && _d !== void 0 ? _d : DOM$1.policy;
858
- this.addTarget(compiled.targetNodeId, target);
859
- this.addBehavior(compiled.createBehavior());
860
- },
861
- addTarget(nodeId, target) {
862
- targets[nodeId] = target;
863
- },
864
- addBehavior(behavior) {
865
- behaviors.push(behavior);
866
- if (isConnected) behavior.bind(this);
867
- },
868
- onUnbind(unbindable) {
869
- if (unbindables === null) unbindables = [];
870
- unbindables.push(unbindable);
871
- },
872
- connectedCallback(controller) {
873
- if (!isConnected) {
874
- isConnected = true;
875
- behaviors.forEach((x) => x.bind(this));
876
- }
877
- },
878
- disconnectedCallback(controller) {
879
- if (isConnected) {
880
- isConnected = false;
881
- if (unbindables !== null) unbindables.forEach((x) => x.unbind(this));
882
- }
883
- }
884
- };
885
- } });
886
- //#endregion
887
- //#region src/lib/data-grid/data-grid.ts
888
- var DataGridSelectionMode = {
889
- none: "none",
890
- singleRow: "single-row",
891
- multiRow: "multi-row",
892
- singleCell: "single-cell",
893
- multiCell: "multi-cell"
894
- };
11
+ //#region src/lib/flag/flag.ts
12
+ var PLACEHOLDER_DELAY = 500;
13
+ var PLACEHOLDER_TIMEOUT = 2e3;
895
14
  /**
896
15
  * @public
897
- * @component data-grid
898
- * @slot - Default slot.
899
- * @event {CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>} cell-click - Event that fires when a cell is clicked
16
+ * @component flag
17
+ * @testQuery code code
900
18
  */
901
- var DataGrid = class DataGrid extends VividElement {
902
- /** generates a gridTemplateColumns based on columndata array */
903
- static generateTemplateColumns(columnDefinitions) {
904
- let templateColumns = "";
905
- columnDefinitions.forEach((_) => {
906
- templateColumns = `${templateColumns}${templateColumns === "" ? "" : " "}1fr`;
907
- });
908
- return templateColumns;
909
- }
910
- /** @internal */
911
- noTabbingChanged() {
912
- if (this.$fastController.isConnected) this.#setTabIndex();
913
- }
914
- #setTabIndex() {
915
- this.setAttribute("tabIndex", this.noTabbing || this.contains(document.activeElement) ? "-1" : "0");
916
- }
917
- /** @internal */
918
- generateHeaderChanged() {
919
- if (this.$fastController.isConnected) this.toggleGeneratedHeader();
920
- }
921
- /** @internal */
922
- gridTemplateColumnsChanged() {
923
- /* v8 ignore if -- @preserve */
924
- if (this.$fastController.isConnected) {
925
- this.updateRowIndexes();
926
- if (this.fixedColumns && this.fixedColumns > 0) this.applyFixedColumns();
927
- }
928
- }
929
- /** @internal */
930
- rowsDataChanged() {
931
- if (this.columnDefinitions === null && this.rowsData.length > 0) this.columnDefinitions = DataGrid.generateColumns(this.rowsData[0]);
932
- if (this.$fastController.isConnected) this.toggleGeneratedHeader();
933
- }
934
- /** @internal */
935
- columnDefinitionsChanged() {
936
- if (this.columnDefinitions === null) {
937
- this.generatedGridTemplateColumns = "";
938
- return;
939
- }
940
- this.generatedGridTemplateColumns = DataGrid.generateTemplateColumns(this.columnDefinitions);
941
- /* v8 ignore if -- @preserve */
942
- if (this.$fastController.isConnected) {
943
- this.columnDefinitionsStale = true;
944
- this.queueRowIndexUpdate();
945
- }
946
- }
947
- /** @internal */
948
- headerCellItemTemplateChanged() {
949
- /* v8 ignore if -- @preserve */
950
- if (this.$fastController.isConnected) {
951
- if (this.generatedHeader !== null) this.generatedHeader.headerCellItemTemplate = this.headerCellItemTemplate;
952
- }
953
- }
954
- /** @internal */
955
- focusRowIndexChanged() {
956
- if (this.$fastController.isConnected) this.queueFocusUpdate();
957
- }
958
- /** @internal */
959
- focusColumnIndexChanged() {
960
- if (this.$fastController.isConnected) this.queueFocusUpdate();
961
- }
962
- /** @internal */
963
- fixedColumnsChanged() {
964
- /* v8 ignore if -- @preserve */
965
- if (this.$fastController.isConnected) {
966
- this.applyFixedColumns();
967
- this.setupResizeObserver();
968
- }
969
- }
970
- /** @internal */
971
- setupResizeObserver() {
972
- if (this.resizeObserver) {
973
- this.resizeObserver.disconnect();
974
- this.resizeObserver = void 0;
975
- }
976
- if (typeof ResizeObserver !== "undefined" && this.fixedColumns && this.fixedColumns > 0) {
977
- this.resizeObserver = new ResizeObserver(() => {
978
- this.applyFixedColumns();
979
- });
980
- this.resizeObserver.observe(this);
981
- }
982
- }
983
- /** @internal */
984
- connectedCallback() {
985
- super.connectedCallback();
986
- /* v8 ignore else -- @preserve */
987
- if (this.rowItemTemplate === void 0) this.rowItemTemplate = this.defaultRowItemTemplate;
988
- /* v8 ignore else -- @preserve */
989
- if (this.behaviorOrchestrator === null) {
990
- this.behaviorOrchestrator = ViewBehaviorOrchestrator.create(this);
991
- this.$fastController.addBehavior(this.behaviorOrchestrator);
992
- this.behaviorOrchestrator.addBehaviorFactory(new RepeatDirective(normalizeBinding((x) => x.rowsData), normalizeBinding((x) => x.rowItemTemplate), { positioning: true }), this.appendChild(document.createComment("")));
993
- }
994
- this.toggleGeneratedHeader();
995
- this.addEventListener("row-focused", this.handleRowFocus);
996
- this.addEventListener(eventFocus, this.handleFocus);
997
- this.addEventListener(eventKeyDown, this.handleKeydown);
998
- this.addEventListener(eventFocusOut, this.handleFocusOut);
999
- this.observer = new MutationObserver(this.onChildListChange);
1000
- this.observer.observe(this, { childList: true });
1001
- this.setupResizeObserver();
1002
- Updates.enqueue(this.queueRowIndexUpdate);
1003
- this.#setTabIndex();
1004
- Observable.getNotifier(this).subscribe(this.#changeHandler, "columnDefinitions");
1005
- }
1006
- /** @internal */
1007
- disconnectedCallback() {
1008
- super.disconnectedCallback();
1009
- this.removeEventListener("row-focused", this.handleRowFocus);
1010
- this.removeEventListener(eventFocus, this.handleFocus);
1011
- this.removeEventListener(eventKeyDown, this.handleKeydown);
1012
- this.removeEventListener(eventFocusOut, this.handleFocusOut);
1013
- this.observer.disconnect();
1014
- if (this.resizeObserver) {
1015
- this.resizeObserver.disconnect();
1016
- this.resizeObserver = void 0;
1017
- }
1018
- this.generatedHeader = null;
1019
- Observable.getNotifier(this).unsubscribe(this.#changeHandler, "columnDefinitions");
1020
- }
1021
- /** @internal */
1022
- handleRowFocus(e) {
1023
- this.isUpdatingFocus = true;
1024
- const focusRow = e.target;
1025
- this.focusRowIndex = this.rowElements.indexOf(focusRow);
1026
- this.focusColumnIndex = focusRow.focusColumnIndex;
1027
- this.setAttribute("tabIndex", "-1");
1028
- this.isUpdatingFocus = false;
1029
- }
1030
- /** @internal */
1031
- handleFocus(_) {
1032
- this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, true);
1033
- }
1034
- /** @internal */
1035
- handleFocusOut(e) {
1036
- if (e.relatedTarget === null || !this.contains(e.relatedTarget)) this.setAttribute("tabIndex", this.noTabbing ? "-1" : "0");
1037
- }
1038
- /** @internal */
1039
- handleKeydown(e) {
1040
- if (e.defaultPrevented) return;
1041
- let newFocusRowIndex;
1042
- const maxIndex = this.rowElements.length - 1;
1043
- const currentGridBottom = this.offsetHeight + this.scrollTop;
1044
- const lastRow = this.rowElements[maxIndex];
1045
- switch (e.key) {
1046
- case keyArrowUp:
1047
- e.preventDefault();
1048
- this.focusOnCell(this.focusRowIndex - 1, this.focusColumnIndex, true);
1049
- break;
1050
- case keyArrowDown:
1051
- e.preventDefault();
1052
- this.focusOnCell(this.focusRowIndex + 1, this.focusColumnIndex, true);
1053
- break;
1054
- case keyPageUp:
1055
- e.preventDefault();
1056
- if (this.rowElements.length === 0) {
1057
- this.focusOnCell(0, 0, false);
1058
- break;
1059
- }
1060
- if (this.focusRowIndex === 0) {
1061
- this.focusOnCell(0, this.focusColumnIndex, false);
1062
- return;
1063
- }
1064
- newFocusRowIndex = this.focusRowIndex - 1;
1065
- for (; newFocusRowIndex >= 0; newFocusRowIndex--) {
1066
- const thisRow = this.rowElements[newFocusRowIndex];
1067
- if (thisRow.offsetTop < this.scrollTop) {
1068
- this.scrollTop = thisRow.offsetTop + thisRow.clientHeight - this.clientHeight;
1069
- break;
1070
- }
1071
- }
1072
- this.focusOnCell(newFocusRowIndex, this.focusColumnIndex, false);
1073
- break;
1074
- case keyPageDown:
1075
- e.preventDefault();
1076
- if (this.rowElements.length === 0) {
1077
- this.focusOnCell(0, 0, false);
1078
- break;
1079
- }
1080
- if (this.focusRowIndex >= maxIndex || lastRow.offsetTop + lastRow.offsetHeight <= currentGridBottom) {
1081
- this.focusOnCell(maxIndex, this.focusColumnIndex, false);
1082
- return;
1083
- }
1084
- newFocusRowIndex = this.focusRowIndex + 1;
1085
- for (; newFocusRowIndex <= maxIndex; newFocusRowIndex++) {
1086
- const thisRow = this.rowElements[newFocusRowIndex];
1087
- if (thisRow.offsetTop + thisRow.offsetHeight > currentGridBottom) {
1088
- let stickyHeaderOffset = 0;
1089
- if (this.generateHeader === GenerateHeaderOptions.sticky && this.generatedHeader !== null) stickyHeaderOffset = this.generatedHeader.clientHeight;
1090
- this.scrollTop = thisRow.offsetTop - stickyHeaderOffset;
1091
- break;
1092
- }
1093
- }
1094
- this.focusOnCell(newFocusRowIndex, this.focusColumnIndex, false);
1095
- break;
1096
- case keyHome:
1097
- /* v8 ignore else -- @preserve */
1098
- if (e.ctrlKey) {
1099
- e.preventDefault();
1100
- this.focusOnCell(0, 0, true);
1101
- }
1102
- break;
1103
- case keyEnd:
1104
- /* v8 ignore else -- @preserve */
1105
- if (e.ctrlKey && this.columnDefinitions !== null) {
1106
- e.preventDefault();
1107
- this.focusOnCell(this.rowElements.length - 1, this.columnDefinitions.length - 1, true);
1108
- }
1109
- break;
1110
- }
1111
- }
1112
- queueFocusUpdate() {
1113
- if (this.isUpdatingFocus && this.contains(document.activeElement)) return;
1114
- if (!this.pendingFocusUpdate) {
1115
- this.pendingFocusUpdate = true;
1116
- Updates.enqueue(() => this.updateFocus());
1117
- }
1118
- }
1119
- updateFocus() {
1120
- this.pendingFocusUpdate = false;
1121
- this.focusOnCell(this.focusRowIndex, this.focusColumnIndex, true);
1122
- }
1123
- toggleGeneratedHeader() {
1124
- if (this.generatedHeader !== null) {
1125
- this.removeChild(this.generatedHeader);
1126
- this.generatedHeader = null;
1127
- }
1128
- if (this.generateHeader !== GenerateHeaderOptions.none && this.columnDefinitions !== null) {
1129
- const generatedHeaderElement = document.createElement(this.rowElementTag);
1130
- this.generatedHeader = generatedHeaderElement;
1131
- this.generatedHeader.columnDefinitions = this.columnDefinitions;
1132
- this.generatedHeader.gridTemplateColumns = this.gridTemplateColumns;
1133
- this.generatedHeader.rowType = this.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;
1134
- /* v8 ignore else -- @preserve */
1135
- if (this.firstChild !== null) this.insertBefore(generatedHeaderElement, this.firstChild);
1136
- return;
1137
- }
1138
- }
1139
- /** @internal */
1140
- slottedRowElementsChanged() {
1141
- this._resetSelection();
1142
- }
1143
- get #selectedRows() {
1144
- return this.rowElements.filter((row) => row.selected);
1145
- }
1146
- get #selectedCells() {
1147
- return this.rowElements.reduce((acc, row) => {
1148
- const selectedCells = Array.from(row.children).filter((cell) => cell.selected);
1149
- return acc.concat(selectedCells);
1150
- }, []);
1151
- }
1152
- /** @internal */
1153
- selectionModeChanged(oldValue) {
1154
- if (oldValue === void 0) {
1155
- Updates.enqueue(this._resetSelection);
19
+ var Flag = class extends VividElement {
20
+ constructor(..._args) {
21
+ super(..._args);
22
+ this.flagLoaded = false;
23
+ this.#currentRequestId = 0;
24
+ this.#abortController = null;
25
+ }
26
+ #currentRequestId;
27
+ #abortController;
28
+ /** @internal */
29
+ async codeChanged() {
30
+ const requestId = ++this.#currentRequestId;
31
+ if (this.#abortController) this.#abortController.abort();
32
+ this.#abortController = new AbortController();
33
+ const iconName = getFlagIconName(this.code);
34
+ if (!iconName) {
35
+ this._svg = "";
36
+ this.flagLoaded = true;
1156
37
  return;
1157
38
  }
1158
- this._resetSelection(true);
1159
- }
1160
- #handleKeypress;
1161
- #handleClick;
1162
- #handleCellSelection;
1163
- #handleRowSelection;
1164
- constructor() {
1165
- super();
1166
- this.noTabbing = false;
1167
- this.generateHeader = GenerateHeaderOptions.default;
1168
- this.rowsData = [];
1169
- this.columnDefinitions = null;
1170
- this.focusRowIndex = 0;
1171
- this.focusColumnIndex = 0;
1172
- this.fixedColumnsPositions = [];
1173
- this.behaviorOrchestrator = null;
1174
- this.generatedHeader = null;
1175
- this.isUpdatingFocus = false;
1176
- this.pendingFocusUpdate = false;
1177
- this.rowindexUpdateQueued = false;
1178
- this.columnDefinitionsStale = true;
1179
- this.generatedGridTemplateColumns = "";
1180
- this.focusOnCell = (rowIndex, columnIndex, scrollIntoView) => {
1181
- if (this.rowElements.length === 0) {
1182
- this.focusRowIndex = 0;
1183
- this.focusColumnIndex = 0;
1184
- return;
1185
- }
1186
- const focusRowIndex = Math.max(0, Math.min(this.rowElements.length - 1, rowIndex));
1187
- const cells = this.rowElements[focusRowIndex].querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [role=\"rowheader\"], [data-vvd-component=\"data-grid-cell\"]");
1188
- const focusTarget = cells[Math.max(0, Math.min(cells.length - 1, columnIndex))];
1189
- if (scrollIntoView && this.scrollHeight !== this.clientHeight && (focusRowIndex < this.focusRowIndex && this.scrollTop > 0 || focusRowIndex > this.focusRowIndex && this.scrollTop < this.scrollHeight - this.clientHeight)) focusTarget.scrollIntoView({
1190
- block: "center",
1191
- inline: "center"
1192
- });
1193
- focusTarget.focus();
1194
- };
1195
- this.onChildListChange = (mutations, _) => {
1196
- /* v8 ignore else -- @preserve */
1197
- if (mutations && mutations.length) {
1198
- mutations.forEach((mutation) => {
1199
- mutation.addedNodes.forEach((newNode) => {
1200
- if (newNode.nodeType === 1 && (newNode.getAttribute("role") === "row" || newNode.getAttribute("row-type") === "default")) newNode.columnDefinitions = this.columnDefinitions;
1201
- });
1202
- });
1203
- this.queueRowIndexUpdate();
1204
- }
1205
- };
1206
- this.queueRowIndexUpdate = () => {
1207
- if (!this.rowindexUpdateQueued) {
1208
- this.rowindexUpdateQueued = true;
1209
- Updates.enqueue(this.updateRowIndexes);
1210
- }
1211
- };
1212
- this.updateRowIndexes = () => {
1213
- let newGridTemplateColumns = this.gridTemplateColumns;
1214
- if (newGridTemplateColumns === void 0) {
1215
- if (this.generatedGridTemplateColumns === "" && this.rowElements.length > 0) {
1216
- const firstRow = this.rowElements[0];
1217
- this.generatedGridTemplateColumns = new Array(firstRow.cellElements.length).fill("1fr").join(" ");
1218
- }
1219
- newGridTemplateColumns = this.generatedGridTemplateColumns;
1220
- }
1221
- this.rowElements.forEach((element, index) => {
1222
- const thisRow = element;
1223
- thisRow.rowIndex = index;
1224
- thisRow.gridTemplateColumns = newGridTemplateColumns;
1225
- if (this.columnDefinitionsStale) thisRow.columnDefinitions = this.columnDefinitions;
1226
- });
1227
- this.rowindexUpdateQueued = false;
1228
- this.columnDefinitionsStale = false;
1229
- };
1230
- this.#handleKeypress = (e) => {
1231
- if (e.key === "Enter" || e.key === " ") this.#handleClick(e);
1232
- };
1233
- this.#handleClick = ({ target, ctrlKey, shiftKey, metaKey }) => {
1234
- if (target.getAttribute("role") !== "gridcell" || target.getAttribute("cell-type") !== "default") return;
1235
- if (this.selectionMode === DataGridSelectionMode.singleCell || this.selectionMode === DataGridSelectionMode.multiCell) {
1236
- this.#handleCellSelection({
1237
- target,
1238
- ctrlKey,
1239
- shiftKey,
1240
- metaKey
1241
- });
1242
- return;
1243
- }
1244
- if (this.selectionMode === DataGridSelectionMode.singleRow || this.selectionMode === DataGridSelectionMode.multiRow) this.#handleRowSelection({
1245
- target,
1246
- ctrlKey,
1247
- shiftKey,
1248
- metaKey
1249
- });
1250
- };
1251
- this.#handleCellSelection = ({ target, ctrlKey, shiftKey, metaKey }) => {
1252
- const cell = target;
1253
- if (this.selectionMode === DataGridSelectionMode.multiCell && (ctrlKey || shiftKey || metaKey)) cell.selected = !this.#selectedCells.includes(cell);
1254
- else {
1255
- const cacheTargetSelection = cell.selected;
1256
- this._resetSelection(true);
1257
- cell.selected = !cacheTargetSelection;
1258
- }
1259
- };
1260
- this.#handleRowSelection = ({ target, ctrlKey, shiftKey, metaKey }) => {
1261
- const row = target.parentNode;
1262
- if (this.selectionMode === DataGridSelectionMode.multiRow && (ctrlKey || shiftKey || metaKey)) row.selected = !this.#selectedRows.includes(row);
1263
- else {
1264
- const cacheTargetSelection = row.selected;
1265
- this._resetSelection(true);
1266
- row.selected = !cacheTargetSelection;
1267
- }
1268
- };
1269
- this.#changeHandler = { handleChange(dataGrid, propertyName) {
39
+ this._svg = void 0;
40
+ this.flagLoaded = false;
41
+ let timeout = setTimeout(() => {
1270
42
  /* v8 ignore else -- @preserve */
1271
- if (propertyName === "columnDefinitions") {
1272
- /* v8 ignore else -- @preserve */
1273
- if (dataGrid.$fastController.isConnected) dataGrid.toggleGeneratedHeader();
1274
- }
1275
- } };
1276
- this._resetSelection = (clear = false) => {
1277
- const cells = Array.from(this.querySelectorAll("[role=\"gridcell\"], [cell-type=\"default\"]"));
1278
- const rows = Array.from(this.querySelectorAll("[role=\"row\"], [row-type=\"default\"]"));
1279
- if (this.selectionMode === DataGridSelectionMode.singleCell || this.selectionMode === DataGridSelectionMode.multiCell) {
1280
- for (const cell of cells) {
1281
- cell._selectable = true;
1282
- cell.selected = clear ? false : cell.selected || false;
1283
- }
1284
- for (const row of rows) {
1285
- row._selectable = false;
1286
- row.selected = false;
1287
- }
1288
- }
1289
- if (this.selectionMode === DataGridSelectionMode.none) for (const element of [...cells, ...rows]) {
1290
- element._selectable = false;
1291
- element.selected = false;
1292
- }
1293
- if (this.selectionMode === DataGridSelectionMode.singleRow || this.selectionMode === DataGridSelectionMode.multiRow) {
1294
- for (const cell of cells) {
1295
- cell._selectable = false;
1296
- cell.selected = false;
1297
- }
1298
- for (const row of rows) {
1299
- row._selectable = true;
1300
- row.selected = clear ? false : row.selected || false;
1301
- }
1302
- }
1303
- };
1304
- this.addEventListener("click", this.#handleClick);
1305
- this.addEventListener("keydown", this.#handleKeypress);
1306
- }
1307
- #changeHandler;
1308
- static generateColumns(rowData) {
1309
- return Object.keys(rowData).map((property, index) => {
1310
- return {
1311
- columnDataKey: property,
1312
- gridColumn: `${index}`
1313
- };
1314
- });
1315
- }
1316
- /** @internal */
1317
- applyFixedColumns() {
1318
- if (!this.fixedColumns || this.fixedColumns <= 0) {
1319
- this.clearFixedColumns();
1320
- return;
1321
- }
1322
- this.calculateFixedColumnPositions();
1323
- this.applyFixedColumnStyling();
1324
- }
1325
- /**
1326
- * Applies fixed columns styling using cached positions
1327
- * @internal
1328
- */
1329
- applyFixedColumnStyling() {
1330
- this.rowElements.forEach((row) => {
1331
- const cells = row.querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [cell-type=\"default\"], [cell-type=\"columnheader\"]");
1332
- this.fixedColumnsPositions.forEach((position, index) => {
1333
- /* v8 ignore else -- @preserve */
1334
- if (index < cells.length) {
1335
- const gridCell = cells[index];
43
+ if (this.#currentRequestId === requestId) {
44
+ this._svg = PLACEHOLDER_ICON;
45
+ timeout = setTimeout(() => {
1336
46
  /* v8 ignore else -- @preserve */
1337
- if (typeof gridCell.setFixedPosition === "function") gridCell.setFixedPosition(`${position}px`);
1338
- }
1339
- });
1340
- });
1341
- }
1342
- /**
1343
- * Calculates and caches fixed columns positions based on current layout
1344
- * @internal
1345
- */
1346
- calculateFixedColumnPositions() {
1347
- this.fixedColumnsPositions = [];
1348
- if (this.rowElements.length === 0) return;
1349
- const cells = this.rowElements[0].querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [cell-type=\"default\"], [cell-type=\"columnheader\"]");
1350
- let accumulator = 0;
1351
- for (let i = 0; i < Math.min(this.fixedColumns, cells.length); i++) {
1352
- this.fixedColumnsPositions.push(accumulator);
1353
- accumulator += cells[i].offsetWidth;
1354
- }
1355
- }
1356
- /**
1357
- * Clears all fixed columns state and styling
1358
- * @internal
1359
- */
1360
- clearFixedColumns() {
1361
- if (this.rowElements.length === 0) {
1362
- this.fixedColumnsPositions = [];
1363
- return;
1364
- }
1365
- this.rowElements.forEach((row) => {
1366
- const cells = row.querySelectorAll("[role=\"cell\"], [role=\"gridcell\"], [role=\"columnheader\"], [cell-type=\"default\"], [cell-type=\"columnheader\"]");
1367
- this.fixedColumnsPositions.forEach((_, index) => {
1368
- /* v8 ignore else -- @preserve */
1369
- if (index < cells.length) {
1370
- const gridCell = cells[index];
1371
- /* v8 ignore else -- @preserve */
1372
- if (typeof gridCell.setFixedPosition === "function") gridCell.setFixedPosition(void 0);
1373
- }
1374
- });
1375
- });
1376
- this.fixedColumnsPositions = [];
1377
- }
1378
- };
1379
- __decorate([attr({
1380
- attribute: "no-tabbing",
1381
- mode: "boolean"
1382
- })], DataGrid.prototype, "noTabbing", void 0);
1383
- __decorate([attr({ attribute: "generate-header" })], DataGrid.prototype, "generateHeader", void 0);
1384
- __decorate([attr({ attribute: "grid-template-columns" })], DataGrid.prototype, "gridTemplateColumns", void 0);
1385
- __decorate([observable], DataGrid.prototype, "rowsData", void 0);
1386
- __decorate([observable], DataGrid.prototype, "columnDefinitions", void 0);
1387
- __decorate([observable], DataGrid.prototype, "rowItemTemplate", void 0);
1388
- __decorate([observable], DataGrid.prototype, "cellItemTemplate", void 0);
1389
- __decorate([observable], DataGrid.prototype, "headerCellItemTemplate", void 0);
1390
- __decorate([observable], DataGrid.prototype, "focusRowIndex", void 0);
1391
- __decorate([observable], DataGrid.prototype, "focusColumnIndex", void 0);
1392
- __decorate([attr({
1393
- attribute: "fixed-columns",
1394
- converter: nullableNumberConverter
1395
- })], DataGrid.prototype, "fixedColumns", void 0);
1396
- __decorate([observable], DataGrid.prototype, "defaultRowItemTemplate", void 0);
1397
- __decorate([observable], DataGrid.prototype, "rowElementTag", void 0);
1398
- __decorate([observable], DataGrid.prototype, "rowElements", void 0);
1399
- __decorate([observable], DataGrid.prototype, "slottedRowElements", void 0);
1400
- __decorate([attr({ attribute: "selection-mode" })], DataGrid.prototype, "selectionMode", void 0);
1401
- //#endregion
1402
- //#region src/lib/data-grid/data-grid-row.ts
1403
- /**
1404
- * @public
1405
- * @component data-grid-row
1406
- * @slot - Default slot.
1407
- * @event {CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>} cell-click - Event that fires when a cell is clicked
1408
- * @event {CustomEvent<HTMLElement>} row-focused - Fires a custom 'row-focused' event when focus is on an element (usually a cell or its contents) in the row
1409
- */
1410
- var DataGridRow = class extends HostSemantics(VividElement) {
1411
- constructor(..._args) {
1412
- super(..._args);
1413
- this.rowType = DataGridRowTypes.default;
1414
- this.rowData = null;
1415
- this.columnDefinitions = null;
1416
- this.behaviorOrchestrator = null;
1417
- this.focusColumnIndex = 0;
1418
- this.updateRowStyle = () => {
1419
- this.style.gridTemplateColumns = this.gridTemplateColumns;
1420
- };
1421
- this.ariaSelected = null;
1422
- this._selectable = false;
1423
- this.selected = false;
1424
- }
1425
- /** @internal */
1426
- gridTemplateColumnsChanged() {
1427
- if (this.$fastController.isConnected) this.updateRowStyle();
1428
- }
1429
- /** @internal */
1430
- rowTypeChanged() {
1431
- if (this.$fastController.isConnected) this.updateItemTemplate();
1432
- }
1433
- /** @internal */
1434
- cellItemTemplateChanged() {
1435
- this.updateItemTemplate();
1436
- }
1437
- /** @internal */
1438
- headerCellItemTemplateChanged() {
1439
- this.updateItemTemplate();
1440
- }
1441
- /** @internal */
1442
- connectedCallback() {
1443
- super.connectedCallback();
1444
- /* v8 ignore else -- @preserve */
1445
- if (this.behaviorOrchestrator === null) {
1446
- this.updateItemTemplate();
1447
- this.behaviorOrchestrator = ViewBehaviorOrchestrator.create(this);
1448
- this.$fastController.addBehavior(this.behaviorOrchestrator);
1449
- this.behaviorOrchestrator.addBehaviorFactory(new RepeatDirective(normalizeBinding((x) => x.columnDefinitions), normalizeBinding((x) => x.activeCellItemTemplate), { positioning: true }), this.appendChild(document.createComment("")));
1450
- }
1451
- this.addEventListener("cell-focused", this.handleCellFocus);
1452
- this.addEventListener(eventFocusOut, this.handleFocusout);
1453
- this.addEventListener(eventKeyDown, this.handleKeydown);
1454
- this.updateRowStyle();
1455
- }
1456
- /** @internal */
1457
- disconnectedCallback() {
1458
- super.disconnectedCallback();
1459
- this.removeEventListener("cell-focused", this.handleCellFocus);
1460
- this.removeEventListener(eventFocusOut, this.handleFocusout);
1461
- this.removeEventListener(eventKeyDown, this.handleKeydown);
1462
- }
1463
- /** @internal */
1464
- handleFocusout(_) {
1465
- /* v8 ignore else -- @preserve */
1466
- if (!this.contains(document.activeElement)) this.focusColumnIndex = 0;
1467
- }
1468
- /** @internal */
1469
- handleCellFocus(e) {
1470
- this.focusColumnIndex = this.cellElements.indexOf(e.target);
1471
- this.$emit("row-focused", this);
1472
- }
1473
- /** @internal */
1474
- handleKeydown(e) {
1475
- if (e.defaultPrevented) return;
1476
- switch (e.key) {
1477
- case keyArrowLeft$1: {
1478
- const newFocusColumnIndex = Math.max(0, this.focusColumnIndex - 1);
1479
- this.cellElements[newFocusColumnIndex].focus();
1480
- e.preventDefault();
1481
- break;
47
+ if (this.#currentRequestId === requestId && this._svg === PLACEHOLDER_ICON) this._svg = void 0;
48
+ }, PLACEHOLDER_TIMEOUT);
1482
49
  }
1483
- case keyArrowRight$1: {
1484
- const newFocusColumnIndex = Math.min(this.cellElements.length - 1, this.focusColumnIndex + 1);
1485
- this.cellElements[newFocusColumnIndex].focus();
1486
- e.preventDefault();
1487
- break;
50
+ }, PLACEHOLDER_DELAY);
51
+ try {
52
+ const svg = await resolveIcon(iconName, this.#abortController.signal);
53
+ /* v8 ignore else -- @preserve */
54
+ if (this.#currentRequestId === requestId) this._svg = svg;
55
+ } catch {
56
+ if (this.#currentRequestId === requestId) this._svg = void 0;
57
+ } finally {
58
+ if (this.#currentRequestId === requestId) {
59
+ clearTimeout(timeout);
60
+ this.flagLoaded = true;
1488
61
  }
1489
- case keyHome:
1490
- if (!e.ctrlKey) {
1491
- this.cellElements[0].focus();
1492
- e.preventDefault();
1493
- }
1494
- break;
1495
- case keyEnd:
1496
- if (!e.ctrlKey) {
1497
- this.cellElements[this.cellElements.length - 1].focus();
1498
- e.preventDefault();
1499
- }
1500
- break;
1501
62
  }
1502
63
  }
1503
- updateItemTemplate() {
1504
- this.activeCellItemTemplate = this.rowType === DataGridRowTypes.default && this.cellItemTemplate !== void 0 ? this.cellItemTemplate : this.rowType === DataGridRowTypes.default && this.cellItemTemplate === void 0 ? this.defaultCellItemTemplate : this.headerCellItemTemplate !== void 0 ? this.headerCellItemTemplate : this.defaultHeaderCellItemTemplate;
1505
- }
1506
- /** @internal */
1507
- ariaSelectedChanged(oldValue, newValue) {
1508
- super.ariaSelectedChanged(oldValue, newValue);
1509
- this._selectable = newValue !== null;
1510
- this.selected = newValue === "true";
1511
- }
1512
64
  };
1513
- __decorate([attr({ attribute: "grid-template-columns" })], DataGridRow.prototype, "gridTemplateColumns", void 0);
1514
- __decorate([attr({ attribute: "row-type" })], DataGridRow.prototype, "rowType", void 0);
1515
- __decorate([observable], DataGridRow.prototype, "rowData", void 0);
1516
- __decorate([observable], DataGridRow.prototype, "columnDefinitions", void 0);
1517
- __decorate([observable], DataGridRow.prototype, "cellItemTemplate", void 0);
1518
- __decorate([observable], DataGridRow.prototype, "headerCellItemTemplate", void 0);
1519
- __decorate([observable], DataGridRow.prototype, "rowIndex", void 0);
1520
- __decorate([observable], DataGridRow.prototype, "activeCellItemTemplate", void 0);
1521
- __decorate([observable], DataGridRow.prototype, "defaultCellItemTemplate", void 0);
1522
- __decorate([observable], DataGridRow.prototype, "defaultHeaderCellItemTemplate", void 0);
1523
- __decorate([observable], DataGridRow.prototype, "cellElements", void 0);
1524
- __decorate([observable], DataGridRow.prototype, "_selectable", void 0);
1525
- __decorate([attr({ mode: "boolean" })], DataGridRow.prototype, "selected", void 0);
1526
- //#endregion
1527
- //#region src/lib/data-grid/data-grid.template.ts
1528
- function createRowItemTemplate(context) {
1529
- const rowTag = context.tagFor(DataGridRow);
65
+ __decorate([attr], Flag.prototype, "code", void 0);
66
+ __decorate([attr], Flag.prototype, "label", void 0);
67
+ __decorate([attr({ converter: numberConverter })], Flag.prototype, "size", void 0);
68
+ __decorate([observable], Flag.prototype, "_svg", void 0);
69
+ __decorate([observable], Flag.prototype, "flagLoaded", void 0);
70
+ //#endregion
71
+ //#region src/lib/flag/flag.template.ts
72
+ var flagTemplate = (context) => {
73
+ const visuallyHiddenTag = context.tagFor(VisuallyHidden);
74
+ const isDecorative = (x) => !x.label || x.label.trim().length === 0;
1530
75
  return html`
1531
- <${rowTag}
1532
- :rowData="${(x) => x}"
1533
- :cellItemTemplate="${(_, c) => c.parent.cellItemTemplate}"
1534
- :headerCellItemTemplate="${(_, c) => c.parent.headerCellItemTemplate}"
1535
- ></${rowTag}>
1536
- `;
1537
- }
1538
- function getMultiSelectAriaState(x) {
1539
- return x.selectionMode === void 0 || x.selectionMode === DataGridSelectionMode.none ? null : x.selectionMode.includes("multi") ? "true" : "false";
1540
- }
1541
- function setHeaderRow(x) {
1542
- if (x.columnDefinitions === null) {
1543
- const headerRow = x.querySelector("[cell-type=\"columnheader\"]")?.parentElement;
1544
- if (x.generateHeader === GenerateHeaderOptions.default && (headerRow?.getAttribute("row-type") === DataGridRowTypes.header || headerRow?.getAttribute("row-type") === DataGridRowTypes.stickyHeader)) return;
1545
- if (headerRow) {
1546
- const rowType = x.generateHeader === GenerateHeaderOptions.sticky ? DataGridRowTypes.stickyHeader : DataGridRowTypes.header;
1547
- headerRow.setAttribute("row-type", rowType);
1548
- }
1549
- }
1550
- }
1551
- function handleColumnSort(_, { event }) {
1552
- event.stopPropagation();
1553
- }
1554
- var DataGridTemplate = (context) => {
1555
- const rowItemTemplate = createRowItemTemplate(context);
1556
- const rowTag = context.tagFor(DataGridRow, true);
1557
- return html`
1558
- <template
1559
- aria-multiselectable="${getMultiSelectAriaState}"
1560
- role="grid"
1561
- tabindex="0"
1562
- @sort="${handleColumnSort}"
1563
- :rowElementTag="${() => rowTag}"
1564
- :defaultRowItemTemplate="${rowItemTemplate}"
1565
- ${children({
1566
- property: "rowElements",
1567
- filter: elements("[role=row],[data-vvd-component=data-grid-row]")
1568
- })}
76
+ <figure
77
+ class="${(x) => classNames("control", [`size-${x.size}`, typeof x.size === "number"])}"
78
+ ?aria-hidden="${(x) => isDecorative(x)}"
79
+ ?aria-busy="${(x) => !x?.flagLoaded}"
1569
80
  >
1570
- <div class="base">
1571
- ${setHeaderRow}
1572
- <slot ${slotted("slottedRowElements")}></slot>
1573
- </div>
1574
- </template>
81
+ ${when((x) => x?.flagLoaded && x?._svg, (x) => html`${html.partial(x._svg)}`)}
82
+ <${visuallyHiddenTag} class="label">${(x) => x?.label}</${visuallyHiddenTag}>
83
+ </figure>
1575
84
  `;
1576
85
  };
1577
86
  //#endregion
1578
- //#region src/lib/data-grid/data-grid-cell.ts
1579
- var defaultCellContentsTemplate = html`
1580
- <template>
1581
- ${(x) => x.rowData === null || x.columnDefinition === null || x.columnDefinition.columnDataKey === null ? null : x.rowData[x.columnDefinition.columnDataKey]}
1582
- </template>
1583
- `;
1584
- var defaultHeaderCellContentsTemplate = html`
1585
- <template>
1586
- ${(x) => x.columnDefinition.title === void 0 ? x.columnDefinition.columnDataKey : x.columnDefinition.title}
1587
- </template>
1588
- `;
1589
- /**
1590
- * @public
1591
- * @component data-grid-cell
1592
- * @slot - Default slot.
1593
- * @slot action-items - Add action items to the cell using this slot.
1594
- * @event {CustomEvent<{columnDataKey: string, ariaSort: string | null, sortDirection: string | null}>} sort - Event that fires when a sortable column header is clicked
1595
- * @event {CustomEvent<{cell: HTMLElement, row: HTMLElement, isHeaderCell: boolean, columnDataKey: string}>} cell-click - Event that fires when a cell is clicked
1596
- * @event {CustomEvent<HTMLElement>} cell-focused - Fires a custom 'cell-focused' event when focus is on the cell or its contents
1597
- */
1598
- var DataGridCell = class extends Localized(HostSemantics(VividElement)) {
1599
- constructor(..._args) {
1600
- super(..._args);
1601
- this.cellType = DataGridCellTypes.default;
1602
- this.rowData = null;
1603
- this.columnDefinition = null;
1604
- this.isActiveCell = false;
1605
- this.customCellView = null;
1606
- this.updateCellStyle = () => {
1607
- if (this.gridColumn && !this.gridColumn.includes("undefined")) this.style.gridColumn = this.gridColumn;
1608
- else this.style.removeProperty("grid-column");
1609
- };
1610
- this._selectable = false;
1611
- this.selected = false;
1612
- this.ariaSelected = null;
1613
- this.ariaSort = null;
1614
- }
1615
- /** @internal */
1616
- cellTypeChanged() {
1617
- if (this.$fastController.isConnected) this.updateCellView();
1618
- }
1619
- /** @internal */
1620
- gridColumnChanged() {
1621
- if (this.$fastController.isConnected) this.updateCellStyle();
1622
- }
1623
- /** @internal */
1624
- columnDefinitionChanged(_oldValue, _newValue) {
1625
- if (this.$fastController.isConnected) this.updateCellView();
1626
- }
1627
- /**
1628
- * Updates the fixed column style
1629
- * @internal
1630
- */
1631
- updateFixedStyle() {
1632
- if (this.fixedPosition !== void 0) {
1633
- this.setAttribute("data-fixed", "");
1634
- this.style.left = this.fixedPosition;
1635
- } else {
1636
- this.removeAttribute("data-fixed");
1637
- this.style.removeProperty("left");
1638
- }
1639
- }
1640
- /**
1641
- * Sets the fixed state and position for this cell
1642
- * @internal
1643
- */
1644
- setFixedPosition(position) {
1645
- this.fixedPosition = position;
1646
- this.updateFixedStyle();
1647
- }
1648
- /** @internal */
1649
- connectedCallback() {
1650
- super.connectedCallback();
1651
- this.addEventListener(eventFocusIn, this.handleFocusin);
1652
- this.addEventListener(eventFocusOut, this.handleFocusout);
1653
- this.addEventListener(eventKeyDown, this.handleKeydown);
1654
- this.style.gridColumn = `${this.columnDefinition?.gridColumn === void 0 ? 0 : this.columnDefinition.gridColumn}`;
1655
- this.updateCellView();
1656
- this.updateCellStyle();
1657
- this.updateFixedStyle();
1658
- }
1659
- /** @internal */
1660
- disconnectedCallback() {
1661
- super.disconnectedCallback();
1662
- this.removeEventListener(eventFocusIn, this.handleFocusin);
1663
- this.removeEventListener(eventFocusOut, this.handleFocusout);
1664
- this.removeEventListener(eventKeyDown, this.handleKeydown);
1665
- this.disconnectCellView();
1666
- }
1667
- /** @internal */
1668
- handleFocusin(_) {
1669
- this.shadowRoot.querySelector(".base").classList.add("active");
1670
- if (this.isActiveCell) return;
1671
- this.isActiveCell = true;
1672
- switch (this.cellType) {
1673
- case DataGridCellTypes.columnHeader:
1674
- if (this.columnDefinition !== null && this.columnDefinition.headerCellInternalFocusQueue !== true && typeof this.columnDefinition.headerCellFocusTargetCallback === "function") {
1675
- const focusTarget = this.columnDefinition.headerCellFocusTargetCallback(this);
1676
- /* v8 ignore else -- @preserve */
1677
- if (focusTarget !== null) focusTarget.focus();
1678
- }
1679
- break;
1680
- default:
1681
- if (this.columnDefinition !== null && this.columnDefinition.cellInternalFocusQueue !== true && typeof this.columnDefinition.cellFocusTargetCallback === "function") {
1682
- const focusTarget = this.columnDefinition.cellFocusTargetCallback(this);
1683
- /* v8 ignore else -- @preserve */
1684
- if (focusTarget !== null) focusTarget.focus();
1685
- }
1686
- break;
1687
- }
1688
- this.$emit("cell-focused", this);
1689
- }
1690
- /** @internal */
1691
- handleFocusout(_) {
1692
- this.shadowRoot.querySelector(".base").classList.remove("active");
1693
- /* v8 ignore else -- @preserve */
1694
- if (this !== document.activeElement && !this.contains(document.activeElement)) this.isActiveCell = false;
1695
- }
1696
- /** @internal */
1697
- handleKeydown(e) {
1698
- if (e.defaultPrevented || this.columnDefinition === null || this.cellType === DataGridCellTypes.default && this.columnDefinition.cellInternalFocusQueue !== true || this.cellType === DataGridCellTypes.columnHeader && this.columnDefinition.headerCellInternalFocusQueue !== true) return;
1699
- switch (e.key) {
1700
- case keyEnter:
1701
- case keyFunction2:
1702
- if (this.contains(document.activeElement) && document.activeElement !== this) return;
1703
- switch (this.cellType) {
1704
- case DataGridCellTypes.columnHeader:
1705
- if (this.columnDefinition.headerCellFocusTargetCallback !== void 0) {
1706
- const focusTarget = this.columnDefinition.headerCellFocusTargetCallback(this);
1707
- /* v8 ignore else -- @preserve */
1708
- if (focusTarget !== null) focusTarget.focus();
1709
- e.preventDefault();
1710
- }
1711
- break;
1712
- default:
1713
- if (this.columnDefinition.cellFocusTargetCallback !== void 0) {
1714
- const focusTarget = this.columnDefinition.cellFocusTargetCallback(this);
1715
- /* v8 ignore else -- @preserve */
1716
- if (focusTarget !== null) focusTarget.focus();
1717
- e.preventDefault();
1718
- }
1719
- break;
1720
- }
1721
- break;
1722
- case keyEscape:
1723
- /* v8 ignore else -- @preserve */
1724
- if (this.contains(document.activeElement) && document.activeElement !== this) {
1725
- this.focus();
1726
- e.preventDefault();
1727
- }
1728
- break;
1729
- }
1730
- }
1731
- updateCellView() {
1732
- this.disconnectCellView();
1733
- if (this.columnDefinition === null) return;
1734
- switch (this.cellType) {
1735
- case DataGridCellTypes.columnHeader:
1736
- if (this.columnDefinition.headerCellTemplate !== void 0) this.customCellView = this.columnDefinition.headerCellTemplate.render(this, this);
1737
- else this.customCellView = defaultHeaderCellContentsTemplate.render(this, this);
1738
- break;
1739
- case DataGridCellTypes.rowHeader:
1740
- case DataGridCellTypes.default:
1741
- if (this.columnDefinition.cellTemplate !== void 0) this.customCellView = this.columnDefinition.cellTemplate.render(this, this);
1742
- else this.customCellView = defaultCellContentsTemplate.render(this, this);
1743
- break;
1744
- }
1745
- if (!this.columnDefinition?.sortable) this.sortDirection = void 0;
1746
- else if (this.columnDefinition.sortDirection) this.sortDirection = this.columnDefinition.sortDirection;
1747
- else this.sortDirection = DataGridCellSortStates.none;
1748
- }
1749
- disconnectCellView() {
1750
- if (this.customCellView !== null) {
1751
- this.customCellView.dispose();
1752
- this.customCellView = null;
1753
- }
1754
- }
1755
- /** @internal */
1756
- ariaSelectedChanged(prevValue, newValue) {
1757
- super.ariaSelectedChanged(prevValue, newValue);
1758
- this._selectable = newValue !== null;
1759
- this.selected = newValue === "true";
1760
- }
1761
- /** @internal */
1762
- ariaSortChanged(oldValue, newValue) {
1763
- super.ariaSortChanged(oldValue, newValue);
1764
- if (newValue === null) {
1765
- this.sortDirection = void 0;
1766
- return;
1767
- }
1768
- this.sortDirection = newValue;
1769
- }
1770
- #getColumnDataKey() {
1771
- return this.columnDefinition && this.columnDefinition.columnDataKey ? this.columnDefinition.columnDataKey : this.textContent.trim();
1772
- }
1773
- /** @internal */
1774
- _handleInteraction() {
1775
- const isHeaderCell = this.cellType === "columnheader";
1776
- if (isHeaderCell && this.sortDirection !== void 0) this.$emit("sort", {
1777
- columnDataKey: this.#getColumnDataKey(),
1778
- sortDirection: this.sortDirection
1779
- });
1780
- if (!(isHeaderCell ? this.columnDefinition?.headerCellInternalFocusQueue : this.columnDefinition?.cellInternalFocusQueue)) this.$emit("cell-click", {
1781
- cell: this,
1782
- row: this.parentElement,
1783
- isHeaderCell,
1784
- columnDataKey: this.#getColumnDataKey()
1785
- });
1786
- return true;
1787
- }
1788
- };
1789
- __decorate([attr({ attribute: "cell-type" })], DataGridCell.prototype, "cellType", void 0);
1790
- __decorate([attr({ attribute: "grid-column" })], DataGridCell.prototype, "gridColumn", void 0);
1791
- __decorate([observable], DataGridCell.prototype, "rowData", void 0);
1792
- __decorate([observable], DataGridCell.prototype, "columnDefinition", void 0);
1793
- __decorate([observable], DataGridCell.prototype, "_selectable", void 0);
1794
- __decorate([attr({ mode: "boolean" })], DataGridCell.prototype, "selected", void 0);
1795
- __decorate([attr({ attribute: "sort-direction" })], DataGridCell.prototype, "sortDirection", void 0);
1796
- __decorate([observable], DataGridCell.prototype, "_actionItemsSlottedContent", void 0);
1797
- //#endregion
1798
- //#region src/lib/data-grid/data-grid-row.template.ts
1799
- function calculateAriaSelectedValue$1(x) {
1800
- if (x._selectable && x.selected) return "true";
1801
- if (x._selectable && !x.selected) return "false";
1802
- return null;
1803
- }
1804
- function createCellItemTemplate(context) {
1805
- const cellTag = context.tagFor(DataGridCell);
1806
- return html`
1807
- <${cellTag}
1808
- cell-type="${(x) => x.isRowHeader ? "rowheader" : void 0}"
1809
- grid-column="${(_, c) => c.index + 1}"
1810
- :rowData="${(_, c) => c.parent.rowData}"
1811
- :columnDefinition="${(x) => x}"
1812
- selected="${(_, c) => c.parent.ariaSelected === "true" ? true : null}"
1813
- ></${cellTag}>
1814
- `;
1815
- }
1816
- function createHeaderCellItemTemplate(context) {
1817
- const cellTag = context.tagFor(DataGridCell);
1818
- return html`
1819
- <${cellTag}
1820
- cell-type="columnheader"
1821
- grid-column="${(_, c) => c.index + 1}"
1822
- :columnDefinition="${(x) => x}"
1823
- ></${cellTag}>
1824
- `;
1825
- }
1826
- var DataGridRowTemplate = (context) => {
1827
- const cellItemTemplate = createCellItemTemplate(context);
1828
- const headerCellItemTemplate = createHeaderCellItemTemplate(context);
1829
- return html`
1830
- <template
1831
- ${applyHostSemantics({
1832
- role: "row",
1833
- ariaSelected: calculateAriaSelectedValue$1
1834
- })}
1835
- class="${(x) => x.rowType !== "default" ? x.rowType : ""}"
1836
- :defaultCellItemTemplate="${cellItemTemplate}"
1837
- :defaultHeaderCellItemTemplate="${headerCellItemTemplate}"
1838
- ${children({
1839
- property: "cellElements",
1840
- filter: elements("[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],[data-vvd-component=\"data-grid-cell\"]")
1841
- })}
1842
- >
1843
- <div
1844
- class="${(x) => classNames("base", ["selected", !!x.selected])}"
1845
- style="grid-template-columns: ${(x) => x.gridTemplateColumns};"
1846
- >
1847
- <slot ${slotted("slottedCellElements")}></slot>
1848
- </div>
1849
- </template>
1850
- `;
1851
- };
1852
- //#endregion
1853
- //#region src/lib/data-grid/data-grid-cell.template.ts
1854
- function shouldShowSortIcons(x) {
1855
- return x.cellType === "columnheader" && x.sortDirection !== void 0 && x.sortDirection !== DataGridCellSortStates.other;
1856
- }
1857
- function getSortIcon(x) {
1858
- if (x.sortDirection === DataGridCellSortStates.ascending) return "sort-asc-solid";
1859
- if (x.sortDirection === DataGridCellSortStates.descending) return "sort-desc-solid";
1860
- return "sort-solid";
1861
- }
1862
- function calculateAriaSelectedValue(x) {
1863
- if (x._selectable && x.selected) return "true";
1864
- if (x._selectable && !x.selected) return "false";
1865
- return null;
1866
- }
1867
- function renderSortIcons(c) {
1868
- const iconTag = c.tagFor(Icon);
1869
- return html`
1870
- ${when(shouldShowSortIcons, html`
1871
- <${iconTag} class="header-icon" name="${getSortIcon}"></${iconTag}>
1872
- `)}
1873
- `;
1874
- }
1875
- function shouldAnnounceSortState(x) {
1876
- return x.cellType === DataGridCellTypes.columnHeader && x.sortDirection !== void 0;
1877
- }
1878
- function getSortStateKey(x) {
1879
- return x.sortDirection ?? DataGridCellSortStates.none;
1880
- }
1881
- function getLocalizedSortStatus(x) {
1882
- const direction = getSortStateKey(x);
1883
- return x.locale.dataGrid.cell.sortStatus?.[direction];
1884
- }
1885
- function getLocalizedSortInstruction(x) {
1886
- const direction = getSortStateKey(x);
1887
- return x.locale.dataGrid.cell.sortInstruction?.[direction];
1888
- }
1889
- function getSortAnnouncement(x) {
1890
- return [getLocalizedSortStatus(x), getLocalizedSortInstruction(x)].filter((part) => !!part).join(" ").trim();
1891
- }
1892
- function handleKeyDown(x, e) {
1893
- if (e.key === keyEnter || e.key === keySpace) {
1894
- if (e.target.closest("[slot=\"action-items\"]")) return true;
1895
- x._handleInteraction();
1896
- }
1897
- return true;
1898
- }
1899
- function handleClick(x, e) {
1900
- if (e.target.closest("[slot=\"action-items\"]")) return true;
1901
- x._handleInteraction();
1902
- return true;
1903
- }
1904
- var DataGridCellTemplate = (context) => {
1905
- const visuallyHiddenTagName = context.tagFor(VisuallyHidden);
1906
- return html`
1907
- <template
1908
- tabindex="-1"
1909
- ${applyHostSemantics({
1910
- role: (x) => DataGridCellRole[x.cellType] ?? DataGridCellRole.default,
1911
- ariaSelected: calculateAriaSelectedValue,
1912
- ariaSort: (x) => x.sortDirection ?? null
1913
- })}
1914
- @click="${(x, c) => handleClick(x, c.event)}"
1915
- @keydown="${(x, c) => handleKeyDown(x, c.event)}"
1916
- >
1917
- <div
1918
- class="${(x) => classNames("base", ["selected", x.selected], ["has-action-items", Boolean(x._actionItemsSlottedContent?.length)])}"
1919
- >
1920
- <div
1921
- class="content"
1922
- role="${(x) => shouldShowSortIcons(x) ? "button" : void 0}"
1923
- >
1924
- ${(x) => x.selected ? html`<${visuallyHiddenTagName}
1925
- data-announcement="selection"
1926
- >
1927
- ${(x) => x.locale.dataGrid.cell.selected}
1928
- </${visuallyHiddenTagName}>` : null}
1929
- <slot></slot>
1930
- ${when(shouldShowSortIcons, html`<${visuallyHiddenTagName}
1931
- data-announcement="button-role"
1932
- >
1933
- ${(x) => x.locale.dataGrid.cell.button}
1934
- </${visuallyHiddenTagName}>
1935
- `)}
1936
- ${when(shouldAnnounceSortState, html`<${visuallyHiddenTagName}
1937
- aria-live="polite"
1938
- data-announcement="sort-state"
1939
- >
1940
- ${getSortAnnouncement}
1941
- </${visuallyHiddenTagName}>`)}
1942
- ${(_) => renderSortIcons(context)}
1943
- </div>
1944
- <slot
1945
- name="action-items"
1946
- ${slotted("_actionItemsSlottedContent")}
1947
- ></slot>
1948
- </div>
1949
- </template>
1950
- `;
1951
- };
1952
- //#endregion
1953
- //#region src/lib/data-grid/definition.ts
1954
- /** @internal */
1955
- var dataGridCellDefinition = defineVividComponent("data-grid-cell", DataGridCell, DataGridCellTemplate, [iconDefinition, visuallyHiddenDefinition], { styles: data_grid_cell_default });
1956
- /** @internal */
1957
- var dataGridRowDefinition = defineVividComponent("data-grid-row", DataGridRow, DataGridRowTemplate, [dataGridCellDefinition], { styles: data_grid_row_default });
87
+ //#region src/lib/flag/definition.ts
1958
88
  /** @internal */
1959
- var dataGridDefinition = defineVividComponent("data-grid", DataGrid, DataGridTemplate, [dataGridRowDefinition], { styles: data_grid_default });
89
+ var flagDefinition = defineVividComponent("flag", Flag, flagTemplate, [visuallyHiddenDefinition], { styles: flag_default });
1960
90
  /**
1961
- * Registers the data-grid element with the design system.
91
+ * Registers the flag component & its prerequisite components with the design system.
1962
92
  *
1963
93
  * @param prefix - the prefix to use for the component name
1964
94
  */
1965
- var registerDataGrid = createRegisterFunction(dataGridDefinition);
95
+ var registerFlag = createRegisterFunction(flagDefinition);
1966
96
  //#endregion
1967
- export { DataGridCell as a, registerDataGrid as i, dataGridDefinition as n, DataGridRow as o, dataGridRowDefinition as r, DataGrid as s, dataGridCellDefinition as t };
97
+ export { registerFlag as n, Flag as r, flagDefinition as t };