@nextsparkjs/theme-default 0.1.0-beta.1
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/about/business.md +49 -0
- package/about/features.json +302 -0
- package/about/team.md +79 -0
- package/api/ai/chat/stream/route.ts +212 -0
- package/api/ai/orchestrator/route.ts +226 -0
- package/api/ai/single-agent/route.ts +291 -0
- package/api/ai/usage/route.ts +122 -0
- package/blocks/benefits/component.tsx +100 -0
- package/blocks/benefits/config.ts +11 -0
- package/blocks/benefits/examples.ts +85 -0
- package/blocks/benefits/fields.ts +156 -0
- package/blocks/benefits/schema.ts +33 -0
- package/blocks/cta-section/component.tsx +100 -0
- package/blocks/cta-section/config.ts +11 -0
- package/blocks/cta-section/examples.ts +41 -0
- package/blocks/cta-section/fields.ts +89 -0
- package/blocks/cta-section/index.ts +6 -0
- package/blocks/cta-section/schema.ts +32 -0
- package/blocks/cta-section/thumbnail.png +1 -0
- package/blocks/faq-accordion/component.tsx +156 -0
- package/blocks/faq-accordion/config.ts +11 -0
- package/blocks/faq-accordion/examples.ts +77 -0
- package/blocks/faq-accordion/fields.ts +119 -0
- package/blocks/faq-accordion/index.ts +6 -0
- package/blocks/faq-accordion/schema.ts +45 -0
- package/blocks/features-grid/component.tsx +112 -0
- package/blocks/features-grid/config.ts +11 -0
- package/blocks/features-grid/examples.ts +63 -0
- package/blocks/features-grid/fields.ts +97 -0
- package/blocks/features-grid/index.ts +6 -0
- package/blocks/features-grid/schema.ts +40 -0
- package/blocks/features-grid/thumbnail.png +1 -0
- package/blocks/hero/component.tsx +100 -0
- package/blocks/hero/config.ts +11 -0
- package/blocks/hero/examples.ts +35 -0
- package/blocks/hero/fields.ts +60 -0
- package/blocks/hero/index.ts +6 -0
- package/blocks/hero/schema.ts +32 -0
- package/blocks/hero/thumbnail.png +1 -0
- package/blocks/hero/thumbnail.png.txt +6 -0
- package/blocks/hero-with-form/component.tsx +232 -0
- package/blocks/hero-with-form/config.ts +11 -0
- package/blocks/hero-with-form/examples.ts +16 -0
- package/blocks/hero-with-form/fields.ts +207 -0
- package/blocks/hero-with-form/index.ts +6 -0
- package/blocks/hero-with-form/schema.ts +54 -0
- package/blocks/jumbotron/component.tsx +136 -0
- package/blocks/jumbotron/config.ts +11 -0
- package/blocks/jumbotron/examples.ts +36 -0
- package/blocks/jumbotron/fields.ts +202 -0
- package/blocks/jumbotron/index.ts +6 -0
- package/blocks/jumbotron/schema.ts +55 -0
- package/blocks/logo-cloud/component.tsx +154 -0
- package/blocks/logo-cloud/config.ts +11 -0
- package/blocks/logo-cloud/examples.ts +34 -0
- package/blocks/logo-cloud/fields.ts +133 -0
- package/blocks/logo-cloud/index.ts +6 -0
- package/blocks/logo-cloud/schema.ts +46 -0
- package/blocks/post-content/component.tsx +197 -0
- package/blocks/post-content/config.ts +11 -0
- package/blocks/post-content/examples.ts +33 -0
- package/blocks/post-content/fields.ts +165 -0
- package/blocks/post-content/index.ts +4 -0
- package/blocks/post-content/schema.ts +46 -0
- package/blocks/pricing-table/component.tsx +154 -0
- package/blocks/pricing-table/config.ts +11 -0
- package/blocks/pricing-table/examples.ts +96 -0
- package/blocks/pricing-table/fields.ts +161 -0
- package/blocks/pricing-table/index.ts +4 -0
- package/blocks/pricing-table/schema.ts +50 -0
- package/blocks/split-content/component.tsx +135 -0
- package/blocks/split-content/config.ts +11 -0
- package/blocks/split-content/examples.ts +38 -0
- package/blocks/split-content/fields.ts +198 -0
- package/blocks/split-content/index.ts +6 -0
- package/blocks/split-content/schema.ts +67 -0
- package/blocks/stats-counter/component.tsx +124 -0
- package/blocks/stats-counter/config.ts +11 -0
- package/blocks/stats-counter/examples.ts +61 -0
- package/blocks/stats-counter/fields.ts +134 -0
- package/blocks/stats-counter/index.ts +6 -0
- package/blocks/stats-counter/schema.ts +47 -0
- package/blocks/testimonials/component.tsx +114 -0
- package/blocks/testimonials/config.ts +11 -0
- package/blocks/testimonials/examples.ts +65 -0
- package/blocks/testimonials/fields.ts +105 -0
- package/blocks/testimonials/index.ts +6 -0
- package/blocks/testimonials/schema.ts +41 -0
- package/blocks/testimonials/thumbnail.png +1 -0
- package/blocks/text-content/component.tsx +97 -0
- package/blocks/text-content/config.ts +11 -0
- package/blocks/text-content/examples.ts +30 -0
- package/blocks/text-content/fields.ts +88 -0
- package/blocks/text-content/index.ts +6 -0
- package/blocks/text-content/schema.ts +30 -0
- package/blocks/text-content/thumbnail.png +1 -0
- package/blocks/timeline/component.tsx +267 -0
- package/blocks/timeline/config.ts +11 -0
- package/blocks/timeline/examples.ts +68 -0
- package/blocks/timeline/fields.ts +147 -0
- package/blocks/timeline/index.ts +6 -0
- package/blocks/timeline/schema.ts +49 -0
- package/blocks/video-hero/component.tsx +270 -0
- package/blocks/video-hero/config.ts +11 -0
- package/blocks/video-hero/examples.ts +24 -0
- package/blocks/video-hero/fields.ts +98 -0
- package/blocks/video-hero/index.ts +6 -0
- package/blocks/video-hero/schema.ts +39 -0
- package/components/ai-chat/ChatPanel.tsx +575 -0
- package/components/ai-chat/ConversationItem.tsx +266 -0
- package/components/ai-chat/ConversationSidebar.tsx +99 -0
- package/components/ai-chat/MarkdownRenderer.tsx +15 -0
- package/components/ai-chat/Message.tsx +42 -0
- package/components/ai-chat/MessageInput.tsx +49 -0
- package/components/ai-chat/MessageList.tsx +46 -0
- package/components/ai-chat/TypingIndicator.tsx +11 -0
- package/config/app.config.ts +367 -0
- package/config/billing.config.ts +349 -0
- package/config/dashboard.config.ts +506 -0
- package/config/dev.config.ts +104 -0
- package/config/features.config.ts +203 -0
- package/config/flows.config.ts +129 -0
- package/config/permissions.config.ts +245 -0
- package/config/theme.config.ts +74 -0
- package/docs/01-overview/01-introduction.md +335 -0
- package/docs/01-overview/02-customization.md +671 -0
- package/docs/02-features/01-components.md +155 -0
- package/docs/02-features/02-styling.md +139 -0
- package/docs/02-features/03-tasks-entity.md +407 -0
- package/docs/03-ai/01-overview.md +211 -0
- package/docs/03-ai/02-customization.md +436 -0
- package/entities/customers/customers.config.ts +75 -0
- package/entities/customers/customers.fields.ts +165 -0
- package/entities/customers/customers.service.ts +516 -0
- package/entities/customers/customers.types.ts +83 -0
- package/entities/customers/messages/en.json +66 -0
- package/entities/customers/messages/es.json +66 -0
- package/entities/customers/migrations/001_customers_table.sql +102 -0
- package/entities/customers/migrations/002_customers_metas.sql +92 -0
- package/entities/pages/messages/en.json +41 -0
- package/entities/pages/messages/es.json +41 -0
- package/entities/pages/migrations/001_pages_table.sql +112 -0
- package/entities/pages/migrations/002_pages_metas.sql +56 -0
- package/entities/pages/migrations/003_add_status.sql +50 -0
- package/entities/pages/pages-management.service.ts +610 -0
- package/entities/pages/pages.config.ts +94 -0
- package/entities/pages/pages.fields.ts +101 -0
- package/entities/pages/pages.service.ts +290 -0
- package/entities/pages/pages.types.ts +124 -0
- package/entities/posts/components/post-header.tsx +97 -0
- package/entities/posts/messages/en.json +55 -0
- package/entities/posts/messages/es.json +55 -0
- package/entities/posts/migrations/001_posts_table.sql +115 -0
- package/entities/posts/migrations/003_add_status.sql +44 -0
- package/entities/posts/migrations/004_entity_taxonomy_relations.sql +129 -0
- package/entities/posts/migrations/006_posts_metas.sql +56 -0
- package/entities/posts/posts.config.ts +101 -0
- package/entities/posts/posts.fields.ts +116 -0
- package/entities/posts/posts.service.ts +376 -0
- package/entities/posts/posts.types.ts +74 -0
- package/entities/tasks/messages/en.json +204 -0
- package/entities/tasks/messages/es.json +204 -0
- package/entities/tasks/migrations/001_tasks_table.sql +105 -0
- package/entities/tasks/migrations/002_task_metas.sql +85 -0
- package/entities/tasks/migrations/sample_data.json +77 -0
- package/entities/tasks/tasks.config.ts +79 -0
- package/entities/tasks/tasks.fields.ts +196 -0
- package/entities/tasks/tasks.service.ts +541 -0
- package/entities/tasks/tasks.types.ts +56 -0
- package/lib/hooks/useAiChat.ts +114 -0
- package/lib/hooks/useConversations.ts +376 -0
- package/lib/hooks/useOrchestratorChat.ts +122 -0
- package/lib/hooks/usePersistentChat.ts +315 -0
- package/lib/hooks/useStreamingChat.ts +127 -0
- package/lib/hooks/useTokenUsage.ts +63 -0
- package/lib/langchain/agents/customer-assistant.md +69 -0
- package/lib/langchain/agents/index.ts +61 -0
- package/lib/langchain/agents/orchestrator.md +59 -0
- package/lib/langchain/agents/page-assistant.md +85 -0
- package/lib/langchain/agents/single-agent.md +46 -0
- package/lib/langchain/agents/task-assistant.md +55 -0
- package/lib/langchain/config.ts +45 -0
- package/lib/langchain/handlers/customer-handler.ts +338 -0
- package/lib/langchain/handlers/page-handler.ts +232 -0
- package/lib/langchain/handlers/task-handler.ts +323 -0
- package/lib/langchain/langchain.config.ts +223 -0
- package/lib/langchain/observability.config.ts +30 -0
- package/lib/langchain/orchestrator.ts +562 -0
- package/lib/langchain/tools/customers.ts +176 -0
- package/lib/langchain/tools/index.ts +10 -0
- package/lib/langchain/tools/orchestrator.ts +92 -0
- package/lib/langchain/tools/pages.ts +289 -0
- package/lib/langchain/tools/tasks.ts +167 -0
- package/lib/scheduled-actions/billing.ts +149 -0
- package/lib/scheduled-actions/index.ts +170 -0
- package/lib/scheduled-actions/webhook.ts +231 -0
- package/lib/selectors.ts +197 -0
- package/messages/de/admin.json +219 -0
- package/messages/de/aiUsage.json +36 -0
- package/messages/de/buttons.json +19 -0
- package/messages/de/categories.json +35 -0
- package/messages/de/common.json +16 -0
- package/messages/de/dev.json +101 -0
- package/messages/de/docs.json +27 -0
- package/messages/de/entities.json +7 -0
- package/messages/de/features.json +119 -0
- package/messages/de/footer.json +22 -0
- package/messages/de/home.json +57 -0
- package/messages/de/index.ts +39 -0
- package/messages/de/mobileNav.json +13 -0
- package/messages/de/navigation.json +8 -0
- package/messages/de/observability.json +74 -0
- package/messages/de/posts.json +54 -0
- package/messages/de/pricing.json +102 -0
- package/messages/de/support.json +9 -0
- package/messages/de/teams.json +8 -0
- package/messages/en/admin.json +219 -0
- package/messages/en/aiUsage.json +36 -0
- package/messages/en/buttons.json +19 -0
- package/messages/en/categories.json +35 -0
- package/messages/en/common.json +16 -0
- package/messages/en/dev.json +106 -0
- package/messages/en/docs.json +27 -0
- package/messages/en/entities.json +7 -0
- package/messages/en/features.json +119 -0
- package/messages/en/footer.json +22 -0
- package/messages/en/home.json +57 -0
- package/messages/en/index.ts +39 -0
- package/messages/en/mobileNav.json +13 -0
- package/messages/en/navigation.json +8 -0
- package/messages/en/observability.json +74 -0
- package/messages/en/posts.json +54 -0
- package/messages/en/pricing.json +102 -0
- package/messages/en/support.json +9 -0
- package/messages/en/teams.json +8 -0
- package/messages/es/admin.json +219 -0
- package/messages/es/aiUsage.json +36 -0
- package/messages/es/buttons.json +19 -0
- package/messages/es/categories.json +35 -0
- package/messages/es/common.json +16 -0
- package/messages/es/dev.json +101 -0
- package/messages/es/docs.json +27 -0
- package/messages/es/entities.json +7 -0
- package/messages/es/features.json +119 -0
- package/messages/es/footer.json +22 -0
- package/messages/es/home.json +57 -0
- package/messages/es/index.ts +39 -0
- package/messages/es/mobileNav.json +13 -0
- package/messages/es/navigation.json +8 -0
- package/messages/es/observability.json +74 -0
- package/messages/es/posts.json +54 -0
- package/messages/es/pricing.json +102 -0
- package/messages/es/support.json +9 -0
- package/messages/es/teams.json +8 -0
- package/messages/fr/admin.json +219 -0
- package/messages/fr/aiUsage.json +36 -0
- package/messages/fr/buttons.json +19 -0
- package/messages/fr/categories.json +35 -0
- package/messages/fr/common.json +16 -0
- package/messages/fr/dev.json +101 -0
- package/messages/fr/docs.json +27 -0
- package/messages/fr/entities.json +7 -0
- package/messages/fr/features.json +119 -0
- package/messages/fr/footer.json +22 -0
- package/messages/fr/home.json +57 -0
- package/messages/fr/index.ts +39 -0
- package/messages/fr/mobileNav.json +13 -0
- package/messages/fr/navigation.json +8 -0
- package/messages/fr/observability.json +74 -0
- package/messages/fr/posts.json +54 -0
- package/messages/fr/pricing.json +102 -0
- package/messages/fr/support.json +9 -0
- package/messages/fr/teams.json +8 -0
- package/messages/it/admin.json +219 -0
- package/messages/it/aiUsage.json +36 -0
- package/messages/it/buttons.json +19 -0
- package/messages/it/categories.json +35 -0
- package/messages/it/common.json +16 -0
- package/messages/it/dev.json +101 -0
- package/messages/it/docs.json +27 -0
- package/messages/it/entities.json +7 -0
- package/messages/it/features.json +119 -0
- package/messages/it/footer.json +22 -0
- package/messages/it/home.json +57 -0
- package/messages/it/index.ts +39 -0
- package/messages/it/mobileNav.json +13 -0
- package/messages/it/navigation.json +8 -0
- package/messages/it/observability.json +74 -0
- package/messages/it/posts.json +54 -0
- package/messages/it/pricing.json +102 -0
- package/messages/it/support.json +9 -0
- package/messages/it/teams.json +8 -0
- package/messages/pt/admin.json +219 -0
- package/messages/pt/aiUsage.json +36 -0
- package/messages/pt/buttons.json +19 -0
- package/messages/pt/categories.json +35 -0
- package/messages/pt/common.json +16 -0
- package/messages/pt/dev.json +101 -0
- package/messages/pt/docs.json +27 -0
- package/messages/pt/entities.json +7 -0
- package/messages/pt/features.json +119 -0
- package/messages/pt/footer.json +22 -0
- package/messages/pt/home.json +57 -0
- package/messages/pt/index.ts +39 -0
- package/messages/pt/mobileNav.json +13 -0
- package/messages/pt/navigation.json +8 -0
- package/messages/pt/observability.json +74 -0
- package/messages/pt/posts.json +54 -0
- package/messages/pt/pricing.json +102 -0
- package/messages/pt/support.json +9 -0
- package/messages/pt/teams.json +8 -0
- package/migrations/089_add_editor_team_role.sql +39 -0
- package/migrations/090_demo_users_teams.sql +540 -0
- package/migrations/091_greek_teams_billing.sql +523 -0
- package/migrations/092_billing_sample_data.sql +774 -0
- package/migrations/093_pages_sample_data.sql +1158 -0
- package/migrations/094_posts_sample_data.sql +278 -0
- package/migrations/095_tasks_sample_data.sql +440 -0
- package/migrations/096_customers_sample_data.sql +358 -0
- package/migrations/097_scheduled_actions_sample_data.sql +111 -0
- package/package.json +22 -0
- package/public/docs/desktop-layout-example.png +0 -0
- package/styles/components.css +11 -0
- package/styles/globals.css +179 -0
- package/templates/(public)/blog/[slug]/page.tsx +65 -0
- package/templates/(public)/layout.tsx +25 -0
- package/templates/(public)/page.tsx +200 -0
- package/templates/(public)/support/page.tsx +321 -0
- package/templates/dashboard/(main)/agent-multi/page.tsx +63 -0
- package/templates/dashboard/(main)/agent-single/page.tsx +142 -0
- package/templates/dashboard/(main)/settings/ai-usage/page.tsx +157 -0
- package/templates/superadmin/ai-observability/[traceId]/page.tsx +27 -0
- package/templates/superadmin/ai-observability/page.tsx +17 -0
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard-Specific Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file contains all configurable values specific to the dashboard interface.
|
|
5
|
+
* Separate from general app configuration to allow fine-grained control over
|
|
6
|
+
* dashboard features, layout, and behavior.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// DASHBOARD CONFIGURATION
|
|
11
|
+
// =============================================================================
|
|
12
|
+
|
|
13
|
+
export const DASHBOARD_CONFIG = {
|
|
14
|
+
// =============================================================================
|
|
15
|
+
// TOPBAR CONFIGURATION
|
|
16
|
+
// =============================================================================
|
|
17
|
+
topbar: {
|
|
18
|
+
/**
|
|
19
|
+
* Search functionality in the topbar
|
|
20
|
+
*/
|
|
21
|
+
search: {
|
|
22
|
+
enabled: true,
|
|
23
|
+
placeholder: 'dashboard.search.placeholder',
|
|
24
|
+
maxResults: 8,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Notifications dropdown
|
|
29
|
+
*/
|
|
30
|
+
notifications: {
|
|
31
|
+
enabled: true,
|
|
32
|
+
// maxVisible: 5,
|
|
33
|
+
// autoRefresh: true,
|
|
34
|
+
// refreshInterval: 30000, // 30 seconds
|
|
35
|
+
// showBadge: true,
|
|
36
|
+
// playSound: false,
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Theme mode toggle
|
|
41
|
+
*/
|
|
42
|
+
themeToggle: {
|
|
43
|
+
enabled: true,
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Support/Help button
|
|
48
|
+
*/
|
|
49
|
+
support: {
|
|
50
|
+
enabled: true,
|
|
51
|
+
type: 'dropdown', // 'dropdown' | 'link' | 'modal'
|
|
52
|
+
links: [
|
|
53
|
+
{
|
|
54
|
+
label: 'common.help.documentation',
|
|
55
|
+
url: '/docs',
|
|
56
|
+
icon: 'book-open',
|
|
57
|
+
external: false,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: 'common.help.support',
|
|
61
|
+
url: '/support',
|
|
62
|
+
icon: 'help-circle',
|
|
63
|
+
external: false,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: 'common.help.keyboard',
|
|
67
|
+
action: 'showKeyboardShortcuts',
|
|
68
|
+
icon: 'keyboard',
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Quick create dropdown
|
|
75
|
+
*/
|
|
76
|
+
quickCreate: {
|
|
77
|
+
enabled: true,
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Admin access button (Super Admin area)
|
|
82
|
+
* By default only visible to superadmins, but can be extended to developers
|
|
83
|
+
*/
|
|
84
|
+
adminAccess: {
|
|
85
|
+
enabled: true,
|
|
86
|
+
showToDevelopers: true,
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Dev Zone access button (Developer area)
|
|
91
|
+
* Only visible to users with developer role
|
|
92
|
+
*/
|
|
93
|
+
devtoolsAccess: {
|
|
94
|
+
enabled: true,
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* User menu dropdown
|
|
99
|
+
*/
|
|
100
|
+
userMenu: {
|
|
101
|
+
enabled: true,
|
|
102
|
+
showAvatar: true,
|
|
103
|
+
showEmail: true,
|
|
104
|
+
showRole: false, // User role no longer relevant - team roles are shown in TeamSwitcher
|
|
105
|
+
items: [
|
|
106
|
+
{ type: 'link', label: 'navigation.profile', href: '/dashboard/settings/profile', icon: 'user' },
|
|
107
|
+
{ type: 'link', label: 'navigation.settings', href: '/dashboard/settings', icon: 'settings' },
|
|
108
|
+
{ type: 'divider' },
|
|
109
|
+
{ type: 'action', label: 'buttons.signOut', action: 'signOut', icon: 'log-out' },
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
// =============================================================================
|
|
115
|
+
// SIDEBAR CONFIGURATION
|
|
116
|
+
// =============================================================================
|
|
117
|
+
sidebar: {
|
|
118
|
+
/**
|
|
119
|
+
* Default sidebar state
|
|
120
|
+
*/
|
|
121
|
+
defaultCollapsed: false,
|
|
122
|
+
rememberState: true,
|
|
123
|
+
collapsedWidth: '60px',
|
|
124
|
+
expandedWidth: '240px',
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Sidebar toggle behavior
|
|
128
|
+
*/
|
|
129
|
+
toggle: {
|
|
130
|
+
enabled: true,
|
|
131
|
+
showInTopbar: true,
|
|
132
|
+
hideOnMobile: false,
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Navigation structure
|
|
137
|
+
*/
|
|
138
|
+
navigation: {
|
|
139
|
+
showEntityCounts: true,
|
|
140
|
+
groupEntities: true,
|
|
141
|
+
showRecents: true,
|
|
142
|
+
maxRecents: 5,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
// =============================================================================
|
|
147
|
+
// SETTINGS PAGES CONFIGURATION
|
|
148
|
+
// =============================================================================
|
|
149
|
+
settings: {
|
|
150
|
+
/**
|
|
151
|
+
* Available settings pages
|
|
152
|
+
* Set enabled: false to hide a settings page
|
|
153
|
+
*/
|
|
154
|
+
pages: {
|
|
155
|
+
profile: {
|
|
156
|
+
enabled: true,
|
|
157
|
+
label: 'settings.pages.profile',
|
|
158
|
+
description: 'settings.pages.profileDescription',
|
|
159
|
+
icon: 'user',
|
|
160
|
+
order: 1,
|
|
161
|
+
features: {
|
|
162
|
+
avatarUpload: true,
|
|
163
|
+
nameChange: true,
|
|
164
|
+
emailChange: true,
|
|
165
|
+
localeChange: true,
|
|
166
|
+
timezoneChange: false,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
security: {
|
|
171
|
+
enabled: true,
|
|
172
|
+
label: 'settings.pages.security',
|
|
173
|
+
description: 'settings.pages.securityDescription',
|
|
174
|
+
icon: 'shield',
|
|
175
|
+
order: 2,
|
|
176
|
+
features: {
|
|
177
|
+
twoFactorAuth: true,
|
|
178
|
+
sessionManagement: true,
|
|
179
|
+
loginHistory: true,
|
|
180
|
+
securityQuestions: false,
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
password: {
|
|
185
|
+
enabled: true,
|
|
186
|
+
label: 'settings.pages.password',
|
|
187
|
+
description: 'settings.pages.passwordDescription',
|
|
188
|
+
icon: 'key',
|
|
189
|
+
order: 3,
|
|
190
|
+
features: {
|
|
191
|
+
passwordChange: true,
|
|
192
|
+
passwordStrength: true,
|
|
193
|
+
passwordHistory: false,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
notifications: {
|
|
198
|
+
enabled: true,
|
|
199
|
+
label: 'settings.pages.notifications',
|
|
200
|
+
description: 'settings.pages.notificationsDescription',
|
|
201
|
+
icon: 'bell',
|
|
202
|
+
order: 4,
|
|
203
|
+
features: {
|
|
204
|
+
emailNotifications: true,
|
|
205
|
+
pushNotifications: true,
|
|
206
|
+
smsNotifications: false,
|
|
207
|
+
notificationCategories: true,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
'api-keys': {
|
|
212
|
+
enabled: true,
|
|
213
|
+
label: 'settings.pages.apiKeys',
|
|
214
|
+
description: 'settings.pages.apiKeysDescription',
|
|
215
|
+
icon: 'key',
|
|
216
|
+
order: 5,
|
|
217
|
+
features: {
|
|
218
|
+
createKeys: true,
|
|
219
|
+
revokeKeys: true,
|
|
220
|
+
scopeManagement: true,
|
|
221
|
+
usageAnalytics: true,
|
|
222
|
+
},
|
|
223
|
+
requiredRole: 'colaborator', // Minimum role required to access
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
billing: {
|
|
227
|
+
enabled: true,
|
|
228
|
+
label: 'settings.pages.billing',
|
|
229
|
+
description: 'settings.pages.billingDescription',
|
|
230
|
+
icon: 'credit-card',
|
|
231
|
+
order: 6,
|
|
232
|
+
features: {
|
|
233
|
+
subscriptionManagement: true,
|
|
234
|
+
paymentMethods: true,
|
|
235
|
+
invoiceHistory: true,
|
|
236
|
+
usageMetrics: true,
|
|
237
|
+
},
|
|
238
|
+
requiredRole: 'admin', // Only admins can manage billing
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
teams: {
|
|
242
|
+
enabled: true,
|
|
243
|
+
label: 'settings.pages.teams',
|
|
244
|
+
description: 'settings.pages.teamsDescription',
|
|
245
|
+
icon: 'users',
|
|
246
|
+
order: 7,
|
|
247
|
+
features: {
|
|
248
|
+
createTeams: true,
|
|
249
|
+
manageMembers: true,
|
|
250
|
+
inviteMembers: true,
|
|
251
|
+
teamSettings: true,
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Settings layout configuration
|
|
258
|
+
*/
|
|
259
|
+
layout: {
|
|
260
|
+
showDescription: true,
|
|
261
|
+
showIcons: true,
|
|
262
|
+
groupByCategory: false,
|
|
263
|
+
enableSearch: true,
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
// =============================================================================
|
|
268
|
+
// ENTITY PAGES CONFIGURATION
|
|
269
|
+
// =============================================================================
|
|
270
|
+
entities: {
|
|
271
|
+
/**
|
|
272
|
+
* Default list view configuration for all entities
|
|
273
|
+
*/
|
|
274
|
+
defaultListView: {
|
|
275
|
+
pagination: {
|
|
276
|
+
defaultPageSize: 20,
|
|
277
|
+
allowedPageSizes: [10, 20, 50, 100],
|
|
278
|
+
showSizeSelector: true,
|
|
279
|
+
},
|
|
280
|
+
sorting: {
|
|
281
|
+
enabled: true,
|
|
282
|
+
defaultSort: { field: 'createdAt', direction: 'desc' },
|
|
283
|
+
rememberSort: true,
|
|
284
|
+
},
|
|
285
|
+
filtering: {
|
|
286
|
+
enabled: true,
|
|
287
|
+
quickFilters: true,
|
|
288
|
+
advancedFilters: true,
|
|
289
|
+
rememberFilters: false,
|
|
290
|
+
},
|
|
291
|
+
search: {
|
|
292
|
+
enabled: true,
|
|
293
|
+
placeholder: 'dashboard.entities.searchPlaceholder',
|
|
294
|
+
searchableFields: ['name', 'title', 'description', 'email'],
|
|
295
|
+
instantSearch: true,
|
|
296
|
+
debounceMs: 300,
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Default form behavior for all entities
|
|
302
|
+
*/
|
|
303
|
+
defaultFormView: {
|
|
304
|
+
validation: {
|
|
305
|
+
validateOnBlur: true,
|
|
306
|
+
validateOnChange: false,
|
|
307
|
+
showFieldErrors: true,
|
|
308
|
+
showFormErrors: true,
|
|
309
|
+
},
|
|
310
|
+
autosave: {
|
|
311
|
+
enabled: false,
|
|
312
|
+
intervalMs: 30000,
|
|
313
|
+
showIndicator: true,
|
|
314
|
+
},
|
|
315
|
+
confirmation: {
|
|
316
|
+
showOnCreate: false,
|
|
317
|
+
showOnUpdate: true,
|
|
318
|
+
showOnDelete: true,
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Per-entity customizations
|
|
324
|
+
* Override default settings for specific entities
|
|
325
|
+
*/
|
|
326
|
+
customizations: {
|
|
327
|
+
tasks: {
|
|
328
|
+
listView: {
|
|
329
|
+
defaultSort: { field: 'priority', direction: 'desc' },
|
|
330
|
+
quickFilters: ['status', 'priority', 'assignee'],
|
|
331
|
+
},
|
|
332
|
+
formView: {
|
|
333
|
+
autosave: { enabled: true },
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
clients: {
|
|
337
|
+
listView: {
|
|
338
|
+
defaultSort: { field: 'name', direction: 'asc' },
|
|
339
|
+
searchableFields: ['name', 'email', 'company'],
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
// =============================================================================
|
|
346
|
+
// DASHBOARD HOMEPAGE CONFIGURATION
|
|
347
|
+
// =============================================================================
|
|
348
|
+
homepage: {
|
|
349
|
+
/**
|
|
350
|
+
* Widgets to show on dashboard homepage
|
|
351
|
+
*/
|
|
352
|
+
widgets: {
|
|
353
|
+
welcome: {
|
|
354
|
+
enabled: true,
|
|
355
|
+
showUserName: true,
|
|
356
|
+
showLastLogin: true,
|
|
357
|
+
showQuickActions: true,
|
|
358
|
+
},
|
|
359
|
+
|
|
360
|
+
stats: {
|
|
361
|
+
enabled: true,
|
|
362
|
+
entities: ['tasks', 'clients', 'products', 'orders'],
|
|
363
|
+
timeframe: '30days', // 'today' | '7days' | '30days' | '90days'
|
|
364
|
+
showTrends: true,
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
recentActivity: {
|
|
368
|
+
enabled: true,
|
|
369
|
+
maxItems: 10,
|
|
370
|
+
entities: ['tasks', 'clients', 'products', 'orders'],
|
|
371
|
+
showTimestamps: true,
|
|
372
|
+
},
|
|
373
|
+
|
|
374
|
+
quickActions: {
|
|
375
|
+
enabled: true,
|
|
376
|
+
actions: [
|
|
377
|
+
{ entity: 'tasks', action: 'create', label: 'dashboard.quickActions.createTask' },
|
|
378
|
+
{ entity: 'clients', action: 'create', label: 'dashboard.quickActions.createClient' },
|
|
379
|
+
{ entity: 'products', action: 'create', label: 'dashboard.quickActions.createProduct' },
|
|
380
|
+
],
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Layout configuration
|
|
386
|
+
*/
|
|
387
|
+
layout: {
|
|
388
|
+
columns: 3,
|
|
389
|
+
gutter: 'medium', // 'small' | 'medium' | 'large'
|
|
390
|
+
responsive: true,
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
// =============================================================================
|
|
395
|
+
// PERFORMANCE & BEHAVIOR
|
|
396
|
+
// =============================================================================
|
|
397
|
+
performance: {
|
|
398
|
+
/**
|
|
399
|
+
* Caching configuration
|
|
400
|
+
*/
|
|
401
|
+
cache: {
|
|
402
|
+
entityConfigs: {
|
|
403
|
+
enabled: true,
|
|
404
|
+
duration: 5 * 60 * 1000, // 5 minutes
|
|
405
|
+
},
|
|
406
|
+
entityData: {
|
|
407
|
+
enabled: true,
|
|
408
|
+
duration: 2 * 60 * 1000, // 2 minutes
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Loading states
|
|
414
|
+
*/
|
|
415
|
+
loading: {
|
|
416
|
+
showSkeletons: true,
|
|
417
|
+
showProgressBars: true,
|
|
418
|
+
minimumLoadingTime: 300, // Prevent flashing
|
|
419
|
+
},
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Error handling
|
|
423
|
+
*/
|
|
424
|
+
errors: {
|
|
425
|
+
showErrorBoundaries: true,
|
|
426
|
+
logErrors: true,
|
|
427
|
+
enableRetry: true,
|
|
428
|
+
maxRetries: 3,
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
// =============================================================================
|
|
433
|
+
// ACCESSIBILITY & UX
|
|
434
|
+
// =============================================================================
|
|
435
|
+
accessibility: {
|
|
436
|
+
/**
|
|
437
|
+
* Keyboard navigation
|
|
438
|
+
* @todo Shortcuts are not implemented yet
|
|
439
|
+
*/
|
|
440
|
+
keyboard: {
|
|
441
|
+
enabled: true,
|
|
442
|
+
showShortcuts: true,
|
|
443
|
+
customShortcuts: {
|
|
444
|
+
'Ctrl+K': 'openSearch',
|
|
445
|
+
'Ctrl+Shift+N': 'quickCreate',
|
|
446
|
+
'Ctrl+B': 'toggleSidebar',
|
|
447
|
+
'Esc': 'closeModals',
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Screen reader support
|
|
453
|
+
*/
|
|
454
|
+
screenReader: {
|
|
455
|
+
announceNavigation: true,
|
|
456
|
+
announceActions: true,
|
|
457
|
+
announceErrors: true,
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Visual indicators
|
|
462
|
+
*/
|
|
463
|
+
visual: {
|
|
464
|
+
showFocusOutlines: true,
|
|
465
|
+
highContrastMode: false,
|
|
466
|
+
reducedMotion: false,
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
} as const
|
|
470
|
+
|
|
471
|
+
// =============================================================================
|
|
472
|
+
// CONVENIENCE EXPORTS
|
|
473
|
+
// =============================================================================
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Quick access to common dashboard configuration values
|
|
477
|
+
*/
|
|
478
|
+
export const TOPBAR_CONFIG = DASHBOARD_CONFIG.topbar
|
|
479
|
+
export const SIDEBAR_CONFIG = DASHBOARD_CONFIG.sidebar
|
|
480
|
+
export const SETTINGS_CONFIG = DASHBOARD_CONFIG.settings
|
|
481
|
+
export const ENTITIES_CONFIG = DASHBOARD_CONFIG.entities
|
|
482
|
+
export const HOMEPAGE_CONFIG = DASHBOARD_CONFIG.homepage
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Helper to check if a settings page is enabled
|
|
486
|
+
*/
|
|
487
|
+
export const isSettingsPageEnabled = (pageKey: keyof typeof DASHBOARD_CONFIG.settings.pages): boolean => {
|
|
488
|
+
return DASHBOARD_CONFIG.settings.pages[pageKey]?.enabled ?? false
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Helper to get enabled settings pages sorted by order
|
|
493
|
+
*/
|
|
494
|
+
export const getEnabledSettingsPages = () => {
|
|
495
|
+
return Object.entries(DASHBOARD_CONFIG.settings.pages)
|
|
496
|
+
.filter(([_, config]) => config.enabled)
|
|
497
|
+
.sort((a, b) => a[1].order - b[1].order)
|
|
498
|
+
.map(([key, config]) => ({ key, ...config }))
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Helper to check if a topbar feature is enabled
|
|
503
|
+
*/
|
|
504
|
+
export const isTopbarFeatureEnabled = (feature: keyof typeof DASHBOARD_CONFIG.topbar): boolean => {
|
|
505
|
+
return DASHBOARD_CONFIG.topbar[feature]?.enabled ?? false
|
|
506
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Theme - Development Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file contains development-only settings that should never affect production.
|
|
5
|
+
* Settings like DevKeyring are only rendered in non-production environments.
|
|
6
|
+
*
|
|
7
|
+
* @see core/lib/config/types.ts for DevConfig interface
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { DevConfig } from '@nextsparkjs/core/lib/config/types'
|
|
11
|
+
|
|
12
|
+
export const DEV_CONFIG_OVERRIDES: DevConfig = {
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// DEV KEYRING (Development/QA Only)
|
|
15
|
+
// =============================================================================
|
|
16
|
+
/**
|
|
17
|
+
* DevKeyring - Quick login for Default theme (multi-tenant mode)
|
|
18
|
+
*
|
|
19
|
+
* CORE USERS (from core/migrations/090_sample_data.sql):
|
|
20
|
+
* - superadmin@nextspark.dev (superadmin role) - TMT team owner
|
|
21
|
+
* - developer@nextspark.dev (developer role) - TMT team admin
|
|
22
|
+
*
|
|
23
|
+
* DEMO USERS (from theme/migrations/090_demo_users_teams.sql):
|
|
24
|
+
* - Everpoint Labs (Technology) - Carlos (owner), James (admin), Diego & Emily (members)
|
|
25
|
+
* - Ironvale Global (Consulting) - Ana (owner), Sofia (admin), Michael (member), Sarah (viewer)
|
|
26
|
+
* - Riverstone Ventures (Investment) - Sofia (owner), Emily (admin), Carlos (member)
|
|
27
|
+
*/
|
|
28
|
+
devKeyring: {
|
|
29
|
+
enabled: true,
|
|
30
|
+
users: [
|
|
31
|
+
// ========================================
|
|
32
|
+
// DEMO USERS (TMT.dev)
|
|
33
|
+
// ========================================
|
|
34
|
+
{
|
|
35
|
+
id: 'carlos',
|
|
36
|
+
email: 'carlos.mendoza@nextspark.dev',
|
|
37
|
+
name: 'Carlos Mendoza',
|
|
38
|
+
password: 'Test1234',
|
|
39
|
+
teamRoles: 'Everpoint Labs (owner), Riverstone (member)',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'james',
|
|
43
|
+
email: 'james.wilson@nextspark.dev',
|
|
44
|
+
name: 'James Wilson',
|
|
45
|
+
password: 'Test1234',
|
|
46
|
+
teamRoles: 'Everpoint Labs (admin)',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: 'ana',
|
|
50
|
+
email: 'ana.garcia@nextspark.dev',
|
|
51
|
+
name: 'Ana García',
|
|
52
|
+
password: 'Test1234',
|
|
53
|
+
teamRoles: 'Ironvale Global (owner)',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 'sofia',
|
|
57
|
+
email: 'sofia.lopez@nextspark.dev',
|
|
58
|
+
name: 'Sofia López',
|
|
59
|
+
password: 'Test1234',
|
|
60
|
+
teamRoles: 'Riverstone (owner), Ironvale (admin)',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 'diego',
|
|
64
|
+
email: 'diego.ramirez@nextspark.dev',
|
|
65
|
+
name: 'Diego Ramírez',
|
|
66
|
+
password: 'Test1234',
|
|
67
|
+
teamRoles: 'Everpoint Labs (editor)',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: 'emily',
|
|
71
|
+
email: 'emily.johnson@nextspark.dev',
|
|
72
|
+
name: 'Emily Johnson',
|
|
73
|
+
password: 'Test1234',
|
|
74
|
+
teamRoles: 'Everpoint (member), Riverstone (admin)',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'sarah',
|
|
78
|
+
email: 'sarah.davis@nextspark.dev',
|
|
79
|
+
name: 'Sarah Davis',
|
|
80
|
+
password: 'Test1234',
|
|
81
|
+
teamRoles: 'Ironvale Global (viewer)',
|
|
82
|
+
},
|
|
83
|
+
// ========================================
|
|
84
|
+
// CORE USERS (superadmin & developer)
|
|
85
|
+
// ========================================
|
|
86
|
+
{
|
|
87
|
+
id: 'superadmin',
|
|
88
|
+
email: 'superadmin@nextspark.dev',
|
|
89
|
+
name: 'Super Admin',
|
|
90
|
+
password: 'Pandora1234',
|
|
91
|
+
teamRoles: 'TMT (owner) - SUPERADMIN ROLE',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'developer',
|
|
95
|
+
email: 'developer@nextspark.dev',
|
|
96
|
+
name: 'Developer',
|
|
97
|
+
password: 'Pandora1234',
|
|
98
|
+
teamRoles: 'TMT (admin) - DEVELOPER ROLE',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export default DEV_CONFIG_OVERRIDES
|