diff --git a/src/components.d.ts b/src/components.d.ts index 534c46f..cb59c48 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -11,6 +11,7 @@ declare module 'vue' { ConnectionDialog: typeof import('./components/DrawToolbar/ConnectionDialog.vue')['default'] ConnectivityGraph: typeof import('./components/ConnectivityGraph/ConnectivityGraph.vue')['default'] ConnectivityList: typeof import('./components/ConnectivityList/ConnectivityList.vue')['default'] + ConnectivityReconciliationList: typeof import('./components/ConnectivityList/ConnectivityReconciliationList.vue')['default'] CopyToClipboard: typeof import('./components/CopyToClipboard/CopyToClipboard.vue')['default'] CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default'] DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default'] @@ -46,6 +47,7 @@ declare module 'vue' { ExternalResourceCard: typeof import('./components/Tooltip/ExternalResourceCard.vue')['default'] HelpModeDialog: typeof import('./components/HelpModeDialog/HelpModeDialog.vue')['default'] ProvenancePopup: typeof import('./components/Tooltip/ProvenancePopup.vue')['default'] + ReconciliationTable: typeof import('./components/ConnectivityList/ReconciliationTable.vue')['default'] RelatedConnectivitiesButton: typeof import('./components/Tooltip/RelatedConnectivitiesButton.vue')['default'] Tooltip: typeof import('./components/Tooltip/Tooltip.vue')['default'] TreeControls: typeof import('./components/TreeControls/TreeControls.vue')['default'] diff --git a/src/components/CompetencyQueries/CompetencyQueries.js b/src/components/CompetencyQueries/CompetencyQueries.js index b2d21b5..189fa04 100644 --- a/src/components/CompetencyQueries/CompetencyQueries.js +++ b/src/components/CompetencyQueries/CompetencyQueries.js @@ -1,3 +1,5 @@ +import { removeDuplicates } from '../utilities'; + /** * @private * Competency Queries @@ -28,6 +30,56 @@ async function _postRequest(API_URL, payload) { } } +/** + * CQ query 27: Single Connectivity List + * This query is available for the new SCKAN knowledge source "sckan-2026-02-11". + * The legacy maps don't have node-mappings. + * @param {*} flatmapAPI + * @param {*} knowledgeSource mapuuid + * @param {*} pathId + * @returns combined connectivity list + */ +async function querySingleConnectivityList(flatmapAPI, knowledgeSource, pathId) { + const data = await competencyQuery({ + flatmapAPI: flatmapAPI, + knowledgeSource: knowledgeSource, + queryId: 27, + parameters: [ + { + column: 'path_id', + value: pathId + }, + ] + }); + + if (data?.results?.values) { + const connectivityList = data.results.values.map((value) => { + // value => [ + // "sckan_id", + // "path_id", + // "sckan_node_id", + // "sckan_node_label", + // "source_id", // mapuuid + // "node_id", // map node id + // "node_label" // map node label + // ] + return { + sckanId: value[0], + mapUUID: value[4], + pathId: value[1], + sckanNodeId: value[2] ? JSON.parse(value[2]) : [], + sckanNodeLabel: value[3] || "", + mapNodeId: value[5] ? JSON.parse(value[5]) : [], + mapNodeLabel: value[6] || "", + }; + }); + // remove duplicates + return removeDuplicates(connectivityList); + } + + return []; +} + /** * Competency Query * @public @@ -392,4 +444,5 @@ export { queryPathsByDestination, queryPathsByRoute, queryForwardBackwardConnections, + querySingleConnectivityList, }; diff --git a/src/components/ConnectivityList/ConnectivityList.vue b/src/components/ConnectivityList/ConnectivityList.vue index 853684f..fac1ffd 100644 --- a/src/components/ConnectivityList/ConnectivityList.vue +++ b/src/components/ConnectivityList/ConnectivityList.vue @@ -19,172 +19,172 @@ {{ connectivityError.errorMessage }} - {{ entry.paths }} -
|
+
+ {{ capitalise(item.sckanLabel) }}
+
+ |
+
+
+
+
+ + {{ capitalise(item.sckanLabel) }} + | +
+
+
+ {{ capitalise(item.mapLabel) }}
+
+ |
+
+ |