use typed imports

This commit is contained in:
Hayden 2024-03-01 11:21:45 -06:00
parent 5440fc60e1
commit 26b17e5cf8
No known key found for this signature in database
GPG key ID: 17CF79474E257545
54 changed files with 80 additions and 77 deletions

View file

@ -25,6 +25,7 @@ module.exports = {
"vue/no-setup-props-destructure": 0, "vue/no-setup-props-destructure": 0,
"vue/no-multiple-template-root": 0, "vue/no-multiple-template-root": 0,
"vue/no-v-model-argument": 0, "vue/no-v-model-argument": 0,
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/ban-ts-comment": 0, "@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-unused-vars": [ "@typescript-eslint/no-unused-vars": [
"error", "error",

View file

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import MdiPlus from "~icons/mdi/mdi-plus"; import MdiPlus from "~icons/mdi/plus";
const ctx = useAuthContext(); const ctx = useAuthContext();
const api = useUserApi(); const api = useUserApi();

View file

@ -22,7 +22,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ItemAttachment } from "~~/lib/api/types/data-contracts"; import type { ItemAttachment } from "~~/lib/api/types/data-contracts";
import MdiPaperclip from "~icons/mdi/paperclip"; import MdiPaperclip from "~icons/mdi/paperclip";
import MdiDownload from "~icons/mdi/download"; import MdiDownload from "~icons/mdi/download";
import MdiOpenInNew from "~icons/mdi/open-in-new"; import MdiOpenInNew from "~icons/mdi/open-in-new";

View file

@ -34,7 +34,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ItemOut, ItemSummary } from "~~/lib/api/types/data-contracts"; import type { ItemOut, ItemSummary } from "~~/lib/api/types/data-contracts";
import MdiShieldCheck from "~icons/mdi/shield-check"; import MdiShieldCheck from "~icons/mdi/shield-check";
const api = useUserApi(); const api = useUserApi();

View file

@ -35,7 +35,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ItemCreate, LabelOut, LocationOut } from "~~/lib/api/types/data-contracts"; import type { ItemCreate, LabelOut, LocationOut } from "~~/lib/api/types/data-contracts";
import { useLabelStore } from "~~/stores/labels"; import { useLabelStore } from "~~/stores/labels";
import { useLocationStore } from "~~/stores/locations"; import { useLocationStore } from "~~/stores/locations";
import MdiPackageVariant from "~icons/mdi/package-variant"; import MdiPackageVariant from "~icons/mdi/package-variant";

View file

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { ViewType } from "~~/composables/use-preferences"; import type { ViewType } from "~~/composables/use-preferences";
import { ItemSummary } from "~~/lib/api/types/data-contracts"; import type { ItemSummary } from "~~/lib/api/types/data-contracts";
import MdiDotsVertical from "~icons/mdi/dots-vertical"; import MdiDotsVertical from "~icons/mdi/dots-vertical";
import MdiCardTextOutline from "~icons/mdi/card-text-outline"; import MdiCardTextOutline from "~icons/mdi/card-text-outline";
import MdiTable from "~icons/mdi/table"; import MdiTable from "~icons/mdi/table";

View file

@ -1,4 +1,4 @@
import { ItemSummary } from "~~/lib/api/types/data-contracts"; import type { ItemSummary } from "~~/lib/api/types/data-contracts";
export type TableHeader = { export type TableHeader = {
text: string; text: string;

View file

@ -74,8 +74,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { TableData, TableHeader } from "./Table.types"; import type { TableData, TableHeader } from "./Table.types";
import { ItemSummary } from "~~/lib/api/types/data-contracts"; import type { ItemSummary } from "~~/lib/api/types/data-contracts";
import MdiArrowDown from "~icons/mdi/arrow-down"; import MdiArrowDown from "~icons/mdi/arrow-down";
import MdiArrowUp from "~icons/mdi/arrow-up"; import MdiArrowUp from "~icons/mdi/arrow-up";
import MdiCheck from "~icons/mdi/check"; import MdiCheck from "~icons/mdi/check";

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { LabelOut, LabelSummary } from "~~/lib/api/types/data-contracts"; import type { LabelOut, LabelSummary } from "~~/lib/api/types/data-contracts";
import MdiArrowRight from "~icons/mdi/arrow-right"; import MdiArrowRight from "~icons/mdi/arrow-right";
import MdiTagOutline from "~icons/mdi/tag-outline"; import MdiTagOutline from "~icons/mdi/tag-outline";

View file

@ -28,7 +28,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { LocationOut, LocationOutCount, LocationSummary } from "~~/lib/api/types/data-contracts"; import type { LocationOut, LocationOutCount, LocationSummary } from "~~/lib/api/types/data-contracts";
import MdiArrowRight from "~icons/mdi/arrow-right"; import MdiArrowRight from "~icons/mdi/arrow-right";
import MdiMapMarkerOutline from "~icons/mdi/map-marker-outline"; import MdiMapMarkerOutline from "~icons/mdi/map-marker-outline";

View file

@ -34,7 +34,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { LocationSummary } from "~~/lib/api/types/data-contracts"; import type { LocationSummary } from "~~/lib/api/types/data-contracts";
import MdiChevronDown from "~icons/mdi/chevron-down"; import MdiChevronDown from "~icons/mdi/chevron-down";
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {

View file

@ -20,8 +20,9 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { FlatTreeItem, useFlatLocations } from "~~/composables/use-location-helpers"; import type { FlatTreeItem } from "~~/composables/use-location-helpers";
import { LocationSummary } from "~~/lib/api/types/data-contracts"; import { useFlatLocations } from "~~/composables/use-location-helpers";
import type { LocationSummary } from "~~/lib/api/types/data-contracts";
import MdiCheck from "~icons/mdi/check"; import MdiCheck from "~icons/mdi/check";
type Props = { type Props = {

View file

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { useTreeState } from "./tree-state"; import { useTreeState } from "./tree-state";
import { TreeItem } from "~~/lib/api/types/data-contracts"; import type { TreeItem } from "~~/lib/api/types/data-contracts";
import MdiChevronDown from "~icons/mdi/chevron-down"; import MdiChevronDown from "~icons/mdi/chevron-down";
import MdiChevronRight from "~icons/mdi/chevron-right"; import MdiChevronRight from "~icons/mdi/chevron-right";
import MdiMapMarker from "~icons/mdi/map-marker"; import MdiMapMarker from "~icons/mdi/map-marker";

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { TreeItem } from "~~/lib/api/types/data-contracts"; import type { TreeItem } from "~~/lib/api/types/data-contracts";
type Props = { type Props = {
locs: TreeItem[]; locs: TreeItem[];

View file

@ -3,7 +3,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { DateTimeFormat, DateTimeType } from "~~/composables/use-formatters"; import type { DateTimeFormat, DateTimeType } from "~~/composables/use-formatters";
type Props = { type Props = {
date?: Date | string; date?: Date | string;

View file

@ -12,7 +12,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { StatsFormat } from "./types"; import type { StatsFormat } from "./types";
type Props = { type Props = {
title: string; title: string;

View file

@ -42,7 +42,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { TableData, TableHeader } from "./Table.types"; import type { TableData, TableHeader } from "./Table.types";
type Props = { type Props = {
headers: TableHeader[]; headers: TableHeader[];

View file

@ -1,7 +1,7 @@
import { CookieRef } from "nuxt/app"; import type { CookieRef } from "nuxt/app";
import { PublicApi } from "~~/lib/api/public"; import type { PublicApi } from "~~/lib/api/public";
import { UserOut } from "~~/lib/api/types/data-contracts"; import type { UserOut } from "~~/lib/api/types/data-contracts";
import { UserClient } from "~~/lib/api/user"; import type { UserClient } from "~~/lib/api/user";
export interface IAuthContext { export interface IAuthContext {
get token(): boolean | null; get token(): boolean | null;

View file

@ -1,5 +1,5 @@
import { UseConfirmDialogRevealResult, UseConfirmDialogReturn } from "@vueuse/core"; import type { UseConfirmDialogRevealResult, UseConfirmDialogReturn } from "@vueuse/core";
import { Ref } from "vue"; import type { Ref } from "vue";
type Store = UseConfirmDialogReturn<any, boolean, boolean> & { type Store = UseConfirmDialogReturn<any, boolean, boolean> & {
text: Ref<string>; text: Ref<string>;

View file

@ -1,5 +1,5 @@
import { ItemSummary, LabelSummary, LocationSummary } from "~~/lib/api/types/data-contracts"; import type { ItemSummary, LabelSummary, LocationSummary } from "~~/lib/api/types/data-contracts";
import { UserClient } from "~~/lib/api/user"; import type { UserClient } from "~~/lib/api/user";
type SearchOptions = { type SearchOptions = {
immediate?: boolean; immediate?: boolean;

View file

@ -1,5 +1,5 @@
import { Ref } from "vue"; import type { Ref } from "vue";
import { TreeItem } from "~~/lib/api/types/data-contracts"; import type { TreeItem } from "~~/lib/api/types/data-contracts";
export interface FlatTreeItem { export interface FlatTreeItem {
id: string; id: string;

View file

@ -1,4 +1,4 @@
import { WritableComputedRef } from "vue"; import type { WritableComputedRef } from "vue";
export function useMinLoader(ms = 500): WritableComputedRef<boolean> { export function useMinLoader(ms = 500): WritableComputedRef<boolean> {
const loading = ref(false); const loading = ref(false);

View file

@ -1,5 +1,5 @@
import { Ref } from "vue"; import type { Ref } from "vue";
import { DaisyTheme } from "~~/lib/data/themes"; import type { DaisyTheme } from "~~/lib/data/themes";
export type ViewType = "table" | "card" | "tree"; export type ViewType = "table" | "card" | "tree";

View file

@ -1,7 +1,7 @@
import { useRouteQuery as useRouteQueryBase } from "@vueuse/router"; import { useRouteQuery as useRouteQueryBase } from "@vueuse/router";
/* eslint no-redeclare: 0 */ /* eslint no-redeclare: 0 */
import { WritableComputedRef } from "vue"; import type { WritableComputedRef } from "vue";
export function useRouteQuery(q: string, def: string[]): WritableComputedRef<string[]>; export function useRouteQuery(q: string, def: string[]): WritableComputedRef<string[]>;
export function useRouteQuery(q: string, def: string): WritableComputedRef<string>; export function useRouteQuery(q: string, def: string): WritableComputedRef<string>;

View file

@ -1,5 +1,5 @@
import { ComputedRef } from "vue"; import type { ComputedRef } from "vue";
import { DaisyTheme } from "~~/lib/data/themes"; import type { DaisyTheme } from "~~/lib/data/themes";
export interface UseTheme { export interface UseTheme {
theme: ComputedRef<DaisyTheme>; theme: ComputedRef<DaisyTheme>;

View file

@ -2,7 +2,7 @@ import { faker } from "@faker-js/faker";
import { expect } from "vitest"; import { expect } from "vitest";
import { overrideParts } from "../../base/urls"; import { overrideParts } from "../../base/urls";
import { PublicApi } from "../../public"; import { PublicApi } from "../../public";
import { ItemField, LabelCreate, LocationCreate, UserRegistration } from "../../types/data-contracts"; import type { ItemField, LabelCreate, LocationCreate, UserRegistration } from "../../types/data-contracts";
import * as config from "../../../../test/config"; import * as config from "../../../../test/config";
import { UserClient } from "../../user"; import { UserClient } from "../../user";
import { Requests } from "../../../requests"; import { Requests } from "../../../requests";

View file

@ -1,6 +1,6 @@
import { beforeAll, expect } from "vitest"; import { beforeAll, expect } from "vitest";
import { faker } from "@faker-js/faker"; import { faker } from "@faker-js/faker";
import { UserClient } from "../user"; import type { UserClient } from "../user";
import { factories } from "./factories"; import { factories } from "./factories";
const cache = { const cache = {

View file

@ -1,8 +1,8 @@
import { faker } from "@faker-js/faker"; import { faker } from "@faker-js/faker";
import { describe, test, expect } from "vitest"; import { describe, test, expect } from "vitest";
import { ItemField, ItemUpdate, LocationOut } from "../../types/data-contracts"; import type { ItemField, ItemUpdate, LocationOut } from "../../types/data-contracts";
import { AttachmentTypes } from "../../types/non-generated"; import { AttachmentTypes } from "../../types/non-generated";
import { UserClient } from "../../user"; import type { UserClient } from "../../user";
import { factories } from "../factories"; import { factories } from "../factories";
import { sharedUserClient } from "../test-utils"; import { sharedUserClient } from "../test-utils";

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "vitest"; import { describe, expect, test } from "vitest";
import { LabelOut } from "../../types/data-contracts"; import type { LabelOut } from "../../types/data-contracts";
import { UserClient } from "../../user"; import type { UserClient } from "../../user";
import { factories } from "../factories"; import { factories } from "../factories";
import { sharedUserClient } from "../test-utils"; import { sharedUserClient } from "../test-utils";

View file

@ -1,6 +1,6 @@
import { describe, expect, test } from "vitest"; import { describe, expect, test } from "vitest";
import { LocationOut } from "../../types/data-contracts"; import type { LocationOut } from "../../types/data-contracts";
import { UserClient } from "../../user"; import type { UserClient } from "../../user";
import { factories } from "../factories"; import { factories } from "../factories";
import { sharedUserClient } from "../test-utils"; import { sharedUserClient } from "../test-utils";

View file

@ -1,6 +1,6 @@
import { faker } from "@faker-js/faker"; import { faker } from "@faker-js/faker";
import { beforeAll, describe, expect, test } from "vitest"; import { beforeAll, describe, expect, test } from "vitest";
import { UserClient } from "../../user"; import type { UserClient } from "../../user";
import { factories } from "../factories"; import { factories } from "../factories";
type ImportObj = { type ImportObj = {

View file

@ -1,4 +1,4 @@
import { Requests } from "../../requests"; import type { Requests } from "../../requests";
import { route } from "."; import { route } from ".";
const ZERO_DATE = "0001-01-01T00:00:00Z"; const ZERO_DATE = "0001-01-01T00:00:00Z";

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { ActionAmountResult } from "../types/data-contracts"; import type { ActionAmountResult } from "../types/data-contracts";
export class ActionsAPI extends BaseAPI { export class ActionsAPI extends BaseAPI {
ensureAssetIDs() { ensureAssetIDs() {

View file

@ -1,6 +1,6 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { ItemSummary } from "../types/data-contracts"; import type { ItemSummary } from "../types/data-contracts";
import { PaginationResult } from "../types/non-generated"; import type { PaginationResult } from "../types/non-generated";
export class AssetsApi extends BaseAPI { export class AssetsApi extends BaseAPI {
async get(id: string, page = 1, pageSize = 50) { async get(id: string, page = 1, pageSize = 50) {

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { import type {
CurrenciesCurrency, CurrenciesCurrency,
Group, Group,
GroupInvitation, GroupInvitation,

View file

@ -1,6 +1,6 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { parseDate } from "../base/base-api"; import { parseDate } from "../base/base-api";
import { import type {
ItemAttachmentUpdate, ItemAttachmentUpdate,
ItemCreate, ItemCreate,
ItemOut, ItemOut,
@ -13,8 +13,8 @@ import {
MaintenanceEntryUpdate, MaintenanceEntryUpdate,
MaintenanceLog, MaintenanceLog,
} from "../types/data-contracts"; } from "../types/data-contracts";
import { AttachmentTypes, PaginationResult } from "../types/non-generated"; import type { AttachmentTypes, PaginationResult } from "../types/non-generated";
import { Requests } from "~~/lib/requests"; import type { Requests } from "~~/lib/requests";
export type ItemsQuery = { export type ItemsQuery = {
orderBy?: string; orderBy?: string;

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { LabelCreate, LabelOut } from "../types/data-contracts"; import type { LabelCreate, LabelOut } from "../types/data-contracts";
export class LabelsApi extends BaseAPI { export class LabelsApi extends BaseAPI {
getAll() { getAll() {

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { LocationOutCount, LocationCreate, LocationOut, LocationUpdate, TreeItem } from "../types/data-contracts"; import type { LocationOutCount, LocationCreate, LocationOut, LocationUpdate, TreeItem } from "../types/data-contracts";
export type LocationsQuery = { export type LocationsQuery = {
filterChildren: boolean; filterChildren: boolean;

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { NotifierCreate, NotifierOut, NotifierUpdate } from "../types/data-contracts"; import type { NotifierCreate, NotifierOut, NotifierUpdate } from "../types/data-contracts";
export class NotifiersAPI extends BaseAPI { export class NotifiersAPI extends BaseAPI {
getAll() { getAll() {

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { GroupStatistics, TotalsByOrganizer, ValueOverTime } from "../types/data-contracts"; import type { GroupStatistics, TotalsByOrganizer, ValueOverTime } from "../types/data-contracts";
function YYYY_MM_DD(date?: Date): string { function YYYY_MM_DD(date?: Date): string {
if (!date) { if (!date) {

View file

@ -1,6 +1,6 @@
import { BaseAPI, route } from "../base"; import { BaseAPI, route } from "../base";
import { ChangePassword, UserOut } from "../types/data-contracts"; import type { ChangePassword, UserOut } from "../types/data-contracts";
import { Result } from "../types/non-generated"; import type { Result } from "../types/non-generated";
export class UserApi extends BaseAPI { export class UserApi extends BaseAPI {
public self() { public self() {

View file

@ -1,5 +1,5 @@
import { BaseAPI, route } from "./base"; import { BaseAPI, route } from "./base";
import { APISummary, LoginForm, TokenResponse, UserRegistration } from "./types/data-contracts"; import type { APISummary, LoginForm, TokenResponse, UserRegistration } from "./types/data-contracts";
export type StatusResult = { export type StatusResult = {
health: boolean; health: boolean;

View file

@ -9,7 +9,7 @@ import { StatsAPI } from "./classes/stats";
import { AssetsApi } from "./classes/assets"; import { AssetsApi } from "./classes/assets";
import { ReportsAPI } from "./classes/reports"; import { ReportsAPI } from "./classes/reports";
import { NotifiersAPI } from "./classes/notifiers"; import { NotifiersAPI } from "./classes/notifiers";
import { Requests } from "~~/lib/requests"; import type { Requests } from "~~/lib/requests";
export class UserClient extends BaseAPI { export class UserClient extends BaseAPI {
locations: LocationsApi; locations: LocationsApi;

View file

@ -1,6 +1,6 @@
// https://gist.github.com/ucw/67f7291c64777fb24341e8eae72bcd24 // https://gist.github.com/ucw/67f7291c64777fb24341e8eae72bcd24
import { IncomingMessage } from "http"; import type { IncomingMessage } from "http";
import internal from "stream"; import type internal from "stream";
import { defineNuxtModule, logger } from "@nuxt/kit"; import { defineNuxtModule, logger } from "@nuxt/kit";
// Related To // Related To
// - https://github.com/nuxt/nuxt/issues/15417 // - https://github.com/nuxt/nuxt/issues/15417
@ -8,7 +8,7 @@ import { defineNuxtModule, logger } from "@nuxt/kit";
// //
// fix from // fix from
// - https://gist.github.com/ucw/67f7291c64777fb24341e8eae72bcd24 // - https://gist.github.com/ucw/67f7291c64777fb24341e8eae72bcd24
import { createProxyServer } from "http-proxy"; // eslint-disable-line import/named import { createProxyServer } from "http-proxy";
export default defineNuxtModule({ export default defineNuxtModule({
defaults: { defaults: {

View file

@ -1,4 +1,4 @@
import { UserClient } from "~~/lib/api/user"; import type { UserClient } from "~~/lib/api/user";
type StatCard = { type StatCard = {
label: string; label: string;

View file

@ -1,4 +1,4 @@
import { UserClient } from "~~/lib/api/user"; import type { UserClient } from "~~/lib/api/user";
export function itemsTable(api: UserClient) { export function itemsTable(api: UserClient) {
const { data: items, refresh } = useAsyncData(async () => { const { data: items, refresh } = useAsyncData(async () => {

View file

@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { AnyDetail, Detail, Details, filterZeroValues } from "~~/components/global/DetailsSection/types"; import type { AnyDetail, Detail, Details } from "~~/components/global/DetailsSection/types";
import { ItemAttachment } from "~~/lib/api/types/data-contracts"; import { filterZeroValues } from "~~/components/global/DetailsSection/types";
import type { ItemAttachment } from "~~/lib/api/types/data-contracts";
import MdiClose from "~icons/mdi/close"; import MdiClose from "~icons/mdi/close";
import MdiPackageVariant from "~icons/mdi/package-variant"; import MdiPackageVariant from "~icons/mdi/package-variant";
import MdiPlus from "~icons/mdi/plus"; import MdiPlus from "~icons/mdi/plus";

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ItemAttachment, ItemField, ItemOut, ItemUpdate } from "~~/lib/api/types/data-contracts"; import type { ItemAttachment, ItemField, ItemOut, ItemUpdate } from "~~/lib/api/types/data-contracts";
import { AttachmentTypes } from "~~/lib/api/types/non-generated"; import { AttachmentTypes } from "~~/lib/api/types/non-generated";
import { useLabelStore } from "~~/stores/labels"; import { useLabelStore } from "~~/stores/labels";
import { useLocationStore } from "~~/stores/locations"; import { useLocationStore } from "~~/stores/locations";

View file

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import DatePicker from "~~/components/Form/DatePicker.vue"; import DatePicker from "~~/components/Form/DatePicker.vue";
import { StatsFormat } from "~~/components/global/StatCard/types"; import type { StatsFormat } from "~~/components/global/StatCard/types";
import { ItemOut, MaintenanceEntry } from "~~/lib/api/types/data-contracts"; import type { ItemOut, MaintenanceEntry } from "~~/lib/api/types/data-contracts";
import MdiPost from "~icons/mdi/post"; import MdiPost from "~icons/mdi/post";
import MdiPlus from "~icons/mdi/plus"; import MdiPlus from "~icons/mdi/plus";
import MdiCheck from "~icons/mdi/check"; import MdiCheck from "~icons/mdi/check";

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { ItemSummary, LabelSummary, LocationOutCount } from "~~/lib/api/types/data-contracts"; import type { ItemSummary, LabelSummary, LocationOutCount } from "~~/lib/api/types/data-contracts";
import { useLabelStore } from "~~/stores/labels"; import { useLabelStore } from "~~/stores/labels";
import { useLocationStore } from "~~/stores/locations"; import { useLocationStore } from "~~/stores/locations";
import MdiLoading from "~icons/mdi/loading"; import MdiLoading from "~icons/mdi/loading";

View file

@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { LocationSummary, LocationUpdate } from "~~/lib/api/types/data-contracts"; import type { LocationSummary, LocationUpdate } from "~~/lib/api/types/data-contracts";
import { useLocationStore } from "~~/stores/locations"; import { useLocationStore } from "~~/stores/locations";
import MdiPackageVariant from "~icons/mdi/package-variant"; import MdiPackageVariant from "~icons/mdi/package-variant";
import MdiPencil from "~icons/mdi/pencil"; import MdiPencil from "~icons/mdi/pencil";

View file

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { Detail } from "~~/components/global/DetailsSection/types"; import type { Detail } from "~~/components/global/DetailsSection/types";
import { themes } from "~~/lib/data/themes"; import { themes } from "~~/lib/data/themes";
import { CurrenciesCurrency, NotifierCreate, NotifierOut } from "~~/lib/api/types/data-contracts"; import type { CurrenciesCurrency, NotifierCreate, NotifierOut } from "~~/lib/api/types/data-contracts";
import MdiAccount from "~icons/mdi/account"; import MdiAccount from "~icons/mdi/account";
import MdiMegaphone from "~icons/mdi/megaphone"; import MdiMegaphone from "~icons/mdi/megaphone";
import MdiDelete from "~icons/mdi/delete"; import MdiDelete from "~icons/mdi/delete";

View file

@ -1,5 +1,5 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { LabelOut } from "~~/lib/api/types/data-contracts"; import type { LabelOut } from "~~/lib/api/types/data-contracts";
export const useLabelStore = defineStore("labels", { export const useLabelStore = defineStore("labels", {
state: () => ({ state: () => ({

View file

@ -1,6 +1,6 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { LocationsApi } from "~~/lib/api/classes/locations"; import type { LocationsApi } from "~~/lib/api/classes/locations";
import { LocationOutCount, TreeItem } from "~~/lib/api/types/data-contracts"; import type { LocationOutCount, TreeItem } from "~~/lib/api/types/data-contracts";
export const useLocationStore = defineStore("locations", { export const useLocationStore = defineStore("locations", {
state: () => ({ state: () => ({