Convert all store files from JavaScript to TypeScript
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,8 +36,8 @@ import i18next from '@/i18n/i18n';
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useLoginStore } from '@/stores/login';
|
import { useLoginStore } from '@/stores/login';
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
</Sidebar>
|
</Sidebar>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { useCompareStore } from '@/stores/compare.js';
|
import { useCompareStore } from '@/stores/compare';
|
||||||
import { getTimeLabel } from '@/module/timeLabel.js';
|
import { getTimeLabel } from '@/module/timeLabel.js';
|
||||||
import getMoment from 'moment';
|
import getMoment from 'moment';
|
||||||
|
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import iconNA from '@/components/icons/IconNA.vue';
|
import iconNA from '@/components/icons/IconNA.vue';
|
||||||
import MoreModal from './MoreModal.vue';
|
import MoreModal from './MoreModal.vue';
|
||||||
import getNumberLabel from '@/module/numberLabel.js';
|
import getNumberLabel from '@/module/numberLabel.js';
|
||||||
|
|||||||
@@ -125,8 +125,8 @@
|
|||||||
import { storeToRefs, mapState, mapActions, } from 'pinia';
|
import { storeToRefs, mapState, mapActions, } from 'pinia';
|
||||||
import i18next from '@/i18n/i18n';
|
import i18next from '@/i18n/i18n';
|
||||||
import { useConformanceInputStore } from '@/stores/conformanceInput';
|
import { useConformanceInputStore } from '@/stores/conformanceInput';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import ConformanceRadioGroup from './ConformanceSidebar/ConformanceRadioGroup.vue';
|
import ConformanceRadioGroup from './ConformanceSidebar/ConformanceRadioGroup.vue';
|
||||||
import ConformanceShowBar from './ConformanceSidebar/ConformanceShowBar.vue';
|
import ConformanceShowBar from './ConformanceSidebar/ConformanceShowBar.vue';
|
||||||
import ConformanceTimeRange from './ConformanceSidebar/ConformanceTimeRange.vue';
|
import ConformanceTimeRange from './ConformanceSidebar/ConformanceTimeRange.vue';
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import ResultCheck from '@/components/Discover/Conformance/ConformanceSidebar/ResultCheck.vue';
|
import ResultCheck from '@/components/Discover/Conformance/ConformanceSidebar/ResultCheck.vue';
|
||||||
import ResultArrow from '@/components/Discover/Conformance/ConformanceSidebar/ResultArrow.vue';
|
import ResultArrow from '@/components/Discover/Conformance/ConformanceSidebar/ResultArrow.vue';
|
||||||
import ResultDot from '@/components/Discover/Conformance/ConformanceSidebar/ResultDot.vue';
|
import ResultDot from '@/components/Discover/Conformance/ConformanceSidebar/ResultDot.vue';
|
||||||
|
|||||||
@@ -99,8 +99,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import ActList from './ActList.vue';
|
import ActList from './ActList.vue';
|
||||||
import ActRadio from './ActRadio.vue';
|
import ActRadio from './ActRadio.vue';
|
||||||
import ActSeqDrag from './ActSeqDrag.vue';
|
import ActSeqDrag from './ActSeqDrag.vue';
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import TimeRangeDuration from '@/components/Discover/Conformance/ConformanceSidebar/TimeRangeDuration.vue';
|
import TimeRangeDuration from '@/components/Discover/Conformance/ConformanceSidebar/TimeRangeDuration.vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
|
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { setLineChartData } from '@/module/setChartData.js';
|
import { setLineChartData } from '@/module/setChartData.js';
|
||||||
import getMoment from 'moment';
|
import getMoment from 'moment';
|
||||||
import InputNumber from 'primevue/inputnumber';
|
import InputNumber from 'primevue/inputnumber';
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { delaySecond, } from '@/utils/timeUtil.js';
|
import { delaySecond, } from '@/utils/timeUtil.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { Chart, registerables } from 'chart.js';
|
import { Chart, registerables } from 'chart.js';
|
||||||
import 'chartjs-adapter-moment';
|
import 'chartjs-adapter-moment';
|
||||||
import getMoment from 'moment';
|
import getMoment from 'moment';
|
||||||
|
|||||||
@@ -70,8 +70,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
|
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -98,8 +98,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import ActOccCase from '@/components/Discover/Map/Filter/ActOccCase.vue';
|
import ActOccCase from '@/components/Discover/Map/Filter/ActOccCase.vue';
|
||||||
import ActOcc from '@/components/Discover/Map/Filter/ActOcc.vue';
|
import ActOcc from '@/components/Discover/Map/Filter/ActOcc.vue';
|
||||||
import ActAndSeq from '@/components/Discover/Map/Filter/ActAndSeq.vue';
|
import ActAndSeq from '@/components/Discover/Map/Filter/ActAndSeq.vue';
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
|
import cytoscapeMapTrace from '@/module/cytoscapeMapTrace.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { getTimeLabel } from '@/module/timeLabel.js';
|
import { getTimeLabel } from '@/module/timeLabel.js';
|
||||||
import getMoment from 'moment';
|
import getMoment from 'moment';
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
import IconUploarding from '../icons/IconUploarding.vue';
|
import IconUploarding from '../icons/IconUploarding.vue';
|
||||||
import { uploadFailedFirst } from '@/module/alertModal.js'
|
import { uploadFailedFirst } from '@/module/alertModal.js'
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useFilesStore } from '@/stores/files.js';
|
import { useFilesStore } from '@/stores/files';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['uploadModal'],
|
props: ['uploadModal'],
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import i18next from '@/i18n/i18n';
|
|||||||
import { useLoginStore } from '@/stores/login';
|
import { useLoginStore } from '@/stores/login';
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
import DspLogo from '@/components/icons/DspLogo.vue';
|
import DspLogo from '@/components/icons/DspLogo.vue';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -46,10 +46,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs, mapState, mapActions, } from 'pinia';
|
import { storeToRefs, mapState, mapActions, } from 'pinia';
|
||||||
import { useFilesStore } from '@/stores/files.js';
|
import { useFilesStore } from '@/stores/files';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import { usePageAdminStore } from '@/stores/pageAdmin.js';
|
import { usePageAdminStore } from '@/stores/pageAdmin';
|
||||||
import { useMapCompareStore } from '@/stores/mapCompareStore';
|
import { useMapCompareStore } from '@/stores/mapCompareStore';
|
||||||
import IconSearch from '@/components/icons/IconSearch.vue';
|
import IconSearch from '@/components/icons/IconSearch.vue';
|
||||||
import IconSetting from '@/components/icons/IconSetting.vue';
|
import IconSetting from '@/components/icons/IconSetting.vue';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createApp, markRaw } from "vue";
|
|||||||
|
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import router from "./router";
|
import router from "./router";
|
||||||
import pinia from '@/stores/main.js';
|
import pinia from '@/stores/main';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import mitt from 'mitt';
|
import mitt from 'mitt';
|
||||||
import ToastPlugin from 'vue-toast-notification';
|
import ToastPlugin from 'vue-toast-notification';
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import Swal from 'sweetalert2';
|
import Swal from 'sweetalert2';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import { useFilesStore } from '@/stores/files.js';
|
import { useFilesStore } from '@/stores/files';
|
||||||
import { usePageAdminStore } from '@/stores/pageAdmin.js';
|
import { usePageAdminStore } from '@/stores/pageAdmin';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
import { escapeHtml } from '@/utils/escapeHtml.js';
|
import { escapeHtml } from '@/utils/escapeHtml.js';
|
||||||
|
|
||||||
const customClass = {
|
const customClass = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import {useToast} from 'vue-toast-notification';
|
import {useToast} from 'vue-toast-notification';
|
||||||
import 'vue-toast-notification/dist/theme-sugar.css';
|
import 'vue-toast-notification/dist/theme-sugar.css';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import moment from 'moment';
|
|||||||
import apiError from '@/module/apiError.js';
|
import apiError from '@/module/apiError.js';
|
||||||
import Swal from 'sweetalert2';
|
import Swal from 'sweetalert2';
|
||||||
import { uploadFailedFirst, uploadFailedSecond, uploadloader, uploadSuccess, deleteSuccess } from '@/module/alertModal.js';
|
import { uploadFailedFirst, uploadFailedSecond, uploadloader, uploadSuccess, deleteSuccess } from '@/module/alertModal.js';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
|
|
||||||
export const useFilesStore = defineStore('filesStore', {
|
export const useFilesStore = defineStore('filesStore', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { INSIGHTS_FIELDS_AND_LABELS } from '@/constants/constants';
|
import { INSIGHTS_FIELDS_AND_LABELS } from '@/constants/constants';
|
||||||
import ImgCapsuleGlow1 from '@/assets/capsule1-glow.svg';
|
import ImgCapsuleGlow1 from '@/assets/capsule1-glow.svg';
|
||||||
import ImgCapsuleGlow2 from '@/assets/capsule2-glow.svg';
|
import ImgCapsuleGlow2 from '@/assets/capsule2-glow.svg';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { INSIGHTS_FIELDS_AND_LABELS } from '@/constants/constants';
|
import { INSIGHTS_FIELDS_AND_LABELS } from '@/constants/constants';
|
||||||
import ImgCapsuleGlow1 from '@/assets/capsule1-glow.svg';
|
import ImgCapsuleGlow1 from '@/assets/capsule1-glow.svg';
|
||||||
import ImgCapsuleGlow2 from '@/assets/capsule2-glow.svg';
|
import ImgCapsuleGlow2 from '@/assets/capsule2-glow.svg';
|
||||||
|
|||||||
@@ -115,8 +115,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ref, computed, onMounted, watch, } from 'vue';
|
import { ref, computed, onMounted, watch, } from 'vue';
|
||||||
import { mapState, mapActions, } from 'pinia';
|
import { mapState, mapActions, } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
import { useLoginStore } from '@/stores/login';
|
import { useLoginStore } from '@/stores/login';
|
||||||
import SearchBar from '../../../components/AccountMenu/SearchBar.vue';
|
import SearchBar from '../../../components/AccountMenu/SearchBar.vue';
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
import { defineComponent, computed, ref, watch, onMounted, } from 'vue';
|
import { defineComponent, computed, ref, watch, onMounted, } from 'vue';
|
||||||
import i18next from "@/i18n/i18n.js";
|
import i18next from "@/i18n/i18n.js";
|
||||||
import { mapActions, } from 'pinia';
|
import { mapActions, } from 'pinia';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useToast } from 'vue-toast-notification';
|
import { useToast } from 'vue-toast-notification';
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { computed, } from 'vue';
|
import { computed, } from 'vue';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
import ModalAccountEditCreate from './ModalAccountEditCreate.vue';
|
import ModalAccountEditCreate from './ModalAccountEditCreate.vue';
|
||||||
import ModalAccountInfo from './ModalAccountInfo.vue';
|
import ModalAccountInfo from './ModalAccountInfo.vue';
|
||||||
import ModalDeleteAlert from './ModalDeleteAlert.vue';
|
import ModalDeleteAlert from './ModalDeleteAlert.vue';
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, } from 'vue';
|
import { defineComponent, } from 'vue';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
import i18next from '@/i18n/i18n.js';
|
import i18next from '@/i18n/i18n.js';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
headerText: {
|
headerText: {
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ import i18next from '@/i18n/i18n.js';
|
|||||||
import { useLoginStore } from '@/stores/login';
|
import { useLoginStore } from '@/stores/login';
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
import Badge from '../../components/Badge.vue';
|
import Badge from '../../components/Badge.vue';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import Button from '@/components/Button.vue';
|
import Button from '@/components/Button.vue';
|
||||||
import ButtonFilled from '@/components/ButtonFilled.vue';
|
import ButtonFilled from '@/components/ButtonFilled.vue';
|
||||||
import { useToast } from 'vue-toast-notification';
|
import { useToast } from 'vue-toast-notification';
|
||||||
|
|||||||
@@ -152,8 +152,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useCompareStore } from '@/stores/compare.js';
|
import { useCompareStore } from '@/stores/compare';
|
||||||
import SidebarStates from '@/components/Compare/SidebarStates.vue';
|
import SidebarStates from '@/components/Compare/SidebarStates.vue';
|
||||||
import { setLineChartData } from '@/module/setChartData.js';
|
import { setLineChartData } from '@/module/setChartData.js';
|
||||||
import { simpleTimeLabel, followTimeLabel,
|
import { simpleTimeLabel, followTimeLabel,
|
||||||
|
|||||||
@@ -56,9 +56,9 @@
|
|||||||
import { onBeforeMount, computed, } from 'vue';
|
import { onBeforeMount, computed, } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import cytoscapeMap from '@/module/cytoscapeMap.js';
|
import cytoscapeMap from '@/module/cytoscapeMap.js';
|
||||||
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
|
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
|
||||||
import { useMapPathStore } from '@/stores/mapPathStore';
|
import { useMapPathStore } from '@/stores/mapPathStore';
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import StatusBar from '@/components/Discover/StatusBar.vue';
|
import StatusBar from '@/components/Discover/StatusBar.vue';
|
||||||
import ConformanceResults from '@/components/Discover/Conformance/ConformanceResults.vue';
|
import ConformanceResults from '@/components/Discover/Conformance/ConformanceResults.vue';
|
||||||
import ConformanceSidebar from '@/components/Discover/Conformance/ConformanceSidebar.vue';
|
import ConformanceSidebar from '@/components/Discover/Conformance/ConformanceSidebar.vue';
|
||||||
|
|||||||
@@ -64,9 +64,9 @@
|
|||||||
import { onBeforeMount, computed, } from 'vue';
|
import { onBeforeMount, computed, } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import cytoscapeMap from '@/module/cytoscapeMap.js';
|
import cytoscapeMap from '@/module/cytoscapeMap.js';
|
||||||
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
|
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
|
||||||
import { useMapPathStore } from '@/stores/mapPathStore';
|
import { useMapPathStore } from '@/stores/mapPathStore';
|
||||||
|
|||||||
@@ -138,9 +138,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import { storeToRefs, mapActions, } from 'pinia';
|
import { storeToRefs, mapActions, } from 'pinia';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { usePerformanceStore } from '@/stores/performance.js';
|
import { usePerformanceStore } from '@/stores/performance';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import StatusBar from '@/components/Discover/StatusBar.vue';
|
import StatusBar from '@/components/Discover/StatusBar.vue';
|
||||||
import { setLineChartData } from '@/module/setChartData.js';
|
import { setLineChartData } from '@/module/setChartData.js';
|
||||||
import { simpleTimeLabel, followTimeLabel,
|
import { simpleTimeLabel, followTimeLabel,
|
||||||
|
|||||||
@@ -224,10 +224,10 @@
|
|||||||
import { storeToRefs, mapActions, } from 'pinia';
|
import { storeToRefs, mapActions, } from 'pinia';
|
||||||
import { useMapCompareStore } from '@/stores/mapCompareStore';
|
import { useMapCompareStore } from '@/stores/mapCompareStore';
|
||||||
import { useLoginStore } from '@/stores/login';
|
import { useLoginStore } from '@/stores/login';
|
||||||
import { useFilesStore } from '@/stores/files.js';
|
import { useFilesStore } from '@/stores/files';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { usePageAdminStore } from '@/stores/pageAdmin.js';
|
import { usePageAdminStore } from '@/stores/pageAdmin';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import IconDataFormat from '@/components/icons/IconDataFormat.vue';
|
import IconDataFormat from '@/components/icons/IconDataFormat.vue';
|
||||||
import IconRule from '@/components/icons/IconRule.vue';
|
import IconRule from '@/components/icons/IconRule.vue';
|
||||||
import IconsFilter from '@/components/icons/IconsFilter.vue';
|
import IconsFilter from '@/components/icons/IconsFilter.vue';
|
||||||
|
|||||||
@@ -14,14 +14,14 @@
|
|||||||
import { onBeforeMount, } from 'vue';
|
import { onBeforeMount, } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { storeToRefs, mapActions, mapState, } from 'pinia';
|
import { storeToRefs, mapActions, mapState, } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
import Header from "@/components/Header.vue";
|
import Header from "@/components/Header.vue";
|
||||||
import Navbar from "@/components/Navbar.vue";
|
import Navbar from "@/components/Navbar.vue";
|
||||||
import Loading from '@/components/Loading.vue';
|
import Loading from '@/components/Loading.vue';
|
||||||
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
import { leaveFilter, leaveConformance } from '@/module/alertModal.js';
|
||||||
import { usePageAdminStore } from '@/stores/pageAdmin.js';
|
import { usePageAdminStore } from '@/stores/pageAdmin';
|
||||||
import { useLoginStore } from "@/stores/login";
|
import { useLoginStore } from "@/stores/login";
|
||||||
import { getCookie, setCookie } from "@/utils/cookieUtil.js";
|
import { getCookie, setCookie } from "@/utils/cookieUtil.js";
|
||||||
import ModalContainer from './AccountManagement/ModalContainer.vue';
|
import ModalContainer from './AccountManagement/ModalContainer.vue';
|
||||||
|
|||||||
@@ -79,8 +79,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
import { useFilesStore } from '@/stores/files.js';
|
import { useFilesStore } from '@/stores/files';
|
||||||
import { uploadFailedFirst, uploadSuccess, uploadConfirm } from '@/module/alertModal.js'
|
import { uploadFailedFirst, uploadSuccess, uploadConfirm } from '@/module/alertModal.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ vi.mock('@/module/apiError.js', () => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
import Login from '@/views/Login/Login.vue';
|
import Login from '@/views/Login/Login.vue';
|
||||||
import { useLoginStore } from '@/stores/login.ts';
|
import { useLoginStore } from '@/stores/login';
|
||||||
|
|
||||||
describe('Login', () => {
|
describe('Login', () => {
|
||||||
let pinia;
|
let pinia;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|||||||
import { mount } from '@vue/test-utils';
|
import { mount } from '@vue/test-utils';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import ModalHeader from '@/views/AccountManagement/ModalHeader.vue';
|
import ModalHeader from '@/views/AccountManagement/ModalHeader.vue';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
|
|
||||||
describe('ModalHeader', () => {
|
describe('ModalHeader', () => {
|
||||||
let pinia;
|
let pinia;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Mock login store to avoid its side effects
|
// Mock login store to avoid its side effects
|
||||||
vi.mock('@/stores/login.ts', () => {
|
vi.mock('@/stores/login', () => {
|
||||||
const { defineStore } = require('pinia');
|
const { defineStore } = require('pinia');
|
||||||
return {
|
return {
|
||||||
useLoginStore: defineStore('loginStore', {
|
useLoginStore: defineStore('loginStore', {
|
||||||
@@ -27,7 +27,7 @@ vi.mock('@/stores/login.ts', () => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
import { useAcctMgmtStore } from '@/stores/acctMgmt.ts';
|
import { useAcctMgmtStore } from '@/stores/acctMgmt';
|
||||||
|
|
||||||
describe('acctMgmtStore', () => {
|
describe('acctMgmtStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
default: { get: mockGet, post: mockPost, put: mockPut },
|
default: { get: mockGet, post: mockPost, put: mockPut },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
import { useAllMapDataStore } from '@/stores/allMapData.js';
|
import { useAllMapDataStore } from '@/stores/allMapData';
|
||||||
|
|
||||||
describe('allMapDataStore', () => {
|
describe('allMapDataStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
default: { get: mockGet },
|
default: { get: mockGet },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
import { useCompareStore } from '@/stores/compare.js';
|
import { useCompareStore } from '@/stores/compare';
|
||||||
|
|
||||||
describe('compareStore', () => {
|
describe('compareStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
import apiError from '@/module/apiError.js';
|
import apiError from '@/module/apiError.js';
|
||||||
import { useConformanceStore } from '@/stores/conformance.js';
|
import { useConformanceStore } from '@/stores/conformance';
|
||||||
|
|
||||||
describe('conformanceStore', () => {
|
describe('conformanceStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, beforeEach } from 'vitest';
|
import { describe, it, expect, beforeEach } from 'vitest';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import { useConformanceInputStore } from '@/stores/conformanceInput.js';
|
import { useConformanceInputStore } from '@/stores/conformanceInput';
|
||||||
|
|
||||||
describe('conformanceInputStore', () => {
|
describe('conformanceInputStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import { useCytoscapeStore } from '@/stores/cytoscapeStore.ts';
|
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
|
||||||
import { SAVE_KEY_NAME } from '@/constants/constants.js';
|
import { SAVE_KEY_NAME } from '@/constants/constants.js';
|
||||||
|
|
||||||
// Mock localStorage since jsdom's localStorage is limited
|
// Mock localStorage since jsdom's localStorage is limited
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
default: { get: mockGet, post: mockPost, put: mockPut, delete: mockDelete },
|
default: { get: mockGet, post: mockPost, put: mockPut, delete: mockDelete },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
import { useFilesStore } from '@/stores/files.js';
|
import { useFilesStore } from '@/stores/files';
|
||||||
|
|
||||||
describe('filesStore', () => {
|
describe('filesStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, beforeEach } from 'vitest';
|
import { describe, it, expect, beforeEach } from 'vitest';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import { useLoadingStore } from '@/stores/loading.js';
|
import { useLoadingStore } from '@/stores/loading';
|
||||||
|
|
||||||
describe('loadingStore', () => {
|
describe('loadingStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
default: { get: mockClientGet },
|
default: { get: mockClientGet },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
import { useLoginStore } from '@/stores/login.ts';
|
import { useLoginStore } from '@/stores/login';
|
||||||
|
|
||||||
// Mock axios methods (used for signIn/refreshToken which call plain axios)
|
// Mock axios methods (used for signIn/refreshToken which call plain axios)
|
||||||
vi.spyOn(axios, 'post').mockImplementation(vi.fn());
|
vi.spyOn(axios, 'post').mockImplementation(vi.fn());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, beforeEach } from 'vitest';
|
import { describe, it, expect, beforeEach } from 'vitest';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import { useMapCompareStore } from '@/stores/mapCompareStore.ts';
|
import { useMapCompareStore } from '@/stores/mapCompareStore';
|
||||||
|
|
||||||
describe('mapCompareStore', () => {
|
describe('mapCompareStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
|
|
||||||
// Mock allMapData store (used by createInsightWithPath / createPaths)
|
// Mock allMapData store (used by createInsightWithPath / createPaths)
|
||||||
vi.mock('@/stores/allMapData.js', () => ({
|
vi.mock('@/stores/allMapData', () => ({
|
||||||
default: () => ({ insights: {} }),
|
default: () => ({ insights: {} }),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ vi.mock('@/assets/capsule2.svg', () => ({ default: 'cap2' }));
|
|||||||
vi.mock('@/assets/capsule3.svg', () => ({ default: 'cap3' }));
|
vi.mock('@/assets/capsule3.svg', () => ({ default: 'cap3' }));
|
||||||
vi.mock('@/assets/capsule4.svg', () => ({ default: 'cap4' }));
|
vi.mock('@/assets/capsule4.svg', () => ({ default: 'cap4' }));
|
||||||
|
|
||||||
import { useMapPathStore } from '@/stores/mapPathStore.ts';
|
import { useMapPathStore } from '@/stores/mapPathStore';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a mock Cytoscape node.
|
* Creates a mock Cytoscape node.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, beforeEach } from 'vitest';
|
import { describe, it, expect, beforeEach } from 'vitest';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import { useModalStore } from '@/stores/modal.js';
|
import { useModalStore } from '@/stores/modal';
|
||||||
import { MODAL_ACCT_INFO, MODAL_DELETE } from '@/constants/constants.js';
|
import { MODAL_ACCT_INFO, MODAL_DELETE } from '@/constants/constants.js';
|
||||||
|
|
||||||
describe('modalStore', () => {
|
describe('modalStore', () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { describe, it, expect, beforeEach } from 'vitest';
|
import { describe, it, expect, beforeEach } from 'vitest';
|
||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
import { usePageAdminStore } from '@/stores/pageAdmin.js';
|
import { usePageAdminStore } from '@/stores/pageAdmin';
|
||||||
|
|
||||||
describe('pageAdminStore', () => {
|
describe('pageAdminStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ vi.mock('@/api/client.js', () => ({
|
|||||||
default: { get: mockGet },
|
default: { get: mockGet },
|
||||||
}));
|
}));
|
||||||
|
|
||||||
import { usePerformanceStore } from '@/stores/performance.js';
|
import { usePerformanceStore } from '@/stores/performance';
|
||||||
|
|
||||||
describe('performanceStore', () => {
|
describe('performanceStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|||||||
import { setActivePinia, createPinia } from 'pinia';
|
import { setActivePinia, createPinia } from 'pinia';
|
||||||
|
|
||||||
// Mock all heavy imports that MainContainer.vue pulls in
|
// Mock all heavy imports that MainContainer.vue pulls in
|
||||||
vi.mock('@/stores/loading.js', () => ({
|
vi.mock('@/stores/loading', () => ({
|
||||||
useLoadingStore: () => ({ isLoading: false }),
|
useLoadingStore: () => ({ isLoading: false }),
|
||||||
}));
|
}));
|
||||||
vi.mock('@/stores/allMapData.js', () => ({
|
vi.mock('@/stores/allMapData', () => ({
|
||||||
useAllMapDataStore: () => ({}),
|
useAllMapDataStore: () => ({}),
|
||||||
}));
|
}));
|
||||||
vi.mock('@/stores/conformance.js', () => ({
|
vi.mock('@/stores/conformance', () => ({
|
||||||
useConformanceStore: () => ({}),
|
useConformanceStore: () => ({}),
|
||||||
}));
|
}));
|
||||||
vi.mock('@/stores/pageAdmin.js', () => ({
|
vi.mock('@/stores/pageAdmin', () => ({
|
||||||
usePageAdminStore: () => ({}),
|
usePageAdminStore: () => ({}),
|
||||||
}));
|
}));
|
||||||
vi.mock('@/module/alertModal.js', () => ({
|
vi.mock('@/module/alertModal.js', () => ({
|
||||||
@@ -26,7 +26,7 @@ vi.mock('@/router/index.ts', () => ({
|
|||||||
}));
|
}));
|
||||||
vi.mock('@/module/cytoscapeMap.js', () => ({}));
|
vi.mock('@/module/cytoscapeMap.js', () => ({}));
|
||||||
|
|
||||||
import { useLoginStore } from '@/stores/login.ts';
|
import { useLoginStore } from '@/stores/login';
|
||||||
import * as cookieUtil from '@/utils/cookieUtil.js';
|
import * as cookieUtil from '@/utils/cookieUtil.js';
|
||||||
|
|
||||||
// Import the component definition to access beforeRouteEnter
|
// Import the component definition to access beforeRouteEnter
|
||||||
|
|||||||
Reference in New Issue
Block a user