@iblai/iblai-js 2.67.3 → 2.68.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.
- package/dist/web-containers/source/_virtual/index2.js +2 -2
- package/dist/web-containers/source/_virtual/index3.js +2 -2
- package/dist/web-containers/source/account-sheet.js +2 -2
- package/dist/web-containers/source/account-sheet.js.map +1 -1
- package/dist/web-containers/source/account.js +39 -21
- package/dist/web-containers/source/account.js.map +1 -1
- package/dist/web-containers/source/api/api-field-label.js +14 -0
- package/dist/web-containers/source/api/api-field-label.js.map +1 -0
- package/dist/web-containers/source/{profile/integration/api-tab → api}/api-key-modal.js +8 -8
- package/dist/web-containers/source/api/api-key-modal.js.map +1 -0
- package/dist/web-containers/source/api/api-keys-table.js +61 -0
- package/dist/web-containers/source/api/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/{api-tab → api}/api-token-utils.js +34 -1
- package/dist/web-containers/source/api/api-token-utils.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → api}/constants.js +0 -1
- package/dist/web-containers/source/api/constants.js.map +1 -0
- package/dist/web-containers/source/{profile/integration/api-tab → api}/create-api-modal.js +19 -26
- package/dist/web-containers/source/api/create-api-modal.js.map +1 -0
- package/dist/web-containers/source/api/delete-api-modal.js +31 -0
- package/dist/web-containers/source/api/delete-api-modal.js.map +1 -0
- package/dist/web-containers/source/{api-tab → api}/edit-api-modal.js +34 -28
- package/dist/web-containers/source/api/edit-api-modal.js.map +1 -0
- package/dist/web-containers/source/api/expiration-date-field.js +35 -0
- package/dist/web-containers/source/api/expiration-date-field.js.map +1 -0
- package/dist/web-containers/source/api/index.js +30 -0
- package/dist/web-containers/source/api/index.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → api}/token-policy-fields.js +6 -6
- package/dist/web-containers/source/api/token-policy-fields.js.map +1 -0
- package/dist/web-containers/source/api-field-label.js +14 -0
- package/dist/web-containers/source/api-field-label.js.map +1 -0
- package/dist/web-containers/source/api-keys-table.js +61 -0
- package/dist/web-containers/source/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/api-tab/labels.js +23 -19
- package/dist/web-containers/source/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/api-tab.js +15 -20
- package/dist/web-containers/source/api-tab.js.map +1 -1
- package/dist/web-containers/source/api-token-utils.js +34 -1
- package/dist/web-containers/source/api-token-utils.js.map +1 -1
- package/dist/web-containers/source/azure-config.js +37 -0
- package/dist/web-containers/source/azure-config.js.map +1 -0
- package/dist/web-containers/source/azure-model-fields.js +118 -0
- package/dist/web-containers/source/azure-model-fields.js.map +1 -0
- package/dist/web-containers/source/claw-sandbox/virtual-machine-network-section.js +147 -24
- package/dist/web-containers/source/claw-sandbox/virtual-machine-network-section.js.map +1 -1
- package/dist/web-containers/source/components/claw-sandbox/virtual-machine-network-section.js +147 -24
- package/dist/web-containers/source/components/claw-sandbox/virtual-machine-network-section.js.map +1 -1
- package/dist/web-containers/source/components/field-info.js +18 -0
- package/dist/web-containers/source/components/field-info.js.map +1 -0
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/components/modals/user-profile-modal.js +4 -4
- package/dist/web-containers/source/components/modals/user-profile-modal.js.map +1 -1
- package/dist/web-containers/source/components/platform-sidebar/account-sheet.js +2 -2
- package/dist/web-containers/source/components/platform-sidebar/account-sheet.js.map +1 -1
- package/dist/web-containers/source/components/platform-sidebar/footer.js +15 -14
- package/dist/web-containers/source/components/platform-sidebar/footer.js.map +1 -1
- package/dist/web-containers/source/components/platform-sidebar/index.js +0 -2
- package/dist/web-containers/source/components/platform-sidebar/index.js.map +1 -1
- package/dist/web-containers/source/components/profile/account.js +39 -21
- package/dist/web-containers/source/components/profile/account.js.map +1 -1
- package/dist/web-containers/source/components/profile/api/api-field-label.js +14 -0
- package/dist/web-containers/source/components/profile/api/api-field-label.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → components/profile/api}/api-key-modal.js +8 -8
- package/dist/web-containers/source/components/profile/api/api-key-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/api-keys-table.js +61 -0
- package/dist/web-containers/source/components/profile/api/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → components/profile/api}/api-token-utils.js +34 -1
- package/dist/web-containers/source/components/profile/api/api-token-utils.js.map +1 -0
- package/dist/web-containers/source/components/profile/{integration/api-tab → api}/constants.js +0 -1
- package/dist/web-containers/source/components/profile/api/constants.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → components/profile/api}/create-api-modal.js +19 -26
- package/dist/web-containers/source/components/profile/api/create-api-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/delete-api-modal.js +31 -0
- package/dist/web-containers/source/components/profile/api/delete-api-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/{integration/api-tab → api}/edit-api-modal.js +34 -28
- package/dist/web-containers/source/components/profile/api/edit-api-modal.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/expiration-date-field.js +35 -0
- package/dist/web-containers/source/components/profile/api/expiration-date-field.js.map +1 -0
- package/dist/web-containers/source/components/profile/api/index.js +30 -0
- package/dist/web-containers/source/components/profile/api/index.js.map +1 -0
- package/dist/web-containers/source/{profile/integration/api-tab → components/profile/api}/token-policy-fields.js +6 -6
- package/dist/web-containers/source/components/profile/api/token-policy-fields.js.map +1 -0
- package/dist/web-containers/source/components/profile/info-banner.js +3 -1
- package/dist/web-containers/source/components/profile/info-banner.js.map +1 -1
- package/dist/web-containers/source/components/profile/integration/index.js +17 -38
- package/dist/web-containers/source/components/profile/integration/index.js.map +1 -1
- package/dist/web-containers/source/components/profile/secrets/index.js +106 -0
- package/dist/web-containers/source/components/profile/secrets/index.js.map +1 -0
- package/dist/web-containers/source/components/profile/secrets/secrets-list.js +237 -0
- package/dist/web-containers/source/components/profile/secrets/secrets-list.js.map +1 -0
- package/dist/web-containers/source/components/profile/virtual-machine-admin/index.js +12 -18
- package/dist/web-containers/source/components/profile/virtual-machine-admin/index.js.map +1 -1
- package/dist/web-containers/source/components/profile/virtual-machine-admin/network-policies-section.js +5 -4
- package/dist/web-containers/source/components/profile/virtual-machine-admin/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/components/tooltip-icon-button.js +15 -0
- package/dist/web-containers/source/components/tooltip-icon-button.js.map +1 -0
- package/dist/web-containers/source/components/user-profile-dropdown/index.js +2 -0
- package/dist/web-containers/source/components/user-profile-dropdown/index.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/azure-config.js +37 -0
- package/dist/web-containers/source/components/virtual-machine/azure-config.js.map +1 -0
- package/dist/web-containers/source/components/virtual-machine/azure-model-fields.js +118 -0
- package/dist/web-containers/source/components/virtual-machine/azure-model-fields.js.map +1 -0
- package/dist/web-containers/source/components/virtual-machine/credential-options.js +268 -22
- package/dist/web-containers/source/components/virtual-machine/credential-options.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/host-port-chip-input.js +14 -8
- package/dist/web-containers/source/components/virtual-machine/host-port-chip-input.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/network-policy-dialog.js +30 -6
- package/dist/web-containers/source/components/virtual-machine/network-policy-dialog.js.map +1 -1
- package/dist/web-containers/source/components/virtual-machine/secret-rows.js +66 -0
- package/dist/web-containers/source/components/virtual-machine/secret-rows.js.map +1 -0
- package/dist/web-containers/source/components/virtual-machine/vm-secret-dialog.js +848 -158
- package/dist/web-containers/source/components/virtual-machine/vm-secret-dialog.js.map +1 -1
- package/dist/web-containers/source/connector-dialogs.js +1 -1
- package/dist/web-containers/source/constants.js +55 -22
- package/dist/web-containers/source/constants.js.map +1 -1
- package/dist/web-containers/source/create-api-modal.js +4 -4
- package/dist/web-containers/source/credential-options.js +268 -22
- package/dist/web-containers/source/credential-options.js.map +1 -1
- package/dist/web-containers/source/edit-api-modal.js +34 -28
- package/dist/web-containers/source/edit-api-modal.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/edit-mentor-modal/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/en.json.js +278 -227
- package/dist/web-containers/source/en.json.js.map +1 -1
- package/dist/web-containers/source/es.json.js +449 -398
- package/dist/web-containers/source/es.json.js.map +1 -1
- package/dist/web-containers/source/expiration-date-field.js +16 -10
- package/dist/web-containers/source/expiration-date-field.js.map +1 -1
- package/dist/web-containers/source/field-info.js +11 -7
- package/dist/web-containers/source/field-info.js.map +1 -1
- package/dist/web-containers/source/footer.js +15 -14
- package/dist/web-containers/source/footer.js.map +1 -1
- package/dist/web-containers/source/fr.json.js +457 -406
- package/dist/web-containers/source/fr.json.js.map +1 -1
- package/dist/web-containers/source/host-port-chip-input.js +14 -8
- package/dist/web-containers/source/host-port-chip-input.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/en.json.js +278 -227
- package/dist/web-containers/source/i18n/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/es.json.js +449 -398
- package/dist/web-containers/source/i18n/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/fr.json.js +457 -406
- package/dist/web-containers/source/i18n/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/i18n/messages/zh.json.js +456 -405
- package/dist/web-containers/source/i18n/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/index2.js +2 -2
- package/dist/web-containers/source/index3.js +2 -2
- package/dist/web-containers/source/info-banner.js +3 -1
- package/dist/web-containers/source/info-banner.js.map +1 -1
- package/dist/web-containers/source/integration/index.js +17 -38
- package/dist/web-containers/source/integration/index.js.map +1 -1
- package/dist/web-containers/source/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/messages/en.json.js +278 -227
- package/dist/web-containers/source/messages/en.json.js.map +1 -1
- package/dist/web-containers/source/messages/es.json.js +449 -398
- package/dist/web-containers/source/messages/es.json.js.map +1 -1
- package/dist/web-containers/source/messages/fr.json.js +457 -406
- package/dist/web-containers/source/messages/fr.json.js.map +1 -1
- package/dist/web-containers/source/messages/zh.json.js +456 -405
- package/dist/web-containers/source/messages/zh.json.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/modals/user-profile-modal.js +4 -4
- package/dist/web-containers/source/modals/user-profile-modal.js.map +1 -1
- package/dist/web-containers/source/network-policies-section.js +5 -4
- package/dist/web-containers/source/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/network-policy-dialog.js +30 -6
- package/dist/web-containers/source/network-policy-dialog.js.map +1 -1
- package/dist/web-containers/source/node_modules/.pnpm/css-mediaquery@0.1.2/node_modules/css-mediaquery/index.js +1 -1
- package/dist/web-containers/source/node_modules/.pnpm/matchmediaquery@0.4.2/node_modules/matchmediaquery/index.js +1 -1
- package/dist/web-containers/source/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/web-containers/source/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/platform-sidebar/account-sheet.js +2 -2
- package/dist/web-containers/source/platform-sidebar/account-sheet.js.map +1 -1
- package/dist/web-containers/source/platform-sidebar/footer.js +15 -14
- package/dist/web-containers/source/platform-sidebar/footer.js.map +1 -1
- package/dist/web-containers/source/platform-sidebar/index.js +0 -2
- package/dist/web-containers/source/platform-sidebar/index.js.map +1 -1
- package/dist/web-containers/source/profile/account.js +39 -21
- package/dist/web-containers/source/profile/account.js.map +1 -1
- package/dist/web-containers/source/profile/api/api-field-label.js +14 -0
- package/dist/web-containers/source/profile/api/api-field-label.js.map +1 -0
- package/dist/web-containers/source/{components/profile/integration/api-tab → profile/api}/api-key-modal.js +8 -8
- package/dist/web-containers/source/profile/api/api-key-modal.js.map +1 -0
- package/dist/web-containers/source/profile/api/api-keys-table.js +61 -0
- package/dist/web-containers/source/profile/api/api-keys-table.js.map +1 -0
- package/dist/web-containers/source/profile/{integration/api-tab → api}/api-token-utils.js +34 -1
- package/dist/web-containers/source/profile/api/api-token-utils.js.map +1 -0
- package/dist/web-containers/source/{api-tab → profile/api}/constants.js +0 -1
- package/dist/web-containers/source/profile/api/constants.js.map +1 -0
- package/dist/web-containers/source/{components/profile/integration/api-tab → profile/api}/create-api-modal.js +19 -26
- package/dist/web-containers/source/profile/api/create-api-modal.js.map +1 -0
- package/dist/web-containers/source/profile/api/delete-api-modal.js +31 -0
- package/dist/web-containers/source/profile/api/delete-api-modal.js.map +1 -0
- package/dist/web-containers/source/{integration/api-tab → profile/api}/edit-api-modal.js +34 -28
- package/dist/web-containers/source/profile/api/edit-api-modal.js.map +1 -0
- package/dist/web-containers/source/profile/api/expiration-date-field.js +35 -0
- package/dist/web-containers/source/profile/api/expiration-date-field.js.map +1 -0
- package/dist/web-containers/source/profile/api/index.js +30 -0
- package/dist/web-containers/source/profile/api/index.js.map +1 -0
- package/dist/web-containers/source/{api-tab → profile/api}/token-policy-fields.js +6 -6
- package/dist/web-containers/source/profile/api/token-policy-fields.js.map +1 -0
- package/dist/web-containers/source/profile/info-banner.js +3 -1
- package/dist/web-containers/source/profile/info-banner.js.map +1 -1
- package/dist/web-containers/source/profile/integration/index.js +17 -38
- package/dist/web-containers/source/profile/integration/index.js.map +1 -1
- package/dist/web-containers/source/profile/secrets/index.js +106 -0
- package/dist/web-containers/source/profile/secrets/index.js.map +1 -0
- package/dist/web-containers/source/profile/secrets/secrets-list.js +237 -0
- package/dist/web-containers/source/profile/secrets/secrets-list.js.map +1 -0
- package/dist/web-containers/source/profile/virtual-machine-admin/index.js +12 -18
- package/dist/web-containers/source/profile/virtual-machine-admin/index.js.map +1 -1
- package/dist/web-containers/source/profile/virtual-machine-admin/network-policies-section.js +5 -4
- package/dist/web-containers/source/profile/virtual-machine-admin/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/secret-rows.js +66 -0
- package/dist/web-containers/source/secret-rows.js.map +1 -0
- package/dist/web-containers/source/secrets/index.js +106 -0
- package/dist/web-containers/source/secrets/index.js.map +1 -0
- package/dist/web-containers/source/secrets/secrets-list.js +237 -0
- package/dist/web-containers/source/secrets/secrets-list.js.map +1 -0
- package/dist/web-containers/source/secrets-list.js +237 -0
- package/dist/web-containers/source/secrets-list.js.map +1 -0
- package/dist/web-containers/source/skills-tab/index.js +1 -1
- package/dist/web-containers/source/tabs/api-tab/create-api-modal.js +4 -4
- package/dist/web-containers/source/tabs/api-tab/labels.js +23 -19
- package/dist/web-containers/source/tabs/api-tab/labels.js.map +1 -1
- package/dist/web-containers/source/tabs/api-tab.js +15 -20
- package/dist/web-containers/source/tabs/api-tab.js.map +1 -1
- package/dist/web-containers/source/tabs/mcp-tab/connector-dialogs.js +1 -1
- package/dist/web-containers/source/tabs/mcp-tab/oauth-app-fields.js +2 -2
- package/dist/web-containers/source/tabs/mcp-tab/oauth-app-fields.js.map +1 -1
- package/dist/web-containers/source/tabs/skills-tab/index.js +1 -1
- package/dist/web-containers/source/token-policy-fields.js +6 -6
- package/dist/web-containers/source/token-policy-fields.js.map +1 -1
- package/dist/web-containers/source/tooltip-icon-button.js +15 -0
- package/dist/web-containers/source/tooltip-icon-button.js.map +1 -0
- package/dist/web-containers/source/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/user-profile-dropdown/index.js +2 -0
- package/dist/web-containers/source/user-profile-dropdown/index.js.map +1 -1
- package/dist/web-containers/source/user-profile-modal.js +4 -4
- package/dist/web-containers/source/user-profile-modal.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/azure-config.js +37 -0
- package/dist/web-containers/source/virtual-machine/azure-config.js.map +1 -0
- package/dist/web-containers/source/virtual-machine/azure-model-fields.js +118 -0
- package/dist/web-containers/source/virtual-machine/azure-model-fields.js.map +1 -0
- package/dist/web-containers/source/virtual-machine/credential-options.js +268 -22
- package/dist/web-containers/source/virtual-machine/credential-options.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/host-port-chip-input.js +14 -8
- package/dist/web-containers/source/virtual-machine/host-port-chip-input.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/network-policy-dialog.js +30 -6
- package/dist/web-containers/source/virtual-machine/network-policy-dialog.js.map +1 -1
- package/dist/web-containers/source/virtual-machine/secret-rows.js +66 -0
- package/dist/web-containers/source/virtual-machine/secret-rows.js.map +1 -0
- package/dist/web-containers/source/virtual-machine/vm-secret-dialog.js +848 -158
- package/dist/web-containers/source/virtual-machine/vm-secret-dialog.js.map +1 -1
- package/dist/web-containers/source/virtual-machine-admin/index.js +12 -18
- package/dist/web-containers/source/virtual-machine-admin/index.js.map +1 -1
- package/dist/web-containers/source/virtual-machine-admin/network-policies-section.js +5 -4
- package/dist/web-containers/source/virtual-machine-admin/network-policies-section.js.map +1 -1
- package/dist/web-containers/source/virtual-machine-network-section.js +147 -24
- package/dist/web-containers/source/virtual-machine-network-section.js.map +1 -1
- package/dist/web-containers/source/vm-secret-dialog.js +848 -158
- package/dist/web-containers/source/vm-secret-dialog.js.map +1 -1
- package/dist/web-containers/source/web-containers/tsconfig.build.tsbuildinfo +1 -1
- package/dist/web-containers/source/zh.json.js +456 -405
- package/dist/web-containers/source/zh.json.js.map +1 -1
- package/package.json +5 -5
- package/dist/web-containers/source/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/components/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/api-key-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/api-token-utils.js +0 -57
- package/dist/web-containers/source/components/profile/integration/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/create-api-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/delete-api-modal.js +0 -31
- package/dist/web-containers/source/components/profile/integration/api-tab/delete-api-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/components/profile/integration/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/components/profile/integration/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/api-tab/token-policy-fields.js +0 -101
- package/dist/web-containers/source/components/profile/integration/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/components/profile/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/components/profile/integration/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/components/profile/integration/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/components/profile/integration/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/components/profile/virtual-machine-admin/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/components/profile/virtual-machine-admin/vm-secrets-section.js.map +0 -1
- package/dist/web-containers/source/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/create-llm-modal.js +0 -287
- package/dist/web-containers/source/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/api-key-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/create-api-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/delete-api-modal.js +0 -31
- package/dist/web-containers/source/integration/api-tab/delete-api-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/integration/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/integration/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/integration/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/integration/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/integration/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/integration/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/integration/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/integration/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/modals/edit-mentor-modal/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/api-key-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/api-token-utils.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/constants.js +0 -24
- package/dist/web-containers/source/profile/integration/api-tab/constants.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/create-api-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/delete-api-modal.js +0 -31
- package/dist/web-containers/source/profile/integration/api-tab/delete-api-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/edit-api-modal.js +0 -113
- package/dist/web-containers/source/profile/integration/api-tab/edit-api-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/expiration-date-field.js +0 -29
- package/dist/web-containers/source/profile/integration/api-tab/expiration-date-field.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/integration-autogenerated-table.js +0 -42
- package/dist/web-containers/source/profile/integration/api-tab/integration-autogenerated-table.js.map +0 -1
- package/dist/web-containers/source/profile/integration/api-tab/token-policy-fields.js.map +0 -1
- package/dist/web-containers/source/profile/integration/data-sources-tab/create-data-source-modal.js +0 -143
- package/dist/web-containers/source/profile/integration/data-sources-tab/create-data-source-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/data-sources-tab/integration-data-sources-tab.js +0 -46
- package/dist/web-containers/source/profile/integration/data-sources-tab/integration-data-sources-tab.js.map +0 -1
- package/dist/web-containers/source/profile/integration/llms-tab/create-llm-modal.js +0 -287
- package/dist/web-containers/source/profile/integration/llms-tab/create-llm-modal.js.map +0 -1
- package/dist/web-containers/source/profile/integration/llms-tab/integration-llms-tab.js +0 -83
- package/dist/web-containers/source/profile/integration/llms-tab/integration-llms-tab.js.map +0 -1
- package/dist/web-containers/source/profile/virtual-machine-admin/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/profile/virtual-machine-admin/vm-secrets-section.js.map +0 -1
- package/dist/web-containers/source/tabs/mcp-tab/field-info.js +0 -14
- package/dist/web-containers/source/tabs/mcp-tab/field-info.js.map +0 -1
- package/dist/web-containers/source/virtual-machine-admin/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/virtual-machine-admin/vm-secrets-section.js.map +0 -1
- package/dist/web-containers/source/vm-secrets-section.js +0 -109
- package/dist/web-containers/source/vm-secrets-section.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '../../ui/button.js';
|
|
3
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '../../ui/dialog.js';
|
|
4
|
+
import { useDeleteApiKeyMutation } from '@iblai/data-layer';
|
|
5
|
+
import { toast } from 'sonner';
|
|
6
|
+
import { useT } from '../../../i18n/context.js';
|
|
7
|
+
import '../../../packages/i18n/dist/index.esm.js';
|
|
8
|
+
|
|
9
|
+
function DeleteApiModal({ isOpen, onClose, apiKey, tenantKey }) {
|
|
10
|
+
const t = useT();
|
|
11
|
+
const [deleteApiKey, { isLoading }] = useDeleteApiKeyMutation();
|
|
12
|
+
async function handleDeleteApiKey() {
|
|
13
|
+
try {
|
|
14
|
+
await deleteApiKey({
|
|
15
|
+
name: apiKey.name,
|
|
16
|
+
platformKey: tenantKey,
|
|
17
|
+
}).unwrap();
|
|
18
|
+
toast.success(t('apiTabDeleteApiModal2.successMessage'));
|
|
19
|
+
onClose();
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error(JSON.stringify(error));
|
|
23
|
+
toast.error(t('apiTabDeleteApiModal2.errorMessage'));
|
|
24
|
+
//Sentry.captureException(String(error));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: t('apiTabDeleteApiModal2.title') }), jsx(DialogDescription, { className: "text-xs text-gray-600", children: t('apiTabLabels.deleteModal.warning') })] }), jsx("div", { className: "my-5", children: jsx("p", { className: "text-sm text-[#646464]", children: t('apiTabDeleteApiModal2.confirmationText', { name: apiKey.name }) }) }), jsxs(DialogFooter, { className: "gap-3", children: [jsx(Button, { variant: "outline", onClick: onClose, children: t('apiTabDeleteApiModal2.cancel') }), jsx(Button, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", onClick: handleDeleteApiKey, disabled: isLoading, children: isLoading ? t('apiTabDeleteApiModal2.deleting') : t('apiTabDeleteApiModal2.delete') })] })] }) }));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { DeleteApiModal };
|
|
31
|
+
//# sourceMappingURL=delete-api-modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-api-modal.js","sources":["../../../../../../../../src/components/profile/api/delete-api-modal.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;AAyBM,SAAU,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAS,EAAA;AAC1E,IAAA,MAAM,CAAC,GAAG,IAAI,EAAE;IAChB,MAAM,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,CAAC,GAAG,uBAAuB,EAAE;AAE/D,IAAA,eAAe,kBAAkB,GAAA;AAC/B,QAAA,IAAI;AACF,YAAA,MAAM,YAAY,CAAC;gBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;AACjB,gBAAA,WAAW,EAAE,SAAS;aACvB,CAAC,CAAC,MAAM,EAAE;YACX,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC;AACxD,YAAA,OAAO,EAAE;QACX;QAAE,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACpC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC;;QAEtD;IACF;AAEA,IAAA,QACEA,GAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAA,QAAA,EACzCC,IAAA,CAAC,aAAa,EAAA,EAAA,QAAA,EAAA,CACZA,IAAA,CAAC,YAAY,EAAA,EAAA,QAAA,EAAA,CACXD,GAAA,CAAC,WAAW,EAAA,EAAC,SAAS,EAAC,kBAAkB,EAAA,QAAA,EAAE,CAAC,CAAC,6BAA6B,CAAC,EAAA,CAAe,EAC1FA,GAAA,CAAC,iBAAiB,EAAA,EAAC,SAAS,EAAC,uBAAuB,EAAA,QAAA,EACjD,CAAC,CAAC,kCAAkC,CAAC,EAAA,CACpB,CAAA,EAAA,CACP,EACfA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,MAAM,EAAA,QAAA,EACnBA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,wBAAwB,EAAA,QAAA,EAClC,CAAC,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,EAAA,CACjE,EAAA,CACA,EACNC,IAAA,CAAC,YAAY,EAAA,EAAC,SAAS,EAAC,OAAO,EAAA,QAAA,EAAA,CAC7BD,GAAA,CAAC,MAAM,EAAA,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,EAAA,QAAA,EACvC,CAAC,CAAC,8BAA8B,CAAC,EAAA,CAC3B,EACTA,IAAC,MAAM,EAAA,EACL,SAAS,EAAC,0EAA0E,EACpF,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,SAAS,EAAA,QAAA,EAElB,SAAS,GAAG,CAAC,CAAC,gCAAgC,CAAC,GAAG,CAAC,CAAC,8BAA8B,CAAC,EAAA,CAC7E,CAAA,EAAA,CACI,CAAA,EAAA,CACD,EAAA,CACT;AAEb;;;;"}
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { isSameDay } from 'date-fns';
|
|
4
4
|
import { toast } from 'sonner';
|
|
5
|
-
import { useForm } from '
|
|
6
|
-
import { useT } from '
|
|
7
|
-
import '
|
|
8
|
-
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogFooter } from '
|
|
9
|
-
import { Input } from '
|
|
10
|
-
import {
|
|
11
|
-
import { Button } from '../../../ui/button.js';
|
|
5
|
+
import { useForm } from '../../../node_modules/.pnpm/@tanstack_react-form@1.11.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@tanstack/react-form/dist/esm/useForm.js';
|
|
6
|
+
import { useT } from '../../../i18n/context.js';
|
|
7
|
+
import '../../../packages/i18n/dist/index.esm.js';
|
|
8
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogFooter } from '../../ui/dialog.js';
|
|
9
|
+
import { Input } from '../../ui/input.js';
|
|
10
|
+
import { Button } from '../../ui/button.js';
|
|
12
11
|
import { useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation } from '@iblai/data-layer';
|
|
12
|
+
import { ApiFieldLabel } from './api-field-label.js';
|
|
13
13
|
import { DENIED_TOKEN_POLICY_PERMISSIONS, API_TOKEN_MODES } from './constants.js';
|
|
14
|
-
import { toSelections, buildTokenPolicyPayload, secondsUntil } from './api-token-utils.js';
|
|
14
|
+
import { buildApiKeyFormSchema, toSelections, buildTokenPolicyPayload, secondsUntil } from './api-token-utils.js';
|
|
15
15
|
import { ExpirationDateField } from './expiration-date-field.js';
|
|
16
16
|
import { TokenPolicyFields } from './token-policy-fields.js';
|
|
17
|
-
import TriangleAlert from '
|
|
17
|
+
import TriangleAlert from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/triangle-alert.js';
|
|
18
18
|
|
|
19
|
-
const editApiFormSchema = z.object({
|
|
20
|
-
name: z
|
|
21
|
-
.string()
|
|
22
|
-
.min(1, 'API Key name is required')
|
|
23
|
-
.regex(/^[a-zA-Z0-9_-]+$/, 'can only contain letters, numbers, and hyphens'),
|
|
24
|
-
expiration_date: z.date().nullable(),
|
|
25
|
-
});
|
|
26
19
|
function EditApiKeyForm({ token, tenantKey, fieldPermissions, onClose, }) {
|
|
27
20
|
var _a;
|
|
28
21
|
const t = useT();
|
|
22
|
+
const nameFieldId = React__default.useId();
|
|
23
|
+
const editApiFormSchema = React__default.useMemo(() => buildApiKeyFormSchema(t), [t]);
|
|
29
24
|
const [updateApiKey, { isLoading }] = useUpdateApiKeyMutation();
|
|
30
25
|
const initialPolicies = React__default.useMemo(() => toSelections(token.policies), [token.policies]);
|
|
31
26
|
const initialGroups = React__default.useMemo(() => toSelections(token.groups), [token.groups]);
|
|
@@ -43,7 +38,7 @@ function EditApiKeyForm({ token, tenantKey, fieldPermissions, onClose, }) {
|
|
|
43
38
|
onChange: editApiFormSchema,
|
|
44
39
|
},
|
|
45
40
|
onSubmit: async ({ value }) => {
|
|
46
|
-
var _a
|
|
41
|
+
var _a;
|
|
47
42
|
const requestBody = buildTokenPolicyPayload({
|
|
48
43
|
mode,
|
|
49
44
|
initialMode,
|
|
@@ -56,9 +51,11 @@ function EditApiKeyForm({ token, tenantKey, fieldPermissions, onClose, }) {
|
|
|
56
51
|
if (value.name !== token.name) {
|
|
57
52
|
requestBody.name = value.name;
|
|
58
53
|
}
|
|
59
|
-
const nextExpiration = (
|
|
60
|
-
const
|
|
61
|
-
|
|
54
|
+
const nextExpiration = (_a = value.expiration_date) !== null && _a !== void 0 ? _a : null;
|
|
55
|
+
const expirationChanged = nextExpiration && initialExpiration
|
|
56
|
+
? !isSameDay(nextExpiration, initialExpiration)
|
|
57
|
+
: nextExpiration !== initialExpiration;
|
|
58
|
+
if (expirationChanged) {
|
|
62
59
|
requestBody.expires_in = value.expiration_date
|
|
63
60
|
? secondsUntil(value.expiration_date).toString()
|
|
64
61
|
: null;
|
|
@@ -89,24 +86,33 @@ function EditApiKeyForm({ token, tenantKey, fieldPermissions, onClose, }) {
|
|
|
89
86
|
}, className: "mt-5 grid min-w-0 gap-5", children: [jsx(form.Field, { name: "name", children: (field) => {
|
|
90
87
|
var _a, _b;
|
|
91
88
|
const hasErrorAndIsDirty = ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) > 0 && field.state.meta.isDirty;
|
|
92
|
-
return (jsxs("div", { className: "space-y-1.5", children: [
|
|
89
|
+
return (jsxs("div", { className: "space-y-1.5", children: [jsx(ApiFieldLabel, { htmlFor: nameFieldId, text: t('apiTabCreateApiModal2.apiKeyName'), info: t('apiTabCreateApiModal2.apiKeyNameInfo'), required: true }), jsx(Input, { id: nameFieldId, value: field.state.value, onChange: (event) => field.handleChange(event.target.value), autoComplete: "off" }), hasErrorAndIsDirty && (jsx("p", { className: "text-red-500 text-xs", children: (_b = field.state.meta.errors[0]) === null || _b === void 0 ? void 0 : _b.message })), field.state.value !== token.name && (jsxs("p", { className: "flex items-start gap-1.5 text-xs text-amber-700", children: [jsx(TriangleAlert, { className: "mt-0.5 h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }), t('apiTabEditApiModal.renameWarning')] }))] }));
|
|
93
90
|
} }), jsx(form.Field, { name: "expiration_date", children: (field) => (jsx(ExpirationDateField, { value: field.state.value, onChange: (date) => field.handleChange(date), helpText: t('apiTabEditApiModal.expirationHelp') })) }), jsx(TokenPolicyFields, { tenantKey: tenantKey, mode: mode, onModeChange: setMode, policies: policies, onPoliciesChange: setPolicies, groups: groups, onGroupsChange: setGroups, fieldPermissions: fieldPermissions, idPrefix: "edit-api-key" }), jsxs(DialogFooter, { className: "justify-end gap-3", children: [jsx(Button, { type: "button", variant: "outline", onClick: onClose, disabled: isLoading, children: t('apiTabDeleteApiModal2.cancel') }), jsx(form.Subscribe, { selector: (state) => ({ canSubmit: state.canSubmit }), children: ({ canSubmit }) => (jsx(Button, { type: "submit", disabled: !canSubmit || isLoading, className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: isLoading ? t('apiTabEditApiModal.saving') : t('apiTabEditApiModal.save') })) })] })] }));
|
|
94
91
|
}
|
|
95
92
|
function EditApiModal({ isOpen, onClose, apiKeyName, tenantKey }) {
|
|
96
93
|
var _a;
|
|
97
94
|
const t = useT();
|
|
98
95
|
const skip = !isOpen || !apiKeyName || !tenantKey;
|
|
99
|
-
const { data: token, isError: isTokenError, isFetching: isTokenFetching, } = useGetApiKeyQuery({ name: apiKeyName, platformKey: tenantKey }, { skip });
|
|
96
|
+
const { data: token, isError: isTokenError, isFetching: isTokenFetching, refetch: refetchToken, } = useGetApiKeyQuery({ name: apiKeyName, platformKey: tenantKey }, { skip });
|
|
100
97
|
const { data: fieldPermissionsData, isError: isFieldPermissionsError, isLoading: isFieldPermissionsLoading, } = useGetApiKeyFieldPermissionsQuery({ platformKey: tenantKey }, { skip });
|
|
101
98
|
// The detail payload wins when it embeds write flags, since those describe
|
|
102
99
|
// this token rather than the create form.
|
|
103
100
|
const fieldPermissions = (_a = token === null || token === void 0 ? void 0 : token.field_permissions) !== null && _a !== void 0 ? _a : (isFieldPermissionsError ? DENIED_TOKEN_POLICY_PERMISSIONS : fieldPermissionsData);
|
|
104
101
|
// Both must settle first: an unresolved permission map reads as "all
|
|
105
|
-
// writable", which would render controls the caller may not actually have.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
// writable", which would render controls the caller may not actually have. A
|
|
103
|
+
// token being re-read must not seed the form either: the form compares against
|
|
104
|
+
// what it was seeded with, so a stale copy would undo the last save. Once seeded
|
|
105
|
+
// it stays up: a failed save re-reads the token too, and must not lose the edits.
|
|
106
|
+
const canSeed = Boolean(token) && !isFieldPermissionsLoading && !isTokenFetching && !isTokenError;
|
|
107
|
+
const [seeded, setSeeded] = React__default.useState(false);
|
|
108
|
+
React__default.useEffect(() => {
|
|
109
|
+
if (!isOpen)
|
|
110
|
+
setSeeded(false);
|
|
111
|
+
else if (canSeed)
|
|
112
|
+
setSeeded(true);
|
|
113
|
+
}, [isOpen, canSeed]);
|
|
114
|
+
const isReady = Boolean(token) && !isFieldPermissionsLoading && (seeded || canSeed);
|
|
115
|
+
return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { className: "w-full max-w-md max-h-[85vh] overflow-y-auto", children: [jsx(DialogDescription, { className: "sr-only", children: t('apiTabEditApiModal.title') }), jsx(DialogHeader, { children: jsx(DialogTitle, { className: "ibl-dialog-title", children: t('apiTabEditApiModal.title') }) }), isReady && token ? (jsx(EditApiKeyForm, { token: token, tenantKey: tenantKey, fieldPermissions: fieldPermissions, onClose: onClose }, token.name)) : isTokenError && !isTokenFetching ? (jsxs("div", { className: "flex flex-col items-center gap-3 py-6 text-center text-sm text-muted-foreground", children: [jsx("p", { children: t('apiTabEditApiModal.loadError') }), jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => refetchToken(), "data-testid": "api-key-edit-retry", children: t('apiTabLabels.table.tryAgain') })] })) : (jsx("p", { className: "py-6 text-center text-sm text-muted-foreground", children: t('apiTabEditApiModal.loading') }))] }) }));
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
export { EditApiModal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-api-modal.js","sources":["../../../../../../../../src/components/profile/api/edit-api-modal.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;AAgDA,SAAS,cAAc,CAAC,EACtB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,OAAO,GAMR,EAAA;;AACC,IAAA,MAAM,CAAC,GAAG,IAAI,EAAE;AAChB,IAAA,MAAM,WAAW,GAAGA,cAAK,CAAC,KAAK,EAAE;AACjC,IAAA,MAAM,iBAAiB,GAAGA,cAAK,CAAC,OAAO,CAAC,MAAM,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,CAAC,GAAG,uBAAuB,EAAE;IAE/D,MAAM,eAAe,GAAGA,cAAK,CAAC,OAAO,CAAC,MAAM,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC3F,MAAM,aAAa,GAAGA,cAAK,CAAC,OAAO,CAAC,MAAM,YAAY,CAAC,KAAK,CAA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C,6BAA6B,CAAC,GAC1B,CAAA,EAAA,CACL,KAENA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,gDAAgD,EAAA,QAAA,EAC1D,CAAC,CAAC,4BAA4B,CAAC,EAAA,CAC9B,CACL,CAAA,EAAA,CACa,EAAA,CACT;AAEb;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { format } from 'date-fns';
|
|
4
|
+
import { useT } from '../../../i18n/context.js';
|
|
5
|
+
import '../../../packages/i18n/dist/index.esm.js';
|
|
6
|
+
import { cn } from '../../../lib/utils.js';
|
|
7
|
+
import { Button } from '../../ui/button.js';
|
|
8
|
+
import { Calendar as Calendar$1 } from '../../ui/calendar.js';
|
|
9
|
+
import { ApiFieldLabel } from './api-field-label.js';
|
|
10
|
+
import Calendar from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/calendar.js';
|
|
11
|
+
import X from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js';
|
|
12
|
+
|
|
13
|
+
/** Inline calendar — a popover would close the surrounding dialog on select. */
|
|
14
|
+
function ExpirationDateField({ value, onChange, helpText }) {
|
|
15
|
+
const t = useT();
|
|
16
|
+
const [isCalendarOpen, setIsCalendarOpen] = React__default.useState(false);
|
|
17
|
+
const baseId = React__default.useId();
|
|
18
|
+
const triggerId = `${baseId}-trigger`;
|
|
19
|
+
const labelId = `${baseId}-label`;
|
|
20
|
+
const valueId = `${baseId}-value`;
|
|
21
|
+
return (jsxs("div", { className: "space-y-1.5", children: [jsx(ApiFieldLabel, { htmlFor: triggerId, id: labelId, text: t('apiTabLabels.createModal.expirationLabel'), info: t('apiTabLabels.createModal.expirationInfo') }), jsxs("div", { className: "flex items-center gap-2", children: [jsxs(Button, { id: triggerId, type: "button", variant: "outline", "aria-labelledby": `${labelId} ${valueId}`, "aria-haspopup": "dialog", "aria-expanded": isCalendarOpen, onClick: () => setIsCalendarOpen((open) => !open), className: cn('flex-1 pl-3 text-left font-normal', !value && 'text-muted-foreground'), children: [jsx("span", { id: valueId, children: value ? format(value, 'PPP') : t('apiTabLabels.createModal.expirationPlaceholder') }), jsx(Calendar, { className: "ml-auto h-4 w-4 opacity-50" })] }), value && (jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": t('apiTabTokenPolicies.clearExpiration'), onClick: () => {
|
|
22
|
+
onChange(null);
|
|
23
|
+
setIsCalendarOpen(false);
|
|
24
|
+
}, children: jsx(X, { className: "h-4 w-4" }) }))] }), isCalendarOpen && (jsx("div", { className: "mt-2 w-auto rounded-md border border-gray-200 dark:border-gray-700", children: jsx(Calendar$1, { mode: "single",
|
|
25
|
+
// @ts-expect-error - Calendar selected prop expects Date but the field may be null
|
|
26
|
+
selected: value, onSelect: (date) => {
|
|
27
|
+
// Clicking the selected day means "keep it"; the X clears the date.
|
|
28
|
+
if (date)
|
|
29
|
+
onChange(date);
|
|
30
|
+
setIsCalendarOpen(false);
|
|
31
|
+
}, disabled: (date) => date && date < new Date() }) })), helpText && jsx("p", { className: "text-xs text-muted-foreground", children: helpText })] }));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { ExpirationDateField };
|
|
35
|
+
//# sourceMappingURL=expiration-date-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expiration-date-field.js","sources":["../../../../../../../../src/components/profile/api/expiration-date-field.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx","CalendarIcon","XIcon","Calendar"],"mappings":";;;;;;;;;;;;AAkBA;AACM,SAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAS,EAAA;AACtE,IAAA,MAAM,CAAC,GAAG,IAAI,EAAE;AAChB,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG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JD,GAAA,CAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,MAAM,EAAA,YAAA,EACC,CAAC,CAAC,qCAAqC,CAAC,EACpD,OAAO,EAAE,MAAK;4BACZ,QAAQ,CAAC,IAAI,CAAC;4BACd,iBAAiB,CAAC,KAAK,CAAC;wBAC1B,CAAC,EAAA,QAAA,EAEDA,GAAA,CAACE,CAAK,EAAA,EAAC,SAAS,EAAC,SAAS,EAAA,CAAG,EAAA,CACtB,CACV,CAAA,EAAA,CACG,EACL,cAAc,KACbF,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,oEAAoE,EAAA,QAAA,EACjFA,GAAA,CAACG,UAAQ,EAAA,EACP,IAAI,EAAC,QAAQ;;oBAEb,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,CAAC,IAAI,KAAI;;AAEjB,wBAAA,IAAI,IAAI;4BAAE,QAAQ,CAAC,IAAI,CAAC;wBACxB,iBAAiB,CAAC,KAAK,CAAC;AAC1B,oBAAA,CAAC,EACD,QAAQ,EAAE,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,EAAE,EAAA,CAC7C,EAAA,CACE,CACP,EACA,QAAQ,IAAIH,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,+BAA+B,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAK,CAAA,EAAA,CACpE;AAEV;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { checkRbacPermission } from '@iblai/web-utils';
|
|
4
|
+
import { Button } from '../../ui/button.js';
|
|
5
|
+
import { useT } from '../../../i18n/context.js';
|
|
6
|
+
import '../../../packages/i18n/dist/index.esm.js';
|
|
7
|
+
import { InfoBannerRow, InfoBanner } from '../info-banner.js';
|
|
8
|
+
import { ApiKeysTable } from './api-keys-table.js';
|
|
9
|
+
import { CreateApiModal } from './create-api-modal.js';
|
|
10
|
+
import CodeXml from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/code-xml.js';
|
|
11
|
+
import Plus from '../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/plus.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Listing keys needs `/apitokens/#list`, creating one `/apitokens/#create`.
|
|
15
|
+
*
|
|
16
|
+
* One way to connect exists today, so the banner covers it alone. When a second
|
|
17
|
+
* method ships, the banner becomes a "Ways to Connect" list (one row per method
|
|
18
|
+
* with its name, one sentence and a help link) and the keys table stays under
|
|
19
|
+
* the API row.
|
|
20
|
+
*/
|
|
21
|
+
function ApiTab({ tenantKey, username, enableRbac = false, rbacPermissions = {}, helpUrl, }) {
|
|
22
|
+
const t = useT();
|
|
23
|
+
const canList = checkRbacPermission(rbacPermissions, '/apitokens/#list', enableRbac);
|
|
24
|
+
const canCreate = checkRbacPermission(rbacPermissions, '/apitokens/#create', enableRbac);
|
|
25
|
+
const [createOpen, setCreateOpen] = useState(false);
|
|
26
|
+
return (jsxs("div", { className: "container mx-auto max-w-7xl !mt-0 space-y-4", children: [jsx(InfoBannerRow, { action: canCreate && (jsxs(Button, { size: "sm", onClick: () => setCreateOpen(true), "data-testid": "api-key-create", 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('apiTab.createKey')] })), children: jsxs(InfoBanner, { icon: jsx(CodeXml, { className: "h-5 w-5", "aria-hidden": "true" }), children: [t('apiTab.banner'), helpUrl && (jsxs(Fragment, { children: [' ', jsx("a", { href: helpUrl, target: "_blank", rel: "noopener noreferrer", "aria-label": t('apiTab.helpLinkAriaLabel'), className: "font-medium text-blue-600 underline underline-offset-2 hover:text-blue-700", children: t('apiTab.helpLink') })] }))] }) }), canList ? (jsx(ApiKeysTable, { tenantKey: tenantKey })) : (jsx("p", { className: "text-sm text-gray-600", "data-testid": "api-keys-forbidden", children: t('apiTabLabels.table.noPermission') })), canCreate && (jsx(CreateApiModal, { isOpen: createOpen, onClose: () => setCreateOpen(false), tenantKey: tenantKey, username: username }))] }));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { ApiTab, ApiTab as default };
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../src/components/profile/api/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;AAoBA;;;;;;;AAOG;SACa,MAAM,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,eAAe,GAAG,EAAE,EACpB,OAAO,GACK,EAAA;AACZ,IAAA,MAAM,CAAC,GAAG,IAAI,EAAE;IAChB,MAAM,OAAO,GAAG,mBAAmB,CAAC,eAAe,EAAE,kBAAkB,EAAE,UAAU,CAAC;IACpF,MAAM,SAAS,GAAG,mBAAmB,CAAC,eAAe,EAAE,oBAAoB,EAAE,UAAU,CAAC;IACxF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAEnD,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6CAA6C,EAAA,QAAA,EAAA,CAC1DC,IAAC,aAAa,EAAA,EACZ,MAAM,EACJ,SAAS,KACPD,KAAC,MAAM,EAAA,EACL,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,MAAM,aAAa,CAAC,IAAI,CAAC,EAAA,aAAA,EACtB,gBAAgB,EAC5B,SAAS,EAAC,yFAAyF,aAEnGC,GAAA,CAAC,IAAI,IAAC,SAAS,EAAC,SAAS,EAAA,aAAA,EAAa,MAAM,EAAA,CAAG,EAC9C,CAAC,CAAC,kBAAkB,CAAC,CAAA,EAAA,CACf,CACV,EAAA,QAAA,EAGHD,IAAA,CAAC,UAAU,EAAA,EAAC,IAAI,EAAEC,GAAA,CAAC,OAAO,IAAC,SAAS,EAAC,SAAS,EAAA,aAAA,EAAa,MAAM,EAAA,CAAG,EAAA,QAAA,EAAA,CACjE,CAAC,CAAC,eAAe,CAAC,EAClB,OAAO,KACND,IAAA,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAA,CACG,GAAG,EACJD,GAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAE,OAAO,EACb,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,gBACb,CAAC,CAAC,0BAA0B,CAAC,EACzC,SAAS,EAAC,4EAA4E,EAAA,QAAA,EAErF,CAAC,CAAC,iBAAiB,CAAC,GACnB,CAAA,EAAA,CACH,CACJ,CAAA,EAAA,CACU,EAAA,CACC,EACf,OAAO,IACNA,IAAC,YAAY,EAAA,EAAC,SAAS,EAAE,SAAS,EAAA,CAAI,KAEtCA,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,uBAAuB,iBAAa,oBAAoB,EAAA,QAAA,EAClE,CAAC,CAAC,iCAAiC,CAAC,EAAA,CACnC,CACL,EACA,SAAS,KACRA,GAAA,CAAC,cAAc,EAAA,EACb,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,MAAM,aAAa,CAAC,KAAK,CAAC,EACnC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAA,EAAA,CACG;AAEV;;;;"}
|
|
@@ -2,12 +2,12 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { canWriteField } from '@iblai/web-utils';
|
|
4
4
|
import { useGetRbacPoliciesQuery, useGetRbacGroupsQuery } from '@iblai/data-layer';
|
|
5
|
-
import { useT } from '
|
|
6
|
-
import '
|
|
7
|
-
import { Badge } from '
|
|
8
|
-
import { Label } from '
|
|
9
|
-
import { RadioGroup, RadioGroupItem } from '
|
|
10
|
-
import { SearchableMultiSelect } from '
|
|
5
|
+
import { useT } from '../../../i18n/context.js';
|
|
6
|
+
import '../../../packages/i18n/dist/index.esm.js';
|
|
7
|
+
import { Badge } from '../../ui/badge.js';
|
|
8
|
+
import { Label } from '../../ui/label.js';
|
|
9
|
+
import { RadioGroup, RadioGroupItem } from '../../ui/radio-group.js';
|
|
10
|
+
import { SearchableMultiSelect } from '../../searchable-multiselect.js';
|
|
11
11
|
import { RBAC_PICKER_PAGE_SIZE, API_TOKEN_MODES, RBAC_SEARCH_DEBOUNCE_MS } from './constants.js';
|
|
12
12
|
|
|
13
13
|
function useDebouncedValue(value, delay) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-policy-fields.js","sources":["../../../../../../../../src/components/profile/api/token-policy-fields.tsx"],"sourcesContent":[null],"names":["React","_jsx","_jsxs"],"mappings":";;;;;;;;;;;;AAoCA,SAAS,iBAAiB,CAAI,KAAQ,EAAE,KAAa,EAAA;AACnD,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAGA,cAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AAEjE,IAAAA,cAAK,CAAC,SAAS,CAAC,MAAK;AACnB,QAAA,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QACtE,OAAO,MAAM,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC;AACzC,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAElB,IAAA,OAAO,cAAc;AACvB;AAEA,SAAS,MAAM,CAAC,QAAiB,EAAA;AAC/B,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;AAAE,QAAA,OAAO,QAA0B;IAC9D,MAAM,OAAO,GAAI,QAAkC,KAAA,IAAA,IAAlC,Q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,IAAC,iBAAiB,EAAA,EAChB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,CAAC,CAAC,kCAAkC,CAAC,EAAA,CACjD,CACH,EACDA,GAAA,CAAA,GAAA,EAAA,EAAG,EAAE,EAAE,CAAA,EAAG,QAAQ,CAAA,YAAA,CAAc,EAAE,SAAS,EAAC,+BAA+B,EAAA,QAAA,EACxE,CAAC,CAAC,gCAAgC,CAAC,EAAA,CAClC,CAAA,EAAA,CACA,CAAA,EAAA,CACL,CACJ,CAAA,EAAA,CACG;AAEV;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { FieldInfo } from '../../field-info.js';
|
|
3
|
+
import { Label } from '../../ui/label.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A label row for the API key dialogs. The info icon and the red mark sit
|
|
7
|
+
* beside the label, not inside it, so the field's accessible name is the label alone.
|
|
8
|
+
*/
|
|
9
|
+
function ApiFieldLabel({ htmlFor, id, text, info, required = false, }) {
|
|
10
|
+
return (jsxs("div", { className: "flex items-center gap-2", children: [jsx(Label, { id: id, htmlFor: htmlFor, className: "text-sm font-medium text-[#646464]", children: text }), required && (jsx("span", { className: "-ml-1 text-red-500", "aria-hidden": "true", children: "*" })), jsx(FieldInfo, { label: text, text: info })] }));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ApiFieldLabel };
|
|
14
|
+
//# sourceMappingURL=api-field-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-field-label.js","sources":["../../../../../../../../src/components/profile/api/api-field-label.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;AAKA;;;AAGG;AACG,SAAU,aAAa,CAAC,EAC5B,OAAO,EACP,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,QAAQ,GAAG,KAAK,GAOjB,EAAA;IACC,QACEA,cAAK,SAAS,EAAC,yBAAyB,EAAA,QAAA,EAAA,CACtCC,GAAA,CAAC,KAAK,EAAA,EAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,oCAAoC,EAAA,QAAA,EAC5E,IAAI,EAAA,CACC,EACP,QAAQ,KACPA,cAAM,SAAS,EAAC,oBAAoB,EAAA,aAAA,EAAa,MAAM,EAAA,QAAA,EAAA,GAAA,EAAA,CAEhD,CACR,EACDA,GAAA,CAAC,SAAS,EAAA,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAA,CAAI,CAAA,EAAA,CAClC;AAEV;;;;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { format } from 'date-fns';
|
|
4
|
+
import { useGetApiKeysQuery, unwrapApiTokenList } from '@iblai/data-layer';
|
|
5
|
+
import { useT } from '../../../i18n/context.js';
|
|
6
|
+
import '../../../packages/i18n/dist/index.esm.js';
|
|
7
|
+
import { Button } from '../../ui/button.js';
|
|
8
|
+
import { TooltipIconButton } from '../../tooltip-icon-button.js';
|
|
9
|
+
import { IblPagination } from '../../ibl-pagination.js';
|
|
10
|
+
import { DeleteApiModal } from './delete-api-modal.js';
|
|
11
|
+
import { EditApiModal } from './edit-api-modal.js';
|
|
12
|
+
import { isApiKeysPageGone, isRefusedError } from './api-token-utils.js';
|
|
13
|
+
import { API_KEYS_PAGE_SIZE, API_TOKEN_MODES } from './constants.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
|
+
|
|
17
|
+
const HEADER_CELL_CLASS = 'px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400';
|
|
18
|
+
const TEXT_CELL_CLASS = 'px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300';
|
|
19
|
+
const NO_CREATED_DATE = '—';
|
|
20
|
+
/** The key itself is never listed; it is shown once, when it is created. */
|
|
21
|
+
function ApiKeysTable({ tenantKey }) {
|
|
22
|
+
const t = useT();
|
|
23
|
+
const [page, setPage] = React__default.useState(1);
|
|
24
|
+
const [apiKeyToDelete, setApiKeyToDelete] = React__default.useState(null);
|
|
25
|
+
const [apiKeyToEdit, setApiKeyToEdit] = React__default.useState(null);
|
|
26
|
+
const { data, isLoading: isApiKeysLoading, isFetching, isError, error, refetch, } = useGetApiKeysQuery({
|
|
27
|
+
platformKey: tenantKey,
|
|
28
|
+
page,
|
|
29
|
+
pageSize: API_KEYS_PAGE_SIZE,
|
|
30
|
+
});
|
|
31
|
+
const { tokens: apiKeys, count } = unwrapApiTokenList(data);
|
|
32
|
+
const totalPages = Math.ceil(count / API_KEYS_PAGE_SIZE);
|
|
33
|
+
const isPageGone = isApiKeysPageGone({
|
|
34
|
+
page,
|
|
35
|
+
isFetching,
|
|
36
|
+
isError,
|
|
37
|
+
error,
|
|
38
|
+
isEmpty: apiKeys.length === 0,
|
|
39
|
+
});
|
|
40
|
+
React__default.useEffect(() => {
|
|
41
|
+
if (isPageGone)
|
|
42
|
+
setPage((current) => Math.max(1, current - 1));
|
|
43
|
+
}, [isPageGone]);
|
|
44
|
+
function closeDeleteApiModal() {
|
|
45
|
+
setApiKeyToDelete(null);
|
|
46
|
+
}
|
|
47
|
+
function openDeleteApiModal(apiKey) {
|
|
48
|
+
setApiKeyToDelete(apiKey);
|
|
49
|
+
}
|
|
50
|
+
return (jsxs(Fragment, { children: [jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: HEADER_CELL_CLASS, children: t('apiTabLabels.table.nameColumn') }), jsx("th", { className: HEADER_CELL_CLASS, children: t('apiTabLabels.table.modeColumn') }), jsx("th", { className: HEADER_CELL_CLASS, children: t('apiTabLabels.table.createdColumn') }), jsx("th", { className: HEADER_CELL_CLASS, children: t('apiTabLabels.table.expiresColumn') }), jsx("th", { className: `${HEADER_CELL_CLASS} w-[100px]`, children: jsx("span", { className: "sr-only", children: t('apiTabLabels.table.actionsColumn') }) })] }) }), jsx("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: isApiKeysLoading || isPageGone ? (jsx("tr", { children: jsx("td", { colSpan: 5, className: "px-6 py-8 text-center text-sm text-gray-500", children: t('apiTabLabels.table.loading') }) })) : apiKeys.length === 0 && isError ? (jsx("tr", { children: jsx("td", { colSpan: 5, className: "px-6 py-8 text-center text-sm text-gray-500", children: isRefusedError(error) ? (t('apiTabLabels.table.noPermission')) : (jsxs("div", { className: "flex flex-col items-center gap-3", "data-testid": "api-keys-load-failed", children: [jsx("p", { children: t('apiTabLabels.table.loadFailed') }), jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => void refetch(), children: t('apiTabLabels.table.tryAgain') })] })) }) })) : apiKeys.length === 0 ? (jsx("tr", { children: jsx("td", { colSpan: 5, className: "px-6 py-8 text-center text-sm text-gray-500", children: t('apiTabLabels.table.emptyState') }) })) : (apiKeys.map((apiKey) => {
|
|
51
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52
|
+
return (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-900 dark:text-gray-100", children: apiKey.name }), jsx("td", { className: TEXT_CELL_CLASS, children: apiKey.mode === API_TOKEN_MODES.TOKEN_POLICIES
|
|
53
|
+
? t('apiTabTokenPolicies.tokenPoliciesModeLabel')
|
|
54
|
+
: t('apiTabTokenPolicies.ownerModeLabel') }), jsx("td", { className: TEXT_CELL_CLASS, children: apiKey.created ? format(apiKey.created, 'PPP') : NO_CREATED_DATE }), jsx("td", { className: TEXT_CELL_CLASS, children: apiKey.expires
|
|
55
|
+
? format(apiKey.expires, 'PPP')
|
|
56
|
+
: t('apiTabLabels.table.never') }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex items-center gap-1", children: [((_c = (_b = (_a = apiKey.permissions) === null || _a === void 0 ? void 0 : _a.object) === null || _b === void 0 ? void 0 : _b.write) !== null && _c !== void 0 ? _c : true) && (jsx(TooltipIconButton, { label: t('apiTabEditApiModal.editAriaLabel'), onClick: () => setApiKeyToEdit(apiKey.name), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) })), ((_f = (_e = (_d = apiKey.permissions) === null || _d === void 0 ? void 0 : _d.object) === null || _e === void 0 ? void 0 : _e.delete) !== null && _f !== void 0 ? _f : true) && (jsx(TooltipIconButton, { label: t('apiTabLabels.table.deleteAriaLabel'), onClick: () => openDeleteApiModal({ name: apiKey.name }), className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) }))] }) })] }, apiKey.name));
|
|
57
|
+
})) })] }) }), totalPages > 1 && (jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isApiKeysLoading }))] }), apiKeyToDelete && (jsx(DeleteApiModal, { isOpen: !!apiKeyToDelete, onClose: closeDeleteApiModal, apiKey: apiKeyToDelete, tenantKey: tenantKey })), apiKeyToEdit && (jsx(EditApiModal, { isOpen: !!apiKeyToEdit, onClose: () => setApiKeyToEdit(null), apiKeyName: apiKeyToEdit, tenantKey: tenantKey }))] }));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { ApiKeysTable };
|
|
61
|
+
//# sourceMappingURL=api-keys-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-keys-table.js","sources":["../../../../../../../../src/components/profile/api/api-keys-table.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_Frag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ACpB,CACH,EACA,YAAY,KACXA,GAAA,CAAC,YAAY,IACX,MAAM,EAAE,CAAC,CAAC,YAAY,EACtB,OAAO,EAAE,MAAM,eAAe,CAAC,IAAI,CAAC,EACpC,UAAU,EAAE,YAAY,EACxB,SAAS,EAAE,SAAS,GACpB,CACH,CAAA,EAAA,CACA;AAEP;;;;"}
|
|
@@ -12,9 +12,9 @@ import { Input } from '../../../../ui/input.js';
|
|
|
12
12
|
import { Label } from '../../../../ui/label.js';
|
|
13
13
|
import { Button } from '../../../../ui/button.js';
|
|
14
14
|
import { Calendar as Calendar$1 } from '../../../../ui/calendar.js';
|
|
15
|
-
import { API_TOKEN_MODES, DENIED_TOKEN_POLICY_PERMISSIONS } from '../../../../profile/
|
|
16
|
-
import { secondsUntil, buildTokenPolicyPayload } from '../../../../profile/
|
|
17
|
-
import { TokenPolicyFields } from '../../../../profile/
|
|
15
|
+
import { API_TOKEN_MODES, DENIED_TOKEN_POLICY_PERMISSIONS } from '../../../../profile/api/constants.js';
|
|
16
|
+
import { secondsUntil, buildTokenPolicyPayload } from '../../../../profile/api/api-token-utils.js';
|
|
17
|
+
import { TokenPolicyFields } from '../../../../profile/api/token-policy-fields.js';
|
|
18
18
|
import { ApiKeyModal } from './api-key-modal.js';
|
|
19
19
|
import Calendar from '../../../../../node_modules/.pnpm/lucide-react@0.528.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/calendar.js';
|
|
20
20
|
|
|
@@ -43,7 +43,7 @@ function CreateApiModal({ isOpen, onClose, tenantKey, username, executeGatedActi
|
|
|
43
43
|
const form = useForm({
|
|
44
44
|
defaultValues: createApiFormDefaultValues,
|
|
45
45
|
validators: {
|
|
46
|
-
// Validating the empty defaults keeps
|
|
46
|
+
// Validating the empty defaults keeps the button disabled until a name is
|
|
47
47
|
// entered, instead of a first click on a pristine form doing nothing.
|
|
48
48
|
onMount: createApiFormSchema,
|
|
49
49
|
onChange: createApiFormSchema,
|
|
@@ -5,52 +5,54 @@ const AGENT_API_TAB_LABELS = {
|
|
|
5
5
|
title: 'API',
|
|
6
6
|
description: 'Manage API keys and integrations.',
|
|
7
7
|
},
|
|
8
|
-
infoBox: 'Use this agent from your own apps.
|
|
8
|
+
infoBox: 'Use this agent from your own apps. Add API keys here to call it programmatically and build it into your product or workflow.',
|
|
9
9
|
disclaimer: {
|
|
10
10
|
lineOne: 'Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.',
|
|
11
11
|
lineTwo: 'Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, IBL may also automatically rotate any API key that we\u2019ve found has leaked publicly.',
|
|
12
12
|
},
|
|
13
13
|
table: {
|
|
14
|
-
nameColumn: '
|
|
15
|
-
modeColumn: '
|
|
14
|
+
nameColumn: 'Name',
|
|
15
|
+
modeColumn: 'Permission Mode',
|
|
16
16
|
ownerMode: 'Owner permissions',
|
|
17
17
|
tokenPoliciesMode: 'Token policies',
|
|
18
|
-
createdColumn: '
|
|
19
|
-
expiresColumn: '
|
|
18
|
+
createdColumn: 'Created',
|
|
19
|
+
expiresColumn: 'Expires',
|
|
20
20
|
actionsColumn: 'Actions',
|
|
21
|
-
emptyState: 'No API keys
|
|
22
|
-
noPermission: 'You do not have permission to view API keys',
|
|
21
|
+
emptyState: 'No API keys yet.',
|
|
22
|
+
noPermission: 'You do not have permission to view API keys.',
|
|
23
23
|
editAriaLabel: 'Edit API Key',
|
|
24
24
|
deleteAriaLabel: 'Delete API Key',
|
|
25
25
|
notAvailable: 'N/A',
|
|
26
|
+
loadFailed: 'Your API keys could not be loaded. Try again in a moment.',
|
|
27
|
+
tryAgain: 'Try Again',
|
|
26
28
|
},
|
|
27
29
|
actions: {
|
|
28
|
-
createNew: '
|
|
30
|
+
createNew: 'Add API Key',
|
|
29
31
|
},
|
|
30
32
|
createModal: {
|
|
31
|
-
title: '
|
|
33
|
+
title: 'Add API Key',
|
|
32
34
|
description: "Name your key and optionally set an expiry date. You'll only see the key once.",
|
|
33
35
|
nameLabel: 'API Key Name',
|
|
34
|
-
namePlaceholder: '
|
|
35
|
-
nameRequired: '
|
|
36
|
-
nameInvalid: '
|
|
36
|
+
namePlaceholder: 'my-script',
|
|
37
|
+
nameRequired: 'Enter a name for this key.',
|
|
38
|
+
nameInvalid: 'Use letters, numbers, hyphens and underscores only, like my-script.',
|
|
37
39
|
expirationLabel: 'Expiration Date',
|
|
38
40
|
expirationPlaceholder: 'Pick a date',
|
|
39
|
-
submit: '
|
|
40
|
-
submitting: '
|
|
41
|
+
submit: 'Add API Key',
|
|
42
|
+
submitting: 'Adding...',
|
|
41
43
|
cancel: 'Cancel',
|
|
42
|
-
successToast: 'API
|
|
43
|
-
errorToast: 'Failed to
|
|
44
|
+
successToast: 'API key added',
|
|
45
|
+
errorToast: 'Failed to add API key',
|
|
44
46
|
},
|
|
45
47
|
deleteModal: {
|
|
46
48
|
title: 'Delete API Key',
|
|
47
|
-
confirmation: 'Are you sure you want to delete the API
|
|
49
|
+
confirmation: 'Are you sure you want to delete the API key with the name {name}? This action cannot be undone.',
|
|
48
50
|
warning: 'Any app or integration using this key will stop working immediately.',
|
|
49
51
|
cancel: 'Cancel',
|
|
50
52
|
confirm: 'Delete',
|
|
51
53
|
confirming: 'Deleting...',
|
|
52
|
-
successToast: 'API
|
|
53
|
-
errorToast: 'Failed to delete API
|
|
54
|
+
successToast: 'API key deleted successfully',
|
|
55
|
+
errorToast: 'Failed to delete API key',
|
|
54
56
|
},
|
|
55
57
|
apiKeyModal: {
|
|
56
58
|
title: 'API Key',
|
|
@@ -85,6 +87,8 @@ function buildApiTabLabels(t) {
|
|
|
85
87
|
editAriaLabel: t('apiTabEditApiModal.editAriaLabel'),
|
|
86
88
|
deleteAriaLabel: t('apiTabLabels.table.deleteAriaLabel'),
|
|
87
89
|
notAvailable: t('apiTabLabels.table.notAvailable'),
|
|
90
|
+
loadFailed: t('apiTabLabels.table.loadFailed'),
|
|
91
|
+
tryAgain: t('apiTabLabels.table.tryAgain'),
|
|
88
92
|
},
|
|
89
93
|
actions: {
|
|
90
94
|
createNew: t('apiTabLabels.actions.createNew'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.js","sources":["../../../../../../../../../../src/components/modals/edit-mentor-modal/tabs/api-tab/labels.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"labels.js","sources":["../../../../../../../../../../src/components/modals/edit-mentor-modal/tabs/api-tab/labels.ts"],"sourcesContent":[null],"names":[],"mappings":";;AA2EO,MAAM,oBAAoB,GAAiB;AAChD,IAAA,MAAM,EAAE;AACN,QAAA,KAAK,EAAE,KAAK;AACZ,QAAA,WAAW,EAAE,mCAAmC;AACjD,KAAA;AACD,IAAA,OAAO,EACL,8HAA8H;AAChI,IAAA,UAAU,EAAE;AACV,QAAA,OAAO,EACL,+HAA+H;AACjI,QAAA,OAAO,EACL,0OAA0O;AAC7O,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,UAAU,EAAE,MAAM;AAClB,QAAA,UAAU,EAAE,iBAAiB;AAC7B,QAAA,SAAS,EAAE,mBAAmB;AAC9B,QAAA,iBAAiB,EAAE,gBAAgB;AACnC,QAAA,aAAa,EAAE,SAAS;AACxB,QAAA,aAAa,EAAE,SAAS;AACxB,QAAA,aAAa,EAAE,SAAS;AACxB,QAAA,UAAU,EAAE,kBAAkB;AAC9B,QAAA,YAAY,EAAE,8CAA8C;AAC5D,QAAA,aAAa,EAAE,cAAc;AAC7B,QAAA,eAAe,EAAE,gBAAgB;AACjC,QAAA,YAAY,EAAE,KAAK;AACnB,QAAA,UAAU,EAAE,2DAA2D;AACvE,QAAA,QAAQ,EAAE,WAAW;AACtB,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,SAAS,EAAE,aAAa;AACzB,KAAA;AACD,IAAA,WAAW,EAAE;AACX,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,WAAW,EAAE,gFAAgF;AAC7F,QAAA,SAAS,EAAE,cAAc;AACzB,QAAA,e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