@lmzhen/dsh-evolution-merge-ui 0.32.6 → 0.33.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/lib/client.js
CHANGED
|
@@ -686,6 +686,7 @@ window.__ModuleLoader__.load({
|
|
|
686
686
|
"stage.state.absent": "无暂存",
|
|
687
687
|
"origin.system": "系统",
|
|
688
688
|
"row.id": "编号",
|
|
689
|
+
"row.details": "详情",
|
|
689
690
|
"row.requestedTarget": "请求目标",
|
|
690
691
|
"row.stage": "合并暂存",
|
|
691
692
|
"row.summaryA": "摘要 A",
|
|
@@ -728,6 +729,7 @@ window.__ModuleLoader__.load({
|
|
|
728
729
|
"settings.capabilityMissing": "宿主未提供该能力",
|
|
729
730
|
"settings.capabilityDisabled": "当前部署不可用",
|
|
730
731
|
"settings.readonly": "只读显示;修改请到平台设置页。",
|
|
732
|
+
"settings.mergeApprovalPath": "设置 → 插件 → 自进化 → 技能自动合并",
|
|
731
733
|
"run.title": "运行",
|
|
732
734
|
"run.id": "运行编号",
|
|
733
735
|
"run.state": "状态",
|
|
@@ -886,6 +888,7 @@ window.__ModuleLoader__.load({
|
|
|
886
888
|
"stage.state.absent": "Not staged",
|
|
887
889
|
"origin.system": "System",
|
|
888
890
|
"row.id": "ID",
|
|
891
|
+
"row.details": "Details",
|
|
889
892
|
"row.requestedTarget": "Requested target",
|
|
890
893
|
"row.stage": "Merge staging",
|
|
891
894
|
"row.summaryA": "Summary A",
|
|
@@ -928,6 +931,7 @@ window.__ModuleLoader__.load({
|
|
|
928
931
|
"settings.capabilityMissing": "Host did not provide this capability",
|
|
929
932
|
"settings.capabilityDisabled": "Not available in this deployment",
|
|
930
933
|
"settings.readonly": "Read-only here; edit in platform settings.",
|
|
934
|
+
"settings.mergeApprovalPath": "Settings → Plugins → Evolution → Skill auto-merge",
|
|
931
935
|
"run.title": "Run",
|
|
932
936
|
"run.id": "Run ID",
|
|
933
937
|
"run.state": "State",
|
|
@@ -1015,6 +1019,13 @@ window.__ModuleLoader__.load({
|
|
|
1015
1019
|
".evolution-merge-panel [data-role=\"failure\"] [data-tone=\"fail\"] { color:var(--dsw-alias-state-error-primary); }",
|
|
1016
1020
|
".evolution-merge-panel [data-role=\"fallback\"] { display:flex; gap:var(--evo-space-6); flex-wrap:wrap; }",
|
|
1017
1021
|
".evolution-merge-panel [data-role=\"overlay\"] { position:fixed; z-index:60; top:8vh; left:50%; transform:translateX(-50%); width:min(820px, calc(100vw - 64px)); max-height:78vh; overflow:auto; display:flex; flex-direction:column; gap:var(--evo-space-8); padding:var(--evo-space-12); border:var(--evo-hairline-width) solid var(--dsw-alias-border-l2); border-radius:var(--evo-radius-control); background:var(--dsw-alias-bg-layer-1); box-shadow:0 0 var(--evo-space-8) var(--dsw-alias-border-l2); }",
|
|
1022
|
+
".evo-merge-modal { width:min(820px, calc(100vw - 48px)); max-width:calc(100vw - 48px); max-height:min(78vh, 720px); }",
|
|
1023
|
+
".evo-merge-modal [data-role=\"overlay\"][data-platform-modal] { position:static; z-index:auto; top:auto; left:auto; transform:none; width:auto; box-sizing:border-box; max-height:none; overflow:auto; padding:var(--evo-space-20); border:0; border-radius:0; background:transparent; box-shadow:none; gap:var(--evo-space-8); }",
|
|
1024
|
+
".evo-merge-modal [data-role=\"overlay-head\"] { display:flex; align-items:center; justify-content:space-between; gap:var(--evo-space-8); }",
|
|
1025
|
+
".evo-merge-modal [data-role=\"overlay-title\"] { margin:0; font-size:var(--evo-type-lg); }",
|
|
1026
|
+
".evo-merge-modal [data-role=\"body-text\"] { margin:0; max-height:52vh; overflow:auto; white-space:pre-wrap; }",
|
|
1027
|
+
".evo-merge-modal [data-role=\"history-list\"] { margin:0; padding-left:var(--evo-space-20); }",
|
|
1028
|
+
".evo-merge-modal [data-role=\"history-item\"] { padding:var(--evo-space-4) 0; }",
|
|
1018
1029
|
".evolution-merge-panel [data-role=\"overlay-head\"] { display:flex; align-items:center; justify-content:space-between; gap:var(--evo-space-8); }",
|
|
1019
1030
|
".evolution-merge-panel [data-role=\"overlay-title\"] { margin:0; font-size:var(--evo-type-lg); }",
|
|
1020
1031
|
".evolution-merge-panel [data-role=\"rows\"] { display:flex; flex-direction:column; gap:var(--evo-space-6); }",
|
|
@@ -1055,6 +1066,25 @@ window.__ModuleLoader__.load({
|
|
|
1055
1066
|
".evolution-merge-panel [data-role=\"refresh\"] { align-self:flex-start; }"
|
|
1056
1067
|
].join("\n");
|
|
1057
1068
|
//#endregion
|
|
1069
|
+
//#region src/client/platform-modal.ts
|
|
1070
|
+
const PLATFORM_UI_MODULE$1 = "@deepseek-ai/dsh-client-ui-primitives";
|
|
1071
|
+
let cached;
|
|
1072
|
+
/** The platform Modal, or undefined in a non-browser/SSR render or a deployment without the row. */
|
|
1073
|
+
function platformModal() {
|
|
1074
|
+
if (cached !== void 0) return cached ?? void 0;
|
|
1075
|
+
if (typeof window === "undefined") {
|
|
1076
|
+
cached = null;
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
try {
|
|
1080
|
+
const row = require(PLATFORM_UI_MODULE$1);
|
|
1081
|
+
cached = typeof row.Modal === "function" ? row.Modal : null;
|
|
1082
|
+
} catch {
|
|
1083
|
+
cached = null;
|
|
1084
|
+
}
|
|
1085
|
+
return cached ?? void 0;
|
|
1086
|
+
}
|
|
1087
|
+
//#endregion
|
|
1058
1088
|
//#region src/client/platform-menu.ts
|
|
1059
1089
|
/**
|
|
1060
1090
|
* The one seam onto the platform's menu material and rows.
|
|
@@ -1214,13 +1244,6 @@ window.__ModuleLoader__.load({
|
|
|
1214
1244
|
//#endregion
|
|
1215
1245
|
//#region src/client/Panel.ts
|
|
1216
1246
|
/** Batch 4 merge panel: keyed read store, four tabs, local overlays, localized errors. */
|
|
1217
|
-
async function saveSetting(form, field, value) {
|
|
1218
|
-
try {
|
|
1219
|
-
return await form.set(field, value);
|
|
1220
|
-
} catch {
|
|
1221
|
-
return false;
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
1247
|
const QUEUES = [
|
|
1225
1248
|
"verify",
|
|
1226
1249
|
"pending",
|
|
@@ -1392,77 +1415,19 @@ window.__ModuleLoader__.load({
|
|
|
1392
1415
|
"data-value": missing ? "missing" : disabled ? "unavailable" : value === true ? "on" : "off"
|
|
1393
1416
|
}, text), note === void 0 ? null : (0, react.createElement)("span", { "data-role": "settings-note" }, note), link === true ? (0, react.createElement)("span", { "data-role": "settings-link" }, t("settings.openPlatformPath")) : null);
|
|
1394
1417
|
}
|
|
1395
|
-
function
|
|
1396
|
-
const subscribe = (0, react.useCallback)((listener) => form.subscribe(listener), [form]);
|
|
1397
|
-
const readSnapshot = (0, react.useCallback)(() => form["getSnapshot"](), [form]);
|
|
1398
|
-
const snapshot = (0, react.useSyncExternalStore)(subscribe, readSnapshot, readSnapshot);
|
|
1399
|
-
const fieldPresent = snapshot.status !== "ready" || snapshot.value === void 0 || Object.prototype.hasOwnProperty.call(snapshot.value, field);
|
|
1400
|
-
const [busy, setBusy] = (0, react.useState)(false);
|
|
1401
|
-
const [saved, setSaved] = (0, react.useState)(void 0);
|
|
1402
|
-
const value = snapshot.status === "ready" && typeof snapshot.value?.[field] === "boolean" ? snapshot.value[field] : fallback;
|
|
1403
|
-
const disabled = !capability || busy || snapshot.status !== "ready" || !snapshot.writable;
|
|
1404
|
-
const toggle = async () => {
|
|
1405
|
-
if (disabled) return;
|
|
1406
|
-
setBusy(true);
|
|
1407
|
-
setSaved(void 0);
|
|
1408
|
-
const ok = await saveSetting(form, field, !value);
|
|
1409
|
-
setBusy(false);
|
|
1410
|
-
setSaved(ok ? "saved" : "failed");
|
|
1411
|
-
};
|
|
1412
|
-
if (!fieldPresent) return (0, react.createElement)(ReadOnlySetting, {
|
|
1413
|
-
section: "platform-write",
|
|
1414
|
-
label,
|
|
1415
|
-
value: fallback,
|
|
1416
|
-
disabled: !capability,
|
|
1417
|
-
missing: false,
|
|
1418
|
-
note: t("settings.platformWriteLinkHint"),
|
|
1419
|
-
link: true,
|
|
1420
|
-
t
|
|
1421
|
-
});
|
|
1422
|
-
return (0, react.createElement)("div", {
|
|
1423
|
-
"data-role": "settings-section",
|
|
1424
|
-
"data-section": field === "mergeApproval" ? "merge-approval" : "platform-write",
|
|
1425
|
-
...disabled ? { "data-disabled": "true" } : {}
|
|
1426
|
-
}, (0, react.createElement)("label", {
|
|
1427
|
-
"data-role": "settings-label",
|
|
1428
|
-
htmlFor: "merge-setting-" + field
|
|
1429
|
-
}, label), (0, react.createElement)("input", {
|
|
1430
|
-
id: "merge-setting-" + field,
|
|
1431
|
-
"aria-label": label,
|
|
1432
|
-
type: "checkbox",
|
|
1433
|
-
role: "switch",
|
|
1434
|
-
"data-role": "settings-toggle",
|
|
1435
|
-
"data-field": field,
|
|
1436
|
-
"data-value": value ? "on" : "off",
|
|
1437
|
-
checked: value,
|
|
1438
|
-
disabled,
|
|
1439
|
-
onChange: () => {
|
|
1440
|
-
toggle();
|
|
1441
|
-
}
|
|
1442
|
-
}), (0, react.createElement)("span", { "data-role": "settings-value" }, value ? t("settings.on") : t("settings.off")), ...saved === void 0 ? [] : [(0, react.createElement)("span", {
|
|
1443
|
-
"data-role": "settings-save-state",
|
|
1444
|
-
"data-save": saved
|
|
1445
|
-
}, t(saved === "saved" ? "settings.saved" : "settings.saveFailed"))]);
|
|
1446
|
-
}
|
|
1447
|
-
function SettingsCard({ view, settings, t }) {
|
|
1418
|
+
function SettingsCard({ view, t }) {
|
|
1448
1419
|
const platform = view.approval.platformWrite;
|
|
1449
|
-
const platformCapability = platform?.capability
|
|
1420
|
+
const platformCapability = platform?.capability === true;
|
|
1450
1421
|
const platformFallback = platform?.enabled ?? false;
|
|
1451
|
-
const mergeCapability = settings?.merge !== void 0;
|
|
1452
1422
|
const mergeFallback = view.approval.mergeApproval;
|
|
1453
|
-
return (0, react.createElement)("div", { "data-role": "settings-card" }, (0, react.createElement)("h3", { "data-role": "settings-title" }, t("settings.title")), (0, react.createElement)("p", { "data-role": "settings-hint" }, t("settings.hint")),
|
|
1423
|
+
return (0, react.createElement)("div", { "data-role": "settings-card" }, (0, react.createElement)("h3", { "data-role": "settings-title" }, t("settings.title")), (0, react.createElement)("p", { "data-role": "settings-hint" }, t("settings.hint")), (0, react.createElement)(ReadOnlySetting, {
|
|
1454
1424
|
section: "merge-approval",
|
|
1455
1425
|
label: t("settings.mergeApproval"),
|
|
1456
1426
|
value: mergeFallback,
|
|
1457
1427
|
disabled: false,
|
|
1458
1428
|
missing: false,
|
|
1459
|
-
t
|
|
1460
|
-
|
|
1461
|
-
form: settings.merge,
|
|
1462
|
-
field: "mergeApproval",
|
|
1463
|
-
label: t("settings.mergeApproval"),
|
|
1464
|
-
fallback: mergeFallback,
|
|
1465
|
-
capability: mergeCapability,
|
|
1429
|
+
note: t("settings.mergeApprovalPath"),
|
|
1430
|
+
link: true,
|
|
1466
1431
|
t
|
|
1467
1432
|
}), (0, react.createElement)(ReadOnlySetting, {
|
|
1468
1433
|
section: "platform-write",
|
|
@@ -1473,19 +1438,22 @@ window.__ModuleLoader__.load({
|
|
|
1473
1438
|
note: t("settings.platformWriteLinkHint"),
|
|
1474
1439
|
link: true,
|
|
1475
1440
|
t
|
|
1476
|
-
}), (0, react.createElement)("p", { "data-role": "settings-readonly" },
|
|
1441
|
+
}), (0, react.createElement)("p", { "data-role": "settings-readonly" }, t("settings.readonly")));
|
|
1477
1442
|
}
|
|
1478
1443
|
function rowNode(row, t, copy, sort, openBody) {
|
|
1479
|
-
const
|
|
1444
|
+
const first = [
|
|
1480
1445
|
row.target === void 0 ? void 0 : t("row.target") + " " + row.target,
|
|
1446
|
+
row.failure === void 0 ? void 0 : t("row.failure") + " " + row.failure.code + (row.failure.retryable ? "" : " · " + t("row.noRetry")),
|
|
1447
|
+
row.expired === void 0 ? void 0 : t("row.expired") + " " + t("expired." + row.expired),
|
|
1448
|
+
row.reasonCode === void 0 && row.reason === void 0 ? void 0 : t("row.reason") + " " + reasonText(t, row.reasonCode, row.reason ?? "")
|
|
1449
|
+
].filter((value) => value !== void 0).join(" · ");
|
|
1450
|
+
const details = [
|
|
1451
|
+
t("row.id") + " " + row.id,
|
|
1481
1452
|
row.targetActual === void 0 ? void 0 : t("row.actualTarget") + " " + row.targetActual,
|
|
1482
1453
|
row.verifySubState === void 0 ? void 0 : t("row.verify") + " " + t("verify." + row.verifySubState),
|
|
1483
1454
|
row.origin === void 0 ? void 0 : t("row.origin") + " " + t("origin." + row.origin),
|
|
1484
1455
|
row.attempts === void 0 ? void 0 : t("row.attempts") + " " + String(row.attempts),
|
|
1485
|
-
row.confidence === void 0 ? void 0 : t("row.confidence") + " " + row.confidence.toFixed(2)
|
|
1486
|
-
row.failure === void 0 ? void 0 : t("row.failure") + " " + row.failure.code + (row.failure.retryable ? "" : " · " + t("row.noRetry")),
|
|
1487
|
-
row.expired === void 0 ? void 0 : t("row.expired") + " " + t("expired." + row.expired),
|
|
1488
|
-
row.reasonCode === void 0 && row.reason === void 0 ? void 0 : t("row.reason") + " " + reasonText(t, row.reasonCode, row.reason ?? "")
|
|
1456
|
+
row.confidence === void 0 ? void 0 : t("row.confidence") + " " + row.confidence.toFixed(2)
|
|
1489
1457
|
].filter((value) => value !== void 0).join(" · ");
|
|
1490
1458
|
const actions = row.actions.map((action) => (0, react.createElement)("button", {
|
|
1491
1459
|
key: action.id,
|
|
@@ -1539,10 +1507,7 @@ window.__ModuleLoader__.load({
|
|
|
1539
1507
|
event.preventDefault();
|
|
1540
1508
|
sort.menu(row.id, event.clientX, event.clientY);
|
|
1541
1509
|
}
|
|
1542
|
-
}, (0, react.createElement)("div", null, (0, react.createElement)("div", { "data-role": "row-label" }, row.label), (0, react.createElement)("div", {
|
|
1543
|
-
"data-role": "row-id",
|
|
1544
|
-
title: row.id
|
|
1545
|
-
}, t("row.id") + " " + row.id), (0, react.createElement)("div", { "data-role": "row-meta" }, t("state." + row.state) + (row.stage === null ? "" : " · " + t("stage." + row.stage))), stageNode(row, t), summaryNode(row, t), facts === "" ? null : (0, react.createElement)("div", { "data-role": "row-facts" }, facts)), (0, react.createElement)("div", null, (0, react.createElement)("div", { "data-role": "row-meta" }, new Date(row.updatedAt).toLocaleString()), (0, react.createElement)("div", { "data-role": "row-actions" }, (() => {
|
|
1510
|
+
}, (0, react.createElement)("div", null, (0, react.createElement)("div", { "data-role": "row-label" }, row.label), (0, react.createElement)("div", { "data-role": "row-meta" }, t("state." + row.state) + (row.stage === null ? "" : " · " + t("stage." + row.stage))), stageNode(row, t), summaryNode(row, t), first === "" ? null : (0, react.createElement)("div", { "data-role": "row-facts" }, first), (0, react.createElement)("details", { "data-role": "row-details" }, (0, react.createElement)("summary", null, t("row.details")), (0, react.createElement)("p", null, details))), (0, react.createElement)("div", null, (0, react.createElement)("div", { "data-role": "row-meta" }, new Date(row.updatedAt).toLocaleString()), (0, react.createElement)("div", { "data-role": "row-actions" }, (() => {
|
|
1546
1511
|
const bodyA = row.bodies?.find((body) => body.name === row.a);
|
|
1547
1512
|
const bodyB = row.bodies?.find((body) => body.name === row.b);
|
|
1548
1513
|
return [bodyA === void 0 ? null : (0, react.createElement)("button", {
|
|
@@ -1554,7 +1519,7 @@ window.__ModuleLoader__.load({
|
|
|
1554
1519
|
onClick: () => {
|
|
1555
1520
|
openBody(bodyA.name, bodyA.side, bodyA.rowId);
|
|
1556
1521
|
}
|
|
1557
|
-
}, "A"), bodyB === void 0 ? null : (0, react.createElement)("button", {
|
|
1522
|
+
}, "A · " + bodyA.name), bodyB === void 0 ? null : (0, react.createElement)("button", {
|
|
1558
1523
|
key: "b",
|
|
1559
1524
|
type: "button",
|
|
1560
1525
|
"data-role": "body-b",
|
|
@@ -1563,7 +1528,7 @@ window.__ModuleLoader__.load({
|
|
|
1563
1528
|
onClick: () => {
|
|
1564
1529
|
openBody(bodyB.name, bodyB.side, bodyB.rowId);
|
|
1565
1530
|
}
|
|
1566
|
-
}, "B")];
|
|
1531
|
+
}, "B · " + bodyB.name)];
|
|
1567
1532
|
})(), actions)));
|
|
1568
1533
|
}
|
|
1569
1534
|
const overlayKey = (event, onClose) => {
|
|
@@ -1586,39 +1551,55 @@ window.__ModuleLoader__.load({
|
|
|
1586
1551
|
}
|
|
1587
1552
|
};
|
|
1588
1553
|
function bodyNode(overlay, t, onClose) {
|
|
1589
|
-
|
|
1554
|
+
const Modal = platformModal();
|
|
1555
|
+
const title = t("overlay.body") + " · " + overlay.name;
|
|
1556
|
+
const inner = (0, react.createElement)("section", {
|
|
1590
1557
|
"data-role": "overlay",
|
|
1591
1558
|
"data-overlay": "body",
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1559
|
+
"aria-label": title,
|
|
1560
|
+
...Modal === void 0 ? {
|
|
1561
|
+
role: "dialog",
|
|
1562
|
+
"aria-modal": "true",
|
|
1563
|
+
onKeyDown: (event) => {
|
|
1564
|
+
overlayKey(event, onClose);
|
|
1565
|
+
}
|
|
1566
|
+
} : { "data-platform-modal": "true" }
|
|
1567
|
+
}, (0, react.createElement)("div", { "data-role": "overlay-head" }, (0, react.createElement)("h3", { "data-role": "overlay-title" }, title), (0, react.createElement)("button", {
|
|
1599
1568
|
type: "button",
|
|
1600
1569
|
"data-role": "overlay-close",
|
|
1601
|
-
autoFocus: true,
|
|
1570
|
+
...Modal === void 0 ? { autoFocus: true } : { "data-modal-autofocus": "true" },
|
|
1602
1571
|
onClick: onClose
|
|
1603
1572
|
}, t("close"))), (0, react.createElement)("p", { "data-role": "overlay-meta" }, t("body." + overlay.side) + " · " + (overlay.status === "ready" ? t("body.totalBytes") + " " + String(overlay.body?.totalBytes ?? 0) : "")), overlay.status === "loading" ? (0, react.createElement)("p", { "data-role": "overlay-loading" }, t("loading")) : null, overlay.status === "error" && overlay.failure !== void 0 ? failureNode(t, overlay.failure, [], () => {}) : null, overlay.status === "ready" && overlay.body !== void 0 ? (0, react.createElement)("div", null, overlay.body.truncated ? (0, react.createElement)("p", { "data-role": "body-truncated" }, t("body.truncated")) : null, overlay.body.text === "" ? (0, react.createElement)("p", { "data-role": "body-empty" }, t("body.empty")) : (0, react.createElement)("pre", { "data-role": "body-text" }, overlay.body.text)) : null);
|
|
1573
|
+
return Modal === void 0 ? inner : (0, react.createElement)(Modal, {
|
|
1574
|
+
open: true,
|
|
1575
|
+
onClose,
|
|
1576
|
+
title,
|
|
1577
|
+
closeLabel: t("close"),
|
|
1578
|
+
headless: true,
|
|
1579
|
+
className: "evo-merge-modal"
|
|
1580
|
+
}, inner);
|
|
1604
1581
|
}
|
|
1605
1582
|
function historyNode(overlay, t, onClose) {
|
|
1606
|
-
|
|
1583
|
+
const Modal = platformModal();
|
|
1584
|
+
const title = t("history");
|
|
1585
|
+
const inner = (0, react.createElement)("section", {
|
|
1607
1586
|
"data-role": "overlay",
|
|
1608
1587
|
"data-overlay": "history",
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
event.
|
|
1615
|
-
|
|
1588
|
+
"aria-label": title,
|
|
1589
|
+
...Modal === void 0 ? {
|
|
1590
|
+
role: "dialog",
|
|
1591
|
+
"aria-modal": "true",
|
|
1592
|
+
onKeyDown: (event) => {
|
|
1593
|
+
if (event.key === "Escape") {
|
|
1594
|
+
event.preventDefault();
|
|
1595
|
+
onClose();
|
|
1596
|
+
}
|
|
1616
1597
|
}
|
|
1617
|
-
}
|
|
1618
|
-
}, (0, react.createElement)("div", { "data-role": "overlay-head" }, (0, react.createElement)("h3", { "data-role": "overlay-title" },
|
|
1598
|
+
} : { "data-platform-modal": "true" }
|
|
1599
|
+
}, (0, react.createElement)("div", { "data-role": "overlay-head" }, (0, react.createElement)("h3", { "data-role": "overlay-title" }, title), (0, react.createElement)("button", {
|
|
1619
1600
|
type: "button",
|
|
1620
1601
|
"data-role": "overlay-close",
|
|
1621
|
-
autoFocus: true,
|
|
1602
|
+
...Modal === void 0 ? { autoFocus: true } : { "data-modal-autofocus": "true" },
|
|
1622
1603
|
onClick: onClose
|
|
1623
1604
|
}, t("close"))), overlay.status === "loading" ? (0, react.createElement)("p", { "data-role": "overlay-loading" }, t("loading")) : null, overlay.status === "error" && overlay.failure !== void 0 ? failureNode(t, overlay.failure, [], () => {}) : null, overlay.status === "ready" ? overlay.items === void 0 || overlay.items.length === 0 ? (0, react.createElement)("p", { "data-role": "history-empty" }, t("history.empty")) : (0, react.createElement)("ul", { "data-role": "history-list" }, overlay.items.map((item) => (0, react.createElement)("li", {
|
|
1624
1605
|
key: item.name + ":" + item.archivedAt,
|
|
@@ -1628,6 +1609,14 @@ window.__ModuleLoader__.load({
|
|
|
1628
1609
|
const reason = reasonText(t, item.reasonCode, item.reason);
|
|
1629
1610
|
return kind === reason ? kind : kind + " · " + reason;
|
|
1630
1611
|
})() + " · v" + String(item.lastVersion) + " · " + t("history.archivedAt", { date: new Date(item.archivedAt).toLocaleString() })))) : null);
|
|
1612
|
+
return Modal === void 0 ? inner : (0, react.createElement)(Modal, {
|
|
1613
|
+
open: true,
|
|
1614
|
+
onClose,
|
|
1615
|
+
title,
|
|
1616
|
+
closeLabel: t("close"),
|
|
1617
|
+
headless: true,
|
|
1618
|
+
className: "evo-merge-modal"
|
|
1619
|
+
}, inner);
|
|
1631
1620
|
}
|
|
1632
1621
|
function MergePanel(face) {
|
|
1633
1622
|
const { store, t } = face;
|
|
@@ -1791,7 +1780,8 @@ window.__ModuleLoader__.load({
|
|
|
1791
1780
|
role: "tabpanel"
|
|
1792
1781
|
}, visibleRows.map((row) => rowNode(row, t, copy, sortHandlers, openBody))) : null;
|
|
1793
1782
|
const empty = uiState === "empty" ? (0, react.createElement)("div", null, (0, react.createElement)("p", { "data-role": "note" }, t("empty." + snapshot.queue)), (0, react.createElement)("p", { "data-role": "empty-scope" }, t("empty.scope"))) : null;
|
|
1794
|
-
const
|
|
1783
|
+
const staleViewFailure = snapshot.viewState === "ready" ? snapshot.viewFailure : void 0;
|
|
1784
|
+
const activeFailure = viewFailure !== void 0 ? viewFailure : staleViewFailure !== void 0 ? staleViewFailure : queue.status === "error" ? queue.failure : void 0;
|
|
1795
1785
|
const overlay = snapshot.overlay;
|
|
1796
1786
|
const menuStyle = menu === void 0 ? void 0 : {
|
|
1797
1787
|
position: "fixed",
|
|
@@ -1868,7 +1858,6 @@ window.__ModuleLoader__.load({
|
|
|
1868
1858
|
}
|
|
1869
1859
|
}, t("start.pair"))), view.degraded ? (0, react.createElement)("p", { "data-role": "degraded" }, t("degraded") + " " + view.notes.join(",")) : null, (0, react.createElement)(SettingsCard, {
|
|
1870
1860
|
view,
|
|
1871
|
-
settings: face.settings,
|
|
1872
1861
|
t
|
|
1873
1862
|
}), runNode(view, t, copy), tabs, expiredToggle, snapshot.viewState === "loading" || queue.status === "loading" ? (0, react.createElement)("p", { "data-role": "note" }, t("loading")) : queue.refreshing === true ? (0, react.createElement)("p", {
|
|
1874
1863
|
"data-role": "note",
|
|
@@ -1957,6 +1946,7 @@ window.__ModuleLoader__.load({
|
|
|
1957
1946
|
overlayToken = 0;
|
|
1958
1947
|
snapshot;
|
|
1959
1948
|
started = false;
|
|
1949
|
+
loadedView = false;
|
|
1960
1950
|
disposed = false;
|
|
1961
1951
|
constructor(source, initial = {}) {
|
|
1962
1952
|
this.source = source;
|
|
@@ -2030,14 +2020,16 @@ window.__ModuleLoader__.load({
|
|
|
2030
2020
|
});
|
|
2031
2021
|
return;
|
|
2032
2022
|
}
|
|
2023
|
+
const keeping = this.loadedView;
|
|
2033
2024
|
this.set({
|
|
2034
2025
|
...this.snapshot,
|
|
2035
|
-
viewState: "error",
|
|
2026
|
+
viewState: keeping ? "ready" : "error",
|
|
2036
2027
|
viewFailure: outcome.failure,
|
|
2037
2028
|
viewRefreshing: false
|
|
2038
2029
|
});
|
|
2039
2030
|
return;
|
|
2040
2031
|
}
|
|
2032
|
+
this.loadedView = true;
|
|
2041
2033
|
const wasBlocked = this.snapshot.viewState === "blocked";
|
|
2042
2034
|
this.set({
|
|
2043
2035
|
...this.snapshot,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Batch 4 merge panel: keyed read store, four tabs, local overlays, localized errors. */
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import type { MergeStore } from './MergeStore.ts';
|
|
4
|
-
import type {
|
|
4
|
+
import type { SettingsFace } from '@lmzhen/dsh-evolution-client-kit';
|
|
5
5
|
export type Translate = (key: string, values?: Readonly<Record<string, string | number>>) => string;
|
|
6
6
|
export interface MergeFace {
|
|
7
7
|
store: MergeStore;
|
|
@@ -10,6 +10,5 @@ export interface MergeFace {
|
|
|
10
10
|
settings?: SettingsFace;
|
|
11
11
|
workspaceId?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare function saveSetting(form: ConfigFormLike, field: string, value: boolean): Promise<boolean>;
|
|
14
13
|
export declare function MergePanel(face: MergeFace): ReactNode;
|
|
15
14
|
//# sourceMappingURL=Panel.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Platform Modal reached through the rc.3 client module table. */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface PlatformModalProps {
|
|
4
|
+
readonly open: boolean;
|
|
5
|
+
readonly onClose: () => void;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly closeLabel: string;
|
|
8
|
+
readonly children?: ReactNode;
|
|
9
|
+
readonly headless?: boolean;
|
|
10
|
+
readonly className?: string;
|
|
11
|
+
}
|
|
12
|
+
export type PlatformModalComponent = (props: PlatformModalProps) => ReactNode;
|
|
13
|
+
/** The platform Modal, or undefined in a non-browser/SSR render or a deployment without the row. */
|
|
14
|
+
export declare function platformModal(): PlatformModalComponent | undefined;
|
|
15
|
+
//# sourceMappingURL=platform-modal.d.ts.map
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
]
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.33.0",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react-dom": "^18.2.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@lmzhen/dsh-evolution-client-kit": "^0.
|
|
54
|
+
"@lmzhen/dsh-evolution-client-kit": "^0.33.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|