@alepha/ui 0.25.2 → 0.26.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/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/components/account/account-connections.d.ts +16 -0
- package/dist/components/account/account-connections.d.ts.map +1 -0
- package/dist/components/account/account-connections.js +76 -0
- package/dist/components/account/account-connections.js.map +1 -0
- package/dist/components/account/account-delete-dialog.d.ts +44 -0
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -0
- package/dist/components/account/account-delete-dialog.js +126 -0
- package/dist/components/account/account-delete-dialog.js.map +1 -0
- package/dist/components/account/account-header.d.ts +33 -0
- package/dist/components/account/account-header.d.ts.map +1 -0
- package/dist/components/account/account-header.js +41 -0
- package/dist/components/account/account-header.js.map +1 -0
- package/dist/components/account/account-keys.d.ts +23 -0
- package/dist/components/account/account-keys.d.ts.map +1 -0
- package/dist/components/account/account-keys.js +168 -0
- package/dist/components/account/account-keys.js.map +1 -0
- package/dist/components/account/account-layout.d.ts +32 -0
- package/dist/components/account/account-layout.d.ts.map +1 -0
- package/dist/components/account/account-layout.js +53 -0
- package/dist/components/account/account-layout.js.map +1 -0
- package/dist/components/account/account-password-dialog.d.ts +31 -0
- package/dist/components/account/account-password-dialog.d.ts.map +1 -0
- package/dist/components/account/account-password-dialog.js +120 -0
- package/dist/components/account/account-password-dialog.js.map +1 -0
- package/dist/components/account/account-profile.d.ts +27 -0
- package/dist/components/account/account-profile.d.ts.map +1 -0
- package/dist/components/account/account-profile.js +217 -0
- package/dist/components/account/account-profile.js.map +1 -0
- package/dist/components/account/account-router-options.d.ts +77 -0
- package/dist/components/account/account-router-options.d.ts.map +1 -0
- package/dist/components/account/account-router-options.js +22 -0
- package/dist/components/account/account-router-options.js.map +1 -0
- package/dist/components/account/account-router-page.d.ts +49 -0
- package/dist/components/account/account-router-page.d.ts.map +1 -0
- package/dist/components/account/account-router-page.js +61 -0
- package/dist/components/account/account-router-page.js.map +1 -0
- package/dist/components/account/account-router.d.ts +214 -0
- package/dist/components/account/account-router.d.ts.map +1 -0
- package/dist/components/account/account-router.js +216 -0
- package/dist/components/account/account-router.js.map +1 -0
- package/dist/components/account/account-security.d.ts +22 -0
- package/dist/components/account/account-security.d.ts.map +1 -0
- package/dist/components/account/account-security.js +107 -0
- package/dist/components/account/account-security.js.map +1 -0
- package/dist/components/account/account-sessions.d.ts +17 -0
- package/dist/components/account/account-sessions.d.ts.map +1 -0
- package/dist/components/account/account-sessions.js +108 -0
- package/dist/components/account/account-sessions.js.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts +39 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.js +40 -0
- package/dist/components/action-error-toaster/action-error-toaster.js.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts +16 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.js +117 -0
- package/dist/components/admin/admin-analytics-query-panel.js.map +1 -0
- package/dist/components/admin/admin-analytics-results.d.ts +15 -0
- package/dist/components/admin/admin-analytics-results.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-results.js +56 -0
- package/dist/components/admin/admin-analytics-results.js.map +1 -0
- package/dist/components/admin/admin-analytics.d.ts +9 -0
- package/dist/components/admin/admin-analytics.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics.js +66 -0
- package/dist/components/admin/admin-analytics.js.map +1 -0
- package/dist/components/admin/admin-audits.d.ts +4 -0
- package/dist/components/admin/admin-audits.d.ts.map +1 -0
- package/dist/components/admin/admin-audits.js +173 -0
- package/dist/components/admin/admin-audits.js.map +1 -0
- package/dist/components/admin/admin-files.d.ts +4 -0
- package/dist/components/admin/admin-files.d.ts.map +1 -0
- package/dist/components/admin/admin-files.js +237 -0
- package/dist/components/admin/admin-files.js.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts +11 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.js +200 -0
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts +9 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.js +26 -0
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -0
- package/dist/components/admin/admin-jobs.d.ts +4 -0
- package/dist/components/admin/admin-jobs.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs.js +248 -0
- package/dist/components/admin/admin-jobs.js.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts +15 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.js +66 -0
- package/dist/components/admin/admin-keys-token-dialog.js.map +1 -0
- package/dist/components/admin/admin-keys.d.ts +4 -0
- package/dist/components/admin/admin-keys.d.ts.map +1 -0
- package/dist/components/admin/admin-keys.js +161 -0
- package/dist/components/admin/admin-keys.js.map +1 -0
- package/dist/components/admin/admin-layout.d.ts +33 -0
- package/dist/components/admin/admin-layout.d.ts.map +1 -0
- package/dist/components/admin/admin-layout.js +101 -0
- package/dist/components/admin/admin-layout.js.map +1 -0
- package/dist/components/admin/admin-notifications.d.ts +4 -0
- package/dist/components/admin/admin-notifications.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications.js +99 -0
- package/dist/components/admin/admin-notifications.js.map +1 -0
- package/dist/components/admin/admin-page.d.ts +16 -0
- package/dist/components/admin/admin-page.d.ts.map +1 -0
- package/dist/components/admin/admin-page.js +15 -0
- package/dist/components/admin/admin-page.js.map +1 -0
- package/dist/components/admin/admin-parameters.d.ts +26 -0
- package/dist/components/admin/admin-parameters.d.ts.map +1 -0
- package/dist/components/admin/admin-parameters.js +560 -0
- package/dist/components/admin/admin-parameters.js.map +1 -0
- package/dist/components/admin/admin-payments.d.ts +4 -0
- package/dist/components/admin/admin-payments.d.ts.map +1 -0
- package/dist/components/admin/admin-payments.js +72 -0
- package/dist/components/admin/admin-payments.js.map +1 -0
- package/dist/components/admin/admin-router-options.d.ts +135 -0
- package/dist/components/admin/admin-router-options.d.ts.map +1 -0
- package/dist/components/admin/admin-router-options.js +29 -0
- package/dist/components/admin/admin-router-options.js.map +1 -0
- package/dist/components/admin/admin-router-page.d.ts +54 -0
- package/dist/components/admin/admin-router-page.d.ts.map +1 -0
- package/dist/components/admin/admin-router-page.js +66 -0
- package/dist/components/admin/admin-router-page.js.map +1 -0
- package/dist/components/admin/admin-router.d.ts +169 -0
- package/dist/components/admin/admin-router.d.ts.map +1 -0
- package/dist/components/admin/admin-router.js +346 -0
- package/dist/components/admin/admin-router.js.map +1 -0
- package/dist/components/admin/admin-sessions.d.ts +4 -0
- package/dist/components/admin/admin-sessions.d.ts.map +1 -0
- package/dist/components/admin/admin-sessions.js +124 -0
- package/dist/components/admin/admin-sessions.js.map +1 -0
- package/dist/components/admin/admin-user-cell.d.ts +37 -0
- package/dist/components/admin/admin-user-cell.d.ts.map +1 -0
- package/dist/components/admin/admin-user-cell.js +35 -0
- package/dist/components/admin/admin-user-cell.js.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js +55 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts +14 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js +162 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts +26 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js +60 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js +47 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts +10 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.js +13 -0
- package/dist/components/admin/admin-user-detail-password-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts +56 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js +73 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts +18 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js +21 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts +20 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.js +70 -0
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +25 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js +64 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail.d.ts +39 -0
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail.js +386 -0
- package/dist/components/admin/admin-user-detail.js.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts +23 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.js +77 -0
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -0
- package/dist/components/admin/admin-users-status-filter.d.ts +13 -0
- package/dist/components/admin/admin-users-status-filter.d.ts.map +1 -0
- package/dist/components/admin/admin-users-status-filter.js +41 -0
- package/dist/components/admin/admin-users-status-filter.js.map +1 -0
- package/dist/components/admin/admin-users.d.ts +16 -0
- package/dist/components/admin/admin-users.d.ts.map +1 -0
- package/dist/components/admin/admin-users.js +325 -0
- package/dist/components/admin/admin-users.js.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +11 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js +190 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +9 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.js +153 -0
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts +12 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.js +30 -0
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -0
- package/dist/components/admin/admin-workflows.d.ts +4 -0
- package/dist/components/admin/admin-workflows.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows.js +145 -0
- package/dist/components/admin/admin-workflows.js.map +1 -0
- package/dist/components/admin/diff-lines.d.ts +13 -0
- package/dist/components/admin/diff-lines.d.ts.map +1 -0
- package/dist/components/admin/diff-lines.js +57 -0
- package/dist/components/admin/diff-lines.js.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts +36 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.js +58 -0
- package/dist/components/admin/parameter-diff-dialog.js.map +1 -0
- package/dist/components/admin/parameter-history-item.d.ts +17 -0
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -0
- package/dist/components/admin/parameter-history-item.js +177 -0
- package/dist/components/admin/parameter-history-item.js.map +1 -0
- package/dist/components/admin/parameter-json-dialog.d.ts +13 -0
- package/dist/components/admin/parameter-json-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-json-dialog.js +63 -0
- package/dist/components/admin/parameter-json-dialog.js.map +1 -0
- package/dist/components/admin/parameter-save-dialog.d.ts +26 -0
- package/dist/components/admin/parameter-save-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-save-dialog.js +74 -0
- package/dist/components/admin/parameter-save-dialog.js.map +1 -0
- package/dist/components/admin/use-confirmed-action.d.ts +53 -0
- package/dist/components/admin/use-confirmed-action.d.ts.map +1 -0
- package/dist/components/admin/use-confirmed-action.js +50 -0
- package/dist/components/admin/use-confirmed-action.js.map +1 -0
- package/dist/components/alepha-table/alepha-table.d.ts +218 -0
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table.js +565 -0
- package/dist/components/alepha-table/alepha-table.js.map +1 -0
- package/dist/components/alepha-table/use-table-selection.d.ts +34 -0
- package/dist/components/alepha-table/use-table-selection.d.ts.map +1 -0
- package/dist/components/alepha-table/use-table-selection.js +45 -0
- package/dist/components/alepha-table/use-table-selection.js.map +1 -0
- package/dist/components/app-actions/app-actions.d.ts +74 -0
- package/dist/components/app-actions/app-actions.d.ts.map +1 -0
- package/dist/components/app-actions/app-actions.js +77 -0
- package/dist/components/app-actions/app-actions.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +135 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/app-shell.js +276 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/auth/auth-login.d.ts +40 -0
- package/dist/components/auth/auth-login.d.ts.map +1 -0
- package/dist/components/auth/auth-login.js +237 -0
- package/dist/components/auth/auth-login.js.map +1 -0
- package/dist/components/auth/auth-register.d.ts +35 -0
- package/dist/components/auth/auth-register.d.ts.map +1 -0
- package/dist/components/auth/auth-register.js +478 -0
- package/dist/components/auth/auth-register.js.map +1 -0
- package/dist/components/auth/auth-reset-password.d.ts +21 -0
- package/dist/components/auth/auth-reset-password.d.ts.map +1 -0
- package/dist/components/auth/auth-reset-password.js +283 -0
- package/dist/components/auth/auth-reset-password.js.map +1 -0
- package/dist/components/auth/auth-router.d.ts +245 -0
- package/dist/components/auth/auth-router.d.ts.map +1 -0
- package/dist/components/auth/auth-router.js +117 -0
- package/dist/components/auth/auth-router.js.map +1 -0
- package/dist/components/auth/auth-verify-email.d.ts +19 -0
- package/dist/components/auth/auth-verify-email.d.ts.map +1 -0
- package/dist/components/auth/auth-verify-email.js +124 -0
- package/dist/components/auth/auth-verify-email.js.map +1 -0
- package/dist/components/auth/provider-labels.d.ts +9 -0
- package/dist/components/auth/provider-labels.d.ts.map +1 -0
- package/dist/components/auth/provider-labels.js +20 -0
- package/dist/components/auth/provider-labels.js.map +1 -0
- package/dist/components/auto-form/auto-form.d.ts +219 -0
- package/dist/components/auto-form/auto-form.d.ts.map +1 -0
- package/dist/components/auto-form/auto-form.js +412 -0
- package/dist/components/auto-form/auto-form.js.map +1 -0
- package/dist/components/brand-icon/brand-icon.d.ts +18 -0
- package/dist/components/brand-icon/brand-icon.d.ts.map +1 -0
- package/dist/components/brand-icon/brand-icon.js +84 -0
- package/dist/components/brand-icon/brand-icon.js.map +1 -0
- package/dist/components/button-dark/button-dark.d.ts +25 -0
- package/dist/components/button-dark/button-dark.d.ts.map +1 -0
- package/dist/components/button-dark/button-dark.js +44 -0
- package/dist/components/button-dark/button-dark.js.map +1 -0
- package/dist/components/button-language/button-language.d.ts +24 -0
- package/dist/components/button-language/button-language.d.ts.map +1 -0
- package/dist/components/button-language/button-language.js +50 -0
- package/dist/components/button-language/button-language.js.map +1 -0
- package/dist/components/button-theme/button-theme.d.ts +33 -0
- package/dist/components/button-theme/button-theme.d.ts.map +1 -0
- package/dist/components/button-theme/button-theme.js +90 -0
- package/dist/components/button-theme/button-theme.js.map +1 -0
- package/dist/components/button-user/button-user.d.ts +147 -0
- package/dist/components/button-user/button-user.d.ts.map +1 -0
- package/dist/components/button-user/button-user.js +147 -0
- package/dist/components/button-user/button-user.js.map +1 -0
- package/dist/components/captcha/turnstile-widget.d.ts +59 -0
- package/dist/components/captcha/turnstile-widget.d.ts.map +1 -0
- package/dist/components/captcha/turnstile-widget.js +97 -0
- package/dist/components/captcha/turnstile-widget.js.map +1 -0
- package/dist/components/control/control.d.ts +200 -0
- package/dist/components/control/control.d.ts.map +1 -0
- package/dist/components/control/control.js +300 -0
- package/dist/components/control/control.js.map +1 -0
- package/dist/components/control-array/control-array.d.ts +77 -0
- package/dist/components/control-array/control-array.d.ts.map +1 -0
- package/dist/components/control-array/control-array.js +444 -0
- package/dist/components/control-array/control-array.js.map +1 -0
- package/dist/components/control-base/field-i18n.d.ts +30 -0
- package/dist/components/control-base/field-i18n.d.ts.map +1 -0
- package/dist/components/control-base/field-i18n.js +27 -0
- package/dist/components/control-base/field-i18n.js.map +1 -0
- package/dist/components/control-base/form-field.d.ts +128 -0
- package/dist/components/control-base/form-field.d.ts.map +1 -0
- package/dist/components/control-base/form-field.js +208 -0
- package/dist/components/control-base/form-field.js.map +1 -0
- package/dist/components/control-base/grid.d.ts +18 -0
- package/dist/components/control-base/grid.d.ts.map +1 -0
- package/dist/components/control-base/grid.js +46 -0
- package/dist/components/control-base/grid.js.map +1 -0
- package/dist/components/control-base/icon-hint.d.ts +9 -0
- package/dist/components/control-base/icon-hint.d.ts.map +1 -0
- package/dist/components/control-base/icon-hint.js +35 -0
- package/dist/components/control-base/icon-hint.js.map +1 -0
- package/dist/components/control-date/control-date.d.ts +34 -0
- package/dist/components/control-date/control-date.d.ts.map +1 -0
- package/dist/components/control-date/control-date.js +111 -0
- package/dist/components/control-date/control-date.js.map +1 -0
- package/dist/components/control-number/control-number.d.ts +38 -0
- package/dist/components/control-number/control-number.d.ts.map +1 -0
- package/dist/components/control-number/control-number.js +77 -0
- package/dist/components/control-number/control-number.js.map +1 -0
- package/dist/components/control-object/control-object.d.ts +45 -0
- package/dist/components/control-object/control-object.d.ts.map +1 -0
- package/dist/components/control-object/control-object.js +110 -0
- package/dist/components/control-object/control-object.js.map +1 -0
- package/dist/components/control-password/control-password.d.ts +28 -0
- package/dist/components/control-password/control-password.d.ts.map +1 -0
- package/dist/components/control-password/control-password.js +65 -0
- package/dist/components/control-password/control-password.js.map +1 -0
- package/dist/components/control-select/control-select.d.ts +128 -0
- package/dist/components/control-select/control-select.d.ts.map +1 -0
- package/dist/components/control-select/control-select.js +363 -0
- package/dist/components/control-select/control-select.js.map +1 -0
- package/dist/components/control-upload/control-upload.d.ts +67 -0
- package/dist/components/control-upload/control-upload.d.ts.map +1 -0
- package/dist/components/control-upload/control-upload.js +294 -0
- package/dist/components/control-upload/control-upload.js.map +1 -0
- package/dist/components/file-image/file-image.d.ts +31 -0
- package/dist/components/file-image/file-image.d.ts.map +1 -0
- package/dist/components/file-image/file-image.js +27 -0
- package/dist/components/file-image/file-image.js.map +1 -0
- package/dist/components/language-toggle/language-toggle.d.ts +8 -0
- package/dist/components/language-toggle/language-toggle.d.ts.map +1 -0
- package/dist/components/language-toggle/language-toggle.js +49 -0
- package/dist/components/language-toggle/language-toggle.js.map +1 -0
- package/dist/components/markdown-view/markdown-view.css +114 -0
- package/dist/components/markdown-view/markdown-view.d.ts +21 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view/markdown-view.js +104 -0
- package/dist/components/markdown-view/markdown-view.js.map +1 -0
- package/dist/components/nav-shell/nav-page.d.ts +24 -0
- package/dist/components/nav-shell/nav-page.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-page.js +28 -0
- package/dist/components/nav-shell/nav-page.js.map +1 -0
- package/dist/components/nav-shell/nav-shell.d.ts +26 -0
- package/dist/components/nav-shell/nav-shell.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-shell.js +53 -0
- package/dist/components/nav-shell/nav-shell.js.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts +65 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.js +87 -0
- package/dist/components/nav-shell/nav-tree-util.js.map +1 -0
- package/dist/components/nav-shell/spotlight.d.ts +37 -0
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -0
- package/dist/components/nav-shell/spotlight.js +102 -0
- package/dist/components/nav-shell/spotlight.js.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts +24 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js +36 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts +45 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.js +60 -0
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts +21 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.js +48 -0
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -0
- package/dist/components/settings/settings-danger-section.d.ts +35 -0
- package/dist/components/settings/settings-danger-section.d.ts.map +1 -0
- package/dist/components/settings/settings-danger-section.js +42 -0
- package/dist/components/settings/settings-danger-section.js.map +1 -0
- package/dist/components/settings/settings-heading.d.ts +36 -0
- package/dist/components/settings/settings-heading.d.ts.map +1 -0
- package/dist/components/settings/settings-heading.js +39 -0
- package/dist/components/settings/settings-heading.js.map +1 -0
- package/dist/components/settings/settings-layout.d.ts +81 -0
- package/dist/components/settings/settings-layout.d.ts.map +1 -0
- package/dist/components/settings/settings-layout.js +56 -0
- package/dist/components/settings/settings-layout.js.map +1 -0
- package/dist/components/settings/settings-nav.d.ts +85 -0
- package/dist/components/settings/settings-nav.d.ts.map +1 -0
- package/dist/components/settings/settings-nav.js +91 -0
- package/dist/components/settings/settings-nav.js.map +1 -0
- package/dist/components/settings/settings-row.d.ts +45 -0
- package/dist/components/settings/settings-row.d.ts.map +1 -0
- package/dist/components/settings/settings-row.js +44 -0
- package/dist/components/settings/settings-row.js.map +1 -0
- package/dist/components/settings/settings-section.d.ts +36 -0
- package/dist/components/settings/settings-section.d.ts.map +1 -0
- package/dist/components/settings/settings-section.js +36 -0
- package/dist/components/settings/settings-section.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +96 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +44 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +5 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +15 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +52 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +8 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +31 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +73 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +43 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +18 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +60 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +119 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +57 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +134 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +151 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +164 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +20 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +89 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +134 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +93 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +3 -0
- package/dist/components/ui/drawer.d.ts +17 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +138 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +61 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +38 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +80 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +16 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +84 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +87 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +8 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +46 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +29 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/segmented.d.ts +46 -0
- package/dist/components/ui/segmented.d.ts.map +1 -0
- package/dist/components/ui/segmented.js +119 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +99 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +64 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +388 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +14 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +35 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +33 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +17 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +68 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +47 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +14 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +54 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +38 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/use-dialog/use-dialog.d.ts +61 -0
- package/dist/components/use-dialog/use-dialog.d.ts.map +1 -0
- package/dist/components/use-dialog/use-dialog.js +139 -0
- package/dist/components/use-dialog/use-dialog.js.map +1 -0
- package/dist/components/use-toast/use-toast.d.ts +37 -0
- package/dist/components/use-toast/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast/use-toast.js +32 -0
- package/dist/components/use-toast/use-toast.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +20 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/lib/i18n-fr.d.ts +46 -0
- package/dist/lib/i18n-fr.d.ts.map +1 -0
- package/dist/lib/i18n-fr.js +505 -0
- package/dist/lib/i18n-fr.js.map +1 -0
- package/dist/lib/resize-image.d.ts +50 -0
- package/dist/lib/resize-image.d.ts.map +1 -0
- package/dist/lib/resize-image.js +68 -0
- package/dist/lib/resize-image.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +254 -0
- package/package.json +46 -15
- package/src/components/account/account-connections.tsx +9 -1
- package/src/components/account/account-keys.tsx +1 -1
- package/src/components/account/account-layout.tsx +6 -3
- package/src/components/account/account-profile.tsx +238 -125
- package/src/components/account/account-router-options.tsx +14 -0
- package/src/components/account/account-router.tsx +20 -1
- package/src/components/account/account-security.tsx +1 -1
- package/src/components/admin/admin-router-options.tsx +20 -0
- package/src/components/alepha-table/alepha-table.tsx +23 -7
- package/src/components/app-actions/app-actions.tsx +7 -2
- package/src/components/auth/auth-register.tsx +55 -17
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +237 -0
- package/src/components/auto-form/auto-form.tsx +113 -27
- package/src/components/button-user/button-user.tsx +76 -17
- package/src/components/control/control.tsx +33 -8
- package/src/components/control-base/form-field.tsx +60 -3
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +48 -0
- package/src/components/markdown-view/markdown-view.tsx +14 -6
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +88 -0
- package/src/components/nav-shell/nav-tree-util.ts +48 -0
- package/src/components/nav-shell/use-nav-entries.ts +11 -2
- package/src/components/settings/settings-heading.tsx +55 -0
- package/src/components/settings/settings-layout.tsx +66 -7
- package/src/components/settings/settings-nav.tsx +48 -4
- package/src/components/settings/settings-section.tsx +2 -14
- package/src/components/ui/segmented.tsx +19 -2
- package/src/lib/__tests__/rehype-safe-img.spec.ts +0 -121
- package/src/lib/rehype-safe-img.ts +0 -150
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Badge } from "../ui/badge.js";
|
|
2
|
+
import { AlephaTable } from "../alepha-table/alepha-table.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { useI18n } from "alepha/react/i18n";
|
|
6
|
+
//#region src/components/admin/admin-user-detail-audits-tab.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Audit tab: read-only trail of actions recorded against the user.
|
|
9
|
+
*/
|
|
10
|
+
const AdminUserDetailAuditsTab = (props) => {
|
|
11
|
+
const { tr, l } = useI18n();
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: "flex min-h-0 flex-1 flex-col overflow-hidden p-6",
|
|
14
|
+
children: /* @__PURE__ */ jsx(AlephaTable, {
|
|
15
|
+
className: "min-h-0 flex-1",
|
|
16
|
+
persistenceKey: `admin.userDetail.${props.userId}.audits`,
|
|
17
|
+
fetch: props.fetch,
|
|
18
|
+
columns: {
|
|
19
|
+
createdAt: {
|
|
20
|
+
label: tr("admin.userDetail.colWhen", { default: "When" }),
|
|
21
|
+
sortable: true,
|
|
22
|
+
cell: (a) => /* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "text-muted-foreground text-xs",
|
|
24
|
+
children: String(l(a.createdAt, { date: "fromNow" }))
|
|
25
|
+
})
|
|
26
|
+
},
|
|
27
|
+
action: {
|
|
28
|
+
label: tr("admin.userDetail.colAction", { default: "Action" }),
|
|
29
|
+
cell: (a) => /* @__PURE__ */ jsx("code", {
|
|
30
|
+
className: "text-xs font-medium",
|
|
31
|
+
children: a.action
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
resource: {
|
|
35
|
+
label: tr("admin.userDetail.colResource", { default: "Resource" }),
|
|
36
|
+
cell: (a) => /* @__PURE__ */ jsx("span", {
|
|
37
|
+
className: "font-mono text-xs",
|
|
38
|
+
children: a.resourceType ? `${a.resourceType}:${a.resourceId ?? "—"}` : "—"
|
|
39
|
+
})
|
|
40
|
+
},
|
|
41
|
+
status: {
|
|
42
|
+
label: tr("admin.userDetail.colAuditStatus", { default: "Status" }),
|
|
43
|
+
cell: (a) => /* @__PURE__ */ jsx(Badge, {
|
|
44
|
+
variant: a.success ? "default" : "destructive",
|
|
45
|
+
children: a.success ? tr("admin.userDetail.ok", { default: "OK" }) : tr("admin.userDetail.failed", { default: "Failed" })
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { AdminUserDetailAuditsTab };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=admin-user-detail-audits-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-audits-tab.js","names":[],"sources":["../../../src/components/admin/admin-user-detail-audits-tab.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { AlephaTable } from \"@alepha/ui/components/alepha-table/alepha-table\";\nimport { Badge } from \"@alepha/ui/components/ui/badge\";\nimport type { AuditEntity } from \"alepha/api/audits\";\nimport { useI18n } from \"alepha/react/i18n\";\n\nexport interface AdminUserDetailAuditsTabProps {\n /**\n * Scopes the table's persisted column/sort state to this user.\n */\n userId: string;\n fetch: React.ComponentProps<typeof AlephaTable<AuditEntity>>[\"fetch\"];\n}\n\n/**\n * Audit tab: read-only trail of actions recorded against the user.\n */\nexport const AdminUserDetailAuditsTab = (\n props: AdminUserDetailAuditsTabProps,\n) => {\n const { tr, l } = useI18n();\n\n return (\n <div className=\"flex min-h-0 flex-1 flex-col overflow-hidden p-6\">\n <AlephaTable<AuditEntity>\n className=\"min-h-0 flex-1\"\n persistenceKey={`admin.userDetail.${props.userId}.audits`}\n fetch={props.fetch}\n columns={{\n createdAt: {\n label: tr(\"admin.userDetail.colWhen\", {\n default: \"When\",\n }),\n sortable: true,\n cell: (a) => (\n <span className=\"text-muted-foreground text-xs\">\n {String(l(a.createdAt, { date: \"fromNow\" }))}\n </span>\n ),\n },\n action: {\n label: tr(\"admin.userDetail.colAction\", {\n default: \"Action\",\n }),\n cell: (a) => (\n <code className=\"text-xs font-medium\">{a.action}</code>\n ),\n },\n resource: {\n label: tr(\"admin.userDetail.colResource\", {\n default: \"Resource\",\n }),\n cell: (a) => (\n <span className=\"font-mono text-xs\">\n {a.resourceType\n ? `${a.resourceType}:${a.resourceId ?? \"—\"}`\n : \"—\"}\n </span>\n ),\n },\n status: {\n label: tr(\"admin.userDetail.colAuditStatus\", {\n default: \"Status\",\n }),\n cell: (a) => (\n <Badge variant={a.success ? \"default\" : \"destructive\"}>\n {a.success\n ? tr(\"admin.userDetail.ok\", { default: \"OK\" })\n : tr(\"admin.userDetail.failed\", {\n default: \"Failed\",\n })}\n </Badge>\n ),\n },\n }}\n />\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAoBA,MAAa,4BACX,UACG;CACH,MAAM,EAAE,IAAI,MAAM,QAAQ;CAE1B,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,oBAAC,aAAD;GACE,WAAU;GACV,gBAAgB,oBAAoB,MAAM,OAAO;GACjD,OAAO,MAAM;GACb,SAAS;IACP,WAAW;KACT,OAAO,GAAG,4BAA4B,EACpC,SAAS,OACX,CAAC;KACD,UAAU;KACV,OAAO,MACL,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC,CAAC;KACvC,CAAA;IAEV;IACA,QAAQ;KACN,OAAO,GAAG,8BAA8B,EACtC,SAAS,SACX,CAAC;KACD,OAAO,MACL,oBAAC,QAAD;MAAM,WAAU;MAAuB,UAAA,EAAE;KAAa,CAAA;IAE1D;IACA,UAAU;KACR,OAAO,GAAG,gCAAgC,EACxC,SAAS,WACX,CAAC;KACD,OAAO,MACL,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,EAAE,eACC,GAAG,EAAE,aAAa,GAAG,EAAE,cAAc,QACrC;KACA,CAAA;IAEV;IACA,QAAQ;KACN,OAAO,GAAG,mCAAmC,EAC3C,SAAS,SACX,CAAC;KACD,OAAO,MACL,oBAAC,OAAD;MAAO,SAAS,EAAE,UAAU,YAAY;MACrC,UAAA,EAAE,UACC,GAAG,uBAAuB,EAAE,SAAS,KAAK,CAAC,IAC3C,GAAG,2BAA2B,EAC5B,SAAS,SACX,CAAC;KACA,CAAA;IAEX;GACF;EACD,CAAA;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { UserResource } from "alepha/api/users";
|
|
3
|
+
export interface AdminUserDetailIdentityAsideProps {
|
|
4
|
+
user: UserResource;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Identity sheet shown alongside the user detail tabs.
|
|
8
|
+
*
|
|
9
|
+
* Admin-style: a dense label/value list rather than a marketing hero. Only
|
|
10
|
+
* fields with a value are listed; ID and Status always show. Display order is
|
|
11
|
+
* ID → username → email → (phone) → status → name → roles → dates.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AdminUserDetailIdentityAside: (props: AdminUserDetailIdentityAsideProps) => React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=admin-user-detail-identity-aside.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-identity-aside.d.ts","sourceRoot":"","sources":["../../../src/components/admin/admin-user-detail-identity-aside.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAKrD,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,UAChC,iCAAiC,sBA6LzC,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Badge } from "../ui/badge.js";
|
|
3
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar.js";
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Check, Copy, ShieldCheck } from "lucide-react";
|
|
7
|
+
import { useI18n } from "alepha/react/i18n";
|
|
8
|
+
//#region src/components/admin/admin-user-detail-identity-aside.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Identity sheet shown alongside the user detail tabs.
|
|
11
|
+
*
|
|
12
|
+
* Admin-style: a dense label/value list rather than a marketing hero. Only
|
|
13
|
+
* fields with a value are listed; ID and Status always show. Display order is
|
|
14
|
+
* ID → username → email → (phone) → status → name → roles → dates.
|
|
15
|
+
*/
|
|
16
|
+
const AdminUserDetailIdentityAside = (props) => {
|
|
17
|
+
const { tr, l } = useI18n();
|
|
18
|
+
const user = props.user;
|
|
19
|
+
const [copiedId, setCopiedId] = useState(false);
|
|
20
|
+
const copyTimer = useRef(void 0);
|
|
21
|
+
useEffect(() => () => {
|
|
22
|
+
if (copyTimer.current) clearTimeout(copyTimer.current);
|
|
23
|
+
}, []);
|
|
24
|
+
const copyId = async () => {
|
|
25
|
+
try {
|
|
26
|
+
await navigator.clipboard.writeText(user.id);
|
|
27
|
+
setCopiedId(true);
|
|
28
|
+
if (copyTimer.current) clearTimeout(copyTimer.current);
|
|
29
|
+
copyTimer.current = setTimeout(() => setCopiedId(false), 1500);
|
|
30
|
+
} catch {}
|
|
31
|
+
};
|
|
32
|
+
const initial = (user.email || user.username || user.firstName || "?").charAt(0).toUpperCase();
|
|
33
|
+
const displayName = user.email || [user.firstName, user.lastName].filter(Boolean).join(" ") || user.username || user.id.slice(0, 8);
|
|
34
|
+
const fullName = [user.firstName, user.lastName].filter(Boolean).join(" ");
|
|
35
|
+
const rows = [];
|
|
36
|
+
rows.push({
|
|
37
|
+
label: String(tr("admin.userDetail.id", { default: "ID" })),
|
|
38
|
+
value: /* @__PURE__ */ jsxs("div", {
|
|
39
|
+
className: "flex items-center gap-1",
|
|
40
|
+
children: [/* @__PURE__ */ jsx("code", {
|
|
41
|
+
className: "text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs",
|
|
42
|
+
title: user.id,
|
|
43
|
+
children: user.id
|
|
44
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
45
|
+
type: "button",
|
|
46
|
+
variant: "ghost",
|
|
47
|
+
size: "icon-xs",
|
|
48
|
+
onClick: copyId,
|
|
49
|
+
"aria-label": String(tr("admin.userDetail.copyId", { default: "Copy ID" })),
|
|
50
|
+
className: "text-muted-foreground hover:text-foreground shrink-0",
|
|
51
|
+
children: copiedId ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(Copy, { className: "size-3.5" })
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
if (user.username) rows.push({
|
|
56
|
+
label: String(tr("admin.userDetail.username", { default: "Username" })),
|
|
57
|
+
value: /* @__PURE__ */ jsxs("span", {
|
|
58
|
+
className: "block truncate",
|
|
59
|
+
title: user.username,
|
|
60
|
+
children: ["@", user.username]
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
if (user.email) rows.push({
|
|
64
|
+
label: String(tr("admin.userDetail.email", { default: "Email" })),
|
|
65
|
+
value: /* @__PURE__ */ jsx("a", {
|
|
66
|
+
href: `mailto:${user.email}`,
|
|
67
|
+
className: "text-primary block truncate hover:underline",
|
|
68
|
+
title: user.email,
|
|
69
|
+
children: user.email
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
if (user.phoneNumber) rows.push({
|
|
73
|
+
label: String(tr("admin.userDetail.phone", { default: "Phone" })),
|
|
74
|
+
value: /* @__PURE__ */ jsx("a", {
|
|
75
|
+
href: `tel:${user.phoneNumber}`,
|
|
76
|
+
className: "text-primary block truncate font-mono hover:underline",
|
|
77
|
+
children: user.phoneNumber
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
rows.push({
|
|
81
|
+
label: String(tr("admin.userDetail.fieldStatus", { default: "Status" })),
|
|
82
|
+
value: /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex flex-wrap items-center gap-1",
|
|
84
|
+
children: [/* @__PURE__ */ jsx(Badge, {
|
|
85
|
+
variant: user.enabled ? "default" : "destructive",
|
|
86
|
+
children: user.enabled ? tr("admin.userDetail.active", { default: "Active" }) : tr("admin.userDetail.disabledBadge", { default: "Disabled" })
|
|
87
|
+
}), user.emailVerified && /* @__PURE__ */ jsxs(Badge, {
|
|
88
|
+
variant: "outline",
|
|
89
|
+
className: "gap-1",
|
|
90
|
+
children: [/* @__PURE__ */ jsx(ShieldCheck, { className: "size-3" }), tr("admin.userDetail.verified", { default: "Verified" })]
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
rows.push({
|
|
95
|
+
label: String(tr("admin.userDetail.name", { default: "Name" })),
|
|
96
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
97
|
+
className: "block truncate",
|
|
98
|
+
children: fullName || /* @__PURE__ */ jsx("span", {
|
|
99
|
+
className: "text-muted-foreground",
|
|
100
|
+
children: "—"
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
if (user.roles?.length) rows.push({
|
|
105
|
+
label: String(tr("admin.userDetail.roles", { default: "Roles" })),
|
|
106
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
107
|
+
className: "block",
|
|
108
|
+
children: user.roles.join(", ")
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
rows.push({
|
|
112
|
+
label: String(tr("admin.userDetail.lastLogin", { default: "Last login" })),
|
|
113
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
114
|
+
className: "block",
|
|
115
|
+
children: user.lastLoginAt ? String(l(user.lastLoginAt, { date: "lll" })) : tr("admin.userDetail.never", { default: "Never" })
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
rows.push({
|
|
119
|
+
label: String(tr("admin.userDetail.created", { default: "Created" })),
|
|
120
|
+
value: /* @__PURE__ */ jsx("span", {
|
|
121
|
+
className: "block",
|
|
122
|
+
children: String(l(user.createdAt, { date: "lll" }))
|
|
123
|
+
})
|
|
124
|
+
});
|
|
125
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
126
|
+
className: "flex flex-col gap-4",
|
|
127
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
128
|
+
className: "flex items-center gap-3",
|
|
129
|
+
children: [/* @__PURE__ */ jsxs(Avatar, {
|
|
130
|
+
className: "size-10 rounded-md after:rounded-md",
|
|
131
|
+
children: [user.picture && /* @__PURE__ */ jsx(AvatarImage, {
|
|
132
|
+
src: user.picture,
|
|
133
|
+
alt: String(displayName),
|
|
134
|
+
className: "rounded-md"
|
|
135
|
+
}), /* @__PURE__ */ jsx(AvatarFallback, {
|
|
136
|
+
className: "rounded-md",
|
|
137
|
+
children: initial
|
|
138
|
+
})]
|
|
139
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
140
|
+
className: "min-w-0 flex-1 truncate text-sm font-semibold tracking-tight",
|
|
141
|
+
title: String(displayName),
|
|
142
|
+
children: displayName
|
|
143
|
+
})]
|
|
144
|
+
}), /* @__PURE__ */ jsx("dl", {
|
|
145
|
+
className: "flex flex-col gap-3 border-t pt-4 text-sm",
|
|
146
|
+
children: rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
className: "flex flex-col gap-0.5",
|
|
148
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
149
|
+
className: "text-muted-foreground text-[11px] font-medium uppercase tracking-wide",
|
|
150
|
+
children: row.label
|
|
151
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
152
|
+
className: "min-w-0",
|
|
153
|
+
children: row.value
|
|
154
|
+
})]
|
|
155
|
+
}, row.label))
|
|
156
|
+
})]
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
//#endregion
|
|
160
|
+
export { AdminUserDetailIdentityAside };
|
|
161
|
+
|
|
162
|
+
//# sourceMappingURL=admin-user-detail-identity-aside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-identity-aside.js","names":[],"sources":["../../../src/components/admin/admin-user-detail-identity-aside.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@alepha/ui/components/ui/avatar\";\nimport { Badge } from \"@alepha/ui/components/ui/badge\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport type { UserResource } from \"alepha/api/users\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { Check, Copy, ShieldCheck } from \"lucide-react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport interface AdminUserDetailIdentityAsideProps {\n user: UserResource;\n}\n\n/**\n * Identity sheet shown alongside the user detail tabs.\n *\n * Admin-style: a dense label/value list rather than a marketing hero. Only\n * fields with a value are listed; ID and Status always show. Display order is\n * ID → username → email → (phone) → status → name → roles → dates.\n */\nexport const AdminUserDetailIdentityAside = (\n props: AdminUserDetailIdentityAsideProps,\n) => {\n const { tr, l } = useI18n();\n const user = props.user;\n\n const [copiedId, setCopiedId] = useState(false);\n const copyTimer = useRef<ReturnType<typeof setTimeout> | undefined>(\n undefined,\n );\n // Clear the copy-feedback reset timer on unmount.\n useEffect(\n () => () => {\n if (copyTimer.current) clearTimeout(copyTimer.current);\n },\n [],\n );\n\n const copyId = async () => {\n try {\n await navigator.clipboard.writeText(user.id);\n setCopiedId(true);\n if (copyTimer.current) clearTimeout(copyTimer.current);\n copyTimer.current = setTimeout(() => setCopiedId(false), 1_500);\n } catch {\n // clipboard may be unavailable (insecure context); ignore\n }\n };\n\n const initial = (user.email || user.username || user.firstName || \"?\")\n .charAt(0)\n .toUpperCase();\n const displayName =\n user.email ||\n [user.firstName, user.lastName].filter(Boolean).join(\" \") ||\n user.username ||\n user.id.slice(0, 8);\n const fullName = [user.firstName, user.lastName].filter(Boolean).join(\" \");\n\n const rows: Array<{ label: string; value: React.ReactNode }> = [];\n\n rows.push({\n label: String(tr(\"admin.userDetail.id\", { default: \"ID\" })),\n value: (\n <div className=\"flex items-center gap-1\">\n <code\n className=\"text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs\"\n title={user.id}\n >\n {user.id}\n </code>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-xs\"\n onClick={copyId}\n aria-label={String(\n tr(\"admin.userDetail.copyId\", { default: \"Copy ID\" }),\n )}\n className=\"text-muted-foreground hover:text-foreground shrink-0\"\n >\n {copiedId ? (\n <Check className=\"size-3.5\" />\n ) : (\n <Copy className=\"size-3.5\" />\n )}\n </Button>\n </div>\n ),\n });\n if (user.username) {\n rows.push({\n label: String(tr(\"admin.userDetail.username\", { default: \"Username\" })),\n value: (\n <span className=\"block truncate\" title={user.username}>\n @{user.username}\n </span>\n ),\n });\n }\n if (user.email) {\n rows.push({\n label: String(tr(\"admin.userDetail.email\", { default: \"Email\" })),\n value: (\n <a\n href={`mailto:${user.email}`}\n className=\"text-primary block truncate hover:underline\"\n title={user.email}\n >\n {user.email}\n </a>\n ),\n });\n }\n if (user.phoneNumber) {\n rows.push({\n label: String(tr(\"admin.userDetail.phone\", { default: \"Phone\" })),\n value: (\n <a\n href={`tel:${user.phoneNumber}`}\n className=\"text-primary block truncate font-mono hover:underline\"\n >\n {user.phoneNumber}\n </a>\n ),\n });\n }\n rows.push({\n label: String(tr(\"admin.userDetail.fieldStatus\", { default: \"Status\" })),\n value: (\n <div className=\"flex flex-wrap items-center gap-1\">\n <Badge variant={user.enabled ? \"default\" : \"destructive\"}>\n {user.enabled\n ? tr(\"admin.userDetail.active\", { default: \"Active\" })\n : tr(\"admin.userDetail.disabledBadge\", { default: \"Disabled\" })}\n </Badge>\n {user.emailVerified && (\n <Badge variant=\"outline\" className=\"gap-1\">\n <ShieldCheck className=\"size-3\" />\n {tr(\"admin.userDetail.verified\", { default: \"Verified\" })}\n </Badge>\n )}\n </div>\n ),\n });\n rows.push({\n label: String(tr(\"admin.userDetail.name\", { default: \"Name\" })),\n value: (\n <span className=\"block truncate\">\n {fullName || <span className=\"text-muted-foreground\">—</span>}\n </span>\n ),\n });\n if (user.roles?.length) {\n rows.push({\n label: String(tr(\"admin.userDetail.roles\", { default: \"Roles\" })),\n value: <span className=\"block\">{user.roles.join(\", \")}</span>,\n });\n }\n rows.push({\n label: String(tr(\"admin.userDetail.lastLogin\", { default: \"Last login\" })),\n value: (\n <span className=\"block\">\n {user.lastLoginAt\n ? String(l(user.lastLoginAt, { date: \"lll\" }))\n : tr(\"admin.userDetail.never\", { default: \"Never\" })}\n </span>\n ),\n });\n rows.push({\n label: String(tr(\"admin.userDetail.created\", { default: \"Created\" })),\n value: (\n <span className=\"block\">\n {String(l(user.createdAt, { date: \"lll\" }))}\n </span>\n ),\n });\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center gap-3\">\n <Avatar className=\"size-10 rounded-md after:rounded-md\">\n {user.picture && (\n <AvatarImage\n src={user.picture}\n alt={String(displayName)}\n className=\"rounded-md\"\n />\n )}\n <AvatarFallback className=\"rounded-md\">{initial}</AvatarFallback>\n </Avatar>\n <span\n className=\"min-w-0 flex-1 truncate text-sm font-semibold tracking-tight\"\n title={String(displayName)}\n >\n {displayName}\n </span>\n </div>\n <dl className=\"flex flex-col gap-3 border-t pt-4 text-sm\">\n {rows.map((row) => (\n <div key={row.label} className=\"flex flex-col gap-0.5\">\n <dt className=\"text-muted-foreground text-[11px] font-medium uppercase tracking-wide\">\n {row.label}\n </dt>\n <dd className=\"min-w-0\">{row.value}</dd>\n </div>\n ))}\n </dl>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA2BA,MAAa,gCACX,UACG;CACH,MAAM,EAAE,IAAI,MAAM,QAAQ;CAC1B,MAAM,OAAO,MAAM;CAEnB,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,YAAY,OAChB,KAAA,CACF;CAEA,sBACc;EACV,IAAI,UAAU,SAAS,aAAa,UAAU,OAAO;CACvD,GACA,CAAC,CACH;CAEA,MAAM,SAAS,YAAY;EACzB,IAAI;GACF,MAAM,UAAU,UAAU,UAAU,KAAK,EAAE;GAC3C,YAAY,IAAI;GAChB,IAAI,UAAU,SAAS,aAAa,UAAU,OAAO;GACrD,UAAU,UAAU,iBAAiB,YAAY,KAAK,GAAG,IAAK;EAChE,QAAQ,CAER;CACF;CAEA,MAAM,WAAW,KAAK,SAAS,KAAK,YAAY,KAAK,aAAa,IAAA,CAC/D,OAAO,CAAC,CAAC,CACT,YAAY;CACf,MAAM,cACJ,KAAK,SACL,CAAC,KAAK,WAAW,KAAK,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KACxD,KAAK,YACL,KAAK,GAAG,MAAM,GAAG,CAAC;CACpB,MAAM,WAAW,CAAC,KAAK,WAAW,KAAK,QAAQ,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAEzE,MAAM,OAAyD,CAAC;CAEhE,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,uBAAuB,EAAE,SAAS,KAAK,CAAC,CAAC;EAC1D,OACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,QAAD;IACE,WAAU;IACV,OAAO,KAAK;IAEX,UAAA,KAAK;GACF,CAAA,GACN,oBAAC,QAAD;IACE,MAAK;IACL,SAAQ;IACR,MAAK;IACL,SAAS;IACT,cAAY,OACV,GAAG,2BAA2B,EAAE,SAAS,UAAU,CAAC,CACtD;IACA,WAAU;IAET,UAAA,WACC,oBAAC,OAAD,EAAO,WAAU,WAAY,CAAA,IAE7B,oBAAC,MAAD,EAAM,WAAU,WAAY,CAAA;GAExB,CAAA,CACL;;CAET,CAAC;CACD,IAAI,KAAK,UACP,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,6BAA6B,EAAE,SAAS,WAAW,CAAC,CAAC;EACtE,OACE,qBAAC,QAAD;GAAM,WAAU;GAAiB,OAAO,KAAK;GAA7C,UAAA,CAAuD,KACnD,KAAK,QACH;;CAEV,CAAC;CAEH,IAAI,KAAK,OACP,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,0BAA0B,EAAE,SAAS,QAAQ,CAAC,CAAC;EAChE,OACE,oBAAC,KAAD;GACE,MAAM,UAAU,KAAK;GACrB,WAAU;GACV,OAAO,KAAK;GAEX,UAAA,KAAK;EACL,CAAA;CAEP,CAAC;CAEH,IAAI,KAAK,aACP,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,0BAA0B,EAAE,SAAS,QAAQ,CAAC,CAAC;EAChE,OACE,oBAAC,KAAD;GACE,MAAM,OAAO,KAAK;GAClB,WAAU;GAET,UAAA,KAAK;EACL,CAAA;CAEP,CAAC;CAEH,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,gCAAgC,EAAE,SAAS,SAAS,CAAC,CAAC;EACvE,OACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,OAAD;IAAO,SAAS,KAAK,UAAU,YAAY;IACxC,UAAA,KAAK,UACF,GAAG,2BAA2B,EAAE,SAAS,SAAS,CAAC,IACnD,GAAG,kCAAkC,EAAE,SAAS,WAAW,CAAC;GAC3D,CAAA,GACN,KAAK,iBACJ,qBAAC,OAAD;IAAO,SAAQ;IAAU,WAAU;IAAnC,UAAA,CACE,oBAAC,aAAD,EAAa,WAAU,SAAU,CAAA,GAChC,GAAG,6BAA6B,EAAE,SAAS,WAAW,CAAC,CACnD;GAEN,CAAA,CAAA;;CAET,CAAC;CACD,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,yBAAyB,EAAE,SAAS,OAAO,CAAC,CAAC;EAC9D,OACE,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA,YAAY,oBAAC,QAAD;IAAM,WAAU;IAAwB,UAAA;GAAO,CAAA;EACxD,CAAA;CAEV,CAAC;CACD,IAAI,KAAK,OAAO,QACd,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,0BAA0B,EAAE,SAAS,QAAQ,CAAC,CAAC;EAChE,OAAO,oBAAC,QAAD;GAAM,WAAU;GAAS,UAAA,KAAK,MAAM,KAAK,IAAI;EAAQ,CAAA;CAC9D,CAAC;CAEH,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,8BAA8B,EAAE,SAAS,aAAa,CAAC,CAAC;EACzE,OACE,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA,KAAK,cACF,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC,CAAC,IAC3C,GAAG,0BAA0B,EAAE,SAAS,QAAQ,CAAC;EACjD,CAAA;CAEV,CAAC;CACD,KAAK,KAAK;EACR,OAAO,OAAO,GAAG,4BAA4B,EAAE,SAAS,UAAU,CAAC,CAAC;EACpE,OACE,oBAAC,QAAD;GAAM,WAAU;GACb,UAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC,CAAC;EACtC,CAAA;CAEV,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,QAAD;IAAQ,WAAU;IAAlB,UAAA,CACG,KAAK,WACJ,oBAAC,aAAD;KACE,KAAK,KAAK;KACV,KAAK,OAAO,WAAW;KACvB,WAAU;IACX,CAAA,GAEH,oBAAC,gBAAD;KAAgB,WAAU;KAAc,UAAA;IAAwB,CAAA,CAC1D;GACR,CAAA,GAAA,oBAAC,QAAD;IACE,WAAU;IACV,OAAO,OAAO,WAAW;IAExB,UAAA;GACG,CAAA,CACH;EACL,CAAA,GAAA,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,KAAK,KAAK,QACT,qBAAC,OAAD;IAAqB,WAAU;IAA/B,UAAA,CACE,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,IAAI;IACH,CAAA,GACJ,oBAAC,MAAD;KAAI,WAAU;KAAW,UAAA,IAAI;IAAU,CAAA,CACpC;GALK,GAAA,IAAI,KAKT,CACN;EACC,CAAA,CACD;;AAET"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { FormModel } from "alepha/react/form";
|
|
3
|
+
import type { ProfilePolicy } from "./admin-user-detail-profile-policy.ts";
|
|
4
|
+
import type { profileSchema } from "./admin-user-detail-profile-schema.ts";
|
|
5
|
+
export interface AdminUserDetailOverviewTabProps {
|
|
6
|
+
form: FormModel<typeof profileSchema>;
|
|
7
|
+
/**
|
|
8
|
+
* Role metadata for the roles picker. `default: true` roles are offered
|
|
9
|
+
* but not togglable.
|
|
10
|
+
*/
|
|
11
|
+
availableRoles: ReadonlyArray<{
|
|
12
|
+
name: string;
|
|
13
|
+
default?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Which identity fields the realm collects. A field the realm has turned
|
|
17
|
+
* off is not rendered at all — an Email input on a username-only realm is
|
|
18
|
+
* an invitation to write a value nothing can use.
|
|
19
|
+
*/
|
|
20
|
+
policy: ProfilePolicy;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Overview tab: the editable profile form.
|
|
24
|
+
*/
|
|
25
|
+
export declare const AdminUserDetailOverviewTab: (props: AdminUserDetailOverviewTabProps) => React.JSX.Element;
|
|
26
|
+
//# sourceMappingURL=admin-user-detail-overview-tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-overview-tab.d.ts","sourceRoot":"","sources":["../../../src/components/admin/admin-user-detail-overview-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,SAAS,CAAC,OAAO,aAAa,CAAC,CAAC;IACtC;;;OAGG;IACH,cAAc,EAAE,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACnE;;;;OAIG;IACH,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAC9B,+BAA+B,sBAoFvC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { AutoForm } from "../auto-form/auto-form.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { ShieldCheck } from "lucide-react";
|
|
5
|
+
import { useI18n } from "alepha/react/i18n";
|
|
6
|
+
//#region src/components/admin/admin-user-detail-overview-tab.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Overview tab: the editable profile form.
|
|
9
|
+
*/
|
|
10
|
+
const AdminUserDetailOverviewTab = (props) => {
|
|
11
|
+
const { tr } = useI18n();
|
|
12
|
+
const fields = [
|
|
13
|
+
"username",
|
|
14
|
+
"email",
|
|
15
|
+
"emailVerified",
|
|
16
|
+
"firstName",
|
|
17
|
+
"lastName",
|
|
18
|
+
"roles"
|
|
19
|
+
].filter((name) => {
|
|
20
|
+
if (name === "username") return props.policy.username.visible;
|
|
21
|
+
if (name === "email" || name === "emailVerified") return props.policy.email.visible;
|
|
22
|
+
return true;
|
|
23
|
+
});
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: "min-h-0 flex-1 overflow-auto",
|
|
26
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
27
|
+
className: "flex max-w-6xl flex-col gap-6 p-6",
|
|
28
|
+
children: /* @__PURE__ */ jsx(AutoForm, {
|
|
29
|
+
form: props.form,
|
|
30
|
+
groups: [{ fields: [...fields] }],
|
|
31
|
+
card: true,
|
|
32
|
+
icon: "user",
|
|
33
|
+
title: tr("admin.userDetail.profile", { default: "Profile" }),
|
|
34
|
+
description: tr("admin.userDetail.profileSub", { default: "Identity and contact info." }),
|
|
35
|
+
submitLabel: tr("admin.userDetail.save", { default: "Save changes" }),
|
|
36
|
+
disabledIfPristine: true,
|
|
37
|
+
fields: {
|
|
38
|
+
username: { label: String(tr("admin.userDetail.username", { default: "Username" })) },
|
|
39
|
+
email: { label: String(tr("admin.userDetail.email", { default: "Email" })) },
|
|
40
|
+
emailVerified: { label: String(tr("admin.userDetail.emailVerified", { default: "Email verified" })) },
|
|
41
|
+
firstName: { label: String(tr("admin.userDetail.firstName", { default: "First name" })) },
|
|
42
|
+
lastName: { label: String(tr("admin.userDetail.lastName", { default: "Last name" })) },
|
|
43
|
+
roles: {
|
|
44
|
+
label: String(tr("admin.userDetail.roles", { default: "Roles" })),
|
|
45
|
+
icon: ShieldCheck,
|
|
46
|
+
items: props.availableRoles.map((r) => ({
|
|
47
|
+
value: r.name,
|
|
48
|
+
label: r.name,
|
|
49
|
+
disabled: r.default
|
|
50
|
+
}))
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { AdminUserDetailOverviewTab };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=admin-user-detail-overview-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-overview-tab.js","names":[],"sources":["../../../src/components/admin/admin-user-detail-overview-tab.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { AutoForm } from \"@alepha/ui/components/auto-form/auto-form\";\nimport type { FormModel } from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { ShieldCheck } from \"lucide-react\";\nimport type { ProfilePolicy } from \"./admin-user-detail-profile-policy.ts\";\nimport type { profileSchema } from \"./admin-user-detail-profile-schema.ts\";\n\nexport interface AdminUserDetailOverviewTabProps {\n form: FormModel<typeof profileSchema>;\n /**\n * Role metadata for the roles picker. `default: true` roles are offered\n * but not togglable.\n */\n availableRoles: ReadonlyArray<{ name: string; default?: boolean }>;\n /**\n * Which identity fields the realm collects. A field the realm has turned\n * off is not rendered at all — an Email input on a username-only realm is\n * an invitation to write a value nothing can use.\n */\n policy: ProfilePolicy;\n}\n\n/**\n * Overview tab: the editable profile form.\n */\nexport const AdminUserDetailOverviewTab = (\n props: AdminUserDetailOverviewTabProps,\n) => {\n const { tr } = useI18n();\n\n // AutoForm renders every key of the schema unless it is handed groups, so\n // one group carrying the offered fields is how a field is left out.\n const fields = (\n [\n \"username\",\n \"email\",\n \"emailVerified\",\n \"firstName\",\n \"lastName\",\n \"roles\",\n ] as const\n ).filter((name) => {\n if (name === \"username\") return props.policy.username.visible;\n // The verified flag is meaningless without the address it qualifies.\n if (name === \"email\" || name === \"emailVerified\") {\n return props.policy.email.visible;\n }\n return true;\n });\n\n return (\n <div className=\"min-h-0 flex-1 overflow-auto\">\n <div className=\"flex max-w-6xl flex-col gap-6 p-6\">\n <AutoForm\n form={props.form}\n groups={[{ fields: [...fields] }]}\n card\n icon=\"user\"\n title={tr(\"admin.userDetail.profile\", { default: \"Profile\" })}\n description={tr(\"admin.userDetail.profileSub\", {\n default: \"Identity and contact info.\",\n })}\n submitLabel={tr(\"admin.userDetail.save\", {\n default: \"Save changes\",\n })}\n disabledIfPristine\n fields={{\n username: {\n label: String(\n tr(\"admin.userDetail.username\", { default: \"Username\" }),\n ),\n },\n email: {\n label: String(tr(\"admin.userDetail.email\", { default: \"Email\" })),\n },\n emailVerified: {\n label: String(\n tr(\"admin.userDetail.emailVerified\", {\n default: \"Email verified\",\n }),\n ),\n },\n firstName: {\n label: String(\n tr(\"admin.userDetail.firstName\", {\n default: \"First name\",\n }),\n ),\n },\n lastName: {\n label: String(\n tr(\"admin.userDetail.lastName\", {\n default: \"Last name\",\n }),\n ),\n },\n roles: {\n label: String(tr(\"admin.userDetail.roles\", { default: \"Roles\" })),\n icon: ShieldCheck,\n items: props.availableRoles.map((r) => ({\n value: r.name,\n label: r.name,\n disabled: r.default,\n })),\n },\n }}\n />\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AA6BA,MAAa,8BACX,UACG;CACH,MAAM,EAAE,OAAO,QAAQ;CAIvB,MAAM,SACJ;EACE;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACD,QAAQ,SAAS;EACjB,IAAI,SAAS,YAAY,OAAO,MAAM,OAAO,SAAS;EAEtD,IAAI,SAAS,WAAW,SAAS,iBAC/B,OAAO,MAAM,OAAO,MAAM;EAE5B,OAAO;CACT,CAAC;CAED,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,oBAAC,UAAD;IACE,MAAM,MAAM;IACZ,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAAG,MAAM,EAAE,CAAC;IAChC,MAAA;IACA,MAAK;IACL,OAAO,GAAG,4BAA4B,EAAE,SAAS,UAAU,CAAC;IAC5D,aAAa,GAAG,+BAA+B,EAC7C,SAAS,6BACX,CAAC;IACD,aAAa,GAAG,yBAAyB,EACvC,SAAS,eACX,CAAC;IACD,oBAAA;IACA,QAAQ;KACN,UAAU,EACR,OAAO,OACL,GAAG,6BAA6B,EAAE,SAAS,WAAW,CAAC,CACzD,EACF;KACA,OAAO,EACL,OAAO,OAAO,GAAG,0BAA0B,EAAE,SAAS,QAAQ,CAAC,CAAC,EAClE;KACA,eAAe,EACb,OAAO,OACL,GAAG,kCAAkC,EACnC,SAAS,iBACX,CAAC,CACH,EACF;KACA,WAAW,EACT,OAAO,OACL,GAAG,8BAA8B,EAC/B,SAAS,aACX,CAAC,CACH,EACF;KACA,UAAU,EACR,OAAO,OACL,GAAG,6BAA6B,EAC9B,SAAS,YACX,CAAC,CACH,EACF;KACA,OAAO;MACL,OAAO,OAAO,GAAG,0BAA0B,EAAE,SAAS,QAAQ,CAAC,CAAC;MAChE,MAAM;MACN,OAAO,MAAM,eAAe,KAAK,OAAO;OACtC,OAAO,EAAE;OACT,OAAO,EAAE;OACT,UAAU,EAAE;MACd,EAAE;KACJ;IACF;GACD,CAAA;EACE,CAAA;CACF,CAAA;AAET"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { FormModel } from "alepha/react/form";
|
|
3
|
+
import type { passwordSchema } from "./admin-user-detail-password-schema.ts";
|
|
4
|
+
export interface AdminUserDetailPasswordDialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
form: FormModel<typeof passwordSchema>;
|
|
8
|
+
submitting: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Set-password dialog. Submits through the caller's form model, so the
|
|
12
|
+
* success toast and dialog dismissal stay with the handler that owns them.
|
|
13
|
+
*/
|
|
14
|
+
export declare const AdminUserDetailPasswordDialog: (props: AdminUserDetailPasswordDialogProps) => React.JSX.Element;
|
|
15
|
+
//# sourceMappingURL=admin-user-detail-password-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-password-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/admin/admin-user-detail-password-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAE7E,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,IAAI,EAAE,SAAS,CAAC,OAAO,cAAc,CAAC,CAAC;IACvC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,UACjC,kCAAkC,sBAqD1C,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "../ui/dialog.js";
|
|
3
|
+
import { Control } from "../control/control.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Ban } from "lucide-react";
|
|
7
|
+
import { useI18n } from "alepha/react/i18n";
|
|
8
|
+
//#region src/components/admin/admin-user-detail-password-dialog.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Set-password dialog. Submits through the caller's form model, so the
|
|
11
|
+
* success toast and dialog dismissal stay with the handler that owns them.
|
|
12
|
+
*/
|
|
13
|
+
const AdminUserDetailPasswordDialog = (props) => {
|
|
14
|
+
const { tr } = useI18n();
|
|
15
|
+
return /* @__PURE__ */ jsx(Dialog, {
|
|
16
|
+
open: props.open,
|
|
17
|
+
onOpenChange: props.onOpenChange,
|
|
18
|
+
children: /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
19
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: tr("admin.userDetail.setPasswordTitle", { default: "Set new password" }) }), /* @__PURE__ */ jsx(DialogDescription, { children: tr("admin.userDetail.setPasswordSub", { default: "The user can sign in with this password immediately. Existing sessions are not revoked." }) })] }),
|
|
20
|
+
/* @__PURE__ */ jsx("form", {
|
|
21
|
+
...props.form.props,
|
|
22
|
+
className: "flex flex-col gap-4",
|
|
23
|
+
id: "set-password-form",
|
|
24
|
+
children: /* @__PURE__ */ jsx(Control, {
|
|
25
|
+
label: tr("admin.userDetail.newPassword", { default: "New password" }),
|
|
26
|
+
input: props.form.input.password,
|
|
27
|
+
password: true
|
|
28
|
+
})
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
|
|
31
|
+
type: "button",
|
|
32
|
+
variant: "ghost",
|
|
33
|
+
onClick: () => props.onOpenChange(false),
|
|
34
|
+
children: tr("admin.userDetail.cancel", { default: "Cancel" })
|
|
35
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
36
|
+
type: "submit",
|
|
37
|
+
form: "set-password-form",
|
|
38
|
+
loading: props.submitting,
|
|
39
|
+
children: [/* @__PURE__ */ jsx(Ban, { className: "hidden" }), tr("admin.userDetail.savePassword", { default: "Save" })]
|
|
40
|
+
})] })
|
|
41
|
+
] })
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { AdminUserDetailPasswordDialog };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=admin-user-detail-password-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-password-dialog.js","names":[],"sources":["../../../src/components/admin/admin-user-detail-password-dialog.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { Control } from \"@alepha/ui/components/control/control\";\nimport { Button } from \"@alepha/ui/components/ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"@alepha/ui/components/ui/dialog\";\nimport type { FormModel } from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { Ban } from \"lucide-react\";\nimport type { passwordSchema } from \"./admin-user-detail-password-schema.ts\";\n\nexport interface AdminUserDetailPasswordDialogProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n form: FormModel<typeof passwordSchema>;\n submitting: boolean;\n}\n\n/**\n * Set-password dialog. Submits through the caller's form model, so the\n * success toast and dialog dismissal stay with the handler that owns them.\n */\nexport const AdminUserDetailPasswordDialog = (\n props: AdminUserDetailPasswordDialogProps,\n) => {\n const { tr } = useI18n();\n\n return (\n <Dialog open={props.open} onOpenChange={props.onOpenChange}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>\n {tr(\"admin.userDetail.setPasswordTitle\", {\n default: \"Set new password\",\n })}\n </DialogTitle>\n <DialogDescription>\n {tr(\"admin.userDetail.setPasswordSub\", {\n default:\n \"The user can sign in with this password immediately. Existing sessions are not revoked.\",\n })}\n </DialogDescription>\n </DialogHeader>\n <form\n {...props.form.props}\n className=\"flex flex-col gap-4\"\n id=\"set-password-form\"\n >\n <Control\n label={tr(\"admin.userDetail.newPassword\", {\n default: \"New password\",\n })}\n input={props.form.input.password}\n password\n />\n </form>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={() => props.onOpenChange(false)}\n >\n {tr(\"admin.userDetail.cancel\", { default: \"Cancel\" })}\n </Button>\n <Button\n type=\"submit\"\n form=\"set-password-form\"\n loading={props.submitting}\n >\n <Ban className=\"hidden\" />\n {tr(\"admin.userDetail.savePassword\", { default: \"Save\" })}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA8BA,MAAa,iCACX,UACG;CACH,MAAM,EAAE,OAAO,QAAQ;CAEvB,OACE,oBAAC,QAAD;EAAQ,MAAM,MAAM;EAAM,cAAc,MAAM;EAC5C,UAAA,qBAAC,eAAD,EAAA,UAAA;GACE,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,aAAD,EAAA,UACG,GAAG,qCAAqC,EACvC,SAAS,mBACX,CAAC,EACU,CAAA,GACb,oBAAC,mBAAD,EAAA,UACG,GAAG,mCAAmC,EACrC,SACE,0FACJ,CAAC,EACgB,CAAA,CACP,EAAA,CAAA;GACd,oBAAC,QAAD;IACE,GAAI,MAAM,KAAK;IACf,WAAU;IACV,IAAG;IAEH,UAAA,oBAAC,SAAD;KACE,OAAO,GAAG,gCAAgC,EACxC,SAAS,eACX,CAAC;KACD,OAAO,MAAM,KAAK,MAAM;KACxB,UAAA;IACD,CAAA;GACG,CAAA;GACN,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,QAAD;IACE,MAAK;IACL,SAAQ;IACR,eAAe,MAAM,aAAa,KAAK;IAEtC,UAAA,GAAG,2BAA2B,EAAE,SAAS,SAAS,CAAC;GAC9C,CAAA,GACR,qBAAC,QAAD;IACE,MAAK;IACL,MAAK;IACL,SAAS,MAAM;IAHjB,UAAA,CAKE,oBAAC,KAAD,EAAK,WAAU,SAAU,CAAA,GACxB,GAAG,iCAAiC,EAAE,SAAS,OAAO,CAAC,CAClD;GACI,CAAA,CAAA,EAAA,CAAA;EACD,EAAA,CAAA;CACT,CAAA;AAEZ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body of the admin "set password" form.
|
|
3
|
+
*
|
|
4
|
+
* Lives in its own file so the dialog and the page shell that owns the form
|
|
5
|
+
* model agree on the shape without either importing the other.
|
|
6
|
+
*/
|
|
7
|
+
export declare const passwordSchema: import("zod").ZodObject<{
|
|
8
|
+
password: import("zod").ZodString;
|
|
9
|
+
}, import("zod/v4/core").$strip>;
|
|
10
|
+
//# sourceMappingURL=admin-user-detail-password-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-password-schema.d.ts","sourceRoot":"","sources":["../../../src/components/admin/admin-user-detail-password-schema.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;gCAEzB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "alepha";
|
|
2
|
+
//#region src/components/admin/admin-user-detail-password-schema.ts
|
|
3
|
+
/**
|
|
4
|
+
* Body of the admin "set password" form.
|
|
5
|
+
*
|
|
6
|
+
* Lives in its own file so the dialog and the page shell that owns the form
|
|
7
|
+
* model agree on the shape without either importing the other.
|
|
8
|
+
*/
|
|
9
|
+
const passwordSchema = z.object({ password: z.string().min(6) });
|
|
10
|
+
//#endregion
|
|
11
|
+
export { passwordSchema };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=admin-user-detail-password-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-password-schema.js","names":[],"sources":["../../../src/components/admin/admin-user-detail-password-schema.ts"],"sourcesContent":["import { z } from \"alepha\";\n\n/**\n * Body of the admin \"set password\" form.\n *\n * Lives in its own file so the dialog and the page shell that owns the form\n * model agree on the shape without either importing the other.\n */\nexport const passwordSchema = z.object({\n password: z.string().min(6),\n});\n"],"mappings":";;;;;;;;AAQA,MAAa,iBAAiB,EAAE,OAAO,EACrC,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAC5B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { FieldRequirement, UpdateUser, UsernameFieldRequirement } from "alepha/api/users";
|
|
2
|
+
import type { ProfileForm } from "./admin-user-detail-profile-schema.ts";
|
|
3
|
+
/**
|
|
4
|
+
* The realm settings the admin profile form cares about. A structural subset
|
|
5
|
+
* of the realm config's public settings, so `realmConfig.settings` can be
|
|
6
|
+
* passed straight in.
|
|
7
|
+
*/
|
|
8
|
+
export interface ProfileRealmSettings {
|
|
9
|
+
username?: UsernameFieldRequirement;
|
|
10
|
+
email?: FieldRequirement;
|
|
11
|
+
}
|
|
12
|
+
export interface ProfileFieldPolicy {
|
|
13
|
+
visible: boolean;
|
|
14
|
+
required: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ProfilePolicy {
|
|
17
|
+
username: ProfileFieldPolicy;
|
|
18
|
+
email: ProfileFieldPolicy;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The parts of the loaded user the policy reads: what the record already
|
|
22
|
+
* carries, as opposed to what the form currently holds.
|
|
23
|
+
*/
|
|
24
|
+
export interface ProfileUser {
|
|
25
|
+
username?: string;
|
|
26
|
+
email?: string;
|
|
27
|
+
}
|
|
28
|
+
export type ProfileIssueReason = "required" | "cannot-clear";
|
|
29
|
+
export interface ProfileIssue {
|
|
30
|
+
field: "username" | "email";
|
|
31
|
+
reason: ProfileIssueReason;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Derive which profile fields the admin form offers, and which of them the
|
|
35
|
+
* realm insists on.
|
|
36
|
+
*
|
|
37
|
+
* The form itself must not decide this: a realm configured for username-only
|
|
38
|
+
* sign-in (`email: "none"`) has users with no email at all, and demanding one
|
|
39
|
+
* makes every save fail — including a save that only touches roles.
|
|
40
|
+
*/
|
|
41
|
+
export declare const profilePolicy: (settings?: ProfileRealmSettings, user?: ProfileUser) => ProfilePolicy;
|
|
42
|
+
/**
|
|
43
|
+
* Validate the submitted values against the realm policy. Returns every
|
|
44
|
+
* problem found; callers typically report the first.
|
|
45
|
+
*/
|
|
46
|
+
export declare const profileIssues: (values: ProfileForm, policy: ProfilePolicy, user?: ProfileUser) => ProfileIssue[];
|
|
47
|
+
/**
|
|
48
|
+
* Build the PATCH body from the form values.
|
|
49
|
+
*
|
|
50
|
+
* Fields the realm does not collect — and blank optional ones — are omitted
|
|
51
|
+
* entirely rather than sent as `""`: `users` is uniquely indexed on
|
|
52
|
+
* `(realm, username)` and `(realm, email)`, so an empty string is a value
|
|
53
|
+
* that collides, not an absence.
|
|
54
|
+
*/
|
|
55
|
+
export declare const profileUpdateBody: (values: ProfileForm, policy: ProfilePolicy, user?: ProfileUser) => UpdateUser;
|
|
56
|
+
//# sourceMappingURL=admin-user-detail-profile-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-user-detail-profile-policy.d.ts","sourceRoot":"","sources":["../../../src/components/admin/admin-user-detail-profile-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,cAAc,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AAyBD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,cACb,oBAAoB,SACxB,WAAW,KACjB,aAGD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,WAChB,WAAW,UACX,aAAa,SACd,WAAW,KACjB,YAAY,EAoBd,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,WACpB,WAAW,UACX,aAAa,SACd,WAAW,KACjB,UAsBF,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
//#region src/components/admin/admin-user-detail-profile-policy.ts
|
|
2
|
+
/**
|
|
3
|
+
* Whether a single field is offered, and whether it must be filled.
|
|
4
|
+
*/
|
|
5
|
+
const fieldPolicy = (requirement, current) => {
|
|
6
|
+
const req = requirement ?? "optional";
|
|
7
|
+
return {
|
|
8
|
+
visible: req !== "none" || Boolean(current),
|
|
9
|
+
required: req === "required"
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Derive which profile fields the admin form offers, and which of them the
|
|
14
|
+
* realm insists on.
|
|
15
|
+
*
|
|
16
|
+
* The form itself must not decide this: a realm configured for username-only
|
|
17
|
+
* sign-in (`email: "none"`) has users with no email at all, and demanding one
|
|
18
|
+
* makes every save fail — including a save that only touches roles.
|
|
19
|
+
*/
|
|
20
|
+
const profilePolicy = (settings, user) => ({
|
|
21
|
+
username: fieldPolicy(settings?.username, user?.username),
|
|
22
|
+
email: fieldPolicy(settings?.email, user?.email)
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Validate the submitted values against the realm policy. Returns every
|
|
26
|
+
* problem found; callers typically report the first.
|
|
27
|
+
*/
|
|
28
|
+
const profileIssues = (values, policy, user) => {
|
|
29
|
+
const issues = [];
|
|
30
|
+
for (const field of ["username", "email"]) {
|
|
31
|
+
if (!policy[field].visible) continue;
|
|
32
|
+
if ((values[field] ?? "").trim()) continue;
|
|
33
|
+
if (policy[field].required) {
|
|
34
|
+
issues.push({
|
|
35
|
+
field,
|
|
36
|
+
reason: "required"
|
|
37
|
+
});
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if ((user?.[field] ?? "") !== "") issues.push({
|
|
41
|
+
field,
|
|
42
|
+
reason: "cannot-clear"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return issues;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Build the PATCH body from the form values.
|
|
49
|
+
*
|
|
50
|
+
* Fields the realm does not collect — and blank optional ones — are omitted
|
|
51
|
+
* entirely rather than sent as `""`: `users` is uniquely indexed on
|
|
52
|
+
* `(realm, username)` and `(realm, email)`, so an empty string is a value
|
|
53
|
+
* that collides, not an absence.
|
|
54
|
+
*/
|
|
55
|
+
const profileUpdateBody = (values, policy, user) => {
|
|
56
|
+
const body = {
|
|
57
|
+
firstName: (values.firstName ?? "").trim(),
|
|
58
|
+
lastName: (values.lastName ?? "").trim(),
|
|
59
|
+
roles: values.roles ?? []
|
|
60
|
+
};
|
|
61
|
+
const username = (values.username ?? "").trim();
|
|
62
|
+
if (policy.username.visible && username) body.username = username;
|
|
63
|
+
const email = (values.email ?? "").trim();
|
|
64
|
+
if (policy.email.visible && email) {
|
|
65
|
+
body.email = email;
|
|
66
|
+
body.emailVerified = email === (user?.email ?? "") && Boolean(values.emailVerified);
|
|
67
|
+
}
|
|
68
|
+
return body;
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { profileIssues, profilePolicy, profileUpdateBody };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=admin-user-detail-profile-policy.js.map
|