@mapomodule/uikit 1.0.0-alpha.9 → 2.0.0-beta.1

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 (94) hide show
  1. package/README.md +167 -0
  2. package/dist/index.d.cts +2 -0
  3. package/dist/index.d.mts +2 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.mjs +18 -0
  6. package/dist/module.d.cts +2 -0
  7. package/dist/module.d.mts +2 -0
  8. package/dist/module.d.ts +2 -0
  9. package/dist/module.json +9 -0
  10. package/dist/module.mjs +18 -0
  11. package/dist/types.d.mts +13 -0
  12. package/package.json +63 -10
  13. package/src/index.ts +10 -0
  14. package/src/module.ts +181 -0
  15. package/src/runtime/assets/main.css +59 -0
  16. package/src/runtime/components/MapoConfirmDialog.vue +34 -0
  17. package/src/runtime/components/MapoDetail.vue +861 -0
  18. package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
  19. package/src/runtime/components/MapoList.vue +339 -0
  20. package/src/runtime/components/MapoListActions.vue +152 -0
  21. package/src/runtime/components/MapoListFilters.vue +289 -0
  22. package/src/runtime/components/MapoListHead.vue +12 -0
  23. package/src/runtime/components/MapoListQuickEdit.vue +163 -0
  24. package/src/runtime/components/MapoListTable.vue +926 -0
  25. package/src/runtime/components/MapoListTabs.vue +48 -0
  26. package/src/runtime/components/MapoLogin.vue +209 -0
  27. package/src/runtime/components/MapoLogoutButton.vue +46 -0
  28. package/src/runtime/components/MapoRootComponents.vue +9 -0
  29. package/src/runtime/components/MapoSidebar.vue +112 -0
  30. package/src/runtime/components/MapoSidebarList.vue +35 -0
  31. package/src/runtime/components/MapoSidebarListItem.vue +79 -0
  32. package/src/runtime/components/MapoSidebarProfile.vue +57 -0
  33. package/src/runtime/components/MapoSnackBar.vue +42 -0
  34. package/src/runtime/components/MapoThemeToggle.vue +23 -0
  35. package/src/runtime/components/MapoTopbar.vue +36 -0
  36. package/src/runtime/layouts/default.vue +53 -0
  37. package/src/runtime/layouts/empty.vue +9 -0
  38. package/src/runtime/page-meta.nuxt.d.ts +45 -0
  39. package/src/runtime/pages/index.vue +14 -0
  40. package/src/runtime/pages/login.vue +7 -0
  41. package/src/runtime/types/list.ts +64 -0
  42. package/CHANGELOG.md +0 -177
  43. package/LICENSE.md +0 -20
  44. package/assets/mixins.scss +0 -22
  45. package/assets/variables.scss +0 -18
  46. package/components/ConfirmDialog.vue +0 -152
  47. package/components/Detail/Detail.vue +0 -566
  48. package/components/Detail/DetailField.vue +0 -142
  49. package/components/Detail/DetailLangSwitch.vue +0 -72
  50. package/components/Detail/defaults.js +0 -57
  51. package/components/DropArea.vue +0 -250
  52. package/components/List/List.vue +0 -254
  53. package/components/List/ListActions.vue +0 -164
  54. package/components/List/ListFilters.vue +0 -334
  55. package/components/List/ListHead.vue +0 -67
  56. package/components/List/ListQuickEdit.vue +0 -302
  57. package/components/List/ListTable.vue +0 -406
  58. package/components/List/ListTabs.vue +0 -65
  59. package/components/Login.vue +0 -124
  60. package/components/Logo.vue +0 -79
  61. package/components/LogoutButton.vue +0 -39
  62. package/components/MediaManager/MediaEditor.vue +0 -309
  63. package/components/MediaManager/MediaFolders.vue +0 -263
  64. package/components/MediaManager/MediaGallery.vue +0 -206
  65. package/components/MediaManager/MediaManager.vue +0 -233
  66. package/components/MediaManager/MediaManagerDialog.vue +0 -96
  67. package/components/MediaManager/MediaPreview.vue +0 -180
  68. package/components/MediaManager/MediaUploader.vue +0 -165
  69. package/components/RootComponents.vue +0 -25
  70. package/components/SnackBar.vue +0 -70
  71. package/components/fields/DateField.vue +0 -74
  72. package/components/fields/FksField.vue +0 -60
  73. package/components/fields/MediaField.vue +0 -213
  74. package/components/fields/MediaM2mField.vue +0 -243
  75. package/components/fields/SeoPreview.vue +0 -89
  76. package/components/fields/wygEditor/defaults.js +0 -55
  77. package/components/fields/wygEditor/utils/events.js +0 -64
  78. package/components/fields/wygEditor/utils/mapomedia.plugin.js +0 -31
  79. package/components/fields/wygEditor/utils/script.injector.js +0 -29
  80. package/components/fields/wygEditor/wygEditor.vue +0 -196
  81. package/components/layout/Sidebar/Sidebar.vue +0 -80
  82. package/components/layout/Sidebar/SidebarFooter.vue +0 -71
  83. package/components/layout/Sidebar/SidebarList.vue +0 -44
  84. package/components/layout/Sidebar/SidebarListItem.vue +0 -144
  85. package/components/layout/Topbar/Topbar.vue +0 -27
  86. package/components/layout/routebuilder.js +0 -48
  87. package/defaults.js +0 -29
  88. package/layouts/default.vue +0 -21
  89. package/layouts/empty.vue +0 -6
  90. package/layouts/error.vue +0 -45
  91. package/module.js +0 -78
  92. package/pages/index.vue +0 -35
  93. package/pages/login.vue +0 -10
  94. package/static/favicon.ico +0 -0
package/layouts/error.vue DELETED
@@ -1,45 +0,0 @@
1
- <template>
2
- <v-app>
3
- <h1 v-if="error.statusCode === 404">
4
- {{ pageNotFound }}
5
- </h1>
6
- <h1 v-else>
7
- {{ otherError }}
8
- </h1>
9
- <NuxtLink to="/">
10
- Home page
11
- </NuxtLink>
12
- <root-components />
13
- </v-app>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- layout: 'empty',
19
- props: {
20
- error: {
21
- type: Object,
22
- default: null
23
- }
24
- },
25
- data () {
26
- return {
27
- pageNotFound: '404 Not Found',
28
- otherError: 'An error occurred'
29
- }
30
- },
31
- head () {
32
- const title =
33
- this.error.statusCode === 404 ? this.pageNotFound : this.otherError
34
- return {
35
- title
36
- }
37
- }
38
- }
39
- </script>
40
-
41
- <style scoped>
42
- h1 {
43
- font-size: 20px;
44
- }
45
- </style>
package/module.js DELETED
@@ -1,78 +0,0 @@
1
- import { createRoutes } from '@nuxt/utils'
2
- import serveStatic from 'serve-static'
3
- import path from 'path'
4
- import mapoDefaults from './defaults'
5
- import Glob from 'glob'
6
- import pify from 'pify'
7
- const glob = pify(Glob)
8
-
9
- class Resolver {
10
- resolveFiles = async (cwd, dir) => await glob(`${dir}/**/*.{vue,js}`, { cwd })
11
- resolveRelative = async (cwd, dir) => {
12
- const dirPrefix = new RegExp(`^${dir}/`)
13
- return (await this.resolveFiles(cwd, dir)).map(file => ({ src: file.replace(dirPrefix, '') }))
14
- }
15
- }
16
-
17
- export default async function (moduleOptions) {
18
-
19
- const resolver = new Resolver()
20
- const userModuleOptions = Object.keys(moduleOptions).length === 0 ? (this.options['mapo'] || {}) : moduleOptions
21
-
22
- // INJECT VUETIFY MODULE
23
- this.requireModule(['@nuxtjs/vuetify', (this.options && this.options.vuetify) || userModuleOptions.vuetify || mapoDefaults.vuetify || {}])
24
-
25
- // INJECT ALL LAYOUTS
26
- const layouts = (await resolver.resolveRelative(__dirname, 'layouts')).map(({ src }) => src)
27
-
28
- for (const layout of layouts) {
29
- this.addLayout({
30
- src: path.resolve(__dirname, './layouts', layout),
31
- fileName: layout.replace(new RegExp('\\.(js)$'), '')
32
- })
33
- }
34
-
35
- // INJECT STATICS
36
- this.addServerMiddleware(
37
- serveStatic(path.resolve(__dirname, 'static')),
38
- )
39
-
40
- // INJECT COMPONENTS
41
- this.nuxt.hook('components:dirs', (dirs) => {
42
- const mapoComponents = ['components', 'components/fields', 'components/layout']
43
- mapoComponents.forEach(d => dirs.unshift({ path: path.resolve(__dirname, d)}))
44
- })
45
- this.nuxt.hook('components:extend', (components) => {
46
- const clearName = (name) => name.replace(/^Mapoverride/, '').replace(/^mapoverride-/, '')
47
- const componentsOverride = Object.values(components.reduce((map, comp) => (
48
- { ...map, [clearName(comp.pascalName)]: {...comp, pascalName:clearName(comp.pascalName), kebabName:clearName(comp.kebabName)} }
49
- ), {}))
50
- components.length = 0
51
- components.push(...componentsOverride)
52
- })
53
-
54
- // INJECT ALL PAGES
55
- const pages = (await resolver.resolveRelative(__dirname, 'pages')).map(({ src }) => `pages/${src}`)
56
- const { routeNameSplitter, trailingSlash } = this.options.router
57
- const disabled = userModuleOptions['disabledRoutes'] && (Array.isArray(userModuleOptions['disabledRoutes']) ? userModuleOptions['disabledRoutes'] : userModuleOptions['disabledRoutes'].split(" ")) || []
58
- this.extendRoutes((routes) => {
59
- routes.push(...createRoutes({
60
- files: pages,
61
- srcDir: path.resolve(__dirname),
62
- pagesDir: 'pages',
63
- routeNameSplitter,
64
- trailingSlash,
65
- }).filter(route => !disabled.includes(route.name) && !routes.some(approute => approute.path === route.path)))
66
- })
67
-
68
- // INJECT WEBPACK DUMMY-LOADER FOR DOCS TAG
69
- this.extendBuild((config) => {
70
- config.module.rules.push({
71
- resourceQuery: /blockType=docs/,
72
- loader: require.resolve(path.resolve(__dirname, '../utils/loaders/dummy-loader.js'))
73
- })
74
- })
75
-
76
- }
77
-
78
- module.exports.meta = require('./package.json')
package/pages/index.vue DELETED
@@ -1,35 +0,0 @@
1
- <template>
2
- <v-row justify="center" align="center">
3
- <v-col cols="12" sm="8" md="12">
4
- <div class="mapo-info">
5
- <h1 id="mapo">
6
- <code>mapomodule {{ version }}</code>
7
- </h1>
8
- <br>
9
- <br>
10
- <code>Congratulations!! 🥳 You succesfully installed Mapo! </code>
11
- <br>
12
- <br>
13
- <code>
14
- ## TODO INSERT HERE A LITTLE TUTORIAL.
15
- </code>
16
- </div>
17
- </v-col>
18
- </v-row>
19
- </template>
20
-
21
- <style scoped>
22
- .mapo-info {
23
- border-radius: 8px;
24
- margin: 10px 5%;
25
- padding: 10px;
26
- }
27
- </style>
28
- <script>
29
- import { version } from "mapomodule/package.json";
30
- export default {
31
- data: () => ({
32
- version: version
33
- }),
34
- };
35
- </script>
package/pages/login.vue DELETED
@@ -1,10 +0,0 @@
1
- <template>
2
- <Login/>
3
- </template>
4
-
5
- <script>
6
- export default {
7
- layout: "empty",
8
- meta: { sidebarHide: true },
9
- };
10
- </script>
Binary file