Files
speckle-server/packages/frontend-2/utils/globals.ts
T
Kristaps Fabians Geikins ea5dadbdb2 feat: move view into group dialog (#5211)
* looking into dialog premature closing

* fixed group select

* rover update

* tests
2025-08-12 13:32:38 +03:00

45 lines
1.3 KiB
TypeScript

import type { RouteLocationNormalized } from 'vue-router'
import { noop } from 'lodash-es'
import { wrapRefWithTracking } from '~/lib/common/helpers/debugging'
import { ToastNotificationType } from '~~/lib/common/composables/toast'
import {
convertThrowIntoFetchResult,
getCacheId,
getFirstErrorMessage as getFirstGqlErrorMessage,
iterateObjectField,
modifyObjectField,
ROOT_MUTATION,
ROOT_QUERY,
ROOT_SUBSCRIPTION
} from '~/lib/common/helpers/graphql'
import { checkIfIsInPlaceNavigation } from '~/lib/common/helpers/navigation'
import { ViewerEventBusKeys } from '~/lib/viewer/helpers/eventBus'
/**
* Debugging helper to ensure variables are available in debugging scope
*/
export const markUsed = noop
/**
* Will attempt to resolve the current route definition in various ways.
*/
export const getRouteDefinition = (route?: RouteLocationNormalized) => {
const matchedPath = route ? route.matched[route.matched.length - 1]?.path : undefined
return matchedPath || '/404'
}
export {
ToastNotificationType,
wrapRefWithTracking,
noop,
convertThrowIntoFetchResult,
getFirstGqlErrorMessage,
modifyObjectField,
iterateObjectField,
getCacheId,
checkIfIsInPlaceNavigation,
ROOT_QUERY,
ROOT_MUTATION,
ROOT_SUBSCRIPTION,
ViewerEventBusKeys
}