@douyinfe/semi-json-viewer-core 2.100.0 → 2.101.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.
- package/lib/index.js +18 -14
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -3987,7 +3987,7 @@ var CompleteWidget = class {
|
|
|
3987
3987
|
top: `${y}px`,
|
|
3988
3988
|
display: "block"
|
|
3989
3989
|
});
|
|
3990
|
-
this._suggestionsContainer.
|
|
3990
|
+
this._suggestionsContainer.textContent = "";
|
|
3991
3991
|
this._renderCompletions();
|
|
3992
3992
|
}
|
|
3993
3993
|
_handleSuggestionClick(e) {
|
|
@@ -4027,13 +4027,17 @@ var CompleteWidget = class {
|
|
|
4027
4027
|
}
|
|
4028
4028
|
_renderCompletions() {
|
|
4029
4029
|
const className = `${this._view.prefixCls}-complete-suggestions-item`;
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4030
|
+
const fragment = document.createDocumentFragment();
|
|
4031
|
+
this._suggestions.forEach((item, index) => {
|
|
4032
|
+
const suggestionItem = document.createElement("li");
|
|
4033
|
+
suggestionItem.className = className;
|
|
4034
|
+
suggestionItem.style.backgroundColor = index === this._selectedIndex ? "var(--semi-color-fill-0)" : "transparent";
|
|
4035
|
+
suggestionItem.dataset.index = index.toString();
|
|
4036
|
+
suggestionItem.textContent = item.label;
|
|
4037
|
+
fragment.appendChild(suggestionItem);
|
|
4038
|
+
});
|
|
4039
|
+
this._suggestionsContainer.textContent = "";
|
|
4040
|
+
this._suggestionsContainer.appendChild(fragment);
|
|
4037
4041
|
}
|
|
4038
4042
|
hide() {
|
|
4039
4043
|
if (!this.isVisible) return;
|
|
@@ -4102,7 +4106,7 @@ var HoverWidget = class {
|
|
|
4102
4106
|
setStyles(this._tooltipDom, {
|
|
4103
4107
|
visibility: "hidden"
|
|
4104
4108
|
});
|
|
4105
|
-
this._tooltipDom.
|
|
4109
|
+
this._tooltipDom.textContent = "";
|
|
4106
4110
|
this._hoverDom = null;
|
|
4107
4111
|
}
|
|
4108
4112
|
_createTooltipDom() {
|
|
@@ -4116,7 +4120,7 @@ var HoverWidget = class {
|
|
|
4116
4120
|
}
|
|
4117
4121
|
render(el) {
|
|
4118
4122
|
if (!this._hoverDom) return;
|
|
4119
|
-
this._tooltipDom.
|
|
4123
|
+
this._tooltipDom.textContent = "";
|
|
4120
4124
|
this._tooltipDom.appendChild(el);
|
|
4121
4125
|
const hoverRect = this._hoverDom.getBoundingClientRect();
|
|
4122
4126
|
const editorRect = this._view.contentDom.getBoundingClientRect();
|
|
@@ -4405,7 +4409,7 @@ var View = class {
|
|
|
4405
4409
|
width: "60%",
|
|
4406
4410
|
height: "100%"
|
|
4407
4411
|
});
|
|
4408
|
-
lineNumber.
|
|
4412
|
+
lineNumber.textContent = actualLineNumber.toString();
|
|
4409
4413
|
lineNumberElement.appendChild(lineNumber);
|
|
4410
4414
|
lineNumberElement.dataset.lineNumber = actualLineNumber.toString();
|
|
4411
4415
|
return lineNumberElement;
|
|
@@ -4455,8 +4459,8 @@ var View = class {
|
|
|
4455
4459
|
}
|
|
4456
4460
|
}
|
|
4457
4461
|
clearContainers() {
|
|
4458
|
-
this._lineScrollDom.
|
|
4459
|
-
this._scrollDom.
|
|
4462
|
+
this._lineScrollDom.textContent = "";
|
|
4463
|
+
this._scrollDom.textContent = "";
|
|
4460
4464
|
}
|
|
4461
4465
|
resetScalingManagerConfigAndCell(index) {
|
|
4462
4466
|
this._scalingCellSizeAndPositionManager.configure({
|
|
@@ -4496,7 +4500,7 @@ var View = class {
|
|
|
4496
4500
|
this._lineScrollDom.style.height = `${totalSize}px`;
|
|
4497
4501
|
if (((_b = this._options) == null ? void 0 : _b.readOnly) && this._customRenderMap.size > 0) {
|
|
4498
4502
|
this._customRenderMap.forEach((value, key) => {
|
|
4499
|
-
key.
|
|
4503
|
+
key.textContent = "";
|
|
4500
4504
|
});
|
|
4501
4505
|
this.emitter.emit("customRender", {
|
|
4502
4506
|
customRenderMap: this._customRenderMap
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-json-viewer-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.101.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
],
|
|
54
54
|
"author": "",
|
|
55
55
|
"license": "MIT",
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "90a1ea2a8f3bc714279cdaada5fa30e97d8e26d4"
|
|
57
57
|
}
|