@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.
- package/README.md +167 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +18 -0
- package/dist/module.d.cts +2 -0
- package/dist/module.d.mts +2 -0
- package/dist/module.d.ts +2 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +18 -0
- package/dist/types.d.mts +13 -0
- package/package.json +63 -10
- package/src/index.ts +10 -0
- package/src/module.ts +181 -0
- package/src/runtime/assets/main.css +59 -0
- package/src/runtime/components/MapoConfirmDialog.vue +34 -0
- package/src/runtime/components/MapoDetail.vue +861 -0
- package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
- package/src/runtime/components/MapoList.vue +339 -0
- package/src/runtime/components/MapoListActions.vue +152 -0
- package/src/runtime/components/MapoListFilters.vue +289 -0
- package/src/runtime/components/MapoListHead.vue +12 -0
- package/src/runtime/components/MapoListQuickEdit.vue +163 -0
- package/src/runtime/components/MapoListTable.vue +926 -0
- package/src/runtime/components/MapoListTabs.vue +48 -0
- package/src/runtime/components/MapoLogin.vue +209 -0
- package/src/runtime/components/MapoLogoutButton.vue +46 -0
- package/src/runtime/components/MapoRootComponents.vue +9 -0
- package/src/runtime/components/MapoSidebar.vue +112 -0
- package/src/runtime/components/MapoSidebarList.vue +35 -0
- package/src/runtime/components/MapoSidebarListItem.vue +79 -0
- package/src/runtime/components/MapoSidebarProfile.vue +57 -0
- package/src/runtime/components/MapoSnackBar.vue +42 -0
- package/src/runtime/components/MapoThemeToggle.vue +23 -0
- package/src/runtime/components/MapoTopbar.vue +36 -0
- package/src/runtime/layouts/default.vue +53 -0
- package/src/runtime/layouts/empty.vue +9 -0
- package/src/runtime/page-meta.nuxt.d.ts +45 -0
- package/src/runtime/pages/index.vue +14 -0
- package/src/runtime/pages/login.vue +7 -0
- package/src/runtime/types/list.ts +64 -0
- package/CHANGELOG.md +0 -177
- package/LICENSE.md +0 -20
- package/assets/mixins.scss +0 -22
- package/assets/variables.scss +0 -18
- package/components/ConfirmDialog.vue +0 -152
- package/components/Detail/Detail.vue +0 -566
- package/components/Detail/DetailField.vue +0 -142
- package/components/Detail/DetailLangSwitch.vue +0 -72
- package/components/Detail/defaults.js +0 -57
- package/components/DropArea.vue +0 -250
- package/components/List/List.vue +0 -254
- package/components/List/ListActions.vue +0 -164
- package/components/List/ListFilters.vue +0 -334
- package/components/List/ListHead.vue +0 -67
- package/components/List/ListQuickEdit.vue +0 -302
- package/components/List/ListTable.vue +0 -406
- package/components/List/ListTabs.vue +0 -65
- package/components/Login.vue +0 -124
- package/components/Logo.vue +0 -79
- package/components/LogoutButton.vue +0 -39
- package/components/MediaManager/MediaEditor.vue +0 -309
- package/components/MediaManager/MediaFolders.vue +0 -263
- package/components/MediaManager/MediaGallery.vue +0 -206
- package/components/MediaManager/MediaManager.vue +0 -233
- package/components/MediaManager/MediaManagerDialog.vue +0 -96
- package/components/MediaManager/MediaPreview.vue +0 -180
- package/components/MediaManager/MediaUploader.vue +0 -165
- package/components/RootComponents.vue +0 -25
- package/components/SnackBar.vue +0 -70
- package/components/fields/DateField.vue +0 -74
- package/components/fields/FksField.vue +0 -60
- package/components/fields/MediaField.vue +0 -213
- package/components/fields/MediaM2mField.vue +0 -243
- package/components/fields/SeoPreview.vue +0 -89
- package/components/fields/wygEditor/defaults.js +0 -55
- package/components/fields/wygEditor/utils/events.js +0 -64
- package/components/fields/wygEditor/utils/mapomedia.plugin.js +0 -31
- package/components/fields/wygEditor/utils/script.injector.js +0 -29
- package/components/fields/wygEditor/wygEditor.vue +0 -196
- package/components/layout/Sidebar/Sidebar.vue +0 -80
- package/components/layout/Sidebar/SidebarFooter.vue +0 -71
- package/components/layout/Sidebar/SidebarList.vue +0 -44
- package/components/layout/Sidebar/SidebarListItem.vue +0 -144
- package/components/layout/Topbar/Topbar.vue +0 -27
- package/components/layout/routebuilder.js +0 -48
- package/defaults.js +0 -29
- package/layouts/default.vue +0 -21
- package/layouts/empty.vue +0 -6
- package/layouts/error.vue +0 -45
- package/module.js +0 -78
- package/pages/index.vue +0 -35
- package/pages/login.vue +0 -10
- 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
package/static/favicon.ico
DELETED
|
Binary file
|