patent-editor 0.2.1 → 0.2.2
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/lib.js +17 -12
- package/dist/lib.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -1006,6 +1006,7 @@ const G = new Pa(), Rt = {
|
|
|
1006
1006
|
claimInsertHintCreated: "已自动创建 Claim 区并插入新 Claim",
|
|
1007
1007
|
claimInsertHintMoved: "当前光标在区外,已放入 Claim 区",
|
|
1008
1008
|
referenceNavigateTitle: "点击跳转到目标权利要求",
|
|
1009
|
+
figureReferenceNavigateTitle: "点击跳转到目标附图",
|
|
1009
1010
|
referenceNavigateDisabledTitle: "引用无效,无法跳转",
|
|
1010
1011
|
currentFigure: "当前附图",
|
|
1011
1012
|
figureId: "图号",
|
|
@@ -1092,6 +1093,7 @@ const G = new Pa(), Rt = {
|
|
|
1092
1093
|
claimInsertHintCreated: "Claims section was created and a new Claim was inserted",
|
|
1093
1094
|
claimInsertHintMoved: "Cursor is outside claims section, inserted into Claims section",
|
|
1094
1095
|
referenceNavigateTitle: "Click to navigate to target claim",
|
|
1096
|
+
figureReferenceNavigateTitle: "Click to navigate to target figure",
|
|
1095
1097
|
referenceNavigateDisabledTitle: "Invalid reference, navigation unavailable",
|
|
1096
1098
|
currentFigure: "Current Figure",
|
|
1097
1099
|
figureId: "Figure ID",
|
|
@@ -2113,21 +2115,24 @@ const je = () => {
|
|
|
2113
2115
|
let n = e;
|
|
2114
2116
|
const r = document.createElement("span"), a = () => {
|
|
2115
2117
|
const s = n.attrs.lang === "en" ? "en" : "zh", i = j(s), l = n.attrs.targetType === "figure" ? "figure" : "claim", c = Number(n.attrs.resolvedNumber), d = typeof n.attrs.resolvedFigureId == "string" && n.attrs.resolvedFigureId ? n.attrs.resolvedFigureId : null, o = l === "figure" ? d || (s === "en" ? "Figure ?" : "附图?") : Number.isFinite(c) ? i.claimLabel(c) : s === "en" ? "Claim ?" : "权利要求?", u = n.attrs.displayText || o;
|
|
2116
|
-
r.textContent = u, r.className = `reference-link${n.attrs.invalid ? " reference-link-invalid" : ""}`, r.setAttribute("data-type", "reference"), r.setAttribute("data-highlight", n.attrs.highlight ? "true" : "false"), r.title = n.attrs.invalid ? i.referenceNavigateDisabledTitle : i.referenceNavigateTitle;
|
|
2118
|
+
r.textContent = u, r.className = `reference-link${n.attrs.invalid ? " reference-link-invalid" : ""}`, r.setAttribute("data-type", "reference"), r.setAttribute("data-highlight", n.attrs.highlight ? "true" : "false"), r.title = n.attrs.invalid ? i.referenceNavigateDisabledTitle : l === "figure" ? i.figureReferenceNavigateTitle : i.referenceNavigateTitle;
|
|
2117
2119
|
};
|
|
2118
2120
|
return a(), r.addEventListener("click", () => {
|
|
2119
2121
|
const s = n.attrs.targetType === "figure" ? "figure" : "claim";
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2122
|
+
n.attrs.invalid || setTimeout(() => {
|
|
2123
|
+
let i = null;
|
|
2124
|
+
if (s === "figure") {
|
|
2125
|
+
const l = typeof n.attrs.targetFigureId == "string" ? n.attrs.targetFigureId : "";
|
|
2126
|
+
if (!l)
|
|
2127
|
+
return;
|
|
2128
|
+
t.state.doc.descendants((c, d) => i !== null ? !1 : c.type.name === "figure" && c.attrs.id === l ? (i = d, !1) : !0);
|
|
2129
|
+
} else {
|
|
2130
|
+
if (!n.attrs.targetClaimId)
|
|
2131
|
+
return;
|
|
2132
|
+
t.state.doc.descendants((l, c) => i !== null ? !1 : l.type.name === "claim" && l.attrs.claimId === n.attrs.targetClaimId ? (i = c, !1) : !0);
|
|
2133
|
+
}
|
|
2134
|
+
typeof i == "number" && t.chain().focus().setTextSelection(i + 1).scrollIntoView().run();
|
|
2135
|
+
}, 0);
|
|
2131
2136
|
}), {
|
|
2132
2137
|
dom: r,
|
|
2133
2138
|
update: (s) => s.type.name !== this.name ? !1 : (n = s, a(), !0)
|