sqlite-wasm-viewer 1.0.3 → 1.0.5
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/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.defaultIsSqliteDatabase = defaultIsSqliteDatabase;
|
|
6
7
|
exports.hideViewer = hideViewer;
|
|
7
8
|
exports.setConfig = setConfig;
|
|
8
9
|
exports.showViewer = showViewer;
|
|
@@ -23,12 +24,13 @@ var rightPanel = null;
|
|
|
23
24
|
var explorerView = null;
|
|
24
25
|
var queryRunner = null;
|
|
25
26
|
var defaultSqliteExtension = ['db', 'sqlite'];
|
|
27
|
+
function defaultIsSqliteDatabase(filename) {
|
|
28
|
+
return defaultSqliteExtension.some(function (ext) {
|
|
29
|
+
return filename.endsWith(".".concat(ext));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
26
32
|
var config = {
|
|
27
|
-
isSqliteDatabase:
|
|
28
|
-
return defaultSqliteExtension.some(function (ext) {
|
|
29
|
-
return filename.endsWith(".".concat(ext));
|
|
30
|
-
});
|
|
31
|
-
}
|
|
33
|
+
isSqliteDatabase: defaultIsSqliteDatabase
|
|
32
34
|
};
|
|
33
35
|
function setConfig(userConfig) {
|
|
34
36
|
if (userConfig) {
|
package/dist/styles.css
CHANGED
|
@@ -60,11 +60,13 @@ var ExplorerView = /*#__PURE__*/function () {
|
|
|
60
60
|
dbRoot.appendChild(dbItem);
|
|
61
61
|
databaseItem.tables.forEach(function (table) {
|
|
62
62
|
var tableItem = document.createElement('div');
|
|
63
|
-
tableItem.innerText = table;
|
|
64
63
|
tableItem.className = 'table';
|
|
65
64
|
tableItem.onclick = function () {
|
|
66
65
|
_this.selectTable(tableItem, databaseItem);
|
|
67
66
|
};
|
|
67
|
+
var tableItemInner = document.createElement('div');
|
|
68
|
+
tableItemInner.innerText = table;
|
|
69
|
+
tableItem.appendChild(tableItemInner);
|
|
68
70
|
dbRoot.appendChild(tableItem);
|
|
69
71
|
});
|
|
70
72
|
this.containerEl.appendChild(dbRoot);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#explorer_tree {
|
|
2
2
|
padding: 8px;
|
|
3
3
|
padding-left: 20px;
|
|
4
|
+
overflow-x: clip;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
scrollbar-gutter: stable;
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
#explorer_tree > .db {
|
|
@@ -22,9 +25,15 @@
|
|
|
22
25
|
|
|
23
26
|
#explorer_tree > .table {
|
|
24
27
|
margin-left: 20px;
|
|
28
|
+
height: 20px;
|
|
25
29
|
cursor: pointer;
|
|
26
30
|
}
|
|
27
31
|
|
|
32
|
+
#explorer_tree > .table > div {
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
overflow-x: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
28
37
|
#explorer_tree > .table.selected {
|
|
29
38
|
background-color: rgb(128, 128, 128);
|
|
30
39
|
}
|
package/index.d.ts
CHANGED