@nextsparkjs/core 0.1.0-beta.82 → 0.1.0-beta.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/entities/wrappers/EntityDetailWrapper.d.ts.map +1 -1
- package/dist/components/entities/wrappers/EntityDetailWrapper.js +11 -39
- package/dist/hooks/useEntityQuery.d.ts.map +1 -1
- package/dist/hooks/useEntityQuery.js +21 -3
- package/dist/lib/theme/get-default-theme-mode.d.ts +11 -0
- package/dist/lib/theme/get-default-theme-mode.d.ts.map +1 -1
- package/dist/lib/theme/get-default-theme-mode.js +42 -25
- package/dist/styles/classes.json +1 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/types/theme.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/templates/app/(auth)/forgot-password/page.tsx +0 -216
- package/dist/templates/app/(auth)/layout.tsx +0 -51
- package/dist/templates/app/(auth)/login/page.tsx +0 -21
- package/dist/templates/app/(auth)/reset-password/page.tsx +0 -212
- package/dist/templates/app/(auth)/signup/page.tsx +0 -21
- package/dist/templates/app/(auth)/verify-email/page.tsx +0 -190
- package/dist/templates/app/(public)/[...slug]/page.tsx +0 -378
- package/dist/templates/app/(public)/docs/[section]/[page]/page.tsx +0 -90
- package/dist/templates/app/(public)/docs/layout.tsx +0 -25
- package/dist/templates/app/(public)/docs/page.tsx +0 -81
- package/dist/templates/app/(public)/layout.tsx +0 -41
- package/dist/templates/app/(public)/page.tsx +0 -19
- package/dist/templates/app/403/page.tsx +0 -89
- package/dist/templates/app/api/auth/[...all]/route.ts +0 -78
- package/dist/templates/app/api/cron/billing/lifecycle/route.ts +0 -98
- package/dist/templates/app/api/csp-report/route.ts +0 -175
- package/dist/templates/app/api/devtools/config/entities/route.ts +0 -108
- package/dist/templates/app/api/devtools/config/theme/route.ts +0 -66
- package/dist/templates/app/api/devtools/tests/[...path]/route.ts +0 -130
- package/dist/templates/app/api/devtools/tests/route.ts +0 -134
- package/dist/templates/app/api/health/route.ts +0 -29
- package/dist/templates/app/api/internal/user-metadata/route.ts +0 -36
- package/dist/templates/app/api/superadmin/subscriptions/route.ts +0 -310
- package/dist/templates/app/api/superadmin/teams/[teamId]/route.ts +0 -286
- package/dist/templates/app/api/superadmin/teams/route.ts +0 -188
- package/dist/templates/app/api/superadmin/users/[userId]/route.ts +0 -540
- package/dist/templates/app/api/superadmin/users/route.ts +0 -323
- package/dist/templates/app/api/user/delete-account/route.ts +0 -55
- package/dist/templates/app/api/user/plan-flags/route.ts +0 -283
- package/dist/templates/app/api/user/profile/route.ts +0 -133
- package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +0 -210
- package/dist/templates/app/api/v1/[entity]/[id]/child/[childType]/route.ts +0 -331
- package/dist/templates/app/api/v1/[entity]/[id]/route.ts +0 -35
- package/dist/templates/app/api/v1/[entity]/docs.md +0 -369
- package/dist/templates/app/api/v1/[entity]/presets.ts +0 -194
- package/dist/templates/app/api/v1/[entity]/route.ts +0 -31
- package/dist/templates/app/api/v1/api-keys/[id]/route.ts +0 -303
- package/dist/templates/app/api/v1/api-keys/docs.md +0 -101
- package/dist/templates/app/api/v1/api-keys/presets.ts +0 -31
- package/dist/templates/app/api/v1/api-keys/route.ts +0 -250
- package/dist/templates/app/api/v1/auth/docs.md +0 -184
- package/dist/templates/app/api/v1/auth/presets.ts +0 -44
- package/dist/templates/app/api/v1/auth/signup-with-invite/route.ts +0 -227
- package/dist/templates/app/api/v1/billing/cancel/route.ts +0 -206
- package/dist/templates/app/api/v1/billing/change-plan/route.ts +0 -97
- package/dist/templates/app/api/v1/billing/check-action/route.ts +0 -81
- package/dist/templates/app/api/v1/billing/checkout/route.ts +0 -124
- package/dist/templates/app/api/v1/billing/docs.md +0 -209
- package/dist/templates/app/api/v1/billing/plans/route.ts +0 -85
- package/dist/templates/app/api/v1/billing/portal/route.ts +0 -90
- package/dist/templates/app/api/v1/billing/presets.ts +0 -121
- package/dist/templates/app/api/v1/billing/webhooks/stripe/route.ts +0 -428
- package/dist/templates/app/api/v1/blocks/[slug]/route.ts +0 -29
- package/dist/templates/app/api/v1/blocks/docs.md +0 -173
- package/dist/templates/app/api/v1/blocks/presets.ts +0 -121
- package/dist/templates/app/api/v1/blocks/route.ts +0 -45
- package/dist/templates/app/api/v1/blocks/validate/route.ts +0 -45
- package/dist/templates/app/api/v1/cron/docs.md +0 -116
- package/dist/templates/app/api/v1/cron/presets.ts +0 -26
- package/dist/templates/app/api/v1/cron/process/route.ts +0 -108
- package/dist/templates/app/api/v1/devtools/blocks/route.ts +0 -82
- package/dist/templates/app/api/v1/devtools/docs/route.ts +0 -150
- package/dist/templates/app/api/v1/devtools/docs.md +0 -204
- package/dist/templates/app/api/v1/devtools/features/route.ts +0 -61
- package/dist/templates/app/api/v1/devtools/flows/route.ts +0 -61
- package/dist/templates/app/api/v1/devtools/presets.ts +0 -113
- package/dist/templates/app/api/v1/devtools/scheduled-actions/route.ts +0 -120
- package/dist/templates/app/api/v1/devtools/testing/route.ts +0 -82
- package/dist/templates/app/api/v1/media/docs.md +0 -117
- package/dist/templates/app/api/v1/media/presets.ts +0 -24
- package/dist/templates/app/api/v1/media/upload/route.ts +0 -150
- package/dist/templates/app/api/v1/patterns/[id]/usages/route.ts +0 -116
- package/dist/templates/app/api/v1/plugin/[...path]/route.ts +0 -373
- package/dist/templates/app/api/v1/plugin/docs.md +0 -79
- package/dist/templates/app/api/v1/plugin/presets.ts +0 -21
- package/dist/templates/app/api/v1/plugin/route.ts +0 -96
- package/dist/templates/app/api/v1/post-categories/[id]/route.ts +0 -255
- package/dist/templates/app/api/v1/post-categories/docs.md +0 -134
- package/dist/templates/app/api/v1/post-categories/presets.ts +0 -78
- package/dist/templates/app/api/v1/post-categories/route.ts +0 -119
- package/dist/templates/app/api/v1/team-invitations/[token]/accept/route.ts +0 -179
- package/dist/templates/app/api/v1/team-invitations/[token]/decline/route.ts +0 -120
- package/dist/templates/app/api/v1/team-invitations/[token]/route.ts +0 -89
- package/dist/templates/app/api/v1/team-invitations/docs.md +0 -88
- package/dist/templates/app/api/v1/team-invitations/presets.ts +0 -43
- package/dist/templates/app/api/v1/team-invitations/route.ts +0 -114
- package/dist/templates/app/api/v1/teams/[teamId]/invitations/route.ts +0 -171
- package/dist/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +0 -105
- package/dist/templates/app/api/v1/teams/[teamId]/invoices/route.ts +0 -125
- package/dist/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +0 -263
- package/dist/templates/app/api/v1/teams/[teamId]/members/route.ts +0 -358
- package/dist/templates/app/api/v1/teams/[teamId]/route.ts +0 -322
- package/dist/templates/app/api/v1/teams/[teamId]/subscription/route.ts +0 -50
- package/dist/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +0 -91
- package/dist/templates/app/api/v1/teams/docs.md +0 -320
- package/dist/templates/app/api/v1/teams/presets.ts +0 -178
- package/dist/templates/app/api/v1/teams/route.ts +0 -293
- package/dist/templates/app/api/v1/teams/switch/route.ts +0 -88
- package/dist/templates/app/api/v1/theme/[...path]/route.ts +0 -361
- package/dist/templates/app/api/v1/theme/docs.md +0 -74
- package/dist/templates/app/api/v1/theme/presets.ts +0 -21
- package/dist/templates/app/api/v1/theme/route.ts +0 -96
- package/dist/templates/app/api/v1/users/[id]/meta/[key]/route.ts +0 -363
- package/dist/templates/app/api/v1/users/[id]/route.ts +0 -302
- package/dist/templates/app/api/v1/users/docs.md +0 -93
- package/dist/templates/app/api/v1/users/presets.ts +0 -59
- package/dist/templates/app/api/v1/users/route.ts +0 -197
- package/dist/templates/app/dashboard/(main)/[entity]/[id]/edit/page.tsx +0 -117
- package/dist/templates/app/dashboard/(main)/[entity]/[id]/page.tsx +0 -103
- package/dist/templates/app/dashboard/(main)/[entity]/create/page.tsx +0 -95
- package/dist/templates/app/dashboard/(main)/[entity]/error.tsx +0 -51
- package/dist/templates/app/dashboard/(main)/[entity]/layout.tsx +0 -113
- package/dist/templates/app/dashboard/(main)/[entity]/loading.tsx +0 -61
- package/dist/templates/app/dashboard/(main)/[entity]/page.tsx +0 -90
- package/dist/templates/app/dashboard/(main)/layout.tsx +0 -98
- package/dist/templates/app/dashboard/(main)/loading.tsx +0 -5
- package/dist/templates/app/dashboard/(main)/page.tsx +0 -201
- package/dist/templates/app/dashboard/(main)/patterns/[id]/edit/page.tsx +0 -114
- package/dist/templates/app/dashboard/(main)/patterns/[id]/page.tsx +0 -20
- package/dist/templates/app/dashboard/(main)/patterns/[id]/reports/page.tsx +0 -171
- package/dist/templates/app/dashboard/(main)/patterns/create/page.tsx +0 -86
- package/dist/templates/app/dashboard/(main)/patterns/page.tsx +0 -444
- package/dist/templates/app/dashboard/features/analytics/page.tsx +0 -35
- package/dist/templates/app/dashboard/features/automation/page.tsx +0 -35
- package/dist/templates/app/dashboard/features/layout.tsx +0 -13
- package/dist/templates/app/dashboard/features/loading.tsx +0 -5
- package/dist/templates/app/dashboard/features/webhooks/page.tsx +0 -35
- package/dist/templates/app/dashboard/layout.tsx +0 -86
- package/dist/templates/app/dashboard/permission-denied/page.tsx +0 -29
- package/dist/templates/app/dashboard/settings/api-keys/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/api-keys/page.tsx +0 -513
- package/dist/templates/app/dashboard/settings/billing/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/billing/page.tsx +0 -284
- package/dist/templates/app/dashboard/settings/invoices/[invoiceNumber]/page.tsx +0 -222
- package/dist/templates/app/dashboard/settings/invoices/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/invoices/page.tsx +0 -82
- package/dist/templates/app/dashboard/settings/layout.tsx +0 -151
- package/dist/templates/app/dashboard/settings/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/notifications/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/notifications/page.tsx +0 -462
- package/dist/templates/app/dashboard/settings/page.tsx +0 -92
- package/dist/templates/app/dashboard/settings/password/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/password/page.tsx +0 -306
- package/dist/templates/app/dashboard/settings/plans/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/plans/page.tsx +0 -40
- package/dist/templates/app/dashboard/settings/profile/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/profile/page.tsx +0 -686
- package/dist/templates/app/dashboard/settings/security/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/security/page.tsx +0 -505
- package/dist/templates/app/dashboard/settings/teams/loading.tsx +0 -5
- package/dist/templates/app/dashboard/settings/teams/page.tsx +0 -272
- package/dist/templates/app/dashboard/settings/teams/permissions/page.tsx +0 -92
- package/dist/templates/app/devtools/blocks/[slug]/page.tsx +0 -39
- package/dist/templates/app/devtools/blocks/page.tsx +0 -31
- package/dist/templates/app/devtools/config/page.tsx +0 -31
- package/dist/templates/app/devtools/features/page.tsx +0 -31
- package/dist/templates/app/devtools/flows/page.tsx +0 -31
- package/dist/templates/app/devtools/layout.tsx +0 -58
- package/dist/templates/app/devtools/page.tsx +0 -121
- package/dist/templates/app/devtools/scheduled-actions/page.tsx +0 -157
- package/dist/templates/app/devtools/style/page.tsx +0 -330
- package/dist/templates/app/devtools/tags/page.tsx +0 -31
- package/dist/templates/app/devtools/tests/[[...path]]/page.tsx +0 -47
- package/dist/templates/app/favicon.ico +0 -0
- package/dist/templates/app/globals.css +0 -12
- package/dist/templates/app/layout.tsx +0 -96
- package/dist/templates/app/public/page.tsx +0 -30
- package/dist/templates/app/superadmin/docs/[section]/[page]/page.tsx +0 -92
- package/dist/templates/app/superadmin/docs/page.tsx +0 -75
- package/dist/templates/app/superadmin/layout.tsx +0 -67
- package/dist/templates/app/superadmin/page.tsx +0 -149
- package/dist/templates/app/superadmin/subscriptions/page.tsx +0 -655
- package/dist/templates/app/superadmin/team-roles/page.tsx +0 -493
- package/dist/templates/app/superadmin/teams/[teamId]/page.tsx +0 -687
- package/dist/templates/app/superadmin/teams/page.tsx +0 -302
- package/dist/templates/app/superadmin/users/[userId]/page.tsx +0 -548
- package/dist/templates/app/superadmin/users/page.tsx +0 -528
- package/templates/app/(auth)/forgot-password/page.tsx +0 -216
- package/templates/app/(auth)/layout.tsx +0 -51
- package/templates/app/(auth)/login/page.tsx +0 -21
- package/templates/app/(auth)/reset-password/page.tsx +0 -212
- package/templates/app/(auth)/signup/page.tsx +0 -21
- package/templates/app/(auth)/verify-email/page.tsx +0 -190
- package/templates/app/(public)/[...slug]/page.tsx +0 -378
- package/templates/app/(public)/docs/[section]/[page]/page.tsx +0 -90
- package/templates/app/(public)/docs/layout.tsx +0 -25
- package/templates/app/(public)/docs/page.tsx +0 -81
- package/templates/app/(public)/layout.tsx +0 -41
- package/templates/app/(public)/page.tsx +0 -19
- package/templates/app/403/page.tsx +0 -89
- package/templates/app/api/auth/[...all]/route.ts +0 -78
- package/templates/app/api/cron/billing/lifecycle/route.ts +0 -98
- package/templates/app/api/csp-report/route.ts +0 -175
- package/templates/app/api/devtools/config/entities/route.ts +0 -108
- package/templates/app/api/devtools/config/theme/route.ts +0 -66
- package/templates/app/api/devtools/tests/[...path]/route.ts +0 -130
- package/templates/app/api/devtools/tests/route.ts +0 -134
- package/templates/app/api/health/route.ts +0 -29
- package/templates/app/api/internal/user-metadata/route.ts +0 -36
- package/templates/app/api/superadmin/subscriptions/route.ts +0 -310
- package/templates/app/api/superadmin/teams/[teamId]/route.ts +0 -286
- package/templates/app/api/superadmin/teams/route.ts +0 -188
- package/templates/app/api/superadmin/users/[userId]/route.ts +0 -540
- package/templates/app/api/superadmin/users/route.ts +0 -323
- package/templates/app/api/user/delete-account/route.ts +0 -55
- package/templates/app/api/user/plan-flags/route.ts +0 -283
- package/templates/app/api/user/profile/route.ts +0 -133
- package/templates/app/api/v1/[entity]/[id]/child/[childType]/[childId]/route.ts +0 -210
- package/templates/app/api/v1/[entity]/[id]/child/[childType]/route.ts +0 -331
- package/templates/app/api/v1/[entity]/[id]/route.ts +0 -35
- package/templates/app/api/v1/[entity]/docs.md +0 -369
- package/templates/app/api/v1/[entity]/presets.ts +0 -194
- package/templates/app/api/v1/[entity]/route.ts +0 -31
- package/templates/app/api/v1/api-keys/[id]/route.ts +0 -303
- package/templates/app/api/v1/api-keys/docs.md +0 -101
- package/templates/app/api/v1/api-keys/presets.ts +0 -31
- package/templates/app/api/v1/api-keys/route.ts +0 -250
- package/templates/app/api/v1/auth/docs.md +0 -184
- package/templates/app/api/v1/auth/presets.ts +0 -44
- package/templates/app/api/v1/auth/signup-with-invite/route.ts +0 -227
- package/templates/app/api/v1/billing/cancel/route.ts +0 -206
- package/templates/app/api/v1/billing/change-plan/route.ts +0 -97
- package/templates/app/api/v1/billing/check-action/route.ts +0 -81
- package/templates/app/api/v1/billing/checkout/route.ts +0 -124
- package/templates/app/api/v1/billing/docs.md +0 -209
- package/templates/app/api/v1/billing/plans/route.ts +0 -85
- package/templates/app/api/v1/billing/portal/route.ts +0 -90
- package/templates/app/api/v1/billing/presets.ts +0 -121
- package/templates/app/api/v1/billing/webhooks/stripe/route.ts +0 -428
- package/templates/app/api/v1/blocks/[slug]/route.ts +0 -29
- package/templates/app/api/v1/blocks/docs.md +0 -173
- package/templates/app/api/v1/blocks/presets.ts +0 -121
- package/templates/app/api/v1/blocks/route.ts +0 -45
- package/templates/app/api/v1/blocks/validate/route.ts +0 -45
- package/templates/app/api/v1/cron/docs.md +0 -116
- package/templates/app/api/v1/cron/presets.ts +0 -26
- package/templates/app/api/v1/cron/process/route.ts +0 -108
- package/templates/app/api/v1/devtools/blocks/route.ts +0 -82
- package/templates/app/api/v1/devtools/docs/route.ts +0 -150
- package/templates/app/api/v1/devtools/docs.md +0 -204
- package/templates/app/api/v1/devtools/features/route.ts +0 -61
- package/templates/app/api/v1/devtools/flows/route.ts +0 -61
- package/templates/app/api/v1/devtools/presets.ts +0 -113
- package/templates/app/api/v1/devtools/scheduled-actions/route.ts +0 -120
- package/templates/app/api/v1/devtools/testing/route.ts +0 -82
- package/templates/app/api/v1/media/docs.md +0 -117
- package/templates/app/api/v1/media/presets.ts +0 -24
- package/templates/app/api/v1/media/upload/route.ts +0 -150
- package/templates/app/api/v1/patterns/[id]/usages/route.ts +0 -116
- package/templates/app/api/v1/plugin/[...path]/route.ts +0 -373
- package/templates/app/api/v1/plugin/docs.md +0 -79
- package/templates/app/api/v1/plugin/presets.ts +0 -21
- package/templates/app/api/v1/plugin/route.ts +0 -96
- package/templates/app/api/v1/post-categories/[id]/route.ts +0 -255
- package/templates/app/api/v1/post-categories/docs.md +0 -134
- package/templates/app/api/v1/post-categories/presets.ts +0 -78
- package/templates/app/api/v1/post-categories/route.ts +0 -119
- package/templates/app/api/v1/team-invitations/[token]/accept/route.ts +0 -179
- package/templates/app/api/v1/team-invitations/[token]/decline/route.ts +0 -120
- package/templates/app/api/v1/team-invitations/[token]/route.ts +0 -89
- package/templates/app/api/v1/team-invitations/docs.md +0 -88
- package/templates/app/api/v1/team-invitations/presets.ts +0 -43
- package/templates/app/api/v1/team-invitations/route.ts +0 -114
- package/templates/app/api/v1/teams/[teamId]/invitations/route.ts +0 -171
- package/templates/app/api/v1/teams/[teamId]/invoices/[invoiceNumber]/route.ts +0 -105
- package/templates/app/api/v1/teams/[teamId]/invoices/route.ts +0 -125
- package/templates/app/api/v1/teams/[teamId]/members/[memberId]/route.ts +0 -263
- package/templates/app/api/v1/teams/[teamId]/members/route.ts +0 -358
- package/templates/app/api/v1/teams/[teamId]/route.ts +0 -322
- package/templates/app/api/v1/teams/[teamId]/subscription/route.ts +0 -50
- package/templates/app/api/v1/teams/[teamId]/usage/[limitSlug]/route.ts +0 -91
- package/templates/app/api/v1/teams/docs.md +0 -320
- package/templates/app/api/v1/teams/presets.ts +0 -178
- package/templates/app/api/v1/teams/route.ts +0 -293
- package/templates/app/api/v1/teams/switch/route.ts +0 -88
- package/templates/app/api/v1/theme/[...path]/route.ts +0 -361
- package/templates/app/api/v1/theme/docs.md +0 -74
- package/templates/app/api/v1/theme/presets.ts +0 -21
- package/templates/app/api/v1/theme/route.ts +0 -96
- package/templates/app/api/v1/users/[id]/meta/[key]/route.ts +0 -363
- package/templates/app/api/v1/users/[id]/route.ts +0 -302
- package/templates/app/api/v1/users/docs.md +0 -93
- package/templates/app/api/v1/users/presets.ts +0 -59
- package/templates/app/api/v1/users/route.ts +0 -197
- package/templates/app/dashboard/(main)/[entity]/[id]/edit/page.tsx +0 -117
- package/templates/app/dashboard/(main)/[entity]/[id]/page.tsx +0 -103
- package/templates/app/dashboard/(main)/[entity]/create/page.tsx +0 -95
- package/templates/app/dashboard/(main)/[entity]/error.tsx +0 -51
- package/templates/app/dashboard/(main)/[entity]/layout.tsx +0 -113
- package/templates/app/dashboard/(main)/[entity]/loading.tsx +0 -61
- package/templates/app/dashboard/(main)/[entity]/page.tsx +0 -90
- package/templates/app/dashboard/(main)/layout.tsx +0 -98
- package/templates/app/dashboard/(main)/loading.tsx +0 -5
- package/templates/app/dashboard/(main)/page.tsx +0 -201
- package/templates/app/dashboard/(main)/patterns/[id]/edit/page.tsx +0 -114
- package/templates/app/dashboard/(main)/patterns/[id]/page.tsx +0 -20
- package/templates/app/dashboard/(main)/patterns/[id]/reports/page.tsx +0 -171
- package/templates/app/dashboard/(main)/patterns/create/page.tsx +0 -86
- package/templates/app/dashboard/(main)/patterns/page.tsx +0 -444
- package/templates/app/dashboard/features/analytics/page.tsx +0 -35
- package/templates/app/dashboard/features/automation/page.tsx +0 -35
- package/templates/app/dashboard/features/layout.tsx +0 -13
- package/templates/app/dashboard/features/loading.tsx +0 -5
- package/templates/app/dashboard/features/webhooks/page.tsx +0 -35
- package/templates/app/dashboard/layout.tsx +0 -86
- package/templates/app/dashboard/permission-denied/page.tsx +0 -29
- package/templates/app/dashboard/settings/api-keys/loading.tsx +0 -5
- package/templates/app/dashboard/settings/api-keys/page.tsx +0 -513
- package/templates/app/dashboard/settings/billing/loading.tsx +0 -5
- package/templates/app/dashboard/settings/billing/page.tsx +0 -284
- package/templates/app/dashboard/settings/invoices/[invoiceNumber]/page.tsx +0 -222
- package/templates/app/dashboard/settings/invoices/loading.tsx +0 -5
- package/templates/app/dashboard/settings/invoices/page.tsx +0 -82
- package/templates/app/dashboard/settings/layout.tsx +0 -151
- package/templates/app/dashboard/settings/loading.tsx +0 -5
- package/templates/app/dashboard/settings/notifications/loading.tsx +0 -5
- package/templates/app/dashboard/settings/notifications/page.tsx +0 -462
- package/templates/app/dashboard/settings/page.tsx +0 -92
- package/templates/app/dashboard/settings/password/loading.tsx +0 -5
- package/templates/app/dashboard/settings/password/page.tsx +0 -306
- package/templates/app/dashboard/settings/plans/loading.tsx +0 -5
- package/templates/app/dashboard/settings/plans/page.tsx +0 -40
- package/templates/app/dashboard/settings/profile/loading.tsx +0 -5
- package/templates/app/dashboard/settings/profile/page.tsx +0 -686
- package/templates/app/dashboard/settings/security/loading.tsx +0 -5
- package/templates/app/dashboard/settings/security/page.tsx +0 -505
- package/templates/app/dashboard/settings/teams/loading.tsx +0 -5
- package/templates/app/dashboard/settings/teams/page.tsx +0 -272
- package/templates/app/dashboard/settings/teams/permissions/page.tsx +0 -92
- package/templates/app/devtools/blocks/[slug]/page.tsx +0 -39
- package/templates/app/devtools/blocks/page.tsx +0 -31
- package/templates/app/devtools/config/page.tsx +0 -31
- package/templates/app/devtools/features/page.tsx +0 -31
- package/templates/app/devtools/flows/page.tsx +0 -31
- package/templates/app/devtools/layout.tsx +0 -58
- package/templates/app/devtools/page.tsx +0 -121
- package/templates/app/devtools/scheduled-actions/page.tsx +0 -157
- package/templates/app/devtools/style/page.tsx +0 -330
- package/templates/app/devtools/tags/page.tsx +0 -31
- package/templates/app/devtools/tests/[[...path]]/page.tsx +0 -47
- package/templates/app/favicon.ico +0 -0
- package/templates/app/globals.css +0 -12
- package/templates/app/layout.tsx +0 -96
- package/templates/app/public/page.tsx +0 -30
- package/templates/app/superadmin/docs/[section]/[page]/page.tsx +0 -92
- package/templates/app/superadmin/docs/page.tsx +0 -75
- package/templates/app/superadmin/layout.tsx +0 -67
- package/templates/app/superadmin/page.tsx +0 -149
- package/templates/app/superadmin/subscriptions/page.tsx +0 -655
- package/templates/app/superadmin/team-roles/page.tsx +0 -493
- package/templates/app/superadmin/teams/[teamId]/page.tsx +0 -687
- package/templates/app/superadmin/teams/page.tsx +0 -302
- package/templates/app/superadmin/users/[userId]/page.tsx +0 -548
- package/templates/app/superadmin/users/page.tsx +0 -528
|
@@ -1,493 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
CardContent,
|
|
7
|
-
CardDescription,
|
|
8
|
-
CardHeader,
|
|
9
|
-
CardTitle,
|
|
10
|
-
} from "@nextsparkjs/core/components/ui/card";
|
|
11
|
-
import { Button } from "@nextsparkjs/core/components/ui/button";
|
|
12
|
-
import { Badge } from "@nextsparkjs/core/components/ui/badge";
|
|
13
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@nextsparkjs/core/components/ui/tabs";
|
|
14
|
-
import {
|
|
15
|
-
ArrowLeft,
|
|
16
|
-
Shield,
|
|
17
|
-
Users,
|
|
18
|
-
Lock,
|
|
19
|
-
Eye,
|
|
20
|
-
Key,
|
|
21
|
-
CreditCard,
|
|
22
|
-
Layers,
|
|
23
|
-
Zap,
|
|
24
|
-
} from "lucide-react";
|
|
25
|
-
import { APP_CONFIG_MERGED } from "@nextsparkjs/core/lib/config/config-sync";
|
|
26
|
-
import { PermissionService } from "@nextsparkjs/core/lib/services/permission.service";
|
|
27
|
-
import { PERMISSIONS_METADATA } from "@nextsparkjs/registries/permissions-registry";
|
|
28
|
-
import { getFullBillingMatrix } from "@nextsparkjs/core/lib/billing/queries";
|
|
29
|
-
import { RolesPermissionsMatrix } from "@nextsparkjs/core/components/superadmin/tables/RolesPermissionsMatrix";
|
|
30
|
-
import { PlanFeaturesMatrix } from "@nextsparkjs/core/components/superadmin/tables/PlanFeaturesMatrix";
|
|
31
|
-
import { getTemplateOrDefaultClient } from "@nextsparkjs/registries/template-registry.client";
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Team Roles & Permissions Page
|
|
35
|
-
*
|
|
36
|
-
* Displays two consolidated matrices:
|
|
37
|
-
* 1. RBAC Matrix - Team roles and their permissions
|
|
38
|
-
* 2. Plan Features Matrix - Billing plans and their features/limits
|
|
39
|
-
*
|
|
40
|
-
* Both use pre-computed data for O(1) runtime lookups.
|
|
41
|
-
*/
|
|
42
|
-
function TeamRolesPage() {
|
|
43
|
-
const teamRolesConfig = APP_CONFIG_MERGED.teamRoles;
|
|
44
|
-
const roles = teamRolesConfig.availableTeamRoles;
|
|
45
|
-
const hierarchy = teamRolesConfig.hierarchy;
|
|
46
|
-
|
|
47
|
-
// Get full RBAC matrix from pre-computed registry
|
|
48
|
-
const { permissions, matrix } = PermissionService.getMatrix();
|
|
49
|
-
|
|
50
|
-
// Get full billing matrix from pre-computed registry
|
|
51
|
-
const billingData = getFullBillingMatrix();
|
|
52
|
-
|
|
53
|
-
// Sort roles by hierarchy for display
|
|
54
|
-
const sortedRoles = [...roles].sort(
|
|
55
|
-
(a, b) => (hierarchy[b] ?? 0) - (hierarchy[a] ?? 0)
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
// Convert FULL_MATRIX format to rolePermissions format for the matrix component
|
|
59
|
-
const rolePermissions: Record<string, string[]> = {};
|
|
60
|
-
for (const role of roles) {
|
|
61
|
-
rolePermissions[role] = permissions
|
|
62
|
-
.filter(p => matrix[p.id as keyof typeof matrix]?.[role])
|
|
63
|
-
.map(p => p.id);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// All permission IDs
|
|
67
|
-
const allPermissions = permissions.map(p => p.id);
|
|
68
|
-
|
|
69
|
-
// Count permissions per role
|
|
70
|
-
const permissionCounts = sortedRoles.reduce(
|
|
71
|
-
(acc, role) => {
|
|
72
|
-
acc[role] = rolePermissions[role]?.length ?? 0;
|
|
73
|
-
return acc;
|
|
74
|
-
},
|
|
75
|
-
{} as Record<string, number>
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
// Get role badge variant based on hierarchy
|
|
79
|
-
const getRoleBadgeVariant = (role: string) => {
|
|
80
|
-
const h = hierarchy[role] ?? 0;
|
|
81
|
-
if (h >= 100) return "destructive";
|
|
82
|
-
if (h >= 50) return "default";
|
|
83
|
-
if (h >= 10) return "secondary";
|
|
84
|
-
return "outline";
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<div className="space-y-6">
|
|
89
|
-
{/* Header */}
|
|
90
|
-
<div className="flex items-center gap-4">
|
|
91
|
-
<Button variant="outline" size="sm" asChild>
|
|
92
|
-
<Link href="/superadmin" className="flex items-center gap-2">
|
|
93
|
-
<ArrowLeft className="h-4 w-4" />
|
|
94
|
-
Back to Super Admin
|
|
95
|
-
</Link>
|
|
96
|
-
</Button>
|
|
97
|
-
<div className="flex-1">
|
|
98
|
-
<h1 className="text-3xl font-bold tracking-tight">
|
|
99
|
-
Roles, Permissions & Plans
|
|
100
|
-
</h1>
|
|
101
|
-
<p className="text-muted-foreground">
|
|
102
|
-
View team roles, permissions, and billing plan features
|
|
103
|
-
</p>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
{/* Tabs for switching between matrices */}
|
|
108
|
-
<Tabs defaultValue="rbac" className="space-y-6">
|
|
109
|
-
<TabsList className="grid w-full max-w-md grid-cols-2">
|
|
110
|
-
<TabsTrigger value="rbac" className="flex items-center gap-2" data-cy="tab-rbac">
|
|
111
|
-
<Shield className="h-4 w-4" />
|
|
112
|
-
RBAC Matrix
|
|
113
|
-
</TabsTrigger>
|
|
114
|
-
<TabsTrigger value="plans" className="flex items-center gap-2" data-cy="tab-plans">
|
|
115
|
-
<CreditCard className="h-4 w-4" />
|
|
116
|
-
Plan Features
|
|
117
|
-
</TabsTrigger>
|
|
118
|
-
</TabsList>
|
|
119
|
-
|
|
120
|
-
{/* RBAC Matrix Tab */}
|
|
121
|
-
<TabsContent value="rbac" className="space-y-6">
|
|
122
|
-
{/* RBAC Stats Overview */}
|
|
123
|
-
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
|
|
124
|
-
<Card>
|
|
125
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
126
|
-
<CardTitle className="text-sm font-medium">Available Roles</CardTitle>
|
|
127
|
-
<Users className="h-4 w-4 text-muted-foreground" />
|
|
128
|
-
</CardHeader>
|
|
129
|
-
<CardContent>
|
|
130
|
-
<div className="text-2xl font-bold">{roles.length}</div>
|
|
131
|
-
<p className="text-xs text-muted-foreground">Team role types</p>
|
|
132
|
-
</CardContent>
|
|
133
|
-
</Card>
|
|
134
|
-
|
|
135
|
-
<Card>
|
|
136
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
137
|
-
<CardTitle className="text-sm font-medium">Total Permissions</CardTitle>
|
|
138
|
-
<Key className="h-4 w-4 text-muted-foreground" />
|
|
139
|
-
</CardHeader>
|
|
140
|
-
<CardContent>
|
|
141
|
-
<div className="text-2xl font-bold">{PERMISSIONS_METADATA.totalPermissions}</div>
|
|
142
|
-
<p className="text-xs text-muted-foreground">
|
|
143
|
-
{PERMISSIONS_METADATA.corePermissions} core + {PERMISSIONS_METADATA.featurePermissions} features + {PERMISSIONS_METADATA.entityPermissions} entity
|
|
144
|
-
</p>
|
|
145
|
-
</CardContent>
|
|
146
|
-
</Card>
|
|
147
|
-
|
|
148
|
-
<Card>
|
|
149
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
150
|
-
<CardTitle className="text-sm font-medium">Protected Role</CardTitle>
|
|
151
|
-
<Lock className="h-4 w-4 text-muted-foreground" />
|
|
152
|
-
</CardHeader>
|
|
153
|
-
<CardContent>
|
|
154
|
-
<div className="text-2xl font-bold">owner</div>
|
|
155
|
-
<p className="text-xs text-muted-foreground">Cannot be removed</p>
|
|
156
|
-
</CardContent>
|
|
157
|
-
</Card>
|
|
158
|
-
|
|
159
|
-
<Card>
|
|
160
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
161
|
-
<CardTitle className="text-sm font-medium">Default Role</CardTitle>
|
|
162
|
-
<Eye className="h-4 w-4 text-muted-foreground" />
|
|
163
|
-
</CardHeader>
|
|
164
|
-
<CardContent>
|
|
165
|
-
<div className="text-2xl font-bold">{teamRolesConfig.defaultTeamRole}</div>
|
|
166
|
-
<p className="text-xs text-muted-foreground">For invitations</p>
|
|
167
|
-
</CardContent>
|
|
168
|
-
</Card>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
{/* Roles Hierarchy */}
|
|
172
|
-
<Card>
|
|
173
|
-
<CardHeader>
|
|
174
|
-
<CardTitle className="flex items-center gap-2">
|
|
175
|
-
<Shield className="h-5 w-5" />
|
|
176
|
-
Team Roles Hierarchy
|
|
177
|
-
</CardTitle>
|
|
178
|
-
<CardDescription>
|
|
179
|
-
Roles ordered by hierarchy level. Higher values have more permissions.
|
|
180
|
-
</CardDescription>
|
|
181
|
-
</CardHeader>
|
|
182
|
-
<CardContent>
|
|
183
|
-
<div className="flex flex-wrap gap-3">
|
|
184
|
-
{sortedRoles.map((role) => (
|
|
185
|
-
<div
|
|
186
|
-
key={role}
|
|
187
|
-
className="flex items-center gap-2 px-4 py-2 rounded-lg border bg-card"
|
|
188
|
-
data-cy={`role-card-${role}`}
|
|
189
|
-
>
|
|
190
|
-
<Badge variant={getRoleBadgeVariant(role)} className="font-semibold">
|
|
191
|
-
{hierarchy[role] ?? 0}
|
|
192
|
-
</Badge>
|
|
193
|
-
<div>
|
|
194
|
-
<div className="font-medium capitalize">{role}</div>
|
|
195
|
-
<div className="text-xs text-muted-foreground">
|
|
196
|
-
{permissionCounts[role]} permissions
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
))}
|
|
201
|
-
</div>
|
|
202
|
-
</CardContent>
|
|
203
|
-
</Card>
|
|
204
|
-
|
|
205
|
-
{/* Permissions Matrix */}
|
|
206
|
-
<Card>
|
|
207
|
-
<CardHeader>
|
|
208
|
-
<CardTitle>Permissions Matrix</CardTitle>
|
|
209
|
-
<CardDescription>
|
|
210
|
-
Complete view of which permissions each team role has access to.
|
|
211
|
-
</CardDescription>
|
|
212
|
-
</CardHeader>
|
|
213
|
-
<CardContent>
|
|
214
|
-
<RolesPermissionsMatrix
|
|
215
|
-
roles={roles}
|
|
216
|
-
hierarchy={hierarchy}
|
|
217
|
-
permissions={rolePermissions}
|
|
218
|
-
allPermissions={allPermissions}
|
|
219
|
-
permissionsData={permissions}
|
|
220
|
-
/>
|
|
221
|
-
</CardContent>
|
|
222
|
-
</Card>
|
|
223
|
-
|
|
224
|
-
{/* RBAC Legend */}
|
|
225
|
-
<Card className="bg-muted/30">
|
|
226
|
-
<CardHeader className="pb-2">
|
|
227
|
-
<CardTitle className="text-sm">Legend</CardTitle>
|
|
228
|
-
</CardHeader>
|
|
229
|
-
<CardContent>
|
|
230
|
-
<div className="flex flex-wrap gap-6 text-sm">
|
|
231
|
-
<div className="flex items-center gap-2">
|
|
232
|
-
<Badge variant="destructive">100</Badge>
|
|
233
|
-
<span className="text-muted-foreground">Owner (protected)</span>
|
|
234
|
-
</div>
|
|
235
|
-
<div className="flex items-center gap-2">
|
|
236
|
-
<Badge variant="default">50</Badge>
|
|
237
|
-
<span className="text-muted-foreground">Admin</span>
|
|
238
|
-
</div>
|
|
239
|
-
<div className="flex items-center gap-2">
|
|
240
|
-
<Badge variant="secondary">10</Badge>
|
|
241
|
-
<span className="text-muted-foreground">Member</span>
|
|
242
|
-
</div>
|
|
243
|
-
<div className="flex items-center gap-2">
|
|
244
|
-
<Badge variant="outline">1</Badge>
|
|
245
|
-
<span className="text-muted-foreground">Viewer</span>
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
</CardContent>
|
|
249
|
-
</Card>
|
|
250
|
-
|
|
251
|
-
{/* RBAC Source Info */}
|
|
252
|
-
<Card className="bg-muted/30">
|
|
253
|
-
<CardContent className="pt-4">
|
|
254
|
-
<div className="text-xs text-muted-foreground space-y-1">
|
|
255
|
-
<p>
|
|
256
|
-
<strong>Source:</strong> Pre-computed permissions registry (build-time)
|
|
257
|
-
</p>
|
|
258
|
-
<p>
|
|
259
|
-
<strong>Roles config:</strong>{" "}
|
|
260
|
-
<code className="bg-background px-1 rounded">
|
|
261
|
-
APP_CONFIG_MERGED.teamRoles
|
|
262
|
-
</code>
|
|
263
|
-
</p>
|
|
264
|
-
<p>
|
|
265
|
-
<strong>Permissions registry:</strong>{" "}
|
|
266
|
-
<code className="bg-background px-1 rounded">
|
|
267
|
-
core/lib/registries/permissions-registry.ts
|
|
268
|
-
</code>
|
|
269
|
-
</p>
|
|
270
|
-
<p>
|
|
271
|
-
<strong>Generated at:</strong>{" "}
|
|
272
|
-
{PERMISSIONS_METADATA.generatedAt}
|
|
273
|
-
</p>
|
|
274
|
-
</div>
|
|
275
|
-
</CardContent>
|
|
276
|
-
</Card>
|
|
277
|
-
</TabsContent>
|
|
278
|
-
|
|
279
|
-
{/* Plan Features Tab */}
|
|
280
|
-
<TabsContent value="plans" className="space-y-6">
|
|
281
|
-
{/* Billing Stats Overview */}
|
|
282
|
-
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
|
|
283
|
-
<Card>
|
|
284
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
285
|
-
<CardTitle className="text-sm font-medium">Total Plans</CardTitle>
|
|
286
|
-
<Layers className="h-4 w-4 text-muted-foreground" />
|
|
287
|
-
</CardHeader>
|
|
288
|
-
<CardContent>
|
|
289
|
-
<div className="text-2xl font-bold">{billingData.metadata.totalPlans}</div>
|
|
290
|
-
<p className="text-xs text-muted-foreground">
|
|
291
|
-
{billingData.metadata.publicPlans} public
|
|
292
|
-
</p>
|
|
293
|
-
</CardContent>
|
|
294
|
-
</Card>
|
|
295
|
-
|
|
296
|
-
<Card>
|
|
297
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
298
|
-
<CardTitle className="text-sm font-medium">Features</CardTitle>
|
|
299
|
-
<Zap className="h-4 w-4 text-muted-foreground" />
|
|
300
|
-
</CardHeader>
|
|
301
|
-
<CardContent>
|
|
302
|
-
<div className="text-2xl font-bold">{billingData.metadata.totalFeatures}</div>
|
|
303
|
-
<p className="text-xs text-muted-foreground">Defined features</p>
|
|
304
|
-
</CardContent>
|
|
305
|
-
</Card>
|
|
306
|
-
|
|
307
|
-
<Card>
|
|
308
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
309
|
-
<CardTitle className="text-sm font-medium">Limits</CardTitle>
|
|
310
|
-
<Shield className="h-4 w-4 text-muted-foreground" />
|
|
311
|
-
</CardHeader>
|
|
312
|
-
<CardContent>
|
|
313
|
-
<div className="text-2xl font-bold">{billingData.metadata.totalLimits}</div>
|
|
314
|
-
<p className="text-xs text-muted-foreground">Quota types</p>
|
|
315
|
-
</CardContent>
|
|
316
|
-
</Card>
|
|
317
|
-
|
|
318
|
-
<Card>
|
|
319
|
-
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
|
320
|
-
<CardTitle className="text-sm font-medium">Theme</CardTitle>
|
|
321
|
-
<CreditCard className="h-4 w-4 text-muted-foreground" />
|
|
322
|
-
</CardHeader>
|
|
323
|
-
<CardContent>
|
|
324
|
-
<div className="text-2xl font-bold capitalize">{billingData.metadata.theme}</div>
|
|
325
|
-
<p className="text-xs text-muted-foreground">Active theme</p>
|
|
326
|
-
</CardContent>
|
|
327
|
-
</Card>
|
|
328
|
-
</div>
|
|
329
|
-
|
|
330
|
-
{/* Plan Cards Overview */}
|
|
331
|
-
<Card>
|
|
332
|
-
<CardHeader>
|
|
333
|
-
<CardTitle className="flex items-center gap-2">
|
|
334
|
-
<CreditCard className="h-5 w-5" />
|
|
335
|
-
Available Plans
|
|
336
|
-
</CardTitle>
|
|
337
|
-
<CardDescription>
|
|
338
|
-
Billing plans with their pricing and trial periods.
|
|
339
|
-
</CardDescription>
|
|
340
|
-
</CardHeader>
|
|
341
|
-
<CardContent>
|
|
342
|
-
<div className="flex flex-wrap gap-3">
|
|
343
|
-
{billingData.plans.map((plan) => (
|
|
344
|
-
<div
|
|
345
|
-
key={plan.slug}
|
|
346
|
-
className="flex items-center gap-3 px-4 py-2 rounded-lg border bg-card"
|
|
347
|
-
data-cy={`plan-card-${plan.slug}`}
|
|
348
|
-
>
|
|
349
|
-
<Badge
|
|
350
|
-
variant={
|
|
351
|
-
plan.type === "enterprise"
|
|
352
|
-
? "destructive"
|
|
353
|
-
: plan.type === "paid"
|
|
354
|
-
? "default"
|
|
355
|
-
: "secondary"
|
|
356
|
-
}
|
|
357
|
-
className="font-semibold capitalize"
|
|
358
|
-
>
|
|
359
|
-
{plan.type}
|
|
360
|
-
</Badge>
|
|
361
|
-
<div>
|
|
362
|
-
<div className="font-medium capitalize">{plan.slug}</div>
|
|
363
|
-
<div className="text-xs text-muted-foreground">
|
|
364
|
-
{plan.type === "free"
|
|
365
|
-
? "Free forever"
|
|
366
|
-
: plan.type === "enterprise"
|
|
367
|
-
? "Custom pricing"
|
|
368
|
-
: plan.price
|
|
369
|
-
? `$${(plan.price.monthly / 100).toFixed(0)}/mo`
|
|
370
|
-
: "Contact sales"}
|
|
371
|
-
{plan.trialDays && plan.trialDays > 0 && (
|
|
372
|
-
<span className="ml-1 text-green-600">
|
|
373
|
-
({plan.trialDays}d trial)
|
|
374
|
-
</span>
|
|
375
|
-
)}
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
{plan.visibility === "hidden" && (
|
|
379
|
-
<Badge variant="outline" className="text-[9px]">
|
|
380
|
-
hidden
|
|
381
|
-
</Badge>
|
|
382
|
-
)}
|
|
383
|
-
</div>
|
|
384
|
-
))}
|
|
385
|
-
</div>
|
|
386
|
-
</CardContent>
|
|
387
|
-
</Card>
|
|
388
|
-
|
|
389
|
-
{/* Plan Features Matrix */}
|
|
390
|
-
<Card>
|
|
391
|
-
<CardHeader>
|
|
392
|
-
<CardTitle>Features & Limits Matrix</CardTitle>
|
|
393
|
-
<CardDescription>
|
|
394
|
-
Complete view of features and quotas included in each plan.
|
|
395
|
-
</CardDescription>
|
|
396
|
-
</CardHeader>
|
|
397
|
-
<CardContent>
|
|
398
|
-
<PlanFeaturesMatrix
|
|
399
|
-
plans={billingData.plans}
|
|
400
|
-
features={billingData.features}
|
|
401
|
-
limits={billingData.limits}
|
|
402
|
-
matrix={billingData.matrix}
|
|
403
|
-
/>
|
|
404
|
-
</CardContent>
|
|
405
|
-
</Card>
|
|
406
|
-
|
|
407
|
-
{/* Plan Legend */}
|
|
408
|
-
<Card className="bg-muted/30">
|
|
409
|
-
<CardHeader className="pb-2">
|
|
410
|
-
<CardTitle className="text-sm">Legend</CardTitle>
|
|
411
|
-
</CardHeader>
|
|
412
|
-
<CardContent>
|
|
413
|
-
<div className="flex flex-wrap gap-6 text-sm">
|
|
414
|
-
<div className="flex items-center gap-2">
|
|
415
|
-
<Badge variant="secondary">free</Badge>
|
|
416
|
-
<span className="text-muted-foreground">Free tier</span>
|
|
417
|
-
</div>
|
|
418
|
-
<div className="flex items-center gap-2">
|
|
419
|
-
<Badge variant="default">paid</Badge>
|
|
420
|
-
<span className="text-muted-foreground">Subscription plan</span>
|
|
421
|
-
</div>
|
|
422
|
-
<div className="flex items-center gap-2">
|
|
423
|
-
<Badge variant="destructive">enterprise</Badge>
|
|
424
|
-
<span className="text-muted-foreground">Custom/unlimited</span>
|
|
425
|
-
</div>
|
|
426
|
-
<div className="flex items-center gap-2">
|
|
427
|
-
<Badge variant="outline">monthly</Badge>
|
|
428
|
-
<span className="text-muted-foreground">Resets monthly</span>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
</CardContent>
|
|
432
|
-
</Card>
|
|
433
|
-
|
|
434
|
-
{/* Billing Source Info */}
|
|
435
|
-
<Card className="bg-muted/30">
|
|
436
|
-
<CardContent className="pt-4">
|
|
437
|
-
<div className="text-xs text-muted-foreground space-y-1">
|
|
438
|
-
<p>
|
|
439
|
-
<strong>Source:</strong> Pre-computed billing registry (module load)
|
|
440
|
-
</p>
|
|
441
|
-
<p>
|
|
442
|
-
<strong>Billing config:</strong>{" "}
|
|
443
|
-
<code className="bg-background px-1 rounded">
|
|
444
|
-
contents/themes/{billingData.metadata.theme}/billing/billing.config.ts
|
|
445
|
-
</code>
|
|
446
|
-
</p>
|
|
447
|
-
<p>
|
|
448
|
-
<strong>Billing registry:</strong>{" "}
|
|
449
|
-
<code className="bg-background px-1 rounded">
|
|
450
|
-
core/lib/registries/billing-registry.ts
|
|
451
|
-
</code>
|
|
452
|
-
</p>
|
|
453
|
-
</div>
|
|
454
|
-
</CardContent>
|
|
455
|
-
</Card>
|
|
456
|
-
</TabsContent>
|
|
457
|
-
</Tabs>
|
|
458
|
-
|
|
459
|
-
{/* Three-Layer Model Info */}
|
|
460
|
-
<Card className="border-blue-200 bg-blue-50/30">
|
|
461
|
-
<CardHeader className="pb-2">
|
|
462
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
463
|
-
<Shield className="h-4 w-4 text-blue-600" />
|
|
464
|
-
Three-Layer Permission Model
|
|
465
|
-
</CardTitle>
|
|
466
|
-
</CardHeader>
|
|
467
|
-
<CardContent>
|
|
468
|
-
<div className="text-sm text-muted-foreground">
|
|
469
|
-
<p className="font-mono bg-background px-2 py-1 rounded inline-block mb-2">
|
|
470
|
-
RESULT = Permission (RBAC) AND Feature (Plan) AND Quota (Limits)
|
|
471
|
-
</p>
|
|
472
|
-
<ul className="list-disc list-inside space-y-1 mt-2">
|
|
473
|
-
<li>
|
|
474
|
-
<strong>Layer 1 - Permission (RBAC):</strong> Does the user's role allow this action?
|
|
475
|
-
</li>
|
|
476
|
-
<li>
|
|
477
|
-
<strong>Layer 2 - Feature (Plan):</strong> Does the subscription plan include this feature?
|
|
478
|
-
</li>
|
|
479
|
-
<li>
|
|
480
|
-
<strong>Layer 3 - Quota (Limits):</strong> Is there available quota for this action?
|
|
481
|
-
</li>
|
|
482
|
-
</ul>
|
|
483
|
-
</div>
|
|
484
|
-
</CardContent>
|
|
485
|
-
</Card>
|
|
486
|
-
</div>
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
export default getTemplateOrDefaultClient(
|
|
491
|
-
"app/superadmin/team-roles/page.tsx",
|
|
492
|
-
TeamRolesPage
|
|
493
|
-
);
|