@agendize/vue-settings
Version:
Vue agendize's settings component
34 lines (33 loc) • 1.36 kB
TypeScript
import { ComputedRef, Ref } from "vue";
import { Locale } from "vue-i18n";
import { TabsOptions } from "@agendize/design-system";
import { RouteLocationNormalizedLoaded, Router } from "vue-router";
export interface ProfileViewModelType {
currentTab: Ref<string>;
defaultTab: ComputedRef<string>;
actionInProgress: Ref<boolean>;
profilePhoto: Ref<string | undefined>;
profilePhotoFile: Ref<File | undefined>;
firstName: Ref<string>;
lastName: Ref<string>;
email: Ref<string>;
updatePasswordModal: Ref<any>;
updatePasswordDialogShown: Ref<boolean>;
passwordErrorMessage: Ref<string | undefined>;
accounts: Ref<{
label: string;
value: string;
}[]>;
defaultAccount: Ref<string[]>;
language: Ref<string[]>;
timeZone: Ref<string[]>;
formValid: ComputedRef<boolean>;
saveProfile: () => void;
updatePassword: (currentPassword: string, newPassword: string) => void;
showUpdatePasswordDialog: (shown: boolean) => void;
updateProfilePhoto: (item: File | undefined) => void;
changeTab: (tab: TabsOptions) => void;
acceptTabChanged: (tab: TabsOptions) => Promise<boolean>;
back: () => void;
}
export declare function ProfileViewModel(locale: Locale, router?: Router, route?: RouteLocationNormalizedLoaded): ProfileViewModelType;