Remove re-exports from composables/Utils.ts and composables/index.ts.
Consumers now import directly from ui-common.
</template>
<script setup lang="ts">
-import type { UUIDv4 } from 'ui-common'
-
+import { randomUUID, type UUIDv4 } from 'ui-common'
import { ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import Button from '@/components/buttons/Button.vue'
import {
convertToBoolean,
- randomUUID,
resetToggleButtonState,
ROUTE_NAMES,
useExecuteAction,
import type { ChargingStationData, ConfigurationData } from 'ui-common'
import type { InjectionKey, Ref } from 'vue'
-import { randomUUID, validateUUID } from 'ui-common'
import { inject } from 'vue'
import { useToast } from 'vue-toast-notification'
deleteFromLocalStorage(key)
}
-export { randomUUID, validateUUID }
-
export const useUIClient = (): UIClient => {
const injected = inject(uiClientKey, undefined)
if (injected != null) return injected
getFromLocalStorage,
getLocalStorage,
getWebSocketStateName,
- randomUUID,
resetToggleButtonState,
setToLocalStorage,
templatesKey,
useExecuteAction,
useTemplates,
useUIClient,
- validateUUID,
} from './Utils'
</template>
<script setup lang="ts">
-import type {
- ChargingStationData,
- ResponsePayload,
- SimulatorState,
- UIServerConfigurationSection,
- UUIDv4,
+import {
+ type ChargingStationData,
+ randomUUID,
+ type ResponsePayload,
+ type SimulatorState,
+ type UIServerConfigurationSection,
+ type UUIDv4,
} from 'ui-common'
-
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
import { useToast } from 'vue-toast-notification'
import {
deleteLocalStorageByKeyPattern,
getFromLocalStorage,
- randomUUID,
ROUTE_NAMES,
setToLocalStorage,
TOGGLE_BUTTON_KEY_PREFIX,
* @description Unit tests for type conversion, localStorage, UUID, and toggle state utilities.
*/
import { flushPromises } from '@vue/test-utils'
+import { randomUUID, validateUUID } from 'ui-common'
import { afterEach, describe, expect, it, vi } from 'vitest'
import {
deleteFromLocalStorage,
getFromLocalStorage,
getLocalStorage,
- randomUUID,
resetToggleButtonState,
setToLocalStorage,
useExecuteAction,
- validateUUID,
} from '@/composables'
import { toastMock } from '../setup'