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
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ <!--
2
+ Get your module up and running quickly.
3
+
4
+ Find and replace all on all files (CMD+SHIFT+F):
5
+ - Name: My Module
6
+ - Package name: my-module
7
+ - Description: My new Nuxt module
8
+ -->
9
+
10
+ # My Module
11
+
12
+ [![npm version][npm-version-src]][npm-version-href]
13
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
14
+ [![License][license-src]][license-href]
15
+ [![Nuxt][nuxt-src]][nuxt-href]
16
+
17
+ My new Nuxt module for doing amazing things.
18
+
19
+ - [✨ &nbsp;Release Notes](/CHANGELOG.md)
20
+ <!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
21
+ <!-- - [📖 &nbsp;Documentation](https://example.com) -->
22
+
23
+ ## Features
24
+
25
+ <!-- Highlight some of the features your module provide here -->
26
+ - ⛰ &nbsp;Foo
27
+ - 🚠 &nbsp;Bar
28
+ - 🌲 &nbsp;Baz
29
+
30
+ ## Quick Setup
31
+
32
+ Install the module to your Nuxt application with one command:
33
+
34
+ ```bash
35
+ npx nuxi module add my-module
36
+ ```
37
+
38
+ That's it! You can now use My Module in your Nuxt app ✨
39
+
40
+
41
+ ## Contribution
42
+
43
+ <details>
44
+ <summary>Local development</summary>
45
+
46
+ ```bash
47
+ # Install dependencies
48
+ npm install
49
+
50
+ # Generate type stubs
51
+ npm run dev:prepare
52
+
53
+ # Develop with the playground
54
+ npm run dev
55
+
56
+ # Build the playground
57
+ npm run dev:build
58
+
59
+ # Run ESLint
60
+ npm run lint
61
+
62
+ # Run Vitest
63
+ npm run test
64
+ npm run test:watch
65
+
66
+ # Release new version
67
+ npm run release
68
+ ```
69
+
70
+ </details>
71
+
72
+
73
+ <!-- Badges -->
74
+ [npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
75
+ [npm-version-href]: https://npmjs.com/package/my-module
76
+
77
+ [npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
78
+ [npm-downloads-href]: https://npmjs.com/package/my-module
79
+
80
+ [license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
81
+ [license-href]: https://npmjs.com/package/my-module
82
+
83
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
84
+ [nuxt-href]: https://nuxt.com
@@ -0,0 +1,5 @@
1
+ module.exports = function(...args) {
2
+ return import('./module.mjs').then(m => m.default.call(this, ...args))
3
+ }
4
+ const _meta = module.exports.meta = require('./module.json')
5
+ module.exports.getMeta = () => Promise.resolve(_meta)
@@ -0,0 +1,6 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { IUnaNuxtModuleOptions } from '../dist/runtime/types/index.js';
3
+
4
+ declare const _default: _nuxt_schema.NuxtModule<IUnaNuxtModuleOptions, IUnaNuxtModuleOptions, false>;
5
+
6
+ export { _default as default };
@@ -0,0 +1,6 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { IUnaNuxtModuleOptions } from '../dist/runtime/types/index.js';
3
+
4
+ declare const _default: _nuxt_schema.NuxtModule<IUnaNuxtModuleOptions, IUnaNuxtModuleOptions, false>;
5
+
6
+ export { _default as default };
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "una-nuxt-module",
3
+ "configKey": "unaNuxtModule",
4
+ "version": "1.0.2",
5
+ "builder": {
6
+ "@nuxt/module-builder": "0.8.4",
7
+ "unbuild": "2.0.0"
8
+ }
9
+ }
@@ -0,0 +1,105 @@
1
+ import { defineNuxtModule, createResolver, useLogger, extendPages, addLayout, addComponentsDir, addImportsDir, addPlugin, addRouteMiddleware } from '@nuxt/kit';
2
+
3
+ const module = defineNuxtModule({
4
+ meta: {
5
+ name: "una-nuxt-module",
6
+ configKey: "unaNuxtModule"
7
+ },
8
+ // Default configuration options of the Nuxt module
9
+ defaults: {},
10
+ 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
+ }
41
+ );
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
+ });
100
+ logger.ready("i18n messages extended");
101
+ logger.start("Module registration completed...\n");
102
+ }
103
+ });
104
+
105
+ export { module as default };