Standardize store exports to named useXxxStore convention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 13:25:00 +08:00
co-authored by Claude Opus 4.6
parent 147b16ca34
commit 90048d0505
69 changed files with 241 additions and 241 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
import { defineStore } from 'pinia';
import AllMapData from '@/stores/allMapData.js';
import { useAllMapDataStore } from '@/stores/allMapData.js';
import { INSIGHTS_FIELDS_AND_LABELS } from '@/constants/constants';
import ImgCapsuleGlow1 from '@/assets/capsule1-glow.svg';
import ImgCapsuleGlow2 from '@/assets/capsule2-glow.svg';
@@ -13,7 +13,7 @@ import ImgCapsule4 from '@/assets/capsule4.svg';
const ImgCapsulesGlow = [ImgCapsuleGlow1, ImgCapsuleGlow2, ImgCapsuleGlow3, ImgCapsuleGlow4];
const ImgCapsules = [ImgCapsule1, ImgCapsule2, ImgCapsule3, ImgCapsule4];
export default defineStore('useMapPathStore', {
export const useMapPathStore = defineStore('mapPathStore', {
state: () => ({
clickedPath: [],
insights: {},
@@ -65,7 +65,7 @@ export default defineStore('useMapPathStore', {
}
},
async createInsightWithPath() {
const { insights } = AllMapData();
const { insights } = useAllMapDataStore();
this.insights = { ...insights };
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
.filter(function (elem) {
@@ -118,7 +118,7 @@ export default defineStore('useMapPathStore', {
});
// Depth First Search from the starting node
await this.depthFirstSearchCreatePath(this.startNode, [this.startNode], []);
const { insights } = AllMapData();
const { insights } = useAllMapDataStore();
this.insights = { ...insights };
await this.matchGraphPathWithInsightsPath();
},