@rsdoctor/components 0.4.13 → 1.0.0-alpha.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 (197) hide show
  1. package/README.md +1 -1
  2. package/dist/common/imgs/connection-point.js +11 -0
  3. package/dist/common/imgs/webpack.js +11 -0
  4. package/dist/common/svg/bundle-size.js +11 -0
  5. package/dist/common/svg/error.js +10 -0
  6. package/dist/common/svg/file-css.js +11 -0
  7. package/dist/common/svg/file-html.js +11 -0
  8. package/dist/common/svg/file-image.js +11 -0
  9. package/dist/common/svg/file-js.js +11 -0
  10. package/dist/common/svg/file-unknown.js +11 -0
  11. package/dist/common/svg/file.js +10 -0
  12. package/dist/common/svg/files/css.js +11 -0
  13. package/dist/common/svg/files/html.js +11 -0
  14. package/dist/common/svg/files/image.js +11 -0
  15. package/dist/common/svg/files/js.js +11 -0
  16. package/dist/common/svg/files/unkown-file.js +11 -0
  17. package/dist/common/svg/loader/input.js +11 -0
  18. package/dist/common/svg/loader/output.js +12 -0
  19. package/dist/common/svg/loader/step.js +7 -0
  20. package/dist/common/svg/navbar/bundle-size-active.js +10 -0
  21. package/dist/common/svg/navbar/bundle-size-inactive.js +10 -0
  22. package/dist/common/svg/navbar/compile-analysis-active.js +11 -0
  23. package/dist/common/svg/navbar/compile-analysis-inactive.js +11 -0
  24. package/dist/common/svg/navbar/overall-active.js +11 -0
  25. package/dist/common/svg/navbar/overall-inactive.js +11 -0
  26. package/dist/common/svg/output.js +12 -0
  27. package/dist/common/svg/source-size.js +12 -0
  28. package/dist/common/svg/source.js +10 -0
  29. package/dist/common/svg/total-size.js +11 -0
  30. package/dist/common/svg/version.js +11 -0
  31. package/dist/components/Alert/ecma-version-check.d.ts +2 -0
  32. package/dist/components/Alert/ecma-version-check.js +69 -0
  33. package/dist/components/Alert/ecma-version-check.module.js +5 -0
  34. package/dist/components/Alert/ecma-version-check_module.css +23 -0
  35. package/dist/components/Alert/package-relation.d.ts +1 -2
  36. package/dist/components/Alert/package-relation.js +29 -59
  37. package/dist/components/Alert/package-relation.module.js +5 -0
  38. package/dist/components/Alert/package-relation_module.css +23 -0
  39. package/dist/components/Alert/types.d.ts +6 -1
  40. package/dist/components/Alerts/{common.d.ts → bundle-alert.d.ts} +3 -4
  41. package/dist/components/Alerts/bundle-alert.js +156 -0
  42. package/dist/components/Alerts/bundle-alert.module.js +5 -0
  43. package/dist/components/Alerts/bundle-alert_module.css +46 -0
  44. package/dist/components/Alerts/bundle.js +25 -6
  45. package/dist/components/Alerts/collapse.d.ts +6 -0
  46. package/dist/components/Alerts/collapse.js +209 -0
  47. package/dist/components/Alerts/collapse.module.js +5 -0
  48. package/dist/components/Alerts/collapse_module.css +71 -0
  49. package/dist/components/Alerts/compile.js +18 -5
  50. package/dist/components/Alerts/list.d.ts +4 -0
  51. package/dist/components/Alerts/list.js +25 -0
  52. package/dist/components/Alerts/list.module.js +5 -0
  53. package/dist/components/Alerts/list_module.css +5 -0
  54. package/dist/components/Alerts/overlay.js +67 -28
  55. package/dist/components/Alerts/overlay.module.js +5 -0
  56. package/dist/components/Alerts/overlay_module.css +11 -0
  57. package/dist/components/Card/index.d.ts +1 -1
  58. package/dist/components/Card/index.js +8 -18
  59. package/dist/components/Card/size.d.ts +1 -0
  60. package/dist/components/Card/size.js +99 -65
  61. package/dist/components/Card/size.module.js +5 -0
  62. package/dist/components/Card/size_module.css +34 -0
  63. package/dist/components/Card/statistic.d.ts +0 -2
  64. package/dist/components/Card/statistic.js +7 -5
  65. package/dist/components/Charts/TimelineCharts/index.d.ts +6 -1
  66. package/dist/components/Charts/TimelineCharts/index.js +208 -192
  67. package/dist/components/Charts/bootstrap.js +15 -10
  68. package/dist/components/Charts/common.d.ts +2 -0
  69. package/dist/components/Charts/common.js +18 -5
  70. package/dist/components/Charts/constants.d.ts +8 -1
  71. package/dist/components/Charts/constants.js +37 -41
  72. package/dist/components/Charts/done.js +14 -9
  73. package/dist/components/Charts/index.js +1 -1
  74. package/dist/components/Charts/loader.js +12 -2
  75. package/dist/components/Charts/minify.js +14 -9
  76. package/dist/components/Charts/utils.js +2 -2
  77. package/dist/components/CodeViewer/diff.js +8 -2
  78. package/dist/components/CodeViewer/viewer.js +0 -7
  79. package/dist/components/Configuration/builder.js +50 -36
  80. package/dist/components/Configuration/builder.module.js +5 -0
  81. package/dist/components/Configuration/builder_module.css +6 -0
  82. package/dist/components/FileTree/css.js +11 -0
  83. package/dist/components/FileTree/html.js +11 -0
  84. package/dist/components/FileTree/image.js +11 -0
  85. package/dist/components/FileTree/index.css +8 -0
  86. package/dist/components/FileTree/index.d.ts +1 -0
  87. package/dist/components/FileTree/index.js +65 -5
  88. package/dist/components/FileTree/js.js +11 -0
  89. package/dist/components/FileTree/unkown-file.js +11 -0
  90. package/dist/components/Form/keyword.js +3 -2
  91. package/dist/components/Keyword/index.js +38 -14
  92. package/dist/components/Keyword/style.module.js +5 -0
  93. package/dist/components/Keyword/style_module.css +5 -0
  94. package/dist/components/Layout/builder-select.js +37 -24
  95. package/dist/components/Layout/bundle-size-icon.js +10 -0
  96. package/dist/components/Layout/compile-icon.js +11 -0
  97. package/dist/components/Layout/header.css +7 -0
  98. package/dist/components/Layout/header.js +10 -17
  99. package/dist/components/Layout/menus.js +59 -64
  100. package/dist/components/Layout/overall-icon.js +10 -0
  101. package/dist/components/Layout/progress.js +2 -1
  102. package/dist/components/Loader/Analysis/files.js +187 -101
  103. package/dist/components/Loader/Analysis/index.js +34 -17
  104. package/dist/components/Loader/Analysis/input.js +11 -0
  105. package/dist/components/Loader/Analysis/output.js +12 -0
  106. package/dist/components/Loader/Analysis/style.module.js +5 -0
  107. package/dist/components/Loader/Analysis/style_module.css +73 -0
  108. package/dist/components/Loader/executions.js +95 -114
  109. package/dist/components/Loader/step.js +7 -0
  110. package/dist/components/Opener/code.js +2 -1
  111. package/dist/components/Overall/DataSummary.d.ts +8 -0
  112. package/dist/components/Overall/DataSummary.js +25 -0
  113. package/dist/components/Overall/DataSummary.module.js +5 -0
  114. package/dist/components/Overall/DataSummary_module.css +95 -0
  115. package/dist/components/Overall/bundle.d.ts +6 -1
  116. package/dist/components/Overall/bundle.js +208 -112
  117. package/dist/components/Overall/bundle.module.js +5 -0
  118. package/dist/components/Overall/bundle_module.css +67 -0
  119. package/dist/components/Overall/card_module.css +1 -4
  120. package/dist/components/Overall/compile.js +47 -41
  121. package/dist/components/Overall/compile.module.js +1 -1
  122. package/dist/components/Overall/compile_module.css +6 -0
  123. package/dist/components/Overall/help-center.d.ts +1 -0
  124. package/dist/components/Overall/help-center.js +86 -0
  125. package/dist/components/Overall/help-center.module.js +5 -0
  126. package/dist/components/Overall/help-center_module.css +35 -0
  127. package/dist/components/Overall/list.module.js +1 -1
  128. package/dist/components/Overall/list_module.css +14 -4
  129. package/dist/components/Overall/overview.d.ts +8 -0
  130. package/dist/components/Overall/overview.js +17 -0
  131. package/dist/components/Overall/overview.module.js +5 -0
  132. package/dist/components/Overall/overview_module.css +25 -0
  133. package/dist/components/Overall/project.d.ts +0 -1
  134. package/dist/components/Overall/project.js +101 -36
  135. package/dist/components/Overall/project.module.js +5 -0
  136. package/dist/components/Overall/project_module.css +19 -0
  137. package/dist/components/Select/index.css +6 -0
  138. package/dist/components/Select/index.d.ts +1 -0
  139. package/dist/components/Select/index.js +7 -4
  140. package/dist/components/TextDrawer/index.d.ts +2 -1
  141. package/dist/components/TextDrawer/index.js +38 -27
  142. package/dist/components/index.d.ts +0 -1
  143. package/dist/components/index.js +0 -1
  144. package/dist/constants.d.ts +1 -1
  145. package/dist/constants.js +1 -1
  146. package/dist/pages/BundleSize/components/asset.js +106 -124
  147. package/dist/pages/BundleSize/components/card.module.js +5 -0
  148. package/dist/pages/BundleSize/components/card_module.css +54 -0
  149. package/dist/pages/BundleSize/components/cards.js +157 -47
  150. package/dist/pages/BundleSize/components/index.js +129 -121
  151. package/dist/pages/BundleSize/components/index.module.js +5 -0
  152. package/dist/pages/BundleSize/components/index_module.css +82 -0
  153. package/dist/pages/ModuleAnalyze/components/fileTreeCom.css +13 -0
  154. package/dist/pages/ModuleAnalyze/components/fileTreeCom.d.ts +1 -1
  155. package/dist/pages/ModuleAnalyze/components/fileTreeCom.js +40 -63
  156. package/dist/pages/ModuleAnalyze/fileTree.d.ts +1 -0
  157. package/dist/pages/ModuleAnalyze/fileTree.js +36 -164
  158. package/dist/pages/ModuleAnalyze/index.css +7 -3
  159. package/dist/pages/ModuleAnalyze/index.d.ts +7 -1
  160. package/dist/pages/ModuleAnalyze/index.js +122 -45
  161. package/dist/pages/Overall/index.js +14 -9
  162. package/dist/pages/Overall/index.module.js +5 -0
  163. package/dist/pages/Overall/index_module.css +26 -0
  164. package/dist/pages/Overall/responsiveLayout.d.ts +6 -0
  165. package/dist/pages/Overall/responsiveLayout.js +9 -0
  166. package/dist/pages/Resources/BundleDiff/DiffContainer/modules.js +4 -4
  167. package/dist/pages/TreeShaking/editor.d.ts +3 -4
  168. package/dist/pages/TreeShaking/table.d.ts +3 -3
  169. package/dist/pages/TreeShaking/types.d.ts +2 -2
  170. package/dist/pages/TreeShaking/utils.d.ts +4 -5
  171. package/dist/pages/WebpackLoaders/Analysis/index.js +4 -1
  172. package/dist/pages/WebpackLoaders/Overall/index.js +8 -1
  173. package/dist/pages/WebpackPlugins/index.css +3 -0
  174. package/dist/pages/WebpackPlugins/index.d.ts +1 -0
  175. package/dist/pages/WebpackPlugins/index.js +61 -51
  176. package/dist/utils/data/brief.js +0 -2
  177. package/dist/utils/file.d.ts +4 -2
  178. package/dist/utils/file.js +40 -5
  179. package/dist/utils/i18n/cn.js +5 -0
  180. package/dist/utils/i18n/en.d.ts +5 -0
  181. package/dist/utils/i18n/en.js +5 -0
  182. package/package.json +8 -7
  183. package/dist/assets/connection-point.3b3c78ca.svg +0 -1
  184. package/dist/assets/webpack.98604d64.svg +0 -1
  185. package/dist/components/Alert/index.d.ts +0 -4
  186. package/dist/components/Alert/index.js +0 -34
  187. package/dist/components/Alert/link.d.ts +0 -3
  188. package/dist/components/Alert/link.js +0 -27
  189. package/dist/components/Alerts/common.js +0 -123
  190. package/dist/components/Card/statistic.css +0 -17
  191. package/dist/components/Overall/NumberButton.d.ts +0 -8
  192. package/dist/components/Overall/NumberButton.js +0 -29
  193. package/dist/components/Overall/NumberButton.module.js +0 -5
  194. package/dist/components/Overall/NumberButton_module.css +0 -70
  195. package/dist/components/Overall/bundle.module.css +0 -0
  196. package/dist/pages/Overall/responsiveGridList.d.ts +0 -6
  197. package/dist/pages/Overall/responsiveGridList.js +0 -28
@@ -0,0 +1,5 @@
1
+ import "./help-center_module.css";
2
+ var help_center_module_default = { "title": "title_a3408", "container": "container_a3408", "content": "content_a3408" };
3
+ export {
4
+ help_center_module_default as default
5
+ };
@@ -0,0 +1,35 @@
1
+ .title_a3408 {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+ position: relative;
6
+ height: 36px;
7
+ position: relative;
8
+ top: -12px;
9
+ font-size: 16px;
10
+ font-weight: 500;
11
+ line-height: 20px;
12
+ text-align: left;
13
+ text-underline-position: from-font;
14
+ text-decoration-skip-ink: none;
15
+ }
16
+
17
+ .container_a3408 {
18
+ display: flex;
19
+ justify-content: space-between;
20
+ flex-wrap: wrap;
21
+ }
22
+ .container_a3408 .content_a3408 {
23
+ cursor: pointer;
24
+ width: 48%;
25
+ transition: color 0.5s ease;
26
+ font-size: 14px;
27
+ font-weight: 400;
28
+ line-height: 16px;
29
+ text-align: left;
30
+ text-underline-position: from-font;
31
+ text-decoration-skip-ink: none;
32
+ }
33
+ .container_a3408 .content_a3408:hover {
34
+ color: #1677ff;
35
+ }
@@ -1,5 +1,5 @@
1
1
  import "./list_module.css";
2
- var list_module_default = { "root": "root_17e15" };
2
+ var list_module_default = { "projectOverall": "projectOverall_17e15", "bundleOverall": "bundleOverall_17e15" };
3
3
  export {
4
4
  list_module_default as default
5
5
  };
@@ -1,7 +1,17 @@
1
- .root_17e15 .ant-descriptions-item-label,
2
- .root_17e15 .ant-descriptions-item-content {
1
+ .projectOverall_17e15 .ant-descriptions-item-label,
2
+ .projectOverall_17e15 .ant-descriptions-item-content {
3
3
  font-size: 13px;
4
+ color: rgba(0, 0, 0, 0.6509803922);
4
5
  }
5
- .root_17e15 .ant-descriptions-item {
6
- padding-bottom: 6px !important;
6
+ .projectOverall_17e15 .ant-descriptions-item {
7
+ padding-bottom: 10px !important;
8
+ }
9
+
10
+ .bundleOverall_17e15 .ant-descriptions-item-label,
11
+ .bundleOverall_17e15 .ant-descriptions-item-content {
12
+ font-size: 13px;
13
+ color: rgba(0, 0, 0, 0.6509803922);
14
+ }
15
+ .bundleOverall_17e15 .ant-descriptions-item {
16
+ padding-bottom: 0px !important;
7
17
  }
@@ -0,0 +1,8 @@
1
+ interface OverviewProps {
2
+ title?: string | React.ReactNode;
3
+ description?: string | React.ReactNode;
4
+ icon?: React.ReactNode;
5
+ style?: React.CSSProperties;
6
+ }
7
+ export declare const Overview: (props: OverviewProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default Overview;
@@ -0,0 +1,17 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import styles from "./overview.module";
3
+ const Overview = (props) => {
4
+ const { title, description, icon, style } = props;
5
+ return /* @__PURE__ */ jsxs("div", { className: styles.container, style, children: [
6
+ /* @__PURE__ */ jsxs("div", { className: styles.content, children: [
7
+ /* @__PURE__ */ jsx("div", { className: styles.title, children: title }),
8
+ /* @__PURE__ */ jsx("div", { className: styles.description, children: description })
9
+ ] }),
10
+ icon
11
+ ] });
12
+ };
13
+ var overview_default = Overview;
14
+ export {
15
+ Overview,
16
+ overview_default as default
17
+ };
@@ -0,0 +1,5 @@
1
+ import "./overview_module.css";
2
+ var overview_module_default = { "container": "container_ec279", "content": "content_ec279", "title": "title_ec279", "description": "description_ec279" };
3
+ export {
4
+ overview_module_default as default
5
+ };
@@ -0,0 +1,25 @@
1
+ .container_ec279 {
2
+ width: 100%;
3
+ display: flex;
4
+ background: #f6f8fa;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ border-radius: 8px;
8
+ padding: 8px 20px 8px 20px;
9
+ margin-right: 10px;
10
+ white-space: nowrap;
11
+ }
12
+ .container_ec279 .content_ec279 {
13
+ flex: 1 1;
14
+ }
15
+ .container_ec279 .content_ec279 .title_ec279 {
16
+ font-size: 12px;
17
+ font-weight: 400;
18
+ line-height: 20px;
19
+ color: rgba(0, 0, 0, 0.6509803922);
20
+ }
21
+ .container_ec279 .content_ec279 .description_ec279 {
22
+ font-size: 24px;
23
+ font-weight: 500;
24
+ line-height: 32px;
25
+ }
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { SDK } from '@rsdoctor/types';
3
2
  export declare const ProjectOverall: React.FC<{
4
3
  configs: SDK.ConfigData;
@@ -1,15 +1,22 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Space, Row, Col, Descriptions } from "antd";
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { Descriptions, Avatar } from "antd";
3
+ import {
4
+ CloseCircleFilled,
5
+ WarningFilled,
6
+ FileFilled,
7
+ ExperimentFilled
8
+ } from "@ant-design/icons";
3
9
  import { filter } from "lodash-es";
4
- import { useI18n } from "../../utils";
10
+ import { ServerAPIProvider } from "../Manifest";
11
+ import { useI18n, formatSize } from "../../utils";
5
12
  import { WebpackConfigurationViewer } from "../Configuration";
6
13
  import { Card } from "../Card";
14
+ import { Overview } from "./overview";
15
+ import styles from "./project.module";
7
16
  import listStyles from "./list.module";
8
17
  import cardStyles from "./card.module";
9
- import numberButtonStyles from "./NumberButton.module";
10
- import { TextDrawer } from "../TextDrawer";
11
- import { BundleAlerts, CompileAlerts, OverlayAlertsWithTips } from "../Alerts";
12
- import { NumberButton } from "./NumberButton";
18
+ import projectStyles from "./project.module";
19
+ import { SDK } from "@rsdoctor/types";
13
20
  const ProjectOverall = ({ configs = [], cwd, envinfo, alerts = [] }) => {
14
21
  const { t } = useI18n();
15
22
  const warns = filter(alerts, (e) => e.level === "warn").length;
@@ -38,35 +45,93 @@ const ProjectOverall = ({ configs = [], cwd, envinfo, alerts = [] }) => {
38
45
  children: cwd
39
46
  }
40
47
  ];
41
- return /* @__PURE__ */ jsxs(Card, { title: t("Project Overall"), extra: /* @__PURE__ */ jsx(WebpackConfigurationViewer, {}), className: cardStyles.card, children: [
42
- /* @__PURE__ */ jsxs(Row, { gutter: 16, children: [
43
- /* @__PURE__ */ jsx(Col, { span: 12, className: numberButtonStyles.container, children: /* @__PURE__ */ jsx(
44
- TextDrawer,
45
- {
46
- button: /* @__PURE__ */ jsx(NumberButton, { theme: errors === 0 ? "success" : "error", number: errors, description: "Errors" }),
47
- drawerProps: { title: "Errors List" },
48
- children: /* @__PURE__ */ jsxs(Space, { direction: "vertical", style: { width: "100%" }, children: [
49
- /* @__PURE__ */ jsx(OverlayAlertsWithTips, { defaultOpen: false }),
50
- /* @__PURE__ */ jsx(BundleAlerts, { filter: (r) => r.level === "error" }),
51
- /* @__PURE__ */ jsx(CompileAlerts, { filter: (r) => r.level === "error" })
52
- ] })
53
- }
54
- ) }),
55
- /* @__PURE__ */ jsx(Col, { span: 12, className: numberButtonStyles.container, children: /* @__PURE__ */ jsx(
56
- TextDrawer,
57
- {
58
- button: /* @__PURE__ */ jsx(NumberButton, { theme: warns === 0 ? "success" : "warning", number: warns, description: "Warnings" }),
59
- drawerProps: { title: "Warnings List" },
60
- children: /* @__PURE__ */ jsxs(Space, { direction: "vertical", style: { width: "100%" }, children: [
61
- /* @__PURE__ */ jsx(OverlayAlertsWithTips, { defaultOpen: false }),
62
- /* @__PURE__ */ jsx(BundleAlerts, { filter: (r) => r.level === "warn" }),
63
- /* @__PURE__ */ jsx(CompileAlerts, { filter: (r) => r.level === "warn" })
64
- ] })
65
- }
66
- ) })
67
- ] }),
68
- /* @__PURE__ */ jsx(Descriptions, { className: listStyles.root, items, size: "small", column: 1 })
69
- ] });
48
+ return /* @__PURE__ */ jsx(
49
+ ServerAPIProvider,
50
+ {
51
+ api: SDK.ServerAPI.API.GetAssetsSummary,
52
+ body: { withFileContent: false },
53
+ children: (res) => {
54
+ const totalSizeStr = formatSize(res.all.total.size);
55
+ const totalFiles = res.all.total.count;
56
+ const [size, unit] = totalSizeStr.split(" ");
57
+ const overViewData = [
58
+ {
59
+ title: "Errors",
60
+ description: /* @__PURE__ */ jsx("span", { style: { color: "#FF4D4F" }, children: errors }),
61
+ icon: /* @__PURE__ */ jsx(
62
+ Avatar,
63
+ {
64
+ style: { background: "#FF4D4F" },
65
+ shape: "circle",
66
+ icon: /* @__PURE__ */ jsx(CloseCircleFilled, { style: { fontSize: "18px" } })
67
+ }
68
+ )
69
+ },
70
+ {
71
+ title: "Warnings",
72
+ description: /* @__PURE__ */ jsx("span", { style: { color: "#FAAD14" }, children: warns }),
73
+ icon: /* @__PURE__ */ jsx(
74
+ Avatar,
75
+ {
76
+ style: { background: "#FAAD14" },
77
+ shape: "circle",
78
+ icon: /* @__PURE__ */ jsx(WarningFilled, { style: { fontSize: "18px" } })
79
+ }
80
+ )
81
+ },
82
+ {
83
+ title: "Total Files",
84
+ description: /* @__PURE__ */ jsx("span", { children: totalFiles }),
85
+ icon: /* @__PURE__ */ jsx(
86
+ Avatar,
87
+ {
88
+ style: { background: "#3874F6" },
89
+ shape: "circle",
90
+ icon: /* @__PURE__ */ jsx(FileFilled, { style: { fontSize: "18px" } })
91
+ }
92
+ )
93
+ },
94
+ {
95
+ title: "Total Size",
96
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [
97
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "20px" }, children: size }),
98
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "13px", marginLeft: "5px" }, children: unit })
99
+ ] }),
100
+ icon: /* @__PURE__ */ jsx(
101
+ Avatar,
102
+ {
103
+ style: { background: "rgba(226, 129, 73)" },
104
+ shape: "circle",
105
+ icon: /* @__PURE__ */ jsx(ExperimentFilled, { style: { fontSize: "18px" } })
106
+ }
107
+ )
108
+ }
109
+ ];
110
+ return /* @__PURE__ */ jsx(Card, { className: cardStyles.card, children: /* @__PURE__ */ jsxs("div", { children: [
111
+ /* @__PURE__ */ jsxs("div", { className: styles.title, children: [
112
+ /* @__PURE__ */ jsx("span", { className: styles.left, children: t("Project Overall") }),
113
+ /* @__PURE__ */ jsx(WebpackConfigurationViewer, {})
114
+ ] }),
115
+ /* @__PURE__ */ jsx("div", { className: projectStyles.overview, children: overViewData.map((data, idx) => /* @__PURE__ */ jsx(
116
+ Overview,
117
+ {
118
+ title: data.title,
119
+ description: /* @__PURE__ */ jsx("span", { children: data.description }),
120
+ icon: data.icon
121
+ },
122
+ idx
123
+ )) }),
124
+ /* @__PURE__ */ jsx(
125
+ Descriptions,
126
+ {
127
+ className: listStyles.projectOverall,
128
+ items
129
+ }
130
+ )
131
+ ] }) });
132
+ }
133
+ }
134
+ );
70
135
  };
71
136
  export {
72
137
  ProjectOverall
@@ -0,0 +1,5 @@
1
+ import "./project_module.css";
2
+ var project_module_default = { "overview": "overview_57654", "title": "title_57654", "left": "left_57654" };
3
+ export {
4
+ project_module_default as default
5
+ };
@@ -0,0 +1,19 @@
1
+ .overview_57654 {
2
+ display: flex;
3
+ margin-bottom: 19px;
4
+ }
5
+
6
+ .title_57654 {
7
+ display: flex;
8
+ justify-content: space-between;
9
+ align-items: center;
10
+ padding-bottom: 20px;
11
+ }
12
+ .title_57654 .left_57654 {
13
+ font-size: 16px;
14
+ font-weight: 500;
15
+ line-height: 24px;
16
+ text-align: left;
17
+ text-underline-position: from-font;
18
+ text-decoration-skip-ink: none;
19
+ }
@@ -0,0 +1,6 @@
1
+ .loader-select .ant-select-selector {
2
+ width: 300px;
3
+ }
4
+ .layer-select .ant-select-selector {
5
+ width: 150px;
6
+ }
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import './index.scss';
2
3
  interface LoaderNamesSelectProps {
3
4
  style?: React.CSSProperties;
4
5
  onChange: (loaders: string[]) => void;
@@ -6,6 +6,7 @@ import { KeywordInput } from "../Form/keyword";
6
6
  import { Size } from "../../constants";
7
7
  import { ServerAPIProvider } from "../Manifest";
8
8
  import { SDK } from "@rsdoctor/types";
9
+ import "./index.css";
9
10
  const LoaderNamesSelect = ({
10
11
  style,
11
12
  onChange,
@@ -24,8 +25,9 @@ const LoaderNamesSelect = ({
24
25
  mode: "multiple",
25
26
  allowClear: true,
26
27
  defaultValue: selectLoaders,
28
+ className: "loader-select",
27
29
  style: { width: 300 },
28
- dropdownMatchSelectWidth: true,
30
+ popupMatchSelectWidth: 300,
29
31
  placeholder: "select loaders",
30
32
  onChange: (e) => {
31
33
  setSelectLoaders(e);
@@ -50,6 +52,7 @@ const LoaderLayerSelect = ({ onChange, layers }) => {
50
52
  Select,
51
53
  {
52
54
  allowClear: true,
55
+ className: "layer-select",
53
56
  style: { width: 150 },
54
57
  defaultValue: layer,
55
58
  placeholder: "select layer",
@@ -71,12 +74,12 @@ const LoaderCommonSelect = ({ onChange, loaderNames }) => {
71
74
  useEffect(() => {
72
75
  onChange({ loaders: selectLoaders, filename, layer });
73
76
  }, [selectLoaders, filename, layer]);
74
- return /* @__PURE__ */ jsxs(Row, { style: { marginBottom: Size.BasePadding }, children: [
77
+ return /* @__PURE__ */ jsxs(Row, { style: { marginBottom: Size.BasePadding, marginLeft: 10 }, children: [
75
78
  /* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsx(
76
79
  LoaderNamesSelect,
77
80
  {
78
81
  loaderNames,
79
- style: { marginRight: Size.BasePadding / 2 },
82
+ style: { marginRight: Size.BasePadding },
80
83
  onChange: (e) => {
81
84
  setSelectLoaders(e);
82
85
  }
@@ -86,7 +89,7 @@ const LoaderCommonSelect = ({ onChange, loaderNames }) => {
86
89
  KeywordInput,
87
90
  {
88
91
  icon: /* @__PURE__ */ jsx(FileSearchOutlined, {}),
89
- style: { marginRight: Size.BasePadding / 2 },
92
+ style: { marginRight: Size.BasePadding },
90
93
  label: "Filename",
91
94
  placeholder: "search filename by keyword",
92
95
  onChange: (e) => {
@@ -1,11 +1,12 @@
1
1
  import { ButtonProps, DrawerProps } from 'antd';
2
- import React, { CSSProperties, PropsWithChildren } from 'react';
2
+ import React, { CSSProperties, HTMLAttributes, PropsWithChildren } from 'react';
3
3
  export interface TextDrawerProps {
4
4
  text?: string | React.ReactNode;
5
5
  button?: React.ReactNode;
6
6
  buttonProps?: ButtonProps;
7
7
  buttonStyle?: CSSProperties;
8
8
  drawerProps?: DrawerProps;
9
+ containerProps?: HTMLAttributes<HTMLDivElement>;
9
10
  }
10
11
  export declare const TextDrawer: (props: PropsWithChildren<TextDrawerProps>) => JSX.Element;
11
12
  export * from './duplicate';
@@ -1,34 +1,45 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { CodeOutlined } from "@ant-design/icons";
2
3
  import { Button, Drawer } from "antd";
3
- import React, { useState } from "react";
4
- import { drawerWidth } from "../../constants";
4
+ import {
5
+ useState
6
+ } from "react";
5
7
  const TextDrawer = (props) => {
6
8
  const [visible, setVisible] = useState(false);
7
- return /* @__PURE__ */ jsxs(React.Fragment, { children: [
8
- props.button ? /* @__PURE__ */ jsx("div", { onClick: () => setVisible(!visible), children: props.button }) : /* @__PURE__ */ jsx(
9
- Button,
10
- {
11
- type: "link",
12
- ...props.buttonProps,
13
- onClick: () => setVisible(!visible),
14
- style: { padding: 0, ...props.buttonStyle },
15
- children: props.text
16
- }
17
- ),
18
- /* @__PURE__ */ jsx(
19
- Drawer,
20
- {
21
- maskClosable: true,
22
- width: drawerWidth,
23
- zIndex: 999,
24
- ...props.drawerProps,
25
- open: visible,
26
- onClose: () => setVisible(false),
27
- destroyOnClose: true,
28
- children: props.children
29
- }
30
- )
31
- ] });
9
+ return (
10
+ // avoid propagation event affect collapse component
11
+ /* @__PURE__ */ jsxs("div", { onClick: (e) => e.stopPropagation(), ...props.containerProps, children: [
12
+ props.button ? /* @__PURE__ */ jsx("div", { onClick: () => setVisible(!visible), children: props.button }) : props.text ? /* @__PURE__ */ jsx(
13
+ Button,
14
+ {
15
+ type: "link",
16
+ ...props.buttonProps,
17
+ onClick: () => setVisible(!visible),
18
+ style: { padding: 0, ...props.buttonStyle },
19
+ children: props.text
20
+ }
21
+ ) : /* @__PURE__ */ jsx(
22
+ CodeOutlined,
23
+ {
24
+ style: { fontSize: 14, padding: 0 },
25
+ onClick: () => setVisible(!visible)
26
+ }
27
+ ),
28
+ /* @__PURE__ */ jsx(
29
+ Drawer,
30
+ {
31
+ maskClosable: true,
32
+ zIndex: 999,
33
+ width: "60%",
34
+ ...props.drawerProps,
35
+ open: visible,
36
+ onClose: () => setVisible(false),
37
+ destroyOnClose: true,
38
+ children: props.children
39
+ }
40
+ )
41
+ ] })
42
+ );
32
43
  };
33
44
  export * from "./duplicate";
34
45
  export {
@@ -1,4 +1,3 @@
1
- export * from './Alert';
2
1
  export * from './Alerts';
3
2
  export * from './Badge';
4
3
  export * from './Card';
@@ -1,4 +1,3 @@
1
- export * from "./Alert";
2
1
  export * from "./Alerts";
3
2
  export * from "./Badge";
4
3
  export * from "./Card";
@@ -27,7 +27,7 @@ export declare enum APILoaderMode4Dev {
27
27
  Default = "default"
28
28
  }
29
29
  export declare enum Size {
30
- BasePadding = 24,
30
+ BasePadding = 20,
31
31
  BaseBorderRadius = 8,
32
32
  NavBarHeight = 54
33
33
  }
package/dist/constants.js CHANGED
@@ -33,7 +33,7 @@ var APILoaderMode4Dev = /* @__PURE__ */ ((APILoaderMode4Dev2) => {
33
33
  return APILoaderMode4Dev2;
34
34
  })(APILoaderMode4Dev || {});
35
35
  var Size = /* @__PURE__ */ ((Size2) => {
36
- Size2[Size2["BasePadding"] = 24] = "BasePadding";
36
+ Size2[Size2["BasePadding"] = 20] = "BasePadding";
37
37
  Size2[Size2["BaseBorderRadius"] = 8] = "BaseBorderRadius";
38
38
  Size2[Size2["NavBarHeight"] = 54] = "NavBarHeight";
39
39
  return Size2;