@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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import type { Page } from "alepha";
|
|
2
|
+
|
|
3
|
+
export interface PaginateLocalOptions<T> {
|
|
4
|
+
/**
|
|
5
|
+
* Zero-based page index, exactly as AlephaTable holds it.
|
|
6
|
+
*/
|
|
7
|
+
page: number;
|
|
8
|
+
size: number;
|
|
9
|
+
/**
|
|
10
|
+
* Alepha's sort param: `"field"` ascending, `"-field"` descending.
|
|
11
|
+
* Only a single field is honoured — a static table has no server to
|
|
12
|
+
* hand a multi-column sort to.
|
|
13
|
+
*/
|
|
14
|
+
sort?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Value accessors keyed by sort field, for columns whose sort key is not
|
|
17
|
+
* a plain property of the row (a derived total, a joined label). Falls
|
|
18
|
+
* back to `item[field]`.
|
|
19
|
+
*/
|
|
20
|
+
sortValues?: Record<string, (item: T) => unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Current filter form values, straight off AlephaTable's filter form.
|
|
23
|
+
*/
|
|
24
|
+
filters?: Record<string, any>;
|
|
25
|
+
/**
|
|
26
|
+
* Predicate replacing the built-in field matching entirely.
|
|
27
|
+
*
|
|
28
|
+
* Reach for it as soon as a filter is not a field: a `search` box that
|
|
29
|
+
* spans title and description, a range, a joined label. Only ever called
|
|
30
|
+
* with filter values that are actually set.
|
|
31
|
+
*/
|
|
32
|
+
filter?: (item: T, filters: Record<string, any>) => boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Does one filter value match the same-named property of a row?
|
|
37
|
+
*
|
|
38
|
+
* Sugar for the common case, not a query language. Strings match as a
|
|
39
|
+
* case-insensitive substring (what a text box means), arrays match on
|
|
40
|
+
* membership (what a tag picker means), everything else compares strictly.
|
|
41
|
+
* Anything more expressive is the caller's `filter`.
|
|
42
|
+
*/
|
|
43
|
+
const matchesField = (item: unknown, key: string, value: unknown): boolean => {
|
|
44
|
+
// A filter field the rows do not carry belongs to a caller-owned
|
|
45
|
+
// `filter`. Emptying the table is the worst possible way to report that,
|
|
46
|
+
// so an unknown key matches everything and stays visible instead.
|
|
47
|
+
if (!(key in (item as object))) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
const cell = (item as Record<string, unknown>)[key];
|
|
51
|
+
if (Array.isArray(cell)) {
|
|
52
|
+
return cell.some((entry) =>
|
|
53
|
+
typeof entry === "string" && typeof value === "string"
|
|
54
|
+
? entry.toLowerCase() === value.toLowerCase()
|
|
55
|
+
: entry === value,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
if (typeof cell === "string" && typeof value === "string") {
|
|
59
|
+
return cell.toLowerCase().includes(value.toLowerCase());
|
|
60
|
+
}
|
|
61
|
+
return cell === value;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Compare two non-nullish cell values.
|
|
66
|
+
*
|
|
67
|
+
* Typed rather than stringified: `String(a) < String(b)` puts 10 before 2
|
|
68
|
+
* and 2026-01-02 before 2026-01-10, which reads as a sorted column that is
|
|
69
|
+
* quietly wrong. Strings fall through to `localeCompare` at `sensitivity:
|
|
70
|
+
* "base"` so "Apple" and "apple" land together instead of ASCII-uppercase
|
|
71
|
+
* first.
|
|
72
|
+
*/
|
|
73
|
+
const compareValues = (a: unknown, b: unknown): number => {
|
|
74
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
75
|
+
return a - b;
|
|
76
|
+
}
|
|
77
|
+
if (a instanceof Date && b instanceof Date) {
|
|
78
|
+
return a.getTime() - b.getTime();
|
|
79
|
+
}
|
|
80
|
+
if (typeof a === "boolean" && typeof b === "boolean") {
|
|
81
|
+
return Number(a) - Number(b);
|
|
82
|
+
}
|
|
83
|
+
return String(a).localeCompare(String(b), undefined, {
|
|
84
|
+
sensitivity: "base",
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Client-side sort + slice over an in-memory array, shaped as the same
|
|
90
|
+
* `Page<T>` a server fetcher returns.
|
|
91
|
+
*
|
|
92
|
+
* This is the whole of AlephaTable's static-data mode: the component swaps
|
|
93
|
+
* its fetched `data`/`meta` for this function's output and every other part
|
|
94
|
+
* of the table (pager, selection, column picker, row actions) keeps working
|
|
95
|
+
* against the shape it already knows.
|
|
96
|
+
*/
|
|
97
|
+
export const paginateLocal = <T>(
|
|
98
|
+
items: T[],
|
|
99
|
+
options: PaginateLocalOptions<T>,
|
|
100
|
+
): Page<T> => {
|
|
101
|
+
const { page, size } = options;
|
|
102
|
+
|
|
103
|
+
let working = items;
|
|
104
|
+
|
|
105
|
+
// A cleared Control sets `undefined`; an emptied text input sets "".
|
|
106
|
+
// Either one treated as a real value empties the table for no reason the
|
|
107
|
+
// reader can see, so they are dropped before anything else looks at them.
|
|
108
|
+
const active = Object.entries(options.filters ?? {}).filter(
|
|
109
|
+
([, value]) =>
|
|
110
|
+
value !== undefined &&
|
|
111
|
+
value !== null &&
|
|
112
|
+
value !== "" &&
|
|
113
|
+
!(Array.isArray(value) && value.length === 0),
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
if (active.length > 0) {
|
|
117
|
+
const values = Object.fromEntries(active);
|
|
118
|
+
working = working.filter((item) =>
|
|
119
|
+
options.filter
|
|
120
|
+
? options.filter(item, values)
|
|
121
|
+
: active.every(([key, value]) => matchesField(item, key, value)),
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (options.sort) {
|
|
126
|
+
const descending = options.sort.startsWith("-");
|
|
127
|
+
const field = descending ? options.sort.slice(1) : options.sort;
|
|
128
|
+
const accessor =
|
|
129
|
+
options.sortValues?.[field] ??
|
|
130
|
+
((item: T) => (item as Record<string, unknown>)[field]);
|
|
131
|
+
const direction = descending ? -1 : 1;
|
|
132
|
+
|
|
133
|
+
// Copy `working`, not `items`: sorting the original array back over the
|
|
134
|
+
// filtered one throws the filter away. Copy at all because `sort`
|
|
135
|
+
// mutates, and the array belongs to the caller — reordering their state
|
|
136
|
+
// in place would be a side effect they never asked for and cannot see.
|
|
137
|
+
// `sort` is stable, so rows that compare equal keep the order the caller
|
|
138
|
+
// put them in.
|
|
139
|
+
working = [...working].sort((left, right) => {
|
|
140
|
+
const a = accessor(left);
|
|
141
|
+
const b = accessor(right);
|
|
142
|
+
const aEmpty = a === null || a === undefined || a === "";
|
|
143
|
+
const bEmpty = b === null || b === undefined || b === "";
|
|
144
|
+
// Nullish last, and outside the direction flip: an empty cell is
|
|
145
|
+
// missing data, and burying it is right whichever way the reader
|
|
146
|
+
// pointed the arrow.
|
|
147
|
+
if (aEmpty || bEmpty) {
|
|
148
|
+
return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;
|
|
149
|
+
}
|
|
150
|
+
return compareValues(a, b) * direction;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const offset = page * size;
|
|
155
|
+
const content = working.slice(offset, offset + size);
|
|
156
|
+
const totalPages = Math.ceil(working.length / size);
|
|
157
|
+
|
|
158
|
+
return {
|
|
159
|
+
content,
|
|
160
|
+
page: {
|
|
161
|
+
number: page,
|
|
162
|
+
size,
|
|
163
|
+
offset,
|
|
164
|
+
numberOfElements: content.length,
|
|
165
|
+
totalElements: working.length,
|
|
166
|
+
totalPages,
|
|
167
|
+
isEmpty: content.length === 0,
|
|
168
|
+
isFirst: page === 0,
|
|
169
|
+
// `>=` rather than `===`: a page past the end is still the last thing
|
|
170
|
+
// there is to show, and the pager must not offer a "next" from it.
|
|
171
|
+
isLast: page >= totalPages - 1,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
};
|
|
@@ -4,6 +4,7 @@ import { AlephaContext } from "alepha/react";
|
|
|
4
4
|
import { $page, 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 { ButtonUser } from "../../button-user/button-user.tsx";
|
|
8
9
|
import { DropdownMenu, DropdownMenuContent } from "../../ui/dropdown-menu.tsx";
|
|
9
10
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cn } from "@alepha/ui/lib/utils";
|
|
1
2
|
import * as React from "react";
|
|
2
3
|
|
|
3
4
|
void React;
|
|
@@ -82,7 +83,7 @@ export interface NavigationProgressOptions {
|
|
|
82
83
|
height?: number;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
const NavigationProgress = (options: NavigationProgressOptions) => {
|
|
86
87
|
const [progress, setProgress] = useState(0);
|
|
87
88
|
const [isLoading, setIsLoading] = useState(false);
|
|
88
89
|
const [visible, setVisible] = useState(false);
|
|
@@ -91,6 +92,9 @@ function NavigationProgress(options: NavigationProgressOptions) {
|
|
|
91
92
|
useEvents(
|
|
92
93
|
{
|
|
93
94
|
"react:transition:begin": () => {
|
|
95
|
+
// A second transition before the first ends used to leave the
|
|
96
|
+
// first interval running for the page's lifetime.
|
|
97
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
94
98
|
setProgress(0);
|
|
95
99
|
setVisible(true);
|
|
96
100
|
setIsLoading(true);
|
|
@@ -116,12 +120,19 @@ function NavigationProgress(options: NavigationProgressOptions) {
|
|
|
116
120
|
[],
|
|
117
121
|
);
|
|
118
122
|
|
|
123
|
+
useEffect(
|
|
124
|
+
() => () => {
|
|
125
|
+
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
126
|
+
},
|
|
127
|
+
[],
|
|
128
|
+
);
|
|
129
|
+
|
|
119
130
|
if (!visible) return null;
|
|
120
131
|
const height = options.height ?? 2;
|
|
121
132
|
const barClassName = options.className ?? "bg-primary";
|
|
122
133
|
return (
|
|
123
134
|
<div
|
|
124
|
-
className="fixed top-0
|
|
135
|
+
className="pointer-events-none fixed top-0 right-0 left-0 z-50"
|
|
125
136
|
style={{ height }}
|
|
126
137
|
>
|
|
127
138
|
<div
|
|
@@ -136,9 +147,9 @@ function NavigationProgress(options: NavigationProgressOptions) {
|
|
|
136
147
|
/>
|
|
137
148
|
</div>
|
|
138
149
|
);
|
|
139
|
-
}
|
|
150
|
+
};
|
|
140
151
|
|
|
141
|
-
|
|
152
|
+
const StatefulSidebarTrigger = () => {
|
|
142
153
|
const { toggleSidebar, isMobile, openMobile, state } = useSidebar();
|
|
143
154
|
const open = isMobile ? openMobile : state === "expanded";
|
|
144
155
|
const Icon = open ? PanelLeftClose : PanelLeftOpen;
|
|
@@ -153,7 +164,7 @@ function StatefulSidebarTrigger() {
|
|
|
153
164
|
<Icon className="size-4" />
|
|
154
165
|
</Button>
|
|
155
166
|
);
|
|
156
|
-
}
|
|
167
|
+
};
|
|
157
168
|
|
|
158
169
|
type IconType = ComponentType<SVGProps<SVGSVGElement>>;
|
|
159
170
|
|
|
@@ -230,7 +241,7 @@ function renderNavIcon(icon: NavItem["icon"], className: string): ReactNode {
|
|
|
230
241
|
return <Icon className={className} />;
|
|
231
242
|
}
|
|
232
243
|
|
|
233
|
-
|
|
244
|
+
const SidebarNavItem = (props: { item: NavItem }) => {
|
|
234
245
|
const { item } = props;
|
|
235
246
|
const { state, isMobile } = useSidebar();
|
|
236
247
|
const children = item.children;
|
|
@@ -242,9 +253,11 @@ function SidebarNavItem(props: { item: NavItem }) {
|
|
|
242
253
|
// remount this item (useState's initializer runs only at mount, so without
|
|
243
254
|
// this the group stays stuck closed and the active page is hidden — petition
|
|
244
255
|
// #4). Only OPENS; never auto-collapses, so a manual toggle is preserved.
|
|
245
|
-
|
|
256
|
+
const [wasActive, setWasActive] = useState(hasActive);
|
|
257
|
+
if (hasActive !== wasActive) {
|
|
258
|
+
setWasActive(hasActive);
|
|
246
259
|
if (hasActive) setOpen(true);
|
|
247
|
-
}
|
|
260
|
+
}
|
|
248
261
|
|
|
249
262
|
if (!isGroup) {
|
|
250
263
|
// Disabled rows render with a muted, dashed-border treatment plus a
|
|
@@ -260,7 +273,7 @@ function SidebarNavItem(props: { item: NavItem }) {
|
|
|
260
273
|
const row = (
|
|
261
274
|
<div
|
|
262
275
|
aria-disabled="true"
|
|
263
|
-
className="flex h-8 w-full items-center gap-2 rounded-md border border-dashed
|
|
276
|
+
className="border-muted-foreground/40 bg-muted/40 text-muted-foreground flex h-8 w-full items-center gap-2 rounded-md border border-dashed px-2 text-sm"
|
|
264
277
|
style={{ cursor: "not-allowed" }}
|
|
265
278
|
>
|
|
266
279
|
{renderNavIcon(item.icon, "size-4 shrink-0")}
|
|
@@ -397,7 +410,7 @@ function SidebarNavItem(props: { item: NavItem }) {
|
|
|
397
410
|
)}
|
|
398
411
|
</SidebarMenuItem>
|
|
399
412
|
);
|
|
400
|
-
}
|
|
413
|
+
};
|
|
401
414
|
|
|
402
415
|
/**
|
|
403
416
|
* The children of a collapsed nav group, as dropdown entries.
|
|
@@ -411,7 +424,7 @@ function SidebarNavItem(props: { item: NavItem }) {
|
|
|
411
424
|
* `group-data-[collapsible=icon]:hidden`, so a collapsed sidebar drops every
|
|
412
425
|
* count — and the count is usually why you opened the group.
|
|
413
426
|
*/
|
|
414
|
-
|
|
427
|
+
const NavDropdownItems = (props: { items: NavItem[] }) => {
|
|
415
428
|
return (
|
|
416
429
|
<>
|
|
417
430
|
{props.items.map((child, ci) => {
|
|
@@ -458,7 +471,7 @@ function NavDropdownItems(props: { items: NavItem[] }) {
|
|
|
458
471
|
})}
|
|
459
472
|
</>
|
|
460
473
|
);
|
|
461
|
-
}
|
|
474
|
+
};
|
|
462
475
|
|
|
463
476
|
export interface NavGroup {
|
|
464
477
|
label?: string;
|
|
@@ -529,13 +542,22 @@ export interface AppShellProps {
|
|
|
529
542
|
* sticky footer sits below the shell).
|
|
530
543
|
*/
|
|
531
544
|
fill?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Extra classes for the scrolling `<main>` element.
|
|
547
|
+
*
|
|
548
|
+
* Exists so an app can paint its own page surface (Lore stamps a dot
|
|
549
|
+
* texture there) without every other consumer of the shell inheriting it.
|
|
550
|
+
* Layout classes are applied after this, so a caller cannot break the
|
|
551
|
+
* flex/overflow contract described above.
|
|
552
|
+
*/
|
|
553
|
+
mainClassName?: string;
|
|
532
554
|
}
|
|
533
555
|
|
|
534
556
|
/**
|
|
535
557
|
* Standard SaaS layout: collapsible sidebar + topbar with breadcrumbs.
|
|
536
558
|
* Built on shadcn `<Sidebar>` + `<Breadcrumb>`.
|
|
537
559
|
*/
|
|
538
|
-
export
|
|
560
|
+
export const AppShell = (props: AppShellProps) => {
|
|
539
561
|
const { collapsed, setCollapsed } = useSidebarState();
|
|
540
562
|
const nav = props.nav ?? [];
|
|
541
563
|
const variant = props.variant ?? "sidebar";
|
|
@@ -591,11 +613,12 @@ export function AppShell(props: AppShellProps) {
|
|
|
591
613
|
// - For non-fill pages there's no height bound, so this collapses
|
|
592
614
|
// to "scroll whatever overflows" without further config.
|
|
593
615
|
<main
|
|
594
|
-
className={
|
|
616
|
+
className={cn(
|
|
617
|
+
props.mainClassName,
|
|
595
618
|
props.fill
|
|
596
619
|
? "flex min-h-0 flex-1 flex-col overflow-hidden"
|
|
597
|
-
: "flex-1 overflow-auto"
|
|
598
|
-
}
|
|
620
|
+
: "flex-1 overflow-auto",
|
|
621
|
+
)}
|
|
599
622
|
>
|
|
600
623
|
{props.children ?? <NestedView />}
|
|
601
624
|
</main>
|
|
@@ -616,7 +639,7 @@ export function AppShell(props: AppShellProps) {
|
|
|
616
639
|
// selectors out-specify the base `.fixed`/`.h-svh` utilities.
|
|
617
640
|
className={
|
|
618
641
|
props.fill
|
|
619
|
-
? "relative min-h-0
|
|
642
|
+
? "relative h-full min-h-0 [&_[data-slot=sidebar-container]]:absolute [&_[data-slot=sidebar-container]]:h-auto"
|
|
620
643
|
: undefined
|
|
621
644
|
}
|
|
622
645
|
>
|
|
@@ -656,7 +679,7 @@ export function AppShell(props: AppShellProps) {
|
|
|
656
679
|
<SidebarInset
|
|
657
680
|
className={
|
|
658
681
|
variant === "inset"
|
|
659
|
-
? "md:peer-data-[variant=inset]:overflow-hidden
|
|
682
|
+
? "border md:peer-data-[variant=inset]:overflow-hidden"
|
|
660
683
|
: undefined
|
|
661
684
|
}
|
|
662
685
|
>
|
|
@@ -687,4 +710,4 @@ export function AppShell(props: AppShellProps) {
|
|
|
687
710
|
</TooltipProvider>
|
|
688
711
|
</DialogProvider>
|
|
689
712
|
);
|
|
690
|
-
}
|
|
713
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
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
|
import { AuthRouter } from "../auth-router.tsx";
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -8,7 +9,7 @@ import { AuthRouter } from "../auth-router.tsx";
|
|
|
8
9
|
*
|
|
9
10
|
* The four pages it mounts are what `@alepha/mantine/auth/AuthRouter` used to
|
|
10
11
|
* provide before it was deleted with Mantine and not ported — which is why both
|
|
11
|
-
* `apps/lore` and `apps/shop` ended up rebuilding the same screens by hand.
|
|
12
|
+
* `apps/lore` and `apps/examples/shop` ended up rebuilding the same screens by hand.
|
|
12
13
|
*
|
|
13
14
|
* The paths are asserted literally because they are a contract, not an
|
|
14
15
|
* implementation detail: the auth components fall back to exactly these strings
|
|
@@ -18,6 +18,8 @@ import { HttpError } from "alepha/server";
|
|
|
18
18
|
import { AlertCircle, Mail, User } from "lucide-react";
|
|
19
19
|
import { type ReactNode, useEffect, useMemo } from "react";
|
|
20
20
|
|
|
21
|
+
import { safeRedirect } from "./safe-redirect.ts";
|
|
22
|
+
|
|
21
23
|
export interface AuthLoginProps {
|
|
22
24
|
/**
|
|
23
25
|
* Realm configuration (credential providers + OAuth buttons that render).
|
|
@@ -54,20 +56,7 @@ export interface AuthLoginProps {
|
|
|
54
56
|
logo?: ReactNode;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
* Filter the `?redirect=` query param to a safe in-app destination:
|
|
59
|
-
* - Only accept same-origin absolute paths (must start with a single `/`).
|
|
60
|
-
* - Reject `//evil.com` / full URLs (open-redirect surface).
|
|
61
|
-
* - Reject `/auth/*` to avoid bouncing the user back into the auth flow.
|
|
62
|
-
*/
|
|
63
|
-
const safeRedirect = (raw: string | string[] | undefined): string => {
|
|
64
|
-
if (typeof raw !== "string" || raw.length === 0) return "/";
|
|
65
|
-
if (!raw.startsWith("/") || raw.startsWith("//")) return "/";
|
|
66
|
-
if (raw.startsWith("/auth/")) return "/";
|
|
67
|
-
return raw;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export function AuthLogin(props: AuthLoginProps) {
|
|
59
|
+
export const AuthLogin = (props: AuthLoginProps) => {
|
|
71
60
|
const auth = useAuth();
|
|
72
61
|
const router = useRouter();
|
|
73
62
|
const { tr } = useI18n();
|
|
@@ -222,7 +211,7 @@ export function AuthLogin(props: AuthLoginProps) {
|
|
|
222
211
|
<img
|
|
223
212
|
src={settings.logoUrl}
|
|
224
213
|
alt={settings.displayName || props.realmConfig.realmName}
|
|
225
|
-
className="size-16 rounded-xl border
|
|
214
|
+
className="bg-muted size-16 rounded-xl border object-cover shadow-sm"
|
|
226
215
|
/>
|
|
227
216
|
) : null)}
|
|
228
217
|
<Card className="w-full">
|
|
@@ -379,4 +368,4 @@ export function AuthLogin(props: AuthLoginProps) {
|
|
|
379
368
|
{formColumn}
|
|
380
369
|
</div>
|
|
381
370
|
);
|
|
382
|
-
}
|
|
371
|
+
};
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
TurnstileWidget,
|
|
8
8
|
type TurnstileWidgetHandle,
|
|
9
9
|
} from "@alepha/ui/components/captcha/turnstile-widget";
|
|
10
|
-
import { Control } from "@alepha/ui/components/control/control";
|
|
11
10
|
import { iconFor } from "@alepha/ui/components/control-base/icon-hint";
|
|
11
|
+
import { Control } from "@alepha/ui/components/control/control";
|
|
12
12
|
import { Alert, AlertDescription } from "@alepha/ui/components/ui/alert";
|
|
13
13
|
import { Button } from "@alepha/ui/components/ui/button";
|
|
14
14
|
import { Card, CardContent } from "@alepha/ui/components/ui/card";
|
|
@@ -41,6 +41,8 @@ import {
|
|
|
41
41
|
useState,
|
|
42
42
|
} from "react";
|
|
43
43
|
|
|
44
|
+
import { safeRedirect } from "./safe-redirect.ts";
|
|
45
|
+
|
|
44
46
|
export interface AuthRegisterProps {
|
|
45
47
|
/**
|
|
46
48
|
* Realm configuration (drives required fields, verification step, OAuth buttons).
|
|
@@ -80,12 +82,12 @@ interface State {
|
|
|
80
82
|
credentials?: { identifier: string; password: string };
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
export
|
|
85
|
+
export const AuthRegister = (props: AuthRegisterProps) => {
|
|
84
86
|
const auth = useAuth();
|
|
85
87
|
const userCtrl = useClient<UserController>();
|
|
86
88
|
const router = useRouter();
|
|
87
89
|
const { tr } = useI18n();
|
|
88
|
-
const redirect = router.query.redirect
|
|
90
|
+
const redirect = safeRedirect(router.query.redirect);
|
|
89
91
|
// Surface upstream auth errors (e.g. failed OAuth callback redirects with
|
|
90
92
|
// `?error=...`) — same pattern as AuthLogin. Without this the user lands on
|
|
91
93
|
// a fresh-looking registration page with no clue why.
|
|
@@ -101,9 +103,8 @@ export function AuthRegister(props: AuthRegisterProps) {
|
|
|
101
103
|
const captchaSiteKey = props.realmConfig.captchaSiteKey;
|
|
102
104
|
const [captchaToken, setCaptchaToken] = useState<string | undefined>();
|
|
103
105
|
const captchaRef = useRef<TurnstileWidgetHandle | null>(null);
|
|
104
|
-
// The
|
|
105
|
-
//
|
|
106
|
-
// ref the handler can read at submission time.
|
|
106
|
+
// The handler reads the token the widget issued last through a ref, so a
|
|
107
|
+
// submit never posts a token captured by an earlier render.
|
|
107
108
|
const captchaTokenRef = useRef<string | undefined>(undefined);
|
|
108
109
|
useEffect(() => {
|
|
109
110
|
captchaTokenRef.current = captchaToken;
|
|
@@ -325,7 +326,7 @@ export function AuthRegister(props: AuthRegisterProps) {
|
|
|
325
326
|
<div ref={contentRef}>
|
|
326
327
|
<div
|
|
327
328
|
key={state.phase}
|
|
328
|
-
className="animate-in fade-in
|
|
329
|
+
className="animate-in fade-in flex flex-col gap-4 px-6 duration-300"
|
|
329
330
|
>
|
|
330
331
|
{isVerifying ? (
|
|
331
332
|
<>
|
|
@@ -357,7 +358,7 @@ export function AuthRegister(props: AuthRegisterProps) {
|
|
|
357
358
|
id="emailCode"
|
|
358
359
|
maxLength={6}
|
|
359
360
|
autoComplete="one-time-code"
|
|
360
|
-
|
|
361
|
+
|
|
361
362
|
value={emailCode}
|
|
362
363
|
onChange={setEmailCode}
|
|
363
364
|
>
|
|
@@ -386,7 +387,7 @@ export function AuthRegister(props: AuthRegisterProps) {
|
|
|
386
387
|
id="phoneCode"
|
|
387
388
|
maxLength={6}
|
|
388
389
|
autoComplete="one-time-code"
|
|
389
|
-
|
|
390
|
+
|
|
390
391
|
value={phoneCode}
|
|
391
392
|
onChange={setPhoneCode}
|
|
392
393
|
>
|
|
@@ -460,9 +461,9 @@ export function AuthRegister(props: AuthRegisterProps) {
|
|
|
460
461
|
)}
|
|
461
462
|
</Centered>
|
|
462
463
|
);
|
|
463
|
-
}
|
|
464
|
+
};
|
|
464
465
|
|
|
465
|
-
|
|
466
|
+
const FormPhase = (props: {
|
|
466
467
|
allowed: boolean;
|
|
467
468
|
form: ReturnType<typeof useForm>;
|
|
468
469
|
formError: string | undefined;
|
|
@@ -482,7 +483,7 @@ function FormPhase(props: {
|
|
|
482
483
|
captchaRef: React.RefObject<TurnstileWidgetHandle | null>;
|
|
483
484
|
onCaptchaToken: (token: string | undefined) => void;
|
|
484
485
|
message?: ReactNode;
|
|
485
|
-
}) {
|
|
486
|
+
}) => {
|
|
486
487
|
const { tr } = useI18n();
|
|
487
488
|
const [passwordFieldFocused, setPasswordFieldFocused] = useState(false);
|
|
488
489
|
const {
|
|
@@ -683,9 +684,9 @@ function FormPhase(props: {
|
|
|
683
684
|
)}
|
|
684
685
|
</>
|
|
685
686
|
);
|
|
686
|
-
}
|
|
687
|
+
};
|
|
687
688
|
|
|
688
|
-
|
|
689
|
+
const Centered = (props: { children: React.ReactNode }) => {
|
|
689
690
|
return (
|
|
690
691
|
<div className="flex min-h-svh flex-1 items-center justify-center p-6">
|
|
691
692
|
<div className="flex w-full max-w-sm flex-col items-center gap-4">
|
|
@@ -693,12 +694,12 @@ function Centered(props: { children: React.ReactNode }) {
|
|
|
693
694
|
</div>
|
|
694
695
|
</div>
|
|
695
696
|
);
|
|
696
|
-
}
|
|
697
|
+
};
|
|
697
698
|
|
|
698
|
-
|
|
699
|
+
const RealmHeader = (props: {
|
|
699
700
|
settings: RealmConfig["settings"];
|
|
700
701
|
realmName: string;
|
|
701
|
-
}) {
|
|
702
|
+
}) => {
|
|
702
703
|
const s = props.settings;
|
|
703
704
|
if (!s.displayName && !s.description) return null;
|
|
704
705
|
return (
|
|
@@ -713,12 +714,12 @@ function RealmHeader(props: {
|
|
|
713
714
|
)}
|
|
714
715
|
</div>
|
|
715
716
|
);
|
|
716
|
-
}
|
|
717
|
+
};
|
|
717
718
|
|
|
718
|
-
|
|
719
|
+
const PasswordRules = (props: {
|
|
719
720
|
policy: RealmConfig["settings"]["passwordPolicy"];
|
|
720
721
|
value: string;
|
|
721
|
-
}) {
|
|
722
|
+
}) => {
|
|
722
723
|
const { tr } = useI18n();
|
|
723
724
|
const policy = props.policy;
|
|
724
725
|
const value = props.value;
|
|
@@ -786,21 +787,21 @@ function PasswordRules(props: {
|
|
|
786
787
|
))}
|
|
787
788
|
</ul>
|
|
788
789
|
);
|
|
789
|
-
}
|
|
790
|
+
};
|
|
790
791
|
|
|
791
|
-
|
|
792
|
+
const RealmLogo = (props: {
|
|
792
793
|
settings: RealmConfig["settings"];
|
|
793
794
|
realmName: string;
|
|
794
|
-
}) {
|
|
795
|
+
}) => {
|
|
795
796
|
if (!props.settings.logoUrl) return null;
|
|
796
797
|
return (
|
|
797
798
|
<img
|
|
798
799
|
src={props.settings.logoUrl}
|
|
799
800
|
alt={props.settings.displayName || props.realmName}
|
|
800
|
-
className="size-16 rounded-xl border
|
|
801
|
+
className="bg-muted size-16 rounded-xl border object-cover shadow-sm"
|
|
801
802
|
/>
|
|
802
803
|
);
|
|
803
|
-
}
|
|
804
|
+
};
|
|
804
805
|
|
|
805
806
|
/**
|
|
806
807
|
* The reference shape of the registration form, with every configurable field
|