@svadmin/core 0.32.2 → 0.34.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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/src/i18n.svelte.ts +298 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/core",
3
- "version": "0.32.2",
3
+ "version": "0.34.0",
4
4
  "author": "zuohuadong",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,20 +9,20 @@
9
9
  },
10
10
  "main": "src/index.ts",
11
11
  "devDependencies": {
12
- "@happy-dom/global-registrator": "^20.11.0",
12
+ "@happy-dom/global-registrator": "^20.11.1",
13
13
  "@sveltejs/vite-plugin-svelte": "^7.2.0",
14
14
  "@testing-library/dom": "^10.4.1",
15
15
  "@testing-library/svelte": "^5.4.2",
16
16
  "@testing-library/user-event": "^14.6.1",
17
17
  "@types/bun": "^1.3.14",
18
18
  "@types/jsdom": "^28.0.3",
19
- "happy-dom": "^20.11.0",
20
- "jsdom": "^29.1.1",
21
- "vitest": "^4.1.8"
19
+ "happy-dom": "^20.11.1",
20
+ "jsdom": "^30.0.1",
21
+ "vitest": "^4.1.10"
22
22
  },
23
23
  "peerDependencies": {
24
- "svelte": "^5.0.0",
25
- "@tanstack/svelte-query": "^6.1.29"
24
+ "svelte": "^5.56.8",
25
+ "@tanstack/svelte-query": "^6.1.38"
26
26
  },
27
27
  "exports": {
28
28
  ".": {
@@ -17,6 +17,7 @@ const baseLocales: Record<string, Record<string, string>> = {
17
17
  'common.save': '保存',
18
18
  'common.cancel': '取消',
19
19
  'common.create': '新建',
20
+ 'common.progress': '进度',
20
21
  'common.edit': '编辑',
21
22
  'common.delete': '删除',
22
23
  'common.batchDeletePartialFail': '批量删除部分失败:{failed}/{total} 条未成功',
@@ -145,6 +146,7 @@ const baseLocales: Record<string, Record<string, string>> = {
145
146
  'devtools.title': '开发者工具 (Ctrl+Shift+D)',
146
147
  // Validation
147
148
  // Chat
149
+ 'chat.title': 'AI 助手',
148
150
  'chat.contextInfo': '当前上下文:{resource}',
149
151
  'chat.actionButton': '执行',
150
152
  'chat.historyRestored': '已恢复聊天记录',
@@ -481,6 +483,153 @@ const baseLocales: Record<string, Record<string, string>> = {
481
483
  'task.status.dead_lettered': '死信',
482
484
  'task.status.retry_scheduled': '等待重试',
483
485
  'task.status.leased': '已领取',
486
+ // Profile sections
487
+ 'profileSections.about': '关于',
488
+ 'profileSections.workExperience': '工作经历',
489
+ 'profileSections.skills': '技能',
490
+ 'profileSections.communityBadges': '社区徽章',
491
+ 'profileSections.recentUploads': '最近上传',
492
+ 'profileSections.contributors': '贡献者',
493
+ 'profileSections.projects': '项目',
494
+ 'profileSections.projectName': '项目名称',
495
+ 'profileSections.progress': '进度',
496
+ 'profileSections.people': '成员',
497
+ 'profileSections.dueDate': '截止日期',
498
+ 'profileSections.highlights': '亮点',
499
+ 'profileSections.openJobs': '在招职位',
500
+ 'profileSections.locations': '办公地点',
501
+ 'profileSections.members': '成员',
502
+ 'profileSections.investments': '投资动态',
503
+ 'profileSections.favoriteGames': '常玩游戏',
504
+ 'profileSections.tournaments': '锦标赛',
505
+ 'profileSections.nowPlaying': '正在玩',
506
+ 'profileSections.network': '人脉',
507
+ 'profileSections.viewAll': '查看全部',
508
+ 'profileSections.present': '至今',
509
+ // Account: user profile page
510
+ 'account.userProfile': '用户资料',
511
+ 'account.userProfileDescription': '集中管理个人信息、工作方式、徽章与常用文件。',
512
+ 'account.personalInfo': '个人信息',
513
+ 'account.work': '工作',
514
+ 'account.badges': '徽章',
515
+ 'account.connections': '连接',
516
+ 'account.myFiles': '我的文件',
517
+ 'account.calendarAccounts': '日历账户',
518
+ 'account.availableNow': '当前可接单',
519
+ // Account: settings shared
520
+ 'account.photo': '头像',
521
+ 'account.phone': '手机号码',
522
+ 'account.dateOfBirth': '出生日期',
523
+ 'account.bio': '个人简介',
524
+ 'account.address': '地址',
525
+ 'account.country': '国家/地区',
526
+ 'account.state': '省/州',
527
+ 'account.city': '城市',
528
+ 'account.postcode': '邮编',
529
+ 'account.password': '密码',
530
+ 'account.deleteAccount': '注销账户',
531
+ 'account.deleteAccountDescription': '永久删除账户及全部数据,此操作不可撤销。',
532
+ 'account.confirmDeleteAccount': '确认注销账户',
533
+ 'account.basicSettings': '基础设置',
534
+ 'account.visibility': '资料可见性',
535
+ 'account.availability': '接单状态',
536
+ 'account.availableToHire': '可接受合作',
537
+ 'account.socialSignIn': '社交账号登录',
538
+ 'account.twoFactorAuth': '两步验证 (2FA)',
539
+ 'account.singleSignOn': '单点登录 (SSO)',
540
+ 'account.preferences': '偏好设置',
541
+ 'account.language': '语言',
542
+ 'account.timezone': '时区',
543
+ 'account.currency': '货币',
544
+ 'account.manageApi': 'API 管理',
545
+ 'account.publicProfileCard': '公开资料',
546
+ 'account.branding': '品牌设置',
547
+ 'account.dataImport': '数据导入',
548
+ 'account.dataImportDescription': '从第三方分析平台导入历史数据。',
549
+ 'account.trustedDevices': '受信任设备',
550
+ 'account.currentPlan': '当前套餐',
551
+ 'account.paymentHistory': '支付记录',
552
+ 'account.date': '日期',
553
+ 'account.type': '类型',
554
+ 'account.amount': '金额',
555
+ 'account.invitePeople': '邀请成员',
556
+ 'account.inviteWithLink': '通过链接邀请',
557
+ 'account.copyLink': '复制链接',
558
+ 'account.sendInvite': '发送邀请',
559
+ // Notifications page sections
560
+ 'notifications.channels': '通知渠道',
561
+ 'notifications.teamWideAlerts': '团队广播',
562
+ 'notifications.otherNotifications': '其他通知',
563
+ 'notifications.doNotDisturb': '勿扰模式',
564
+ 'notifications.doNotDisturbDesc': '开启后暂停所有非关键通知。',
565
+ // API page sections
566
+ 'api.publicKey': '公开 API 密钥',
567
+ 'api.publicKeyDesc': '用于客户端集成的公开密钥,可随时重新生成。',
568
+ 'api.regenerate': '重新生成',
569
+ 'api.webhooks': 'Webhooks',
570
+ 'api.webhooksDesc': '配置事件回调地址,实时接收系统事件。',
571
+ 'api.webhookUrl': 'Webhook 地址',
572
+ 'api.addWebhook': '添加 Webhook',
573
+ // Integrations page
574
+ 'integrations.addNew': '添加新集成',
575
+ 'integrations.addNewDesc': '浏览集成目录,连接更多第三方服务。',
576
+ 'integrations.browse': '浏览目录',
577
+ // Appearance page
578
+ 'settings.transparentSidebar': '透明侧边栏',
579
+ 'settings.transparentSidebarDesc': '让侧边栏背景与页面内容融合。',
580
+ 'settings.branding': '品牌',
581
+ 'settings.disableDefaultBranding': '隐藏默认品牌标识',
582
+ // Profile grids
583
+ 'publicProfile.projectsCount': '{count} 个项目',
584
+ 'publicProfile.teamsCount': '{count} 个团队',
585
+ 'publicProfile.searchProjects': '搜索项目...',
586
+ 'publicProfile.searchTeams': '搜索团队...',
587
+ 'publicProfile.autoRefresh': '自动刷新',
588
+ 'publicProfile.join': '加入',
589
+ 'publicProfile.rating': '评分',
590
+ // Network pages
591
+ 'network.showingUsers': '展示 {count} 位用户',
592
+ 'network.showingUsersOf': '显示 {shown} / {total} 位用户',
593
+ 'account.department': '部门',
594
+ 'account.teamMembersCount': '团队成员({count})',
595
+ 'account.invitePeopleDescription': '通过邮件邀请新成员并预分配角色。',
596
+ 'account.inviteLinkHint': '任何获得该链接的人都可以申请加入团队。',
597
+ // Import members options
598
+ 'account.importOptions': '导入选项',
599
+ 'account.importCreateUsers': '创建新用户',
600
+ 'account.importUpdateUsers': '更新已有用户',
601
+ 'account.importNotifyPassword': '密码变更时发送邮件通知',
602
+ 'account.importExternalIds': '在导入结果中包含外部 ID',
603
+ 'account.importWelcomeEmail': '向新用户发送欢迎邮件',
604
+ // Enterprise settings
605
+ 'account.ssoDescription': '配置企业身份提供商以实现统一登录体验。',
606
+ 'account.enableSso': '启用 SSO',
607
+ 'account.enableSsoDesc': '允许员工通过企业 IdP 登录。',
608
+ 'account.ssoProvider': 'SSO 提供商',
609
+ 'account.domainRestriction': '域名限制',
610
+ 'account.securityPolicy': '安全策略',
611
+ 'account.passwordPolicy': '密码策略',
612
+ 'account.policyBasic': '基本',
613
+ 'account.policyStrong': '强密码',
614
+ 'account.policyVeryStrong': '非常强',
615
+ 'account.sessionTimeout': '会话超时(分钟)',
616
+ 'account.ipWhitelist': 'IP 白名单',
617
+ 'account.ipWhitelistHint': '留空表示不限制 IP。',
618
+ 'account.dataCompliance': '数据与合规',
619
+ 'account.auditLogging': '审计日志',
620
+ 'account.auditLoggingDesc': '记录所有管理操作以备合规审查。',
621
+ 'account.dataRetention': '数据保留天数',
622
+ 'account.perMonth': '/ 月',
623
+ 'account.currentDevice': '当前设备',
624
+ // Profile variant extras
625
+ 'profileSections.recentActivity': '最近动态',
626
+ 'profileSections.team': '团队成员',
627
+ // API webhooks extras
628
+ 'api.webhookName': 'Webhook 名称',
629
+ 'api.eventType': '事件类型',
630
+ 'api.noWebhooks': '尚未配置 Webhook。',
631
+ 'common.on': '开',
632
+ 'common.off': '关',
484
633
  },
485
634
  'en': {
486
635
  'common.list': 'List',
@@ -496,6 +645,7 @@ const baseLocales: Record<string, Record<string, string>> = {
496
645
  'common.save': 'Save',
497
646
  'common.cancel': 'Cancel',
498
647
  'common.create': 'Create',
648
+ 'common.progress': 'Progress',
499
649
  'common.edit': 'Edit',
500
650
  'common.delete': 'Delete',
501
651
  'common.batchDeletePartialFail': 'Batch delete partially failed: {failed}/{total} unsuccessful',
@@ -624,6 +774,7 @@ const baseLocales: Record<string, Record<string, string>> = {
624
774
  'devtools.title': 'DevTools (Ctrl+Shift+D)',
625
775
  // Validation
626
776
  // Chat
777
+ 'chat.title': 'AI Assistant',
627
778
  'chat.contextInfo': 'Current context: {resource}',
628
779
  'chat.actionButton': 'Execute',
629
780
  'chat.historyRestored': 'Chat history restored',
@@ -960,6 +1111,153 @@ const baseLocales: Record<string, Record<string, string>> = {
960
1111
  'task.status.dead_lettered': 'Dead lettered',
961
1112
  'task.status.retry_scheduled': 'Retry scheduled',
962
1113
  'task.status.leased': 'Leased',
1114
+ // Profile sections
1115
+ 'profileSections.about': 'About',
1116
+ 'profileSections.workExperience': 'Work Experience',
1117
+ 'profileSections.skills': 'Skills',
1118
+ 'profileSections.communityBadges': 'Community Badges',
1119
+ 'profileSections.recentUploads': 'Recent Uploads',
1120
+ 'profileSections.contributors': 'Contributors',
1121
+ 'profileSections.projects': 'Projects',
1122
+ 'profileSections.projectName': 'Project Name',
1123
+ 'profileSections.progress': 'Progress',
1124
+ 'profileSections.people': 'People',
1125
+ 'profileSections.dueDate': 'Due Date',
1126
+ 'profileSections.highlights': 'Highlights',
1127
+ 'profileSections.openJobs': 'Open Jobs',
1128
+ 'profileSections.locations': 'Locations',
1129
+ 'profileSections.members': 'Members',
1130
+ 'profileSections.investments': 'Investments',
1131
+ 'profileSections.favoriteGames': 'Favorite Games',
1132
+ 'profileSections.tournaments': 'Tournaments',
1133
+ 'profileSections.nowPlaying': 'Now Playing',
1134
+ 'profileSections.network': 'Network',
1135
+ 'profileSections.viewAll': 'View All',
1136
+ 'profileSections.present': 'Present',
1137
+ // Account: user profile page
1138
+ 'account.userProfile': 'User Profile',
1139
+ 'account.userProfileDescription': 'Manage personal info, work preferences, badges and files in one place.',
1140
+ 'account.personalInfo': 'Personal Info',
1141
+ 'account.work': 'Work',
1142
+ 'account.badges': 'Badges',
1143
+ 'account.connections': 'Connections',
1144
+ 'account.myFiles': 'My Files',
1145
+ 'account.calendarAccounts': 'Calendar Accounts',
1146
+ 'account.availableNow': 'Available now',
1147
+ // Account: settings shared
1148
+ 'account.photo': 'Photo',
1149
+ 'account.phone': 'Phone number',
1150
+ 'account.dateOfBirth': 'Date of Birth',
1151
+ 'account.bio': 'Bio',
1152
+ 'account.address': 'Address',
1153
+ 'account.country': 'Country',
1154
+ 'account.state': 'State',
1155
+ 'account.city': 'City',
1156
+ 'account.postcode': 'Postcode',
1157
+ 'account.password': 'Password',
1158
+ 'account.deleteAccount': 'Delete Account',
1159
+ 'account.deleteAccountDescription': 'Permanently remove this account and all of its data. This cannot be undone.',
1160
+ 'account.confirmDeleteAccount': 'Confirm deleting account',
1161
+ 'account.basicSettings': 'Basic Settings',
1162
+ 'account.visibility': 'Visibility',
1163
+ 'account.availability': 'Availability',
1164
+ 'account.availableToHire': 'Available to hire',
1165
+ 'account.socialSignIn': 'Social Sign in',
1166
+ 'account.twoFactorAuth': 'Two-Factor authentication (2FA)',
1167
+ 'account.singleSignOn': 'Single Sign On (SSO)',
1168
+ 'account.preferences': 'Preferences',
1169
+ 'account.language': 'Language',
1170
+ 'account.timezone': 'Time zone',
1171
+ 'account.currency': 'Currency',
1172
+ 'account.manageApi': 'Manage API',
1173
+ 'account.publicProfileCard': 'Public Profile',
1174
+ 'account.branding': 'Branding',
1175
+ 'account.dataImport': 'Data import',
1176
+ 'account.dataImportDescription': 'Import historical data from third-party analytics platforms.',
1177
+ 'account.trustedDevices': 'Trusted Devices',
1178
+ 'account.currentPlan': 'Your Current Plan',
1179
+ 'account.paymentHistory': 'Payment History',
1180
+ 'account.date': 'Date',
1181
+ 'account.type': 'Type',
1182
+ 'account.amount': 'Amount',
1183
+ 'account.invitePeople': 'Invite People',
1184
+ 'account.inviteWithLink': 'Invite with Link',
1185
+ 'account.copyLink': 'Copy Link',
1186
+ 'account.sendInvite': 'Send Invite',
1187
+ // Notifications page sections
1188
+ 'notifications.channels': 'Notification Channels',
1189
+ 'notifications.teamWideAlerts': 'Team-Wide Alerts',
1190
+ 'notifications.otherNotifications': 'Other Notifications',
1191
+ 'notifications.doNotDisturb': 'Do Not Disturb',
1192
+ 'notifications.doNotDisturbDesc': 'Pause all non-critical notifications while enabled.',
1193
+ // API page sections
1194
+ 'api.publicKey': 'Public API Key',
1195
+ 'api.publicKeyDesc': 'Publishable key for client-side integrations. Regenerate anytime.',
1196
+ 'api.regenerate': 'Regenerate',
1197
+ 'api.webhooks': 'Webhooks',
1198
+ 'api.webhooksDesc': 'Configure event callbacks to receive system events in real time.',
1199
+ 'api.webhookUrl': 'Webhook URL',
1200
+ 'api.addWebhook': 'Add Webhook',
1201
+ // Integrations page
1202
+ 'integrations.addNew': 'Add New Integration',
1203
+ 'integrations.addNewDesc': 'Browse the integration catalog and connect more services.',
1204
+ 'integrations.browse': 'Browse Catalog',
1205
+ // Appearance page
1206
+ 'settings.transparentSidebar': 'Transparent sidebar',
1207
+ 'settings.transparentSidebarDesc': 'Blend the sidebar background with page content.',
1208
+ 'settings.branding': 'Branding',
1209
+ 'settings.disableDefaultBranding': 'Disable default branding',
1210
+ // Profile grids
1211
+ 'publicProfile.projectsCount': '{count} Projects',
1212
+ 'publicProfile.teamsCount': '{count} Teams',
1213
+ 'publicProfile.searchProjects': 'Search projects...',
1214
+ 'publicProfile.searchTeams': 'Search teams...',
1215
+ 'publicProfile.autoRefresh': 'Auto refresh',
1216
+ 'publicProfile.join': 'Join',
1217
+ 'publicProfile.rating': 'Rating',
1218
+ // Network pages
1219
+ 'network.showingUsers': 'Showing {count} Users',
1220
+ 'network.showingUsersOf': 'Showing {shown} of {total} users',
1221
+ 'account.department': 'Department',
1222
+ 'account.teamMembersCount': 'Team Members ({count})',
1223
+ 'account.invitePeopleDescription': 'Invite new members by email and pre-assign roles.',
1224
+ 'account.inviteLinkHint': 'Anyone with this link can request to join the team.',
1225
+ // Import members options
1226
+ 'account.importOptions': 'Import Options',
1227
+ 'account.importCreateUsers': 'Create new users',
1228
+ 'account.importUpdateUsers': 'Update existing users',
1229
+ 'account.importNotifyPassword': 'Send email notification on password change',
1230
+ 'account.importExternalIds': 'Include external IDs in import results',
1231
+ 'account.importWelcomeEmail': 'Send welcome email to new users',
1232
+ // Enterprise settings
1233
+ 'account.ssoDescription': 'Configure your enterprise identity provider for a unified sign-in experience.',
1234
+ 'account.enableSso': 'Enable SSO',
1235
+ 'account.enableSsoDesc': 'Allow employees to sign in with your enterprise IdP.',
1236
+ 'account.ssoProvider': 'SSO Provider',
1237
+ 'account.domainRestriction': 'Domain Restriction',
1238
+ 'account.securityPolicy': 'Security Policy',
1239
+ 'account.passwordPolicy': 'Password Policy',
1240
+ 'account.policyBasic': 'Basic',
1241
+ 'account.policyStrong': 'Strong',
1242
+ 'account.policyVeryStrong': 'Very Strong',
1243
+ 'account.sessionTimeout': 'Session Timeout (minutes)',
1244
+ 'account.ipWhitelist': 'IP Whitelist',
1245
+ 'account.ipWhitelistHint': 'Leave empty to allow all IPs.',
1246
+ 'account.dataCompliance': 'Data & Compliance',
1247
+ 'account.auditLogging': 'Audit Logging',
1248
+ 'account.auditLoggingDesc': 'Record all admin actions for compliance review.',
1249
+ 'account.dataRetention': 'Data Retention (days)',
1250
+ 'account.perMonth': '/ month',
1251
+ 'account.currentDevice': 'Current Device',
1252
+ // Profile variant extras
1253
+ 'profileSections.recentActivity': 'Recent Activity',
1254
+ 'profileSections.team': 'Team',
1255
+ // API webhooks extras
1256
+ 'api.webhookName': 'Webhook Name',
1257
+ 'api.eventType': 'Event Type',
1258
+ 'api.noWebhooks': 'No webhooks configured yet.',
1259
+ 'common.on': 'On',
1260
+ 'common.off': 'Off',
963
1261
  },
964
1262
  };
965
1263