@matdata/yasgui 5.17.0 → 5.19.0
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/build/ts/src/Tab.js +7 -1
- package/build/ts/src/Tab.js.map +1 -1
- package/build/ts/src/TabContextMenu.d.ts +1 -0
- package/build/ts/src/TabContextMenu.js +42 -0
- package/build/ts/src/TabContextMenu.js.map +1 -1
- package/build/ts/src/TabSettingsModal.d.ts +2 -1
- package/build/ts/src/TabSettingsModal.js +44 -25
- package/build/ts/src/TabSettingsModal.js.map +1 -1
- package/build/ts/src/index.d.ts +6 -0
- package/build/ts/src/index.js +42 -0
- package/build/ts/src/index.js.map +1 -1
- package/build/ts/src/prefixUtils.d.ts +1 -0
- package/build/ts/src/prefixUtils.js +23 -0
- package/build/ts/src/prefixUtils.js.map +1 -0
- package/build/ts/src/queryManagement/QueryBrowser.d.ts +8 -0
- package/build/ts/src/queryManagement/QueryBrowser.js +283 -116
- package/build/ts/src/queryManagement/QueryBrowser.js.map +1 -1
- package/build/ts/src/queryManagement/QueryHistoryModal.d.ts +35 -0
- package/build/ts/src/queryManagement/QueryHistoryModal.js +266 -0
- package/build/ts/src/queryManagement/QueryHistoryModal.js.map +1 -0
- package/build/ts/src/queryManagement/WorkspaceSettingsForm.js +8 -5
- package/build/ts/src/queryManagement/WorkspaceSettingsForm.js.map +1 -1
- package/build/ts/src/queryManagement/backends/GitWorkspaceBackend.d.ts +1 -0
- package/build/ts/src/queryManagement/backends/GitWorkspaceBackend.js +33 -0
- package/build/ts/src/queryManagement/backends/GitWorkspaceBackend.js.map +1 -1
- package/build/ts/src/queryManagement/backends/SparqlWorkspaceBackend.d.ts +1 -0
- package/build/ts/src/queryManagement/backends/SparqlWorkspaceBackend.js +3 -0
- package/build/ts/src/queryManagement/backends/SparqlWorkspaceBackend.js.map +1 -1
- package/build/ts/src/queryManagement/backends/WorkspaceBackend.d.ts +1 -0
- package/build/ts/src/queryManagement/countManagedQueries.d.ts +2 -0
- package/build/ts/src/queryManagement/countManagedQueries.js +35 -0
- package/build/ts/src/queryManagement/countManagedQueries.js.map +1 -0
- package/build/ts/src/tabNavigationHistory.d.ts +3 -0
- package/build/ts/src/tabNavigationHistory.js +13 -0
- package/build/ts/src/tabNavigationHistory.js.map +1 -0
- package/build/ts/src/version.d.ts +1 -1
- package/build/ts/src/version.js +1 -1
- package/build/yasgui.min.css +1 -1
- package/build/yasgui.min.css.map +3 -3
- package/build/yasgui.min.js +245 -245
- package/build/yasgui.min.js.map +4 -4
- package/package.json +1 -1
- package/src/Tab.ts +10 -0
- package/src/TabContextMenu.ts +42 -0
- package/src/TabSettingsModal.ts +48 -29
- package/src/index.ts +50 -0
- package/src/prefixUtils.ts +26 -0
- package/src/queryManagement/QueryBrowser.scss +85 -0
- package/src/queryManagement/QueryBrowser.ts +429 -213
- package/src/queryManagement/QueryHistoryModal.scss +239 -0
- package/src/queryManagement/QueryHistoryModal.ts +346 -0
- package/src/queryManagement/WorkspaceSettingsForm.ts +8 -5
- package/src/queryManagement/backends/GitWorkspaceBackend.ts +39 -0
- package/src/queryManagement/backends/SparqlWorkspaceBackend.ts +5 -0
- package/src/queryManagement/backends/WorkspaceBackend.ts +8 -0
- package/src/queryManagement/countManagedQueries.ts +28 -0
- package/src/tabNavigationHistory.ts +17 -0
- package/src/themes.scss +44 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WorkspaceBackend } from "./backends/WorkspaceBackend";
|
|
2
|
+
|
|
3
|
+
export async function countManagedQueries(backend: Pick<WorkspaceBackend, "listFolder">): Promise<number> {
|
|
4
|
+
const queryIds = new Set<string>();
|
|
5
|
+
const visitedFolderIds = new Set<string>();
|
|
6
|
+
const folderQueue: (string | undefined)[] = [undefined];
|
|
7
|
+
|
|
8
|
+
while (folderQueue.length > 0) {
|
|
9
|
+
const folderId = folderQueue.shift();
|
|
10
|
+
const folderKey = folderId ?? "__root__";
|
|
11
|
+
if (visitedFolderIds.has(folderKey)) continue;
|
|
12
|
+
visitedFolderIds.add(folderKey);
|
|
13
|
+
|
|
14
|
+
const entries = await backend.listFolder(folderId);
|
|
15
|
+
for (const entry of entries) {
|
|
16
|
+
if (entry.kind === "query") {
|
|
17
|
+
queryIds.add(entry.id);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (!visitedFolderIds.has(entry.id)) {
|
|
22
|
+
folderQueue.push(entry.id);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return queryIds.size;
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const moveTabIdToFront = (tabIds: string[], tabId: string): string[] => {
|
|
2
|
+
const idsWithoutTab = tabIds.filter((id) => id !== tabId);
|
|
3
|
+
return [tabId, ...idsWithoutTab];
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export const removeTabId = (tabIds: string[], tabId: string): string[] => tabIds.filter((id) => id !== tabId);
|
|
7
|
+
|
|
8
|
+
export const getRecentlyUsedTabId = (
|
|
9
|
+
tabIds: string[],
|
|
10
|
+
activeTabId: string,
|
|
11
|
+
direction: "backward" | "forward" = "backward",
|
|
12
|
+
): string | undefined => {
|
|
13
|
+
const recentlyUsedIds = moveTabIdToFront(tabIds, activeTabId);
|
|
14
|
+
const candidateTabIds = recentlyUsedIds.filter((id) => id !== activeTabId);
|
|
15
|
+
if (!candidateTabIds.length) return undefined;
|
|
16
|
+
return direction === "backward" ? candidateTabIds[0] : candidateTabIds[candidateTabIds.length - 1];
|
|
17
|
+
};
|
package/src/themes.scss
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--yasgui-link-color: #337ab7;
|
|
17
17
|
--yasgui-link-hover: #2a6496;
|
|
18
18
|
--yasgui-accent-color: #337ab7;
|
|
19
|
+
--yasgui-accent-bg: #e8f0fe;
|
|
19
20
|
--yasgui-button-text: #505050;
|
|
20
21
|
--yasgui-button-hover: #000;
|
|
21
22
|
--yasgui-chip-bg: #f5f5f5;
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
--yasgui-link-color: #58a6ff;
|
|
67
68
|
--yasgui-link-hover: #79c0ff;
|
|
68
69
|
--yasgui-accent-color: #58a6ff;
|
|
70
|
+
--yasgui-accent-bg: #1c2d41;
|
|
69
71
|
--yasgui-button-text: #c9d1d9;
|
|
70
72
|
--yasgui-button-hover: #f0f6fc;
|
|
71
73
|
--yasgui-chip-bg: #21262d;
|
|
@@ -290,6 +292,48 @@
|
|
|
290
292
|
border-color: var(--yasgui-border-color);
|
|
291
293
|
}
|
|
292
294
|
}
|
|
295
|
+
|
|
296
|
+
.yasqe_mapPopup {
|
|
297
|
+
background-color: var(--yasgui-bg-primary);
|
|
298
|
+
border-color: var(--yasgui-border-color);
|
|
299
|
+
color: var(--yasgui-text-primary);
|
|
300
|
+
|
|
301
|
+
.yasqe_mapPopup_map {
|
|
302
|
+
border-color: var(--yasgui-border-color);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.yasqe_mapPopup_geometryBtn {
|
|
306
|
+
background-color: var(--yasgui-bg-primary);
|
|
307
|
+
color: var(--yasgui-text-primary);
|
|
308
|
+
border-color: var(--yasgui-border-color);
|
|
309
|
+
|
|
310
|
+
&:hover {
|
|
311
|
+
background-color: var(--yasgui-bg-secondary);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&.active {
|
|
315
|
+
background-color: var(--yasgui-accent-color);
|
|
316
|
+
color: var(--yasgui-bg-primary);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.yasqe_mapPopup_preview {
|
|
321
|
+
background-color: var(--yasgui-bg-secondary);
|
|
322
|
+
color: var(--yasgui-text-primary);
|
|
323
|
+
border-color: var(--yasgui-border-color);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.leaflet-control-zoom a,
|
|
327
|
+
.leaflet-control-attribution {
|
|
328
|
+
background-color: var(--yasgui-bg-primary);
|
|
329
|
+
color: var(--yasgui-text-primary);
|
|
330
|
+
border-color: var(--yasgui-border-color);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.leaflet-control-zoom a:hover {
|
|
334
|
+
background-color: var(--yasgui-bg-secondary);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
293
337
|
}
|
|
294
338
|
|
|
295
339
|
.yasqe_btn {
|
package/src/version.ts
CHANGED