una-nuxt-module 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +84 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.mts +6 -0
  4. package/dist/module.d.ts +6 -0
  5. package/dist/module.json +9 -0
  6. package/dist/module.mjs +105 -0
  7. package/dist/runtime/assets/scss/styles.css +1249 -0
  8. package/dist/runtime/classes/FetchClient.d.ts +61 -0
  9. package/dist/runtime/classes/FetchClient.js +71 -0
  10. package/dist/runtime/components/layout/footer/Footer.vue +16 -0
  11. package/dist/runtime/components/layout/header/BtnExtendMenu.vue +29 -0
  12. package/dist/runtime/components/layout/header/Header.vue +7 -0
  13. package/dist/runtime/components/layout/header/HeaderMenu.vue +41 -0
  14. package/dist/runtime/components/layout/header/HeaderMenuTabs.vue +102 -0
  15. package/dist/runtime/components/layout/sidebar/NavCollapse.vue +38 -0
  16. package/dist/runtime/components/layout/sidebar/NavGroup.vue +9 -0
  17. package/dist/runtime/components/layout/sidebar/NavItem.vue +25 -0
  18. package/dist/runtime/components/layout/sidebar/SideBar.vue +74 -0
  19. package/dist/runtime/components/layout/sidebar/SideBarFooter.vue +69 -0
  20. package/dist/runtime/components/layout/sidebar/TopSideBarLogo.vue +25 -0
  21. package/dist/runtime/components/shared/authorization/AuthorizedRenderer.vue +41 -0
  22. package/dist/runtime/components/shared/buttons/BtnBack.vue +19 -0
  23. package/dist/runtime/components/shared/buttons/BtnCancel.vue +13 -0
  24. package/dist/runtime/components/shared/buttons/BtnConfirm.vue +14 -0
  25. package/dist/runtime/components/shared/containers/JsonViewer.vue +13 -0
  26. package/dist/runtime/components/shared/dates/DatePicker.vue +91 -0
  27. package/dist/runtime/components/shared/dialogs/DialogConfirmDelete.vue +32 -0
  28. package/dist/runtime/components/shared/dialogs/DialogExportTable.vue +42 -0
  29. package/dist/runtime/components/shared/feedback/LoadingSession.vue +17 -0
  30. package/dist/runtime/components/shared/feedback/SnackBar.vue +36 -0
  31. package/dist/runtime/components/shared/forms/FormBuilder/FieldBuilder.vue +251 -0
  32. package/dist/runtime/components/shared/forms/FormBuilder/FieldSlotMissed.vue +20 -0
  33. package/dist/runtime/components/shared/forms/FormBuilder/FormBuilder.vue +213 -0
  34. package/dist/runtime/components/shared/forms/FormBuilder/SteppersBuilder.vue +32 -0
  35. package/dist/runtime/components/shared/forms/FormBuilder/TabsBuilder.vue +30 -0
  36. package/dist/runtime/components/shared/forms/FormDialogWrapper.vue +48 -0
  37. package/dist/runtime/components/shared/forms/FormPageWrapper.vue +19 -0
  38. package/dist/runtime/components/shared/forms/FormSubmitSection.vue +48 -0
  39. package/dist/runtime/components/shared/navigation/BreadCrumbs.vue +21 -0
  40. package/dist/runtime/components/shared/tables/CustomTable.vue +261 -0
  41. package/dist/runtime/components/shared/tables/CustomTableHeader.vue +25 -0
  42. package/dist/runtime/components/shared/tables/NoDataMessage.vue +12 -0
  43. package/dist/runtime/components/shared/tables/TableSearchBar.vue +22 -0
  44. package/dist/runtime/components/shared/tables/buttons/BtnAdd.vue +25 -0
  45. package/dist/runtime/components/shared/tables/buttons/BtnDelete.vue +32 -0
  46. package/dist/runtime/components/shared/tables/buttons/BtnEdit.vue +30 -0
  47. package/dist/runtime/components/shared/tables/buttons/BtnExport.vue +17 -0
  48. package/dist/runtime/components/shared/tables/buttons/BtnFilter.vue +21 -0
  49. package/dist/runtime/components/shared/tables/pagination/ItemsPerPageCombo.vue +24 -0
  50. package/dist/runtime/components/shared/tables/pagination/ItemsPerPageLabel.vue +5 -0
  51. package/dist/runtime/components/shared/tables/pagination/PageSelector.vue +16 -0
  52. package/dist/runtime/components/shared/tables/pagination/PaginationInfo.vue +31 -0
  53. package/dist/runtime/composables/useAuthorization.d.ts +32 -0
  54. package/dist/runtime/composables/useAuthorization.js +95 -0
  55. package/dist/runtime/constants/form.d.ts +44 -0
  56. package/dist/runtime/constants/form.js +58 -0
  57. package/dist/runtime/constants/index.d.ts +4 -0
  58. package/dist/runtime/constants/index.js +4 -0
  59. package/dist/runtime/constants/pagination.d.ts +13 -0
  60. package/dist/runtime/constants/pagination.js +8 -0
  61. package/dist/runtime/constants/request.d.ts +5 -0
  62. package/dist/runtime/constants/request.js +6 -0
  63. package/dist/runtime/constants/tables.d.ts +4 -0
  64. package/dist/runtime/constants/tables.js +15 -0
  65. package/dist/runtime/enums/EAsyncDataRequestStatus.d.ts +9 -0
  66. package/dist/runtime/enums/EAsyncDataRequestStatus.js +7 -0
  67. package/dist/runtime/enums/EAuthorization.d.ts +8 -0
  68. package/dist/runtime/enums/EAuthorization.js +6 -0
  69. package/dist/runtime/enums/EFormField.d.ts +14 -0
  70. package/dist/runtime/enums/EFormField.js +12 -0
  71. package/dist/runtime/enums/EFormMode.d.ts +7 -0
  72. package/dist/runtime/enums/EFormMode.js +5 -0
  73. package/dist/runtime/enums/ERequestMethod.d.ts +9 -0
  74. package/dist/runtime/enums/ERequestMethod.js +7 -0
  75. package/dist/runtime/enums/ETheme.d.ts +7 -0
  76. package/dist/runtime/enums/ETheme.js +5 -0
  77. package/dist/runtime/enums/EVuetifyDateFormats.d.ts +32 -0
  78. package/dist/runtime/enums/EVuetifyDateFormats.js +30 -0
  79. package/dist/runtime/enums/index.d.ts +6 -0
  80. package/dist/runtime/enums/index.js +6 -0
  81. package/dist/runtime/i18n/config.d.ts +61 -0
  82. package/dist/runtime/i18n/config.js +10 -0
  83. package/dist/runtime/i18n/locales/es.json +55 -0
  84. package/dist/runtime/i18n/service.d.ts +72 -0
  85. package/dist/runtime/i18n/service.js +3 -0
  86. package/dist/runtime/i18n/vueI18n.d.ts +5 -0
  87. package/dist/runtime/i18n/vueI18n.js +3 -0
  88. package/dist/runtime/index.d.ts +9 -0
  89. package/dist/runtime/layouts/default.vue +31 -0
  90. package/dist/runtime/layouts/empty.vue +12 -0
  91. package/dist/runtime/middleware/authentication.d.ts +10 -0
  92. package/dist/runtime/middleware/authentication.js +30 -0
  93. package/dist/runtime/middleware/authorization.d.ts +7 -0
  94. package/dist/runtime/middleware/authorization.js +39 -0
  95. package/dist/runtime/pages/401.vue +34 -0
  96. package/dist/runtime/pages/403.vue +35 -0
  97. package/dist/runtime/pages/ssoCallback.vue +14 -0
  98. package/dist/runtime/plugins/auth.d.ts +12 -0
  99. package/dist/runtime/plugins/auth.js +83 -0
  100. package/dist/runtime/plugins/vue-json.d.ts +12 -0
  101. package/dist/runtime/plugins/vue-json.js +5 -0
  102. package/dist/runtime/public/images/logos/UNA_LogoMark_Black.png +0 -0
  103. package/dist/runtime/public/images/logos/UNA_LogoType_LogoMark_Red.png +0 -0
  104. package/dist/runtime/server/tsconfig.json +3 -0
  105. package/dist/runtime/stores/UiCustomizer.d.ts +22 -0
  106. package/dist/runtime/stores/UiCustomizer.js +34 -0
  107. package/dist/runtime/stores/appStatus.d.ts +63 -0
  108. package/dist/runtime/stores/appStatus.js +101 -0
  109. package/dist/runtime/stores/auth.d.ts +76 -0
  110. package/dist/runtime/stores/auth.js +66 -0
  111. package/dist/runtime/stores/formModeTracker.d.ts +14 -0
  112. package/dist/runtime/stores/formModeTracker.js +10 -0
  113. package/dist/runtime/types/index.d.ts +584 -0
  114. package/dist/runtime/types/index.js +1 -0
  115. package/dist/runtime/utils/buildSortQueryParams.d.ts +10 -0
  116. package/dist/runtime/utils/buildSortQueryParams.js +3 -0
  117. package/dist/runtime/utils/getCurrentPath.d.ts +7 -0
  118. package/dist/runtime/utils/getCurrentPath.js +4 -0
  119. package/dist/runtime/utils/getDateTimeInISO8601.d.ts +11 -0
  120. package/dist/runtime/utils/getDateTimeInISO8601.js +3 -0
  121. package/dist/runtime/utils/getFromLocalStorage.d.ts +9 -0
  122. package/dist/runtime/utils/getFromLocalStorage.js +6 -0
  123. package/dist/runtime/utils/isNumberInRange.d.ts +11 -0
  124. package/dist/runtime/utils/isNumberInRange.js +5 -0
  125. package/dist/runtime/utils/onlyNumbers.d.ts +9 -0
  126. package/dist/runtime/utils/onlyNumbers.js +3 -0
  127. package/dist/runtime/utils/stringToBoolean.d.ts +9 -0
  128. package/dist/runtime/utils/stringToBoolean.js +3 -0
  129. package/dist/types.d.mts +7 -0
  130. package/dist/types.d.ts +7 -0
  131. package/package.json +69 -0
@@ -0,0 +1,22 @@
1
+ import type { IUiCustomizerState } from "../types/index.js";
2
+ /**
3
+ * Store encargado de almacenar y gestionar las preferencias visuales del usuario.
4
+ */
5
+ export declare const useUiCustomizerStore: import("pinia").StoreDefinition<"UiCustomizerStore", IUiCustomizerState, {}, {
6
+ /**
7
+ * Alterna el estado de renderizar el menú.
8
+ */
9
+ SET_DRAW_SIDEBAR(): void;
10
+ /**
11
+ * Cambia el estado de minimización del menú.
12
+ *
13
+ * @param [boolean] newValue - Nuevo valor
14
+ */
15
+ SET_IS_SIDEBAR_MINI(newValue: boolean): void;
16
+ /**
17
+ * Cambia el tema de la aplicación.
18
+ *
19
+ * @param [string] newValue - Nuevo tema
20
+ */
21
+ SET_THEME(newValue: string): void;
22
+ }>;
@@ -0,0 +1,34 @@
1
+ import { defineStore } from "pinia";
2
+ import { ETheme } from "../enums/index.js";
3
+ export const useUiCustomizerStore = defineStore({
4
+ id: "UiCustomizerStore",
5
+ state: () => ({
6
+ drawSidebar: true,
7
+ isSidebarMini: false,
8
+ currentTheme: ETheme.LIGHT
9
+ }),
10
+ actions: {
11
+ /**
12
+ * Alterna el estado de renderizar el menú.
13
+ */
14
+ SET_DRAW_SIDEBAR() {
15
+ this.drawSidebar = !this.drawSidebar;
16
+ },
17
+ /**
18
+ * Cambia el estado de minimización del menú.
19
+ *
20
+ * @param [boolean] newValue - Nuevo valor
21
+ */
22
+ SET_IS_SIDEBAR_MINI(newValue) {
23
+ this.isSidebarMini = newValue;
24
+ },
25
+ /**
26
+ * Cambia el tema de la aplicación.
27
+ *
28
+ * @param [string] newValue - Nuevo tema
29
+ */
30
+ SET_THEME(newValue) {
31
+ this.currentTheme = newValue;
32
+ }
33
+ }
34
+ });
@@ -0,0 +1,63 @@
1
+ import type { IAppStatusState, IRequestInfo, IRequestResponse } from "../types/index.js";
2
+ /**
3
+ * Store encargado de almacenar y gestionar la lógica de la aplicación.
4
+ */
5
+ export declare const useAppStatusStore: import("pinia").StoreDefinition<"appStatusStore", IAppStatusState, {}, {
6
+ /**
7
+ * Cambia si la aplicación esta haciendo una petición.
8
+ *
9
+ * @param [boolean] newValue - Nuevo valor
10
+ */
11
+ SET_MAKING_REQUEST(newState: boolean): void;
12
+ /**
13
+ * Cambia si la aplicación contiene un error.
14
+ *
15
+ * @param [boolean] newValue - Nuevo valor
16
+ */
17
+ SET_HAS_ERROR(newState: boolean): void;
18
+ /**
19
+ * Cambia si la aplicación debe mostrar el snack bar.
20
+ *
21
+ * @param [boolean] newValue - Nuevo valor
22
+ */
23
+ SET_SHOW_INFO(newState: boolean): void;
24
+ /**
25
+ * Cambia la información a mostrar en el snack bar.
26
+ *
27
+ * @param [boolean] newValue - Nuevo valor
28
+ */
29
+ SET_INFO(newState: IRequestInfo): void;
30
+ /**
31
+ * Cambia si la aplicación debe abrir la pantalla de confirmar eliminar.
32
+ *
33
+ * @param [boolean] newValue - Nuevo valor
34
+ */
35
+ SET_OPEN_DIALOG_DELETE(newState: boolean): void;
36
+ /**
37
+ * Cambia si la aplicación debe abrir la pantalla de exportar tabla.
38
+ *
39
+ * @param [boolean] newValue - Nuevo valor
40
+ */
41
+ SET_OPEN_DIALOG_EXPORT(newState: boolean): void;
42
+ /**
43
+ * Método que prepara la aplicación previo a realizar una petición.
44
+ *
45
+ * @param [boolean] makingRequest - *true*
46
+ * @param [boolean] hasError - *false*
47
+ * @param [boolean] showInfo - *false*
48
+ * @param [boolean] info - *null*
49
+ */
50
+ SET_STATE_BEFORE_REQUEST(makingRequest?: boolean, hasError?: boolean, showInfo?: boolean, info?: null): void;
51
+ /**
52
+ * Método que prepara la aplicación previo a realizar una petición pero mantiene la información de la petición previa.
53
+ */
54
+ SET_STATE_BEFORE_REQUEST_AND_KEEP_SHOWINFO(): void;
55
+ /**
56
+ * Método que actualiza la aplicación posterior a realizar una petición.
57
+ *
58
+ * @param [IRequestResponse] response - Respuesta de la petición
59
+ * @param [boolean] showInfo - *true*
60
+ * @param [boolean] makingRequest - *false*
61
+ */
62
+ SET_STATE_AFTER_REQUEST(response: IRequestResponse, showInfo?: boolean, makingRequest?: boolean): void;
63
+ }>;
@@ -0,0 +1,101 @@
1
+ import { defineStore } from "pinia";
2
+ export const useAppStatusStore = defineStore({
3
+ id: "appStatusStore",
4
+ state: () => {
5
+ return {
6
+ makingRequest: false,
7
+ hasError: false,
8
+ showInfo: false,
9
+ info: null,
10
+ openDialogDelete: false,
11
+ openDialogExport: false
12
+ };
13
+ },
14
+ actions: {
15
+ /**
16
+ * Cambia si la aplicación esta haciendo una petición.
17
+ *
18
+ * @param [boolean] newValue - Nuevo valor
19
+ */
20
+ SET_MAKING_REQUEST(newState) {
21
+ this.makingRequest = newState;
22
+ },
23
+ /**
24
+ * Cambia si la aplicación contiene un error.
25
+ *
26
+ * @param [boolean] newValue - Nuevo valor
27
+ */
28
+ SET_HAS_ERROR(newState) {
29
+ this.hasError = newState;
30
+ },
31
+ /**
32
+ * Cambia si la aplicación debe mostrar el snack bar.
33
+ *
34
+ * @param [boolean] newValue - Nuevo valor
35
+ */
36
+ SET_SHOW_INFO(newState) {
37
+ this.showInfo = newState;
38
+ },
39
+ /**
40
+ * Cambia la información a mostrar en el snack bar.
41
+ *
42
+ * @param [boolean] newValue - Nuevo valor
43
+ */
44
+ SET_INFO(newState) {
45
+ this.info = newState;
46
+ },
47
+ /**
48
+ * Cambia si la aplicación debe abrir la pantalla de confirmar eliminar.
49
+ *
50
+ * @param [boolean] newValue - Nuevo valor
51
+ */
52
+ SET_OPEN_DIALOG_DELETE(newState) {
53
+ this.openDialogDelete = newState;
54
+ },
55
+ /**
56
+ * Cambia si la aplicación debe abrir la pantalla de exportar tabla.
57
+ *
58
+ * @param [boolean] newValue - Nuevo valor
59
+ */
60
+ SET_OPEN_DIALOG_EXPORT(newState) {
61
+ this.openDialogExport = newState;
62
+ },
63
+ /**
64
+ * Método que prepara la aplicación previo a realizar una petición.
65
+ *
66
+ * @param [boolean] makingRequest - *true*
67
+ * @param [boolean] hasError - *false*
68
+ * @param [boolean] showInfo - *false*
69
+ * @param [boolean] info - *null*
70
+ */
71
+ SET_STATE_BEFORE_REQUEST(makingRequest = true, hasError = false, showInfo = false, info = null) {
72
+ this.makingRequest = makingRequest;
73
+ this.hasError = hasError;
74
+ this.showInfo = showInfo;
75
+ this.info = info;
76
+ },
77
+ /**
78
+ * Método que prepara la aplicación previo a realizar una petición pero mantiene la información de la petición previa.
79
+ */
80
+ SET_STATE_BEFORE_REQUEST_AND_KEEP_SHOWINFO() {
81
+ if (this.showInfo) {
82
+ this.SET_MAKING_REQUEST(true);
83
+ } else {
84
+ this.SET_STATE_BEFORE_REQUEST();
85
+ }
86
+ },
87
+ /**
88
+ * Método que actualiza la aplicación posterior a realizar una petición.
89
+ *
90
+ * @param [IRequestResponse] response - Respuesta de la petición
91
+ * @param [boolean] showInfo - *true*
92
+ * @param [boolean] makingRequest - *false*
93
+ */
94
+ SET_STATE_AFTER_REQUEST(response, showInfo = true, makingRequest = false) {
95
+ this.hasError = !response.success;
96
+ this.info = { title: response.title, description: response.description };
97
+ this.showInfo = showInfo;
98
+ this.makingRequest = makingRequest;
99
+ }
100
+ }
101
+ });
@@ -0,0 +1,76 @@
1
+ import type { IAuthData, IAuthenticatedUser, IAuthState, IHasAuthorizationInResourceParams } from "../types/index.js";
2
+ /**
3
+ * Store encargado de almacenar y gestionar la autenticación y autorización del usuario.
4
+ */
5
+ export declare const useAuthStore: import("pinia").StoreDefinition<"AuthStore", IAuthState, {
6
+ isAuthenticated: (state: {
7
+ user: {
8
+ email: string;
9
+ fullName: string;
10
+ name?: string | undefined;
11
+ lastName?: string | undefined;
12
+ photoUrl?: string | undefined;
13
+ mainRole?: string | undefined;
14
+ } | null;
15
+ authData: {
16
+ isAuthenticated: boolean;
17
+ accessToken: string;
18
+ resources: {
19
+ id: number;
20
+ nombre: string;
21
+ permisoInsertar: boolean;
22
+ permisoModificar: boolean;
23
+ permisoEliminar: boolean;
24
+ }[];
25
+ } | null;
26
+ } & import("pinia").PiniaCustomStateProperties<IAuthState>) => boolean | undefined;
27
+ token: (state: {
28
+ user: {
29
+ email: string;
30
+ fullName: string;
31
+ name?: string | undefined;
32
+ lastName?: string | undefined;
33
+ photoUrl?: string | undefined;
34
+ mainRole?: string | undefined;
35
+ } | null;
36
+ authData: {
37
+ isAuthenticated: boolean;
38
+ accessToken: string;
39
+ resources: {
40
+ id: number;
41
+ nombre: string;
42
+ permisoInsertar: boolean;
43
+ permisoModificar: boolean;
44
+ permisoEliminar: boolean;
45
+ }[];
46
+ } | null;
47
+ } & import("pinia").PiniaCustomStateProperties<IAuthState>) => string | undefined;
48
+ }, {
49
+ /**
50
+ * Cierra la sesión del usuario
51
+ */
52
+ logout(): Promise<void>;
53
+ /**
54
+ * Actualiza la información del usuario autenticado y la información de la sesión.
55
+ *
56
+ * @param [IAuthenticatedUser] userInfo - Datos del usuario autenticado
57
+ * @param [IAuthData] authData - Datos de la sesión del usuario autenticado
58
+ */
59
+ update(userInfo: IAuthenticatedUser, authData: IAuthData): void;
60
+ /**
61
+ * Retorna si el usuario tiene acceso a un recurso.
62
+ *
63
+ * @param [string] resource - Recurso a validar
64
+ *
65
+ * @return *boolean*
66
+ */
67
+ hasResource(resource: string): boolean;
68
+ /**
69
+ * Retorna si el usuario tiene la autorización en el recurso.
70
+ *
71
+ * @param [Object] params - Objeto con los parámetros *resource* y *authorization*
72
+ *
73
+ * @return *boolean*
74
+ */
75
+ hasAuthorizationInResource(params: IHasAuthorizationInResourceParams): boolean;
76
+ }>;
@@ -0,0 +1,66 @@
1
+ import { defineStore } from "pinia";
2
+ import { EAuthorization } from "../enums/EAuthorization.js";
3
+ import { useNuxtApp } from "#app";
4
+ export const useAuthStore = defineStore({
5
+ id: "AuthStore",
6
+ state: () => ({
7
+ user: null,
8
+ authData: null
9
+ }),
10
+ getters: {
11
+ isAuthenticated: (state) => state.authData?.isAuthenticated,
12
+ token: (state) => state.authData?.accessToken
13
+ },
14
+ actions: {
15
+ /**
16
+ * Cierra la sesión del usuario
17
+ */
18
+ async logout() {
19
+ const { $signOut } = useNuxtApp();
20
+ await $signOut();
21
+ },
22
+ /**
23
+ * Actualiza la información del usuario autenticado y la información de la sesión.
24
+ *
25
+ * @param [IAuthenticatedUser] userInfo - Datos del usuario autenticado
26
+ * @param [IAuthData] authData - Datos de la sesión del usuario autenticado
27
+ */
28
+ update(userInfo, authData) {
29
+ this.user = userInfo;
30
+ this.authData = authData;
31
+ },
32
+ /**
33
+ * Retorna si el usuario tiene acceso a un recurso.
34
+ *
35
+ * @param [string] resource - Recurso a validar
36
+ *
37
+ * @return *boolean*
38
+ */
39
+ hasResource(resource) {
40
+ return this.authData?.resources?.find((r) => r.nombre === resource) !== void 0;
41
+ },
42
+ /**
43
+ * Retorna si el usuario tiene la autorización en el recurso.
44
+ *
45
+ * @param [Object] params - Objeto con los parámetros *resource* y *authorization*
46
+ *
47
+ * @return *boolean*
48
+ */
49
+ hasAuthorizationInResource(params) {
50
+ const resource = this.authData?.resources.find(
51
+ (r) => r.nombre === params.resource
52
+ );
53
+ if (resource === void 0) return false;
54
+ switch (params.authorization) {
55
+ case EAuthorization.CREATE:
56
+ return resource.permisoInsertar;
57
+ case EAuthorization.EDIT:
58
+ return resource.permisoModificar;
59
+ case EAuthorization.DELETE:
60
+ return resource.permisoEliminar;
61
+ default:
62
+ return false;
63
+ }
64
+ }
65
+ }
66
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Store encargado de almacenar y gestionar el modo de edición de formulario del módulo actual.
3
+ *
4
+ * Usado por el middlware de autorización para validar si el usuario tiene el acceso de crear o editar del módulo actual.
5
+ * Al ir al formulario de un modulo el formato de la ruta es: "/modules/{NombreModulo}/form".
6
+ * Este Store es necesario para identificar si el formulario esta en modo crear o modo editar.
7
+ */
8
+ export declare const useFormModeTrackerStore: import("pinia").StoreDefinition<"formModeTrackerStore", import("pinia")._UnwrapAll<Pick<{
9
+ formMode: import("vue").Ref<"CREATE" | "EDIT", "CREATE" | "EDIT">;
10
+ }, "formMode">>, Pick<{
11
+ formMode: import("vue").Ref<"CREATE" | "EDIT", "CREATE" | "EDIT">;
12
+ }, never>, Pick<{
13
+ formMode: import("vue").Ref<"CREATE" | "EDIT", "CREATE" | "EDIT">;
14
+ }, never>>;
@@ -0,0 +1,10 @@
1
+ import { defineStore } from "pinia";
2
+ import { EFormMode } from "../enums/index.js";
3
+ import { ref } from "vue";
4
+ export const useFormModeTrackerStore = defineStore(
5
+ "formModeTrackerStore",
6
+ () => {
7
+ const formMode = ref(EFormMode.CREATE);
8
+ return { formMode };
9
+ }
10
+ );