@svadmin/core 0.78.0 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/core",
3
- "version": "0.78.0",
3
+ "version": "0.80.0",
4
4
  "author": "zuohuadong",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,17 +9,17 @@
9
9
  },
10
10
  "main": "src/index.ts",
11
11
  "devDependencies": {
12
- "@happy-dom/global-registrator": "^20.11.12",
13
- "@sveltejs/vite-plugin-svelte": "^7.3.0",
14
- "@testing-library/dom": "^10.4.1",
12
+ "@happy-dom/global-registrator": "^21.0.4",
13
+ "@sveltejs/vite-plugin-svelte": "^7.3.1",
14
+ "@testing-library/dom": "^10.4.2",
15
15
  "@testing-library/svelte": "^5.4.2",
16
- "@testing-library/user-event": "^14.6.6",
16
+ "@testing-library/user-event": "^14.6.9",
17
17
  "@types/bun": "^1.4.4",
18
18
  "@types/jsdom": "^30.0.0",
19
19
  "exceljs": "4.4.0",
20
20
  "happy-dom": "^21.0.4",
21
- "jsdom": "^30.0.1",
22
- "vitest": "^4.1.11"
21
+ "jsdom": "^31.0.0",
22
+ "vitest": "^5.1.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "exceljs": "^4.4.0",
@@ -183,9 +183,9 @@
183
183
  "types": "src/index.ts",
184
184
  "dependencies": {
185
185
  "@types/papaparse": "^5.5.2",
186
- "@internationalized/date": "^3.12.3",
187
- "typebox": "^1.3.34",
188
- "papaparse": "^5.5.4"
186
+ "@internationalized/date": "^3.12.4",
187
+ "typebox": "^1.4.6",
188
+ "papaparse": "^5.7.0"
189
189
  },
190
190
  "peerDependenciesMeta": {
191
191
  "exceljs": {
@@ -41,6 +41,18 @@ const baseLocales: Record<string, Record<string, string>> = {
41
41
  'common.idleLocked': '长时间未操作已自动锁屏',
42
42
  'common.shortcuts': '快捷键',
43
43
  'common.shortcutsHelp': '快捷键向导',
44
+ 'safeDelete.title': '高危操作防误删确认',
45
+ 'safeDelete.warning': '此操作不可逆!相关资源将被永久删除且无法恢复。',
46
+ 'safeDelete.inputPrompt': '请输入目标全名以确认:',
47
+ 'safeDelete.pastePrevented': '安全防护机制已启用:禁止粘贴,请手动输入完整名称',
48
+ 'safeDelete.confirm': '确认永久删除',
49
+ 'safeDelete.impactTitle': '连带受影响资源与级联评估:',
50
+ 'safeDelete.countdown': '安全阅读冷却中 ({seconds}s)',
51
+ 'captcha.dragPrompt': '向右拖动滑块填充拼图',
52
+ 'captcha.success': '验证通过',
53
+ 'captcha.failed': '验证失败,请重试',
54
+ 'captcha.refresh': '换一张',
55
+ 'captcha.tooFast': '操作过快,请自然滑动',
44
56
  // Common
45
57
  'common.add': '添加',
46
58
  'common.moveUp': '上移',
@@ -946,6 +958,41 @@ const baseLocales: Record<string, Record<string, string>> = {
946
958
  'api.noWebhooks': '尚未配置 Webhook。',
947
959
  'common.on': '开',
948
960
  'common.off': '关',
961
+ // Org & Tree Transfer
962
+ 'org.selectDepartment': '选择部门',
963
+ 'org.members': '部门成员',
964
+ 'org.selectedMembers': '已选人员',
965
+ 'org.searchMember': '搜索成员姓名或邮箱...',
966
+ 'org.searchDepartment': '搜索部门...',
967
+ 'org.selectAll': '全选本部门',
968
+ 'org.clearAll': '清空已选',
969
+ 'org.noMembers': '当前部门暂无成员',
970
+ 'org.selectedCount': '已选 {count} 人',
971
+ 'org.source': '待选列表',
972
+ 'org.target': '已选列表',
973
+ 'org.search': '搜索关键词...',
974
+ 'org.empty': '暂无数据',
975
+ // Excel Suite
976
+ 'excel.import': '数据导入向导',
977
+ 'excel.export': '导出数据',
978
+ 'excel.uploadStep': '上传文件',
979
+ 'excel.mappingStep': '字段映射',
980
+ 'excel.previewStep': '校验预览',
981
+ 'excel.dropFile': '拖拽 CSV 文件至此处,或点击选择文件',
982
+ 'excel.fileHint': '支持 .csv 格式',
983
+ 'excel.sourceColumn': '文件原始列',
984
+ 'excel.targetField': '目标系统字段',
985
+ 'excel.autoMapped': '自动匹配',
986
+ 'excel.unmapped': '未映射',
987
+ 'excel.validRows': '校验通过',
988
+ 'excel.errorRows': '校验异常',
989
+ 'excel.startImport': '确认导入',
990
+ 'excel.downloadTemplate': '下载标准模板',
991
+ 'excel.exportSuccess': '数据导出成功',
992
+ // Pivot Drilldown
993
+ 'pivot.drilldownTitle': '多维分析下钻详情',
994
+ 'pivot.filterCriteria': '当前切片过滤条件',
995
+ 'pivot.totalRecords': '关联明细共 {count} 条',
949
996
  },
950
997
  'en': {
951
998
  'common.list': 'List',
@@ -965,6 +1012,18 @@ const baseLocales: Record<string, Record<string, string>> = {
965
1012
  'common.idleLocked': 'Auto-locked due to inactivity',
966
1013
  'common.shortcuts': 'Shortcuts',
967
1014
  'common.shortcutsHelp': 'Keyboard Shortcuts',
1015
+ 'safeDelete.title': 'High-Risk Deletion Confirmation',
1016
+ 'safeDelete.warning': 'This action cannot be undone! The resources will be permanently removed.',
1017
+ 'safeDelete.inputPrompt': 'Please type the resource name to confirm:',
1018
+ 'safeDelete.pastePrevented': 'Security guard enabled: Paste is disabled, please type manually.',
1019
+ 'safeDelete.confirm': 'Permanently Delete',
1020
+ 'safeDelete.impactTitle': 'Cascading Impact Assessment:',
1021
+ 'safeDelete.countdown': 'Safety reading cooldown ({seconds}s)',
1022
+ 'captcha.dragPrompt': 'Drag the slider right to fit the puzzle',
1023
+ 'captcha.success': 'Verification succeeded',
1024
+ 'captcha.failed': 'Verification failed, please try again',
1025
+ 'captcha.refresh': 'Refresh',
1026
+ 'captcha.tooFast': 'Swipe was too fast, please slide naturally',
968
1027
  // Common
969
1028
  'common.add': 'Add',
970
1029
  'common.moveUp': 'Move Up',
@@ -1890,6 +1949,41 @@ const baseLocales: Record<string, Record<string, string>> = {
1890
1949
  'api.noWebhooks': 'No webhooks configured yet.',
1891
1950
  'common.on': 'On',
1892
1951
  'common.off': 'Off',
1952
+ // Org & Tree Transfer
1953
+ 'org.selectDepartment': 'Select Department',
1954
+ 'org.members': 'Department Members',
1955
+ 'org.selectedMembers': 'Selected Members',
1956
+ 'org.searchMember': 'Search member name or email...',
1957
+ 'org.searchDepartment': 'Search department...',
1958
+ 'org.selectAll': 'Select All In Dept',
1959
+ 'org.clearAll': 'Clear Selected',
1960
+ 'org.noMembers': 'No members in this department',
1961
+ 'org.selectedCount': '{count} selected',
1962
+ 'org.source': 'Source List',
1963
+ 'org.target': 'Target List',
1964
+ 'org.search': 'Search keywords...',
1965
+ 'org.empty': 'No data',
1966
+ // Excel Suite
1967
+ 'excel.import': 'Data Import Wizard',
1968
+ 'excel.export': 'Export Data',
1969
+ 'excel.uploadStep': 'Upload File',
1970
+ 'excel.mappingStep': 'Field Mapping',
1971
+ 'excel.previewStep': 'Validation & Preview',
1972
+ 'excel.dropFile': 'Drop a CSV file here, or click to upload',
1973
+ 'excel.fileHint': 'Supports .csv format',
1974
+ 'excel.sourceColumn': 'Source Column',
1975
+ 'excel.targetField': 'Target Field',
1976
+ 'excel.autoMapped': 'Auto Mapped',
1977
+ 'excel.unmapped': 'Unmapped',
1978
+ 'excel.validRows': 'Valid Records',
1979
+ 'excel.errorRows': 'Error Records',
1980
+ 'excel.startImport': 'Start Import',
1981
+ 'excel.downloadTemplate': 'Download Template',
1982
+ 'excel.exportSuccess': 'Data exported successfully',
1983
+ // Pivot Drilldown
1984
+ 'pivot.drilldownTitle': 'Pivot Drilldown Details',
1985
+ 'pivot.filterCriteria': 'Active Slice Filters',
1986
+ 'pivot.totalRecords': '{count} records found',
1893
1987
  },
1894
1988
  };
1895
1989
 
@@ -191,19 +191,19 @@ export function useSubmitTask(options: UseSubmitTaskOptions={}) {
191
191
  }
192
192
 
193
193
  export interface UseTaskOptions {
194
- taskId?: string;
195
- taskProvider?: TaskProvider;
194
+ taskId?: string | undefined;
195
+ taskProvider?: TaskProvider | undefined;
196
196
  queryOptions?: {
197
- enabled?: boolean;
198
- staleTime?: number;
199
- gcTime?: number;
200
- refetchOnWindowFocus?: boolean;
201
- refetchInterval?: number|false;
202
- refetchIntervalInBackground?: boolean;
197
+ enabled?: boolean | undefined;
198
+ staleTime?: number | undefined;
199
+ gcTime?: number | undefined;
200
+ refetchOnWindowFocus?: boolean | undefined;
201
+ refetchInterval?: number|false | undefined;
202
+ refetchIntervalInBackground?: boolean | undefined;
203
203
  };
204
- successNotification?: NotificationConfig;
205
- errorNotification?: NotificationConfig;
206
- overtimeOptions?: OvertimeOptions;
204
+ successNotification?: NotificationConfig | undefined;
205
+ errorNotification?: NotificationConfig | undefined;
206
+ overtimeOptions?: OvertimeOptions | undefined;
207
207
  }
208
208
 
209
209
  export function useTask(
@@ -249,20 +249,20 @@ export function useTask(
249
249
  }
250
250
 
251
251
  export interface UseTaskListOptions {
252
- params?: Record<string,unknown>;
253
- dlq?: boolean;
254
- taskProvider?: TaskProvider;
252
+ params?: Record<string,unknown> | undefined;
253
+ dlq?: boolean | undefined;
254
+ taskProvider?: TaskProvider | undefined;
255
255
  queryOptions?: {
256
- enabled?: boolean;
257
- staleTime?: number;
258
- gcTime?: number;
259
- refetchOnWindowFocus?: boolean;
260
- refetchInterval?: number|false;
261
- refetchIntervalInBackground?: boolean;
256
+ enabled?: boolean | undefined;
257
+ staleTime?: number | undefined;
258
+ gcTime?: number | undefined;
259
+ refetchOnWindowFocus?: boolean | undefined;
260
+ refetchInterval?: number|false | undefined;
261
+ refetchIntervalInBackground?: boolean | undefined;
262
262
  };
263
- successNotification?: NotificationConfig;
264
- errorNotification?: NotificationConfig;
265
- overtimeOptions?: OvertimeOptions;
263
+ successNotification?: NotificationConfig | undefined;
264
+ errorNotification?: NotificationConfig | undefined;
265
+ overtimeOptions?: OvertimeOptions | undefined;
266
266
  }
267
267
 
268
268
  export function useTaskList(
package/src/useCan.ts CHANGED
@@ -23,8 +23,8 @@ export interface UseCanOptions {
23
23
  action: Action;
24
24
  /** Fixed record target; overrides an ID in additional permission params after validation. */
25
25
  id?: string | number;
26
- params?: NonNullable<CanParams['params']>;
27
- meta?: Record<string,unknown>;
26
+ params?: NonNullable<CanParams['params']> | undefined;
27
+ meta?: Record<string,unknown> | undefined;
28
28
  queryOptions?: {
29
29
  enabled?: boolean;
30
30
  staleTime?: number;