@douyinfe/semi-json-viewer-core 2.87.0-alpha.0 → 2.88.0-alpha.1-exact
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 +12 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1506,6 +1506,14 @@ var EditWidget = class {
|
|
|
1506
1506
|
if (e.button !== 0) return;
|
|
1507
1507
|
this._selectionModel.updateFromSelectingEnd();
|
|
1508
1508
|
});
|
|
1509
|
+
this._view.contentDom.addEventListener("focus", (e) => {
|
|
1510
|
+
if (this._view.options?.readOnly) return;
|
|
1511
|
+
this.emitter.emit("focus", e);
|
|
1512
|
+
});
|
|
1513
|
+
this._view.contentDom.addEventListener("blur", (e) => {
|
|
1514
|
+
if (this._view.options?.readOnly) return;
|
|
1515
|
+
this.emitter.emit("blur", e);
|
|
1516
|
+
});
|
|
1509
1517
|
}
|
|
1510
1518
|
buildBaseOperation(type = "insert") {
|
|
1511
1519
|
let startRow = this._selectionModel.startRow;
|
|
@@ -7720,6 +7728,10 @@ var JsonViewer = class {
|
|
|
7720
7728
|
}
|
|
7721
7729
|
layout() {
|
|
7722
7730
|
this._view.layout();
|
|
7731
|
+
const { autoFocus, readOnly } = this._view.options || {};
|
|
7732
|
+
if (autoFocus && !readOnly) {
|
|
7733
|
+
this._view.contentDom.focus();
|
|
7734
|
+
}
|
|
7723
7735
|
}
|
|
7724
7736
|
getModel() {
|
|
7725
7737
|
return this._jsonModel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-json-viewer-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.88.0-alpha.1-exact",
|
|
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": "0f89092207f340633c04b8dc9ed4e08cb5fed4f4"
|
|
57
57
|
}
|