@module-federation/devtools 0.22.0 → 0.23.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/dist/es/App.css +13 -0
- package/dist/es/App.js +461 -21
- package/dist/es/App.module.js +1 -1
- package/dist/es/App_module.css +293 -5
- package/dist/es/component/DependencyGraph/index.js +204 -0
- package/dist/es/component/DependencyGraph/index.module.js +5 -0
- package/dist/es/component/DependencyGraph/index_module.css +100 -0
- package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +20 -9
- package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
- package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/es/component/Form/index.js +192 -117
- package/dist/es/component/Form/index.module.js +1 -1
- package/dist/es/component/Form/index_module.css +176 -25
- package/dist/es/component/LanguageSwitch.js +50 -0
- package/dist/es/component/Layout/index.js +296 -49
- package/dist/es/component/Layout/index.module.js +1 -1
- package/dist/es/component/Layout/index_module.css +52 -32
- package/dist/es/component/ModuleInfo/index.js +313 -0
- package/dist/es/component/ModuleInfo/index.module.js +5 -0
- package/dist/es/component/ModuleInfo/index_module.css +184 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/es/component/SharedDepsExplorer/index.js +495 -0
- package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
- package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
- package/dist/es/component/ThemeToggle.js +19 -0
- package/dist/es/component/ThemeToggle.module.js +5 -0
- package/dist/es/component/ThemeToggle_module.css +12 -0
- package/dist/es/hooks/useDevtoolsTheme.js +77 -0
- package/dist/es/i18n/index.js +506 -0
- package/dist/es/template/constant.js +3 -19
- package/dist/es/utils/chrome/index.js +91 -38
- package/dist/es/utils/chrome/messages.js +6 -0
- package/dist/es/utils/chrome/override-remote.js +42 -0
- package/dist/es/utils/chrome/post-message-listener.js +2 -1
- package/dist/es/utils/chrome/post-message-start.js +10 -2
- package/dist/es/utils/chrome/storage.js +6 -1
- package/dist/es/utils/sdk/graph.js +25 -4
- package/dist/es/utils/sdk/index.js +9 -0
- package/dist/es/worker/index.js +168 -1
- package/dist/lib/App.css +13 -0
- package/dist/lib/App.js +451 -18
- package/dist/lib/App.module.js +1 -1
- package/dist/lib/App_module.css +293 -5
- package/dist/lib/component/DependencyGraph/index.js +226 -0
- package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
- package/dist/lib/component/DependencyGraph/index_module.css +100 -0
- package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +23 -12
- package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
- package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/lib/component/Form/index.js +189 -115
- package/dist/lib/component/Form/index.module.js +1 -1
- package/dist/lib/component/Form/index_module.css +176 -25
- package/dist/lib/component/LanguageSwitch.js +80 -0
- package/dist/lib/component/Layout/index.js +290 -47
- package/dist/lib/component/Layout/index.module.js +1 -1
- package/dist/lib/component/Layout/index_module.css +52 -32
- package/dist/lib/component/ModuleInfo/index.js +343 -0
- package/dist/lib/component/ModuleInfo/index.module.js +25 -0
- package/dist/lib/component/ModuleInfo/index_module.css +184 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +65 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +25 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/lib/component/SharedDepsExplorer/index.js +502 -0
- package/dist/lib/component/SharedDepsExplorer/index.module.js +25 -0
- package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
- package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
- package/dist/lib/component/ThemeToggle.js +49 -0
- package/dist/lib/component/ThemeToggle.module.js +25 -0
- package/dist/lib/component/ThemeToggle_module.css +12 -0
- package/dist/lib/hooks/useDevtoolsTheme.js +101 -0
- package/dist/lib/i18n/index.js +540 -0
- package/dist/lib/template/constant.js +4 -17
- package/dist/lib/utils/chrome/index.js +94 -38
- package/dist/lib/utils/chrome/messages.js +31 -0
- package/dist/lib/utils/chrome/override-remote.js +65 -0
- package/dist/lib/utils/chrome/post-message-listener.js +2 -1
- package/dist/lib/utils/chrome/post-message-start.js +10 -2
- package/dist/lib/utils/chrome/storage.js +5 -0
- package/dist/lib/utils/sdk/graph.js +25 -4
- package/dist/lib/utils/sdk/index.js +10 -0
- package/dist/lib/worker/index.js +156 -1
- package/dist/types/src/App.d.ts +2 -1
- package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
- package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
- package/dist/types/src/component/Form/index.d.ts +2 -0
- package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
- package/dist/types/src/component/Layout/index.d.ts +0 -1
- package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
- package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
- package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
- package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
- package/dist/types/src/component/ThemeToggle.d.ts +8 -0
- package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
- package/dist/types/src/i18n/index.d.ts +5 -0
- package/dist/types/src/init.d.ts +0 -1
- package/dist/types/src/template/constant.d.ts +2 -5
- package/dist/types/src/utils/chrome/index.d.ts +5 -3
- package/dist/types/src/utils/chrome/messages.d.ts +2 -0
- package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
- package/dist/types/src/utils/chrome/storage.d.ts +5 -4
- package/dist/types/src/utils/sdk/graph.d.ts +2 -1
- package/dist/types/src/utils/sdk/index.d.ts +1 -0
- package/dist/types/src/utils/types/common.d.ts +4 -0
- package/dist/types/src/worker/index.d.ts +1 -0
- package/package.json +18 -14
- package/dist/es/component/Graph/index.js +0 -127
- package/dist/es/component/Graph/index.module.js +0 -5
- package/dist/es/component/Graph/index_module.css +0 -12
- package/dist/es/component/GraphItem/index.module.js +0 -5
- package/dist/es/component/GraphItem/index_module.css +0 -61
- package/dist/lib/component/Graph/index.js +0 -149
- package/dist/lib/component/Graph/index_module.css +0 -12
- package/dist/lib/component/GraphItem/index_module.css +0 -61
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.Wrapper_d8079 {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 320px;
|
|
4
|
+
border-radius: 18px;
|
|
5
|
+
border: 1px solid var(--color-border-1, rgba(96, 165, 250, 0.3));
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
box-shadow: 0 18px 32px rgba(8, 11, 25, 0.35);
|
|
8
|
+
background: linear-gradient(140deg, var(--mf-accent, rgba(243, 244, 246, 0.9)) 0%, rgba(229, 231, 235, 0.7) 45%, rgba(255, 255, 255, 0.95) 100%), var(--color-bg-2, rgba(255, 255, 255, 0.9));
|
|
9
|
+
color: var(--color-text-1, #1f2937);
|
|
10
|
+
backdrop-filter: blur(4px);
|
|
11
|
+
}
|
|
12
|
+
.Wrapper_d8079 .react-flow__handle {
|
|
13
|
+
width: 10px;
|
|
14
|
+
height: 10px;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
border: 2px solid rgba(96, 165, 250, 0.3);
|
|
17
|
+
background: rgba(243, 244, 246, 0.9);
|
|
18
|
+
box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
|
|
19
|
+
}
|
|
20
|
+
.Wrapper_d8079 .container_d8079 {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
width: 100%;
|
|
24
|
+
padding-bottom: 8px;
|
|
25
|
+
}
|
|
26
|
+
.Wrapper_d8079 .group_d8079 {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
padding: 12px;
|
|
31
|
+
background: var(--mf-accent, rgba(243, 244, 246, 0.9));
|
|
32
|
+
}
|
|
33
|
+
.Wrapper_d8079 .name_d8079 {
|
|
34
|
+
font-size: 15px;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
letter-spacing: 0.02em;
|
|
37
|
+
color: white;
|
|
38
|
+
}
|
|
39
|
+
.Wrapper_d8079 .info_d8079 {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: 10px;
|
|
43
|
+
margin: 0 12px;
|
|
44
|
+
padding: 12px;
|
|
45
|
+
border-radius: 14px;
|
|
46
|
+
background: rgba(243, 244, 246, 0.4);
|
|
47
|
+
border: 1px solid rgba(96, 165, 250, 0.3);
|
|
48
|
+
font-size: 11px;
|
|
49
|
+
}
|
|
50
|
+
.Wrapper_d8079 .expose-container_d8079 {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: 6px;
|
|
54
|
+
}
|
|
55
|
+
.Wrapper_d8079 .expose-container_d8079 div {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-wrap: wrap;
|
|
58
|
+
gap: 6px;
|
|
59
|
+
}
|
|
60
|
+
.Wrapper_d8079 .type_d8079 {
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
text-transform: uppercase;
|
|
64
|
+
letter-spacing: 0.04em;
|
|
65
|
+
color: var(--color-text-2, #4b5563);
|
|
66
|
+
}
|
|
67
|
+
.Wrapper_d8079 .item_d8079 {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
padding: 4px 8px;
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
background: rgba(243, 244, 246, 0.6);
|
|
73
|
+
color: var(--color-text-1, #1f2937);
|
|
74
|
+
font-size: 10px;
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
margin-right: 6px;
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
box-shadow: 0 4px 10px rgba(8, 11, 25, 0.45);
|
|
82
|
+
}
|
|
83
|
+
.Wrapper_d8079 .message_d8079 {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 6px;
|
|
87
|
+
font-size: 11px;
|
|
88
|
+
color: var(--color-text-2, #4b5563);
|
|
89
|
+
}
|
|
90
|
+
.Wrapper_d8079 .message_d8079 .item_d8079 {
|
|
91
|
+
margin-right: 0;
|
|
92
|
+
padding: 4px 10px;
|
|
93
|
+
background: rgba(243, 244, 246, 0.6);
|
|
94
|
+
color: var(--color-text-1, #1f2937);
|
|
95
|
+
}
|
|
@@ -18,9 +18,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import {
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
22
|
import { useEffect } from "react";
|
|
23
|
-
import { flushSync } from "react-dom";
|
|
24
23
|
import {
|
|
25
24
|
Checkbox,
|
|
26
25
|
Button,
|
|
@@ -31,10 +30,12 @@ import {
|
|
|
31
30
|
Select,
|
|
32
31
|
Switch
|
|
33
32
|
} from "@arco-design/web-react";
|
|
33
|
+
import { useTranslation } from "react-i18next";
|
|
34
34
|
import {
|
|
35
35
|
IconDelete,
|
|
36
36
|
IconPlus,
|
|
37
|
-
IconInfoCircle
|
|
37
|
+
IconInfoCircle,
|
|
38
|
+
IconQuestionCircle
|
|
38
39
|
} from "@arco-design/web-react/icon";
|
|
39
40
|
import { defaultDataItem, proxyFormField } from "../../template/constant";
|
|
40
41
|
import {
|
|
@@ -60,13 +61,20 @@ const FormComponent = (props) => {
|
|
|
60
61
|
versionList,
|
|
61
62
|
setVersionList,
|
|
62
63
|
getVersion,
|
|
63
|
-
customValueValidate
|
|
64
|
+
customValueValidate,
|
|
65
|
+
enableClip,
|
|
66
|
+
onClipChange
|
|
64
67
|
} = props;
|
|
65
|
-
const {
|
|
68
|
+
const { t } = useTranslation();
|
|
69
|
+
const federation = window.__FEDERATION__ || {
|
|
70
|
+
moduleInfo: {},
|
|
71
|
+
originModuleInfo: {}
|
|
72
|
+
};
|
|
73
|
+
const { moduleInfo } = federation;
|
|
66
74
|
let { producer } = separateType(moduleInfo);
|
|
67
75
|
const filterDupMap = /* @__PURE__ */ new Map();
|
|
68
|
-
producer = producer.filter((
|
|
69
|
-
const [typeOrName, name] =
|
|
76
|
+
producer = producer.filter((tItem) => {
|
|
77
|
+
const [typeOrName, name] = tItem.split(":");
|
|
70
78
|
const marked = filterDupMap.get(name || typeOrName);
|
|
71
79
|
filterDupMap.set(name || typeOrName, true);
|
|
72
80
|
return !marked;
|
|
@@ -113,12 +121,17 @@ const FormComponent = (props) => {
|
|
|
113
121
|
}
|
|
114
122
|
if (key) {
|
|
115
123
|
statusSet[index].keyStatus = true;
|
|
116
|
-
|
|
117
|
-
|
|
124
|
+
setTimeout(() => {
|
|
125
|
+
setFormStatus(statusSet);
|
|
126
|
+
callback();
|
|
127
|
+
}, 0);
|
|
128
|
+
return;
|
|
118
129
|
}
|
|
119
130
|
statusSet[index].keyStatus = false;
|
|
120
|
-
|
|
121
|
-
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
setFormStatus(statusSet);
|
|
133
|
+
}, 0);
|
|
134
|
+
return callback(t("form.validation.moduleNameRequired"));
|
|
122
135
|
};
|
|
123
136
|
const validateValue = (value, callback, index) => {
|
|
124
137
|
const status = getCheckStatus(index);
|
|
@@ -134,14 +147,17 @@ const FormComponent = (props) => {
|
|
|
134
147
|
}
|
|
135
148
|
if (validateCustom(value) || validateSemver(value) || validatePort(value) || (customValueValidate == null ? void 0 : customValueValidate(value))) {
|
|
136
149
|
statusSet[index].valueStatus = true;
|
|
137
|
-
|
|
138
|
-
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
setFormStatus(statusSet);
|
|
152
|
+
callback();
|
|
153
|
+
}, 0);
|
|
154
|
+
return;
|
|
139
155
|
}
|
|
140
156
|
statusSet[index].valueStatus = false;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
);
|
|
157
|
+
setTimeout(() => {
|
|
158
|
+
setFormStatus(statusSet);
|
|
159
|
+
}, 0);
|
|
160
|
+
return callback(t("form.validation.moduleInfoInvalid"));
|
|
145
161
|
};
|
|
146
162
|
const onAdd = (add) => {
|
|
147
163
|
add(defaultDataItem);
|
|
@@ -158,6 +174,9 @@ const FormComponent = (props) => {
|
|
|
158
174
|
const hmrChange = (on) => {
|
|
159
175
|
onHMRChange(on);
|
|
160
176
|
};
|
|
177
|
+
const handleSwitchChange = (on) => {
|
|
178
|
+
onClipChange(on);
|
|
179
|
+
};
|
|
161
180
|
const onKeyChange = (key, index) => __async(void 0, null, function* () {
|
|
162
181
|
const version = yield getVersion == null ? void 0 : getVersion(key);
|
|
163
182
|
if (version) {
|
|
@@ -166,120 +185,176 @@ const FormComponent = (props) => {
|
|
|
166
185
|
setVersionList == null ? void 0 : setVersionList(list);
|
|
167
186
|
}
|
|
168
187
|
});
|
|
169
|
-
return /* @__PURE__ */ jsx(FormList, { field: proxyFormField, children: (fields, { add, remove }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
170
|
-
/* @__PURE__ */ jsxs("div", { className: styles.
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
),
|
|
189
|
-
/* @__PURE__ */ jsxs("div", { className: styles.
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */ jsx("span", { className: styles.message, children: condition.message }),
|
|
192
|
-
/* @__PURE__ */ jsxs("span", { className: styles.headerSlot, children: [
|
|
188
|
+
return /* @__PURE__ */ jsx(FormList, { field: proxyFormField, children: (fields, { add, remove }) => /* @__PURE__ */ jsxs("div", { className: styles.wrapper, children: [
|
|
189
|
+
/* @__PURE__ */ jsxs("div", { className: styles.sectionHeader, children: [
|
|
190
|
+
/* @__PURE__ */ jsxs("div", { className: styles.heading, children: [
|
|
191
|
+
/* @__PURE__ */ jsxs("div", { className: styles.titleRow, children: [
|
|
192
|
+
/* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx("div", { children: t("form.tooltip.proxyExample") }), children: /* @__PURE__ */ jsx(IconInfoCircle, {}) }),
|
|
193
|
+
/* @__PURE__ */ jsx("span", { className: styles.title, children: t("form.title") }),
|
|
194
|
+
/* @__PURE__ */ jsxs(
|
|
195
|
+
"span",
|
|
196
|
+
{
|
|
197
|
+
className: styles.statusMessage,
|
|
198
|
+
style: { marginLeft: 8 },
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ jsx(Badge, { color: condition.color, className: styles.badge }),
|
|
201
|
+
condition.message
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
)
|
|
205
|
+
] }),
|
|
206
|
+
/* @__PURE__ */ jsx("span", { className: styles.subtitle, children: t("form.subtitle") })
|
|
207
|
+
] }),
|
|
208
|
+
/* @__PURE__ */ jsxs("div", { className: styles.headerActions, children: [
|
|
209
|
+
/* @__PURE__ */ jsxs("span", { className: styles.hmrArea, children: [
|
|
193
210
|
props.headerSlot,
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
Switch,
|
|
213
|
+
{
|
|
214
|
+
checked: enableClip,
|
|
215
|
+
checkedText: t("form.clip.enable"),
|
|
216
|
+
uncheckedText: t("form.clip.disable"),
|
|
217
|
+
onChange: handleSwitchChange,
|
|
218
|
+
className: styles.switch
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
/* @__PURE__ */ jsx(Tooltip, { content: t("form.clip.tooltip"), children: /* @__PURE__ */ jsx(
|
|
222
|
+
IconQuestionCircle,
|
|
223
|
+
{
|
|
224
|
+
style: { marginLeft: 5, cursor: "pointer" }
|
|
225
|
+
}
|
|
226
|
+
) }),
|
|
227
|
+
/* @__PURE__ */ jsx("div", { className: styles.divider }),
|
|
194
228
|
/* @__PURE__ */ jsx(
|
|
195
229
|
Switch,
|
|
196
230
|
{
|
|
197
231
|
checked: enableHMR === "enable",
|
|
198
|
-
checkedText: "
|
|
199
|
-
uncheckedText: "
|
|
232
|
+
checkedText: t("form.hmr.enable"),
|
|
233
|
+
uncheckedText: t("form.hmr.disable"),
|
|
200
234
|
onChange: hmrChange,
|
|
201
235
|
className: styles.switch
|
|
202
236
|
}
|
|
203
237
|
)
|
|
204
|
-
] })
|
|
238
|
+
] }),
|
|
239
|
+
/* @__PURE__ */ jsx(
|
|
240
|
+
Button,
|
|
241
|
+
{
|
|
242
|
+
icon: /* @__PURE__ */ jsx(IconPlus, {}),
|
|
243
|
+
shape: "circle",
|
|
244
|
+
className: styles.add,
|
|
245
|
+
onClick: () => onAdd(add),
|
|
246
|
+
"data-set-e2e": "e2eAdd"
|
|
247
|
+
}
|
|
248
|
+
)
|
|
205
249
|
] })
|
|
206
250
|
] }),
|
|
207
|
-
fields.length ? /* @__PURE__ */ jsx(
|
|
251
|
+
fields.length ? /* @__PURE__ */ jsx("div", { className: styles.rules, children: fields.map((item, index) => {
|
|
208
252
|
var _a, _b;
|
|
209
|
-
return /* @__PURE__ */ jsxs(
|
|
210
|
-
"div",
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
rules: [
|
|
250
|
-
{
|
|
251
|
-
validator: (value, cb) => validateValue(value, cb, index)
|
|
253
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.ruleCard, children: [
|
|
254
|
+
/* @__PURE__ */ jsxs("div", { className: styles.ruleHeader, children: [
|
|
255
|
+
/* @__PURE__ */ jsx(
|
|
256
|
+
FormItem,
|
|
257
|
+
{
|
|
258
|
+
field: `${item.field}.checked`,
|
|
259
|
+
triggerPropName: "checked",
|
|
260
|
+
children: /* @__PURE__ */ jsx(Checkbox, { className: styles.toggle })
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ jsx(
|
|
264
|
+
Button,
|
|
265
|
+
{
|
|
266
|
+
icon: /* @__PURE__ */ jsx(IconDelete, {}),
|
|
267
|
+
shape: "circle",
|
|
268
|
+
status: "danger",
|
|
269
|
+
className: styles.delete,
|
|
270
|
+
"data-set-e2e": "e2eDelete",
|
|
271
|
+
onClick: () => onRemove(remove, index)
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
] }),
|
|
275
|
+
/* @__PURE__ */ jsxs("div", { className: styles.inputs, "data-set-e2e": "e2eProxyItem", children: [
|
|
276
|
+
/* @__PURE__ */ jsx(
|
|
277
|
+
FormItem,
|
|
278
|
+
{
|
|
279
|
+
field: `${item.field}.key`,
|
|
280
|
+
rules: [
|
|
281
|
+
{
|
|
282
|
+
validator: (value, cb) => {
|
|
283
|
+
const isValid = Boolean(value);
|
|
284
|
+
if (isValid) {
|
|
285
|
+
cb();
|
|
286
|
+
validateKey(value, () => {
|
|
287
|
+
}, index);
|
|
288
|
+
} else {
|
|
289
|
+
cb(t("form.validation.moduleNameRequired"));
|
|
290
|
+
validateKey(value, () => {
|
|
291
|
+
}, index);
|
|
292
|
+
}
|
|
252
293
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
className: styles.field,
|
|
297
|
+
children: /* @__PURE__ */ jsx(
|
|
298
|
+
Select,
|
|
299
|
+
{
|
|
300
|
+
"data-set-e2e": "e2eProxyKey",
|
|
301
|
+
placeholder: t("form.fields.moduleName.placeholder"),
|
|
302
|
+
onChange: (key) => onKeyChange(key, index),
|
|
303
|
+
allowClear: true,
|
|
304
|
+
showSearch: true,
|
|
305
|
+
dropdownMenuClassName: styles.dropdown,
|
|
306
|
+
children: formatProducer.map((option) => /* @__PURE__ */ jsx(Option, { value: option.value, children: option.label }, option.value))
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
}
|
|
310
|
+
),
|
|
311
|
+
/* @__PURE__ */ jsx(
|
|
312
|
+
FormItem,
|
|
313
|
+
{
|
|
314
|
+
field: `${item.field}.value`,
|
|
315
|
+
rules: [
|
|
316
|
+
{
|
|
317
|
+
validator: (value, cb) => {
|
|
318
|
+
const isValid = validateCustom(value) || validateSemver(value) || validatePort(value) || (customValueValidate == null ? void 0 : customValueValidate(value));
|
|
319
|
+
if (isValid) {
|
|
320
|
+
cb();
|
|
321
|
+
validateValue(value, () => {
|
|
322
|
+
}, index);
|
|
323
|
+
} else {
|
|
324
|
+
cb(t("form.validation.moduleInfoInvalid"));
|
|
325
|
+
validateValue(value, () => {
|
|
326
|
+
}, index);
|
|
327
|
+
}
|
|
263
328
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
className: styles.field,
|
|
332
|
+
children: /* @__PURE__ */ jsx(
|
|
333
|
+
Select,
|
|
334
|
+
{
|
|
335
|
+
"data-set-e2e": "e2eProxyValue",
|
|
336
|
+
placeholder: t(
|
|
337
|
+
"form.fields.customManifest.placeholder"
|
|
338
|
+
),
|
|
339
|
+
allowClear: true,
|
|
340
|
+
showSearch: true,
|
|
341
|
+
allowCreate: true,
|
|
342
|
+
dropdownMenuClassName: styles.dropdown,
|
|
343
|
+
children: (_b = (_a = versionList || []) == null ? void 0 : _a[index]) == null ? void 0 : _b.map((version) => /* @__PURE__ */ jsx(Option, { value: version, children: version }, version))
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
] })
|
|
349
|
+
] }, item.field);
|
|
350
|
+
}) }) : /* @__PURE__ */ jsx("div", { className: styles.emptyWrapper, children: /* @__PURE__ */ jsx(
|
|
351
|
+
Empty,
|
|
352
|
+
{
|
|
353
|
+
description: t("form.empty.description"),
|
|
354
|
+
className: styles.empty
|
|
355
|
+
}
|
|
356
|
+
) }),
|
|
357
|
+
/* @__PURE__ */ jsx("div", { className: styles.footerHint, children: t("form.footer.hint") })
|
|
283
358
|
] }) });
|
|
284
359
|
};
|
|
285
360
|
var Form_default = FormComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./index_module.css";
|
|
2
|
-
var index_module_default = { "
|
|
2
|
+
var index_module_default = { "wrapper": "wrapper_20b79", "sectionHeader": "sectionHeader_20b79", "heading": "heading_20b79", "titleRow": "titleRow_20b79", "title": "title_20b79", "subtitle": "subtitle_20b79", "headerActions": "headerActions_20b79", "badge": "badge_20b79", "statusMessage": "statusMessage_20b79", "divider": "divider_20b79", "hmrArea": "hmrArea_20b79", "switch": "switch_20b79", "rules": "rules_20b79", "ruleCard": "ruleCard_20b79", "ruleHeader": "ruleHeader_20b79", "toggle": "toggle_20b79", "inputs": "inputs_20b79", "field": "field_20b79", "dropdown": "dropdown_20b79", "delete": "delete_20b79", "emptyWrapper": "emptyWrapper_20b79", "empty": "empty_20b79", "footerHint": "footerHint_20b79" };
|
|
3
3
|
export {
|
|
4
4
|
index_module_default as default
|
|
5
5
|
};
|