dsh-conversation-navigator 0.1.10 → 0.1.11
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 +37 -21
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -101,8 +101,9 @@ window.__ModuleLoader__.load({
|
|
|
101
101
|
.cnvnav-group-row:hover { background: var(--dsw-alias-bg-layer-2, rgba(128,128,128,.12)); }
|
|
102
102
|
.cnvnav-group-row-active { background: var(--dsw-alias-bg-layer-2, rgba(128,128,128,.12)); }
|
|
103
103
|
.cnvnav-group-row-active .cnvnav-group-title { color: var(--dsw-alias-brand-primary, #4f46e5); }
|
|
104
|
+
.cnvnav-group-head-wrap { flex: 1; min-width: 0; display: block; }
|
|
104
105
|
.cnvnav-group-head {
|
|
105
|
-
|
|
106
|
+
width: 100%;
|
|
106
107
|
display: flex; align-items: baseline; gap: 6px; text-align: left;
|
|
107
108
|
border: none; background: transparent; cursor: pointer;
|
|
108
109
|
padding: 5px 0 5px 8px;
|
|
@@ -114,8 +115,9 @@ window.__ModuleLoader__.load({
|
|
|
114
115
|
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
115
116
|
flex: 1; min-width: 0;
|
|
116
117
|
}
|
|
118
|
+
.cnvnav-chevron-wrap { flex: none; display: block; }
|
|
117
119
|
.cnvnav-chevron {
|
|
118
|
-
|
|
120
|
+
min-width: 30px; width: 100%;
|
|
119
121
|
display: flex; align-items: center; justify-content: center;
|
|
120
122
|
border: none; background: transparent; cursor: pointer;
|
|
121
123
|
color: var(--dsw-alias-label-secondary, #888);
|
|
@@ -540,29 +542,43 @@ window.__ModuleLoader__.load({
|
|
|
540
542
|
ref: (el) => { groupEls[g.gid] = el; },
|
|
541
543
|
className: "cnvnav-group-row" + (groupActive ? " cnvnav-group-row-active" : ""),
|
|
542
544
|
},
|
|
543
|
-
React.createElement(
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
onClick: () => jumpTo(g.headKey),
|
|
545
|
+
React.createElement(Tooltip, {
|
|
546
|
+
label: "跳转到此位置",
|
|
547
|
+
side: "top",
|
|
548
|
+
delayMs: 500,
|
|
548
549
|
},
|
|
549
|
-
React.createElement("span", { className: "cnvnav-group-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
550
|
+
React.createElement("span", { className: "cnvnav-group-head-wrap" },
|
|
551
|
+
React.createElement("button", {
|
|
552
|
+
type: "button",
|
|
553
|
+
className: "cnvnav-group-head",
|
|
554
|
+
onClick: () => jumpTo(g.headKey),
|
|
555
|
+
},
|
|
556
|
+
React.createElement("span", { className: "cnvnav-group-title" }, g.title),
|
|
557
|
+
g.subtitle !== ""
|
|
558
|
+
? React.createElement("span", { className: "cnvnav-group-sub" }, g.subtitle)
|
|
559
|
+
: null,
|
|
560
|
+
),
|
|
561
|
+
),
|
|
553
562
|
),
|
|
554
563
|
hasSteps
|
|
555
|
-
? React.createElement(
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
"aria-expanded": expanded,
|
|
560
|
-
onClick: (e) => {
|
|
561
|
-
e.stopPropagation();
|
|
562
|
-
setState({ expanded: Object.assign({}, state.expanded, { [g.gid]: !expanded }) });
|
|
563
|
-
},
|
|
564
|
+
? React.createElement(Tooltip, {
|
|
565
|
+
label: expanded ? "折叠步次" : "展开步次",
|
|
566
|
+
side: "top",
|
|
567
|
+
delayMs: 500,
|
|
564
568
|
},
|
|
565
|
-
|
|
569
|
+
React.createElement("span", { className: "cnvnav-chevron-wrap" },
|
|
570
|
+
React.createElement("button", {
|
|
571
|
+
type: "button",
|
|
572
|
+
className: "cnvnav-chevron",
|
|
573
|
+
"aria-expanded": expanded,
|
|
574
|
+
onClick: (e) => {
|
|
575
|
+
e.stopPropagation();
|
|
576
|
+
setState({ expanded: Object.assign({}, state.expanded, { [g.gid]: !expanded }) });
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
expanded ? "▾" : "▸ " + stepItems.length,
|
|
580
|
+
),
|
|
581
|
+
),
|
|
566
582
|
)
|
|
567
583
|
: null,
|
|
568
584
|
),
|