@alepha/ui 0.26.0 → 0.27.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/README.md +86 -12
- package/dist/components/account/account-connections.js +5 -5
- package/dist/components/account/account-connections.js.map +1 -1
- package/dist/components/account/account-delete-dialog.js +4 -4
- package/dist/components/account/account-header.d.ts.map +1 -1
- package/dist/components/account/account-header.js +3 -1
- package/dist/components/account/account-header.js.map +1 -1
- package/dist/components/account/account-keys.js +7 -7
- package/dist/components/account/account-keys.js.map +1 -1
- package/dist/components/account/account-layout.d.ts.map +1 -1
- package/dist/components/account/account-layout.js +7 -4
- package/dist/components/account/account-layout.js.map +1 -1
- package/dist/components/account/account-password-dialog.js +3 -3
- package/dist/components/account/account-profile.js +8 -8
- package/dist/components/account/account-profile.js.map +1 -1
- package/dist/components/account/account-router-options.d.ts.map +1 -1
- package/dist/components/account/account-router-options.js.map +1 -1
- package/dist/components/account/account-router-page.d.ts.map +1 -1
- package/dist/components/account/account-router-page.js.map +1 -1
- package/dist/components/account/account-router.d.ts +3 -2
- package/dist/components/account/account-router.d.ts.map +1 -1
- package/dist/components/account/account-router.js +4 -3
- package/dist/components/account/account-router.js.map +1 -1
- package/dist/components/account/account-security.d.ts.map +1 -1
- package/dist/components/account/account-security.js +6 -6
- package/dist/components/account/account-security.js.map +1 -1
- package/dist/components/account/account-sessions.d.ts.map +1 -1
- package/dist/components/account/account-sessions.js +19 -6
- package/dist/components/account/account-sessions.js.map +1 -1
- package/dist/components/admin/admin-analytics-query-panel.d.ts +1 -1
- package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-analytics-query-panel.js +5 -5
- package/dist/components/admin/admin-analytics-query-panel.js.map +1 -1
- package/dist/components/admin/admin-analytics-results.d.ts +1 -1
- package/dist/components/admin/admin-analytics-results.d.ts.map +1 -1
- package/dist/components/admin/admin-analytics-results.js +2 -2
- package/dist/components/admin/admin-analytics-results.js.map +1 -1
- package/dist/components/admin/admin-analytics.d.ts +1 -1
- package/dist/components/admin/admin-analytics.d.ts.map +1 -1
- package/dist/components/admin/admin-analytics.js +3 -3
- package/dist/components/admin/admin-analytics.js.map +1 -1
- package/dist/components/admin/admin-audits.d.ts +1 -1
- package/dist/components/admin/admin-audits.d.ts.map +1 -1
- package/dist/components/admin/admin-audits.js +4 -4
- package/dist/components/admin/admin-audits.js.map +1 -1
- package/dist/components/admin/admin-dashboard-card.d.ts +42 -0
- package/dist/components/admin/admin-dashboard-card.d.ts.map +1 -0
- package/dist/components/admin/admin-dashboard-card.js +0 -0
- package/dist/components/admin/admin-dashboard-count-card.d.ts +34 -0
- package/dist/components/admin/admin-dashboard-count-card.d.ts.map +1 -0
- package/dist/components/admin/admin-dashboard-count-card.js +42 -0
- package/dist/components/admin/admin-dashboard-count-card.js.map +1 -0
- package/dist/components/admin/admin-dashboard.d.ts +20 -0
- package/dist/components/admin/admin-dashboard.d.ts.map +1 -0
- package/dist/components/admin/admin-dashboard.js +32 -0
- package/dist/components/admin/admin-dashboard.js.map +1 -0
- package/dist/components/admin/admin-files.d.ts +1 -1
- package/dist/components/admin/admin-files.d.ts.map +1 -1
- package/dist/components/admin/admin-files.js +3 -3
- package/dist/components/admin/admin-files.js.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.d.ts +2 -2
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.js +16 -31
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-jobs-status-badge.d.ts +2 -2
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-status-badge.js +2 -2
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
- package/dist/components/admin/admin-jobs.d.ts +1 -1
- package/dist/components/admin/admin-jobs.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs.js +5 -5
- package/dist/components/admin/admin-jobs.js.map +1 -1
- package/dist/components/admin/admin-keys-token-dialog.js +3 -3
- package/dist/components/admin/admin-keys-token-dialog.js.map +1 -1
- package/dist/components/admin/admin-keys.d.ts +1 -1
- package/dist/components/admin/admin-keys.d.ts.map +1 -1
- package/dist/components/admin/admin-keys.js +4 -4
- package/dist/components/admin/admin-keys.js.map +1 -1
- package/dist/components/admin/admin-layout.d.ts.map +1 -1
- package/dist/components/admin/admin-layout.js +1 -3
- package/dist/components/admin/admin-layout.js.map +1 -1
- package/dist/components/admin/admin-notifications.d.ts +1 -1
- package/dist/components/admin/admin-notifications.d.ts.map +1 -1
- package/dist/components/admin/admin-notifications.js +3 -3
- package/dist/components/admin/admin-notifications.js.map +1 -1
- package/dist/components/admin/admin-parameters.d.ts +1 -1
- package/dist/components/admin/admin-parameters.d.ts.map +1 -1
- package/dist/components/admin/admin-parameters.js +10 -10
- package/dist/components/admin/admin-parameters.js.map +1 -1
- package/dist/components/admin/admin-payments.d.ts +1 -1
- package/dist/components/admin/admin-payments.d.ts.map +1 -1
- package/dist/components/admin/admin-payments.js +3 -3
- package/dist/components/admin/admin-payments.js.map +1 -1
- package/dist/components/admin/admin-router-options.d.ts +13 -10
- package/dist/components/admin/admin-router-options.d.ts.map +1 -1
- package/dist/components/admin/admin-router-options.js.map +1 -1
- package/dist/components/admin/admin-router-page.d.ts +7 -5
- package/dist/components/admin/admin-router-page.d.ts.map +1 -1
- package/dist/components/admin/admin-router-page.js +7 -5
- package/dist/components/admin/admin-router-page.js.map +1 -1
- package/dist/components/admin/admin-router.d.ts +72 -27
- package/dist/components/admin/admin-router.d.ts.map +1 -1
- package/dist/components/admin/admin-router.js +103 -40
- package/dist/components/admin/admin-router.js.map +1 -1
- package/dist/components/admin/admin-sessions.d.ts +1 -1
- package/dist/components/admin/admin-sessions.d.ts.map +1 -1
- package/dist/components/admin/admin-sessions.js +12 -4
- package/dist/components/admin/admin-sessions.js.map +1 -1
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts +2 -2
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts +4 -3
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-identity-aside.js +13 -69
- package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -1
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -1
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -1
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-security-tab.js +2 -2
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +2 -2
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail.js +68 -111
- package/dist/components/admin/admin-user-detail.js.map +1 -1
- package/dist/components/admin/admin-users-roles-picker.d.ts +6 -1
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -1
- package/dist/components/admin/admin-users-roles-picker.js +11 -8
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -1
- package/dist/components/admin/admin-users.d.ts.map +1 -1
- package/dist/components/admin/admin-users.js +9 -12
- package/dist/components/admin/admin-users.js.map +1 -1
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +2 -2
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-execution-sheet.js +10 -10
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -1
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +2 -2
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-executions-panel.js +20 -44
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-workflows-status-badge.d.ts +2 -2
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-status-badge.js +2 -2
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
- package/dist/components/admin/admin-workflows.d.ts +1 -1
- package/dist/components/admin/admin-workflows.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows.js +5 -5
- package/dist/components/admin/admin-workflows.js.map +1 -1
- package/dist/components/admin/diff-lines.js +1 -1
- package/dist/components/admin/diff-lines.js.map +1 -1
- package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -1
- package/dist/components/admin/parameter-diff-dialog.js +1 -1
- package/dist/components/admin/parameter-diff-dialog.js.map +1 -1
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -1
- package/dist/components/admin/parameter-history-item.js +4 -4
- package/dist/components/admin/parameter-history-item.js.map +1 -1
- package/dist/components/admin/parameter-json-dialog.js +1 -1
- package/dist/components/admin/parameter-save-dialog.js +2 -2
- package/dist/components/admin/use-confirmed-action.js +1 -1
- package/dist/components/alepha-table/alepha-table.d.ts +103 -8
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
- package/dist/components/alepha-table/alepha-table.js +128 -26
- package/dist/components/alepha-table/alepha-table.js.map +1 -1
- package/dist/components/alepha-table/paginate-local.d.ts +43 -0
- package/dist/components/alepha-table/paginate-local.d.ts.map +1 -0
- package/dist/components/alepha-table/paginate-local.js +84 -0
- package/dist/components/alepha-table/paginate-local.js.map +1 -0
- package/dist/components/app-actions/app-actions.js +1 -1
- package/dist/components/app-shell/app-shell.d.ts +10 -1
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/app-shell.js +27 -20
- package/dist/components/app-shell/app-shell.js.map +1 -1
- package/dist/components/auth/auth-login.d.ts +1 -1
- package/dist/components/auth/auth-login.d.ts.map +1 -1
- package/dist/components/auth/auth-login.js +7 -18
- package/dist/components/auth/auth-login.js.map +1 -1
- package/dist/components/auth/auth-register.d.ts +1 -1
- package/dist/components/auth/auth-register.d.ts.map +1 -1
- package/dist/components/auth/auth-register.js +20 -21
- package/dist/components/auth/auth-register.js.map +1 -1
- package/dist/components/auth/auth-reset-password.d.ts +1 -1
- package/dist/components/auth/auth-reset-password.d.ts.map +1 -1
- package/dist/components/auth/auth-reset-password.js +16 -13
- package/dist/components/auth/auth-reset-password.js.map +1 -1
- package/dist/components/auth/auth-router.d.ts +3 -3
- package/dist/components/auth/auth-router.d.ts.map +1 -1
- package/dist/components/auth/auth-router.js +3 -3
- package/dist/components/auth/auth-router.js.map +1 -1
- package/dist/components/auth/auth-verify-email.d.ts +1 -1
- package/dist/components/auth/auth-verify-email.d.ts.map +1 -1
- package/dist/components/auth/auth-verify-email.js +8 -8
- package/dist/components/auth/auth-verify-email.js.map +1 -1
- package/dist/components/auth/safe-redirect.d.ts +9 -0
- package/dist/components/auth/safe-redirect.d.ts.map +1 -0
- package/dist/components/auth/safe-redirect.js +19 -0
- package/dist/components/auth/safe-redirect.js.map +1 -0
- package/dist/components/auto-form/auto-form.d.ts.map +1 -1
- package/dist/components/auto-form/auto-form.js +32 -32
- package/dist/components/auto-form/auto-form.js.map +1 -1
- package/dist/components/brand-icon/brand-icon.d.ts +1 -1
- package/dist/components/brand-icon/brand-icon.d.ts.map +1 -1
- package/dist/components/brand-icon/brand-icon.js +2 -2
- package/dist/components/brand-icon/brand-icon.js.map +1 -1
- package/dist/components/button-dark/button-dark.d.ts +1 -1
- package/dist/components/button-dark/button-dark.d.ts.map +1 -1
- package/dist/components/button-dark/button-dark.js +2 -2
- package/dist/components/button-dark/button-dark.js.map +1 -1
- package/dist/components/button-language/button-language.d.ts +1 -1
- package/dist/components/button-language/button-language.d.ts.map +1 -1
- package/dist/components/button-language/button-language.js +2 -2
- package/dist/components/button-language/button-language.js.map +1 -1
- package/dist/components/button-theme/button-theme.d.ts +1 -1
- package/dist/components/button-theme/button-theme.d.ts.map +1 -1
- package/dist/components/button-theme/button-theme.js +3 -3
- package/dist/components/button-theme/button-theme.js.map +1 -1
- package/dist/components/button-user/button-user.d.ts +2 -20
- package/dist/components/button-user/button-user.d.ts.map +1 -1
- package/dist/components/button-user/button-user.js +3 -3
- package/dist/components/button-user/button-user.js.map +1 -1
- package/dist/components/captcha/turnstile-widget.d.ts +2 -2
- package/dist/components/captcha/turnstile-widget.d.ts.map +1 -1
- package/dist/components/captcha/turnstile-widget.js +5 -4
- package/dist/components/captcha/turnstile-widget.js.map +1 -1
- package/dist/components/control/control.d.ts +1 -1
- package/dist/components/control/control.d.ts.map +1 -1
- package/dist/components/control/control.js +8 -11
- package/dist/components/control/control.js.map +1 -1
- package/dist/components/control-array/control-array.d.ts +1 -1
- package/dist/components/control-array/control-array.d.ts.map +1 -1
- package/dist/components/control-array/control-array.js +23 -16
- package/dist/components/control-array/control-array.js.map +1 -1
- package/dist/components/control-base/field-i18n.d.ts +5 -3
- package/dist/components/control-base/field-i18n.d.ts.map +1 -1
- package/dist/components/control-base/field-i18n.js +4 -2
- package/dist/components/control-base/field-i18n.js.map +1 -1
- package/dist/components/control-base/form-field.d.ts +7 -7
- package/dist/components/control-base/form-field.d.ts.map +1 -1
- package/dist/components/control-base/form-field.js +10 -10
- package/dist/components/control-base/form-field.js.map +1 -1
- package/dist/components/control-base/icon-hint.d.ts +1 -1
- package/dist/components/control-base/icon-hint.d.ts.map +1 -1
- package/dist/components/control-base/icon-hint.js.map +1 -1
- package/dist/components/control-date/control-date.d.ts +1 -1
- package/dist/components/control-date/control-date.d.ts.map +1 -1
- package/dist/components/control-date/control-date.js +23 -7
- package/dist/components/control-date/control-date.js.map +1 -1
- package/dist/components/control-number/control-number.d.ts +2 -2
- package/dist/components/control-number/control-number.d.ts.map +1 -1
- package/dist/components/control-number/control-number.js +3 -3
- package/dist/components/control-number/control-number.js.map +1 -1
- package/dist/components/control-object/control-object.d.ts +4 -2
- package/dist/components/control-object/control-object.d.ts.map +1 -1
- package/dist/components/control-object/control-object.js +8 -8
- package/dist/components/control-object/control-object.js.map +1 -1
- package/dist/components/control-password/control-password.js +2 -3
- package/dist/components/control-password/control-password.js.map +1 -1
- package/dist/components/control-select/control-select.d.ts +2 -2
- package/dist/components/control-select/control-select.d.ts.map +1 -1
- package/dist/components/control-select/control-select.js +17 -17
- package/dist/components/control-select/control-select.js.map +1 -1
- package/dist/components/control-upload/control-upload.d.ts +1 -1
- package/dist/components/control-upload/control-upload.d.ts.map +1 -1
- package/dist/components/control-upload/control-upload.js +11 -11
- package/dist/components/control-upload/control-upload.js.map +1 -1
- package/dist/components/detail/detail-aside.d.ts +58 -0
- package/dist/components/detail/detail-aside.d.ts.map +1 -0
- package/dist/components/detail/detail-aside.js +95 -0
- package/dist/components/detail/detail-aside.js.map +1 -0
- package/dist/components/detail/detail-layout.d.ts +90 -0
- package/dist/components/detail/detail-layout.d.ts.map +1 -0
- package/dist/components/detail/detail-layout.js +102 -0
- package/dist/components/detail/detail-layout.js.map +1 -0
- package/dist/components/detail/use-detail-tab.d.ts +15 -0
- package/dist/components/detail/use-detail-tab.d.ts.map +1 -0
- package/dist/components/detail/use-detail-tab.js +37 -0
- package/dist/components/detail/use-detail-tab.js.map +1 -0
- package/dist/components/file-image/file-image.d.ts.map +1 -1
- package/dist/components/file-image/file-image.js.map +1 -1
- package/dist/components/language-toggle/language-toggle.d.ts +1 -1
- package/dist/components/language-toggle/language-toggle.d.ts.map +1 -1
- package/dist/components/language-toggle/language-toggle.js +2 -2
- package/dist/components/language-toggle/language-toggle.js.map +1 -1
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts +28 -0
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js +25 -0
- package/dist/components/markdown-view/diagram/DiagramErrorBoundary.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +44 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js +98 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts +14 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +45 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts +19 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +69 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +23 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js +34 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts +17 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +63 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -0
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts +30 -0
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/MermaidFence.js +30 -0
- package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -0
- package/dist/components/markdown-view/diagram/flowchartParser.d.ts +18 -0
- package/dist/components/markdown-view/diagram/flowchartParser.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/flowchartParser.js +370 -0
- package/dist/components/markdown-view/diagram/flowchartParser.js.map +1 -0
- package/dist/components/markdown-view/diagram/graphModel.d.ts +67 -0
- package/dist/components/markdown-view/diagram/graphModel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/graphModel.js +0 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts +109 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.js +185 -0
- package/dist/components/markdown-view/diagram/layoutFlowchart.js.map +1 -0
- package/dist/components/markdown-view/diagram/textMetrics.d.ts +63 -0
- package/dist/components/markdown-view/diagram/textMetrics.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/textMetrics.js +228 -0
- package/dist/components/markdown-view/diagram/textMetrics.js.map +1 -0
- package/dist/components/markdown-view/markdown-view.d.ts +32 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
- package/dist/components/markdown-view/markdown-view.js +85 -9
- package/dist/components/markdown-view/markdown-view.js.map +1 -1
- package/dist/components/nav-shell/nav-shell.d.ts +1 -1
- package/dist/components/nav-shell/nav-shell.d.ts.map +1 -1
- package/dist/components/nav-shell/nav-shell.js +1 -1
- package/dist/components/nav-shell/nav-shell.js.map +1 -1
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
- package/dist/components/nav-shell/spotlight.js.map +1 -1
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
- package/dist/components/nav-shell/use-nav-entries.d.ts +15 -5
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-entries.js +1 -1
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
- package/dist/components/settings/settings-card-edge.d.ts +25 -0
- package/dist/components/settings/settings-card-edge.d.ts.map +1 -0
- package/dist/components/settings/settings-card-edge.js +29 -0
- package/dist/components/settings/settings-card-edge.js.map +1 -0
- package/dist/components/settings/settings-danger-section.d.ts.map +1 -1
- package/dist/components/settings/settings-danger-section.js +2 -1
- package/dist/components/settings/settings-danger-section.js.map +1 -1
- package/dist/components/settings/settings-layout.d.ts.map +1 -1
- package/dist/components/settings/settings-layout.js +1 -1
- package/dist/components/settings/settings-layout.js.map +1 -1
- package/dist/components/settings/settings-nav.d.ts.map +1 -1
- package/dist/components/settings/settings-nav.js +3 -3
- package/dist/components/settings/settings-nav.js.map +1 -1
- package/dist/components/settings/settings-row.js +2 -2
- package/dist/components/settings/settings-row.js.map +1 -1
- package/dist/components/settings/settings-section.d.ts.map +1 -1
- package/dist/components/settings/settings-section.js +3 -2
- package/dist/components/settings/settings-section.js.map +1 -1
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js +5 -5
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.js +2 -2
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +13 -2
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +51 -12
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.js +3 -3
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button-group.js +2 -2
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +8 -8
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +20 -10
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +7 -6
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox.js +8 -8
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +6 -6
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.js +8 -8
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.js +4 -4
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.js +4 -4
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js +9 -9
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.js +2 -2
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/hover-card.js +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +3 -3
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.js +3 -3
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.js +3 -3
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.js +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.js +9 -9
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.js +7 -7
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.js +3 -3
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.js +2 -2
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/segmented.d.ts.map +1 -1
- package/dist/components/ui/segmented.js +1 -1
- package/dist/components/ui/segmented.js.map +1 -1
- package/dist/components/ui/select.js +8 -8
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js +3 -3
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.js +17 -17
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +5 -5
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.js +2 -2
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +13 -7
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +10 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +13 -3
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/use-dialog/use-dialog.d.ts +2 -2
- package/dist/components/use-dialog/use-dialog.d.ts.map +1 -1
- package/dist/components/use-dialog/use-dialog.js +10 -6
- package/dist/components/use-dialog/use-dialog.js.map +1 -1
- package/dist/components/use-toast/use-toast.d.ts +9 -3
- package/dist/components/use-toast/use-toast.d.ts.map +1 -1
- package/dist/components/use-toast/use-toast.js +23 -22
- package/dist/components/use-toast/use-toast.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +10 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +19 -12
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/lib/i18n-fr.d.ts +3 -3
- package/dist/lib/i18n-fr.d.ts.map +1 -1
- package/dist/lib/i18n-fr.js +13 -8
- package/dist/lib/i18n-fr.js.map +1 -1
- package/dist/styles.css +5 -5
- package/package.json +46 -45
- package/src/components/account/__tests__/account-router.spec.ts +4 -2
- package/src/components/account/account-connections.tsx +1 -1
- package/src/components/account/account-header.tsx +6 -1
- package/src/components/account/account-keys.tsx +1 -1
- package/src/components/account/account-layout.tsx +8 -1
- package/src/components/account/account-profile.tsx +3 -3
- package/src/components/account/account-router-options.tsx +1 -0
- package/src/components/account/account-router-page.tsx +1 -0
- package/src/components/account/account-router.tsx +4 -2
- package/src/components/account/account-security.tsx +1 -0
- package/src/components/account/account-sessions.tsx +21 -4
- package/src/components/admin/__tests__/admin-keys-token-dialog.browser.spec.tsx +1 -0
- package/src/components/admin/__tests__/admin-layout.browser.spec.tsx +2 -1
- package/src/components/admin/__tests__/admin-router-page.spec.ts +2 -1
- package/src/components/admin/__tests__/admin-router.spec.ts +57 -1
- package/src/components/admin/__tests__/admin-user-cell.browser.spec.tsx +1 -0
- package/src/components/admin/__tests__/admin-user-detail.spec.ts +1 -0
- package/src/components/admin/admin-analytics-query-panel.tsx +4 -3
- package/src/components/admin/admin-analytics-results.tsx +2 -2
- package/src/components/admin/admin-analytics.tsx +3 -3
- package/src/components/admin/admin-audits.tsx +3 -3
- package/src/components/admin/admin-dashboard-card.tsx +45 -0
- package/src/components/admin/admin-dashboard-count-card.tsx +89 -0
- package/src/components/admin/admin-dashboard.tsx +60 -0
- package/src/components/admin/admin-files.tsx +2 -2
- package/src/components/admin/admin-jobs-executions-panel.tsx +19 -12
- package/src/components/admin/admin-jobs-status-badge.tsx +2 -2
- package/src/components/admin/admin-jobs.tsx +4 -4
- package/src/components/admin/admin-keys-token-dialog.tsx +2 -2
- package/src/components/admin/admin-keys.tsx +2 -2
- package/src/components/admin/admin-layout.tsx +1 -2
- package/src/components/admin/admin-notifications.tsx +2 -2
- package/src/components/admin/admin-parameters.tsx +16 -9
- package/src/components/admin/admin-payments.tsx +2 -2
- package/src/components/admin/admin-router-options.tsx +14 -10
- package/src/components/admin/admin-router-page.tsx +8 -5
- package/src/components/admin/admin-router.tsx +112 -40
- package/src/components/admin/admin-sessions.tsx +13 -2
- package/src/components/admin/admin-user-detail-audits-tab.tsx +5 -2
- package/src/components/admin/admin-user-detail-identity-aside.tsx +16 -93
- package/src/components/admin/admin-user-detail-overview-tab.tsx +1 -0
- package/src/components/admin/admin-user-detail-password-dialog.tsx +1 -0
- package/src/components/admin/admin-user-detail-profile-policy.spec.ts +1 -0
- package/src/components/admin/admin-user-detail-profile-policy.ts +1 -0
- package/src/components/admin/admin-user-detail-security-tab.tsx +1 -0
- package/src/components/admin/admin-user-detail-sessions-tab.tsx +5 -2
- package/src/components/admin/admin-user-detail.tsx +49 -87
- package/src/components/admin/admin-users-roles-picker.tsx +22 -15
- package/src/components/admin/admin-users.tsx +8 -14
- package/src/components/admin/admin-workflows-execution-sheet.tsx +18 -10
- package/src/components/admin/admin-workflows-executions-panel.tsx +24 -17
- package/src/components/admin/admin-workflows-status-badge.tsx +4 -2
- package/src/components/admin/admin-workflows.tsx +6 -4
- package/src/components/admin/diff-lines.spec.ts +1 -0
- package/src/components/admin/diff-lines.ts +1 -1
- package/src/components/admin/parameter-diff-dialog.tsx +3 -2
- package/src/components/admin/parameter-history-item.tsx +6 -5
- package/src/components/alepha-table/__tests__/alepha-table-static.browser.spec.tsx +190 -0
- package/src/components/alepha-table/__tests__/paginate-local.spec.ts +286 -0
- package/src/components/alepha-table/__tests__/use-table-selection.browser.spec.tsx +1 -0
- package/src/components/alepha-table/alepha-table.tsx +362 -79
- package/src/components/alepha-table/paginate-local.ts +174 -0
- package/src/components/app-actions/__tests__/app-actions.browser.spec.tsx +1 -0
- package/src/components/app-shell/app-shell.tsx +42 -19
- package/src/components/auth/__tests__/auth-router.spec.ts +2 -1
- package/src/components/auth/auth-login.tsx +5 -16
- package/src/components/auth/auth-register.tsx +26 -25
- package/src/components/auth/auth-reset-password.tsx +24 -17
- package/src/components/auth/auth-router.tsx +4 -3
- package/src/components/auth/auth-verify-email.tsx +7 -7
- package/src/components/auth/safe-redirect.ts +14 -0
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +1 -0
- package/src/components/auto-form/auto-form.tsx +60 -39
- package/src/components/brand-icon/brand-icon.tsx +2 -2
- package/src/components/button-dark/button-dark.tsx +2 -2
- package/src/components/button-language/button-language.tsx +2 -2
- package/src/components/button-theme/button-theme.tsx +2 -2
- package/src/components/button-user/button-user.tsx +4 -4
- package/src/components/captcha/turnstile-widget.tsx +6 -5
- package/src/components/control/control.tsx +6 -6
- package/src/components/control-array/control-array.tsx +28 -15
- package/src/components/control-base/__tests__/form-field-a11y.browser.spec.tsx +1 -0
- package/src/components/control-base/field-i18n.ts +5 -3
- package/src/components/control-base/form-field.tsx +13 -13
- package/src/components/control-base/icon-hint.tsx +1 -1
- package/src/components/control-date/control-date.tsx +29 -6
- package/src/components/control-number/control-number.tsx +3 -3
- package/src/components/control-object/control-object.tsx +11 -8
- package/src/components/control-password/control-password.tsx +2 -2
- package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +1 -0
- package/src/components/control-select/__tests__/control-select-deselect.browser.spec.tsx +1 -0
- package/src/components/control-select/__tests__/control-select-searchable.browser.spec.tsx +1 -0
- package/src/components/control-select/control-select.tsx +32 -18
- package/src/components/control-upload/control-upload.tsx +16 -10
- package/src/components/detail/__tests__/detail-aside.browser.spec.tsx +135 -0
- package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +151 -0
- package/src/components/detail/detail-aside.tsx +198 -0
- package/src/components/detail/detail-layout.tsx +181 -0
- package/src/components/detail/use-detail-tab.tsx +41 -0
- package/src/components/file-image/file-image.tsx +4 -2
- package/src/components/language-toggle/language-toggle.tsx +2 -2
- package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +148 -0
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +1 -0
- package/src/components/markdown-view/diagram/DiagramErrorBoundary.tsx +42 -0
- package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +136 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +59 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +95 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramLabel.tsx +58 -0
- package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +78 -0
- package/src/components/markdown-view/diagram/MermaidFence.tsx +46 -0
- package/src/components/markdown-view/diagram/__tests__/flowchart-diagram.browser.spec.tsx +210 -0
- package/src/components/markdown-view/diagram/flowchartParser.spec.ts +379 -0
- package/src/components/markdown-view/diagram/flowchartParser.ts +475 -0
- package/src/components/markdown-view/diagram/graphModel.ts +72 -0
- package/src/components/markdown-view/diagram/layoutFlowchart.spec.ts +235 -0
- package/src/components/markdown-view/diagram/layoutFlowchart.ts +324 -0
- package/src/components/markdown-view/diagram/textMetrics.spec.ts +128 -0
- package/src/components/markdown-view/diagram/textMetrics.ts +296 -0
- package/src/components/markdown-view/markdown-view.tsx +128 -9
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +1 -0
- package/src/components/nav-shell/nav-shell.tsx +6 -3
- package/src/components/nav-shell/spotlight.tsx +2 -1
- package/src/components/nav-shell/use-nav-breadcrumbs.ts +1 -0
- package/src/components/nav-shell/use-nav-entries.ts +16 -5
- package/src/components/nav-shell/use-nav-tree.ts +1 -0
- package/src/components/settings/__tests__/settings-nav.browser.spec.tsx +1 -0
- package/src/components/settings/__tests__/settings-section.browser.spec.tsx +1 -0
- package/src/components/settings/settings-card-edge.ts +24 -0
- package/src/components/settings/settings-danger-section.tsx +7 -1
- package/src/components/settings/settings-layout.tsx +16 -1
- package/src/components/settings/settings-nav.tsx +12 -3
- package/src/components/settings/settings-row.tsx +2 -2
- package/src/components/settings/settings-section.tsx +2 -1
- package/src/components/ui/accordion.tsx +3 -3
- package/src/components/ui/alert-dialog.tsx +5 -5
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/avatar.tsx +5 -5
- package/src/components/ui/badge.tsx +48 -2
- package/src/components/ui/breadcrumb.tsx +3 -3
- package/src/components/ui/button-group.tsx +2 -2
- package/src/components/ui/button.tsx +2 -2
- package/src/components/ui/calendar.tsx +8 -8
- package/src/components/ui/card.tsx +3 -3
- package/src/components/ui/carousel.tsx +30 -13
- package/src/components/ui/chart.tsx +18 -6
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +8 -9
- package/src/components/ui/command.tsx +6 -7
- package/src/components/ui/context-menu.tsx +8 -8
- package/src/components/ui/dialog.tsx +4 -4
- package/src/components/ui/drawer.tsx +4 -4
- package/src/components/ui/dropdown-menu.tsx +9 -9
- package/src/components/ui/empty.tsx +2 -2
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-group.tsx +6 -3
- package/src/components/ui/input-otp.tsx +3 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/item.tsx +3 -3
- package/src/components/ui/kbd.tsx +1 -1
- package/src/components/ui/label.tsx +3 -0
- package/src/components/ui/menubar.tsx +9 -9
- package/src/components/ui/navigation-menu.tsx +7 -7
- package/src/components/ui/pagination.tsx +0 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +3 -3
- package/src/components/ui/radio-group.tsx +2 -2
- package/src/components/ui/resizable.tsx +2 -2
- package/src/components/ui/scroll-area.tsx +2 -2
- package/src/components/ui/segmented.tsx +8 -3
- package/src/components/ui/select.tsx +8 -8
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +3 -3
- package/src/components/ui/sidebar.tsx +20 -20
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +2 -2
- package/src/components/ui/switch.tsx +2 -2
- package/src/components/ui/table.tsx +10 -5
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle-group.tsx +9 -4
- package/src/components/ui/toggle.tsx +2 -2
- package/src/components/ui/tooltip.tsx +13 -3
- package/src/components/use-dialog/use-dialog.tsx +19 -6
- package/src/components/use-toast/__tests__/use-toast.browser.spec.tsx +19 -0
- package/src/components/use-toast/use-toast.tsx +38 -26
- package/src/hooks/use-mobile.ts +27 -14
- package/src/lib/__tests__/i18n-fr.spec.ts +5 -1
- package/src/lib/i18n-fr.ts +18 -10
- package/src/styles.css +5 -5
|
@@ -12,6 +12,7 @@ import { useAuth } from "alepha/react/auth";
|
|
|
12
12
|
import { useI18n } from "alepha/react/i18n";
|
|
13
13
|
import { KeyRound, Trash2 } from "lucide-react";
|
|
14
14
|
import { type ReactNode, useState } from "react";
|
|
15
|
+
|
|
15
16
|
import { PROVIDER_LABELS } from "../auth/provider-labels.ts";
|
|
16
17
|
|
|
17
18
|
export interface AccountSecurityProps {
|
|
@@ -48,6 +48,25 @@ const AccountSessions = (props: AccountSessionsProps) => {
|
|
|
48
48
|
return `${agent.browser} on ${agent.os}`;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* "Signed in 3 months ago" says when the session was born, not whether it
|
|
53
|
+
* is still breathing: a long-lived session that refreshed this morning
|
|
54
|
+
* looks identical to an abandoned one. `lastUsedAt` is the signal
|
|
55
|
+
* someone hunting a stolen laptop is after, so it goes next to the IP.
|
|
56
|
+
* Skipped for the current session, where it would always read "a few
|
|
57
|
+
* seconds ago".
|
|
58
|
+
*/
|
|
59
|
+
const description = (session: MySession) => {
|
|
60
|
+
const parts = [
|
|
61
|
+
session.ip ?? "unknown IP",
|
|
62
|
+
`signed in ${dt.of(session.createdAt).fromNow()}`,
|
|
63
|
+
];
|
|
64
|
+
if (session.lastUsedAt && !session.current) {
|
|
65
|
+
parts.push(`last used ${dt.of(session.lastUsedAt).fromNow()}`);
|
|
66
|
+
}
|
|
67
|
+
return parts.join(" · ");
|
|
68
|
+
};
|
|
69
|
+
|
|
51
70
|
const revoke = async (session: MySession) => {
|
|
52
71
|
try {
|
|
53
72
|
await api.deleteMySession({ params: { id: session.id } });
|
|
@@ -99,7 +118,7 @@ const AccountSessions = (props: AccountSessionsProps) => {
|
|
|
99
118
|
className={
|
|
100
119
|
session.current
|
|
101
120
|
? "size-2 fill-green-500 text-green-500"
|
|
102
|
-
: "
|
|
121
|
+
: "fill-muted-foreground text-muted-foreground size-2"
|
|
103
122
|
}
|
|
104
123
|
/>
|
|
105
124
|
{deviceIcon(session)}
|
|
@@ -111,9 +130,7 @@ const AccountSessions = (props: AccountSessionsProps) => {
|
|
|
111
130
|
) : null}
|
|
112
131
|
</span>
|
|
113
132
|
}
|
|
114
|
-
description={
|
|
115
|
-
.of(session.createdAt)
|
|
116
|
-
.fromNow()}`}
|
|
133
|
+
description={description(session)}
|
|
117
134
|
>
|
|
118
135
|
{session.current ? null : (
|
|
119
136
|
<Button variant="ghost" size="sm" onClick={() => revoke(session)}>
|
|
@@ -4,6 +4,7 @@ import { AlephaContext } from "alepha/react";
|
|
|
4
4
|
import { AlephaReactI18n } from "alepha/react/i18n";
|
|
5
5
|
import { setupJsdomMocks } from "alepha/react/testing";
|
|
6
6
|
import { afterEach, beforeAll, describe, expect, it, vi } from "vitest";
|
|
7
|
+
|
|
7
8
|
import { AdminKeysTokenDialog } from "../admin-keys-token-dialog.tsx";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -5,12 +5,13 @@ import { AlephaReactI18n } from "alepha/react/i18n";
|
|
|
5
5
|
import { AlephaReactRouter } from "alepha/react/router";
|
|
6
6
|
import { setupJsdomMocks } from "alepha/react/testing";
|
|
7
7
|
import { afterEach, beforeAll, describe, expect, it } from "vitest";
|
|
8
|
+
|
|
8
9
|
import AdminLayout from "../admin-layout.tsx";
|
|
9
|
-
import { AdminRouter } from "../admin-router.tsx";
|
|
10
10
|
import {
|
|
11
11
|
type AdminRouterOptions,
|
|
12
12
|
adminRouterOptionsAtom,
|
|
13
13
|
} from "../admin-router-options.tsx";
|
|
14
|
+
import { AdminRouter } from "../admin-router.tsx";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* The three seams `adminRouterOptionsAtom` opens into the layout itself —
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Alepha } from "alepha";
|
|
2
2
|
import { $page, AlephaReactRouter } from "alepha/react/router";
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
|
-
|
|
4
|
+
|
|
5
5
|
import { $pageAdmin } from "../admin-router-page.tsx";
|
|
6
|
+
import { AdminRouter } from "../admin-router.tsx";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* `$pageAdmin` is the one-call form of "a page inside the shared admin shell".
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
type PagePrimitive,
|
|
6
6
|
} from "alepha/react/router";
|
|
7
7
|
import { describe, expect, it } from "vitest";
|
|
8
|
+
|
|
8
9
|
import { AdminRouter } from "../admin-router.tsx";
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -62,12 +63,13 @@ describe("AdminRouter", () => {
|
|
|
62
63
|
.map((page) => ({ path: page.options.path, name: page.name }));
|
|
63
64
|
};
|
|
64
65
|
|
|
65
|
-
it("mounts the shell and its
|
|
66
|
+
it("mounts the shell and its twelve pages", async () => {
|
|
66
67
|
const pages = await mount();
|
|
67
68
|
|
|
68
69
|
expect(pages).toEqual(
|
|
69
70
|
expect.arrayContaining([
|
|
70
71
|
{ path: "/admin", name: "admin" },
|
|
72
|
+
{ path: "/", name: "dashboard" },
|
|
71
73
|
{ path: "/users", name: "users" },
|
|
72
74
|
{ path: "/users/:userId", name: "userDetail" },
|
|
73
75
|
{ path: "/sessions", name: "sessions" },
|
|
@@ -205,4 +207,58 @@ describe("AdminRouter", () => {
|
|
|
205
207
|
);
|
|
206
208
|
}
|
|
207
209
|
});
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* The band is the whole mechanism behind "an application's own pages come
|
|
213
|
+
* first". `useNavEntries` sorts groups by their smallest member, so the
|
|
214
|
+
* built-ins staying at 1000 and up is what lets a `Commerce` or `Lore`
|
|
215
|
+
* group at the conventional `order: 100` lead without configuring
|
|
216
|
+
* anything. Renumber one entry down into the low hundreds and every
|
|
217
|
+
* consumer's sidebar silently reshuffles.
|
|
218
|
+
*/
|
|
219
|
+
it("parks every built-in nav entry in the reserved 1000+ band", async () => {
|
|
220
|
+
const alepha = Alepha.create().with(AlephaReactRouter);
|
|
221
|
+
alepha.inject(AdminRouter);
|
|
222
|
+
await alepha.start();
|
|
223
|
+
|
|
224
|
+
const grouped = alepha
|
|
225
|
+
.primitives($page)
|
|
226
|
+
.map((page) => page.options.nav)
|
|
227
|
+
.filter((nav) => nav?.group !== undefined);
|
|
228
|
+
|
|
229
|
+
expect(grouped.length).toBeGreaterThan(0);
|
|
230
|
+
for (const nav of grouped) {
|
|
231
|
+
expect(nav!.order).toBeGreaterThanOrEqual(1000);
|
|
232
|
+
expect(["Identity", "System"]).toContain(nav!.group);
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
it("leads with an ungrouped dashboard", async () => {
|
|
237
|
+
const alepha = Alepha.create().with(AlephaReactRouter);
|
|
238
|
+
const router = alepha.inject(AdminRouter);
|
|
239
|
+
await alepha.start();
|
|
240
|
+
|
|
241
|
+
// The shell root itself, not a child URL: a bare `/admin` resolves to
|
|
242
|
+
// the dashboard rather than redirecting to a second one. Same arrangement
|
|
243
|
+
// `AccountRouter` uses for `/account`, and the reason the `indexPath`
|
|
244
|
+
// option no longer exists.
|
|
245
|
+
expect(router.dashboard.options.path).toBe("/");
|
|
246
|
+
expect(router.dashboard.options.parent).toBe(router.layout);
|
|
247
|
+
// Nothing may reintroduce an index redirect behind its back.
|
|
248
|
+
expect(router.layout.options.loader).toBeUndefined();
|
|
249
|
+
|
|
250
|
+
const nav = router.dashboard.options.nav;
|
|
251
|
+
// No group puts it in `useNavEntries`' `""` bucket, whose groupOrder is
|
|
252
|
+
// its smallest member — 0, ahead of every real group.
|
|
253
|
+
expect(nav?.group).toBeUndefined();
|
|
254
|
+
expect(nav?.order).toBe(0);
|
|
255
|
+
|
|
256
|
+
// The one page deliberately exempt from the action gate asserted above.
|
|
257
|
+
// It has no backing action of its own: reaching it already means holding
|
|
258
|
+
// the layout's `admin:ui`, and it renders only cards that pass their own
|
|
259
|
+
// `can`, so an administrator with nothing to read gets an empty state
|
|
260
|
+
// rather than a locked door. Listed here so the exemption reads as a
|
|
261
|
+
// decision rather than an omission.
|
|
262
|
+
expect(router.dashboard.options.can).toBeUndefined();
|
|
263
|
+
});
|
|
208
264
|
});
|
|
@@ -4,6 +4,7 @@ import { AlephaContext } from "alepha/react";
|
|
|
4
4
|
import { AlephaReactRouter } from "alepha/react/router";
|
|
5
5
|
import { setupJsdomMocks } from "alepha/react/testing";
|
|
6
6
|
import { afterEach, beforeAll, describe, expect, it } from "vitest";
|
|
7
|
+
|
|
7
8
|
import { AdminUserCell } from "../admin-user-cell.tsx";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -31,7 +31,9 @@ export interface AdminAnalyticsQueryPanelProps {
|
|
|
31
31
|
* is the declared dimensions plus the `day` / `hour` pseudo-dimensions, and
|
|
32
32
|
* every measure is summed — the only aggregate the query language has.
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export const AdminAnalyticsQueryPanel = (
|
|
35
|
+
props: AdminAnalyticsQueryPanelProps,
|
|
36
|
+
) => {
|
|
35
37
|
const client = useClient<AdminAnalyticsController>();
|
|
36
38
|
const alepha = useAlepha();
|
|
37
39
|
const { tr } = useI18n();
|
|
@@ -56,7 +58,6 @@ export function AdminAnalyticsQueryPanel(props: AdminAnalyticsQueryPanelProps) {
|
|
|
56
58
|
shape[name] = (jsonSchemaToZod(property) as any).optional();
|
|
57
59
|
}
|
|
58
60
|
return z.object(shape) as ZObject;
|
|
59
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
61
|
}, [props.dataset]);
|
|
61
62
|
|
|
62
63
|
const form = useForm(
|
|
@@ -144,6 +145,6 @@ export function AdminAnalyticsQueryPanel(props: AdminAnalyticsQueryPanelProps) {
|
|
|
144
145
|
/>
|
|
145
146
|
</div>
|
|
146
147
|
);
|
|
147
|
-
}
|
|
148
|
+
};
|
|
148
149
|
|
|
149
150
|
export default AdminAnalyticsQueryPanel;
|
|
@@ -28,7 +28,7 @@ export interface AdminAnalyticsResultsProps {
|
|
|
28
28
|
* numbers are reconstructed; `estimated` with an interval of 1 means the
|
|
29
29
|
* backend samples but did not in this window.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export const AdminAnalyticsResults = (props: AdminAnalyticsResultsProps) => {
|
|
32
32
|
const { tr } = useI18n();
|
|
33
33
|
const columns = Object.keys(props.result.rows[0] ?? {});
|
|
34
34
|
const sampleInterval = props.result.sampleInterval ?? 1;
|
|
@@ -90,6 +90,6 @@ export function AdminAnalyticsResults(props: AdminAnalyticsResultsProps) {
|
|
|
90
90
|
)}
|
|
91
91
|
</div>
|
|
92
92
|
);
|
|
93
|
-
}
|
|
93
|
+
};
|
|
94
94
|
|
|
95
95
|
export default AdminAnalyticsResults;
|
|
@@ -26,7 +26,7 @@ import { useEffect, useState } from "react";
|
|
|
26
26
|
* declares. Datasets, dimensions and measures all come from the admin API's
|
|
27
27
|
* JSON-Schema descriptors — nothing here is app-specific.
|
|
28
28
|
*/
|
|
29
|
-
export
|
|
29
|
+
export const AdminAnalytics = () => {
|
|
30
30
|
const client = useClient<AdminAnalyticsController>();
|
|
31
31
|
const { tr } = useI18n();
|
|
32
32
|
const [datasets, setDatasets] = useState<AdminDatasetDescriptor[]>();
|
|
@@ -34,7 +34,7 @@ export function AdminAnalytics() {
|
|
|
34
34
|
const [result, setResult] = useState<AdminAnalyticsResult>();
|
|
35
35
|
|
|
36
36
|
useEffect(() => {
|
|
37
|
-
client.listDatasets().then((list) => {
|
|
37
|
+
void client.listDatasets().then((list) => {
|
|
38
38
|
setDatasets(list);
|
|
39
39
|
setSelected((current) => current ?? list[0]?.name);
|
|
40
40
|
});
|
|
@@ -99,6 +99,6 @@ export function AdminAnalytics() {
|
|
|
99
99
|
)}
|
|
100
100
|
</AdminPage>
|
|
101
101
|
);
|
|
102
|
-
}
|
|
102
|
+
};
|
|
103
103
|
|
|
104
104
|
export default AdminAnalytics;
|
|
@@ -23,7 +23,7 @@ const auditFiltersSchema = z.object({
|
|
|
23
23
|
});
|
|
24
24
|
type AuditFilters = Infer<typeof auditFiltersSchema>;
|
|
25
25
|
|
|
26
|
-
export
|
|
26
|
+
export const AdminAudits = () => {
|
|
27
27
|
const client = useClient<AdminAuditController>();
|
|
28
28
|
const toast = useToast();
|
|
29
29
|
const router = useRouter();
|
|
@@ -75,7 +75,7 @@ export function AdminAudits() {
|
|
|
75
75
|
default: "Delete audit entries",
|
|
76
76
|
}),
|
|
77
77
|
description: tr("admin.audits.bulkDeleteConfirm", {
|
|
78
|
-
default: `Delete ${items.length} audit record(s)? Audit logs are usually retained for compliance
|
|
78
|
+
default: `Delete ${items.length} audit record(s)? Audit logs are usually retained for compliance. This cannot be undone.`,
|
|
79
79
|
args: [String(items.length)],
|
|
80
80
|
}),
|
|
81
81
|
destructive: true,
|
|
@@ -239,6 +239,6 @@ export function AdminAudits() {
|
|
|
239
239
|
/>
|
|
240
240
|
</AdminPage>
|
|
241
241
|
);
|
|
242
|
-
}
|
|
242
|
+
};
|
|
243
243
|
|
|
244
244
|
export default AdminAudits;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One tile on the admin dashboard.
|
|
5
|
+
*
|
|
6
|
+
* ### Gate on an action, never on a permission
|
|
7
|
+
*
|
|
8
|
+
* `can` mirrors the rule the sidebar already applies to nav entries: a card
|
|
9
|
+
* whose backing module was never registered does not render at all, rather
|
|
10
|
+
* than rendering an error or a misleading zero. Gate on an **action**
|
|
11
|
+
* (`someApi.someAction.can()`), not on a permission name — a permission
|
|
12
|
+
* declared by a page's own `$secure` is granted to a `*` wildcard holder
|
|
13
|
+
* whether or not any controller backs it, so a permission check would leave a
|
|
14
|
+
* card standing over a dead API.
|
|
15
|
+
*
|
|
16
|
+
* The card carries no title of its own: `render` owns its whole surface,
|
|
17
|
+
* because a stat tile, a chart and a table of recent rows have nothing useful
|
|
18
|
+
* in common above the card boundary.
|
|
19
|
+
*/
|
|
20
|
+
export interface AdminDashboardCard {
|
|
21
|
+
/**
|
|
22
|
+
* Stable identity, also the React key. Must be unique across the built-in
|
|
23
|
+
* cards and the application's own.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Sort position, ascending. The built-ins take 1000 and up, the same
|
|
29
|
+
* reserved band the built-in nav entries use, so an application's cards
|
|
30
|
+
* lead by default without having to pick a number at all.
|
|
31
|
+
*/
|
|
32
|
+
order?: number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Whether the card renders. Returning `false` removes it entirely.
|
|
36
|
+
* Omitted means always.
|
|
37
|
+
*/
|
|
38
|
+
can?: () => boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The tile. Free to fetch its own data — it is mounted only after `can`
|
|
42
|
+
* has already said its backend exists.
|
|
43
|
+
*/
|
|
44
|
+
render: () => ReactNode;
|
|
45
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardContent,
|
|
4
|
+
CardDescription,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
} from "@alepha/ui/components/ui/card";
|
|
8
|
+
import { Link } from "alepha/react/router";
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import { useEffect, useState } from "react";
|
|
11
|
+
|
|
12
|
+
export interface AdminDashboardCountCardProps {
|
|
13
|
+
/**
|
|
14
|
+
* Heading, already localised by the caller.
|
|
15
|
+
*/
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Line under the number, saying what was counted.
|
|
20
|
+
*/
|
|
21
|
+
description?: ReactNode;
|
|
22
|
+
|
|
23
|
+
icon?: ReactNode;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Where the whole tile links. A path rather than a route name: the built-in
|
|
27
|
+
* admin paths are fixed by `AdminRouter`, and a name would drag the router
|
|
28
|
+
* in for no gain.
|
|
29
|
+
*/
|
|
30
|
+
href: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Resolves the number. A rejection renders a dash rather than an error — a
|
|
34
|
+
* dashboard is glanceable, and one unreachable count must not take the page
|
|
35
|
+
* down with it.
|
|
36
|
+
*/
|
|
37
|
+
load: () => Promise<number>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The generic "how many of these are there" tile, and the only component the
|
|
42
|
+
* built-in cards use.
|
|
43
|
+
*
|
|
44
|
+
* It exists so the built-in cards can stay plain data in `AdminRouter`, which
|
|
45
|
+
* is where the API clients already live — a component per card would mean a
|
|
46
|
+
* file per card, each one re-deriving the same fetch-and-render.
|
|
47
|
+
*/
|
|
48
|
+
export const AdminDashboardCountCard = (
|
|
49
|
+
props: AdminDashboardCountCardProps,
|
|
50
|
+
) => {
|
|
51
|
+
const [value, setValue] = useState<number | undefined>(undefined);
|
|
52
|
+
const [failed, setFailed] = useState(false);
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
let alive = true;
|
|
56
|
+
props
|
|
57
|
+
.load()
|
|
58
|
+
.then((n) => {
|
|
59
|
+
if (alive) setValue(n);
|
|
60
|
+
})
|
|
61
|
+
.catch(() => {
|
|
62
|
+
if (alive) setFailed(true);
|
|
63
|
+
});
|
|
64
|
+
return () => {
|
|
65
|
+
alive = false;
|
|
66
|
+
};
|
|
67
|
+
// `load` is a fresh closure on every render of the parent, so depending on
|
|
68
|
+
// it would refetch forever. The href identifies the count instead.
|
|
69
|
+
}, [props.href]);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Card>
|
|
73
|
+
<CardHeader>
|
|
74
|
+
<CardTitle className="flex items-center gap-2 text-sm font-medium">
|
|
75
|
+
{props.icon}
|
|
76
|
+
<Link href={props.href}>{props.label}</Link>
|
|
77
|
+
</CardTitle>
|
|
78
|
+
{props.description ? (
|
|
79
|
+
<CardDescription>{props.description}</CardDescription>
|
|
80
|
+
) : null}
|
|
81
|
+
</CardHeader>
|
|
82
|
+
<CardContent>
|
|
83
|
+
<div className="text-3xl font-semibold tabular-nums">
|
|
84
|
+
{failed ? "—" : value === undefined ? "…" : value.toLocaleString()}
|
|
85
|
+
</div>
|
|
86
|
+
</CardContent>
|
|
87
|
+
</Card>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { AdminDashboardCard } from "@alepha/ui/components/admin/admin-dashboard-card";
|
|
2
|
+
import { AdminPage } from "@alepha/ui/components/admin/admin-page";
|
|
3
|
+
import {
|
|
4
|
+
Empty,
|
|
5
|
+
EmptyDescription,
|
|
6
|
+
EmptyHeader,
|
|
7
|
+
EmptyMedia,
|
|
8
|
+
EmptyTitle,
|
|
9
|
+
} from "@alepha/ui/components/ui/empty";
|
|
10
|
+
import { LayoutDashboard } from "lucide-react";
|
|
11
|
+
import { Fragment } from "react";
|
|
12
|
+
|
|
13
|
+
export interface AdminDashboardProps {
|
|
14
|
+
/**
|
|
15
|
+
* Built-in cards followed by the application's, already concatenated by
|
|
16
|
+
* `AdminRouter`. Ordering and gating happen here rather than there so the
|
|
17
|
+
* two sets obey exactly one rule.
|
|
18
|
+
*/
|
|
19
|
+
cards?: AdminDashboardCard[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The admin landing page: whatever cards survive their own `can` gate.
|
|
24
|
+
*
|
|
25
|
+
* An admin whose deployment registers no module a card can read sees the
|
|
26
|
+
* empty state rather than a page of dashes — which is the honest rendering of
|
|
27
|
+
* "there is nothing to summarise here", and the same reasoning that hides a
|
|
28
|
+
* nav entry whose backend never shipped.
|
|
29
|
+
*/
|
|
30
|
+
const AdminDashboard = (props: AdminDashboardProps) => {
|
|
31
|
+
const cards = (props.cards ?? [])
|
|
32
|
+
.filter((card) => (card.can ? card.can() : true))
|
|
33
|
+
.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<AdminPage>
|
|
37
|
+
{cards.length === 0 ? (
|
|
38
|
+
<Empty>
|
|
39
|
+
<EmptyHeader>
|
|
40
|
+
<EmptyMedia variant="icon">
|
|
41
|
+
<LayoutDashboard className="size-4" />
|
|
42
|
+
</EmptyMedia>
|
|
43
|
+
<EmptyTitle>Nothing to summarise</EmptyTitle>
|
|
44
|
+
<EmptyDescription>
|
|
45
|
+
No module this dashboard can read is registered.
|
|
46
|
+
</EmptyDescription>
|
|
47
|
+
</EmptyHeader>
|
|
48
|
+
</Empty>
|
|
49
|
+
) : (
|
|
50
|
+
<div className="grid gap-4 sm:grid-cols-2 xl:grid-cols-3">
|
|
51
|
+
{cards.map((card) => (
|
|
52
|
+
<Fragment key={card.id}>{card.render()}</Fragment>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
56
|
+
</AdminPage>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default AdminDashboard;
|
|
@@ -51,7 +51,7 @@ type AdminFileFilters = Infer<typeof filtersSchema>;
|
|
|
51
51
|
|
|
52
52
|
const isImage = (mimeType?: string) => Boolean(mimeType?.startsWith("image/"));
|
|
53
53
|
|
|
54
|
-
export
|
|
54
|
+
export const AdminFiles = () => {
|
|
55
55
|
const client = useClient<FileController>();
|
|
56
56
|
const statsClient = useClient<AdminFileStatsController>();
|
|
57
57
|
const { l, tr } = useI18n();
|
|
@@ -333,6 +333,6 @@ export function AdminFiles() {
|
|
|
333
333
|
/>
|
|
334
334
|
</AdminPage>
|
|
335
335
|
);
|
|
336
|
-
}
|
|
336
|
+
};
|
|
337
337
|
|
|
338
338
|
export default AdminFiles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AdminJobsStatusBadge } from "@alepha/ui/components/admin/admin-jobs-status-badge";
|
|
2
2
|
import { useConfirmedAction } from "@alepha/ui/components/admin/use-confirmed-action";
|
|
3
3
|
import { AlephaTable } from "@alepha/ui/components/alepha-table/alepha-table";
|
|
4
4
|
import { Control } from "@alepha/ui/components/control/control";
|
|
@@ -38,7 +38,7 @@ function asPage<T>(items: T[]): Page<T> {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export interface
|
|
41
|
+
export interface AdminJobsExecutionsPanelProps {
|
|
42
42
|
jobName: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -48,7 +48,9 @@ export interface JobExecutionsPanelProps {
|
|
|
48
48
|
* (gated server-side via `e.can.*`). Self-contained: resolves its own client,
|
|
49
49
|
* i18n and dialogs rather than receiving them as props.
|
|
50
50
|
*/
|
|
51
|
-
export const
|
|
51
|
+
export const AdminJobsExecutionsPanel = (
|
|
52
|
+
props: AdminJobsExecutionsPanelProps,
|
|
53
|
+
) => {
|
|
52
54
|
const { jobName } = props;
|
|
53
55
|
const client = useClient<AdminJobController>();
|
|
54
56
|
const { l, tr } = useI18n();
|
|
@@ -127,20 +129,25 @@ export const JobExecutionsPanel = (props: JobExecutionsPanelProps) => {
|
|
|
127
129
|
)}
|
|
128
130
|
triggerClassName="w-40"
|
|
129
131
|
items={[
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
]
|
|
132
|
+
"pending",
|
|
133
|
+
"running",
|
|
134
|
+
"scheduled",
|
|
135
|
+
"ok",
|
|
136
|
+
"error",
|
|
137
|
+
"cancelled",
|
|
138
|
+
].map((status) => ({
|
|
139
|
+
value: status,
|
|
140
|
+
label: String(
|
|
141
|
+
tr(`admin.jobs.status.${status}` as any, { default: status }),
|
|
142
|
+
),
|
|
143
|
+
}))}
|
|
137
144
|
/>
|
|
138
145
|
),
|
|
139
146
|
}}
|
|
140
147
|
columns={{
|
|
141
148
|
status: {
|
|
142
149
|
label: tr("admin.jobs.colStatus", { default: "Status" }),
|
|
143
|
-
cell: (e) => <
|
|
150
|
+
cell: (e) => <AdminJobsStatusBadge status={e.status} />,
|
|
144
151
|
},
|
|
145
152
|
startedAt: {
|
|
146
153
|
label: tr("admin.jobs.colStarted", { default: "Started" }),
|
|
@@ -148,7 +155,7 @@ export const JobExecutionsPanel = (props: JobExecutionsPanelProps) => {
|
|
|
148
155
|
<span className="text-muted-foreground text-xs">
|
|
149
156
|
{e.startedAt
|
|
150
157
|
? String(l(e.startedAt, { date: "fromNow" }))
|
|
151
|
-
: tr("admin.jobs.notStarted", { default: "
|
|
158
|
+
: tr("admin.jobs.notStarted", { default: "Not started" })}
|
|
152
159
|
</span>
|
|
153
160
|
),
|
|
154
161
|
},
|
|
@@ -2,7 +2,7 @@ import { Badge } from "@alepha/ui/components/ui/badge";
|
|
|
2
2
|
import type { JobExecutionResource } from "alepha/api/jobs";
|
|
3
3
|
import { useI18n } from "alepha/react/i18n";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface AdminJobsStatusBadgeProps {
|
|
6
6
|
status: JobExecutionResource["status"];
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ const VARIANTS: Record<
|
|
|
21
21
|
/**
|
|
22
22
|
* Coloured badge for a job execution's status.
|
|
23
23
|
*/
|
|
24
|
-
export const
|
|
24
|
+
export const AdminJobsStatusBadge = (props: AdminJobsStatusBadgeProps) => {
|
|
25
25
|
const { tr } = useI18n();
|
|
26
26
|
return (
|
|
27
27
|
<Badge variant={VARIANTS[props.status]}>
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
void React;
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { AdminJobsExecutionsPanel } from "@alepha/ui/components/admin/admin-jobs-executions-panel";
|
|
6
6
|
import { AdminPage } from "@alepha/ui/components/admin/admin-page";
|
|
7
7
|
import { AlephaTable } from "@alepha/ui/components/alepha-table/alepha-table";
|
|
8
8
|
import { Control } from "@alepha/ui/components/control/control";
|
|
@@ -84,7 +84,7 @@ function applyJobFilters(
|
|
|
84
84
|
return out;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export
|
|
87
|
+
export const AdminJobs = () => {
|
|
88
88
|
const client = useClient<AdminJobController>();
|
|
89
89
|
const { l, tr } = useI18n();
|
|
90
90
|
const toast = useToast();
|
|
@@ -283,7 +283,7 @@ export function AdminJobs() {
|
|
|
283
283
|
</SheetDescription>
|
|
284
284
|
</SheetHeader>
|
|
285
285
|
<div className="flex min-h-0 flex-1 flex-col p-4">
|
|
286
|
-
<
|
|
286
|
+
<AdminJobsExecutionsPanel jobName={openJob.name} />
|
|
287
287
|
</div>
|
|
288
288
|
</>
|
|
289
289
|
)}
|
|
@@ -291,6 +291,6 @@ export function AdminJobs() {
|
|
|
291
291
|
</Sheet>
|
|
292
292
|
</AdminPage>
|
|
293
293
|
);
|
|
294
|
-
}
|
|
294
|
+
};
|
|
295
295
|
|
|
296
296
|
export default AdminJobs;
|
|
@@ -78,12 +78,12 @@ export const AdminKeysTokenDialog = (props: AdminKeysTokenDialogProps) => {
|
|
|
78
78
|
<DialogDescription>
|
|
79
79
|
{tr("admin.keys.tokenDescription", {
|
|
80
80
|
default:
|
|
81
|
-
"Copy this token now
|
|
81
|
+
"Copy this token now: it is shown only once and cannot be recovered.",
|
|
82
82
|
})}
|
|
83
83
|
</DialogDescription>
|
|
84
84
|
</DialogHeader>
|
|
85
85
|
<div className="flex items-start gap-2">
|
|
86
|
-
<code className="bg-muted min-w-0 flex-1
|
|
86
|
+
<code className="bg-muted min-w-0 flex-1 rounded-md p-3 font-mono text-xs leading-relaxed break-all">
|
|
87
87
|
{props.token}
|
|
88
88
|
</code>
|
|
89
89
|
<TooltipProvider>
|
|
@@ -20,7 +20,7 @@ import { useI18n } from "alepha/react/i18n";
|
|
|
20
20
|
import { Plus, Trash2 } from "lucide-react";
|
|
21
21
|
import { useCallback, useState } from "react";
|
|
22
22
|
|
|
23
|
-
export
|
|
23
|
+
export const AdminKeys = () => {
|
|
24
24
|
const client = useClient<AdminApiKeyController>();
|
|
25
25
|
const userClient = useClient<ApiKeyController>();
|
|
26
26
|
const toast = useToast();
|
|
@@ -208,6 +208,6 @@ export function AdminKeys() {
|
|
|
208
208
|
/>
|
|
209
209
|
</AdminPage>
|
|
210
210
|
);
|
|
211
|
-
}
|
|
211
|
+
};
|
|
212
212
|
|
|
213
213
|
export default AdminKeys;
|