smartbi-toolkit 1.1.4 → 1.2.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.
Files changed (111) hide show
  1. package/README.md +59 -12
  2. package/dist/common-Cnq1SoER.d.ts +25 -0
  3. package/dist/console-BJttltN4.js +93 -0
  4. package/dist/index.d.ts +23 -14
  5. package/dist/index.js +97 -127
  6. package/dist/{methods → service}/AnalysisReportService.d.ts +18 -14
  7. package/dist/service/AnalysisReportService.js +138 -0
  8. package/dist/service/BusinessThemeService.d.ts +11 -0
  9. package/dist/service/BusinessThemeService.js +20 -0
  10. package/dist/{methods → service}/BusinessViewService.d.ts +18 -14
  11. package/dist/service/BusinessViewService.js +146 -0
  12. package/dist/{methods → service}/CatalogService.d.ts +26 -22
  13. package/dist/service/CatalogService.js +300 -0
  14. package/dist/{methods → service}/ClientCombinedReportService.d.ts +14 -10
  15. package/dist/service/ClientCombinedReportService.js +96 -0
  16. package/dist/{methods → service}/ClientInsightService.d.ts +17 -13
  17. package/dist/service/ClientInsightService.js +123 -0
  18. package/dist/{methods → service}/ClientReportService.d.ts +27 -23
  19. package/dist/service/ClientReportService.js +244 -0
  20. package/dist/service/CombinedReportService.d.ts +11 -0
  21. package/dist/service/CombinedReportService.js +14 -0
  22. package/dist/{methods → service}/DataSourceService.d.ts +26 -22
  23. package/dist/service/DataSourceService.js +306 -0
  24. package/dist/service/GraphicReportService.d.ts +11 -0
  25. package/dist/service/GraphicReportService.js +14 -0
  26. package/dist/service/InsightReport.d.ts +75 -0
  27. package/dist/service/InsightReport.js +118 -0
  28. package/dist/{methods → service}/MetadataService.d.ts +10 -6
  29. package/dist/service/MetadataService.js +60 -0
  30. package/dist/service/OfficeReport.d.ts +53 -0
  31. package/dist/service/OfficeReport.js +74 -0
  32. package/dist/{methods → service}/OfficeReportService.d.ts +10 -6
  33. package/dist/service/OfficeReportService.js +56 -0
  34. package/dist/service/OltpMetadataService.d.ts +23 -0
  35. package/dist/service/OltpMetadataService.js +30 -0
  36. package/dist/service/ParameterService.d.ts +15 -0
  37. package/dist/service/ParameterService.js +22 -0
  38. package/dist/service/PoolService.d.ts +14 -0
  39. package/dist/service/PoolService.js +21 -0
  40. package/dist/{methods → service}/PortalService.d.ts +14 -10
  41. package/dist/service/PortalService.js +106 -0
  42. package/dist/{methods → service}/Report.d.ts +31 -27
  43. package/dist/service/Report.js +275 -0
  44. package/dist/service/SSReport.d.ts +90 -0
  45. package/dist/service/SSReport.js +127 -0
  46. package/dist/service/ScheduleTaskService.d.ts +15 -0
  47. package/dist/service/ScheduleTaskService.js +22 -0
  48. package/dist/service/SimpleReportService.d.ts +15 -0
  49. package/dist/service/SimpleReportService.js +22 -0
  50. package/dist/service/SpreadSheetReportService.d.ts +47 -0
  51. package/dist/service/SpreadSheetReportService.js +65 -0
  52. package/dist/service/SystemConfigService.d.ts +21 -0
  53. package/dist/service/SystemConfigService.js +28 -0
  54. package/dist/service/TimeConsuming.d.ts +10 -0
  55. package/dist/service/TimeConsuming.js +13 -0
  56. package/dist/service/TimeConsumingService.d.ts +8 -0
  57. package/dist/service/TimeConsumingService.js +13 -0
  58. package/dist/{methods → service}/UserManagerService.d.ts +40 -36
  59. package/dist/service/UserManagerService.js +365 -0
  60. package/dist/types-C2_iES_3.d.ts +363 -0
  61. package/dist/vite-plugin/vite-plugin-smartbi.d.ts +21 -0
  62. package/dist/vite-plugin/vite-plugin-smartbi.js +54 -0
  63. package/dist/vite-plugin/vite-plugin-smartbix.d.ts +17 -0
  64. package/dist/vite-plugin/vite-plugin-smartbix.js +101 -0
  65. package/package.json +59 -141
  66. package/dist/methods/AnalysisReportService.js +0 -126
  67. package/dist/methods/BusinessThemeService.d.ts +0 -8
  68. package/dist/methods/BusinessThemeService.js +0 -11
  69. package/dist/methods/BusinessViewService.js +0 -120
  70. package/dist/methods/CatalogService.js +0 -230
  71. package/dist/methods/ClientCombinedReportService.js +0 -82
  72. package/dist/methods/ClientInsightService.js +0 -107
  73. package/dist/methods/ClientReportService.js +0 -206
  74. package/dist/methods/CombinedReportService.d.ts +0 -7
  75. package/dist/methods/CombinedReportService.js +0 -10
  76. package/dist/methods/DataSourceService.js +0 -220
  77. package/dist/methods/GraphicReportService.d.ts +0 -7
  78. package/dist/methods/GraphicReportService.js +0 -10
  79. package/dist/methods/InsightReport.d.ts +0 -71
  80. package/dist/methods/InsightReport.js +0 -98
  81. package/dist/methods/MetadataService.js +0 -47
  82. package/dist/methods/OfficeReport.d.ts +0 -49
  83. package/dist/methods/OfficeReport.js +0 -65
  84. package/dist/methods/OfficeReportService.js +0 -46
  85. package/dist/methods/OltpMetadataService.d.ts +0 -19
  86. package/dist/methods/OltpMetadataService.js +0 -25
  87. package/dist/methods/ParameterService.d.ts +0 -12
  88. package/dist/methods/ParameterService.js +0 -18
  89. package/dist/methods/PoolService.d.ts +0 -11
  90. package/dist/methods/PoolService.js +0 -17
  91. package/dist/methods/PortalService.js +0 -89
  92. package/dist/methods/Report.js +0 -230
  93. package/dist/methods/SSReport.d.ts +0 -86
  94. package/dist/methods/SSReport.js +0 -114
  95. package/dist/methods/ScheduleTaskService.d.ts +0 -12
  96. package/dist/methods/ScheduleTaskService.js +0 -18
  97. package/dist/methods/SimpleReportService.d.ts +0 -12
  98. package/dist/methods/SimpleReportService.js +0 -18
  99. package/dist/methods/SpreadSheetReportService.d.ts +0 -43
  100. package/dist/methods/SpreadSheetReportService.js +0 -55
  101. package/dist/methods/SystemConfigService.d.ts +0 -17
  102. package/dist/methods/SystemConfigService.js +0 -23
  103. package/dist/methods/TimeConsuming.d.ts +0 -6
  104. package/dist/methods/TimeConsuming.js +0 -9
  105. package/dist/methods/TimeConsumingService.d.ts +0 -5
  106. package/dist/methods/TimeConsumingService.js +0 -9
  107. package/dist/methods/UserManagerService.js +0 -312
  108. package/dist/types.d.ts +0 -412
  109. package/dist/types.js +0 -61
  110. package/dist/vite-plugin-smartbi/index.d.ts +0 -36
  111. package/dist/vite-plugin-smartbi/index.js +0 -107
@@ -0,0 +1,21 @@
1
+ import { t as WebProjectConfig } from "../common-Cnq1SoER.js";
2
+ import { PluginOption } from "vite";
3
+
4
+ //#region src/vite-plugin/vite-plugin-smartbi.d.ts
5
+ type VitePluginSmartbiOptions = {
6
+ /**
7
+ * 输出目录
8
+ */
9
+ output?: string;
10
+ /**
11
+ * html重命名
12
+ */
13
+ indexRename?: string;
14
+ /**
15
+ * vision到html中间的路径
16
+ */
17
+ appendPath?: string;
18
+ } & WebProjectConfig;
19
+ declare const VitePluginSmartbi: (config: VitePluginSmartbiOptions) => PluginOption;
20
+ //#endregion
21
+ export { VitePluginSmartbi, VitePluginSmartbiOptions };
@@ -0,0 +1,54 @@
1
+ import { i as makeWebDir, n as info, r as success, t as error } from "../console-BJttltN4.js";
2
+ import { copy, mkdirp, remove } from "fs-extra";
3
+ import { rename } from "node:fs/promises";
4
+ import { join, resolve } from "node:path";
5
+ import { exec } from "node:child_process";
6
+
7
+ //#region src/vite-plugin/vite-plugin-smartbi.ts
8
+ const VitePluginSmartbi = (config) => {
9
+ const { output = "web", appendPath, indexRename } = config;
10
+ console.log(appendPath);
11
+ return {
12
+ name: "vite-plugin-smartbi",
13
+ apply: "build",
14
+ enforce: "post",
15
+ writeBundle(options, _bundle) {
16
+ success("开始打包");
17
+ console.log(_bundle);
18
+ const cwd = process.cwd();
19
+ const outputPath = join(cwd, output);
20
+ const visionDir = resolve(outputPath, "vision" + (appendPath ? "/" + appendPath : ""));
21
+ const outputDir = options.dir;
22
+ info("ext输出路径:" + outputPath);
23
+ remove(outputPath).then(() => {
24
+ info("清除:ext目录");
25
+ return makeWebDir(outputPath, config);
26
+ }).then(() => {
27
+ info("创建:ext目录");
28
+ return mkdirp(visionDir);
29
+ }).then(() => {
30
+ info("创建:vision目录");
31
+ return copy(outputDir, visionDir);
32
+ }).then(() => {
33
+ info("复制:vision目录文件");
34
+ info(visionDir);
35
+ if (indexRename) return rename(visionDir + "/index.html", visionDir + "/" + indexRename);
36
+ else return Promise.resolve();
37
+ }).then(() => {
38
+ exec("ant", { cwd }, (err, stdout, stderr) => {
39
+ if (err) {
40
+ error(stderr);
41
+ error("构建失败:请检查是否有java和ant环境,搜索Apache Ant部署环境");
42
+ this.error(stderr);
43
+ } else {
44
+ success(stdout);
45
+ success("ext构建完成");
46
+ }
47
+ });
48
+ });
49
+ }
50
+ };
51
+ };
52
+
53
+ //#endregion
54
+ export { VitePluginSmartbi };
@@ -0,0 +1,17 @@
1
+ import { t as WebProjectConfig } from "../common-Cnq1SoER.js";
2
+ import { PluginOption } from "vite";
3
+
4
+ //#region src/vite-plugin/vite-plugin-smartbix.d.ts
5
+ type VitePluginSmartbiXOptions = {
6
+ /**
7
+ * 扩展根目录
8
+ */
9
+ libRoot?: string;
10
+ /**
11
+ * 输出路径
12
+ */
13
+ output?: string;
14
+ } & WebProjectConfig;
15
+ declare const vitePluginSmartbiX: (config: VitePluginSmartbiXOptions) => PluginOption;
16
+ //#endregion
17
+ export { VitePluginSmartbiXOptions, vitePluginSmartbiX };
@@ -0,0 +1,101 @@
1
+ import { i as makeWebDir, n as info, r as success, t as error } from "../console-BJttltN4.js";
2
+ import { pathExists } from "fs-extra";
3
+ import nodePath, { join } from "node:path";
4
+ import { exec } from "node:child_process";
5
+ import resolve$1 from "@rollup/plugin-node-resolve";
6
+ import terser from "@rollup/plugin-terser";
7
+ import vue from "rollup-plugin-vue";
8
+ import commonjs from "@rollup/plugin-commonjs";
9
+ import { readdirSync } from "node:fs";
10
+ import { rollup } from "rollup";
11
+
12
+ //#region src/vite-plugin/vite-plugin-smartbix.ts
13
+ function getAllFiles(dirPath, arrayOfFiles = []) {
14
+ let files = readdirSync(dirPath, { withFileTypes: true });
15
+ arrayOfFiles = arrayOfFiles || [];
16
+ files.forEach((file) => {
17
+ if (file.isDirectory()) arrayOfFiles = getAllFiles(join(dirPath, file.name), arrayOfFiles);
18
+ else arrayOfFiles.push(join(dirPath, file.name));
19
+ });
20
+ return arrayOfFiles;
21
+ }
22
+ const vitePluginSmartbiX = (config) => {
23
+ info("vitePluginSmartbiX");
24
+ console.log("vitePluginSmartbiX");
25
+ const { libRoot = "src/addExtenders", output = "web" } = config;
26
+ const libRootPath = nodePath.join(process.cwd(), libRoot);
27
+ const outputPath = nodePath.join(process.cwd(), output);
28
+ const run = (ids) => {
29
+ makeWebDir(outputPath, config).then(() => {
30
+ console.log("创建完成");
31
+ return pathExists(libRootPath);
32
+ }).then((value) => {
33
+ if (value) getAllFiles(libRootPath).filter((file) => file.endsWith(".js")).forEach((id) => {
34
+ const arr = id.replace(libRootPath + "/", "").replace(".js", "").split("/");
35
+ const name = `addExtenders/${arr[arr.length - 1] === "index" ? arr[arr.length - 2] : arr[arr.length - 1]}`;
36
+ rollup({
37
+ input: id,
38
+ external: ["vue"],
39
+ plugins: [
40
+ resolve$1({
41
+ browser: true,
42
+ extensions: [".vue", ".js"]
43
+ }),
44
+ commonjs(),
45
+ vue({ isProduction: true }),
46
+ terser()
47
+ ]
48
+ }).then((bundle) => {
49
+ bundle.write({
50
+ dir: nodePath.join(output, "vision/dist"),
51
+ format: "system",
52
+ name,
53
+ sourcemap: true,
54
+ globals: {
55
+ "vue": "Vue",
56
+ "axios": "axios"
57
+ },
58
+ entryFileNames: name + ".js"
59
+ }).finally(() => {
60
+ bundle.close();
61
+ });
62
+ });
63
+ return null;
64
+ });
65
+ else error("请检查libRoot目录是否存在:" + libRoot);
66
+ success("编译完成");
67
+ });
68
+ };
69
+ return {
70
+ name: "vite-plugin-smartbi-x",
71
+ enforce: "post",
72
+ buildStart(options) {
73
+ info("buildStart");
74
+ run();
75
+ },
76
+ writeBundle(options, _bundle) {
77
+ success("开始打包");
78
+ const cwd = process.cwd();
79
+ info("ext输出路径:" + outputPath);
80
+ exec("ant", { cwd }, (err, stdout, stderr) => {
81
+ if (err) {
82
+ error(stderr);
83
+ error("构建失败:请检查是否有java和ant环境,搜索Apache Ant部署环境");
84
+ this.error(stderr);
85
+ } else {
86
+ success(stdout);
87
+ success("ext构建完成");
88
+ }
89
+ });
90
+ },
91
+ handleHotUpdate(ctx) {
92
+ if (ctx.file.startsWith(libRootPath)) {
93
+ info("handleHotUpdate");
94
+ run();
95
+ }
96
+ }
97
+ };
98
+ };
99
+
100
+ //#endregion
101
+ export { vitePluginSmartbiX };
package/package.json CHANGED
@@ -1,159 +1,77 @@
1
1
  {
2
2
  "name": "smartbi-toolkit",
3
- "private": false,
4
- "version": "1.1.4",
5
- "keys": [
6
- "smartbi",
7
- "扩展包",
8
- "ext",
9
- "typescript",
10
- "smartbi-toolkit"
11
- ],
12
3
  "type": "module",
13
- "module": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "description": "SmartBI 非官方JS sdk和ext构建工具",
4
+ "version": "1.2.1",
5
+ "description": "A starter for creating a TypeScript package.",
6
+ "author": "Alex Liu <648632561@qq.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/author/library#readme",
16
9
  "repository": {
17
10
  "type": "git",
18
- "url": "https://github.com/StillAlexLiu/smartbi-toolkit.git"
11
+ "url": "git+https://github.com/author/library.git"
19
12
  },
20
- "exports": {
21
- ".": {
22
- "import": "./dist/index.js",
23
- "types": "./dist/index.d.ts"
24
- },
25
- "./VitePluginSmartbi": {
26
- "import": "./dist/vite-plugin-smartbi/index.js",
27
- "types": "./dist/vite-plugin-smartbi/index.d.ts"
28
- },
29
- "./AnalysisReportService": {
30
- "import": "./dist/methods/AnalysisReportService.js",
31
- "types": "./dist/methods/AnalysisReportService.d.ts"
32
- },
33
- "./BusinessThemeService": {
34
- "import": "./dist/methods/BusinessThemeService.js",
35
- "types": "./dist/methods/BusinessThemeService.d.ts"
36
- },
37
- "./BusinessViewService": {
38
- "import": "./dist/methods/BusinessViewService.js",
39
- "types": "./dist/methods/BusinessViewService.d.ts"
40
- },
41
- "./CatalogService": {
42
- "import": "./dist/methods/CatalogService.js",
43
- "types": "./dist/methods/CatalogService.d.ts"
44
- },
45
- "./ClientCombinedReportService": {
46
- "import": "./dist/methods/ClientCombinedReportService.js",
47
- "types": "./dist/methods/ClientCombinedReportService.d.ts"
48
- },
49
- "./ClientInsightService": {
50
- "import": "./dist/methods/ClientInsightService.js",
51
- "types": "./dist/methods/ClientInsightService.d.ts"
52
- },
53
- "./ClientReportService": {
54
- "import": "./dist/methods/ClientReportService.js",
55
- "types": "./dist/methods/ClientReportService.d.ts"
56
- },
57
- "./CombinedReportService": {
58
- "import": "./dist/methods/CombinedReportService.js",
59
- "types": "./dist/methods/CombinedReportService.d.ts"
60
- },
61
- "./DataSourceService": {
62
- "import": "./dist/methods/DataSourceService.js",
63
- "types": "./dist/methods/DataSourceService.d.ts"
64
- },
65
- "./GraphicReportService": {
66
- "import": "./dist/methods/GraphicReportService.js",
67
- "types": "./dist/methods/GraphicReportService.d.ts"
68
- },
69
- "./InsightReport": {
70
- "import": "./dist/methods/InsightReport.js",
71
- "types": "./dist/methods/InsightReport.d.ts"
72
- },
73
- "./MetadataService": {
74
- "import": "./dist/methods/MetadataService.js",
75
- "types": "./dist/methods/MetadataService.d.ts"
76
- },
77
- "./OfficeReport": {
78
- "import": "./dist/methods/OfficeReport.js",
79
- "types": "./dist/methods/OfficeReport.d.ts"
80
- },
81
- "./OfficeReportService": {
82
- "import": "./dist/methods/OfficeReportService.js",
83
- "types": "./dist/methods/OfficeReportService.d.ts"
84
- },
85
- "./OltpMetadataService": {
86
- "import": "./dist/methods/OltpMetadataService.js",
87
- "types": "./dist/methods/OltpMetadataService.d.ts"
88
- },
89
- "./ParameterService": {
90
- "import": "./dist/methods/ParameterService.js",
91
- "types": "./dist/methods/ParameterService.d.ts"
92
- },
93
- "./PoolService": {
94
- "import": "./dist/methods/PoolService.js",
95
- "types": "./dist/methods/PoolService.d.ts"
96
- },
97
- "./PortalService": {
98
- "import": "./dist/methods/PortalService.js",
99
- "types": "./dist/methods/PortalService.d.ts"
100
- },
101
- "./Report": {
102
- "import": "./dist/methods/Report.js",
103
- "types": "./dist/methods/Report.d.ts"
104
- },
105
- "./SSReport": {
106
- "import": "./dist/methods/SSReport.js",
107
- "types": "./dist/methods/SSReport.d.ts"
108
- },
109
- "./ScheduleTaskService": {
110
- "import": "./dist/methods/ScheduleTaskService.js",
111
- "types": "./dist/methods/ScheduleTaskService.d.ts"
112
- },
113
- "./SimpleReportService": {
114
- "import": "./dist/methods/SimpleReportService.js",
115
- "types": "./dist/methods/SimpleReportService.d.ts"
116
- },
117
- "./SpreadSheetReportService": {
118
- "import": "./dist/methods/SpreadSheetReportService.js",
119
- "types": "./dist/methods/SpreadSheetReportService.d.ts"
120
- },
121
- "./SystemConfigService": {
122
- "import": "./dist/methods/SystemConfigService.js",
123
- "types": "./dist/methods/SystemConfigService.d.ts"
124
- },
125
- "./TimeConsuming": {
126
- "import": "./dist/methods/TimeConsuming.js",
127
- "types": "./dist/methods/TimeConsuming.d.ts"
128
- },
129
- "./TimeConsumingService": {
130
- "import": "./dist/methods/TimeConsumingService.js",
131
- "types": "./dist/methods/TimeConsumingService.d.ts"
132
- },
133
- "./UserManagerService": {
134
- "import": "./dist/methods/UserManagerService.js",
135
- "types": "./dist/methods/UserManagerService.d.ts"
136
- }
13
+ "bugs": {
14
+ "url": "https://github.com/author/library/issues"
137
15
  },
138
- "scripts": {
139
- "build": "tsc"
16
+ "exports": {
17
+ ".": "./dist/index.js",
18
+ "./service/AnalysisReportService": "./dist/service/AnalysisReportService.js",
19
+ "./service/BusinessThemeService": "./dist/service/BusinessThemeService.js",
20
+ "./service/BusinessViewService": "./dist/service/BusinessViewService.js",
21
+ "./service/CatalogService": "./dist/service/CatalogService.js",
22
+ "./service/ClientCombinedReportService": "./dist/service/ClientCombinedReportService.js",
23
+ "./service/ClientInsightService": "./dist/service/ClientInsightService.js",
24
+ "./service/ClientReportService": "./dist/service/ClientReportService.js",
25
+ "./service/CombinedReportService": "./dist/service/CombinedReportService.js",
26
+ "./service/DataSourceService": "./dist/service/DataSourceService.js",
27
+ "./service/GraphicReportService": "./dist/service/GraphicReportService.js",
28
+ "./service/InsightReport": "./dist/service/InsightReport.js",
29
+ "./service/MetadataService": "./dist/service/MetadataService.js",
30
+ "./service/OfficeReport": "./dist/service/OfficeReport.js",
31
+ "./service/OfficeReportService": "./dist/service/OfficeReportService.js",
32
+ "./service/OltpMetadataService": "./dist/service/OltpMetadataService.js",
33
+ "./service/ParameterService": "./dist/service/ParameterService.js",
34
+ "./service/PoolService": "./dist/service/PoolService.js",
35
+ "./service/PortalService": "./dist/service/PortalService.js",
36
+ "./service/Report": "./dist/service/Report.js",
37
+ "./service/ScheduleTaskService": "./dist/service/ScheduleTaskService.js",
38
+ "./service/SimpleReportService": "./dist/service/SimpleReportService.js",
39
+ "./service/SpreadSheetReportService": "./dist/service/SpreadSheetReportService.js",
40
+ "./service/SSReport": "./dist/service/SSReport.js",
41
+ "./service/SystemConfigService": "./dist/service/SystemConfigService.js",
42
+ "./service/TimeConsuming": "./dist/service/TimeConsuming.js",
43
+ "./service/TimeConsumingService": "./dist/service/TimeConsumingService.js",
44
+ "./service/UserManagerService": "./dist/service/UserManagerService.js",
45
+ "./vite-plugin/vite-plugin-smartbi": "./dist/vite-plugin/vite-plugin-smartbi.js",
46
+ "./vite-plugin/vite-plugin-smartbix": "./dist/vite-plugin/vite-plugin-smartbix.js",
47
+ "./package.json": "./package.json"
140
48
  },
49
+ "types": "./dist/index.d.cts",
141
50
  "files": [
142
51
  "dist"
143
52
  ],
53
+ "scripts": {
54
+ "build": "tsdown",
55
+ "dev": "tsdown --watch",
56
+ "typecheck": "tsc --noEmit",
57
+ "prepublishOnly": "npm run build"
58
+ },
144
59
  "devDependencies": {
145
60
  "@types/fs-extra": "^11.0.4",
146
- "@types/node": "^25.0.10",
147
- "typescript": "~5.9.3",
148
- "vite": "8.0.0-beta.9"
149
- },
150
- "peerDependencies": {
151
- "axios": "^1.3.6",
152
- "chalk": "^5.2.0"
61
+ "@types/node": "^25.2.0",
62
+ "bumpp": "^10.4.0",
63
+ "tsdown": "^0.20.1",
64
+ "typescript": "^5.9.3"
153
65
  },
154
66
  "dependencies": {
155
- "axios": "^1.13.2",
67
+ "@rollup/plugin-commonjs": "^29.0.0",
68
+ "@rollup/plugin-node-resolve": "^16.0.3",
69
+ "@rollup/plugin-terser": "^0.4.4",
70
+ "axios": "^1.13.4",
156
71
  "chalk": "^5.6.2",
157
- "fs-extra": "^11.3.3"
72
+ "fs-extra": "^11.3.3",
73
+ "rollup": "^4.57.1",
74
+ "rollup-plugin-vue": "^5.1.9",
75
+ "vite": "^7.3.1"
158
76
  }
159
77
  }
@@ -1,126 +0,0 @@
1
- /**
2
- * 打开多维报表
3
- * @param reportId 报表ID
4
- * @returns 返回报表客户端ID
5
- */
6
- export const openAnalysisReport = (reportId) => {
7
- return smartbi('AnalysisReportService', 'openAnalysisReport', [reportId]);
8
- };
9
- /**
10
- * 打开多维报表(不初始化)
11
- * @param reportId 报表ID
12
- * @returns 返回报表客户端ID
13
- */
14
- export const openOlapReportWithoutInit = (reportId) => {
15
- return smartbi('AnalysisReportService', 'openOlapReportWithoutInit', [reportId]);
16
- };
17
- /**
18
- * 关闭多维报表
19
- * @param clientId 客户端ID
20
- * @returns 无返回值
21
- */
22
- export const closeAnalysisReport = (clientId) => {
23
- return smartbi('AnalysisReportService', 'closeAnalysisReport', [clientId]);
24
- };
25
- /**
26
- * 设置多维报表参数值
27
- * @param clientId 客户端ID
28
- * @param id 参数ID
29
- * @param value 参数值
30
- * @param displayValue 参数显示值
31
- * @returns 无返回值
32
- */
33
- export const setParamValue = (clientId, id, value, displayValue) => {
34
- return smartbi('AnalysisReportService', 'setParamValue', [clientId, id, value, displayValue]);
35
- };
36
- /**
37
- * 执行多维查询
38
- * @param clientId 客户端ID
39
- * @returns 返回查询结果
40
- */
41
- export const executeQuery = (clientId) => {
42
- return smartbi('AnalysisReportService', 'executeQuery', [clientId]);
43
- };
44
- /**
45
- * 导出报表
46
- * @param clientId 客户端ID
47
- * @param exportType 导出类型
48
- * @param delimiter 分割符
49
- * @param os 输出流
50
- * @param resourceBasePath 资源路径前缀(可选)
51
- * @param valueType 值类型(可选)
52
- * @returns 无返回值
53
- */
54
- export const doExport = (clientId, exportType, delimiter, os, // 输出流
55
- resourceBasePath, valueType) => {
56
- const params = [clientId, exportType, delimiter, os];
57
- if (resourceBasePath !== undefined) {
58
- params.push(resourceBasePath);
59
- if (valueType !== undefined) {
60
- params.push(valueType);
61
- }
62
- }
63
- return smartbi('AnalysisReportService', 'doExport', params);
64
- };
65
- /**
66
- * 设置参数为默认值
67
- * @param clientId 客户端ID
68
- * @param paramId 参数ID
69
- * @returns 无返回值
70
- */
71
- export const setParameterValueAsDefault = (clientId, paramId) => {
72
- return smartbi('AnalysisReportService', 'setParameterValueAsDefault', [clientId, paramId]);
73
- };
74
- /**
75
- * 获取参数
76
- * @param clientId 客户端ID
77
- * @param paramId 参数ID
78
- * @returns 返回参数信息
79
- */
80
- export const getParameter = (clientId, paramId) => {
81
- return smartbi('AnalysisReportService', 'getParameter', [clientId, paramId]);
82
- };
83
- /**
84
- * 获取参数显示值
85
- * @param clientId 客户端ID
86
- * @param paramId 参数ID
87
- * @returns 返回参数显示值
88
- */
89
- export const getParameterDisplayValue = (clientId, paramId) => {
90
- return smartbi('AnalysisReportService', 'getParameterDisplayValue', [clientId, paramId]);
91
- };
92
- /**
93
- * 获取参数默认值
94
- * @param clientId 客户端ID
95
- * @param paramId 参数ID
96
- * @returns 返回参数默认值列表
97
- */
98
- export const getParameterDefaultValue = (clientId, paramId) => {
99
- return smartbi('AnalysisReportService', 'getParameterDefaultValue', [clientId, paramId]);
100
- };
101
- /**
102
- * 获取所有参数
103
- * @param clientId 客户端ID
104
- * @returns 返回参数列表
105
- */
106
- export const getParameters = (clientId) => {
107
- return smartbi('AnalysisReportService', 'getParameters', [clientId]);
108
- };
109
- /**
110
- * 获取参数候选值列表
111
- * @param clientId 客户端ID
112
- * @param paramId 参数ID
113
- * @returns 返回候选值列表
114
- */
115
- export const getParamStandbyValue = (clientId, paramId) => {
116
- return smartbi('AnalysisReportService', 'getParamStandbyValue', [clientId, paramId]);
117
- };
118
- /**
119
- * 获取执行状态
120
- * @param clientId 客户端ID
121
- * @returns 返回执行状态信息
122
- */
123
- export const getExecutingState = (clientId) => {
124
- return smartbi('AnalysisReportService', 'getExecutingState', [clientId]);
125
- };
126
- import { smartbi } from "../index";
@@ -1,8 +0,0 @@
1
- /**
2
- * 创建业务对象
3
- * @param businessThemeId 业务主题ID
4
- * @param parentId 业务对象父ID
5
- * @param tableId 表ID
6
- * @returns 无返回值
7
- */
8
- export declare const createBusinessThemeObject: (businessThemeId: string, parentId: string, tableId: string) => Promise<void>;
@@ -1,11 +0,0 @@
1
- import { smartbi } from '../index';
2
- /**
3
- * 创建业务对象
4
- * @param businessThemeId 业务主题ID
5
- * @param parentId 业务对象父ID
6
- * @param tableId 表ID
7
- * @returns 无返回值
8
- */
9
- export const createBusinessThemeObject = (businessThemeId, parentId, tableId) => {
10
- return smartbi('BusinessThemeService', 'createBusinessThemeObject', [businessThemeId, parentId, tableId]);
11
- };