una-nuxt-module 1.0.2 → 1.0.4

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 (51) hide show
  1. package/dist/module.d.mts +10 -0
  2. package/dist/module.d.ts +10 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +125 -93
  5. package/dist/runtime/assets/scss/styles.css +4 -237
  6. package/dist/runtime/classes/FetchClient.d.ts +2 -2
  7. package/dist/runtime/classes/FetchClient.js +9 -7
  8. package/dist/runtime/components/layout/header/BtnExtendMenu.vue +1 -1
  9. package/dist/runtime/components/shared/authorization/AuthorizedRenderer.vue +4 -2
  10. package/dist/runtime/components/shared/dialogs/DialogConfirmDelete.vue +2 -2
  11. package/dist/runtime/components/shared/dialogs/DialogExportTable.vue +3 -1
  12. package/dist/runtime/components/shared/feedback/SnackBar.vue +5 -1
  13. package/dist/runtime/components/shared/tables/CustomTable.vue +2 -2
  14. package/dist/runtime/composables/useAuthorization.d.ts +2 -2
  15. package/dist/runtime/composables/useAuthorization.js +11 -7
  16. package/dist/runtime/composables/useCrudState.d.ts +40 -0
  17. package/dist/runtime/composables/useCrudState.js +41 -0
  18. package/dist/runtime/i18n/vueI18n.d.ts +0 -5
  19. package/dist/runtime/middleware/authentication.d.ts +1 -1
  20. package/dist/runtime/middleware/authentication.js +2 -2
  21. package/dist/runtime/middleware/authorization.d.ts +1 -1
  22. package/dist/runtime/middleware/authorization.js +4 -2
  23. package/dist/runtime/plugins/auth.d.ts +59 -1
  24. package/dist/runtime/plugins/vue-json.d.ts +1 -1
  25. package/dist/runtime/stores/UiCustomizer.d.ts +26 -8
  26. package/dist/runtime/stores/UiCustomizer.js +22 -8
  27. package/dist/runtime/stores/appStatus.d.ts +72 -60
  28. package/dist/runtime/stores/appStatus.js +67 -97
  29. package/dist/runtime/stores/auth.d.ts +15 -11
  30. package/dist/runtime/stores/auth.js +28 -25
  31. package/dist/runtime/stores/formModeTracker.d.ts +12 -5
  32. package/dist/runtime/stores/formModeTracker.js +6 -1
  33. package/dist/runtime/types/index.d.ts +98 -16
  34. package/dist/runtime/utils/buildSortQuery.d.ts +9 -0
  35. package/dist/runtime/utils/{buildSortQueryParams.js → buildSortQuery.js} +1 -1
  36. package/dist/runtime/utils/getCurrentPath.d.ts +2 -2
  37. package/dist/runtime/utils/getCurrentPath.js +1 -1
  38. package/dist/runtime/utils/getDateTimeInISO8601.d.ts +5 -6
  39. package/dist/runtime/utils/getFromLocalStorage.d.ts +4 -5
  40. package/dist/runtime/utils/getFromLocalStorage.js +4 -4
  41. package/dist/runtime/utils/isClient.d.ts +8 -0
  42. package/dist/runtime/utils/isClient.js +3 -0
  43. package/dist/runtime/utils/isNumberInRange.d.ts +5 -6
  44. package/dist/runtime/utils/isNumberInRange.js +2 -2
  45. package/dist/runtime/utils/onlyNumbers.d.ts +4 -5
  46. package/dist/runtime/utils/onlyNumbers.js +2 -2
  47. package/dist/runtime/utils/stringToBoolean.d.ts +5 -3
  48. package/dist/runtime/utils/stringToBoolean.js +1 -0
  49. package/package.json +1 -1
  50. package/dist/runtime/index.d.ts +0 -9
  51. package/dist/runtime/utils/buildSortQueryParams.d.ts +0 -10
package/dist/module.d.mts CHANGED
@@ -1,6 +1,16 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { IUnaNuxtModuleOptions } from '../dist/runtime/types/index.js';
3
3
 
4
+ declare const CONFIG_KEY = "unaNuxtModule";
5
+
4
6
  declare const _default: _nuxt_schema.NuxtModule<IUnaNuxtModuleOptions, IUnaNuxtModuleOptions, false>;
5
7
 
8
+ interface ModulePublicRuntimeConfig {
9
+ [CONFIG_KEY]: IUnaNuxtModuleOptions;
10
+ }
11
+ declare module "@nuxt/schema" {
12
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {
13
+ }
14
+ }
15
+
6
16
  export { _default as default };
package/dist/module.d.ts CHANGED
@@ -1,6 +1,16 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
  import { IUnaNuxtModuleOptions } from '../dist/runtime/types/index.js';
3
3
 
4
+ declare const CONFIG_KEY = "unaNuxtModule";
5
+
4
6
  declare const _default: _nuxt_schema.NuxtModule<IUnaNuxtModuleOptions, IUnaNuxtModuleOptions, false>;
5
7
 
8
+ interface ModulePublicRuntimeConfig {
9
+ [CONFIG_KEY]: IUnaNuxtModuleOptions;
10
+ }
11
+ declare module "@nuxt/schema" {
12
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {
13
+ }
14
+ }
15
+
6
16
  export { _default as default };
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "una-nuxt-module",
3
+ "version": "1.0.4",
3
4
  "configKey": "unaNuxtModule",
4
- "version": "1.0.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,104 +1,136 @@
1
- import { defineNuxtModule, createResolver, useLogger, extendPages, addLayout, addComponentsDir, addImportsDir, addPlugin, addRouteMiddleware } from '@nuxt/kit';
1
+ import { createResolver, defineNuxtModule, useLogger, extendPages, addLayout, addComponentsDir, addImportsDir, addPlugin, addRouteMiddleware, hasNuxtModule } from '@nuxt/kit';
2
+
3
+ const name = "una-nuxt-module";
4
+ const version = "1.0.4";
5
+
6
+ function resolve(path) {
7
+ const resolver = createResolver(import.meta.url);
8
+ return resolver.resolve(`./runtime/${path}`);
9
+ }
10
+
11
+ const CONFIG_KEY = "unaNuxtModule";
12
+ const PAGES_CONFIG = [
13
+ {
14
+ name: "401",
15
+ path: "/401",
16
+ file: resolve("pages/401.vue")
17
+ },
18
+ {
19
+ name: "403",
20
+ path: "/403",
21
+ file: resolve("pages/403.vue")
22
+ },
23
+ {
24
+ name: "ssoCallback",
25
+ path: "/auth/sso/login",
26
+ file: resolve("pages/ssoCallback.vue")
27
+ }
28
+ ];
29
+ const LAYOUTS_CONFIG = [
30
+ { src: resolve("layouts/default.vue"), name: "default" },
31
+ { src: resolve("layouts/empty.vue"), name: "empty" }
32
+ ];
33
+ const PLUGINS_CONFIG = [
34
+ { name: "auth", src: resolve("plugins/auth"), mode: "client" },
35
+ { name: "vue-json", src: resolve("plugins/vue-json"), mode: "client" }
36
+ ];
37
+ const MIDDLEWARE_CONFIG = [
38
+ {
39
+ name: "authentication",
40
+ path: resolve("middleware/authentication"),
41
+ global: true
42
+ },
43
+ {
44
+ name: "authorization",
45
+ path: resolve("middleware/authorization"),
46
+ global: true
47
+ }
48
+ ];
49
+ const AUTO_IMPORT_DIRS = [
50
+ "composables",
51
+ "constants",
52
+ "enums",
53
+ "stores",
54
+ "types",
55
+ "utils"
56
+ ];
2
57
 
3
58
  const module = defineNuxtModule({
4
59
  meta: {
5
- name: "una-nuxt-module",
6
- configKey: "unaNuxtModule"
60
+ name: name,
61
+ version: version,
62
+ configKey: CONFIG_KEY
7
63
  },
8
- // Default configuration options of the Nuxt module
9
64
  defaults: {},
10
65
  setup(_options, _nuxt) {
11
- const resolver = createResolver(import.meta.url);
12
- function resolve(path) {
13
- return resolver.resolve(`./runtime/${path}`);
14
- }
15
- const logger = useLogger("una-nuxt-module");
16
- logger.box("Module: una-nuxt-module");
17
- logger.start("Module registration started...");
18
- _nuxt.options.nitro.publicAssets = [
19
- {
20
- dir: resolver.resolve("./runtime/public")
21
- }
22
- ];
23
- logger.ready("public assets added");
24
- extendPages((pages) => {
25
- pages.push(
26
- {
27
- name: "401",
28
- path: "/401",
29
- file: resolve("pages/401.vue")
30
- },
31
- {
32
- name: "403",
33
- path: "/403",
34
- file: resolve("pages/403.vue")
35
- },
36
- {
37
- name: "ssoCallback",
38
- path: "/auth/sso/login",
39
- file: resolve("pages/ssoCallback.vue")
40
- }
66
+ const LOGGER = useLogger(name);
67
+ const setupModuleBase = () => {
68
+ LOGGER.box(`Module: ${name} v${version}`);
69
+ LOGGER.start("Module registration started...");
70
+ };
71
+ const setupPublicAssets = () => {
72
+ _nuxt.options.nitro.publicAssets = [{ dir: resolve("public") }];
73
+ LOGGER.success("Public assets added");
74
+ };
75
+ const setupPages = () => {
76
+ extendPages((currentPages) => {
77
+ currentPages.push(...PAGES_CONFIG);
78
+ });
79
+ LOGGER.success("Custom pages added: ['/401', '/403', '/auth/sso/login']");
80
+ };
81
+ const setupLayouts = () => {
82
+ LAYOUTS_CONFIG.forEach((layout) => addLayout(layout, layout.name));
83
+ LOGGER.success("Layouts added: ['default', 'empty']");
84
+ };
85
+ const setupComponents = () => {
86
+ addComponentsDir({
87
+ path: resolve("components"),
88
+ pathPrefix: false,
89
+ global: true
90
+ });
91
+ LOGGER.success("Global components added");
92
+ };
93
+ const setupAutoImports = () => {
94
+ addImportsDir(AUTO_IMPORT_DIRS.map((dir) => resolve(dir)));
95
+ LOGGER.success(
96
+ `Auto-import directories added: [${AUTO_IMPORT_DIRS.join(", ")}]`
41
97
  );
42
- });
43
- logger.ready("pages ['/401', '/403', '/auth/sso/login'] added");
44
- addLayout({ src: resolve("layouts/default.vue") }, "default");
45
- logger.ready("layout default added");
46
- addLayout({ src: resolve("layouts/empty.vue") }, "empty");
47
- logger.ready("layout empty added");
48
- addComponentsDir({
49
- path: resolve("components"),
50
- pathPrefix: false,
51
- global: true
52
- });
53
- logger.ready("components added");
54
- addImportsDir([
55
- resolve("composables"),
56
- resolve("constants"),
57
- resolve("enums"),
58
- resolve("stores"),
59
- resolve("types"),
60
- resolve("utils")
61
- ]);
62
- logger.ready(
63
- "[composables, constants, enums, stores, types, utils] added"
64
- );
65
- addPlugin({
66
- name: "auth",
67
- src: resolve("plugins/auth"),
68
- mode: "client"
69
- });
70
- logger.ready("plugin auth added");
71
- addPlugin({
72
- name: "vue-json",
73
- src: resolve("plugins/vue-json"),
74
- mode: "client"
75
- });
76
- logger.ready("plugin vue-json added");
77
- addRouteMiddleware({
78
- name: "authentication",
79
- path: resolve("middleware/authentication"),
80
- global: true
81
- });
82
- logger.ready("middleware authentication added");
83
- addRouteMiddleware({
84
- name: "authorization",
85
- path: resolve("middleware/authorization"),
86
- global: true
87
- });
88
- logger.ready("middleware authorization added");
89
- _nuxt.hook("i18n:registerModule", (register) => {
90
- register({
91
- langDir: resolve("./i18n/locales"),
92
- locales: [
93
- {
94
- code: "es",
95
- file: "es.json"
96
- }
97
- ]
98
+ };
99
+ const setupPlugins = () => {
100
+ PLUGINS_CONFIG.forEach((plugin) => addPlugin(plugin));
101
+ LOGGER.success("Plugins added: ['auth', 'vue-json']");
102
+ };
103
+ const setupMiddleware = () => {
104
+ MIDDLEWARE_CONFIG.forEach((middleware) => addRouteMiddleware(middleware));
105
+ LOGGER.success("Middleware added: ['authentication', 'authorization']");
106
+ };
107
+ const setupI18n = () => {
108
+ if (!hasNuxtModule("@nuxtjs/i18n", _nuxt)) {
109
+ throw new Error("@nuxtjs/i18n module is required but not installed");
110
+ }
111
+ _nuxt.hook("i18n:registerModule", (register) => {
112
+ register({
113
+ langDir: resolve("i18n/locales"),
114
+ locales: [{ code: "es", file: "es.json" }]
115
+ });
98
116
  });
99
- });
100
- logger.ready("i18n messages extended");
101
- logger.start("Module registration completed...\n");
117
+ LOGGER.success("i18n configuration completed");
118
+ };
119
+ try {
120
+ setupModuleBase();
121
+ setupPublicAssets();
122
+ setupPages();
123
+ setupLayouts();
124
+ setupComponents();
125
+ setupAutoImports();
126
+ setupPlugins();
127
+ setupMiddleware();
128
+ setupI18n();
129
+ LOGGER.success("Module setup completed successfully\n");
130
+ } catch (error) {
131
+ LOGGER.error("Module setup failed");
132
+ throw error;
133
+ }
102
134
  }
103
135
  });
104
136
 
@@ -104,6 +104,10 @@ html {
104
104
  padding: 40px 0;
105
105
  }
106
106
  }
107
+ .page-wrapper {
108
+ background: rgb(255, 255, 255);
109
+ }
110
+
107
111
  .cursor-pointer {
108
112
  cursor: pointer;
109
113
  }
@@ -248,76 +252,6 @@ html {
248
252
  color: rgb(255, 255, 255) !important;
249
253
  }
250
254
 
251
- .themeDefault,
252
- .themeDarkDefault {
253
- border: 1px solid #1677ff;
254
- background-color: #1677ff;
255
- }
256
-
257
- .themeLightTheme1,
258
- .themeDark1 {
259
- border: 1px solid #3366ff;
260
- background-color: #3366ff;
261
- }
262
-
263
- .themeLightTheme2,
264
- .themeDark2 {
265
- border: 1px solid #7265e6;
266
- background-color: #7265e6;
267
- }
268
-
269
- .themeLightTheme3,
270
- .themeDark3 {
271
- border: 1px solid #068e44;
272
- background-color: #068e44;
273
- }
274
-
275
- .themeLightTheme4,
276
- .themeDark4 {
277
- border: 1px solid #3c64d0;
278
- background-color: #3c64d0;
279
- }
280
-
281
- .themeLightTheme5,
282
- .themeDark5 {
283
- border: 1px solid #f27013;
284
- background-color: #f27013;
285
- }
286
-
287
- .themeLightTheme6,
288
- .themeDark6 {
289
- border: 1px solid #2aa1af;
290
- background-color: #2aa1af;
291
- }
292
-
293
- .themeLightTheme7,
294
- .themeDark7 {
295
- border: 1px solid #00a854;
296
- background-color: #00a854;
297
- }
298
-
299
- .themeLightTheme8,
300
- .themeDark8 {
301
- border: 1px solid #009688;
302
- background-color: #009688;
303
- }
304
-
305
- body {
306
- font-family: "Public sans", sans-serif;
307
- }
308
- body .Roboto {
309
- font-family: "Roboto", sans-serif !important;
310
- }
311
- body .Poppins {
312
- font-family: "Poppins", sans-serif !important;
313
- }
314
- body .Inter {
315
- font-family: "Inter", sans-serif !important;
316
- }
317
- body .Public {
318
- font-family: "Public sans", sans-serif !important;
319
- }
320
-
321
255
  @keyframes slideY {
322
256
  0%, 50%, 100% {
323
257
  transform: translateY(0px);
@@ -477,9 +411,6 @@ body .Public {
477
411
  width: 40px;
478
412
  overflow: hidden;
479
413
  }
480
- .mini-sidebar .leftSidebar:hover {
481
- box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08) !important;
482
- }
483
414
  .mini-sidebar .v-navigation-drawer--expand-on-hover:hover .logo {
484
415
  width: 100%;
485
416
  }
@@ -573,25 +504,6 @@ body .Public {
573
504
  font-size: 18px !important;
574
505
  }
575
506
 
576
- .v-alert--variant-tonal.with-border.text-primary {
577
- border: 1px solid rgba(var(--v-theme-primary), 0.3);
578
- }
579
- .v-alert--variant-tonal.with-border.text-secondary {
580
- border: 1px solid rgba(var(--v-theme-secondary), 0.3);
581
- }
582
- .v-alert--variant-tonal.with-border.text-success {
583
- border: 1px solid rgba(var(--v-theme-success), 0.3);
584
- }
585
- .v-alert--variant-tonal.with-border.text-info {
586
- border: 1px solid rgba(var(--v-theme-info), 0.3);
587
- }
588
- .v-alert--variant-tonal.with-border.text-warning {
589
- border: 1px solid rgba(var(--v-theme-warning), 0.3);
590
- }
591
- .v-alert--variant-tonal.with-border.text-error {
592
- border: 1px solid rgba(var(--v-theme-error), 0.3);
593
- }
594
-
595
507
  @media (max-width: 500px) {
596
508
  .single-line-alert {
597
509
  display: flex;
@@ -642,33 +554,6 @@ body .Public {
642
554
  border-top: 1px solid rgb(var(--v-theme-borderLight));
643
555
  }
644
556
 
645
- .v-btn.bg-lightprimary:hover, .v-btn.bg-lightprimary:active, .v-btn.bg-lightprimary:focus {
646
- background-color: rgb(var(--v-theme-primary)) !important;
647
- color: #fff !important;
648
- }
649
- .v-btn.bg-lightsecondary:hover, .v-btn.bg-lightsecondary:active, .v-btn.bg-lightsecondary:focus {
650
- background-color: rgb(var(--v-theme-secondary)) !important;
651
- color: #fff !important;
652
- }
653
- .v-btn.text-facebook:hover, .v-btn.text-facebook:active, .v-btn.text-facebook:focus {
654
- background-color: rgb(var(--v-theme-facebook)) !important;
655
- color: #fff !important;
656
- }
657
- .v-btn.text-twitter:hover, .v-btn.text-twitter:active, .v-btn.text-twitter:focus {
658
- background-color: rgb(var(--v-theme-twitter)) !important;
659
- color: #fff !important;
660
- }
661
- .v-btn.text-linkedin:hover, .v-btn.text-linkedin:active, .v-btn.text-linkedin:focus {
662
- background-color: rgb(var(--v-theme-linkedin)) !important;
663
- color: #fff !important;
664
- }
665
-
666
- .v-btn {
667
- text-transform: capitalize;
668
- letter-spacing: 0;
669
- font-weight: 400;
670
- }
671
-
672
557
  .v-btn--icon.v-btn--density-default {
673
558
  width: calc(var(--v-btn-height) + 6px);
674
559
  height: calc(var(--v-btn-height) + 6px);
@@ -686,30 +571,6 @@ body .Public {
686
571
  border-inline-end-color: rgba(var(--v-border-color), 1);
687
572
  }
688
573
 
689
- .primary-dashed {
690
- border: 1px dashed rgb(var(--v-theme-primary));
691
- }
692
-
693
- .secondary-dashed {
694
- border: 1px dashed rgb(var(--v-theme-secondary));
695
- }
696
-
697
- .success-dashed {
698
- border: 1px dashed rgb(var(--v-theme-success));
699
- }
700
-
701
- .info-dashed {
702
- border: 1px dashed rgb(var(--v-theme-info));
703
- }
704
-
705
- .warning-dashed {
706
- border: 1px dashed rgb(var(--v-theme-warning));
707
- }
708
-
709
- .error-dashed {
710
- border: 1px dashed rgb(var(--v-theme-error));
711
- }
712
-
713
574
  .v-card--variant-outlined {
714
575
  border-color: rgba(var(--v-theme-borderLight), 1);
715
576
  }
@@ -717,14 +578,6 @@ body .Public {
717
578
  border-color: rgba(var(--v-theme-borderLight), 0.8);
718
579
  }
719
580
 
720
- .v-card-text {
721
- padding: 20px;
722
- }
723
-
724
- .v-card-actions {
725
- padding: 14px 20px 14px;
726
- }
727
-
728
581
  .v-card {
729
582
  width: 100%;
730
583
  overflow: visible;
@@ -739,10 +592,6 @@ body .Public {
739
592
  overflow: hidden;
740
593
  }
741
594
 
742
- .v-card-item {
743
- padding: 20px;
744
- }
745
-
746
595
  .v-card-subtitle {
747
596
  font-size: 0.75rem;
748
597
  }
@@ -752,28 +601,6 @@ body .Public {
752
601
  border: 1px solid rgba(var(--v-theme-borderLight), 1);
753
602
  }
754
603
 
755
- .v-chip.v-chip--variant-tonal.combined {
756
- border: 1px solid rgba(var(--v-theme-secondary), 0.5);
757
- }
758
- .v-chip.v-chip--variant-tonal.combined.text-primary {
759
- border: 1px solid rgba(var(--v-theme-primary), 0.5);
760
- }
761
- .v-chip.v-chip--variant-tonal.combined.text-secondary {
762
- border: 1px solid rgba(var(--v-theme-secondary), 0.5);
763
- }
764
- .v-chip.v-chip--variant-tonal.combined.text-success {
765
- border: 1px solid rgba(var(--v-theme-success), 0.5);
766
- }
767
- .v-chip.v-chip--variant-tonal.combined.text-info {
768
- border: 1px solid rgba(var(--v-theme-info), 0.5);
769
- }
770
- .v-chip.v-chip--variant-tonal.combined.text-warning {
771
- border: 1px solid rgba(var(--v-theme-warning), 0.5);
772
- }
773
- .v-chip.v-chip--variant-tonal.combined.text-error {
774
- border: 1px solid rgba(var(--v-theme-error), 0.5);
775
- }
776
-
777
604
  .v-badge__badge {
778
605
  min-width: 16px;
779
606
  height: 16px;
@@ -801,16 +628,6 @@ body .Public {
801
628
  margin-right: -10px;
802
629
  }
803
630
 
804
- .v-field--variant-outlined .v-field__outline__start.v-locale--is-ltr,
805
- .v-locale--is-ltr .v-field--variant-outlined .v-field__outline__start {
806
- border-radius: 4px 0 0 4px;
807
- }
808
-
809
- .v-field--variant-outlined .v-field__outline__end.v-locale--is-ltr,
810
- .v-locale--is-ltr .v-field--variant-outlined .v-field__outline__end {
811
- border-radius: 0 4px 4px 0;
812
- }
813
-
814
631
  .v-input--density-default:not(.v-autocomplete--multiple),
815
632
  .v-field--variant-solo,
816
633
  .v-field--variant-filled {
@@ -876,56 +693,6 @@ textarea.v-field__input {
876
693
  display: none;
877
694
  }
878
695
 
879
- .elevation-24 {
880
- box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08) !important;
881
- }
882
-
883
- .v-menu > .v-overlay__content > .v-sheet {
884
- box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.08);
885
- }
886
-
887
- .primary-shadow {
888
- box-shadow: 0 14px 12px rgba(var(--v-theme-primary), 0.2);
889
- }
890
- .primary-shadow:hover {
891
- box-shadow: none;
892
- }
893
-
894
- .secondary-shadow {
895
- box-shadow: 0 14px 12px rgba(var(--v-theme-secondary), 0.2);
896
- }
897
- .secondary-shadow:hover {
898
- box-shadow: none;
899
- }
900
-
901
- .success-shadow {
902
- box-shadow: 0 14px 12px rgba(var(--v-theme-success), 0.2);
903
- }
904
- .success-shadow:hover {
905
- box-shadow: none;
906
- }
907
-
908
- .info-shadow {
909
- box-shadow: 0 14px 12px rgba(var(--v-theme-info), 0.2);
910
- }
911
- .info-shadow:hover {
912
- box-shadow: none;
913
- }
914
-
915
- .warning-shadow {
916
- box-shadow: 0 14px 12px rgba(var(--v-theme-warning), 0.2);
917
- }
918
- .warning-shadow:hover {
919
- box-shadow: none;
920
- }
921
-
922
- .error-shadow {
923
- box-shadow: 0 14px 12px rgba(var(--v-theme-error), 0.2);
924
- }
925
- .error-shadow:hover {
926
- box-shadow: none;
927
- }
928
-
929
696
  .v-text-field input {
930
697
  font-size: 0.875rem;
931
698
  }
@@ -1,5 +1,5 @@
1
- import type { IFetchParams } from "#imports";
2
1
  import type { $Fetch } from "ofetch";
2
+ import type { IApiCallWithAsyncData, IFetchParams } from "../types/index.js";
3
3
  /**
4
4
  * Clase que gestiona las peticiones HTTP .
5
5
  * Proporciona una forma sencilla de realizar llamadas a APIs con configuración opcional.
@@ -57,5 +57,5 @@ export declare class FetchClient {
57
57
  * }
58
58
  * }
59
59
  */
60
- call<T>({ method, url, body, fetchOptions, }: IFetchParams): Promise<any>;
60
+ call<T = unknown>(params: IFetchParams): Promise<IApiCallWithAsyncData<T>>;
61
61
  }
@@ -1,4 +1,5 @@
1
- import { ERequestMethod, useAsyncData } from "#imports";
1
+ import { ERequestMethod } from "../enums/index.js";
2
+ import { useAsyncData } from "#app";
2
3
  export class FetchClient {
3
4
  /** Instancia de $fetch utilizada para realizar las peticiones HTTP. */
4
5
  $fetch;
@@ -54,12 +55,13 @@ export class FetchClient {
54
55
  * }
55
56
  * }
56
57
  */
57
- async call({
58
- method = ERequestMethod.GET,
59
- url,
60
- body,
61
- fetchOptions
62
- }) {
58
+ async call(params) {
59
+ const {
60
+ method = ERequestMethod.GET,
61
+ url,
62
+ body = void 0,
63
+ fetchOptions = {}
64
+ } = params;
63
65
  return useAsyncData(() => {
64
66
  return this.$fetch(url, {
65
67
  method,
@@ -20,7 +20,7 @@ const extendMenuIcon = computed(() => {
20
20
  });
21
21
 
22
22
  const handleClick = () => {
23
- uiCustomizer.SET_IS_SIDEBAR_MINI(!uiCustomizer.isSidebarMini);
23
+ uiCustomizer.toggleSidebar();
24
24
  };
25
25
  </script>
26
26
 
@@ -23,11 +23,13 @@ const props = defineProps({
23
23
  * Método que valida si el contenido se debe renderizar.
24
24
  */
25
25
  const renderContent = (): boolean => {
26
+ const authorization = useAuthorization();
27
+
26
28
  // Si el recurso no esta definido por props toma la ruta actual como recurso
27
- const resource = props.resource ?? useAuthorization().currentResource.value;
29
+ const resource = props.resource ?? authorization.currentResource.value;
28
30
 
29
31
  // Valida si el usuario tiene la autorización en el recurso
30
- const hasAuthorization = useAuthorization().hasAuthorizationIn({
32
+ const hasAuthorization = authorization.hasAuthorizationIn({
31
33
  authorization: props.authorization,
32
34
  resource,
33
35
  });
@@ -20,13 +20,13 @@
20
20
  </template>
21
21
 
22
22
  <script lang="ts" setup>
23
- import { useAppStatusStore } from "../../../stores/appStatus";
23
+ import { useAppStatusStore } from "#imports";
24
24
 
25
25
  const appStatusStore = useAppStatusStore();
26
26
 
27
27
  const emit = defineEmits(["on-delete"]);
28
28
 
29
29
  const handleCancel = () => {
30
- appStatusStore.SET_OPEN_DIALOG_DELETE(false);
30
+ appStatusStore.setOpenDialogDelete(false);
31
31
  };
32
32
  </script>
@@ -30,6 +30,8 @@
30
30
  </template>
31
31
 
32
32
  <script lang="ts" setup>
33
+ import { ref, useAppStatusStore } from "#imports";
34
+
33
35
  const appStatusStore = useAppStatusStore();
34
36
 
35
37
  const exportTypesSelected = ref([0]);
@@ -37,6 +39,6 @@ const exportTypesSelected = ref([0]);
37
39
  const emit = defineEmits(["on-export"]);
38
40
 
39
41
  const handleCancel = () => {
40
- appStatusStore.SET_OPEN_DIALOG_EXPORT(false);
42
+ appStatusStore.setOpenDialogExport(false);
41
43
  };
42
44
  </script>