@iblai/iblai-js 2.67.3 → 2.68.1

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 (400) hide show
  1. package/dist/web-containers/source/account-sheet.js +2 -2
  2. package/dist/web-containers/source/account-sheet.js.map +1 -1
  3. package/dist/web-containers/source/account.js +39 -21
  4. package/dist/web-containers/source/account.js.map +1 -1
  5. package/dist/web-containers/source/api/api-field-label.js +14 -0
  6. package/dist/web-containers/source/api/api-field-label.js.map +1 -0
  7. package/dist/web-containers/source/{profile/integration/api-tab → api}/api-key-modal.js +8 -8
  8. package/dist/web-containers/source/api/api-key-modal.js.map +1 -0
  9. package/dist/web-containers/source/api/api-keys-table.js +61 -0
  10. package/dist/web-containers/source/api/api-keys-table.js.map +1 -0
  11. package/dist/web-containers/source/{api-tab → api}/api-token-utils.js +34 -1
  12. package/dist/web-containers/source/api/api-token-utils.js.map +1 -0
  13. package/dist/web-containers/source/{integration/api-tab → api}/constants.js +0 -1
  14. package/dist/web-containers/source/api/constants.js.map +1 -0
  15. package/dist/web-containers/source/{profile/integration/api-tab → api}/create-api-modal.js +19 -26
  16. package/dist/web-containers/source/api/create-api-modal.js.map +1 -0
  17. package/dist/web-containers/source/api/delete-api-modal.js +31 -0
  18. package/dist/web-containers/source/api/delete-api-modal.js.map +1 -0
  19. package/dist/web-containers/source/{api-tab → api}/edit-api-modal.js +34 -28
  20. package/dist/web-containers/source/api/edit-api-modal.js.map +1 -0
  21. package/dist/web-containers/source/api/expiration-date-field.js +35 -0
  22. package/dist/web-containers/source/api/expiration-date-field.js.map +1 -0
  23. package/dist/web-containers/source/api/index.js +30 -0
  24. package/dist/web-containers/source/api/index.js.map +1 -0
  25. package/dist/web-containers/source/{integration/api-tab → api}/token-policy-fields.js +6 -6
  26. package/dist/web-containers/source/api/token-policy-fields.js.map +1 -0
  27. package/dist/web-containers/source/api-field-label.js +14 -0
  28. package/dist/web-containers/source/api-field-label.js.map +1 -0
  29. package/dist/web-containers/source/api-keys-table.js +61 -0
  30. package/dist/web-containers/source/api-keys-table.js.map +1 -0
  31. package/dist/web-containers/source/api-tab/create-api-modal.js +4 -4
  32. package/dist/web-containers/source/api-tab/labels.js +23 -19
  33. package/dist/web-containers/source/api-tab/labels.js.map +1 -1
  34. package/dist/web-containers/source/api-tab.js +15 -20
  35. package/dist/web-containers/source/api-tab.js.map +1 -1
  36. package/dist/web-containers/source/api-token-utils.js +34 -1
  37. package/dist/web-containers/source/api-token-utils.js.map +1 -1
  38. package/dist/web-containers/source/azure-config.js +37 -0
  39. package/dist/web-containers/source/azure-config.js.map +1 -0
  40. package/dist/web-containers/source/azure-model-fields.js +118 -0
  41. package/dist/web-containers/source/azure-model-fields.js.map +1 -0
  42. package/dist/web-containers/source/claw-sandbox/virtual-machine-network-section.js +147 -24
  43. package/dist/web-containers/source/claw-sandbox/virtual-machine-network-section.js.map +1 -1
  44. package/dist/web-containers/source/components/claw-sandbox/virtual-machine-network-section.js +147 -24
  45. package/dist/web-containers/source/components/claw-sandbox/virtual-machine-network-section.js.map +1 -1
  46. package/dist/web-containers/source/components/document-sidebar.js +5 -4
  47. package/dist/web-containers/source/components/document-sidebar.js.map +1 -1
  48. package/dist/web-containers/source/components/field-info.js +18 -0
  49. package/dist/web-containers/source/components/field-info.js.map +1 -0
  50. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
  51. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
  52. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
  53. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab.js +15 -20
  54. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab.js.map +1 -1
  55. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
  56. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
  57. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
  58. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
  59. package/dist/web-containers/source/components/modals/user-profile-modal.js +4 -4
  60. package/dist/web-containers/source/components/modals/user-profile-modal.js.map +1 -1
  61. package/dist/web-containers/source/components/platform-sidebar/account-sheet.js +2 -2
  62. package/dist/web-containers/source/components/platform-sidebar/account-sheet.js.map +1 -1
  63. package/dist/web-containers/source/components/platform-sidebar/footer.js +15 -14
  64. package/dist/web-containers/source/components/platform-sidebar/footer.js.map +1 -1
  65. package/dist/web-containers/source/components/platform-sidebar/index.js +0 -2
  66. package/dist/web-containers/source/components/platform-sidebar/index.js.map +1 -1
  67. package/dist/web-containers/source/components/profile/account.js +39 -21
  68. package/dist/web-containers/source/components/profile/account.js.map +1 -1
  69. package/dist/web-containers/source/components/profile/api/api-field-label.js +14 -0
  70. package/dist/web-containers/source/components/profile/api/api-field-label.js.map +1 -0
  71. package/dist/web-containers/source/{integration/api-tab → components/profile/api}/api-key-modal.js +8 -8
  72. package/dist/web-containers/source/components/profile/api/api-key-modal.js.map +1 -0
  73. package/dist/web-containers/source/components/profile/api/api-keys-table.js +61 -0
  74. package/dist/web-containers/source/components/profile/api/api-keys-table.js.map +1 -0
  75. package/dist/web-containers/source/{integration/api-tab → components/profile/api}/api-token-utils.js +34 -1
  76. package/dist/web-containers/source/components/profile/api/api-token-utils.js.map +1 -0
  77. package/dist/web-containers/source/components/profile/{integration/api-tab → api}/constants.js +0 -1
  78. package/dist/web-containers/source/components/profile/api/constants.js.map +1 -0
  79. package/dist/web-containers/source/{integration/api-tab → components/profile/api}/create-api-modal.js +19 -26
  80. package/dist/web-containers/source/components/profile/api/create-api-modal.js.map +1 -0
  81. package/dist/web-containers/source/components/profile/api/delete-api-modal.js +31 -0
  82. package/dist/web-containers/source/components/profile/api/delete-api-modal.js.map +1 -0
  83. package/dist/web-containers/source/components/profile/{integration/api-tab → api}/edit-api-modal.js +34 -28
  84. package/dist/web-containers/source/components/profile/api/edit-api-modal.js.map +1 -0
  85. package/dist/web-containers/source/components/profile/api/expiration-date-field.js +35 -0
  86. package/dist/web-containers/source/components/profile/api/expiration-date-field.js.map +1 -0
  87. package/dist/web-containers/source/components/profile/api/index.js +30 -0
  88. package/dist/web-containers/source/components/profile/api/index.js.map +1 -0
  89. package/dist/web-containers/source/{profile/integration/api-tab → components/profile/api}/token-policy-fields.js +6 -6
  90. package/dist/web-containers/source/components/profile/api/token-policy-fields.js.map +1 -0
  91. package/dist/web-containers/source/components/profile/info-banner.js +3 -1
  92. package/dist/web-containers/source/components/profile/info-banner.js.map +1 -1
  93. package/dist/web-containers/source/components/profile/integration/index.js +17 -38
  94. package/dist/web-containers/source/components/profile/integration/index.js.map +1 -1
  95. package/dist/web-containers/source/components/profile/secrets/index.js +106 -0
  96. package/dist/web-containers/source/components/profile/secrets/index.js.map +1 -0
  97. package/dist/web-containers/source/components/profile/secrets/secrets-list.js +237 -0
  98. package/dist/web-containers/source/components/profile/secrets/secrets-list.js.map +1 -0
  99. package/dist/web-containers/source/components/profile/virtual-machine-admin/index.js +12 -18
  100. package/dist/web-containers/source/components/profile/virtual-machine-admin/index.js.map +1 -1
  101. package/dist/web-containers/source/components/profile/virtual-machine-admin/network-policies-section.js +5 -4
  102. package/dist/web-containers/source/components/profile/virtual-machine-admin/network-policies-section.js.map +1 -1
  103. package/dist/web-containers/source/components/tooltip-icon-button.js +15 -0
  104. package/dist/web-containers/source/components/tooltip-icon-button.js.map +1 -0
  105. package/dist/web-containers/source/components/user-profile-dropdown/index.js +2 -0
  106. package/dist/web-containers/source/components/user-profile-dropdown/index.js.map +1 -1
  107. package/dist/web-containers/source/components/virtual-machine/azure-config.js +37 -0
  108. package/dist/web-containers/source/components/virtual-machine/azure-config.js.map +1 -0
  109. package/dist/web-containers/source/components/virtual-machine/azure-model-fields.js +118 -0
  110. package/dist/web-containers/source/components/virtual-machine/azure-model-fields.js.map +1 -0
  111. package/dist/web-containers/source/components/virtual-machine/credential-options.js +268 -22
  112. package/dist/web-containers/source/components/virtual-machine/credential-options.js.map +1 -1
  113. package/dist/web-containers/source/components/virtual-machine/host-port-chip-input.js +14 -8
  114. package/dist/web-containers/source/components/virtual-machine/host-port-chip-input.js.map +1 -1
  115. package/dist/web-containers/source/components/virtual-machine/network-policy-dialog.js +30 -6
  116. package/dist/web-containers/source/components/virtual-machine/network-policy-dialog.js.map +1 -1
  117. package/dist/web-containers/source/components/virtual-machine/secret-rows.js +66 -0
  118. package/dist/web-containers/source/components/virtual-machine/secret-rows.js.map +1 -0
  119. package/dist/web-containers/source/components/virtual-machine/vm-secret-dialog.js +848 -158
  120. package/dist/web-containers/source/components/virtual-machine/vm-secret-dialog.js.map +1 -1
  121. package/dist/web-containers/source/connector-dialogs.js +1 -1
  122. package/dist/web-containers/source/constants.js +55 -22
  123. package/dist/web-containers/source/constants.js.map +1 -1
  124. package/dist/web-containers/source/create-api-modal.js +4 -4
  125. package/dist/web-containers/source/credential-options.js +268 -22
  126. package/dist/web-containers/source/credential-options.js.map +1 -1
  127. package/dist/web-containers/source/document-preview.js +14 -6
  128. package/dist/web-containers/source/document-preview.js.map +1 -1
  129. package/dist/web-containers/source/document-sidebar.js +5 -4
  130. package/dist/web-containers/source/document-sidebar.js.map +1 -1
  131. package/dist/web-containers/source/edit-api-modal.js +34 -28
  132. package/dist/web-containers/source/edit-api-modal.js.map +1 -1
  133. package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
  134. package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
  135. package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
  136. package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab.js +15 -20
  137. package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab.js.map +1 -1
  138. package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
  139. package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
  140. package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
  141. package/dist/web-containers/source/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
  142. package/dist/web-containers/source/en.json.js +279 -227
  143. package/dist/web-containers/source/en.json.js.map +1 -1
  144. package/dist/web-containers/source/es.json.js +450 -398
  145. package/dist/web-containers/source/es.json.js.map +1 -1
  146. package/dist/web-containers/source/expiration-date-field.js +16 -10
  147. package/dist/web-containers/source/expiration-date-field.js.map +1 -1
  148. package/dist/web-containers/source/field-info.js +11 -7
  149. package/dist/web-containers/source/field-info.js.map +1 -1
  150. package/dist/web-containers/source/footer.js +15 -14
  151. package/dist/web-containers/source/footer.js.map +1 -1
  152. package/dist/web-containers/source/fr.json.js +458 -406
  153. package/dist/web-containers/source/fr.json.js.map +1 -1
  154. package/dist/web-containers/source/host-port-chip-input.js +14 -8
  155. package/dist/web-containers/source/host-port-chip-input.js.map +1 -1
  156. package/dist/web-containers/source/i18n/messages/en.json.js +279 -227
  157. package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
  158. package/dist/web-containers/source/i18n/messages/es.json.js +450 -398
  159. package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
  160. package/dist/web-containers/source/i18n/messages/fr.json.js +458 -406
  161. package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
  162. package/dist/web-containers/source/i18n/messages/zh.json.js +457 -405
  163. package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
  164. package/dist/web-containers/source/info-banner.js +3 -1
  165. package/dist/web-containers/source/info-banner.js.map +1 -1
  166. package/dist/web-containers/source/integration/index.js +17 -38
  167. package/dist/web-containers/source/integration/index.js.map +1 -1
  168. package/dist/web-containers/source/lib/document-preview.js +14 -6
  169. package/dist/web-containers/source/lib/document-preview.js.map +1 -1
  170. package/dist/web-containers/source/mcp-tab/connector-dialogs.js +1 -1
  171. package/dist/web-containers/source/mcp-tab/oauth-app-fields.js +2 -2
  172. package/dist/web-containers/source/mcp-tab/oauth-app-fields.js.map +1 -1
  173. package/dist/web-containers/source/messages/en.json.js +279 -227
  174. package/dist/web-containers/source/messages/en.json.js.map +1 -1
  175. package/dist/web-containers/source/messages/es.json.js +450 -398
  176. package/dist/web-containers/source/messages/es.json.js.map +1 -1
  177. package/dist/web-containers/source/messages/fr.json.js +458 -406
  178. package/dist/web-containers/source/messages/fr.json.js.map +1 -1
  179. package/dist/web-containers/source/messages/zh.json.js +457 -405
  180. package/dist/web-containers/source/messages/zh.json.js.map +1 -1
  181. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
  182. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
  183. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
  184. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab.js +15 -20
  185. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab.js.map +1 -1
  186. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
  187. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
  188. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
  189. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
  190. package/dist/web-containers/source/modals/user-profile-modal.js +4 -4
  191. package/dist/web-containers/source/modals/user-profile-modal.js.map +1 -1
  192. package/dist/web-containers/source/network-policies-section.js +5 -4
  193. package/dist/web-containers/source/network-policies-section.js.map +1 -1
  194. package/dist/web-containers/source/network-policy-dialog.js +30 -6
  195. package/dist/web-containers/source/network-policy-dialog.js.map +1 -1
  196. package/dist/web-containers/source/oauth-app-fields.js +2 -2
  197. package/dist/web-containers/source/oauth-app-fields.js.map +1 -1
  198. package/dist/web-containers/source/platform-sidebar/account-sheet.js +2 -2
  199. package/dist/web-containers/source/platform-sidebar/account-sheet.js.map +1 -1
  200. package/dist/web-containers/source/platform-sidebar/footer.js +15 -14
  201. package/dist/web-containers/source/platform-sidebar/footer.js.map +1 -1
  202. package/dist/web-containers/source/platform-sidebar/index.js +0 -2
  203. package/dist/web-containers/source/platform-sidebar/index.js.map +1 -1
  204. package/dist/web-containers/source/profile/account.js +39 -21
  205. package/dist/web-containers/source/profile/account.js.map +1 -1
  206. package/dist/web-containers/source/profile/api/api-field-label.js +14 -0
  207. package/dist/web-containers/source/profile/api/api-field-label.js.map +1 -0
  208. package/dist/web-containers/source/{components/profile/integration/api-tab → profile/api}/api-key-modal.js +8 -8
  209. package/dist/web-containers/source/profile/api/api-key-modal.js.map +1 -0
  210. package/dist/web-containers/source/profile/api/api-keys-table.js +61 -0
  211. package/dist/web-containers/source/profile/api/api-keys-table.js.map +1 -0
  212. package/dist/web-containers/source/profile/{integration/api-tab → api}/api-token-utils.js +34 -1
  213. package/dist/web-containers/source/profile/api/api-token-utils.js.map +1 -0
  214. package/dist/web-containers/source/{api-tab → profile/api}/constants.js +0 -1
  215. package/dist/web-containers/source/profile/api/constants.js.map +1 -0
  216. package/dist/web-containers/source/{components/profile/integration/api-tab → profile/api}/create-api-modal.js +19 -26
  217. package/dist/web-containers/source/profile/api/create-api-modal.js.map +1 -0
  218. package/dist/web-containers/source/profile/api/delete-api-modal.js +31 -0
  219. package/dist/web-containers/source/profile/api/delete-api-modal.js.map +1 -0
  220. package/dist/web-containers/source/{integration/api-tab → profile/api}/edit-api-modal.js +34 -28
  221. package/dist/web-containers/source/profile/api/edit-api-modal.js.map +1 -0
  222. package/dist/web-containers/source/profile/api/expiration-date-field.js +35 -0
  223. package/dist/web-containers/source/profile/api/expiration-date-field.js.map +1 -0
  224. package/dist/web-containers/source/profile/api/index.js +30 -0
  225. package/dist/web-containers/source/profile/api/index.js.map +1 -0
  226. package/dist/web-containers/source/{api-tab → profile/api}/token-policy-fields.js +6 -6
  227. package/dist/web-containers/source/profile/api/token-policy-fields.js.map +1 -0
  228. package/dist/web-containers/source/profile/info-banner.js +3 -1
  229. package/dist/web-containers/source/profile/info-banner.js.map +1 -1
  230. package/dist/web-containers/source/profile/integration/index.js +17 -38
  231. package/dist/web-containers/source/profile/integration/index.js.map +1 -1
  232. package/dist/web-containers/source/profile/secrets/index.js +106 -0
  233. package/dist/web-containers/source/profile/secrets/index.js.map +1 -0
  234. package/dist/web-containers/source/profile/secrets/secrets-list.js +237 -0
  235. package/dist/web-containers/source/profile/secrets/secrets-list.js.map +1 -0
  236. package/dist/web-containers/source/profile/virtual-machine-admin/index.js +12 -18
  237. package/dist/web-containers/source/profile/virtual-machine-admin/index.js.map +1 -1
  238. package/dist/web-containers/source/profile/virtual-machine-admin/network-policies-section.js +5 -4
  239. package/dist/web-containers/source/profile/virtual-machine-admin/network-policies-section.js.map +1 -1
  240. package/dist/web-containers/source/secret-rows.js +66 -0
  241. package/dist/web-containers/source/secret-rows.js.map +1 -0
  242. package/dist/web-containers/source/secrets/index.js +106 -0
  243. package/dist/web-containers/source/secrets/index.js.map +1 -0
  244. package/dist/web-containers/source/secrets/secrets-list.js +237 -0
  245. package/dist/web-containers/source/secrets/secrets-list.js.map +1 -0
  246. package/dist/web-containers/source/secrets-list.js +237 -0
  247. package/dist/web-containers/source/secrets-list.js.map +1 -0
  248. package/dist/web-containers/source/skills-tab/index.js +1 -1
  249. package/dist/web-containers/source/tabs/api-tab/create-api-modal.js +4 -4
  250. package/dist/web-containers/source/tabs/api-tab/labels.js +23 -19
  251. package/dist/web-containers/source/tabs/api-tab/labels.js.map +1 -1
  252. package/dist/web-containers/source/tabs/api-tab.js +15 -20
  253. package/dist/web-containers/source/tabs/api-tab.js.map +1 -1
  254. package/dist/web-containers/source/tabs/mcp-tab/connector-dialogs.js +1 -1
  255. package/dist/web-containers/source/tabs/mcp-tab/oauth-app-fields.js +2 -2
  256. package/dist/web-containers/source/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
  257. package/dist/web-containers/source/tabs/skills-tab/index.js +1 -1
  258. package/dist/web-containers/source/token-policy-fields.js +6 -6
  259. package/dist/web-containers/source/token-policy-fields.js.map +1 -1
  260. package/dist/web-containers/source/tooltip-icon-button.js +15 -0
  261. package/dist/web-containers/source/tooltip-icon-button.js.map +1 -0
  262. package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
  263. package/dist/web-containers/source/user-profile-dropdown/index.js +2 -0
  264. package/dist/web-containers/source/user-profile-dropdown/index.js.map +1 -1
  265. package/dist/web-containers/source/user-profile-modal.js +4 -4
  266. package/dist/web-containers/source/user-profile-modal.js.map +1 -1
  267. package/dist/web-containers/source/virtual-machine/azure-config.js +37 -0
  268. package/dist/web-containers/source/virtual-machine/azure-config.js.map +1 -0
  269. package/dist/web-containers/source/virtual-machine/azure-model-fields.js +118 -0
  270. package/dist/web-containers/source/virtual-machine/azure-model-fields.js.map +1 -0
  271. package/dist/web-containers/source/virtual-machine/credential-options.js +268 -22
  272. package/dist/web-containers/source/virtual-machine/credential-options.js.map +1 -1
  273. package/dist/web-containers/source/virtual-machine/host-port-chip-input.js +14 -8
  274. package/dist/web-containers/source/virtual-machine/host-port-chip-input.js.map +1 -1
  275. package/dist/web-containers/source/virtual-machine/network-policy-dialog.js +30 -6
  276. package/dist/web-containers/source/virtual-machine/network-policy-dialog.js.map +1 -1
  277. package/dist/web-containers/source/virtual-machine/secret-rows.js +66 -0
  278. package/dist/web-containers/source/virtual-machine/secret-rows.js.map +1 -0
  279. package/dist/web-containers/source/virtual-machine/vm-secret-dialog.js +848 -158
  280. package/dist/web-containers/source/virtual-machine/vm-secret-dialog.js.map +1 -1
  281. package/dist/web-containers/source/virtual-machine-admin/index.js +12 -18
  282. package/dist/web-containers/source/virtual-machine-admin/index.js.map +1 -1
  283. package/dist/web-containers/source/virtual-machine-admin/network-policies-section.js +5 -4
  284. package/dist/web-containers/source/virtual-machine-admin/network-policies-section.js.map +1 -1
  285. package/dist/web-containers/source/virtual-machine-network-section.js +147 -24
  286. package/dist/web-containers/source/virtual-machine-network-section.js.map +1 -1
  287. package/dist/web-containers/source/vm-secret-dialog.js +848 -158
  288. package/dist/web-containers/source/vm-secret-dialog.js.map +1 -1
  289. package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
  290. package/dist/web-containers/source/zh.json.js +457 -405
  291. package/dist/web-containers/source/zh.json.js.map +1 -1
  292. package/package.json +4 -4
  293. package/dist/web-containers/source/api-tab/api-token-utils.js.map +0 -1
  294. package/dist/web-containers/source/api-tab/constants.js.map +0 -1
  295. package/dist/web-containers/source/api-tab/edit-api-modal.js.map +0 -1
  296. package/dist/web-containers/source/api-tab/expiration-date-field.js +0 -29
  297. package/dist/web-containers/source/api-tab/expiration-date-field.js.map +0 -1
  298. package/dist/web-containers/source/api-tab/integration-autogenerated-table.js +0 -42
  299. package/dist/web-containers/source/api-tab/integration-autogenerated-table.js.map +0 -1
  300. package/dist/web-containers/source/api-tab/token-policy-fields.js.map +0 -1
  301. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
  302. package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
  303. package/dist/web-containers/source/components/profile/integration/api-tab/api-key-modal.js.map +0 -1
  304. package/dist/web-containers/source/components/profile/integration/api-tab/api-token-utils.js +0 -57
  305. package/dist/web-containers/source/components/profile/integration/api-tab/api-token-utils.js.map +0 -1
  306. package/dist/web-containers/source/components/profile/integration/api-tab/constants.js.map +0 -1
  307. package/dist/web-containers/source/components/profile/integration/api-tab/create-api-modal.js.map +0 -1
  308. package/dist/web-containers/source/components/profile/integration/api-tab/delete-api-modal.js +0 -31
  309. package/dist/web-containers/source/components/profile/integration/api-tab/delete-api-modal.js.map +0 -1
  310. package/dist/web-containers/source/components/profile/integration/api-tab/edit-api-modal.js.map +0 -1
  311. package/dist/web-containers/source/components/profile/integration/api-tab/expiration-date-field.js +0 -29
  312. package/dist/web-containers/source/components/profile/integration/api-tab/expiration-date-field.js.map +0 -1
  313. package/dist/web-containers/source/components/profile/integration/api-tab/integration-autogenerated-table.js +0 -42
  314. package/dist/web-containers/source/components/profile/integration/api-tab/integration-autogenerated-table.js.map +0 -1
  315. package/dist/web-containers/source/components/profile/integration/api-tab/token-policy-fields.js +0 -101
  316. package/dist/web-containers/source/components/profile/integration/api-tab/token-policy-fields.js.map +0 -1
  317. package/dist/web-containers/source/components/profile/integration/data-sources-tab/create-data-source-modal.js +0 -143
  318. package/dist/web-containers/source/components/profile/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
  319. package/dist/web-containers/source/components/profile/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
  320. package/dist/web-containers/source/components/profile/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
  321. package/dist/web-containers/source/components/profile/integration/llms-tab/create-llm-modal.js +0 -287
  322. package/dist/web-containers/source/components/profile/integration/llms-tab/create-llm-modal.js.map +0 -1
  323. package/dist/web-containers/source/components/profile/integration/llms-tab/integration-llms-tab.js +0 -83
  324. package/dist/web-containers/source/components/profile/integration/llms-tab/integration-llms-tab.js.map +0 -1
  325. package/dist/web-containers/source/components/profile/virtual-machine-admin/vm-secrets-section.js +0 -109
  326. package/dist/web-containers/source/components/profile/virtual-machine-admin/vm-secrets-section.js.map +0 -1
  327. package/dist/web-containers/source/create-data-source-modal.js +0 -143
  328. package/dist/web-containers/source/create-data-source-modal.js.map +0 -1
  329. package/dist/web-containers/source/create-llm-modal.js +0 -287
  330. package/dist/web-containers/source/create-llm-modal.js.map +0 -1
  331. package/dist/web-containers/source/data-sources-tab/create-data-source-modal.js +0 -143
  332. package/dist/web-containers/source/data-sources-tab/create-data-source-modal.js.map +0 -1
  333. package/dist/web-containers/source/data-sources-tab/integration-data-sources-tab.js +0 -46
  334. package/dist/web-containers/source/data-sources-tab/integration-data-sources-tab.js.map +0 -1
  335. package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
  336. package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
  337. package/dist/web-containers/source/integration/api-tab/api-key-modal.js.map +0 -1
  338. package/dist/web-containers/source/integration/api-tab/api-token-utils.js.map +0 -1
  339. package/dist/web-containers/source/integration/api-tab/constants.js.map +0 -1
  340. package/dist/web-containers/source/integration/api-tab/create-api-modal.js.map +0 -1
  341. package/dist/web-containers/source/integration/api-tab/delete-api-modal.js +0 -31
  342. package/dist/web-containers/source/integration/api-tab/delete-api-modal.js.map +0 -1
  343. package/dist/web-containers/source/integration/api-tab/edit-api-modal.js.map +0 -1
  344. package/dist/web-containers/source/integration/api-tab/expiration-date-field.js +0 -29
  345. package/dist/web-containers/source/integration/api-tab/expiration-date-field.js.map +0 -1
  346. package/dist/web-containers/source/integration/api-tab/integration-autogenerated-table.js +0 -42
  347. package/dist/web-containers/source/integration/api-tab/integration-autogenerated-table.js.map +0 -1
  348. package/dist/web-containers/source/integration/api-tab/token-policy-fields.js.map +0 -1
  349. package/dist/web-containers/source/integration/data-sources-tab/create-data-source-modal.js +0 -143
  350. package/dist/web-containers/source/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
  351. package/dist/web-containers/source/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
  352. package/dist/web-containers/source/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
  353. package/dist/web-containers/source/integration/llms-tab/create-llm-modal.js +0 -287
  354. package/dist/web-containers/source/integration/llms-tab/create-llm-modal.js.map +0 -1
  355. package/dist/web-containers/source/integration/llms-tab/integration-llms-tab.js +0 -83
  356. package/dist/web-containers/source/integration/llms-tab/integration-llms-tab.js.map +0 -1
  357. package/dist/web-containers/source/integration-autogenerated-table.js +0 -42
  358. package/dist/web-containers/source/integration-autogenerated-table.js.map +0 -1
  359. package/dist/web-containers/source/integration-data-sources-tab.js +0 -46
  360. package/dist/web-containers/source/integration-data-sources-tab.js.map +0 -1
  361. package/dist/web-containers/source/integration-llms-tab.js +0 -83
  362. package/dist/web-containers/source/integration-llms-tab.js.map +0 -1
  363. package/dist/web-containers/source/llms-tab/create-llm-modal.js +0 -287
  364. package/dist/web-containers/source/llms-tab/create-llm-modal.js.map +0 -1
  365. package/dist/web-containers/source/llms-tab/integration-llms-tab.js +0 -83
  366. package/dist/web-containers/source/llms-tab/integration-llms-tab.js.map +0 -1
  367. package/dist/web-containers/source/mcp-tab/field-info.js +0 -14
  368. package/dist/web-containers/source/mcp-tab/field-info.js.map +0 -1
  369. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
  370. package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
  371. package/dist/web-containers/source/profile/integration/api-tab/api-key-modal.js.map +0 -1
  372. package/dist/web-containers/source/profile/integration/api-tab/api-token-utils.js.map +0 -1
  373. package/dist/web-containers/source/profile/integration/api-tab/constants.js +0 -24
  374. package/dist/web-containers/source/profile/integration/api-tab/constants.js.map +0 -1
  375. package/dist/web-containers/source/profile/integration/api-tab/create-api-modal.js.map +0 -1
  376. package/dist/web-containers/source/profile/integration/api-tab/delete-api-modal.js +0 -31
  377. package/dist/web-containers/source/profile/integration/api-tab/delete-api-modal.js.map +0 -1
  378. package/dist/web-containers/source/profile/integration/api-tab/edit-api-modal.js +0 -113
  379. package/dist/web-containers/source/profile/integration/api-tab/edit-api-modal.js.map +0 -1
  380. package/dist/web-containers/source/profile/integration/api-tab/expiration-date-field.js +0 -29
  381. package/dist/web-containers/source/profile/integration/api-tab/expiration-date-field.js.map +0 -1
  382. package/dist/web-containers/source/profile/integration/api-tab/integration-autogenerated-table.js +0 -42
  383. package/dist/web-containers/source/profile/integration/api-tab/integration-autogenerated-table.js.map +0 -1
  384. package/dist/web-containers/source/profile/integration/api-tab/token-policy-fields.js.map +0 -1
  385. package/dist/web-containers/source/profile/integration/data-sources-tab/create-data-source-modal.js +0 -143
  386. package/dist/web-containers/source/profile/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
  387. package/dist/web-containers/source/profile/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
  388. package/dist/web-containers/source/profile/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
  389. package/dist/web-containers/source/profile/integration/llms-tab/create-llm-modal.js +0 -287
  390. package/dist/web-containers/source/profile/integration/llms-tab/create-llm-modal.js.map +0 -1
  391. package/dist/web-containers/source/profile/integration/llms-tab/integration-llms-tab.js +0 -83
  392. package/dist/web-containers/source/profile/integration/llms-tab/integration-llms-tab.js.map +0 -1
  393. package/dist/web-containers/source/profile/virtual-machine-admin/vm-secrets-section.js +0 -109
  394. package/dist/web-containers/source/profile/virtual-machine-admin/vm-secrets-section.js.map +0 -1
  395. package/dist/web-containers/source/tabs/mcp-tab/field-info.js +0 -14
  396. package/dist/web-containers/source/tabs/mcp-tab/field-info.js.map +0 -1
  397. package/dist/web-containers/source/virtual-machine-admin/vm-secrets-section.js +0 -109
  398. package/dist/web-containers/source/virtual-machine-admin/vm-secrets-section.js.map +0 -1
  399. package/dist/web-containers/source/vm-secrets-section.js +0 -109
  400. package/dist/web-containers/source/vm-secrets-section.js.map +0 -1
@@ -1,109 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useState, useMemo } from 'react';
3
- import { formatDistanceToNow } from 'date-fns';
4
- import { toast } from 'sonner';
5
- import { useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, getVirtualMachineApiError } from '@iblai/data-layer';
6
- import { Button } from '../../ui/button.js';
7
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '../../ui/dialog.js';
8
- import { Spinner } from '../../spinner/index.js';
9
- import { useT } from '../../../i18n/context.js';
10
- import '../../../packages/i18n/dist/index.esm.js';
11
- import { toIntegrationCredentialOptions } from '../../virtual-machine/credential-options.js';
12
- import { VmSecretDialog } from '../../virtual-machine/vm-secret-dialog.js';
13
- import Plus from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js';
14
- import Pencil from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/pencil.js';
15
- import Trash2 from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/trash-2.js';
16
- import LoaderCircle from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/loader-circle.js';
17
-
18
- const HOST_PREVIEW_COUNT = 3;
19
- /** Placeholder swapped for the inline variable in the delete sentence. */
20
- const RECORD_SLOT = '__record__';
21
- /** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
22
- function relativeTime(value) {
23
- const date = new Date(value);
24
- return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
25
- }
26
- /**
27
- * VM secrets table with create / edit / delete. A value is never displayed
28
- * — the Source column only says whether the secret holds a stored value or
29
- * follows an integration credential's field. Deleting a secret also unbinds
30
- * it from every agent that uses it, which the confirmation spells out.
31
- */
32
- function VmSecretsSection({ tenantKey, secrets, isLoading, isError, }) {
33
- const t = useT();
34
- const [dialogOpen, setDialogOpen] = useState(false);
35
- const [editingSecret, setEditingSecret] = useState(null);
36
- const [deletingSecret, setDeletingSecret] = useState(null);
37
- const [deleteError, setDeleteError] = useState(null);
38
- const [deleteSecret, { isLoading: isDeleting }] = useDeleteVirtualMachineSecretMutation();
39
- // The org's integration credentials feed the "use an existing credential"
40
- // source in the form and name the credential in the Source column.
41
- const { data: credentialsData } = useGetIntegrationCredentialsQuery({ org: tenantKey });
42
- const credentials = useMemo(() => toIntegrationCredentialOptions(credentialsData), [credentialsData]);
43
- const credentialNames = useMemo(() => new Map(credentials.map((option) => [option.id, option.name])), [credentials]);
44
- const sourceLabel = (secret) => {
45
- var _a;
46
- if (secret.source_credential_id == null)
47
- return t('virtualMachineSecrets.sourceStored');
48
- const credentialName = (_a = credentialNames.get(secret.source_credential_id)) !== null && _a !== void 0 ? _a : `#${secret.source_credential_id}`;
49
- return t('virtualMachineSecrets.sourceFromCredential', {
50
- credential: credentialName,
51
- field: secret.source_field,
52
- });
53
- };
54
- // The translated sentence with the variable rendered as the table's code chip.
55
- const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineSecrets.deleteConfirm', {
56
- envVar: RECORD_SLOT,
57
- }).split(RECORD_SLOT);
58
- const openCreate = () => {
59
- setEditingSecret(null);
60
- setDialogOpen(true);
61
- };
62
- const openEdit = (secret) => {
63
- setEditingSecret(secret);
64
- setDialogOpen(true);
65
- };
66
- const openDelete = (secret) => {
67
- setDeleteError(null);
68
- setDeletingSecret(secret);
69
- };
70
- const handleDelete = async (secret) => {
71
- var _a;
72
- try {
73
- await deleteSecret({ org: tenantKey, envVar: secret.env_var }).unwrap();
74
- toast.success(t('virtualMachineSecrets.deleted'));
75
- setDeletingSecret(null);
76
- }
77
- catch (error) {
78
- const parsed = getVirtualMachineApiError(error);
79
- setDeleteError(parsed.status === 403
80
- ? t('virtualMachineSecrets.forbiddenDelete')
81
- : ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineSecrets.deleteFailed')));
82
- }
83
- };
84
- return (jsxs("div", { "data-testid": "vm-secrets-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button, { size: "sm", onClick: openCreate, "data-testid": "vm-secret-new", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('virtualMachineSecrets.newSecret')] }) }), isLoading ? (jsx("div", { className: "flex h-40 items-center justify-center", children: jsx(Spinner, {}) })) : isError ? (jsx("div", { role: "alert", className: "rounded-lg border border-red-200 bg-red-50 px-6 py-6 text-center text-sm text-red-700", children: t('virtualMachineSecrets.loadFailed') })) : (jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "border-b border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colName') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colEnvVar') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colHosts') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colSource') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colUpdated') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colActions') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [secrets.map((secret) => {
85
- const preview = secret.allow_hosts.slice(0, HOST_PREVIEW_COUNT);
86
- const remaining = secret.allow_hosts.length - preview.length;
87
- return (jsxs("tr", { "data-testid": `vm-secret-row-${secret.env_var}`, children: [jsx("td", { className: "px-6 py-4 font-medium text-gray-900 dark:text-gray-100", children: secret.name }), jsx("td", { className: "px-6 py-4", children: jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: secret.env_var }) }), jsx("td", { className: "px-6 py-4", children: jsxs("ul", { role: "list", "aria-label": t('virtualMachineSecrets.hostsListAriaLabel', {
88
- name: secret.name,
89
- }), className: "flex flex-wrap gap-1", children: [preview.map((host) => (jsx("li", { className: "rounded-md border border-gray-200 bg-gray-50 px-2 py-0.5 font-mono text-xs text-gray-700", children: host }, host))), remaining > 0 && (jsx("li", { className: "px-1 py-0.5 text-xs text-gray-500", children: t('virtualMachineSecrets.moreHosts', { count: remaining }) }))] }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300", children: sourceLabel(secret) }), jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300", children: relativeTime(secret.updated_at) }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex justify-end gap-1", children: [jsx(Button, { variant: "ghost", size: "sm", onClick: () => openEdit(secret), "aria-label": t('virtualMachineSecrets.editAriaLabel', {
90
- name: secret.name,
91
- }), "data-testid": `vm-secret-edit-${secret.env_var}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button, { variant: "ghost", size: "sm", onClick: () => openDelete(secret), "aria-label": t('virtualMachineSecrets.deleteAriaLabel', {
92
- name: secret.name,
93
- }), "data-testid": `vm-secret-delete-${secret.env_var}`, className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) })] }) })] }, secret.id));
94
- }), secrets.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 6, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.empty') }) }))] })] }) })), jsx(VmSecretDialog, { open: dialogOpen, onOpenChange: setDialogOpen, tenantKey: tenantKey, secret: editingSecret, credentials: credentials }), jsx(Dialog, { open: deletingSecret !== null, onOpenChange: (open) => {
95
- if (!open && !isDeleting) {
96
- setDeletingSecret(null);
97
- setDeleteError(null);
98
- }
99
- }, children: jsxs(DialogContent, { className: "max-w-md", "data-testid": "vm-secret-delete-dialog", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('virtualMachineSecrets.deleteTitle') }) }), jsxs(DialogDescription, { className: "text-gray-600", children: [deleteConfirmBefore, jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: deletingSecret === null || deletingSecret === void 0 ? void 0 : deletingSecret.env_var }), deleteConfirmAfter] }), deleteError && (jsx("div", { role: "alert", "data-testid": "vm-secret-delete-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: deleteError })), jsxs(DialogFooter, { className: "pt-2", children: [jsx(Button, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
100
- setDeletingSecret(null);
101
- setDeleteError(null);
102
- }, children: t('virtualMachineSecrets.cancel') }), jsxs(Button, { type: "button", onClick: () => {
103
- if (deletingSecret)
104
- void handleDelete(deletingSecret);
105
- }, disabled: isDeleting, "data-testid": "vm-secret-delete-confirm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isDeleting && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), t('virtualMachineSecrets.delete')] })] })] }) })] }));
106
- }
107
-
108
- export { VmSecretsSection };
109
- //# sourceMappingURL=vm-secrets-section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vm-secrets-section.js","sources":["../../../../../../../../src/components/profile/virtual-machine-admin/vm-secrets-section.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","Loader2"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AACA,MAAM,WAAW,GAAG,YAAY;AAUhC;AACA,SAAS,YAAY,CAAC,KAAa,EAAA;AACjC,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;IAC5B,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG,GAAG,GAAG,mBAAmB,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC5F;AAEA;;;;;AAKG;AACG,SAAU,gBAAgB,CAAC,EAC/B,SAAS,EACT,OAAO,EACP,SAAS,EACT,OAAO,GACe,EAAA;AACtB,IAAA,MAAM,CAAC,GAAG,IAAI,EAAE;I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AAe,EAAA,QAAA,EAAA,CACzC,mBAAmB,EACpBC,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAC,mEAAmE,EAAA,QAAA,EAChF,cAAc,KAAA,IAAA,IAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,EAAA,CACnB,EACN,kBAAkB,CAAA,EAAA,CACD,EACnB,WAAW,KACVA,aACE,IAAI,EAAC,OAAO,EAAA,aAAA,EACA,wBAAwB,EACpC,SAAS,EAAC,2EAA2E,EAAA,QAAA,EAEpF,WAAW,GACR,CACP,EACDD,KAAC,YAAY,EAAA,EAAC,SAAS,EAAC,MAAM,aAC5BC,GAAA,CAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,SAAS,EACjB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,MAAK;wCACZ,iBAAiB,CAAC,IAAI,CAAC;wCACvB,cAAc,CAAC,IAAI,CAAC;AACtB,oCAAA,CAAC,YAEA,CAAC,CAAC,8BAA8B,CAAC,GAC3B,EACTD,IAAA,CAAC,MAAM,EAAA,EACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAK;AACZ,wCAAA,IAAI,cAAc;AAAE,4CAAA,KAAK,YAAY,CAAC,cAAc,CAAC;AACvD,oCAAA,CAAC,EACD,QAAQ,EAAE,UAAU,iBACR,0BAA0B,EACtC,SAAS,EAAC,yFAAyF,EAAA,QAAA,EAAA,CAElG,UAAU,IAAIC,IAACC,YAAO,EAAA,EAAC,SAAS,EAAC,sBAAsB,EAAA,aAAA,EAAa,MAAM,EAAA,CAAG,EAC7E,CAAC,CAAC,8BAA8B,CAAC,IAC3B,CAAA,EAAA,CACI,CAAA,EAAA,CACD,EAAA,CACT,CAAA,EAAA,CACL;AAEV;;;;"}
@@ -1,109 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { useState, useMemo } from 'react';
3
- import { formatDistanceToNow } from 'date-fns';
4
- import { toast } from 'sonner';
5
- import { useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, getVirtualMachineApiError } from '@iblai/data-layer';
6
- import { Button } from '../../ui/button.js';
7
- import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '../../ui/dialog.js';
8
- import { Spinner } from '../../spinner/index.js';
9
- import { useT } from '../../../i18n/context.js';
10
- import '../../../packages/i18n/dist/index.esm.js';
11
- import { toIntegrationCredentialOptions } from '../../virtual-machine/credential-options.js';
12
- import { VmSecretDialog } from '../../virtual-machine/vm-secret-dialog.js';
13
- import Plus from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js';
14
- import Pencil from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/pencil.js';
15
- import Trash2 from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/trash-2.js';
16
- import LoaderCircle from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/loader-circle.js';
17
-
18
- const HOST_PREVIEW_COUNT = 3;
19
- /** Placeholder swapped for the inline variable in the delete sentence. */
20
- const RECORD_SLOT = '__record__';
21
- /** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
22
- function relativeTime(value) {
23
- const date = new Date(value);
24
- return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
25
- }
26
- /**
27
- * VM secrets table with create / edit / delete. A value is never displayed
28
- * — the Source column only says whether the secret holds a stored value or
29
- * follows an integration credential's field. Deleting a secret also unbinds
30
- * it from every agent that uses it, which the confirmation spells out.
31
- */
32
- function VmSecretsSection({ tenantKey, secrets, isLoading, isError, }) {
33
- const t = useT();
34
- const [dialogOpen, setDialogOpen] = useState(false);
35
- const [editingSecret, setEditingSecret] = useState(null);
36
- const [deletingSecret, setDeletingSecret] = useState(null);
37
- const [deleteError, setDeleteError] = useState(null);
38
- const [deleteSecret, { isLoading: isDeleting }] = useDeleteVirtualMachineSecretMutation();
39
- // The org's integration credentials feed the "use an existing credential"
40
- // source in the form and name the credential in the Source column.
41
- const { data: credentialsData } = useGetIntegrationCredentialsQuery({ org: tenantKey });
42
- const credentials = useMemo(() => toIntegrationCredentialOptions(credentialsData), [credentialsData]);
43
- const credentialNames = useMemo(() => new Map(credentials.map((option) => [option.id, option.name])), [credentials]);
44
- const sourceLabel = (secret) => {
45
- var _a;
46
- if (secret.source_credential_id == null)
47
- return t('virtualMachineSecrets.sourceStored');
48
- const credentialName = (_a = credentialNames.get(secret.source_credential_id)) !== null && _a !== void 0 ? _a : `#${secret.source_credential_id}`;
49
- return t('virtualMachineSecrets.sourceFromCredential', {
50
- credential: credentialName,
51
- field: secret.source_field,
52
- });
53
- };
54
- // The translated sentence with the variable rendered as the table's code chip.
55
- const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineSecrets.deleteConfirm', {
56
- envVar: RECORD_SLOT,
57
- }).split(RECORD_SLOT);
58
- const openCreate = () => {
59
- setEditingSecret(null);
60
- setDialogOpen(true);
61
- };
62
- const openEdit = (secret) => {
63
- setEditingSecret(secret);
64
- setDialogOpen(true);
65
- };
66
- const openDelete = (secret) => {
67
- setDeleteError(null);
68
- setDeletingSecret(secret);
69
- };
70
- const handleDelete = async (secret) => {
71
- var _a;
72
- try {
73
- await deleteSecret({ org: tenantKey, envVar: secret.env_var }).unwrap();
74
- toast.success(t('virtualMachineSecrets.deleted'));
75
- setDeletingSecret(null);
76
- }
77
- catch (error) {
78
- const parsed = getVirtualMachineApiError(error);
79
- setDeleteError(parsed.status === 403
80
- ? t('virtualMachineSecrets.forbiddenDelete')
81
- : ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineSecrets.deleteFailed')));
82
- }
83
- };
84
- return (jsxs("div", { "data-testid": "vm-secrets-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button, { size: "sm", onClick: openCreate, "data-testid": "vm-secret-new", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('virtualMachineSecrets.newSecret')] }) }), isLoading ? (jsx("div", { className: "flex h-40 items-center justify-center", children: jsx(Spinner, {}) })) : isError ? (jsx("div", { role: "alert", className: "rounded-lg border border-red-200 bg-red-50 px-6 py-6 text-center text-sm text-red-700", children: t('virtualMachineSecrets.loadFailed') })) : (jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "border-b border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colName') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colEnvVar') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colHosts') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colSource') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colUpdated') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colActions') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [secrets.map((secret) => {
85
- const preview = secret.allow_hosts.slice(0, HOST_PREVIEW_COUNT);
86
- const remaining = secret.allow_hosts.length - preview.length;
87
- return (jsxs("tr", { "data-testid": `vm-secret-row-${secret.env_var}`, children: [jsx("td", { className: "px-6 py-4 font-medium text-gray-900 dark:text-gray-100", children: secret.name }), jsx("td", { className: "px-6 py-4", children: jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: secret.env_var }) }), jsx("td", { className: "px-6 py-4", children: jsxs("ul", { role: "list", "aria-label": t('virtualMachineSecrets.hostsListAriaLabel', {
88
- name: secret.name,
89
- }), className: "flex flex-wrap gap-1", children: [preview.map((host) => (jsx("li", { className: "rounded-md border border-gray-200 bg-gray-50 px-2 py-0.5 font-mono text-xs text-gray-700", children: host }, host))), remaining > 0 && (jsx("li", { className: "px-1 py-0.5 text-xs text-gray-500", children: t('virtualMachineSecrets.moreHosts', { count: remaining }) }))] }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300", children: sourceLabel(secret) }), jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300", children: relativeTime(secret.updated_at) }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex justify-end gap-1", children: [jsx(Button, { variant: "ghost", size: "sm", onClick: () => openEdit(secret), "aria-label": t('virtualMachineSecrets.editAriaLabel', {
90
- name: secret.name,
91
- }), "data-testid": `vm-secret-edit-${secret.env_var}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button, { variant: "ghost", size: "sm", onClick: () => openDelete(secret), "aria-label": t('virtualMachineSecrets.deleteAriaLabel', {
92
- name: secret.name,
93
- }), "data-testid": `vm-secret-delete-${secret.env_var}`, className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) })] }) })] }, secret.id));
94
- }), secrets.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 6, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.empty') }) }))] })] }) })), jsx(VmSecretDialog, { open: dialogOpen, onOpenChange: setDialogOpen, tenantKey: tenantKey, secret: editingSecret, credentials: credentials }), jsx(Dialog, { open: deletingSecret !== null, onOpenChange: (open) => {
95
- if (!open && !isDeleting) {
96
- setDeletingSecret(null);
97
- setDeleteError(null);
98
- }
99
- }, children: jsxs(DialogContent, { className: "max-w-md", "data-testid": "vm-secret-delete-dialog", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('virtualMachineSecrets.deleteTitle') }) }), jsxs(DialogDescription, { className: "text-gray-600", children: [deleteConfirmBefore, jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: deletingSecret === null || deletingSecret === void 0 ? void 0 : deletingSecret.env_var }), deleteConfirmAfter] }), deleteError && (jsx("div", { role: "alert", "data-testid": "vm-secret-delete-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: deleteError })), jsxs(DialogFooter, { className: "pt-2", children: [jsx(Button, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
100
- setDeletingSecret(null);
101
- setDeleteError(null);
102
- }, children: t('virtualMachineSecrets.cancel') }), jsxs(Button, { type: "button", onClick: () => {
103
- if (deletingSecret)
104
- void handleDelete(deletingSecret);
105
- }, disabled: isDeleting, "data-testid": "vm-secret-delete-confirm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isDeleting && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), t('virtualMachineSecrets.delete')] })] })] }) })] }));
106
- }
107
-
108
- export { VmSecretsSection };
109
- //# sourceMappingURL=vm-secrets-section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vm-secrets-section.js","sources":["../../../../../../../../src/components/profile/virtual-machine-admin/vm-secrets-section.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","Loader2"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,MAAM,kBAAkB,GAAG,CAAC;AAC5B;AACA,MAAM,WAAW,GAAG,YAAY;AAUhC;AACA,SAAS,YAAY,CAAC,KAAa,EAAA;AACjC,IAAA,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;IAC5B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