@api-client/ui 0.5.57 → 0.6.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 (1015) hide show
  1. package/INSTRUCTIONS.md +141 -0
  2. package/build/src/builders/DialogBuilder.d.ts +245 -0
  3. package/build/src/builders/DialogBuilder.d.ts.map +1 -0
  4. package/build/src/builders/DialogBuilder.js +406 -0
  5. package/build/src/builders/DialogBuilder.js.map +1 -0
  6. package/build/src/cache/Cache.d.ts +72 -0
  7. package/build/src/cache/Cache.d.ts.map +1 -0
  8. package/build/src/cache/Cache.js +221 -0
  9. package/build/src/cache/Cache.js.map +1 -0
  10. package/build/src/core/Model.d.ts +18 -64
  11. package/build/src/core/Model.d.ts.map +1 -1
  12. package/build/src/core/Model.js +47 -90
  13. package/build/src/core/Model.js.map +1 -1
  14. package/build/src/core/ServiceManager.d.ts.map +1 -1
  15. package/build/src/core/ServiceManager.js +1 -0
  16. package/build/src/core/ServiceManager.js.map +1 -1
  17. package/build/src/data/BreadcrumbsModel.d.ts +37 -0
  18. package/build/src/data/BreadcrumbsModel.d.ts.map +1 -0
  19. package/build/src/data/BreadcrumbsModel.js +77 -0
  20. package/build/src/data/BreadcrumbsModel.js.map +1 -0
  21. package/build/src/data/DataCatalogModel.d.ts +53 -0
  22. package/build/src/data/DataCatalogModel.d.ts.map +1 -0
  23. package/build/src/data/DataCatalogModel.js +174 -0
  24. package/build/src/data/DataCatalogModel.js.map +1 -0
  25. package/build/src/data/DomainBrowserModel.d.ts +30 -0
  26. package/build/src/data/DomainBrowserModel.d.ts.map +1 -0
  27. package/build/src/data/DomainBrowserModel.js +113 -0
  28. package/build/src/data/DomainBrowserModel.js.map +1 -0
  29. package/build/src/data/FileModel.d.ts +36 -0
  30. package/build/src/data/FileModel.d.ts.map +1 -0
  31. package/build/src/data/FileModel.js +71 -0
  32. package/build/src/data/FileModel.js.map +1 -0
  33. package/build/src/data/FileShareModel.d.ts +57 -0
  34. package/build/src/data/FileShareModel.d.ts.map +1 -0
  35. package/build/src/data/FileShareModel.js +238 -0
  36. package/build/src/data/FileShareModel.js.map +1 -0
  37. package/build/src/data/FilesModel.d.ts +71 -0
  38. package/build/src/data/FilesModel.d.ts.map +1 -0
  39. package/build/src/data/FilesModel.js +205 -0
  40. package/build/src/data/FilesModel.js.map +1 -0
  41. package/build/src/data/InvitationModel.d.ts +27 -0
  42. package/build/src/data/InvitationModel.d.ts.map +1 -0
  43. package/build/src/data/InvitationModel.js +66 -0
  44. package/build/src/data/InvitationModel.js.map +1 -0
  45. package/build/src/data/PatchableFileModel.d.ts +167 -0
  46. package/build/src/data/PatchableFileModel.d.ts.map +1 -0
  47. package/build/src/data/PatchableFileModel.js +243 -0
  48. package/build/src/data/PatchableFileModel.js.map +1 -0
  49. package/build/src/data/PatchableLiveDataContentModel.d.ts +8 -0
  50. package/build/src/data/PatchableLiveDataContentModel.d.ts.map +1 -0
  51. package/build/src/data/PatchableLiveDataContentModel.js +32 -0
  52. package/build/src/data/PatchableLiveDataContentModel.js.map +1 -0
  53. package/build/src/data/PatchableRawContentModel.d.ts +10 -0
  54. package/build/src/data/PatchableRawContentModel.d.ts.map +1 -0
  55. package/build/src/data/PatchableRawContentModel.js +38 -0
  56. package/build/src/data/PatchableRawContentModel.js.map +1 -0
  57. package/build/src/data/TrashModel.d.ts +51 -0
  58. package/build/src/data/TrashModel.d.ts.map +1 -0
  59. package/build/src/data/TrashModel.js +112 -0
  60. package/build/src/data/TrashModel.js.map +1 -0
  61. package/build/src/data/UserModel.d.ts +28 -0
  62. package/build/src/data/UserModel.d.ts.map +1 -0
  63. package/build/src/data/UserModel.js +98 -0
  64. package/build/src/data/UserModel.js.map +1 -0
  65. package/build/src/data/UsersModel.d.ts +84 -0
  66. package/build/src/data/UsersModel.d.ts.map +1 -0
  67. package/build/src/data/UsersModel.js +307 -0
  68. package/build/src/data/UsersModel.js.map +1 -0
  69. package/build/src/data/retry_logic.d.ts +66 -0
  70. package/build/src/data/retry_logic.d.ts.map +1 -0
  71. package/build/src/data/retry_logic.js +84 -0
  72. package/build/src/data/retry_logic.js.map +1 -0
  73. package/build/src/elements/autocomplete/internals/autocomplete.d.ts.map +1 -1
  74. package/build/src/elements/autocomplete/internals/autocomplete.js +5 -2
  75. package/build/src/elements/autocomplete/internals/autocomplete.js.map +1 -1
  76. package/build/src/elements/data-table/DataTable.d.ts +17 -0
  77. package/build/src/elements/data-table/DataTable.d.ts.map +1 -1
  78. package/build/src/elements/data-table/DataTable.js +5 -4
  79. package/build/src/elements/data-table/DataTable.js.map +1 -1
  80. package/build/src/elements/data-table/DataTable.styles.d.ts.map +1 -1
  81. package/build/src/elements/data-table/DataTable.styles.js +7 -2
  82. package/build/src/elements/data-table/DataTable.styles.js.map +1 -1
  83. package/build/src/elements/data-table/data-catalog-table.d.ts +16 -0
  84. package/build/src/elements/data-table/data-catalog-table.d.ts.map +1 -0
  85. package/build/src/elements/data-table/data-catalog-table.js +33 -0
  86. package/build/src/elements/data-table/data-catalog-table.js.map +1 -0
  87. package/build/src/elements/data-table/filesystem-table.d.ts +17 -0
  88. package/build/src/elements/data-table/filesystem-table.d.ts.map +1 -0
  89. package/build/src/elements/data-table/filesystem-table.js +35 -0
  90. package/build/src/elements/data-table/filesystem-table.js.map +1 -0
  91. package/build/src/elements/data-table/internals/DataCatalog.styles.d.ts +3 -0
  92. package/build/src/elements/data-table/internals/DataCatalog.styles.d.ts.map +1 -0
  93. package/build/src/elements/data-table/internals/DataCatalog.styles.js +29 -0
  94. package/build/src/elements/data-table/internals/DataCatalog.styles.js.map +1 -0
  95. package/build/src/elements/data-table/internals/DataCatalogTable.d.ts +44 -0
  96. package/build/src/elements/data-table/internals/DataCatalogTable.d.ts.map +1 -0
  97. package/build/src/elements/data-table/internals/DataCatalogTable.js +208 -0
  98. package/build/src/elements/data-table/internals/DataCatalogTable.js.map +1 -0
  99. package/build/src/elements/data-table/internals/Filesystem.styles.d.ts +3 -0
  100. package/build/src/elements/data-table/internals/Filesystem.styles.d.ts.map +1 -0
  101. package/build/src/elements/data-table/internals/Filesystem.styles.js +23 -0
  102. package/build/src/elements/data-table/internals/Filesystem.styles.js.map +1 -0
  103. package/build/src/elements/data-table/internals/FilesystemDataTable.d.ts +36 -0
  104. package/build/src/elements/data-table/internals/FilesystemDataTable.d.ts.map +1 -0
  105. package/build/src/elements/data-table/internals/FilesystemDataTable.js +230 -0
  106. package/build/src/elements/data-table/internals/FilesystemDataTable.js.map +1 -0
  107. package/build/src/elements/data-table/internals/TrashDataTable.d.ts +32 -0
  108. package/build/src/elements/data-table/internals/TrashDataTable.d.ts.map +1 -0
  109. package/build/src/elements/data-table/internals/TrashDataTable.js +161 -0
  110. package/build/src/elements/data-table/internals/TrashDataTable.js.map +1 -0
  111. package/build/src/elements/data-table/internals/UserData.styles.d.ts +3 -0
  112. package/build/src/elements/data-table/internals/UserData.styles.d.ts.map +1 -0
  113. package/build/src/elements/data-table/internals/UserData.styles.js +16 -0
  114. package/build/src/elements/data-table/internals/UserData.styles.js.map +1 -0
  115. package/build/src/elements/data-table/internals/UsersDataTable.d.ts +30 -0
  116. package/build/src/elements/data-table/internals/UsersDataTable.d.ts.map +1 -0
  117. package/build/src/elements/data-table/internals/UsersDataTable.js +243 -0
  118. package/build/src/elements/data-table/internals/UsersDataTable.js.map +1 -0
  119. package/build/src/elements/data-table/trash-table.d.ts +11 -0
  120. package/build/src/elements/data-table/trash-table.d.ts.map +1 -0
  121. package/build/src/elements/data-table/trash-table.js +28 -0
  122. package/build/src/elements/data-table/trash-table.js.map +1 -0
  123. package/build/src/elements/data-table/users-table.d.ts +11 -0
  124. package/build/src/elements/data-table/users-table.d.ts.map +1 -0
  125. package/build/src/elements/data-table/users-table.js +28 -0
  126. package/build/src/elements/data-table/users-table.js.map +1 -0
  127. package/build/src/elements/file-system/internals/Breadcrumbs.d.ts +0 -2
  128. package/build/src/elements/file-system/internals/Breadcrumbs.d.ts.map +1 -1
  129. package/build/src/elements/file-system/internals/Breadcrumbs.js +0 -2
  130. package/build/src/elements/file-system/internals/Breadcrumbs.js.map +1 -1
  131. package/build/src/elements/file-system/internals/QuickApiFilesystem.d.ts +197 -0
  132. package/build/src/elements/file-system/internals/QuickApiFilesystem.d.ts.map +1 -0
  133. package/build/src/elements/file-system/internals/QuickApiFilesystem.js +434 -0
  134. package/build/src/elements/file-system/internals/QuickApiFilesystem.js.map +1 -0
  135. package/build/src/elements/file-system/internals/QuickApiFilesystem.styles.d.ts +3 -0
  136. package/build/src/elements/file-system/internals/QuickApiFilesystem.styles.d.ts.map +1 -0
  137. package/build/src/elements/file-system/internals/QuickApiFilesystem.styles.js +49 -0
  138. package/build/src/elements/file-system/internals/QuickApiFilesystem.styles.js.map +1 -0
  139. package/build/src/elements/file-system/internals/ShareFile.d.ts +166 -0
  140. package/build/src/elements/file-system/internals/ShareFile.d.ts.map +1 -0
  141. package/build/src/elements/file-system/internals/ShareFile.js +581 -0
  142. package/build/src/elements/file-system/internals/ShareFile.js.map +1 -0
  143. package/build/src/elements/file-system/internals/ShareFile.styles.d.ts +3 -0
  144. package/build/src/elements/file-system/internals/ShareFile.styles.d.ts.map +1 -0
  145. package/build/src/elements/file-system/internals/ShareFile.styles.js +98 -0
  146. package/build/src/elements/file-system/internals/ShareFile.styles.js.map +1 -0
  147. package/build/src/elements/file-system/quick-api-filesystem.d.ts +11 -0
  148. package/build/src/elements/file-system/quick-api-filesystem.d.ts.map +1 -0
  149. package/build/src/elements/file-system/quick-api-filesystem.js +28 -0
  150. package/build/src/elements/file-system/quick-api-filesystem.js.map +1 -0
  151. package/build/src/elements/file-system/share-file.d.ts +20 -0
  152. package/build/src/elements/file-system/share-file.d.ts.map +1 -0
  153. package/build/src/elements/file-system/share-file.js +37 -0
  154. package/build/src/elements/file-system/share-file.js.map +1 -0
  155. package/build/src/elements/file-system/ui-breadcrumbs.d.ts +2 -0
  156. package/build/src/elements/file-system/ui-breadcrumbs.d.ts.map +1 -1
  157. package/build/src/elements/file-system/ui-breadcrumbs.js +2 -0
  158. package/build/src/elements/file-system/ui-breadcrumbs.js.map +1 -1
  159. package/build/src/elements/layout/SplitItem.d.ts.map +1 -1
  160. package/build/src/elements/layout/SplitItem.js +0 -7
  161. package/build/src/elements/layout/SplitItem.js.map +1 -1
  162. package/build/src/elements/navigation/internals/Navigation.d.ts +1 -1
  163. package/build/src/elements/navigation/internals/Navigation.d.ts.map +1 -1
  164. package/build/src/elements/navigation/internals/Navigation.js +10 -4
  165. package/build/src/elements/navigation/internals/Navigation.js.map +1 -1
  166. package/build/src/elements/search-input/internals/input.d.ts +27 -0
  167. package/build/src/elements/search-input/internals/input.d.ts.map +1 -0
  168. package/build/src/elements/search-input/internals/input.js +99 -0
  169. package/build/src/elements/search-input/internals/input.js.map +1 -0
  170. package/build/src/elements/search-input/internals/input.styles.d.ts +3 -0
  171. package/build/src/elements/search-input/internals/input.styles.d.ts.map +1 -0
  172. package/build/src/elements/search-input/internals/input.styles.js +38 -0
  173. package/build/src/elements/search-input/internals/input.styles.js.map +1 -0
  174. package/build/src/elements/search-input/search-input.d.ts +12 -0
  175. package/build/src/elements/search-input/search-input.d.ts.map +1 -0
  176. package/build/src/elements/search-input/search-input.js +30 -0
  177. package/build/src/elements/search-input/search-input.js.map +1 -0
  178. package/build/src/elements/setup/internals/InvitationScreen.d.ts +189 -0
  179. package/build/src/elements/setup/internals/InvitationScreen.d.ts.map +1 -0
  180. package/build/src/elements/setup/internals/InvitationScreen.js +466 -0
  181. package/build/src/elements/setup/internals/InvitationScreen.js.map +1 -0
  182. package/build/src/elements/setup/internals/InvitationScreen.styles.d.ts +3 -0
  183. package/build/src/elements/setup/internals/InvitationScreen.styles.d.ts.map +1 -0
  184. package/build/src/elements/setup/internals/InvitationScreen.styles.js +3 -0
  185. package/build/src/elements/setup/internals/InvitationScreen.styles.js.map +1 -0
  186. package/build/src/elements/setup/internals/LoginScreen.d.ts +61 -0
  187. package/build/src/elements/setup/internals/LoginScreen.d.ts.map +1 -0
  188. package/build/src/elements/setup/internals/LoginScreen.js +181 -0
  189. package/build/src/elements/setup/internals/LoginScreen.js.map +1 -0
  190. package/build/src/elements/setup/internals/LoginScreen.styles.d.ts +3 -0
  191. package/build/src/elements/setup/internals/LoginScreen.styles.d.ts.map +1 -0
  192. package/build/src/elements/setup/internals/LoginScreen.styles.js +3 -0
  193. package/build/src/elements/setup/internals/LoginScreen.styles.js.map +1 -0
  194. package/build/src/elements/setup/internals/OrganizationCreateScreen.d.ts +67 -0
  195. package/build/src/elements/setup/internals/OrganizationCreateScreen.d.ts.map +1 -0
  196. package/build/src/elements/setup/internals/OrganizationCreateScreen.js +194 -0
  197. package/build/src/elements/setup/internals/OrganizationCreateScreen.js.map +1 -0
  198. package/build/src/elements/setup/internals/OrganizationCreateScreen.styles.d.ts +3 -0
  199. package/build/src/elements/setup/internals/OrganizationCreateScreen.styles.d.ts.map +1 -0
  200. package/build/src/elements/setup/internals/OrganizationCreateScreen.styles.js +3 -0
  201. package/build/src/elements/setup/internals/OrganizationCreateScreen.styles.js.map +1 -0
  202. package/build/src/elements/setup/internals/OrganizationSelectionScreen.d.ts +41 -0
  203. package/build/src/elements/setup/internals/OrganizationSelectionScreen.d.ts.map +1 -0
  204. package/build/src/elements/setup/internals/OrganizationSelectionScreen.js +123 -0
  205. package/build/src/elements/setup/internals/OrganizationSelectionScreen.js.map +1 -0
  206. package/build/src/elements/setup/internals/OrganizationSelectionScreen.styles.d.ts +3 -0
  207. package/build/src/elements/setup/internals/OrganizationSelectionScreen.styles.d.ts.map +1 -0
  208. package/build/src/elements/setup/internals/OrganizationSelectionScreen.styles.js +3 -0
  209. package/build/src/elements/setup/internals/OrganizationSelectionScreen.styles.js.map +1 -0
  210. package/build/src/elements/setup/internals/OrganizationSelector.d.ts +56 -0
  211. package/build/src/elements/setup/internals/OrganizationSelector.d.ts.map +1 -0
  212. package/build/src/elements/setup/internals/OrganizationSelector.js +140 -0
  213. package/build/src/elements/setup/internals/OrganizationSelector.js.map +1 -0
  214. package/build/src/elements/setup/internals/OrganizationSelector.styles.d.ts +3 -0
  215. package/build/src/elements/setup/internals/OrganizationSelector.styles.d.ts.map +1 -0
  216. package/build/src/elements/setup/internals/OrganizationSelector.styles.js +3 -0
  217. package/build/src/elements/setup/internals/OrganizationSelector.styles.js.map +1 -0
  218. package/build/src/elements/setup/internals/common.styles.d.ts +3 -0
  219. package/build/src/elements/setup/internals/common.styles.d.ts.map +1 -0
  220. package/build/src/elements/setup/internals/common.styles.js +72 -0
  221. package/build/src/elements/setup/internals/common.styles.js.map +1 -0
  222. package/build/src/elements/setup/internals/icons.d.ts +4 -0
  223. package/build/src/elements/setup/internals/icons.d.ts.map +1 -0
  224. package/build/src/elements/setup/internals/icons.js +41 -0
  225. package/build/src/elements/setup/internals/icons.js.map +1 -0
  226. package/build/src/elements/setup/invitation-screen.d.ts +13 -0
  227. package/build/src/elements/setup/invitation-screen.d.ts.map +1 -0
  228. package/build/src/elements/setup/invitation-screen.js +32 -0
  229. package/build/src/elements/setup/invitation-screen.js.map +1 -0
  230. package/build/src/elements/setup/login-screen.d.ts +12 -0
  231. package/build/src/elements/setup/login-screen.d.ts.map +1 -0
  232. package/build/src/elements/setup/login-screen.js +31 -0
  233. package/build/src/elements/setup/login-screen.js.map +1 -0
  234. package/build/src/elements/setup/organization-create-screen.d.ts +13 -0
  235. package/build/src/elements/setup/organization-create-screen.d.ts.map +1 -0
  236. package/build/src/elements/setup/organization-create-screen.js +32 -0
  237. package/build/src/elements/setup/organization-create-screen.js.map +1 -0
  238. package/build/src/elements/setup/organization-selection-screen.d.ts +14 -0
  239. package/build/src/elements/setup/organization-selection-screen.d.ts.map +1 -0
  240. package/build/src/elements/setup/organization-selection-screen.js +33 -0
  241. package/build/src/elements/setup/organization-selection-screen.js.map +1 -0
  242. package/build/src/elements/setup/organization-selector.d.ts +32 -0
  243. package/build/src/elements/setup/organization-selector.d.ts.map +1 -0
  244. package/build/src/elements/setup/organization-selector.js +50 -0
  245. package/build/src/elements/setup/organization-selector.js.map +1 -0
  246. package/build/src/elements/user/internals/UserAvatar.d.ts +3 -1
  247. package/build/src/elements/user/internals/UserAvatar.d.ts.map +1 -1
  248. package/build/src/elements/user/internals/UserAvatar.js +5 -1
  249. package/build/src/elements/user/internals/UserAvatar.js.map +1 -1
  250. package/build/src/events/DomainEvents.d.ts +31 -0
  251. package/build/src/events/DomainEvents.d.ts.map +1 -0
  252. package/build/src/events/DomainEvents.js +65 -0
  253. package/build/src/events/DomainEvents.js.map +1 -0
  254. package/build/src/events/EventTypes.d.ts +7 -0
  255. package/build/src/events/EventTypes.d.ts.map +1 -1
  256. package/build/src/events/EventTypes.js +8 -0
  257. package/build/src/events/EventTypes.js.map +1 -1
  258. package/build/src/events/Events.d.ts +32 -25
  259. package/build/src/events/Events.d.ts.map +1 -1
  260. package/build/src/events/Events.js +2 -0
  261. package/build/src/events/Events.js.map +1 -1
  262. package/build/src/exceptions/builder.d.ts +11 -0
  263. package/build/src/exceptions/builder.d.ts.map +1 -0
  264. package/build/src/exceptions/builder.js +29 -0
  265. package/build/src/exceptions/builder.js.map +1 -0
  266. package/build/src/help/help_coordinator.d.ts +82 -0
  267. package/build/src/help/help_coordinator.d.ts.map +1 -0
  268. package/build/src/help/help_coordinator.js +206 -0
  269. package/build/src/help/help_coordinator.js.map +1 -0
  270. package/build/src/help/help_panel.d.ts +88 -0
  271. package/build/src/help/help_panel.d.ts.map +1 -0
  272. package/build/src/help/help_panel.js +323 -0
  273. package/build/src/help/help_panel.js.map +1 -0
  274. package/build/src/help/help_panel.styles.d.ts +3 -0
  275. package/build/src/help/help_panel.styles.d.ts.map +1 -0
  276. package/build/src/help/help_panel.styles.js +196 -0
  277. package/build/src/help/help_panel.styles.js.map +1 -0
  278. package/build/src/help/help_service_controller.d.ts +108 -0
  279. package/build/src/help/help_service_controller.d.ts.map +1 -0
  280. package/build/src/help/help_service_controller.js +252 -0
  281. package/build/src/help/help_service_controller.js.map +1 -0
  282. package/build/src/help/help_topic.d.ts +60 -0
  283. package/build/src/help/help_topic.d.ts.map +1 -0
  284. package/build/src/help/help_topic.js +2 -0
  285. package/build/src/help/help_topic.js.map +1 -0
  286. package/build/src/help/index.d.ts +6 -0
  287. package/build/src/help/index.d.ts.map +1 -0
  288. package/build/src/help/index.js +6 -0
  289. package/build/src/help/index.js.map +1 -0
  290. package/build/src/help/render.d.ts +14 -0
  291. package/build/src/help/render.d.ts.map +1 -0
  292. package/build/src/help/render.js +37 -0
  293. package/build/src/help/render.js.map +1 -0
  294. package/build/src/lib/Dom.d.ts +7 -0
  295. package/build/src/lib/Dom.d.ts.map +1 -1
  296. package/build/src/lib/Dom.js +33 -0
  297. package/build/src/lib/Dom.js.map +1 -1
  298. package/build/src/lib/files/Utils.d.ts +10 -0
  299. package/build/src/lib/files/Utils.d.ts.map +1 -1
  300. package/build/src/lib/files/Utils.js +47 -0
  301. package/build/src/lib/files/Utils.js.map +1 -1
  302. package/build/src/md/button/internals/base.d.ts +5 -0
  303. package/build/src/md/button/internals/base.d.ts.map +1 -1
  304. package/build/src/md/button/internals/base.js +23 -4
  305. package/build/src/md/button/internals/base.js.map +1 -1
  306. package/build/src/md/dropdown-list/internals/UiDropdownList.d.ts.map +1 -1
  307. package/build/src/md/dropdown-list/internals/UiDropdownList.js +11 -5
  308. package/build/src/md/dropdown-list/internals/UiDropdownList.js.map +1 -1
  309. package/build/src/md/icons/Icons.d.ts +2 -1
  310. package/build/src/md/icons/Icons.d.ts.map +1 -1
  311. package/build/src/md/icons/Icons.js +1 -0
  312. package/build/src/md/icons/Icons.js.map +1 -1
  313. package/build/src/md/input/Input.d.ts.map +1 -1
  314. package/build/src/md/input/Input.js +14 -9
  315. package/build/src/md/input/Input.js.map +1 -1
  316. package/build/src/md/list/internals/List.d.ts +8 -0
  317. package/build/src/md/list/internals/List.d.ts.map +1 -1
  318. package/build/src/md/list/internals/List.js +24 -2
  319. package/build/src/md/list/internals/List.js.map +1 -1
  320. package/build/src/md/list/internals/ListItem.d.ts.map +1 -1
  321. package/build/src/md/list/internals/ListItem.js +8 -4
  322. package/build/src/md/list/internals/ListItem.js.map +1 -1
  323. package/build/src/md/menu/internal/Menu.js +2 -2
  324. package/build/src/md/menu/internal/Menu.js.map +1 -1
  325. package/build/src/md/menu/internal/Menu.styles.d.ts.map +1 -1
  326. package/build/src/md/menu/internal/Menu.styles.js +4 -2
  327. package/build/src/md/menu/internal/Menu.styles.js.map +1 -1
  328. package/build/src/md/select/internals/Select.d.ts +4 -3
  329. package/build/src/md/select/internals/Select.d.ts.map +1 -1
  330. package/build/src/md/select/internals/Select.js +12 -15
  331. package/build/src/md/select/internals/Select.js.map +1 -1
  332. package/build/src/md/select/internals/Select.styles.d.ts.map +1 -1
  333. package/build/src/md/select/internals/Select.styles.js +3 -0
  334. package/build/src/md/select/internals/Select.styles.js.map +1 -1
  335. package/build/src/md/switch/internals/SwitchElement.js +3 -3
  336. package/build/src/md/switch/internals/SwitchElement.js.map +1 -1
  337. package/build/src/modeling/api-create-action-editor.d.ts +17 -0
  338. package/build/src/modeling/api-create-action-editor.d.ts.map +1 -0
  339. package/build/src/modeling/api-create-action-editor.js +34 -0
  340. package/build/src/modeling/api-create-action-editor.js.map +1 -0
  341. package/build/src/modeling/api-delete-action-editor.d.ts +21 -0
  342. package/build/src/modeling/api-delete-action-editor.d.ts.map +1 -0
  343. package/build/src/modeling/api-delete-action-editor.js +38 -0
  344. package/build/src/modeling/api-delete-action-editor.js.map +1 -0
  345. package/build/src/modeling/api-list-action-editor.d.ts +25 -0
  346. package/build/src/modeling/api-list-action-editor.d.ts.map +1 -0
  347. package/build/src/modeling/api-list-action-editor.js +42 -0
  348. package/build/src/modeling/api-list-action-editor.js.map +1 -0
  349. package/build/src/modeling/api-modeling-access-configuration.d.ts +21 -0
  350. package/build/src/modeling/api-modeling-access-configuration.d.ts.map +1 -0
  351. package/build/src/modeling/api-modeling-access-configuration.js +37 -0
  352. package/build/src/modeling/api-modeling-access-configuration.js.map +1 -0
  353. package/build/src/modeling/api-modeling-access.d.ts +19 -0
  354. package/build/src/modeling/api-modeling-access.d.ts.map +1 -0
  355. package/build/src/modeling/api-modeling-access.js +39 -0
  356. package/build/src/modeling/api-modeling-access.js.map +1 -0
  357. package/build/src/modeling/api-modeling-actions.d.ts +20 -0
  358. package/build/src/modeling/api-modeling-actions.d.ts.map +1 -0
  359. package/build/src/modeling/api-modeling-actions.js +40 -0
  360. package/build/src/modeling/api-modeling-actions.js.map +1 -0
  361. package/build/src/modeling/api-modeling-description.d.ts +15 -0
  362. package/build/src/modeling/api-modeling-description.d.ts.map +1 -0
  363. package/build/src/modeling/api-modeling-description.js +35 -0
  364. package/build/src/modeling/api-modeling-description.js.map +1 -0
  365. package/build/src/modeling/api-modeling-entity-card.d.ts +11 -0
  366. package/build/src/modeling/api-modeling-entity-card.d.ts.map +1 -0
  367. package/build/src/modeling/api-modeling-entity-card.js +28 -0
  368. package/build/src/modeling/api-modeling-entity-card.js.map +1 -0
  369. package/build/src/modeling/api-modeling-entity-editor.d.ts +17 -0
  370. package/build/src/modeling/api-modeling-entity-editor.d.ts.map +1 -0
  371. package/build/src/modeling/api-modeling-entity-editor.js +35 -0
  372. package/build/src/modeling/api-modeling-entity-editor.js.map +1 -0
  373. package/build/src/modeling/api-modeling-navigation.d.ts +13 -0
  374. package/build/src/modeling/api-modeling-navigation.d.ts.map +1 -0
  375. package/build/src/modeling/api-modeling-navigation.js +31 -0
  376. package/build/src/modeling/api-modeling-navigation.js.map +1 -0
  377. package/build/src/modeling/api-modeling-rate-limiting.d.ts +19 -0
  378. package/build/src/modeling/api-modeling-rate-limiting.d.ts.map +1 -0
  379. package/build/src/modeling/api-modeling-rate-limiting.js +35 -0
  380. package/build/src/modeling/api-modeling-rate-limiting.js.map +1 -0
  381. package/build/src/modeling/api-modeling-session.d.ts +31 -0
  382. package/build/src/modeling/api-modeling-session.d.ts.map +1 -0
  383. package/build/src/modeling/api-modeling-session.js +51 -0
  384. package/build/src/modeling/api-modeling-session.js.map +1 -0
  385. package/build/src/modeling/api-read-action-editor.d.ts +17 -0
  386. package/build/src/modeling/api-read-action-editor.d.ts.map +1 -0
  387. package/build/src/modeling/api-read-action-editor.js +34 -0
  388. package/build/src/modeling/api-read-action-editor.js.map +1 -0
  389. package/build/src/modeling/api-search-action-editor.d.ts +22 -0
  390. package/build/src/modeling/api-search-action-editor.d.ts.map +1 -0
  391. package/build/src/modeling/api-search-action-editor.js +39 -0
  392. package/build/src/modeling/api-search-action-editor.js.map +1 -0
  393. package/build/src/modeling/api-update-action-editor.d.ts +18 -0
  394. package/build/src/modeling/api-update-action-editor.d.ts.map +1 -0
  395. package/build/src/modeling/api-update-action-editor.js +35 -0
  396. package/build/src/modeling/api-update-action-editor.js.map +1 -0
  397. package/build/src/modeling/data-catalog-browser.d.ts +12 -0
  398. package/build/src/modeling/data-catalog-browser.d.ts.map +1 -0
  399. package/build/src/modeling/data-catalog-browser.js +28 -0
  400. package/build/src/modeling/data-catalog-browser.js.map +1 -0
  401. package/build/src/modeling/dialogs/CalculatedTaxonomy.d.ts +64 -0
  402. package/build/src/modeling/dialogs/CalculatedTaxonomy.d.ts.map +1 -0
  403. package/build/src/modeling/dialogs/CalculatedTaxonomy.js +299 -0
  404. package/build/src/modeling/dialogs/CalculatedTaxonomy.js.map +1 -0
  405. package/build/src/modeling/dialogs/CategoryTaxonomy.d.ts +25 -0
  406. package/build/src/modeling/dialogs/CategoryTaxonomy.d.ts.map +1 -0
  407. package/build/src/modeling/dialogs/CategoryTaxonomy.js +210 -0
  408. package/build/src/modeling/dialogs/CategoryTaxonomy.js.map +1 -0
  409. package/build/src/modeling/dialogs/CurrencyTaxonomy.d.ts +27 -0
  410. package/build/src/modeling/dialogs/CurrencyTaxonomy.d.ts.map +1 -0
  411. package/build/src/modeling/dialogs/CurrencyTaxonomy.js +212 -0
  412. package/build/src/modeling/dialogs/CurrencyTaxonomy.js.map +1 -0
  413. package/build/src/modeling/dialogs/EmailTaxonomy.d.ts +21 -0
  414. package/build/src/modeling/dialogs/EmailTaxonomy.d.ts.map +1 -0
  415. package/build/src/modeling/dialogs/EmailTaxonomy.js +166 -0
  416. package/build/src/modeling/dialogs/EmailTaxonomy.js.map +1 -0
  417. package/build/src/modeling/dialogs/GeospatialCoordinatesTaxonomy.d.ts +34 -0
  418. package/build/src/modeling/dialogs/GeospatialCoordinatesTaxonomy.d.ts.map +1 -0
  419. package/build/src/modeling/dialogs/GeospatialCoordinatesTaxonomy.js +488 -0
  420. package/build/src/modeling/dialogs/GeospatialCoordinatesTaxonomy.js.map +1 -0
  421. package/build/src/modeling/dialogs/HtmlTaxonomy.d.ts +31 -0
  422. package/build/src/modeling/dialogs/HtmlTaxonomy.d.ts.map +1 -0
  423. package/build/src/modeling/dialogs/HtmlTaxonomy.js +331 -0
  424. package/build/src/modeling/dialogs/HtmlTaxonomy.js.map +1 -0
  425. package/build/src/modeling/dialogs/MarkdownTaxonomy.d.ts +29 -0
  426. package/build/src/modeling/dialogs/MarkdownTaxonomy.d.ts.map +1 -0
  427. package/build/src/modeling/dialogs/MarkdownTaxonomy.js +290 -0
  428. package/build/src/modeling/dialogs/MarkdownTaxonomy.js.map +1 -0
  429. package/build/src/modeling/dialogs/PasswordTaxonomy.d.ts +22 -0
  430. package/build/src/modeling/dialogs/PasswordTaxonomy.d.ts.map +1 -0
  431. package/build/src/modeling/dialogs/PasswordTaxonomy.js +206 -0
  432. package/build/src/modeling/dialogs/PasswordTaxonomy.js.map +1 -0
  433. package/build/src/modeling/dialogs/PhoneTaxonomy.d.ts +21 -0
  434. package/build/src/modeling/dialogs/PhoneTaxonomy.d.ts.map +1 -0
  435. package/build/src/modeling/dialogs/PhoneTaxonomy.js +242 -0
  436. package/build/src/modeling/dialogs/PhoneTaxonomy.js.map +1 -0
  437. package/build/src/modeling/dialogs/PublicUniqueNameTaxonomy.d.ts +28 -0
  438. package/build/src/modeling/dialogs/PublicUniqueNameTaxonomy.d.ts.map +1 -0
  439. package/build/src/modeling/dialogs/PublicUniqueNameTaxonomy.js +205 -0
  440. package/build/src/modeling/dialogs/PublicUniqueNameTaxonomy.js.map +1 -0
  441. package/build/src/modeling/dialogs/SkuTaxonomy.d.ts +31 -0
  442. package/build/src/modeling/dialogs/SkuTaxonomy.d.ts.map +1 -0
  443. package/build/src/modeling/dialogs/SkuTaxonomy.js +319 -0
  444. package/build/src/modeling/dialogs/SkuTaxonomy.js.map +1 -0
  445. package/build/src/modeling/dialogs/StatusTaxonomy.d.ts +27 -0
  446. package/build/src/modeling/dialogs/StatusTaxonomy.d.ts.map +1 -0
  447. package/build/src/modeling/dialogs/StatusTaxonomy.js +138 -0
  448. package/build/src/modeling/dialogs/StatusTaxonomy.js.map +1 -0
  449. package/build/src/modeling/dialogs/TagsTaxonomy.d.ts +23 -0
  450. package/build/src/modeling/dialogs/TagsTaxonomy.d.ts.map +1 -0
  451. package/build/src/modeling/dialogs/TagsTaxonomy.js +169 -0
  452. package/build/src/modeling/dialogs/TagsTaxonomy.js.map +1 -0
  453. package/build/src/modeling/dialogs/TaxonomyDialog.d.ts +53 -0
  454. package/build/src/modeling/dialogs/TaxonomyDialog.d.ts.map +1 -0
  455. package/build/src/modeling/dialogs/TaxonomyDialog.js +176 -0
  456. package/build/src/modeling/dialogs/TaxonomyDialog.js.map +1 -0
  457. package/build/src/modeling/dialogs/UrlTaxonomy.d.ts +19 -0
  458. package/build/src/modeling/dialogs/UrlTaxonomy.d.ts.map +1 -0
  459. package/build/src/modeling/dialogs/UrlTaxonomy.js +199 -0
  460. package/build/src/modeling/dialogs/UrlTaxonomy.js.map +1 -0
  461. package/build/src/modeling/dialogs/common.d.ts +3 -0
  462. package/build/src/modeling/dialogs/common.d.ts.map +1 -0
  463. package/build/src/modeling/dialogs/common.js +52 -0
  464. package/build/src/modeling/dialogs/common.js.map +1 -0
  465. package/build/src/modeling/domain-association-editor.d.ts +20 -0
  466. package/build/src/modeling/domain-association-editor.d.ts.map +1 -0
  467. package/build/src/modeling/domain-association-editor.js +38 -0
  468. package/build/src/modeling/domain-association-editor.js.map +1 -0
  469. package/build/src/modeling/domain-auto-fields-dialog.d.ts +23 -0
  470. package/build/src/modeling/domain-auto-fields-dialog.d.ts.map +1 -0
  471. package/build/src/modeling/domain-auto-fields-dialog.js +58 -0
  472. package/build/src/modeling/domain-auto-fields-dialog.js.map +1 -0
  473. package/build/src/modeling/domain-browser.d.ts +19 -0
  474. package/build/src/modeling/domain-browser.d.ts.map +1 -0
  475. package/build/src/modeling/domain-browser.js +37 -0
  476. package/build/src/modeling/domain-browser.js.map +1 -0
  477. package/build/src/modeling/domain-entity-editor.d.ts +26 -0
  478. package/build/src/modeling/domain-entity-editor.d.ts.map +1 -0
  479. package/build/src/modeling/domain-entity-editor.js +46 -0
  480. package/build/src/modeling/domain-entity-editor.js.map +1 -0
  481. package/build/src/modeling/domain-file-import.d.ts +16 -0
  482. package/build/src/modeling/domain-file-import.d.ts.map +1 -0
  483. package/build/src/modeling/domain-file-import.js +34 -0
  484. package/build/src/modeling/domain-file-import.js.map +1 -0
  485. package/build/src/modeling/domain-model-editor.d.ts +13 -0
  486. package/build/src/modeling/domain-model-editor.d.ts.map +1 -0
  487. package/build/src/modeling/domain-model-editor.js +33 -0
  488. package/build/src/modeling/domain-model-editor.js.map +1 -0
  489. package/build/src/modeling/domain-namespace-editor.d.ts +14 -0
  490. package/build/src/modeling/domain-namespace-editor.d.ts.map +1 -0
  491. package/build/src/modeling/domain-namespace-editor.js +34 -0
  492. package/build/src/modeling/domain-namespace-editor.js.map +1 -0
  493. package/build/src/modeling/domain-navigation.d.ts +15 -0
  494. package/build/src/modeling/domain-navigation.d.ts.map +1 -0
  495. package/build/src/modeling/domain-navigation.js +33 -0
  496. package/build/src/modeling/domain-navigation.js.map +1 -0
  497. package/build/src/modeling/domain-property-editor.d.ts +14 -0
  498. package/build/src/modeling/domain-property-editor.d.ts.map +1 -0
  499. package/build/src/modeling/domain-property-editor.js +33 -0
  500. package/build/src/modeling/domain-property-editor.js.map +1 -0
  501. package/build/src/modeling/domain-template-browser.d.ts +14 -0
  502. package/build/src/modeling/domain-template-browser.d.ts.map +1 -0
  503. package/build/src/modeling/domain-template-browser.js +31 -0
  504. package/build/src/modeling/domain-template-browser.js.map +1 -0
  505. package/build/src/modeling/domain-validation-report.d.ts +13 -0
  506. package/build/src/modeling/domain-validation-report.d.ts.map +1 -0
  507. package/build/src/modeling/domain-validation-report.js +30 -0
  508. package/build/src/modeling/domain-validation-report.js.map +1 -0
  509. package/build/src/modeling/internals/ApiCreateActionEditor.d.ts +60 -0
  510. package/build/src/modeling/internals/ApiCreateActionEditor.d.ts.map +1 -0
  511. package/build/src/modeling/internals/ApiCreateActionEditor.js +216 -0
  512. package/build/src/modeling/internals/ApiCreateActionEditor.js.map +1 -0
  513. package/build/src/modeling/internals/ApiDeleteActionEditor.d.ts +70 -0
  514. package/build/src/modeling/internals/ApiDeleteActionEditor.d.ts.map +1 -0
  515. package/build/src/modeling/internals/ApiDeleteActionEditor.js +301 -0
  516. package/build/src/modeling/internals/ApiDeleteActionEditor.js.map +1 -0
  517. package/build/src/modeling/internals/ApiEditor.d.ts +59 -0
  518. package/build/src/modeling/internals/ApiEditor.d.ts.map +1 -0
  519. package/build/src/modeling/internals/ApiEditor.js +119 -0
  520. package/build/src/modeling/internals/ApiEditor.js.map +1 -0
  521. package/build/src/modeling/internals/ApiListActionEditor.d.ts +93 -0
  522. package/build/src/modeling/internals/ApiListActionEditor.d.ts.map +1 -0
  523. package/build/src/modeling/internals/ApiListActionEditor.js +505 -0
  524. package/build/src/modeling/internals/ApiListActionEditor.js.map +1 -0
  525. package/build/src/modeling/internals/ApiModelingAccessConfiguration.d.ts +100 -0
  526. package/build/src/modeling/internals/ApiModelingAccessConfiguration.d.ts.map +1 -0
  527. package/build/src/modeling/internals/ApiModelingAccessConfiguration.js +607 -0
  528. package/build/src/modeling/internals/ApiModelingAccessConfiguration.js.map +1 -0
  529. package/build/src/modeling/internals/ApiModelingAccessScreen.d.ts +36 -0
  530. package/build/src/modeling/internals/ApiModelingAccessScreen.d.ts.map +1 -0
  531. package/build/src/modeling/internals/ApiModelingAccessScreen.js +296 -0
  532. package/build/src/modeling/internals/ApiModelingAccessScreen.js.map +1 -0
  533. package/build/src/modeling/internals/ApiModelingActionsScreen.d.ts +82 -0
  534. package/build/src/modeling/internals/ApiModelingActionsScreen.d.ts.map +1 -0
  535. package/build/src/modeling/internals/ApiModelingActionsScreen.js +298 -0
  536. package/build/src/modeling/internals/ApiModelingActionsScreen.js.map +1 -0
  537. package/build/src/modeling/internals/ApiModelingDescriptionScreen.d.ts +40 -0
  538. package/build/src/modeling/internals/ApiModelingDescriptionScreen.d.ts.map +1 -0
  539. package/build/src/modeling/internals/ApiModelingDescriptionScreen.js +356 -0
  540. package/build/src/modeling/internals/ApiModelingDescriptionScreen.js.map +1 -0
  541. package/build/src/modeling/internals/ApiModelingEntityCard.d.ts +74 -0
  542. package/build/src/modeling/internals/ApiModelingEntityCard.d.ts.map +1 -0
  543. package/build/src/modeling/internals/ApiModelingEntityCard.js +225 -0
  544. package/build/src/modeling/internals/ApiModelingEntityCard.js.map +1 -0
  545. package/build/src/modeling/internals/ApiModelingEntityEditor.d.ts +50 -0
  546. package/build/src/modeling/internals/ApiModelingEntityEditor.d.ts.map +1 -0
  547. package/build/src/modeling/internals/ApiModelingEntityEditor.js +384 -0
  548. package/build/src/modeling/internals/ApiModelingEntityEditor.js.map +1 -0
  549. package/build/src/modeling/internals/ApiModelingNavigation.d.ts +36 -0
  550. package/build/src/modeling/internals/ApiModelingNavigation.d.ts.map +1 -0
  551. package/build/src/modeling/internals/ApiModelingNavigation.js +115 -0
  552. package/build/src/modeling/internals/ApiModelingNavigation.js.map +1 -0
  553. package/build/src/modeling/internals/ApiModelingRateLimiting.d.ts +59 -0
  554. package/build/src/modeling/internals/ApiModelingRateLimiting.d.ts.map +1 -0
  555. package/build/src/modeling/internals/ApiModelingRateLimiting.js +394 -0
  556. package/build/src/modeling/internals/ApiModelingRateLimiting.js.map +1 -0
  557. package/build/src/modeling/internals/ApiModelingScreen.d.ts +23 -0
  558. package/build/src/modeling/internals/ApiModelingScreen.d.ts.map +1 -0
  559. package/build/src/modeling/internals/ApiModelingScreen.js +50 -0
  560. package/build/src/modeling/internals/ApiModelingScreen.js.map +1 -0
  561. package/build/src/modeling/internals/ApiModelingSessionScreen.d.ts +79 -0
  562. package/build/src/modeling/internals/ApiModelingSessionScreen.d.ts.map +1 -0
  563. package/build/src/modeling/internals/ApiModelingSessionScreen.js +708 -0
  564. package/build/src/modeling/internals/ApiModelingSessionScreen.js.map +1 -0
  565. package/build/src/modeling/internals/ApiReadActionEditor.d.ts +60 -0
  566. package/build/src/modeling/internals/ApiReadActionEditor.d.ts.map +1 -0
  567. package/build/src/modeling/internals/ApiReadActionEditor.js +216 -0
  568. package/build/src/modeling/internals/ApiReadActionEditor.js.map +1 -0
  569. package/build/src/modeling/internals/ApiSearchActionEditor.d.ts +75 -0
  570. package/build/src/modeling/internals/ApiSearchActionEditor.d.ts.map +1 -0
  571. package/build/src/modeling/internals/ApiSearchActionEditor.js +340 -0
  572. package/build/src/modeling/internals/ApiSearchActionEditor.js.map +1 -0
  573. package/build/src/modeling/internals/ApiUpdateActionEditor.d.ts +67 -0
  574. package/build/src/modeling/internals/ApiUpdateActionEditor.d.ts.map +1 -0
  575. package/build/src/modeling/internals/ApiUpdateActionEditor.js +301 -0
  576. package/build/src/modeling/internals/ApiUpdateActionEditor.js.map +1 -0
  577. package/build/src/modeling/internals/DataCatalogBrowser.d.ts +108 -0
  578. package/build/src/modeling/internals/DataCatalogBrowser.d.ts.map +1 -0
  579. package/build/src/modeling/internals/DataCatalogBrowser.js +320 -0
  580. package/build/src/modeling/internals/DataCatalogBrowser.js.map +1 -0
  581. package/build/src/modeling/internals/DomainAssociationEditor.d.ts +116 -0
  582. package/build/src/modeling/internals/DomainAssociationEditor.d.ts.map +1 -0
  583. package/build/src/modeling/internals/DomainAssociationEditor.js +688 -0
  584. package/build/src/modeling/internals/DomainAssociationEditor.js.map +1 -0
  585. package/build/src/modeling/internals/DomainAutoFieldsDialog.d.ts +45 -0
  586. package/build/src/modeling/internals/DomainAutoFieldsDialog.d.ts.map +1 -0
  587. package/build/src/modeling/internals/DomainAutoFieldsDialog.js +290 -0
  588. package/build/src/modeling/internals/DomainAutoFieldsDialog.js.map +1 -0
  589. package/build/src/modeling/internals/DomainBrowser.d.ts +176 -0
  590. package/build/src/modeling/internals/DomainBrowser.d.ts.map +1 -0
  591. package/build/src/modeling/internals/DomainBrowser.js +492 -0
  592. package/build/src/modeling/internals/DomainBrowser.js.map +1 -0
  593. package/build/src/modeling/internals/DomainEntityEditor.d.ts +168 -0
  594. package/build/src/modeling/internals/DomainEntityEditor.d.ts.map +1 -0
  595. package/build/src/modeling/internals/DomainEntityEditor.js +1183 -0
  596. package/build/src/modeling/internals/DomainEntityEditor.js.map +1 -0
  597. package/build/src/modeling/internals/DomainFileImport.d.ts +101 -0
  598. package/build/src/modeling/internals/DomainFileImport.d.ts.map +1 -0
  599. package/build/src/modeling/internals/DomainFileImport.js +473 -0
  600. package/build/src/modeling/internals/DomainFileImport.js.map +1 -0
  601. package/build/src/modeling/internals/DomainModelEditor.d.ts +15 -0
  602. package/build/src/modeling/internals/DomainModelEditor.d.ts.map +1 -0
  603. package/build/src/modeling/internals/DomainModelEditor.js +81 -0
  604. package/build/src/modeling/internals/DomainModelEditor.js.map +1 -0
  605. package/build/src/modeling/internals/DomainNamespaceEditor.d.ts +15 -0
  606. package/build/src/modeling/internals/DomainNamespaceEditor.d.ts.map +1 -0
  607. package/build/src/modeling/internals/DomainNamespaceEditor.js +81 -0
  608. package/build/src/modeling/internals/DomainNamespaceEditor.js.map +1 -0
  609. package/build/src/modeling/internals/DomainNavigation.d.ts +352 -0
  610. package/build/src/modeling/internals/DomainNavigation.d.ts.map +1 -0
  611. package/build/src/modeling/internals/DomainNavigation.js +1734 -0
  612. package/build/src/modeling/internals/DomainNavigation.js.map +1 -0
  613. package/build/src/modeling/internals/DomainPropertyEditor.d.ts +289 -0
  614. package/build/src/modeling/internals/DomainPropertyEditor.d.ts.map +1 -0
  615. package/build/src/modeling/internals/DomainPropertyEditor.js +1478 -0
  616. package/build/src/modeling/internals/DomainPropertyEditor.js.map +1 -0
  617. package/build/src/modeling/internals/DomainTemplateBrowser.d.ts +82 -0
  618. package/build/src/modeling/internals/DomainTemplateBrowser.d.ts.map +1 -0
  619. package/build/src/modeling/internals/DomainTemplateBrowser.js +492 -0
  620. package/build/src/modeling/internals/DomainTemplateBrowser.js.map +1 -0
  621. package/build/src/modeling/internals/DomainValidationReport.d.ts +85 -0
  622. package/build/src/modeling/internals/DomainValidationReport.d.ts.map +1 -0
  623. package/build/src/modeling/internals/DomainValidationReport.js +372 -0
  624. package/build/src/modeling/internals/DomainValidationReport.js.map +1 -0
  625. package/build/src/modeling/internals/ModelingElement.d.ts +56 -0
  626. package/build/src/modeling/internals/ModelingElement.d.ts.map +1 -0
  627. package/build/src/modeling/internals/ModelingElement.js +122 -0
  628. package/build/src/modeling/internals/ModelingElement.js.map +1 -0
  629. package/build/src/modeling/internals/styles/AccessConfiguration.styles.d.ts +3 -0
  630. package/build/src/modeling/internals/styles/AccessConfiguration.styles.d.ts.map +1 -0
  631. package/build/src/modeling/internals/styles/AccessConfiguration.styles.js +106 -0
  632. package/build/src/modeling/internals/styles/AccessConfiguration.styles.js.map +1 -0
  633. package/build/src/modeling/internals/styles/ApiCreateActionEditor.styles.d.ts +3 -0
  634. package/build/src/modeling/internals/styles/ApiCreateActionEditor.styles.d.ts.map +1 -0
  635. package/build/src/modeling/internals/styles/ApiCreateActionEditor.styles.js +15 -0
  636. package/build/src/modeling/internals/styles/ApiCreateActionEditor.styles.js.map +1 -0
  637. package/build/src/modeling/internals/styles/ApiDeleteActionEditor.styles.d.ts +3 -0
  638. package/build/src/modeling/internals/styles/ApiDeleteActionEditor.styles.d.ts.map +1 -0
  639. package/build/src/modeling/internals/styles/ApiDeleteActionEditor.styles.js +15 -0
  640. package/build/src/modeling/internals/styles/ApiDeleteActionEditor.styles.js.map +1 -0
  641. package/build/src/modeling/internals/styles/ApiListActionEditor.styles.d.ts +3 -0
  642. package/build/src/modeling/internals/styles/ApiListActionEditor.styles.d.ts.map +1 -0
  643. package/build/src/modeling/internals/styles/ApiListActionEditor.styles.js +15 -0
  644. package/build/src/modeling/internals/styles/ApiListActionEditor.styles.js.map +1 -0
  645. package/build/src/modeling/internals/styles/ApiModelingActionsScreen.styles.d.ts +3 -0
  646. package/build/src/modeling/internals/styles/ApiModelingActionsScreen.styles.d.ts.map +1 -0
  647. package/build/src/modeling/internals/styles/ApiModelingActionsScreen.styles.js +31 -0
  648. package/build/src/modeling/internals/styles/ApiModelingActionsScreen.styles.js.map +1 -0
  649. package/build/src/modeling/internals/styles/ApiModelingEntityCard.d.ts +3 -0
  650. package/build/src/modeling/internals/styles/ApiModelingEntityCard.d.ts.map +1 -0
  651. package/build/src/modeling/internals/styles/ApiModelingEntityCard.js +85 -0
  652. package/build/src/modeling/internals/styles/ApiModelingEntityCard.js.map +1 -0
  653. package/build/src/modeling/internals/styles/ApiModelingEntityEditor.d.ts +3 -0
  654. package/build/src/modeling/internals/styles/ApiModelingEntityEditor.d.ts.map +1 -0
  655. package/build/src/modeling/internals/styles/ApiModelingEntityEditor.js +68 -0
  656. package/build/src/modeling/internals/styles/ApiModelingEntityEditor.js.map +1 -0
  657. package/build/src/modeling/internals/styles/ApiModelingNavigation.styles.d.ts +3 -0
  658. package/build/src/modeling/internals/styles/ApiModelingNavigation.styles.d.ts.map +1 -0
  659. package/build/src/modeling/internals/styles/ApiModelingNavigation.styles.js +23 -0
  660. package/build/src/modeling/internals/styles/ApiModelingNavigation.styles.js.map +1 -0
  661. package/build/src/modeling/internals/styles/ApiReadActionEditor.styles.d.ts +3 -0
  662. package/build/src/modeling/internals/styles/ApiReadActionEditor.styles.d.ts.map +1 -0
  663. package/build/src/modeling/internals/styles/ApiReadActionEditor.styles.js +15 -0
  664. package/build/src/modeling/internals/styles/ApiReadActionEditor.styles.js.map +1 -0
  665. package/build/src/modeling/internals/styles/ApiSearchActionEditor.styles.d.ts +3 -0
  666. package/build/src/modeling/internals/styles/ApiSearchActionEditor.styles.d.ts.map +1 -0
  667. package/build/src/modeling/internals/styles/ApiSearchActionEditor.styles.js +15 -0
  668. package/build/src/modeling/internals/styles/ApiSearchActionEditor.styles.js.map +1 -0
  669. package/build/src/modeling/internals/styles/ApiUpdateActionEditor.styles.d.ts +3 -0
  670. package/build/src/modeling/internals/styles/ApiUpdateActionEditor.styles.d.ts.map +1 -0
  671. package/build/src/modeling/internals/styles/ApiUpdateActionEditor.styles.js +15 -0
  672. package/build/src/modeling/internals/styles/ApiUpdateActionEditor.styles.js.map +1 -0
  673. package/build/src/modeling/internals/styles/DataCatalogBrowser.styles.d.ts +3 -0
  674. package/build/src/modeling/internals/styles/DataCatalogBrowser.styles.d.ts.map +1 -0
  675. package/build/src/modeling/internals/styles/DataCatalogBrowser.styles.js +53 -0
  676. package/build/src/modeling/internals/styles/DataCatalogBrowser.styles.js.map +1 -0
  677. package/build/src/modeling/internals/styles/DomainAutoFieldsDialog.d.ts +3 -0
  678. package/build/src/modeling/internals/styles/DomainAutoFieldsDialog.d.ts.map +1 -0
  679. package/build/src/modeling/internals/styles/DomainAutoFieldsDialog.js +35 -0
  680. package/build/src/modeling/internals/styles/DomainAutoFieldsDialog.js.map +1 -0
  681. package/build/src/modeling/internals/styles/DomainBrowser.styles.d.ts +3 -0
  682. package/build/src/modeling/internals/styles/DomainBrowser.styles.d.ts.map +1 -0
  683. package/build/src/modeling/internals/styles/DomainBrowser.styles.js +26 -0
  684. package/build/src/modeling/internals/styles/DomainBrowser.styles.js.map +1 -0
  685. package/build/src/modeling/internals/styles/DomainEntityEditor.styles.d.ts +3 -0
  686. package/build/src/modeling/internals/styles/DomainEntityEditor.styles.d.ts.map +1 -0
  687. package/build/src/modeling/internals/styles/DomainEntityEditor.styles.js +98 -0
  688. package/build/src/modeling/internals/styles/DomainEntityEditor.styles.js.map +1 -0
  689. package/build/src/modeling/internals/styles/DomainFileImport.styles.d.ts +3 -0
  690. package/build/src/modeling/internals/styles/DomainFileImport.styles.d.ts.map +1 -0
  691. package/build/src/modeling/internals/styles/DomainFileImport.styles.js +100 -0
  692. package/build/src/modeling/internals/styles/DomainFileImport.styles.js.map +1 -0
  693. package/build/src/modeling/internals/styles/DomainModelEditor.styles.d.ts +3 -0
  694. package/build/src/modeling/internals/styles/DomainModelEditor.styles.d.ts.map +1 -0
  695. package/build/src/modeling/internals/styles/DomainModelEditor.styles.js +7 -0
  696. package/build/src/modeling/internals/styles/DomainModelEditor.styles.js.map +1 -0
  697. package/build/src/modeling/internals/styles/DomainNamespaceEditor.styles.d.ts +3 -0
  698. package/build/src/modeling/internals/styles/DomainNamespaceEditor.styles.d.ts.map +1 -0
  699. package/build/src/modeling/internals/styles/DomainNamespaceEditor.styles.js +7 -0
  700. package/build/src/modeling/internals/styles/DomainNamespaceEditor.styles.js.map +1 -0
  701. package/build/src/modeling/internals/styles/DomainNavigation.styles.d.ts +3 -0
  702. package/build/src/modeling/internals/styles/DomainNavigation.styles.d.ts.map +1 -0
  703. package/build/src/modeling/internals/styles/DomainNavigation.styles.js +343 -0
  704. package/build/src/modeling/internals/styles/DomainNavigation.styles.js.map +1 -0
  705. package/build/src/modeling/internals/styles/DomainPropertyEditor.styles.d.ts +3 -0
  706. package/build/src/modeling/internals/styles/DomainPropertyEditor.styles.d.ts.map +1 -0
  707. package/build/src/modeling/internals/styles/DomainPropertyEditor.styles.js +18 -0
  708. package/build/src/modeling/internals/styles/DomainPropertyEditor.styles.js.map +1 -0
  709. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.d.ts +3 -0
  710. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.d.ts.map +1 -0
  711. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.js +553 -0
  712. package/build/src/modeling/internals/styles/DomainTemplateBrowser.styles.js.map +1 -0
  713. package/build/src/modeling/internals/styles/DomainValidationReport.styles.d.ts +3 -0
  714. package/build/src/modeling/internals/styles/DomainValidationReport.styles.d.ts.map +1 -0
  715. package/build/src/modeling/internals/styles/DomainValidationReport.styles.js +75 -0
  716. package/build/src/modeling/internals/styles/DomainValidationReport.styles.js.map +1 -0
  717. package/build/src/modeling/internals/styles/EditorCommon.styles.d.ts +8 -0
  718. package/build/src/modeling/internals/styles/EditorCommon.styles.d.ts.map +1 -0
  719. package/build/src/modeling/internals/styles/EditorCommon.styles.js +141 -0
  720. package/build/src/modeling/internals/styles/EditorCommon.styles.js.map +1 -0
  721. package/build/src/modeling/internals/styles/RateLimiting.styles.d.ts +3 -0
  722. package/build/src/modeling/internals/styles/RateLimiting.styles.d.ts.map +1 -0
  723. package/build/src/modeling/internals/styles/RateLimiting.styles.js +83 -0
  724. package/build/src/modeling/internals/styles/RateLimiting.styles.js.map +1 -0
  725. package/build/src/modeling/internals/styles/api.styles.d.ts +3 -0
  726. package/build/src/modeling/internals/styles/api.styles.d.ts.map +1 -0
  727. package/build/src/modeling/internals/styles/api.styles.js +146 -0
  728. package/build/src/modeling/internals/styles/api.styles.js.map +1 -0
  729. package/build/src/modeling/internals/styles/form_styles.d.ts +3 -0
  730. package/build/src/modeling/internals/styles/form_styles.d.ts.map +1 -0
  731. package/build/src/modeling/internals/styles/form_styles.js +107 -0
  732. package/build/src/modeling/internals/styles/form_styles.js.map +1 -0
  733. package/build/src/modeling/internals/styles/learning.styles.d.ts +3 -0
  734. package/build/src/modeling/internals/styles/learning.styles.d.ts.map +1 -0
  735. package/build/src/modeling/internals/styles/learning.styles.js +40 -0
  736. package/build/src/modeling/internals/styles/learning.styles.js.map +1 -0
  737. package/build/src/modeling/lib/access_helpers.d.ts +8 -0
  738. package/build/src/modeling/lib/access_helpers.d.ts.map +1 -0
  739. package/build/src/modeling/lib/access_helpers.js +42 -0
  740. package/build/src/modeling/lib/access_helpers.js.map +1 -0
  741. package/build/src/modeling/lib/formula_parser.d.ts +57 -0
  742. package/build/src/modeling/lib/formula_parser.d.ts.map +1 -0
  743. package/build/src/modeling/lib/formula_parser.js +162 -0
  744. package/build/src/modeling/lib/formula_parser.js.map +1 -0
  745. package/build/src/modeling/lib/ui_mapping.d.ts +60 -0
  746. package/build/src/modeling/lib/ui_mapping.d.ts.map +1 -0
  747. package/build/src/modeling/lib/ui_mapping.js +244 -0
  748. package/build/src/modeling/lib/ui_mapping.js.map +1 -0
  749. package/build/src/modeling/lib/validators.d.ts +15 -0
  750. package/build/src/modeling/lib/validators.d.ts.map +1 -0
  751. package/build/src/modeling/lib/validators.js +26 -0
  752. package/build/src/modeling/lib/validators.js.map +1 -0
  753. package/build/src/modeling/types.d.ts +261 -0
  754. package/build/src/modeling/types.d.ts.map +1 -0
  755. package/build/src/modeling/types.js +2 -0
  756. package/build/src/modeling/types.js.map +1 -0
  757. package/build/src/providers/organization.d.ts +9 -0
  758. package/build/src/providers/organization.d.ts.map +1 -0
  759. package/build/src/providers/organization.js +6 -0
  760. package/build/src/providers/organization.js.map +1 -0
  761. package/build/src/providers/organizations.d.ts +9 -0
  762. package/build/src/providers/organizations.d.ts.map +1 -0
  763. package/build/src/providers/organizations.js +6 -0
  764. package/build/src/providers/organizations.js.map +1 -0
  765. package/build/src/providers/user.d.ts +9 -0
  766. package/build/src/providers/user.d.ts.map +1 -0
  767. package/build/src/providers/user.js +6 -0
  768. package/build/src/providers/user.js.map +1 -0
  769. package/build/src/services/CacheService.d.ts +29 -0
  770. package/build/src/services/CacheService.d.ts.map +1 -0
  771. package/build/src/services/CacheService.js +47 -0
  772. package/build/src/services/CacheService.js.map +1 -0
  773. package/build/src/services/ConfigurationService.d.ts +12 -0
  774. package/build/src/services/ConfigurationService.d.ts.map +1 -0
  775. package/build/src/services/ConfigurationService.js +23 -0
  776. package/build/src/services/ConfigurationService.js.map +1 -0
  777. package/build/src/services/LoggingService.d.ts +29 -0
  778. package/build/src/services/LoggingService.d.ts.map +1 -0
  779. package/build/src/services/LoggingService.js +49 -0
  780. package/build/src/services/LoggingService.js.map +1 -0
  781. package/build/src/services/OrganizationService.d.ts +79 -0
  782. package/build/src/services/OrganizationService.d.ts.map +1 -0
  783. package/build/src/services/OrganizationService.js +222 -0
  784. package/build/src/services/OrganizationService.js.map +1 -0
  785. package/build/src/services/SdkService.d.ts +22 -0
  786. package/build/src/services/SdkService.d.ts.map +1 -0
  787. package/build/src/services/SdkService.js +46 -0
  788. package/build/src/services/SdkService.js.map +1 -0
  789. package/build/src/services/TransmitService.d.ts +14 -0
  790. package/build/src/services/TransmitService.d.ts.map +1 -0
  791. package/build/src/services/TransmitService.js +23 -0
  792. package/build/src/services/TransmitService.js.map +1 -0
  793. package/build/src/services/UserCacheService.d.ts +22 -0
  794. package/build/src/services/UserCacheService.d.ts.map +1 -0
  795. package/build/src/services/UserCacheService.js +49 -0
  796. package/build/src/services/UserCacheService.js.map +1 -0
  797. package/build/src/services/UserService.d.ts +50 -0
  798. package/build/src/services/UserService.d.ts.map +1 -0
  799. package/build/src/services/UserService.js +199 -0
  800. package/build/src/services/UserService.js.map +1 -0
  801. package/build/src/services/api_service.d.ts +22 -0
  802. package/build/src/services/api_service.d.ts.map +1 -0
  803. package/build/src/services/api_service.js +4 -0
  804. package/build/src/services/api_service.js.map +1 -0
  805. package/build/tsconfig.tsbuildinfo +1 -1
  806. package/lit-plugin.log +7904 -0
  807. package/package.json +20 -9
  808. package/src/builders/DialogBuilder.ts +474 -0
  809. package/src/builders/README.md +272 -0
  810. package/src/cache/Cache.ts +265 -0
  811. package/src/core/Model.ts +53 -119
  812. package/src/core/ServiceManager.ts +1 -0
  813. package/src/data/BreadcrumbsModel.ts +85 -0
  814. package/src/data/DataCatalogModel.ts +199 -0
  815. package/src/data/DomainBrowserModel.ts +118 -0
  816. package/src/data/FileModel.ts +76 -0
  817. package/src/data/FileShareModel.ts +258 -0
  818. package/src/data/FilesModel.ts +226 -0
  819. package/src/data/InvitationModel.ts +69 -0
  820. package/src/data/PatchableFileModel.ts +293 -0
  821. package/src/data/PatchableLiveDataContentModel.ts +34 -0
  822. package/src/data/PatchableRawContentModel.ts +43 -0
  823. package/src/data/TrashModel.ts +125 -0
  824. package/src/data/UserModel.ts +102 -0
  825. package/src/data/UsersModel.ts +325 -0
  826. package/src/data/retry_logic.ts +111 -0
  827. package/src/elements/autocomplete/internals/autocomplete.ts +5 -2
  828. package/src/elements/data-table/DataTable.styles.ts +7 -2
  829. package/src/elements/data-table/DataTable.ts +24 -5
  830. package/src/elements/data-table/data-catalog-table.ts +22 -0
  831. package/src/elements/data-table/filesystem-table.ts +24 -0
  832. package/src/elements/data-table/internals/DataCatalog.styles.ts +29 -0
  833. package/src/elements/data-table/internals/DataCatalogTable.ts +234 -0
  834. package/src/elements/data-table/internals/Filesystem.styles.ts +23 -0
  835. package/src/elements/data-table/internals/FilesystemDataTable.ts +227 -0
  836. package/src/elements/data-table/internals/TrashDataTable.ts +157 -0
  837. package/src/elements/data-table/internals/UserData.styles.ts +16 -0
  838. package/src/elements/data-table/internals/UsersDataTable.ts +238 -0
  839. package/src/elements/data-table/trash-table.ts +16 -0
  840. package/src/elements/data-table/users-table.ts +16 -0
  841. package/src/elements/file-system/internals/Breadcrumbs.ts +0 -3
  842. package/src/elements/file-system/internals/QuickApiFilesystem.styles.ts +49 -0
  843. package/src/elements/file-system/internals/QuickApiFilesystem.ts +452 -0
  844. package/src/elements/file-system/internals/ShareFile.styles.ts +98 -0
  845. package/src/elements/file-system/internals/ShareFile.ts +540 -0
  846. package/src/elements/file-system/quick-api-filesystem.ts +16 -0
  847. package/src/elements/file-system/share-file.ts +26 -0
  848. package/src/elements/file-system/ui-breadcrumbs.ts +3 -0
  849. package/src/elements/layout/SplitItem.ts +0 -8
  850. package/src/elements/navigation/internals/Navigation.ts +9 -4
  851. package/src/elements/search-input/internals/input.styles.ts +38 -0
  852. package/src/elements/search-input/internals/input.ts +74 -0
  853. package/src/elements/search-input/search-input.ts +18 -0
  854. package/src/elements/setup/Readme.md +3 -0
  855. package/src/elements/setup/internals/InvitationScreen.styles.ts +3 -0
  856. package/src/elements/setup/internals/InvitationScreen.ts +418 -0
  857. package/src/elements/setup/internals/LoginScreen.styles.ts +3 -0
  858. package/src/elements/setup/internals/LoginScreen.ts +136 -0
  859. package/src/elements/setup/internals/OrganizationCreateScreen.styles.ts +3 -0
  860. package/src/elements/setup/internals/OrganizationCreateScreen.ts +170 -0
  861. package/src/elements/setup/internals/OrganizationSelectionScreen.styles.ts +3 -0
  862. package/src/elements/setup/internals/OrganizationSelectionScreen.ts +100 -0
  863. package/src/elements/setup/internals/OrganizationSelector.styles.ts +3 -0
  864. package/src/elements/setup/internals/OrganizationSelector.ts +133 -0
  865. package/src/elements/setup/internals/common.styles.ts +72 -0
  866. package/src/elements/setup/internals/icons.ts +43 -0
  867. package/src/elements/setup/invitation-screen.ts +20 -0
  868. package/src/elements/setup/login-screen.ts +19 -0
  869. package/src/elements/setup/organization-create-screen.ts +20 -0
  870. package/src/elements/setup/organization-selection-screen.ts +21 -0
  871. package/src/elements/setup/organization-selector.ts +38 -0
  872. package/src/elements/user/internals/UserAvatar.ts +7 -2
  873. package/src/events/DomainEvents.ts +80 -0
  874. package/src/events/EventTypes.ts +8 -0
  875. package/src/events/Events.ts +2 -0
  876. package/src/exceptions/builder.ts +28 -0
  877. package/src/help/README.md +99 -0
  878. package/src/help/help_coordinator.ts +168 -0
  879. package/src/help/help_panel.styles.ts +196 -0
  880. package/src/help/help_panel.ts +329 -0
  881. package/src/help/help_service_controller.ts +338 -0
  882. package/src/help/help_topic.ts +61 -0
  883. package/src/help/index.ts +8 -0
  884. package/src/help/render.ts +41 -0
  885. package/src/lib/Dom.ts +36 -0
  886. package/src/lib/files/Utils.ts +65 -0
  887. package/src/md/button/internals/base.ts +15 -3
  888. package/src/md/dropdown-list/internals/UiDropdownList.ts +11 -4
  889. package/src/md/icons/Icons.ts +8 -0
  890. package/src/md/input/Input.ts +14 -9
  891. package/src/md/list/internals/List.ts +17 -1
  892. package/src/md/list/internals/ListItem.ts +6 -4
  893. package/src/md/menu/internal/Menu.styles.ts +4 -2
  894. package/src/md/menu/internal/Menu.ts +2 -2
  895. package/src/md/select/internals/Select.styles.ts +3 -0
  896. package/src/md/select/internals/Select.ts +16 -18
  897. package/src/md/switch/internals/SwitchElement.ts +3 -3
  898. package/src/modeling/api-create-action-editor.ts +23 -0
  899. package/src/modeling/api-delete-action-editor.ts +27 -0
  900. package/src/modeling/api-list-action-editor.ts +31 -0
  901. package/src/modeling/api-modeling-access-configuration.ts +28 -0
  902. package/src/modeling/api-modeling-access.ts +27 -0
  903. package/src/modeling/api-modeling-actions.ts +30 -0
  904. package/src/modeling/api-modeling-description.ts +23 -0
  905. package/src/modeling/api-modeling-entity-card.ts +16 -0
  906. package/src/modeling/api-modeling-entity-editor.ts +24 -0
  907. package/src/modeling/api-modeling-navigation.ts +19 -0
  908. package/src/modeling/api-modeling-rate-limiting.ts +26 -0
  909. package/src/modeling/api-modeling-session.ts +39 -0
  910. package/src/modeling/api-read-action-editor.ts +23 -0
  911. package/src/modeling/api-search-action-editor.ts +28 -0
  912. package/src/modeling/api-update-action-editor.ts +24 -0
  913. package/src/modeling/data-catalog-browser.ts +18 -0
  914. package/src/modeling/dialogs/CalculatedTaxonomy.ts +305 -0
  915. package/src/modeling/dialogs/CategoryTaxonomy.ts +210 -0
  916. package/src/modeling/dialogs/CurrencyTaxonomy.ts +209 -0
  917. package/src/modeling/dialogs/EmailTaxonomy.ts +163 -0
  918. package/src/modeling/dialogs/GeospatialCoordinatesTaxonomy.ts +500 -0
  919. package/src/modeling/dialogs/HtmlTaxonomy.ts +333 -0
  920. package/src/modeling/dialogs/MarkdownTaxonomy.ts +290 -0
  921. package/src/modeling/dialogs/PasswordTaxonomy.ts +201 -0
  922. package/src/modeling/dialogs/PhoneTaxonomy.ts +238 -0
  923. package/src/modeling/dialogs/PublicUniqueNameTaxonomy.ts +212 -0
  924. package/src/modeling/dialogs/SkuTaxonomy.ts +321 -0
  925. package/src/modeling/dialogs/StatusTaxonomy.ts +132 -0
  926. package/src/modeling/dialogs/TagsTaxonomy.ts +163 -0
  927. package/src/modeling/dialogs/TaxonomyDialog.ts +183 -0
  928. package/src/modeling/dialogs/UrlTaxonomy.ts +194 -0
  929. package/src/modeling/dialogs/common.ts +52 -0
  930. package/src/modeling/domain-association-editor.ts +26 -0
  931. package/src/modeling/domain-auto-fields-dialog.ts +55 -0
  932. package/src/modeling/domain-browser.ts +25 -0
  933. package/src/modeling/domain-entity-editor.ts +34 -0
  934. package/src/modeling/domain-file-import.ts +22 -0
  935. package/src/modeling/domain-model-editor.ts +21 -0
  936. package/src/modeling/domain-namespace-editor.ts +22 -0
  937. package/src/modeling/domain-navigation.ts +21 -0
  938. package/src/modeling/domain-property-editor.ts +21 -0
  939. package/src/modeling/domain-template-browser.ts +19 -0
  940. package/src/modeling/domain-validation-report.ts +18 -0
  941. package/src/modeling/internals/ApiCreateActionEditor.ts +177 -0
  942. package/src/modeling/internals/ApiDeleteActionEditor.ts +269 -0
  943. package/src/modeling/internals/ApiEditor.ts +91 -0
  944. package/src/modeling/internals/ApiListActionEditor.ts +479 -0
  945. package/src/modeling/internals/ApiModelingAccessConfiguration.ts +606 -0
  946. package/src/modeling/internals/ApiModelingAccessScreen.ts +279 -0
  947. package/src/modeling/internals/ApiModelingActionsScreen.ts +333 -0
  948. package/src/modeling/internals/ApiModelingDescriptionScreen.ts +342 -0
  949. package/src/modeling/internals/ApiModelingEntityCard.ts +210 -0
  950. package/src/modeling/internals/ApiModelingEntityEditor.ts +363 -0
  951. package/src/modeling/internals/ApiModelingNavigation.ts +87 -0
  952. package/src/modeling/internals/ApiModelingRateLimiting.ts +389 -0
  953. package/src/modeling/internals/ApiModelingScreen.ts +43 -0
  954. package/src/modeling/internals/ApiModelingSessionScreen.ts +725 -0
  955. package/src/modeling/internals/ApiReadActionEditor.ts +177 -0
  956. package/src/modeling/internals/ApiSearchActionEditor.ts +302 -0
  957. package/src/modeling/internals/ApiUpdateActionEditor.ts +266 -0
  958. package/src/modeling/internals/DataCatalogBrowser.ts +286 -0
  959. package/src/modeling/internals/DomainAssociationEditor.ts +722 -0
  960. package/src/modeling/internals/DomainAutoFieldsDialog.ts +281 -0
  961. package/src/modeling/internals/DomainBrowser.ts +499 -0
  962. package/src/modeling/internals/DomainEntityEditor.ts +1245 -0
  963. package/src/modeling/internals/DomainFileImport.ts +482 -0
  964. package/src/modeling/internals/DomainModelEditor.ts +87 -0
  965. package/src/modeling/internals/DomainNamespaceEditor.ts +87 -0
  966. package/src/modeling/internals/DomainNavigation.ts +1887 -0
  967. package/src/modeling/internals/DomainPropertyEditor.ts +1506 -0
  968. package/src/modeling/internals/DomainTemplateBrowser.ts +500 -0
  969. package/src/modeling/internals/DomainValidationReport.ts +291 -0
  970. package/src/modeling/internals/ModelingElement.ts +95 -0
  971. package/src/modeling/internals/styles/AccessConfiguration.styles.ts +106 -0
  972. package/src/modeling/internals/styles/ApiCreateActionEditor.styles.ts +15 -0
  973. package/src/modeling/internals/styles/ApiDeleteActionEditor.styles.ts +15 -0
  974. package/src/modeling/internals/styles/ApiListActionEditor.styles.ts +15 -0
  975. package/src/modeling/internals/styles/ApiModelingActionsScreen.styles.ts +31 -0
  976. package/src/modeling/internals/styles/ApiModelingEntityCard.ts +85 -0
  977. package/src/modeling/internals/styles/ApiModelingEntityEditor.ts +68 -0
  978. package/src/modeling/internals/styles/ApiModelingNavigation.styles.ts +23 -0
  979. package/src/modeling/internals/styles/ApiReadActionEditor.styles.ts +15 -0
  980. package/src/modeling/internals/styles/ApiSearchActionEditor.styles.ts +15 -0
  981. package/src/modeling/internals/styles/ApiUpdateActionEditor.styles.ts +15 -0
  982. package/src/modeling/internals/styles/DataCatalogBrowser.styles.ts +53 -0
  983. package/src/modeling/internals/styles/DomainAutoFieldsDialog.ts +35 -0
  984. package/src/modeling/internals/styles/DomainBrowser.styles.ts +26 -0
  985. package/src/modeling/internals/styles/DomainEntityEditor.styles.ts +98 -0
  986. package/src/modeling/internals/styles/DomainFileImport.styles.ts +100 -0
  987. package/src/modeling/internals/styles/DomainModelEditor.styles.ts +7 -0
  988. package/src/modeling/internals/styles/DomainNamespaceEditor.styles.ts +7 -0
  989. package/src/modeling/internals/styles/DomainNavigation.styles.ts +343 -0
  990. package/src/modeling/internals/styles/DomainPropertyEditor.styles.ts +18 -0
  991. package/src/modeling/internals/styles/DomainTemplateBrowser.styles.ts +553 -0
  992. package/src/modeling/internals/styles/DomainValidationReport.styles.ts +75 -0
  993. package/src/modeling/internals/styles/EditorCommon.styles.ts +141 -0
  994. package/src/modeling/internals/styles/RateLimiting.styles.ts +83 -0
  995. package/src/modeling/internals/styles/api.styles.ts +146 -0
  996. package/src/modeling/internals/styles/form_styles.ts +107 -0
  997. package/src/modeling/internals/styles/learning.styles.ts +40 -0
  998. package/src/modeling/lib/access_helpers.ts +57 -0
  999. package/src/modeling/lib/formula_parser.ts +187 -0
  1000. package/src/modeling/lib/ui_mapping.ts +258 -0
  1001. package/src/modeling/lib/validators.ts +30 -0
  1002. package/src/modeling/types.ts +279 -0
  1003. package/src/providers/organization.ts +7 -0
  1004. package/src/providers/organizations.ts +7 -0
  1005. package/src/providers/user.ts +7 -0
  1006. package/src/services/CacheService.ts +56 -0
  1007. package/src/services/ConfigurationService.ts +28 -0
  1008. package/src/services/LoggingService.ts +60 -0
  1009. package/src/services/OrganizationService.ts +238 -0
  1010. package/src/services/SdkService.ts +57 -0
  1011. package/src/services/TransmitService.ts +28 -0
  1012. package/src/services/UserCacheService.ts +51 -0
  1013. package/src/services/UserService.ts +214 -0
  1014. package/src/services/api_service.ts +24 -0
  1015. package/tsconfig.json +19 -4
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../../../src/elements/autocomplete/internals/autocomplete.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkC,MAAM,KAAK,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAGnD,OAA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EAAE,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;YAC1C;;;;;cAKE;YACF,OAAO,IAAI,CAAA;;WAEJ,EAAE;;;;;;;;;;6BAUgB,YAAY;iCACR,OAAO;;;;;;;;;;;;;;;;KAgBnC,CAAA;QACH,CAAC;;;AA1kBH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+GG;AACH,4BA2dC","sourcesContent":["import { html, LitElement, PropertyValues, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport type UiListbox from '../../../md/listbox/internals/Listbox.js'\nimport type UiListItem from '../../../md/list/internals/ListItem.js'\nimport { bound } from '../../../decorators/bound.js'\n\n/**\n * An accessible and performant autocomplete component that enhances a text input with a list of suggestions.\n *\n * The `autocomplete-input` component provides a flexible way to add autocomplete functionality\n * to any text input. It works by coordinating a slotted input element with a slotted `ui-listbox`\n * containing suggestions.\n *\n * Key Features:\n *\n * - **Popover Management**: Automatically shows and hides the suggestions popover based on input focus\n * and user interaction.\n * - **Keyboard Navigation**: Allows users to navigate suggestions using ArrowUp, ArrowDown keys directly\n * from the input. Enter selects a suggestion, and Escape closes the popover.\n * The suggestion list itself never gains focus.\n * - **Dynamic Filtering**: Filters the list of suggestions as the user types into the input. Items not matching\n * the query are hidden (not removed).\n * - By default, filtering checks `item.dataset.value` and then `item.textContent`.\n * - If a `ui-list-item` has a `data-index` attribute (e.g., `data-index=\"name email\"`), filtering will search\n * within the specified `data-*` attributes (e.g., `data-name`, `data-email`).\n * - **Mutation Awareness**: Reacts to changes in slotted suggestions, re-filtering them if necessary.\n * - **Event-Driven**: Notifies the application via an `autocomplete` event when a suggestion is selected.\n * The component itself does not modify the input's value, giving the application author full control.\n *\n * ### Accessibility\n *\n * The `autocomplete-input` component is designed with accessibility at its core:\n * - **Keyboard Navigation**: Full keyboard support for navigating suggestions (ArrowUp, ArrowDown),\n * selecting (Enter), and closing (Escape), all while focus remains on the input field.\n * - **ARIA Attributes**: While the `autocomplete-input` manages ARIA attributes related to the popover's\n * state, the slotted `ui-listbox` is responsible for its internal ARIA roles and states\n * (e.g., `role=\"listbox\"`, `aria-activedescendant`).\n * - **Labeling Suggestions**: It is **crucial** for accessibility that the slotted `ui-listbox`\n * has an `aria-label` attribute. This provides a descriptive name for the list of suggestions,\n * which is announced by screen readers.\n *\n * The component uses CSS anchor positioning to place the suggestions popover relative to the input.\n * Ensure your `ui-listbox` is styled appropriately for popover display (e.g., `popover=\"manual\"`, `position-anchor`).\n * The component will manage `showPopover()` and `hidePopover()` calls.\n *\n * @slot input - The input element that will be used for autocomplete. This element should be an `HTMLInputElement`\n * or behave like one (have a `value` property and dispatch `input`, `focus`, `blur`, and `keydown`\n * events).\n * @slot suggestions - The `ui-listbox` element containing `ui-list-item` elements as suggestions.\n * @slot anchor - An optional element that points to element that will be used as the anchor for the popover.\n * This is useful if you want to position the suggestions relative to a different element than the input.\n * If not provided, the input element will be used as the anchor.\n * @slot Any additional content that should be rendered inside the component.\n *\n * @fires autocomplete - Dispatched when a suggestion is selected by the user (e.g., via click or Enter key).\n * The `event.detail` object contains:\n * - `item`: The selected `UiListItem` instance.\n *\n * @example\n * ```html\n * <autocomplete-input @autocomplete=\"${this.handleAutocompleteSelection}\">\n * <input slot=\"input\" type=\"text\" placeholder=\"Search fruits...\" />\n * <ui-listbox slot=\"suggestions\">\n * <ui-list-item data-value=\"apple\">Apple</ui-list-item>\n * <ui-list-item data-value=\"banana\">Banana</ui-list-item>\n * <ui-list-item data-value=\"cherry\">Cherry</ui-list-item>\n * </ui-listbox>\n * <!-- With aria-label for accessibility -->\n * <ui-listbox slot=\"suggestions\" aria-label=\"Fruit suggestions\">\n * <ui-list-item data-value=\"apple\">Apple</ui-list-item>\n * <ui-list-item data-value=\"banana\">Banana</ui-list-item>\n * <ui-list-item data-value=\"cherry\">Cherry</ui-list-item>\n * </ui-listbox>\n * </autocomplete-input>\n *\n * <script>\n * // In your component/script\n * handleAutocompleteSelection(event) {\n * const selectedItem = event.detail.item;\n * const inputElement = this.shadowRoot.querySelector('input[slot=\"input\"]');\n * if (inputElement) {\n * inputElement.value = selectedItem.dataset.value || selectedItem.textContent;\n * }\n * console.log('Selected:', selectedItem.dataset.value);\n * }\n * </script>\n * ```\n *\n * @example Dynamic filtering with `data-index`\n * ```html\n * <autocomplete-input @autocomplete=\"${this.handleUserSelection}\">\n * <input slot=\"input\" type=\"text\" placeholder=\"Search users...\" />\n * <ui-listbox slot=\"suggestions\" aria-label=\"User suggestions\">\n * <ui-list-item data-id=\"1\" data-name=\"Alice Wonderland\" data-email=\"alice@example.com\" data-index=\"name email\">\n * Alice Wonderland\n * <span slot=\"supporting-text\">alice@example.com</span>\n * </ui-list-item>\n * <ui-list-item data-id=\"2\" data-name=\"Bob The Builder\" data-email=\"bob@example.com\" data-index=\"name email\">\n * Bob The Builder\n * <span slot=\"supporting-text\">bob@example.com</span>\n * </ui-list-item>\n * </ui-listbox>\n * </autocomplete-input>\n *\n * <script>\n * // In your component/script\n * handleUserSelection(event) {\n * const selectedItem = event.detail.item;\n * const inputElement = this.shadowRoot.querySelector('input[slot=\"input\"]');\n * if (inputElement) {\n * // You might want to display the name, but store the ID\n * inputElement.value = selectedItem.dataset.name;\n * }\n * console.log('Selected user ID:', selectedItem.dataset.id);\n * }\n * </script>\n * ```\n */\nexport default class Autocomplete extends LitElement {\n protected override createRenderRoot(): HTMLElement | DocumentFragment {\n return this\n }\n\n /**\n * The MutationObserver instance used to watch for changes in slotted children.\n */\n protected observer?: MutationObserver\n\n /**\n * The ID of the input element, generated if not provided.\n * This is used for CSS anchoring and to ensure unique IDs for accessibility.\n */\n @state() protected accessor inputId = ''\n\n /**\n * The position area for the suggestions popover.\n * This can be 'bottom' or 'top', depending on available space.\n * Default is 'bottom'.\n *\n * Note, this is set dynamically based on available space\n * and the position of the input element. This only sets the initial value.\n *\n * @attribute\n * @type {'bottom' | 'top'}\n * @default 'bottom'\n */\n @property() accessor positionArea: 'bottom' | 'top' = 'bottom'\n\n /**\n * The reference to the slotted input element.\n * This should be an `HTMLInputElement` or behave like one.\n */\n protected inputRef?: HTMLInputElement | HTMLElement | null\n /**\n * The reference to the slotted suggestions element, which should be a `ui-listbox`.\n * This is used to manage the suggestions popover and filtering.\n */\n protected suggestionsRef?: UiListbox | null\n\n /**\n * Checks if the suggestions popover is currently open.\n */\n get opened(): boolean {\n return this.suggestionsRef?.matches(':popover-open') || false\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n this.observer = new MutationObserver(this.handleMutations.bind(this))\n this.observer.observe(this, { childList: true })\n if (!this.id) {\n this.id = `autocomplete-${Math.random().toString(36).substring(2, 15)}`\n }\n this.classList.add(this.id)\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback()\n this.observer?.disconnect()\n this.observer = undefined\n this.clearInputListeners()\n this.clearSuggestionsListeners()\n }\n\n protected override firstUpdated(cp: PropertyValues): void {\n super.firstUpdated(cp)\n this.firstSetup()\n }\n\n /**\n * Performs initial setup after the first update, ensuring that slotted input\n * and suggestions elements are configured.\n */\n async firstSetup(): Promise<void> {\n await this.updateComplete\n const input = this.querySelector('[slot=\"input\"]') as HTMLElement | null\n const suggestions = this.querySelector('[slot=\"suggestions\"]') as HTMLElement | null\n if (input) {\n this.setupInput(input)\n }\n if (suggestions) {\n this.setupSuggestions(suggestions as UiListbox)\n }\n }\n\n /**\n * Handles mutations observed on the component's slotted children.\n * This is used to set up or tear down input and suggestions elements when they are added or removed.\n * @param mutations An array of MutationRecord objects.\n */\n protected handleMutations(mutations: MutationRecord[]): void {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n for (const node of mutation.removedNodes) {\n if (node instanceof HTMLElement) {\n if (node.slot === 'input' && this.inputRef === node) {\n this.clearInputListeners()\n } else if (node.slot === 'suggestions' && this.suggestionsRef === node) {\n this.clearSuggestionsListeners()\n }\n }\n }\n for (const node of mutation.addedNodes) {\n if (node instanceof HTMLElement) {\n if (node.slot === 'input') {\n this.setupInput(node)\n } else if (node.slot === 'suggestions') {\n this.setupSuggestions(node as UiListbox)\n }\n }\n }\n }\n }\n }\n\n /**\n * Clears event listeners from the current input reference and resets it.\n */\n protected clearInputListeners(): void {\n if (this.inputRef) {\n this.inputRef.removeEventListener('focus', this.handleInputFocus)\n this.inputRef.removeEventListener('input', this.handleInput)\n this.inputRef.removeEventListener('keydown', this.handleKeydown as EventListener)\n this.inputRef.removeEventListener('blur', this.handleInputBlur)\n }\n this.inputRef = null\n }\n\n /**\n * Clears event listeners from the current suggestions reference and resets it.\n */\n protected clearSuggestionsListeners(): void {\n if (this.suggestionsRef) {\n this.suggestionsRef.removeEventListener('select', this.handleSuggestionSelect as EventListener)\n // If ui-listbox uses a slot for its items, listen to its slotchange\n this.suggestionsRef.removeEventListener('itemschange', this.handleSuggestionsSlotChange)\n if (this.suggestionsRef.matches(':popover-open')) {\n this.suggestionsRef.hidePopover()\n }\n }\n this.suggestionsRef = null\n }\n\n /**\n * Sets up the slotted input element.\n * Assigns an ID if necessary, sets up CSS anchoring, and attaches event listeners.\n * @param input The HTMLElement to be used as the input.\n */\n protected setupInput(input: HTMLElement): void {\n this.clearInputListeners() // Clear any old listeners\n if (!input.id) {\n this.inputId = `autocomplete-input-${Math.random().toString(36).substring(2, 15)}`\n input.id = this.inputId\n } else {\n this.inputId = input.id\n }\n const anchorElement = this.querySelector('[slot=\"anchor\"]') as HTMLElement | null\n // Ensure CSS anchor positioning can work\n const anchor = anchorElement || input\n anchor.style.setProperty('anchor-name', `--${this.inputId}`)\n\n this.inputRef = input as HTMLInputElement // Assuming it behaves like an input\n this.inputRef.addEventListener('focus', this.handleInputFocus)\n this.inputRef.addEventListener('input', this.handleInput)\n this.inputRef.addEventListener('keydown', this.handleKeydown as EventListener)\n this.inputRef.addEventListener('blur', this.handleInputBlur)\n }\n\n /**\n * Sets up the slotted suggestions element (assumed to be a `UiListbox`).\n * Configures popover behavior, CSS anchoring, and attaches event listeners.\n * @param suggestionsElement The `UiListbox` element to be used for suggestions.\n */\n protected setupSuggestions(suggestionsElement: UiListbox): void {\n this.clearSuggestionsListeners() // Clear any old listeners\n\n this.suggestionsRef = suggestionsElement\n this.suggestionsRef.popover = 'manual'\n this.suggestionsRef.tabIndex = -1 // Prevent direct focus\n\n this.suggestionsRef.addEventListener('select', this.handleSuggestionSelect as EventListener)\n // The `List` dispatches `itemschange` when the slot changes, so we can listen to it.\n this.suggestionsRef.addEventListener('itemschange', this.handleSuggestionsSlotChange)\n\n // Initial filter\n this.filterSuggestions(this.inputRef ? (this.inputRef as HTMLInputElement).value : '')\n }\n\n /**\n * Handles the focus event on the input element.\n * Opens the suggestions popover if there are items to display.\n */\n @bound\n protected handleInputFocus(): void {\n const items = this.suggestionsRef?.items\n if (!items || items.length === 0) {\n // If no suggestions, do not open\n return\n }\n const active = items.find((item) => !item.hidden)\n if (active) {\n this.openSuggestions()\n this.filterSuggestions(this.inputRef ? (this.inputRef as HTMLInputElement).value : '')\n }\n }\n\n /**\n * Handles the input event on the input element.\n * Filters suggestions based on the input query and opens/closes the popover accordingly.\n * @param event The input event.\n */\n @bound\n protected handleInput(event: Event): void {\n this.openSuggestions()\n const query = (event.target as HTMLInputElement).value\n this.filterSuggestions(query)\n }\n\n /**\n * Handles keydown events on the input element for navigating and selecting suggestions.\n * - ArrowDown/ArrowUp: Navigates the suggestion list.\n * - Enter: Selects the highlighted suggestion.\n * - Escape: Closes the suggestions popover.\n * @param event The keyboard event.\n */\n @bound\n protected handleKeydown(event: KeyboardEvent): void {\n if (!this.suggestionsRef) return\n\n const { key } = event\n const isSuggestionsOpen = this.suggestionsRef.matches(':popover-open')\n\n if (['ArrowDown', 'ArrowUp'].includes(key)) {\n event.preventDefault()\n if (!isSuggestionsOpen) {\n this.openSuggestions()\n // Give popover a moment to open before trying to highlight\n requestAnimationFrame(() => this.navigateList(key))\n } else {\n this.navigateList(key)\n }\n } else if (key === 'Enter') {\n if (isSuggestionsOpen && this.suggestionsRef.highlightListItem) {\n event.preventDefault()\n this.suggestionsRef.notifySelect(this.suggestionsRef.highlightListItem)\n }\n } else if (key === 'Escape') {\n if (isSuggestionsOpen) {\n event.preventDefault()\n this.closeSuggestions()\n }\n }\n }\n\n /**\n * Navigates the suggestion list based on the pressed key.\n * @param key The key that was pressed (ArrowDown or ArrowUp).\n */\n protected navigateList(key: string): void {\n if (!this.suggestionsRef) return\n switch (key) {\n case 'ArrowDown':\n this.suggestionsRef.highlightNext()\n break\n case 'ArrowUp':\n this.suggestionsRef.highlightPrevious()\n break\n // Don't handle Home or End keys here, as they break the usability of the input.\n }\n }\n\n /**\n * Handles the blur event on the input element.\n * Closes the suggestions popover if focus moves outside the autocomplete component.\n */\n @bound\n protected handleInputBlur(): void {\n // We use the manual popover mode, so we need to close suggestions\n // when the input loses focus, but only the current active element is not part of the suggestions.\n requestAnimationFrame(() => {\n if (\n !this.inputRef?.contains(document.activeElement) &&\n (!this.suggestionsRef || !this.suggestionsRef.contains(document.activeElement))\n ) {\n this.closeSuggestions()\n }\n })\n }\n\n /**\n * Handles the `select` event dispatched by the `ui-listbox` when a suggestion is chosen.\n * Dispatches an `autocomplete` event and closes the popover.\n * @param event The custom event from `ui-listbox`.\n */\n @bound\n protected handleSuggestionSelect(event: CustomEvent): void {\n event.stopPropagation()\n const selectedItem = event.detail.item as UiListItem\n this.dispatchEvent(\n new CustomEvent('autocomplete', {\n detail: { item: selectedItem },\n bubbles: false,\n composed: false,\n })\n )\n this.closeSuggestions()\n }\n\n /**\n * Handles the `itemschange` event dispatched by the `ui-listbox` when its slotted items change.\n * Re-filters the suggestions.\n */\n @bound\n protected handleSuggestionsSlotChange(): void {\n const value = this.inputRef ? (this.inputRef as HTMLInputElement).value : ''\n if (!value) {\n return\n }\n this.openSuggestions()\n this.filterSuggestions(value)\n }\n\n /**\n * Opens the suggestions popover if it's not already open and there are visible items.\n */\n protected openSuggestions(): void {\n const popover = this.suggestionsRef\n if (!popover || popover.matches(':popover-open')) {\n return\n }\n // we need to open the popover first to make any measurements\n popover.showPopover()\n const anchor = (this.querySelector('[slot=\"anchor\"]') as HTMLElement | null) || this.inputRef\n if (!anchor) {\n return\n }\n this.positionArea = this.decidePositionArea(popover, anchor)\n }\n\n /**\n * Decides the position area for the popover based on available space.\n * It checks if there is enough space below or above the anchor element and decides accordingly.\n *\n * We need to do this because we set the popover height to `100%`, `-webkit-fill-available`, or `-moz-available`\n * and it makes the popover to always open at the bottom, even if there is no space. The `position-try-fallbacks`\n * will not work in this case, because from its perspective there is always enough space, even if that will cause\n * the popover to have a height of just a few pixels.\n *\n * @param popover The popover element to position.\n * @param anchor The anchor element relative to which the popover will be positioned.\n * @returns 'top' or 'bottom' based on available space.\n */\n protected decidePositionArea(popover: HTMLElement, anchor: HTMLElement): 'top' | 'bottom' {\n let newArea: 'top' | 'bottom' = 'bottom'\n // Get bounding rectangles\n const anchorRect = anchor.getBoundingClientRect()\n const viewportHeight = window.innerHeight\n\n const spaceBelow = viewportHeight - anchorRect.bottom\n const spaceAbove = anchorRect.top\n\n // Estimate a typical/minimum height the popover might need to be useful\n const popoverThresholdHeight = popover.scrollHeight || 150\n if (spaceBelow < popoverThresholdHeight && spaceAbove > spaceBelow && spaceAbove > popoverThresholdHeight) {\n // Not enough space below, but more (and sufficient) space above\n newArea = 'top'\n } else if (spaceBelow < popoverThresholdHeight && spaceAbove > spaceBelow) {\n // Not enough space below, and space above is more than space below (even if not \"sufficient\")\n newArea = 'top'\n } else {\n newArea = 'bottom' // Default to bottom if enough space or if top is worse\n }\n return newArea\n }\n\n /**\n * Closes the suggestions popover if it's open and clears any highlighted item.\n */\n protected closeSuggestions(): void {\n if (this.suggestionsRef && this.suggestionsRef.matches(':popover-open')) {\n this.suggestionsRef.hidePopover()\n }\n }\n\n /**\n * Filters the suggestions based on the provided query.\n * Hides items that do not match and manages the highlighted item state.\n * @param query The search query string.\n */\n protected filterSuggestions(query: string): void {\n if (!this.suggestionsRef) {\n return\n }\n\n const lowerCaseQuery = query.toLowerCase().trim()\n let firstVisibleItem: UiListItem | null = null\n\n // The `items` getter in `List.ts` (parent of UiListbox) correctly gets assigned elements.\n const items = this.suggestionsRef.items as UiListItem[]\n\n for (const item of items) {\n let matches = false\n if (lowerCaseQuery === '') {\n matches = true\n } else if (item.dataset.index) {\n const indexFields = item.dataset.index.split(' ').filter(Boolean)\n for (const field of indexFields) {\n const valueToSearch = item.dataset[field] || ''\n if (valueToSearch.toLowerCase().includes(lowerCaseQuery)) {\n matches = true\n break\n }\n }\n } else {\n const valueToSearch = item.dataset.value || item.textContent || ''\n matches = valueToSearch.toLowerCase().includes(lowerCaseQuery)\n }\n item.hidden = !matches\n if (matches && !firstVisibleItem) {\n firstVisibleItem = item\n }\n }\n\n // If the currently highlighted item is now hidden, try to highlight the first visible one or clear.\n if (this.suggestionsRef.highlightListItem?.hidden) {\n // the highlightListItem clears the highlighted item if it is not passed an argument.\n this.suggestionsRef?.highlightItem(firstVisibleItem)\n }\n if (!firstVisibleItem) {\n // Close if no items are visible\n this.closeSuggestions()\n }\n }\n\n protected override render(): TemplateResult {\n const { id, positionArea, inputId } = this\n /*\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n */\n return html`\n <style>\n .${id} {\n display: inline-block;\n\n [popover] {\n border: none;\n margin: 0;\n\n box-shadow: var(--md-sys-elevation-1);\n border-radius: var(--md-sys-shape-corner-medium);\n\n position-area: ${positionArea};\n position-anchor: --${inputId};\n\n overflow: auto;\n /* We try 100% and then vendor options which are more accurate */\n height: 100%;\n height: -webkit-fill-available;\n height: -moz-available;\n max-height: max-content;\n width: anchor-size(width);\n }\n\n [popover]:not(:popover-open) {\n display: none;\n }\n }\n </style>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"autocomplete.js","sourceRoot":"","sources":["../../../../../src/elements/autocomplete/internals/autocomplete.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,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F,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAA;YACtD,CAAC;YACD,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtB,gCAAgC;gBAChC,IAAI,CAAC,gBAAgB,EAAE,CAAA;YACzB,CAAC;QACH,CAAC;QAEkB,MAAM;YACvB,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;YAC1C;;;;;cAKE;YACF,OAAO,IAAI,CAAA;;WAEJ,EAAE;;;;;;;;;;6BAUgB,YAAY;iCACR,OAAO;;;;;;;;;;;;;;;;KAgBnC,CAAA;QACH,CAAC;;;AA7kBH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+GG;AACH,4BA8dC","sourcesContent":["import { html, LitElement, PropertyValues, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport type UiListbox from '../../../md/listbox/internals/Listbox.js'\nimport type UiListItem from '../../../md/list/internals/ListItem.js'\nimport { bound } from '../../../decorators/bound.js'\n\n/**\n * An accessible and performant autocomplete component that enhances a text input with a list of suggestions.\n *\n * The `autocomplete-input` component provides a flexible way to add autocomplete functionality\n * to any text input. It works by coordinating a slotted input element with a slotted `ui-listbox`\n * containing suggestions.\n *\n * Key Features:\n *\n * - **Popover Management**: Automatically shows and hides the suggestions popover based on input focus\n * and user interaction.\n * - **Keyboard Navigation**: Allows users to navigate suggestions using ArrowUp, ArrowDown keys directly\n * from the input. Enter selects a suggestion, and Escape closes the popover.\n * The suggestion list itself never gains focus.\n * - **Dynamic Filtering**: Filters the list of suggestions as the user types into the input. Items not matching\n * the query are hidden (not removed).\n * - By default, filtering checks `item.dataset.value` and then `item.textContent`.\n * - If a `ui-list-item` has a `data-index` attribute (e.g., `data-index=\"name email\"`), filtering will search\n * within the specified `data-*` attributes (e.g., `data-name`, `data-email`).\n * - **Mutation Awareness**: Reacts to changes in slotted suggestions, re-filtering them if necessary.\n * - **Event-Driven**: Notifies the application via an `autocomplete` event when a suggestion is selected.\n * The component itself does not modify the input's value, giving the application author full control.\n *\n * ### Accessibility\n *\n * The `autocomplete-input` component is designed with accessibility at its core:\n * - **Keyboard Navigation**: Full keyboard support for navigating suggestions (ArrowUp, ArrowDown),\n * selecting (Enter), and closing (Escape), all while focus remains on the input field.\n * - **ARIA Attributes**: While the `autocomplete-input` manages ARIA attributes related to the popover's\n * state, the slotted `ui-listbox` is responsible for its internal ARIA roles and states\n * (e.g., `role=\"listbox\"`, `aria-activedescendant`).\n * - **Labeling Suggestions**: It is **crucial** for accessibility that the slotted `ui-listbox`\n * has an `aria-label` attribute. This provides a descriptive name for the list of suggestions,\n * which is announced by screen readers.\n *\n * The component uses CSS anchor positioning to place the suggestions popover relative to the input.\n * Ensure your `ui-listbox` is styled appropriately for popover display (e.g., `popover=\"manual\"`, `position-anchor`).\n * The component will manage `showPopover()` and `hidePopover()` calls.\n *\n * @slot input - The input element that will be used for autocomplete. This element should be an `HTMLInputElement`\n * or behave like one (have a `value` property and dispatch `input`, `focus`, `blur`, and `keydown`\n * events).\n * @slot suggestions - The `ui-listbox` element containing `ui-list-item` elements as suggestions.\n * @slot anchor - An optional element that points to element that will be used as the anchor for the popover.\n * This is useful if you want to position the suggestions relative to a different element than the input.\n * If not provided, the input element will be used as the anchor.\n * @slot Any additional content that should be rendered inside the component.\n *\n * @fires autocomplete - Dispatched when a suggestion is selected by the user (e.g., via click or Enter key).\n * The `event.detail` object contains:\n * - `item`: The selected `UiListItem` instance.\n *\n * @example\n * ```html\n * <autocomplete-input @autocomplete=\"${this.handleAutocompleteSelection}\">\n * <input slot=\"input\" type=\"text\" placeholder=\"Search fruits...\" />\n * <ui-listbox slot=\"suggestions\">\n * <ui-list-item data-value=\"apple\">Apple</ui-list-item>\n * <ui-list-item data-value=\"banana\">Banana</ui-list-item>\n * <ui-list-item data-value=\"cherry\">Cherry</ui-list-item>\n * </ui-listbox>\n * <!-- With aria-label for accessibility -->\n * <ui-listbox slot=\"suggestions\" aria-label=\"Fruit suggestions\">\n * <ui-list-item data-value=\"apple\">Apple</ui-list-item>\n * <ui-list-item data-value=\"banana\">Banana</ui-list-item>\n * <ui-list-item data-value=\"cherry\">Cherry</ui-list-item>\n * </ui-listbox>\n * </autocomplete-input>\n *\n * <script>\n * // In your component/script\n * handleAutocompleteSelection(event) {\n * const selectedItem = event.detail.item;\n * const inputElement = this.shadowRoot.querySelector('input[slot=\"input\"]');\n * if (inputElement) {\n * inputElement.value = selectedItem.dataset.value || selectedItem.textContent;\n * }\n * console.log('Selected:', selectedItem.dataset.value);\n * }\n * </script>\n * ```\n *\n * @example Dynamic filtering with `data-index`\n * ```html\n * <autocomplete-input @autocomplete=\"${this.handleUserSelection}\">\n * <input slot=\"input\" type=\"text\" placeholder=\"Search users...\" />\n * <ui-listbox slot=\"suggestions\" aria-label=\"User suggestions\">\n * <ui-list-item data-id=\"1\" data-name=\"Alice Wonderland\" data-email=\"alice@example.com\" data-index=\"name email\">\n * Alice Wonderland\n * <span slot=\"supporting-text\">alice@example.com</span>\n * </ui-list-item>\n * <ui-list-item data-id=\"2\" data-name=\"Bob The Builder\" data-email=\"bob@example.com\" data-index=\"name email\">\n * Bob The Builder\n * <span slot=\"supporting-text\">bob@example.com</span>\n * </ui-list-item>\n * </ui-listbox>\n * </autocomplete-input>\n *\n * <script>\n * // In your component/script\n * handleUserSelection(event) {\n * const selectedItem = event.detail.item;\n * const inputElement = this.shadowRoot.querySelector('input[slot=\"input\"]');\n * if (inputElement) {\n * // You might want to display the name, but store the ID\n * inputElement.value = selectedItem.dataset.name;\n * }\n * console.log('Selected user ID:', selectedItem.dataset.id);\n * }\n * </script>\n * ```\n */\nexport default class Autocomplete extends LitElement {\n protected override createRenderRoot(): HTMLElement | DocumentFragment {\n return this\n }\n\n /**\n * The MutationObserver instance used to watch for changes in slotted children.\n */\n protected observer?: MutationObserver\n\n /**\n * The ID of the input element, generated if not provided.\n * This is used for CSS anchoring and to ensure unique IDs for accessibility.\n */\n @state() protected accessor inputId = ''\n\n /**\n * The position area for the suggestions popover.\n * This can be 'bottom' or 'top', depending on available space.\n * Default is 'bottom'.\n *\n * Note, this is set dynamically based on available space\n * and the position of the input element. This only sets the initial value.\n *\n * @attribute\n * @type {'bottom' | 'top'}\n * @default 'bottom'\n */\n @property() accessor positionArea: 'bottom' | 'top' = 'bottom'\n\n /**\n * The reference to the slotted input element.\n * This should be an `HTMLInputElement` or behave like one.\n */\n protected inputRef?: HTMLInputElement | HTMLElement | null\n /**\n * The reference to the slotted suggestions element, which should be a `ui-listbox`.\n * This is used to manage the suggestions popover and filtering.\n */\n protected suggestionsRef?: UiListbox | null\n\n /**\n * Checks if the suggestions popover is currently open.\n */\n get opened(): boolean {\n return this.suggestionsRef?.matches(':popover-open') || false\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n this.observer = new MutationObserver(this.handleMutations.bind(this))\n this.observer.observe(this, { childList: true })\n if (!this.id) {\n this.id = `autocomplete-${Math.random().toString(36).substring(2, 15)}`\n }\n this.classList.add(this.id)\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback()\n this.observer?.disconnect()\n this.observer = undefined\n this.clearInputListeners()\n this.clearSuggestionsListeners()\n }\n\n protected override firstUpdated(cp: PropertyValues): void {\n super.firstUpdated(cp)\n this.firstSetup()\n }\n\n /**\n * Performs initial setup after the first update, ensuring that slotted input\n * and suggestions elements are configured.\n */\n async firstSetup(): Promise<void> {\n await this.updateComplete\n const input = this.querySelector('[slot=\"input\"]') as HTMLElement | null\n const suggestions = this.querySelector('[slot=\"suggestions\"]') as HTMLElement | null\n if (input) {\n this.setupInput(input)\n }\n if (suggestions) {\n this.setupSuggestions(suggestions as UiListbox)\n }\n }\n\n /**\n * Handles mutations observed on the component's slotted children.\n * This is used to set up or tear down input and suggestions elements when they are added or removed.\n * @param mutations An array of MutationRecord objects.\n */\n protected handleMutations(mutations: MutationRecord[]): void {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n for (const node of mutation.removedNodes) {\n if (node instanceof HTMLElement) {\n if (node.slot === 'input' && this.inputRef === node) {\n this.clearInputListeners()\n } else if (node.slot === 'suggestions' && this.suggestionsRef === node) {\n this.clearSuggestionsListeners()\n }\n }\n }\n for (const node of mutation.addedNodes) {\n if (node instanceof HTMLElement) {\n if (node.slot === 'input') {\n this.setupInput(node)\n } else if (node.slot === 'suggestions') {\n this.setupSuggestions(node as UiListbox)\n }\n }\n }\n }\n }\n }\n\n /**\n * Clears event listeners from the current input reference and resets it.\n */\n protected clearInputListeners(): void {\n if (this.inputRef) {\n this.inputRef.removeEventListener('focus', this.handleInputFocus)\n this.inputRef.removeEventListener('input', this.handleInput)\n this.inputRef.removeEventListener('keydown', this.handleKeydown as EventListener)\n this.inputRef.removeEventListener('blur', this.handleInputBlur)\n }\n this.inputRef = null\n }\n\n /**\n * Clears event listeners from the current suggestions reference and resets it.\n */\n protected clearSuggestionsListeners(): void {\n if (this.suggestionsRef) {\n this.suggestionsRef.removeEventListener('select', this.handleSuggestionSelect as EventListener)\n // If ui-listbox uses a slot for its items, listen to its slotchange\n this.suggestionsRef.removeEventListener('itemschange', this.handleSuggestionsSlotChange)\n if (this.suggestionsRef.matches(':popover-open')) {\n this.suggestionsRef.hidePopover()\n }\n }\n this.suggestionsRef = null\n }\n\n /**\n * Sets up the slotted input element.\n * Assigns an ID if necessary, sets up CSS anchoring, and attaches event listeners.\n * @param input The HTMLElement to be used as the input.\n */\n protected setupInput(input: HTMLElement): void {\n this.clearInputListeners() // Clear any old listeners\n if (!input.id) {\n this.inputId = `autocomplete-input-${Math.random().toString(36).substring(2, 15)}`\n input.id = this.inputId\n } else {\n this.inputId = input.id\n }\n const anchorElement = this.querySelector('[slot=\"anchor\"]') as HTMLElement | null\n // Ensure CSS anchor positioning can work\n const anchor = anchorElement || input\n anchor.style.setProperty('anchor-name', `--${this.inputId}`)\n\n this.inputRef = input as HTMLInputElement // Assuming it behaves like an input\n this.inputRef.addEventListener('focus', this.handleInputFocus)\n this.inputRef.addEventListener('input', this.handleInput)\n this.inputRef.addEventListener('keydown', this.handleKeydown as EventListener)\n this.inputRef.addEventListener('blur', this.handleInputBlur)\n }\n\n /**\n * Sets up the slotted suggestions element (assumed to be a `UiListbox`).\n * Configures popover behavior, CSS anchoring, and attaches event listeners.\n * @param suggestionsElement The `UiListbox` element to be used for suggestions.\n */\n protected setupSuggestions(suggestionsElement: UiListbox): void {\n this.clearSuggestionsListeners() // Clear any old listeners\n\n this.suggestionsRef = suggestionsElement\n this.suggestionsRef.popover = 'manual'\n this.suggestionsRef.tabIndex = -1 // Prevent direct focus\n\n this.suggestionsRef.addEventListener('select', this.handleSuggestionSelect as EventListener)\n // The `List` dispatches `itemschange` when the slot changes, so we can listen to it.\n this.suggestionsRef.addEventListener('itemschange', this.handleSuggestionsSlotChange)\n\n // Initial filter\n this.filterSuggestions(this.inputRef ? (this.inputRef as HTMLInputElement).value : '')\n }\n\n /**\n * Handles the focus event on the input element.\n * Opens the suggestions popover if there are items to display.\n */\n @bound\n protected handleInputFocus(): void {\n const items = this.suggestionsRef?.items\n if (!items || items.length === 0) {\n // If no suggestions, do not open\n return\n }\n const active = items.find((item) => !item.hidden)\n if (active) {\n this.openSuggestions()\n this.filterSuggestions(this.inputRef ? (this.inputRef as HTMLInputElement).value : '')\n }\n }\n\n /**\n * Handles the input event on the input element.\n * Filters suggestions based on the input query and opens/closes the popover accordingly.\n * @param event The input event.\n */\n @bound\n protected handleInput(event: Event): void {\n this.openSuggestions()\n const query = (event.target as HTMLInputElement).value\n this.filterSuggestions(query)\n }\n\n /**\n * Handles keydown events on the input element for navigating and selecting suggestions.\n * - ArrowDown/ArrowUp: Navigates the suggestion list.\n * - Enter: Selects the highlighted suggestion.\n * - Escape: Closes the suggestions popover.\n * @param event The keyboard event.\n */\n @bound\n protected handleKeydown(event: KeyboardEvent): void {\n if (!this.suggestionsRef) return\n\n const { key } = event\n const isSuggestionsOpen = this.suggestionsRef.matches(':popover-open')\n\n if (['ArrowDown', 'ArrowUp'].includes(key)) {\n event.preventDefault()\n if (!isSuggestionsOpen) {\n this.openSuggestions()\n // Give popover a moment to open before trying to highlight\n requestAnimationFrame(() => this.navigateList(key))\n } else {\n this.navigateList(key)\n }\n } else if (key === 'Enter') {\n if (isSuggestionsOpen && this.suggestionsRef.highlightListItem) {\n event.preventDefault()\n this.suggestionsRef.notifySelect(this.suggestionsRef.highlightListItem)\n }\n } else if (key === 'Escape') {\n if (isSuggestionsOpen) {\n event.preventDefault()\n this.closeSuggestions()\n }\n }\n }\n\n /**\n * Navigates the suggestion list based on the pressed key.\n * @param key The key that was pressed (ArrowDown or ArrowUp).\n */\n protected navigateList(key: string): void {\n if (!this.suggestionsRef) return\n switch (key) {\n case 'ArrowDown':\n this.suggestionsRef.highlightNext()\n break\n case 'ArrowUp':\n this.suggestionsRef.highlightPrevious()\n break\n // Don't handle Home or End keys here, as they break the usability of the input.\n }\n }\n\n /**\n * Handles the blur event on the input element.\n * Closes the suggestions popover if focus moves outside the autocomplete component.\n */\n @bound\n protected handleInputBlur(): void {\n // We use the manual popover mode, so we need to close suggestions\n // when the input loses focus, but only the current active element is not part of the suggestions.\n requestAnimationFrame(() => {\n // Get the root of the current context (ShadowRoot or Document)\n const root = this.getRootNode() as Document | ShadowRoot\n const activeElement = root.activeElement\n if (\n !this.inputRef?.contains(activeElement) &&\n (!this.suggestionsRef || !this.suggestionsRef.contains(activeElement))\n ) {\n this.closeSuggestions()\n }\n })\n }\n\n /**\n * Handles the `select` event dispatched by the `ui-listbox` when a suggestion is chosen.\n * Dispatches an `autocomplete` event and closes the popover.\n * @param event The custom event from `ui-listbox`.\n */\n @bound\n protected handleSuggestionSelect(event: CustomEvent): void {\n event.stopPropagation()\n const selectedItem = event.detail.item as UiListItem\n this.dispatchEvent(\n new CustomEvent('autocomplete', {\n detail: { item: selectedItem },\n bubbles: false,\n composed: false,\n })\n )\n this.closeSuggestions()\n }\n\n /**\n * Handles the `itemschange` event dispatched by the `ui-listbox` when its slotted items change.\n * Re-filters the suggestions.\n */\n @bound\n protected handleSuggestionsSlotChange(): void {\n const value = this.inputRef ? (this.inputRef as HTMLInputElement).value : ''\n if (!value) {\n return\n }\n this.openSuggestions()\n this.filterSuggestions(value)\n }\n\n /**\n * Opens the suggestions popover if it's not already open and there are visible items.\n */\n protected openSuggestions(): void {\n const popover = this.suggestionsRef\n if (!popover || popover.matches(':popover-open')) {\n return\n }\n // we need to open the popover first to make any measurements\n popover.showPopover()\n const anchor = (this.querySelector('[slot=\"anchor\"]') as HTMLElement | null) || this.inputRef\n if (!anchor) {\n return\n }\n this.positionArea = this.decidePositionArea(popover, anchor)\n }\n\n /**\n * Decides the position area for the popover based on available space.\n * It checks if there is enough space below or above the anchor element and decides accordingly.\n *\n * We need to do this because we set the popover height to `100%`, `-webkit-fill-available`, or `-moz-available`\n * and it makes the popover to always open at the bottom, even if there is no space. The `position-try-fallbacks`\n * will not work in this case, because from its perspective there is always enough space, even if that will cause\n * the popover to have a height of just a few pixels.\n *\n * @param popover The popover element to position.\n * @param anchor The anchor element relative to which the popover will be positioned.\n * @returns 'top' or 'bottom' based on available space.\n */\n protected decidePositionArea(popover: HTMLElement, anchor: HTMLElement): 'top' | 'bottom' {\n let newArea: 'top' | 'bottom' = 'bottom'\n // Get bounding rectangles\n const anchorRect = anchor.getBoundingClientRect()\n const viewportHeight = window.innerHeight\n\n const spaceBelow = viewportHeight - anchorRect.bottom\n const spaceAbove = anchorRect.top\n\n // Estimate a typical/minimum height the popover might need to be useful\n const popoverThresholdHeight = popover.scrollHeight || 150\n if (spaceBelow < popoverThresholdHeight && spaceAbove > spaceBelow && spaceAbove > popoverThresholdHeight) {\n // Not enough space below, but more (and sufficient) space above\n newArea = 'top'\n } else if (spaceBelow < popoverThresholdHeight && spaceAbove > spaceBelow) {\n // Not enough space below, and space above is more than space below (even if not \"sufficient\")\n newArea = 'top'\n } else {\n newArea = 'bottom' // Default to bottom if enough space or if top is worse\n }\n return newArea\n }\n\n /**\n * Closes the suggestions popover if it's open and clears any highlighted item.\n */\n protected closeSuggestions(): void {\n if (this.suggestionsRef && this.suggestionsRef.matches(':popover-open')) {\n this.suggestionsRef.hidePopover()\n }\n }\n\n /**\n * Filters the suggestions based on the provided query.\n * Hides items that do not match and manages the highlighted item state.\n * @param query The search query string.\n */\n protected filterSuggestions(query: string): void {\n if (!this.suggestionsRef) {\n return\n }\n\n const lowerCaseQuery = query.toLowerCase().trim()\n let firstVisibleItem: UiListItem | null = null\n\n // The `items` getter in `List.ts` (parent of UiListbox) correctly gets assigned elements.\n const items = this.suggestionsRef.items as UiListItem[]\n\n for (const item of items) {\n let matches = false\n if (lowerCaseQuery === '') {\n matches = true\n } else if (item.dataset.index) {\n const indexFields = item.dataset.index.split(' ').filter(Boolean)\n for (const field of indexFields) {\n const valueToSearch = item.dataset[field] || ''\n if (valueToSearch.toLowerCase().includes(lowerCaseQuery)) {\n matches = true\n break\n }\n }\n } else {\n const valueToSearch = item.dataset.value || item.textContent || ''\n matches = valueToSearch.toLowerCase().includes(lowerCaseQuery)\n }\n item.hidden = !matches\n if (matches && !firstVisibleItem) {\n firstVisibleItem = item\n }\n }\n\n // If the currently highlighted item is now hidden, try to highlight the first visible one or clear.\n if (this.suggestionsRef.highlightListItem?.hidden) {\n // the highlightListItem clears the highlighted item if it is not passed an argument.\n this.suggestionsRef?.highlightItem(firstVisibleItem)\n }\n if (!firstVisibleItem) {\n // Close if no items are visible\n this.closeSuggestions()\n }\n }\n\n protected override render(): TemplateResult {\n const { id, positionArea, inputId } = this\n /*\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n */\n return html`\n <style>\n .${id} {\n display: inline-block;\n\n [popover] {\n border: none;\n margin: 0;\n\n box-shadow: var(--md-sys-elevation-1);\n border-radius: var(--md-sys-shape-corner-medium);\n\n position-area: ${positionArea};\n position-anchor: --${inputId};\n\n overflow: auto;\n /* We try 100% and then vendor options which are more accurate */\n height: 100%;\n height: -webkit-fill-available;\n height: -moz-available;\n max-height: max-content;\n width: anchor-size(width);\n }\n\n [popover]:not(:popover-open) {\n display: none;\n }\n }\n </style>\n `\n }\n}\n"]}
@@ -30,6 +30,10 @@ export interface CellRenderOptions {
30
30
  * the name for the row, like, a person name or a file name.
31
31
  */
32
32
  isPrimary?: boolean;
33
+ /**
34
+ * The part name to use for the cell.
35
+ */
36
+ part?: string;
33
37
  }
34
38
  /**
35
39
  * Options for rendering a table header cell. Extends CellRenderOptions.
@@ -69,6 +73,19 @@ export interface EventCellInfo {
69
73
  */
70
74
  row: number;
71
75
  }
76
+ /**
77
+ * Details for the `sort` event dispatched by the DataTable component.
78
+ */
79
+ export interface DataTableSortEventDetail {
80
+ /**
81
+ * The name of the column being sorted.
82
+ */
83
+ column: string;
84
+ /**
85
+ * The sort direction, either "asc" (ascending) or "desc" (descending).
86
+ */
87
+ direction: 'asc' | 'desc';
88
+ }
72
89
  /**
73
90
  * A versatile and accessible data table web component.
74
91
  *
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../../src/elements/data-table/DataTable.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAW,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAM/E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,sCAAsC,CAAA;AAC7C,OAAO,2BAA2B,CAAA;AAElC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;IAChD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,O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AAE,KAAK,EAAE,MAAM,GAAG,cAAc;IAiB3D;;;;;;;;;OASG;IACH,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,iBAAsB,GAAG,cAAc;IAmD9G;;;;;OAKG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,uBAA4B,GAAG,cAAc;CAwC9G"}
@@ -450,6 +450,7 @@ let DataTable = (() => {
450
450
  continue;
451
451
  }
452
452
  const isTarget = ['TD', 'TH'].includes(element.nodeName);
453
+ // @TODO: This creates a focus trap and should be investigated.
453
454
  if (!isTarget && element.hasAttribute('tabindex')) {
454
455
  // It means that the user focusing on an interactive element
455
456
  // within a cell and we should abandon whatever we do right now.
@@ -701,7 +702,7 @@ let DataTable = (() => {
701
702
  this.lastSelectedIndex = index;
702
703
  }
703
704
  // This won't cause the focus ring to be rendered because the cell
704
- // won't hey the `tabindex=0`, which is OK with pointer device navigation,
705
+ // won't have the `tabindex=0`, which is OK with pointer device navigation,
705
706
  // but it will keep track of the last cell in case the keyboard navigation starts.
706
707
  this.position = { row, col };
707
708
  }
@@ -924,7 +925,7 @@ let DataTable = (() => {
924
925
  data-row="${row}"
925
926
  data-col="${col}"
926
927
  scope="row"
927
- part="cell"
928
+ part="${opts.part ?? 'cell'}"
928
929
  >
929
930
  ${ring}
930
931
  <div class="cell-content">${content}</div>
@@ -941,7 +942,7 @@ let DataTable = (() => {
941
942
  data-delegate="${ifDefined(delegateFocus ? true : undefined)}"
942
943
  data-row="${row}"
943
944
  data-col="${col}"
944
- part="cell"
945
+ part="${opts.part ?? 'cell'}"
945
946
  >
946
947
  ${ring}
947
948
  <div class="cell-content">${content}</div>
@@ -997,7 +998,7 @@ let DataTable = (() => {
997
998
  tabindex="${ifDefined(index)}"
998
999
  data-delegate="${ifDefined(delegateFocus ? true : undefined)}"
999
1000
  aria-label="${ifDefined(ariaLabel)}"
1000
- part="header-cell"
1001
+ part="${opts.part ?? 'header-cell'}"
1001
1002
  >
1002
1003
  <ui-focus-ring .inward="${this.overflow ? true : false}"></ui-focus-ring>
1003
1004
  <div class="cell-content">
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../../../../src/elements/data-table/DataTable.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAkC,MAAM,KAAK,CAAA;AAC/E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACtD,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAGxD,OAAO,sCAAsC,CAAA;AAC7C,OAAO,2BAA2B,CAAA;AA0ElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;IACmB,SAAS;sBAA2B,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA9C,SAA4B,SAAQ,WAAU;;;iCAIjE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qCAU1B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAMzC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;qCAOzB,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAA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AA;YAC9D,IAAI,KAAyB,CAAA;YAC7B,IAAI,CAAC,aAAa,EAAE,CAAC;gBACnB,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAC5B,CAAC;YACD,IAAI,QAAyD,CAAA;YAC7D,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,GAAG,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAA;YACtE,CAAC;iBAAM,IAAI,UAAU,EAAE,CAAC;gBACtB,QAAQ,GAAG,MAAM,CAAA;YACnB,CAAC;YACD,OAAO,IAAI,CAAA;;;eAGA,QAAQ,CAAC,WAAW,CAAC;QAC5B,QAAQ,CAAC,IAAI,CAAC;mBACH,SAAS,CAAC,QAAQ,CAAC;mBACnB,SAAS,CAAC,IAAI,CAAC;;kBAEhB,GAAG;kBACH,SAAS,CAAC,KAAK,CAAC;uBACX,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC9C,SAAS,CAAC,SAAS,CAAC;;;gCAGR,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;;UAElD,OAAO;UACP,UAAU,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,kDAAkD,QAAQ,YAAY,CAAC,CAAC,CAAC,OAAO;;WAE5G,CAAA;QACT,CAAC;;;SA90BmB,SAAS","sourcesContent":["/* eslint-disable max-len */\nimport { html, LitElement, nothing, PropertyValues, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ref, createRef } from 'lit/directives/ref.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { dataAttr } from '../../directives/data-attr.js'\nimport { LiveData } from '../../reactive/LiveData.js'\n\nimport '../../md/focus-ring/ui-focus-ring.js'\nimport '../../md/icons/ui-icon.js'\n\n/**\n * Options for rendering a table cell.\n */\nexport interface CellRenderOptions {\n /**\n * CSS classes to apply to the cell.\n */\n classes?: string[]\n /**\n * Data attributes to add to the cell (e.g., `data-id=\"my-id\"`).\n */\n data?: Record<string, string | number | boolean>\n /**\n * The value of the aria-label to render on the cell.\n */\n ariaLabel?: string\n /**\n * Used with interactive elements within the cell.\n * The content of the cell should have exactly one element\n * with the `tabindex=-1`. The table will automatically\n * focus on that element when activated.\n */\n delegateFocus?: boolean\n /**\n * Used for accessibility. Should be set on the cell that represents\n * the name for the row, like, a person name or a file name.\n */\n isPrimary?: boolean\n}\n\n/**\n * Options for rendering a table header cell. Extends CellRenderOptions.\n */\nexport interface HeaderCellRenderOptions extends CellRenderOptions {\n /**\n * The name of the sort property.\n */\n sort?: string\n}\n\nexport interface CellPosition {\n /**\n * The index of the selected row\n */\n row: number\n /**\n * The index of the selected cell\n */\n col: number\n\n /**\n * Whether the logic should ignore setting up focus.\n * This is used when tracking cell selection when using a pointer device.\n */\n ignoreFocus?: boolean\n}\n\nexport interface EventCellInfo {\n /**\n * The cell element.\n */\n cell: HTMLElement\n /**\n * The column index\n */\n col: number\n /**\n * The **table** row index (not items)\n */\n row: number\n}\n\n/**\n * A versatile and accessible data table web component.\n *\n * The `DataTable` component provides a highly customizable and accessible way to display tabular data.\n * It offers features such as:\n *\n * - **Accessibility:** Built with ARIA roles and attributes for screen reader compatibility and keyboard navigation.\n * - **Customizable Cells:** Allows complete control over the content and rendering of each cell in the table.\n * - **Header Customization:** Provides flexibility in defining and rendering table headers, including sorting.\n * - **Selection:** Supports single, multiple, or no selection of rows.\n * - **Activation:** Enables the activation of rows (e.g., via double-click or Enter/Space key).\n * - **Infinite Scrolling:** Supports \"load more\" functionality (infinite scroll) using a sentinel element.\n * - **Sorting:** Allows sorting of data by clicking on sortable header cells.\n * - **Keyboard Navigation:** Full keyboard support for navigating through the table.\n * - **Empty State:** Customizable content to display when the table has no data.\n * - **Focus Management:** Properly manages focus for both keyboard and pointer interactions.\n *\n * @slot empty - Optional. Content to display when the table is empty (i.e., `items` is an empty array).\n * Defaults to a message saying \"No data to display.\"\n *\n * @fires select - Dispatched when the selection changes.\n * - `detail`: An object with a `selectedItems` property, containing an array of the currently selected items.\n * - Example: `{ selectedItems: [item1, item2] }`\n *\n * @fires activate - Dispatched when a row is activated (e.g., double-clicked or Enter/Space pressed).\n * - `detail`: The data item that was activated.\n * - Example: `item1`\n *\n * @fires scrollend - Dispatched when the user scrolls to the bottom of the table (when the `overflow` property is true).\n * - No event detail.\n *\n * @fires sort - Dispatched when the user clicks on a sortable header to change the sorting.\n * - `detail`: An object with `column` and `direction` properties.\n * - `column`: The name of the column being sorted.\n * - `direction`: The sort direction, either \"asc\" (ascending) or \"desc\" (descending).\n * - Example: `{ column: \"name\", direction: \"asc\" }`\n *\n * @csspart table - The underlying `<table>` element.\n * @csspart cell - Individual `<td>` and `<th>` elements.\n * @csspart header-cell - Individual `<th>` elements.\n *\n * @cssprop --md-focus-ring-shape-start-start - The start-start corner shape for the focus ring.\n * @cssprop --md-focus-ring-shape-start-end - The start-end corner shape for the focus ring.\n * @cssprop --md-focus-ring-shape-end-end - The end-end corner shape for the focus ring.\n * @cssprop --md-focus-ring-shape-end-start - The end-start corner shape for the focus ring.\n * @cssprop --md-sys-typescale-label-large-font - The font family for label large.\n * @cssprop --md-sys-typescale-label-large-size - The font size for label large.\n * @cssprop --md-sys-typescale-label-large-tracking - The letter spacing for label large.\n * @cssprop --md-sys-typescale-label-large-height - The line height for label large.\n * @cssprop --md-sys-typescale-label-large-weight - The font weight for label large.\n * @cssprop --md-sys-color-outline-variant - The outline variant color.\n * @cssprop --md-sys-color-secondary-container - The secondary container color.\n * @cssprop --md-icon-size - The size of the icons.\n * @cssprop --md-sys-typescale-title-small-font - The font family for title small.\n * @cssprop --md-sys-typescale-title-small-weight - The font weight for title small.\n * @cssprop --md-sys-typescale-title-small-size - The font size for title small.\n * @cssprop --md-sys-typescale-title-small-tracking - The letter spacing for title small.\n * @cssprop --md-sys-typescale-title-small-height - The line height for title small.\n * @cssprop --md-sys-typescale-body-medium-font - The font family for body medium.\n * @cssprop --md-sys-typescale-body-medium-weight - The font weight for body medium.\n * @cssprop --md-sys-typescale-body-medium-size - The font size for body medium.\n * @cssprop --md-sys-typescale-body-medium-tracking - The letter spacing for body medium.\n * @cssprop --md-sys-typescale-body-medium-height - The line height for body medium.\n *\n * @typeParam T The type of data items in the table.\n *\n * @example\n * ```html\n * <data-table\n * .items=\"${myItems}\"\n * selection=\"multi\"\n * @select=\"${handleSelect}\"\n * @activate=\"${handleActivate}\"\n * @scrollend=\"${handleScrollEnd}\"\n * @sort=\"${handleSort}\"\n * overflow\n * >\n * <p slot=\"empty\">No items to display at this time.</p>\n * </data-table>\n * ```\n *\n * @example\n * ```typescript\n * // Inside a subclass of DataTable.\n * // Rendering a name cell.\n * #nameCell(item: MyItem, row: number, col: number): TemplateResult {\n * return this.renderCell(item.name, row, col, { isPrimary: true });\n * }\n *\n * // Rendering a header cell.\n * override renderHeader(): TemplateResult[] {\n * return [\n * this.renderHeaderCell('Name', 0, { sort: 'name' }),\n * this.renderHeaderCell('Value', 1, { sort: 'value' }),\n * ];\n * }\n * ```\n */\nexport abstract class DataTable<T extends object> extends LitElement {\n /**\n * The data items to display in the table.\n */\n @property({ type: Object }) accessor items: LiveData<T[]> | undefined\n\n /**\n * The selection mode. Can be \"none\", \"single\", or \"multi\".\n * - `none`: No selection is allowed.\n * - `single`: Only one item can be selected at a time.\n * - `multi`: Multiple items can be selected.\n * @attribute\n * @default \"none\"\n */\n @property({ type: String, reflect: true }) accessor selection: 'none' | 'single' | 'multi' = 'none'\n\n /**\n * The currently selected items.\n * @default []\n */\n @property({ type: Array }) accessor selectedItems: T[] = []\n\n /**\n * The ARIA label for the table. Used for accessibility.\n * @attribute\n * @default \"Data table\"\n */\n @property({ type: String, reflect: true }) override accessor ariaLabel = 'Data table'\n\n /**\n * Enables double-click and Enter/Space key activation of table items.\n * When `true`, items can be activated by:\n * - Double-clicking the item.\n * - Focusing on the item and pressing Enter or Space.\n * The `activate` event is dispatched when an item is activated.\n * @attribute\n * @default false\n */\n @property({ type: Boolean }) accessor active = false\n\n /**\n * Enables the \"load more\" functionality when the user scrolls to the bottom of the table.\n * When `true`, a sentinel element is added to the bottom of the table. When the sentinel\n * becomes visible, the `scrollend` event is dispatched.\n * This is commonly used for infinite scrolling or lazy loading of data.\n * @attribute\n * @default false\n */\n @property({ type: Boolean, reflect: true }) accessor overflow = false\n\n /**\n * The name of the property to sort the table by. If set, the table will\n * automatically indicate the sortable header.\n * @attribute\n * @default undefined\n */\n @property({ type: String }) accessor sort: string | undefined\n\n /**\n * The direction of the sort. Can be \"asc\" (ascending) or \"desc\" (descending).\n * If `sort` is set, this property will be used to determine the sort direction.\n * @attribute\n * @default undefined\n */\n @property({ type: String }) accessor sortDirection: 'asc' | 'desc' | undefined\n\n protected lastSelectedIndex = -1\n\n protected observer?: IntersectionObserver\n\n protected sentinel = createRef<HTMLElement>()\n\n /**\n * The current focus position.\n * It is used to support keyboard navigation.\n *\n * Initially we always allow to focus on the first cell, which\n * should be the first header cell. The keyboard navigation will\n * take over.\n */\n @state() accessor position: CellPosition = { row: 0, col: 0 }\n\n constructor() {\n super()\n this.handleLiveData = this.handleLiveData.bind(this)\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n if (this.overflow) {\n // Only create the observer if overflow is enabled\n this.createObserver()\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback()\n this.observer?.disconnect()\n this.observer = undefined\n }\n\n override firstUpdated(): void {\n if (this.overflow) {\n this.createObserver()\n }\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('items')) {\n this.lastSelectedIndex = -1\n this.revalidateSelection()\n }\n }\n\n protected override updated(cp: PropertyValues<this>): void {\n if (cp.has('position')) {\n const { row, col, ignoreFocus = false } = this.position\n if (!ignoreFocus) {\n const cell = this.shadowRoot?.querySelector(`[data-row=\"${row}\"][data-col=\"${col}\"]`) as HTMLElement | null\n if (cell) {\n cell.focus()\n }\n }\n }\n if (cp.has('items')) {\n const old = cp.get('items')\n if (old) {\n old.removeEventListener('update', this.handleLiveData)\n }\n if (this.items) {\n this.items.addEventListener('update', this.handleLiveData)\n }\n }\n }\n\n handleLiveData(): void {\n this.requestUpdate()\n }\n\n /**\n * @internal\n * @description Creates and configures an `IntersectionObserver` to detect when the sentinel element is visible,\n * indicating the user has scrolled to the bottom of the table.\n *\n * This method sets up the observer to watch the sentinel element. When the sentinel intersects with the component's viewport,\n * it triggers the `scrollend` event.\n *\n * This function is used when `overflow` is set to true.\n *\n * @returns void\n */\n protected createObserver(): void {\n const { sentinel } = this\n if (!sentinel.value) {\n return\n }\n\n const options: IntersectionObserverInit = {\n root: this, // Observe within the component's viewport\n rootMargin: '0px', // No margin\n threshold: 0.0, // Trigger when the sentinel is 0% visible (at the very bottom)\n }\n\n this.observer = new IntersectionObserver(this.handleIntersection, options)\n this.observer.observe(sentinel.value) // Observe the sentinel.\n }\n\n protected revalidateSelection(): void {\n const { items, selectedItems = [] } = this\n if (!items || selectedItems.length === 0) {\n return\n }\n const filteredSelectedItems = selectedItems.filter((selectedItem) =>\n items.value.some((item) => item === selectedItem)\n )\n if (filteredSelectedItems.length !== selectedItems.length) {\n this.selectedItems = filteredSelectedItems\n this.notifySelect(filteredSelectedItems)\n }\n }\n\n /**\n * Notifies about the selection change.\n *\n * This method dispatches a `select` event with the currently selected items.\n *\n * @param selectedItems - The array of currently selected items.\n */\n protected notifySelect(selectedItems: T[]): void {\n this.dispatchEvent(new CustomEvent('select', { detail: { selectedItems } }))\n }\n\n /**\n * Notifies about the scroll end event.\n *\n * This method dispatches a `scrollend` event when the user scrolls to the bottom of the table.\n * It is typically used in conjunction with the `overflow` property to implement infinite scrolling.\n */\n protected notifyScrollEnd(): void {\n this.dispatchEvent(new CustomEvent('scrollend'))\n }\n\n /**\n * Notifies about the activation of a row.\n *\n * This method dispatches an `activate` event with the activated item.\n * It is typically used when a row is double-clicked or when the Enter/Space key is pressed while focused on a row.\n *\n * @param item - The data item that was activated.\n */\n protected notifyActivate(item: T): void {\n this.dispatchEvent(new CustomEvent('activate', { detail: item }))\n }\n\n /**\n * Notifies about the sorting action.\n *\n * This method dispatches a `sort` event with the column name and sort direction.\n * It is typically used when a sortable header cell is clicked.\n *\n * @param column - The name of the column being sorted.\n * @param direction - The sort direction, either \"asc\" (ascending) or \"desc\" (descending).\n */\n protected notifySort(column: string, direction: 'asc' | 'desc'): void {\n this.dispatchEvent(\n new CustomEvent('sort', {\n detail: {\n column,\n direction,\n },\n })\n )\n }\n\n /**\n * @internal\n * @description Handles the intersection of the sentinel element with the viewport.\n *\n * This method is the callback function for the `IntersectionObserver`. When the sentinel becomes visible,\n * it dispatches the `scrollend` event to signal that the user has reached the bottom of the table.\n *\n * @param entries - An array of IntersectionObserverEntry objects.\n * @returns void\n */\n handleIntersection: IntersectionObserverCallback = (entries): void => {\n if (entries.some((entry) => entry.isIntersecting)) {\n this.notifyScrollEnd()\n }\n }\n\n /**\n * @internal\n * @description Extracts information about a cell from an event.\n *\n * This method analyzes the event's composed path to identify the clicked or focused cell (either `<td>` or `<th>`).\n * It returns the cell element, its column index, and its row index.\n * It is also capable of detecting if the user focused on an interactive element within a cell.\n *\n * @param e - The event object (typically a MouseEvent or KeyboardEvent).\n * @returns An object containing the cell element, column index, and row index, or `undefined` if the target is not a cell.\n */\n protected infoFromEvent(e: Event): EventCellInfo | undefined {\n const path = e.composedPath()\n let cell: HTMLElement | undefined\n for (const current of path.values()) {\n const element = current as Element\n if (element.nodeType !== Node.ELEMENT_NODE) {\n continue\n }\n const isTarget = ['TD', 'TH'].includes(element.nodeName)\n if (!isTarget && element.hasAttribute('tabindex')) {\n // It means that the user focusing on an interactive element\n // within a cell and we should abandon whatever we do right now.\n return\n }\n if (isTarget) {\n cell = element as HTMLElement\n break\n }\n }\n if (!cell) {\n return\n }\n const col = Number(cell.dataset.col)\n const row = Number(cell.dataset.row)\n if (isNaN(col) || isNaN(row)) {\n return\n }\n return { cell, col, row }\n }\n\n /**\n * @internal\n * @description Gets the number of columns and rows of the table.\n *\n * @returns An object with `cols` and `rows` properties indicating the number of columns and rows.\n */\n protected getSize(): { cols: number; rows: number } {\n const result = { cols: 0, rows: 0 }\n const table = this.shadowRoot?.querySelector('table')\n if (!table) {\n return result\n }\n const row = table.querySelector('tr')\n if (!row) {\n return result\n }\n const columns = row.querySelectorAll('th, td')\n result.cols = columns.length ? columns.length - 1 : 0\n const rows = table.rows\n result.rows = rows.length ? rows.length - 1 : 0\n return result\n }\n\n /**\n * @internal\n * @description Get the element containing the cell data.\n *\n * @param col - The column index of the cell.\n * @param row - The row index of the cell.\n * @returns An object with the cell element and `delegateFocus` flag, or `undefined` if the cell does not exist.\n */\n protected getCellInfo(col: number, row: number): { cell: HTMLElement; delegateFocus: boolean } | undefined {\n const cell = this.shadowRoot?.querySelector(`[data-col=\"${col}\"][data-row=\"${row}\"]`) as HTMLElement | null\n if (!cell) {\n return\n }\n const delegateFocus = cell.dataset.delegate === 'true'\n return { cell, delegateFocus }\n }\n\n /**\n * @internal\n * @description Delegates the focus to a specific interactive element within a cell.\n *\n * This method is used when the cell is configured to handle its own focus management (i.e., `delegateFocus` is `true`).\n *\n * @param parent - The parent element (the cell) containing the interactive element.\n * @returns void\n */\n protected delegateFocus(parent: HTMLElement): void {\n const delegate = parent.querySelector('[tabindex]') as HTMLElement | null\n if (delegate) {\n delegate.focus()\n }\n }\n\n /**\n * @internal\n * @description Moves the focus to the specified cell.\n *\n * This method updates the component's internal `position` state and then focuses on the corresponding cell.\n * If the cell has the `delegateFocus` property, it delegates the focus to the first interactive element inside of the cell.\n *\n * @param col - The column index of the cell to focus on.\n * @param row - The row index of the cell to focus on.\n * @returns void\n */\n protected moveFocusTo(col: number, row: number): void {\n const cell = this.getCellInfo(col, row)\n if (!cell) {\n return\n }\n this.position = { row, col }\n if (cell.delegateFocus) {\n this.position.ignoreFocus = true\n this.delegateFocus(cell.cell)\n }\n }\n\n /**\n * @internal\n * @description Handles keyboard navigation within the table.\n *\n * This method processes keyboard events to move the focus between cells. It supports arrow keys, Page Up/Down, Home/End, Enter and Space.\n * - ArrowRight: Moves focus to the next cell to the right.\n * - ArrowLeft: Moves focus to the next cell to the left.\n * - ArrowDown: Moves focus to the cell below.\n * - ArrowUp: Moves focus to the cell above.\n * - PageUp: Moves focus to the first row.\n * - PageDown: Moves focus to the last row.\n * - Home: Moves focus to the first cell of the current row (Ctrl+Home moves to the first cell of the first row).\n * - End: Moves focus to the last cell of the current row (Ctrl+End moves to the last cell of the last row).\n * - Enter: Activates the current row.\n * - Space: Manages selection.\n *\n * @param e - The KeyboardEvent object.\n * @returns void\n */\n protected handleKeyDown(e: KeyboardEvent) {\n if (e.defaultPrevented) {\n return\n }\n const info = this.infoFromEvent(e)\n if (!info) {\n // This also makes sure that when we are focusing on an element\n // within a `delegateFocus` cell, we won't interfere with its events.\n return\n }\n const { code } = e\n const { position } = this\n const size = this.getSize()\n if (code === 'ArrowRight') {\n e.preventDefault()\n if (position.col < size.cols) {\n this.moveFocusTo(position.col + 1, position.row)\n }\n } else if (code === 'ArrowLeft') {\n e.preventDefault()\n if (position.col > 0) {\n this.moveFocusTo(position.col - 1, position.row)\n }\n } else if (code === 'ArrowDown') {\n e.preventDefault()\n if (position.row < size.rows) {\n this.moveFocusTo(position.col, position.row + 1)\n }\n } else if (code === 'ArrowUp') {\n e.preventDefault()\n if (position.row > 0) {\n this.moveFocusTo(position.col, position.row - 1)\n }\n } else if (code === 'PageUp') {\n e.preventDefault()\n if (position.row > 1) {\n this.moveFocusTo(position.col, 1)\n }\n } else if (code === 'PageDown') {\n e.preventDefault()\n if (position.row < size.rows) {\n this.moveFocusTo(position.col, size.rows)\n }\n } else if (code === 'Home') {\n e.preventDefault()\n if (!e.ctrlKey && position.col > 0) {\n this.moveFocusTo(0, position.row)\n } else if (e.ctrlKey && (position.row > 1 || position.col > 0)) {\n this.moveFocusTo(0, 1)\n }\n } else if (code === 'End') {\n e.preventDefault()\n if (!e.ctrlKey && position.col < size.cols) {\n this.moveFocusTo(size.cols, position.row)\n } else if (e.ctrlKey && position.row < size.rows) {\n this.moveFocusTo(size.cols, size.rows)\n }\n } else if (code === 'Enter') {\n e.preventDefault()\n this.activateFromCellInfo(info)\n } else if (code === 'Space') {\n e.preventDefault()\n this.manageSelectionFromEvent(info, e)\n }\n }\n\n /**\n * @internal\n * @description Handles mouse click events on the table.\n *\n * @param e - The MouseEvent object.\n * @returns void\n */\n protected handleClick(e: MouseEvent): void {\n if (e.detail === 3) {\n return\n }\n const info = this.infoFromEvent(e)\n if (!info) {\n return\n }\n if (e.detail === 2) {\n this.activateFromCellInfo(info)\n } else {\n this.manageSelectionFromEvent(info, e)\n }\n }\n\n /**\n * @internal\n * @description Manages the selection state based on a mouse or keyboard event.\n *\n * This method determines the row and column from the event target and updates the `selectedItems` array accordingly.\n * It supports single, multiple and no selection based on the `selection` property. It also supports shift-click.\n *\n * @param info - The cell info.\n * @param e - The MouseEvent or KeyboardEvent object.\n * @returns void\n */\n protected manageSelectionFromEvent(info: EventCellInfo, e: MouseEvent | KeyboardEvent): void {\n if (!this.items) {\n return\n }\n const { row, col } = info\n const index = row - 1\n if (info.row === 0) {\n // Handle sort.\n this.sortFrom(info.cell)\n this.position = { row, col }\n return\n }\n const item = this.items.value[index]\n if (!item) {\n return\n }\n\n const isMultiSelect = this.selection === 'multi'\n if (isMultiSelect && (e.metaKey || e.ctrlKey)) {\n this.toggleSelection(item, 'add')\n } else if (isMultiSelect && e.shiftKey) {\n this.handleShiftClick(index, item)\n } else {\n this.toggleSelection(item, 'replace')\n this.lastSelectedIndex = index\n }\n // This won't cause the focus ring to be rendered because the cell\n // won't hey the `tabindex=0`, which is OK with pointer device navigation,\n // but it will keep track of the last cell in case the keyboard navigation starts.\n this.position = { row, col }\n }\n\n /**\n * @internal\n * @description Handles shift-click for range selection.\n *\n * When shift-clicking a row, it will select all the items between the last selected item and the clicked item.\n *\n * @param clickedIndex - The index of the clicked item.\n * @param item - The clicked item.\n * @returns void\n */\n protected handleShiftClick(clickedIndex: number, item: T) {\n if (!this.items) {\n return\n }\n if (this.lastSelectedIndex === -1) {\n // If no previous selection, just select the clicked item.\n this.toggleSelection(item)\n this.lastSelectedIndex = clickedIndex\n return\n }\n const startIndex = Math.min(this.lastSelectedIndex, clickedIndex)\n const endIndex = Math.max(this.lastSelectedIndex, clickedIndex)\n const newSelectedItems = this.items.value.slice(startIndex, endIndex + 1)\n this.selectedItems = newSelectedItems as T[]\n this.notifySelect(newSelectedItems)\n }\n\n /**\n * @internal\n * @description Activates the row associated with the given event.\n *\n * This method is called when a row is double-clicked or when the Enter/Space key is pressed while a row is focused.\n *\n * @param e - The Event object.\n * @returns void\n */\n protected activateFromCellInfo(info: EventCellInfo): void {\n if (!this.items) {\n return\n }\n if (info.row === 0) {\n // Handle sort.\n this.sortFrom(info.cell)\n return\n }\n const item = this.items.value[info.row - 1]\n if (!item) {\n return\n }\n this.notifyActivate(item)\n }\n\n /**\n * @internal\n * @description Handles sorting logic based on the clicked column header.\n *\n * This method updates the `sort` and `sortDirection` properties and dispatches the `sort` event.\n *\n * @param column - The header cell element.\n * @returns void\n */\n protected sortFrom(column: HTMLElement): void {\n const sort = column.dataset.sort\n if (!sort) {\n return\n }\n if (this.sort === sort) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc'\n } else {\n this.sort = sort\n this.sortDirection = 'asc'\n }\n this.notifySort(this.sort, this.sortDirection)\n }\n\n /**\n * @public\n * @description Checks if an item is currently selected.\n *\n * @param item - The item to check.\n * @returns `true` if the item is selected, `false` otherwise.\n */\n isSelected(item: T): boolean {\n return this.selectedItems.includes(item)\n }\n\n /**\n * @public\n * @description Toggles the selection state of an item.\n *\n * This method adds or removes an item from the `selectedItems` array.\n *\n * @param item - The item to toggle selection for.\n * @param mode - The selection mode, either 'replace' or 'add' (defaults to 'replace').\n * @returns void\n */\n toggleSelection(item: T, mode: 'replace' | 'add' = 'replace') {\n if (this.selection === 'none') {\n return\n }\n\n if (this.selection === 'single') {\n this.selectedItems = [item]\n } else {\n // multi-select\n const index = this.selectedItems.indexOf(item)\n if (mode === 'replace') {\n this.selectedItems = [item]\n } else if (index === -1) {\n this.selectedItems = [...this.selectedItems, item]\n } else {\n this.selectedItems = this.selectedItems.filter((i) => i !== item)\n }\n }\n\n this.notifySelect(this.selectedItems)\n }\n\n /**\n * @internal\n * @description Renders the table.\n *\n * @returns A `TemplateResult` for rendering.\n */\n override render(): TemplateResult {\n if (!this.items || !this.items.value.length) {\n return this.renderEmpty()\n }\n const isMulti = this.selection === 'multi'\n return html`\n <table\n part=\"table\"\n role=\"grid\"\n aria-multiselectable=\"${ifDefined(isMulti ? 'true' : undefined)}\"\n aria-label=\"${this.ariaLabel}\"\n @keydown=\"${this.handleKeyDown}\"\n @click=\"${this.handleClick}\"\n >\n <thead>\n <tr role=\"row\">\n ${this.renderHeader()}\n </tr>\n </thead>\n <tbody>\n ${this.items.value.map((item, index) => this.renderRow(item, index))}\n </tbody>\n </table>\n ${this.overflow ? html`<div class=\"scroll-sentinel\" ${ref(this.sentinel)}></div>` : nothing}\n `\n }\n\n /**\n * @internal\n * @description Renders the empty state of the table.\n *\n * @returns A `TemplateResult` for rendering.\n */\n renderEmpty(): TemplateResult {\n return html`\n <slot name=\"empty\">\n <p role=\"status\" class=\"empty\">No data to display.</p>\n </slot>\n `\n }\n\n /**\n * @internal\n * @description Renders the table header cells. Must be implemented by subclasses.\n *\n * @returns An array of `TemplateResult` objects representing the header cells.\n */\n abstract renderHeader(): TemplateResult[]\n\n /**\n * @internal\n * @description Renders the cells for a given row item. Must be implemented by subclasses.\n *\n * @param item The data item for the row.\n * @param index The index that should be passed back to the rendering function. This is not the item index.\n * @returns An array of `TemplateResult` objects representing the cells for the row.\n */\n abstract renderRowValues(item: T, index: number): TemplateResult[]\n\n /**\n * @internal\n * @description Renders a single row in the table.\n *\n * @param item - The data item for the row.\n * @param index - The index of the row.\n * @returns A `TemplateResult` for rendering.\n */\n protected renderRow(item: T, index: number): TemplateResult {\n const rowClasses = {\n selected: this.isSelected(item as T),\n }\n\n return html`\n <tr\n role=\"row\"\n aria-selected=\"${this.isSelected(item as T) ? 'true' : 'false'}\"\n data-index=\"${index}\"\n class=\"${classMap(rowClasses)}\"\n >\n ${this.renderRowValues(item, index + 1)}\n </tr>\n `\n }\n\n /**\n * @internal\n * A helper method to render a standard table cell.\n *\n * @param content The content of the cell.\n * @param row The 0-based row index of the rendered cell\n * @param col The 0-based column index of the rendered cell\n * @param opts Options for rendering the cell (classes, icon, data attributes).\n * @returns A `TemplateResult` representing the rendered cell.\n */\n protected renderCell(content: unknown, row: number, col: number, opts: CellRenderOptions = {}): TemplateResult {\n const { position } = this\n const { data = {}, classes = [], ariaLabel, delegateFocus = false, isPrimary = false } = opts\n const cellClasses: Record<string, boolean> = { 'grid-cell': true }\n classes?.forEach((c) => (cellClasses[c] = true))\n const isFocused = position?.col === col && position?.row === row\n let index: number | undefined\n if (!delegateFocus) {\n index = isFocused ? 0 : -1\n }\n const ring = !delegateFocus\n ? html`<ui-focus-ring .inward=\"${this.overflow ? true : false}\"></ui-focus-ring>`\n : nothing\n if (isPrimary) {\n // Lit does not allow dynamic element names so I decided to make a copy.\n return html`\n <th\n role=\"gridcell\"\n class=\"${classMap(cellClasses)}\"\n ${dataAttr(data)}\n aria-label=\"${ifDefined(ariaLabel)}\"\n tabindex=\"${ifDefined(index)}\"\n data-delegate=\"${ifDefined(delegateFocus ? true : undefined)}\"\n data-row=\"${row}\"\n data-col=\"${col}\"\n scope=\"row\"\n part=\"cell\"\n >\n ${ring}\n <div class=\"cell-content\">${content}</div>\n </th>\n `\n }\n return html`\n <td\n role=\"gridcell\"\n class=\"${classMap(cellClasses)}\"\n ${dataAttr(data)}\n aria-label=\"${ifDefined(ariaLabel)}\"\n tabindex=\"${ifDefined(index)}\"\n data-delegate=\"${ifDefined(delegateFocus ? true : undefined)}\"\n data-row=\"${row}\"\n data-col=\"${col}\"\n part=\"cell\"\n >\n ${ring}\n <div class=\"cell-content\">${content}</div>\n </td>\n `\n }\n\n /**\n * @internal\n * @description Returns the name of the icon to use for sorting indication.\n *\n * @returns The name of the Material Icon to use (either \"arrow_upward\" or \"arrow_downward\").\n */\n get sortIconName(): string {\n return this.sortDirection === 'asc' ? 'arrow_upward' : 'arrow_downward'\n }\n\n /**\n * @internal\n * A helper method to render a table header cell.\n *\n * @param content The content of the header cell.\n * @param opts Options for rendering the header cell (classes, data attributes).\n * @returns A `TemplateResult` representing the rendered header cell.\n */\n protected renderHeaderCell(content: unknown, col: number, opts: HeaderCellRenderOptions = {}): TemplateResult {\n const { position } = this\n const { data = {}, classes = [], sort, delegateFocus = false, ariaLabel } = opts\n const cellClasses: Record<string, boolean> = { 'grid-header': true }\n classes?.forEach((c) => (cellClasses[c] = true))\n const isSortable = !!sort\n const isSorted = this.sort === sort\n const sortIcon = isSorted ? this.sortIconName : undefined\n const isFocused = position?.col === col && position?.row === 0\n let index: number | undefined\n if (!delegateFocus) {\n index = isFocused ? 0 : -1\n }\n let ariaSort: 'ascending' | 'descending' | 'none' | undefined\n if (isSorted) {\n ariaSort = this.sortDirection === 'asc' ? 'ascending' : 'descending'\n } else if (isSortable) {\n ariaSort = 'none'\n }\n return html`<th\n role=\"columnheader\"\n scope=\"col\"\n class=\"${classMap(cellClasses)}\"\n ${dataAttr(data)}\n aria-sort=\"${ifDefined(ariaSort)}\"\n data-sort=\"${ifDefined(sort)}\"\n data-row=\"0\"\n data-col=\"${col}\"\n tabindex=\"${ifDefined(index)}\"\n data-delegate=\"${ifDefined(delegateFocus ? true : undefined)}\"\n aria-label=\"${ifDefined(ariaLabel)}\"\n part=\"header-cell\"\n >\n <ui-focus-ring .inward=\"${this.overflow ? true : false}\"></ui-focus-ring>\n <div class=\"cell-content\">\n ${content}\n ${isSortable && sortIcon ? html`<ui-icon class=\"sort-icon\" role=\"presentation\">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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAC5B,CAAC;YACD,IAAI,QAAyD,CAAA;YAC7D,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,GAAG,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAA;YACtE,CAAC;iBAAM,IAAI,UAAU,EAAE,CAAC;gBACtB,QAAQ,GAAG,MAAM,CAAA;YACnB,CAAC;YACD,OAAO,IAAI,CAAA;;;eAGA,QAAQ,CAAC,WAAW,CAAC;QAC5B,QAAQ,CAAC,IAAI,CAAC;mBACH,SAAS,CAAC,QAAQ,CAAC;mBACnB,SAAS,CAAC,IAAI,CAAC;;kBAEhB,GAAG;kBACH,SAAS,CAAC,KAAK,CAAC;uBACX,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC9C,SAAS,CAAC,SAAS,CAAC;cAC1B,IAAI,CAAC,IAAI,IAAI,aAAa;;gCAER,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;;UAElD,OAAO;UACP,UAAU,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,kDAAkD,QAAQ,YAAY,CAAC,CAAC,CAAC,OAAO;;WAE5G,CAAA;QACT,CAAC;;;SA/0BmB,SAAS","sourcesContent":["/* eslint-disable max-len */\nimport { html, LitElement, nothing, PropertyValues, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ref, createRef } from 'lit/directives/ref.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { dataAttr } from '../../directives/data-attr.js'\nimport { LiveData } from '../../reactive/LiveData.js'\n\nimport '../../md/focus-ring/ui-focus-ring.js'\nimport '../../md/icons/ui-icon.js'\n\n/**\n * Options for rendering a table cell.\n */\nexport interface CellRenderOptions {\n /**\n * CSS classes to apply to the cell.\n */\n classes?: string[]\n /**\n * Data attributes to add to the cell (e.g., `data-id=\"my-id\"`).\n */\n data?: Record<string, string | number | boolean>\n /**\n * The value of the aria-label to render on the cell.\n */\n ariaLabel?: string\n /**\n * Used with interactive elements within the cell.\n * The content of the cell should have exactly one element\n * with the `tabindex=-1`. The table will automatically\n * focus on that element when activated.\n */\n delegateFocus?: boolean\n /**\n * Used for accessibility. Should be set on the cell that represents\n * the name for the row, like, a person name or a file name.\n */\n isPrimary?: boolean\n /**\n * The part name to use for the cell.\n */\n part?: string\n}\n\n/**\n * Options for rendering a table header cell. Extends CellRenderOptions.\n */\nexport interface HeaderCellRenderOptions extends CellRenderOptions {\n /**\n * The name of the sort property.\n */\n sort?: string\n}\n\nexport interface CellPosition {\n /**\n * The index of the selected row\n */\n row: number\n /**\n * The index of the selected cell\n */\n col: number\n\n /**\n * Whether the logic should ignore setting up focus.\n * This is used when tracking cell selection when using a pointer device.\n */\n ignoreFocus?: boolean\n}\n\nexport interface EventCellInfo {\n /**\n * The cell element.\n */\n cell: HTMLElement\n /**\n * The column index\n */\n col: number\n /**\n * The **table** row index (not items)\n */\n row: number\n}\n\n/**\n * Details for the `sort` event dispatched by the DataTable component.\n */\nexport interface DataTableSortEventDetail {\n /**\n * The name of the column being sorted.\n */\n column: string\n /**\n * The sort direction, either \"asc\" (ascending) or \"desc\" (descending).\n */\n direction: 'asc' | 'desc'\n}\n\n/**\n * A versatile and accessible data table web component.\n *\n * The `DataTable` component provides a highly customizable and accessible way to display tabular data.\n * It offers features such as:\n *\n * - **Accessibility:** Built with ARIA roles and attributes for screen reader compatibility and keyboard navigation.\n * - **Customizable Cells:** Allows complete control over the content and rendering of each cell in the table.\n * - **Header Customization:** Provides flexibility in defining and rendering table headers, including sorting.\n * - **Selection:** Supports single, multiple, or no selection of rows.\n * - **Activation:** Enables the activation of rows (e.g., via double-click or Enter/Space key).\n * - **Infinite Scrolling:** Supports \"load more\" functionality (infinite scroll) using a sentinel element.\n * - **Sorting:** Allows sorting of data by clicking on sortable header cells.\n * - **Keyboard Navigation:** Full keyboard support for navigating through the table.\n * - **Empty State:** Customizable content to display when the table has no data.\n * - **Focus Management:** Properly manages focus for both keyboard and pointer interactions.\n *\n * @slot empty - Optional. Content to display when the table is empty (i.e., `items` is an empty array).\n * Defaults to a message saying \"No data to display.\"\n *\n * @fires select - Dispatched when the selection changes.\n * - `detail`: An object with a `selectedItems` property, containing an array of the currently selected items.\n * - Example: `{ selectedItems: [item1, item2] }`\n *\n * @fires activate - Dispatched when a row is activated (e.g., double-clicked or Enter/Space pressed).\n * - `detail`: The data item that was activated.\n * - Example: `item1`\n *\n * @fires scrollend - Dispatched when the user scrolls to the bottom of the table (when the `overflow` property is true).\n * - No event detail.\n *\n * @fires sort - Dispatched when the user clicks on a sortable header to change the sorting.\n * - `detail`: An object with `column` and `direction` properties.\n * - `column`: The name of the column being sorted.\n * - `direction`: The sort direction, either \"asc\" (ascending) or \"desc\" (descending).\n * - Example: `{ column: \"name\", direction: \"asc\" }`\n *\n * @csspart table - The underlying `<table>` element.\n * @csspart cell - Individual `<td>` and `<th>` elements.\n * @csspart header-cell - Individual `<th>` elements.\n *\n * @cssprop --md-focus-ring-shape-start-start - The start-start corner shape for the focus ring.\n * @cssprop --md-focus-ring-shape-start-end - The start-end corner shape for the focus ring.\n * @cssprop --md-focus-ring-shape-end-end - The end-end corner shape for the focus ring.\n * @cssprop --md-focus-ring-shape-end-start - The end-start corner shape for the focus ring.\n * @cssprop --md-sys-typescale-label-large-font - The font family for label large.\n * @cssprop --md-sys-typescale-label-large-size - The font size for label large.\n * @cssprop --md-sys-typescale-label-large-tracking - The letter spacing for label large.\n * @cssprop --md-sys-typescale-label-large-height - The line height for label large.\n * @cssprop --md-sys-typescale-label-large-weight - The font weight for label large.\n * @cssprop --md-sys-color-outline-variant - The outline variant color.\n * @cssprop --md-sys-color-secondary-container - The secondary container color.\n * @cssprop --md-icon-size - The size of the icons.\n * @cssprop --md-sys-typescale-title-small-font - The font family for title small.\n * @cssprop --md-sys-typescale-title-small-weight - The font weight for title small.\n * @cssprop --md-sys-typescale-title-small-size - The font size for title small.\n * @cssprop --md-sys-typescale-title-small-tracking - The letter spacing for title small.\n * @cssprop --md-sys-typescale-title-small-height - The line height for title small.\n * @cssprop --md-sys-typescale-body-medium-font - The font family for body medium.\n * @cssprop --md-sys-typescale-body-medium-weight - The font weight for body medium.\n * @cssprop --md-sys-typescale-body-medium-size - The font size for body medium.\n * @cssprop --md-sys-typescale-body-medium-tracking - The letter spacing for body medium.\n * @cssprop --md-sys-typescale-body-medium-height - The line height for body medium.\n *\n * @typeParam T The type of data items in the table.\n *\n * @example\n * ```html\n * <data-table\n * .items=\"${myItems}\"\n * selection=\"multi\"\n * @select=\"${handleSelect}\"\n * @activate=\"${handleActivate}\"\n * @scrollend=\"${handleScrollEnd}\"\n * @sort=\"${handleSort}\"\n * overflow\n * >\n * <p slot=\"empty\">No items to display at this time.</p>\n * </data-table>\n * ```\n *\n * @example\n * ```typescript\n * // Inside a subclass of DataTable.\n * // Rendering a name cell.\n * #nameCell(item: MyItem, row: number, col: number): TemplateResult {\n * return this.renderCell(item.name, row, col, { isPrimary: true });\n * }\n *\n * // Rendering a header cell.\n * override renderHeader(): TemplateResult[] {\n * return [\n * this.renderHeaderCell('Name', 0, { sort: 'name' }),\n * this.renderHeaderCell('Value', 1, { sort: 'value' }),\n * ];\n * }\n * ```\n */\nexport abstract class DataTable<T extends object> extends LitElement {\n /**\n * The data items to display in the table.\n */\n @property({ type: Object }) accessor items: LiveData<T[]> | undefined\n\n /**\n * The selection mode. Can be \"none\", \"single\", or \"multi\".\n * - `none`: No selection is allowed.\n * - `single`: Only one item can be selected at a time.\n * - `multi`: Multiple items can be selected.\n * @attribute\n * @default \"none\"\n */\n @property({ type: String, reflect: true }) accessor selection: 'none' | 'single' | 'multi' = 'none'\n\n /**\n * The currently selected items.\n * @default []\n */\n @property({ type: Array }) accessor selectedItems: T[] = []\n\n /**\n * The ARIA label for the table. Used for accessibility.\n * @attribute\n * @default \"Data table\"\n */\n @property({ type: String, reflect: true }) override accessor ariaLabel = 'Data table'\n\n /**\n * Enables double-click and Enter/Space key activation of table items.\n * When `true`, items can be activated by:\n * - Double-clicking the item.\n * - Focusing on the item and pressing Enter or Space.\n * The `activate` event is dispatched when an item is activated.\n * @attribute\n * @default false\n */\n @property({ type: Boolean }) accessor active = false\n\n /**\n * Enables the \"load more\" functionality when the user scrolls to the bottom of the table.\n * When `true`, a sentinel element is added to the bottom of the table. When the sentinel\n * becomes visible, the `scrollend` event is dispatched.\n * This is commonly used for infinite scrolling or lazy loading of data.\n * @attribute\n * @default false\n */\n @property({ type: Boolean, reflect: true }) accessor overflow = false\n\n /**\n * The name of the property to sort the table by. If set, the table will\n * automatically indicate the sortable header.\n * @attribute\n * @default undefined\n */\n @property({ type: String }) accessor sort: string | undefined\n\n /**\n * The direction of the sort. Can be \"asc\" (ascending) or \"desc\" (descending).\n * If `sort` is set, this property will be used to determine the sort direction.\n * @attribute\n * @default undefined\n */\n @property({ type: String }) accessor sortDirection: 'asc' | 'desc' | undefined\n\n protected lastSelectedIndex = -1\n\n protected observer?: IntersectionObserver\n\n protected sentinel = createRef<HTMLElement>()\n\n /**\n * The current focus position.\n * It is used to support keyboard navigation.\n *\n * Initially we always allow to focus on the first cell, which\n * should be the first header cell. The keyboard navigation will\n * take over.\n */\n @state() accessor position: CellPosition = { row: 0, col: 0 }\n\n constructor() {\n super()\n this.handleLiveData = this.handleLiveData.bind(this)\n }\n\n override connectedCallback(): void {\n super.connectedCallback()\n if (this.overflow) {\n // Only create the observer if overflow is enabled\n this.createObserver()\n }\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback()\n this.observer?.disconnect()\n this.observer = undefined\n }\n\n override firstUpdated(): void {\n if (this.overflow) {\n this.createObserver()\n }\n }\n\n protected override willUpdate(cp: PropertyValues<this>): void {\n if (cp.has('items')) {\n this.lastSelectedIndex = -1\n this.revalidateSelection()\n }\n }\n\n protected override updated(cp: PropertyValues<this>): void {\n if (cp.has('position')) {\n const { row, col, ignoreFocus = false } = this.position\n if (!ignoreFocus) {\n const cell = this.shadowRoot?.querySelector(`[data-row=\"${row}\"][data-col=\"${col}\"]`) as HTMLElement | null\n if (cell) {\n cell.focus()\n }\n }\n }\n if (cp.has('items')) {\n const old = cp.get('items')\n if (old) {\n old.removeEventListener('update', this.handleLiveData)\n }\n if (this.items) {\n this.items.addEventListener('update', this.handleLiveData)\n }\n }\n }\n\n handleLiveData(): void {\n this.requestUpdate()\n }\n\n /**\n * @internal\n * @description Creates and configures an `IntersectionObserver` to detect when the sentinel element is visible,\n * indicating the user has scrolled to the bottom of the table.\n *\n * This method sets up the observer to watch the sentinel element. When the sentinel intersects with the component's viewport,\n * it triggers the `scrollend` event.\n *\n * This function is used when `overflow` is set to true.\n *\n * @returns void\n */\n protected createObserver(): void {\n const { sentinel } = this\n if (!sentinel.value) {\n return\n }\n\n const options: IntersectionObserverInit = {\n root: this, // Observe within the component's viewport\n rootMargin: '0px', // No margin\n threshold: 0.0, // Trigger when the sentinel is 0% visible (at the very bottom)\n }\n\n this.observer = new IntersectionObserver(this.handleIntersection, options)\n this.observer.observe(sentinel.value) // Observe the sentinel.\n }\n\n protected revalidateSelection(): void {\n const { items, selectedItems = [] } = this\n if (!items || selectedItems.length === 0) {\n return\n }\n const filteredSelectedItems = selectedItems.filter((selectedItem) =>\n items.value.some((item) => item === selectedItem)\n )\n if (filteredSelectedItems.length !== selectedItems.length) {\n this.selectedItems = filteredSelectedItems\n this.notifySelect(filteredSelectedItems)\n }\n }\n\n /**\n * Notifies about the selection change.\n *\n * This method dispatches a `select` event with the currently selected items.\n *\n * @param selectedItems - The array of currently selected items.\n */\n protected notifySelect(selectedItems: T[]): void {\n this.dispatchEvent(new CustomEvent('select', { detail: { selectedItems } }))\n }\n\n /**\n * Notifies about the scroll end event.\n *\n * This method dispatches a `scrollend` event when the user scrolls to the bottom of the table.\n * It is typically used in conjunction with the `overflow` property to implement infinite scrolling.\n */\n protected notifyScrollEnd(): void {\n this.dispatchEvent(new CustomEvent('scrollend'))\n }\n\n /**\n * Notifies about the activation of a row.\n *\n * This method dispatches an `activate` event with the activated item.\n * It is typically used when a row is double-clicked or when the Enter/Space key is pressed while focused on a row.\n *\n * @param item - The data item that was activated.\n */\n protected notifyActivate(item: T): void {\n this.dispatchEvent(new CustomEvent('activate', { detail: item }))\n }\n\n /**\n * Notifies about the sorting action.\n *\n * This method dispatches a `sort` event with the column name and sort direction.\n * It is typically used when a sortable header cell is clicked.\n *\n * @param column - The name of the column being sorted.\n * @param direction - The sort direction, either \"asc\" (ascending) or \"desc\" (descending).\n */\n protected notifySort(column: string, direction: 'asc' | 'desc'): void {\n this.dispatchEvent(\n new CustomEvent<DataTableSortEventDetail>('sort', {\n detail: {\n column,\n direction,\n },\n })\n )\n }\n\n /**\n * @internal\n * @description Handles the intersection of the sentinel element with the viewport.\n *\n * This method is the callback function for the `IntersectionObserver`. When the sentinel becomes visible,\n * it dispatches the `scrollend` event to signal that the user has reached the bottom of the table.\n *\n * @param entries - An array of IntersectionObserverEntry objects.\n * @returns void\n */\n handleIntersection: IntersectionObserverCallback = (entries): void => {\n if (entries.some((entry) => entry.isIntersecting)) {\n this.notifyScrollEnd()\n }\n }\n\n /**\n * @internal\n * @description Extracts information about a cell from an event.\n *\n * This method analyzes the event's composed path to identify the clicked or focused cell (either `<td>` or `<th>`).\n * It returns the cell element, its column index, and its row index.\n * It is also capable of detecting if the user focused on an interactive element within a cell.\n *\n * @param e - The event object (typically a MouseEvent or KeyboardEvent).\n * @returns An object containing the cell element, column index, and row index, or `undefined` if the target is not a cell.\n */\n protected infoFromEvent(e: Event): EventCellInfo | undefined {\n const path = e.composedPath()\n let cell: HTMLElement | undefined\n for (const current of path.values()) {\n const element = current as Element\n if (element.nodeType !== Node.ELEMENT_NODE) {\n continue\n }\n const isTarget = ['TD', 'TH'].includes(element.nodeName)\n // @TODO: This creates a focus trap and should be investigated.\n if (!isTarget && element.hasAttribute('tabindex')) {\n // It means that the user focusing on an interactive element\n // within a cell and we should abandon whatever we do right now.\n return\n }\n if (isTarget) {\n cell = element as HTMLElement\n break\n }\n }\n if (!cell) {\n return\n }\n const col = Number(cell.dataset.col)\n const row = Number(cell.dataset.row)\n if (isNaN(col) || isNaN(row)) {\n return\n }\n return { cell, col, row }\n }\n\n /**\n * @internal\n * @description Gets the number of columns and rows of the table.\n *\n * @returns An object with `cols` and `rows` properties indicating the number of columns and rows.\n */\n protected getSize(): { cols: number; rows: number } {\n const result = { cols: 0, rows: 0 }\n const table = this.shadowRoot?.querySelector('table')\n if (!table) {\n return result\n }\n const row = table.querySelector('tr')\n if (!row) {\n return result\n }\n const columns = row.querySelectorAll('th, td')\n result.cols = columns.length ? columns.length - 1 : 0\n const rows = table.rows\n result.rows = rows.length ? rows.length - 1 : 0\n return result\n }\n\n /**\n * @internal\n * @description Get the element containing the cell data.\n *\n * @param col - The column index of the cell.\n * @param row - The row index of the cell.\n * @returns An object with the cell element and `delegateFocus` flag, or `undefined` if the cell does not exist.\n */\n protected getCellInfo(col: number, row: number): { cell: HTMLElement; delegateFocus: boolean } | undefined {\n const cell = this.shadowRoot?.querySelector(`[data-col=\"${col}\"][data-row=\"${row}\"]`) as HTMLElement | null\n if (!cell) {\n return\n }\n const delegateFocus = cell.dataset.delegate === 'true'\n return { cell, delegateFocus }\n }\n\n /**\n * @internal\n * @description Delegates the focus to a specific interactive element within a cell.\n *\n * This method is used when the cell is configured to handle its own focus management (i.e., `delegateFocus` is `true`).\n *\n * @param parent - The parent element (the cell) containing the interactive element.\n * @returns void\n */\n protected delegateFocus(parent: HTMLElement): void {\n const delegate = parent.querySelector('[tabindex]') as HTMLElement | null\n if (delegate) {\n delegate.focus()\n }\n }\n\n /**\n * @internal\n * @description Moves the focus to the specified cell.\n *\n * This method updates the component's internal `position` state and then focuses on the corresponding cell.\n * If the cell has the `delegateFocus` property, it delegates the focus to the first interactive element inside of the cell.\n *\n * @param col - The column index of the cell to focus on.\n * @param row - The row index of the cell to focus on.\n * @returns void\n */\n protected moveFocusTo(col: number, row: number): void {\n const cell = this.getCellInfo(col, row)\n if (!cell) {\n return\n }\n this.position = { row, col }\n if (cell.delegateFocus) {\n this.position.ignoreFocus = true\n this.delegateFocus(cell.cell)\n }\n }\n\n /**\n * @internal\n * @description Handles keyboard navigation within the table.\n *\n * This method processes keyboard events to move the focus between cells. It supports arrow keys, Page Up/Down, Home/End, Enter and Space.\n * - ArrowRight: Moves focus to the next cell to the right.\n * - ArrowLeft: Moves focus to the next cell to the left.\n * - ArrowDown: Moves focus to the cell below.\n * - ArrowUp: Moves focus to the cell above.\n * - PageUp: Moves focus to the first row.\n * - PageDown: Moves focus to the last row.\n * - Home: Moves focus to the first cell of the current row (Ctrl+Home moves to the first cell of the first row).\n * - End: Moves focus to the last cell of the current row (Ctrl+End moves to the last cell of the last row).\n * - Enter: Activates the current row.\n * - Space: Manages selection.\n *\n * @param e - The KeyboardEvent object.\n * @returns void\n */\n protected handleKeyDown(e: KeyboardEvent) {\n if (e.defaultPrevented) {\n return\n }\n const info = this.infoFromEvent(e)\n if (!info) {\n // This also makes sure that when we are focusing on an element\n // within a `delegateFocus` cell, we won't interfere with its events.\n return\n }\n const { code } = e\n const { position } = this\n const size = this.getSize()\n if (code === 'ArrowRight') {\n e.preventDefault()\n if (position.col < size.cols) {\n this.moveFocusTo(position.col + 1, position.row)\n }\n } else if (code === 'ArrowLeft') {\n e.preventDefault()\n if (position.col > 0) {\n this.moveFocusTo(position.col - 1, position.row)\n }\n } else if (code === 'ArrowDown') {\n e.preventDefault()\n if (position.row < size.rows) {\n this.moveFocusTo(position.col, position.row + 1)\n }\n } else if (code === 'ArrowUp') {\n e.preventDefault()\n if (position.row > 0) {\n this.moveFocusTo(position.col, position.row - 1)\n }\n } else if (code === 'PageUp') {\n e.preventDefault()\n if (position.row > 1) {\n this.moveFocusTo(position.col, 1)\n }\n } else if (code === 'PageDown') {\n e.preventDefault()\n if (position.row < size.rows) {\n this.moveFocusTo(position.col, size.rows)\n }\n } else if (code === 'Home') {\n e.preventDefault()\n if (!e.ctrlKey && position.col > 0) {\n this.moveFocusTo(0, position.row)\n } else if (e.ctrlKey && (position.row > 1 || position.col > 0)) {\n this.moveFocusTo(0, 1)\n }\n } else if (code === 'End') {\n e.preventDefault()\n if (!e.ctrlKey && position.col < size.cols) {\n this.moveFocusTo(size.cols, position.row)\n } else if (e.ctrlKey && position.row < size.rows) {\n this.moveFocusTo(size.cols, size.rows)\n }\n } else if (code === 'Enter') {\n e.preventDefault()\n this.activateFromCellInfo(info)\n } else if (code === 'Space') {\n e.preventDefault()\n this.manageSelectionFromEvent(info, e)\n }\n }\n\n /**\n * @internal\n * @description Handles mouse click events on the table.\n *\n * @param e - The MouseEvent object.\n * @returns void\n */\n protected handleClick(e: MouseEvent): void {\n if (e.detail === 3) {\n return\n }\n const info = this.infoFromEvent(e)\n if (!info) {\n return\n }\n if (e.detail === 2) {\n this.activateFromCellInfo(info)\n } else {\n this.manageSelectionFromEvent(info, e)\n }\n }\n\n /**\n * @internal\n * @description Manages the selection state based on a mouse or keyboard event.\n *\n * This method determines the row and column from the event target and updates the `selectedItems` array accordingly.\n * It supports single, multiple and no selection based on the `selection` property. It also supports shift-click.\n *\n * @param info - The cell info.\n * @param e - The MouseEvent or KeyboardEvent object.\n * @returns void\n */\n protected manageSelectionFromEvent(info: EventCellInfo, e: MouseEvent | KeyboardEvent): void {\n if (!this.items) {\n return\n }\n const { row, col } = info\n const index = row - 1\n if (info.row === 0) {\n // Handle sort.\n this.sortFrom(info.cell)\n this.position = { row, col }\n return\n }\n const item = this.items.value[index]\n if (!item) {\n return\n }\n\n const isMultiSelect = this.selection === 'multi'\n if (isMultiSelect && (e.metaKey || e.ctrlKey)) {\n this.toggleSelection(item, 'add')\n } else if (isMultiSelect && e.shiftKey) {\n this.handleShiftClick(index, item)\n } else {\n this.toggleSelection(item, 'replace')\n this.lastSelectedIndex = index\n }\n // This won't cause the focus ring to be rendered because the cell\n // won't have the `tabindex=0`, which is OK with pointer device navigation,\n // but it will keep track of the last cell in case the keyboard navigation starts.\n this.position = { row, col }\n }\n\n /**\n * @internal\n * @description Handles shift-click for range selection.\n *\n * When shift-clicking a row, it will select all the items between the last selected item and the clicked item.\n *\n * @param clickedIndex - The index of the clicked item.\n * @param item - The clicked item.\n * @returns void\n */\n protected handleShiftClick(clickedIndex: number, item: T) {\n if (!this.items) {\n return\n }\n if (this.lastSelectedIndex === -1) {\n // If no previous selection, just select the clicked item.\n this.toggleSelection(item)\n this.lastSelectedIndex = clickedIndex\n return\n }\n const startIndex = Math.min(this.lastSelectedIndex, clickedIndex)\n const endIndex = Math.max(this.lastSelectedIndex, clickedIndex)\n const newSelectedItems = this.items.value.slice(startIndex, endIndex + 1)\n this.selectedItems = newSelectedItems as T[]\n this.notifySelect(newSelectedItems)\n }\n\n /**\n * @internal\n * @description Activates the row associated with the given event.\n *\n * This method is called when a row is double-clicked or when the Enter/Space key is pressed while a row is focused.\n *\n * @param e - The Event object.\n * @returns void\n */\n protected activateFromCellInfo(info: EventCellInfo): void {\n if (!this.items) {\n return\n }\n if (info.row === 0) {\n // Handle sort.\n this.sortFrom(info.cell)\n return\n }\n const item = this.items.value[info.row - 1]\n if (!item) {\n return\n }\n this.notifyActivate(item)\n }\n\n /**\n * @internal\n * @description Handles sorting logic based on the clicked column header.\n *\n * This method updates the `sort` and `sortDirection` properties and dispatches the `sort` event.\n *\n * @param column - The header cell element.\n * @returns void\n */\n protected sortFrom(column: HTMLElement): void {\n const sort = column.dataset.sort\n if (!sort) {\n return\n }\n if (this.sort === sort) {\n this.sortDirection = this.sortDirection === 'asc' ? 'desc' : 'asc'\n } else {\n this.sort = sort\n this.sortDirection = 'asc'\n }\n this.notifySort(this.sort, this.sortDirection)\n }\n\n /**\n * @public\n * @description Checks if an item is currently selected.\n *\n * @param item - The item to check.\n * @returns `true` if the item is selected, `false` otherwise.\n */\n isSelected(item: T): boolean {\n return this.selectedItems.includes(item)\n }\n\n /**\n * @public\n * @description Toggles the selection state of an item.\n *\n * This method adds or removes an item from the `selectedItems` array.\n *\n * @param item - The item to toggle selection for.\n * @param mode - The selection mode, either 'replace' or 'add' (defaults to 'replace').\n * @returns void\n */\n toggleSelection(item: T, mode: 'replace' | 'add' = 'replace') {\n if (this.selection === 'none') {\n return\n }\n\n if (this.selection === 'single') {\n this.selectedItems = [item]\n } else {\n // multi-select\n const index = this.selectedItems.indexOf(item)\n if (mode === 'replace') {\n this.selectedItems = [item]\n } else if (index === -1) {\n this.selectedItems = [...this.selectedItems, item]\n } else {\n this.selectedItems = this.selectedItems.filter((i) => i !== item)\n }\n }\n\n this.notifySelect(this.selectedItems)\n }\n\n /**\n * @internal\n * @description Renders the table.\n *\n * @returns A `TemplateResult` for rendering.\n */\n override render(): TemplateResult {\n if (!this.items || !this.items.value.length) {\n return this.renderEmpty()\n }\n const isMulti = this.selection === 'multi'\n return html`\n <table\n part=\"table\"\n role=\"grid\"\n aria-multiselectable=\"${ifDefined(isMulti ? 'true' : undefined)}\"\n aria-label=\"${this.ariaLabel}\"\n @keydown=\"${this.handleKeyDown}\"\n @click=\"${this.handleClick}\"\n >\n <thead>\n <tr role=\"row\">\n ${this.renderHeader()}\n </tr>\n </thead>\n <tbody>\n ${this.items.value.map((item, index) => this.renderRow(item, index))}\n </tbody>\n </table>\n ${this.overflow ? html`<div class=\"scroll-sentinel\" ${ref(this.sentinel)}></div>` : nothing}\n `\n }\n\n /**\n * @internal\n * @description Renders the empty state of the table.\n *\n * @returns A `TemplateResult` for rendering.\n */\n renderEmpty(): TemplateResult {\n return html`\n <slot name=\"empty\">\n <p role=\"status\" class=\"empty\">No data to display.</p>\n </slot>\n `\n }\n\n /**\n * @internal\n * @description Renders the table header cells. Must be implemented by subclasses.\n *\n * @returns An array of `TemplateResult` objects representing the header cells.\n */\n abstract renderHeader(): TemplateResult[]\n\n /**\n * @internal\n * @description Renders the cells for a given row item. Must be implemented by subclasses.\n *\n * @param item The data item for the row.\n * @param index The index that should be passed back to the rendering function. This is not the item index.\n * @returns An array of `TemplateResult` objects representing the cells for the row.\n */\n abstract renderRowValues(item: T, index: number): TemplateResult[]\n\n /**\n * @internal\n * @description Renders a single row in the table.\n *\n * @param item - The data item for the row.\n * @param index - The index of the row.\n * @returns A `TemplateResult` for rendering.\n */\n protected renderRow(item: T, index: number): TemplateResult {\n const rowClasses = {\n selected: this.isSelected(item as T),\n }\n\n return html`\n <tr\n role=\"row\"\n aria-selected=\"${this.isSelected(item as T) ? 'true' : 'false'}\"\n data-index=\"${index}\"\n class=\"${classMap(rowClasses)}\"\n >\n ${this.renderRowValues(item, index + 1)}\n </tr>\n `\n }\n\n /**\n * @internal\n * A helper method to render a standard table cell.\n *\n * @param content The content of the cell.\n * @param row The 0-based row index of the rendered cell\n * @param col The 0-based column index of the rendered cell\n * @param opts Options for rendering the cell (classes, icon, data attributes).\n * @returns A `TemplateResult` representing the rendered cell.\n */\n protected renderCell(content: unknown, row: number, col: number, opts: CellRenderOptions = {}): TemplateResult {\n const { position } = this\n const { data = {}, classes = [], ariaLabel, delegateFocus = false, isPrimary = false } = opts\n const cellClasses: Record<string, boolean> = { 'grid-cell': true }\n classes?.forEach((c) => (cellClasses[c] = true))\n const isFocused = position?.col === col && position?.row === row\n let index: number | undefined\n if (!delegateFocus) {\n index = isFocused ? 0 : -1\n }\n const ring = !delegateFocus\n ? html`<ui-focus-ring .inward=\"${this.overflow ? true : false}\"></ui-focus-ring>`\n : nothing\n if (isPrimary) {\n // Lit does not allow dynamic element names so I decided to make a copy.\n return html`\n <th\n role=\"gridcell\"\n class=\"${classMap(cellClasses)}\"\n ${dataAttr(data)}\n aria-label=\"${ifDefined(ariaLabel)}\"\n tabindex=\"${ifDefined(index)}\"\n data-delegate=\"${ifDefined(delegateFocus ? true : undefined)}\"\n data-row=\"${row}\"\n data-col=\"${col}\"\n scope=\"row\"\n part=\"${opts.part ?? 'cell'}\"\n >\n ${ring}\n <div class=\"cell-content\">${content}</div>\n </th>\n `\n }\n return html`\n <td\n role=\"gridcell\"\n class=\"${classMap(cellClasses)}\"\n ${dataAttr(data)}\n aria-label=\"${ifDefined(ariaLabel)}\"\n tabindex=\"${ifDefined(index)}\"\n data-delegate=\"${ifDefined(delegateFocus ? true : undefined)}\"\n data-row=\"${row}\"\n data-col=\"${col}\"\n part=\"${opts.part ?? 'cell'}\"\n >\n ${ring}\n <div class=\"cell-content\">${content}</div>\n </td>\n `\n }\n\n /**\n * @internal\n * @description Returns the name of the icon to use for sorting indication.\n *\n * @returns The name of the Material Icon to use (either \"arrow_upward\" or \"arrow_downward\").\n */\n get sortIconName(): string {\n return this.sortDirection === 'asc' ? 'arrow_upward' : 'arrow_downward'\n }\n\n /**\n * @internal\n * A helper method to render a table header cell.\n *\n * @param content The content of the header cell.\n * @param opts Options for rendering the header cell (classes, data attributes).\n * @returns A `TemplateResult` representing the rendered header cell.\n */\n protected renderHeaderCell(content: unknown, col: number, opts: HeaderCellRenderOptions = {}): TemplateResult {\n const { position } = this\n const { data = {}, classes = [], sort, delegateFocus = false, ariaLabel } = opts\n const cellClasses: Record<string, boolean> = { 'grid-header': true }\n classes?.forEach((c) => (cellClasses[c] = true))\n const isSortable = !!sort\n const isSorted = this.sort === sort\n const sortIcon = isSorted ? this.sortIconName : undefined\n const isFocused = position?.col === col && position?.row === 0\n let index: number | undefined\n if (!delegateFocus) {\n index = isFocused ? 0 : -1\n }\n let ariaSort: 'ascending' | 'descending' | 'none' | undefined\n if (isSorted) {\n ariaSort = this.sortDirection === 'asc' ? 'ascending' : 'descending'\n } else if (isSortable) {\n ariaSort = 'none'\n }\n return html`<th\n role=\"columnheader\"\n scope=\"col\"\n class=\"${classMap(cellClasses)}\"\n ${dataAttr(data)}\n aria-sort=\"${ifDefined(ariaSort)}\"\n data-sort=\"${ifDefined(sort)}\"\n data-row=\"0\"\n data-col=\"${col}\"\n tabindex=\"${ifDefined(index)}\"\n data-delegate=\"${ifDefined(delegateFocus ? true : undefined)}\"\n aria-label=\"${ifDefined(ariaLabel)}\"\n part=\"${opts.part ?? 'header-cell'}\"\n >\n <ui-focus-ring .inward=\"${this.overflow ? true : false}\"></ui-focus-ring>\n <div class=\"cell-content\">\n ${content}\n ${isSortable && sortIcon ? html`<ui-icon class=\"sort-icon\" role=\"presentation\">${sortIcon}</ui-icon>` : nothing}\n </div>\n </th> `\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.styles.d.ts","sourceRoot":"","sources":["../../../../src/elements/data-table/DataTable.styles.ts"],"names":[],"mappings":";AAEA,wBA6FC"}
1
+ {"version":3,"file":"DataTable.styles.d.ts","sourceRoot":"","sources":["../../../../src/elements/data-table/DataTable.styles.ts"],"names":[],"mappings":";AAEA,wBAkGC"}
@@ -29,8 +29,8 @@ export default css `
29
29
  text-align: left;
30
30
  }
31
31
 
32
- th:has(md-focus-ring),
33
- td:has(md-focus-ring) {
32
+ th:has(ui-focus-ring),
33
+ td:has(ui-focus-ring) {
34
34
  position: relative;
35
35
  outline: none;
36
36
  }
@@ -43,6 +43,11 @@ export default css `
43
43
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
44
44
  }
45
45
 
46
+ td,
47
+ th {
48
+ user-select: none;
49
+ }
50
+
46
51
  td:not(.no-padding):not(:first-child):not(:last-child),
47
52
  th:not(.no-padding):not(:first-child):not(:last-child) {
48
53
  padding: 12px;
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.styles.js","sourceRoot":"","sources":["../../../../src/elements/data-table/DataTable.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: block;\n height: 100%;\n }\n\n :host([overflow]) {\n overflow: auto;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n --md-focus-ring-shape-start-start: 0;\n --md-focus-ring-shape-start-end: 0;\n --md-focus-ring-shape-end-end: 0;\n --md-focus-ring-shape-end-start: 0;\n\n color: var(--md-sys-color-on-surface-variant);\n }\n\n th,\n td {\n font-family: var(--md-sys-typescale-label-large-font);\n font-size: var(--md-sys-typescale-label-large-size);\n letter-spacing: var(--md-sys-typescale-label-large-tracking);\n line-height: var(--md-sys-typescale-label-large-height);\n text-align: left;\n }\n\n th:has(md-focus-ring),\n td:has(md-focus-ring) {\n position: relative;\n outline: none;\n }\n\n th {\n font-weight: var(--md-sys-typescale-label-large-weight);\n }\n\n tr {\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n\n td:not(.no-padding):not(:first-child):not(:last-child),\n th:not(.no-padding):not(:first-child):not(:last-child) {\n padding: 12px;\n }\n\n .cell-content {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n :not([data-delegate='true']) > .cell-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n [aria-selected='true'] {\n background-color: var(--md-sys-color-secondary-container);\n }\n\n .sort-icon {\n --md-icon-size: 16px;\n }\n\n .primary-cell {\n font-family: var(--md-sys-typescale-title-small-font);\n font-weight: var(--md-sys-typescale-title-small-weight);\n font-size: var(--md-sys-typescale-title-small-size);\n letter-spacing: var(--md-sys-typescale-title-small-tracking);\n line-height: var(--md-sys-typescale-title-small-height);\n }\n\n .scroll-sentinel {\n display: block;\n width: 100%;\n }\n\n .empty,\n ::slotted(.empty) {\n font-family: var(--md-sys-typescale-body-medium-font);\n font-weight: var(--md-sys-typescale-body-medium-weight);\n font-size: var(--md-sys-typescale-body-medium-size);\n letter-spacing: var(--md-sys-typescale-body-medium-tracking);\n line-height: var(--md-sys-typescale-body-medium-height);\n text-align: center;\n\n color: var(--md-sys-color-on-surface);\n }\n`\n"]}
1
+ {"version":3,"file":"DataTable.styles.js","sourceRoot":"","sources":["../../../../src/elements/data-table/DataTable.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGjB,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport default css`\n :host {\n display: block;\n height: 100%;\n }\n\n :host([overflow]) {\n overflow: auto;\n }\n\n table {\n width: 100%;\n border-collapse: collapse;\n --md-focus-ring-shape-start-start: 0;\n --md-focus-ring-shape-start-end: 0;\n --md-focus-ring-shape-end-end: 0;\n --md-focus-ring-shape-end-start: 0;\n\n color: var(--md-sys-color-on-surface-variant);\n }\n\n th,\n td {\n font-family: var(--md-sys-typescale-label-large-font);\n font-size: var(--md-sys-typescale-label-large-size);\n letter-spacing: var(--md-sys-typescale-label-large-tracking);\n line-height: var(--md-sys-typescale-label-large-height);\n text-align: left;\n }\n\n th:has(ui-focus-ring),\n td:has(ui-focus-ring) {\n position: relative;\n outline: none;\n }\n\n th {\n font-weight: var(--md-sys-typescale-label-large-weight);\n }\n\n tr {\n border-bottom: 1px solid var(--md-sys-color-outline-variant);\n }\n\n td,\n th {\n user-select: none;\n }\n\n td:not(.no-padding):not(:first-child):not(:last-child),\n th:not(.no-padding):not(:first-child):not(:last-child) {\n padding: 12px;\n }\n\n .cell-content {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n :not([data-delegate='true']) > .cell-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n [aria-selected='true'] {\n background-color: var(--md-sys-color-secondary-container);\n }\n\n .sort-icon {\n --md-icon-size: 16px;\n }\n\n .primary-cell {\n font-family: var(--md-sys-typescale-title-small-font);\n font-weight: var(--md-sys-typescale-title-small-weight);\n font-size: var(--md-sys-typescale-title-small-size);\n letter-spacing: var(--md-sys-typescale-title-small-tracking);\n line-height: var(--md-sys-typescale-title-small-height);\n }\n\n .scroll-sentinel {\n display: block;\n width: 100%;\n }\n\n .empty,\n ::slotted(.empty) {\n font-family: var(--md-sys-typescale-body-medium-font);\n font-weight: var(--md-sys-typescale-body-medium-weight);\n font-size: var(--md-sys-typescale-body-medium-size);\n letter-spacing: var(--md-sys-typescale-body-medium-tracking);\n line-height: var(--md-sys-typescale-body-medium-height);\n text-align: center;\n\n color: var(--md-sys-color-on-surface);\n }\n`\n"]}
@@ -0,0 +1,16 @@
1
+ import type { CSSResultOrNative } from 'lit';
2
+ import Element from './internals/DataCatalogTable.js';
3
+ import '../../md/date/ui-date-time.js';
4
+ import '../../md/button/ui-button.js';
5
+ import '../../md/icons/ui-icon.js';
6
+ import '../../md/listbox/ui-listbox.js';
7
+ import '../../md/list/ui-list-item.js';
8
+ export declare class DataCatalogTableElement extends Element {
9
+ static styles: CSSResultOrNative[];
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'data-catalog-table': DataCatalogTableElement;
14
+ }
15
+ }
16
+ //# sourceMappingURL=data-catalog-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-catalog-table.d.ts","sourceRoot":"","sources":["../../../../src/elements/data-table/data-catalog-table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,OAAO,MAAM,iCAAiC,CAAA;AAIrD,OAAO,+BAA+B,CAAA;AACtC,OAAO,8BAA8B,CAAA;AACrC,OAAO,2BAA2B,CAAA;AAClC,OAAO,gCAAgC,CAAA;AACvC,OAAO,+BAA+B,CAAA;AAEtC,qBACa,uBAAwB,SAAQ,OAAO;IAClD,OAAgB,MAAM,EAAE,iBAAiB,EAAE,CAAwB;CACpE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,uBAAuB,CAAA;KAC9C;CACF"}