@mapomodule/uikit 1.0.0 → 2.0.0-beta.10
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 +199 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/module.d.mts +60 -0
- package/dist/module.d.ts +55 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +179 -0
- package/dist/runtime/adapters/defaultMediaAdapter.d.ts +14 -0
- package/dist/runtime/adapters/defaultMediaAdapter.d.ts.map +1 -0
- package/dist/runtime/adapters/defaultMediaAdapter.js +30 -0
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/components/MapoConfirmDialog.vue +35 -0
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDetail.vue +606 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts +401 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDropArea.vue +99 -0
- package/dist/runtime/components/MapoDropArea.vue.d.ts +33 -0
- package/dist/runtime/components/MapoDropArea.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLangSwitcher.vue +39 -0
- package/dist/runtime/components/MapoLangSwitcher.vue.d.ts +18 -0
- package/dist/runtime/components/MapoLangSwitcher.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoList.vue +191 -0
- package/dist/runtime/components/MapoList.vue.d.ts +111 -0
- package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListActions.vue +119 -0
- package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
- package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListFilters.vue +246 -0
- package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
- package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListHead.vue +9 -0
- package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
- package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListQuickEdit.vue +123 -0
- package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
- package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListTable.vue +665 -0
- package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
- package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListTabs.vue +38 -0
- package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
- package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLogin.vue +196 -0
- package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
- package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLogoutButton.vue +27 -0
- package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
- package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaBreadcrumbs.vue +47 -0
- package/dist/runtime/components/MapoMediaBreadcrumbs.vue.d.ts +4 -0
- package/dist/runtime/components/MapoMediaBreadcrumbs.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaEditor.vue +320 -0
- package/dist/runtime/components/MapoMediaEditor.vue.d.ts +8 -0
- package/dist/runtime/components/MapoMediaEditor.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaFileChanger.vue +112 -0
- package/dist/runtime/components/MapoMediaFileChanger.vue.d.ts +15 -0
- package/dist/runtime/components/MapoMediaFileChanger.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaFolders.vue +220 -0
- package/dist/runtime/components/MapoMediaFolders.vue.d.ts +4 -0
- package/dist/runtime/components/MapoMediaFolders.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaGallery.vue +219 -0
- package/dist/runtime/components/MapoMediaGallery.vue.d.ts +4 -0
- package/dist/runtime/components/MapoMediaGallery.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaManager.vue +140 -0
- package/dist/runtime/components/MapoMediaManager.vue.d.ts +35 -0
- package/dist/runtime/components/MapoMediaManager.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaManagerDialog.vue +116 -0
- package/dist/runtime/components/MapoMediaManagerDialog.vue.d.ts +41 -0
- package/dist/runtime/components/MapoMediaManagerDialog.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaPreview.vue +92 -0
- package/dist/runtime/components/MapoMediaPreview.vue.d.ts +19 -0
- package/dist/runtime/components/MapoMediaPreview.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMediaUploader.vue +290 -0
- package/dist/runtime/components/MapoMediaUploader.vue.d.ts +8 -0
- package/dist/runtime/components/MapoMediaUploader.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuManager.vue +273 -0
- package/dist/runtime/components/MapoMenuManager.vue.d.ts +92 -0
- package/dist/runtime/components/MapoMenuManager.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuNodeEditor.vue +201 -0
- package/dist/runtime/components/MapoMenuNodeEditor.vue.d.ts +61 -0
- package/dist/runtime/components/MapoMenuNodeEditor.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuTreeview.vue +181 -0
- package/dist/runtime/components/MapoMenuTreeview.vue.d.ts +57 -0
- package/dist/runtime/components/MapoMenuTreeview.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoMenuTreeviewNode.vue +175 -0
- package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts +27 -0
- package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoRootComponents.vue +9 -0
- package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
- package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebar.vue +89 -0
- package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
- package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarList.vue +27 -0
- package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
- package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
- package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
- package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarProfile.vue +55 -0
- package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
- package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSnackBar.vue +38 -0
- package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
- package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoThemeToggle.vue +23 -0
- package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
- package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoTopbar.vue +30 -0
- package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
- package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
- package/dist/runtime/components/menuDndContext.d.ts +19 -0
- package/dist/runtime/components/menuDndContext.d.ts.map +1 -0
- package/dist/runtime/components/menuDndContext.js +3 -0
- package/dist/runtime/layouts/default.vue +43 -0
- package/dist/runtime/layouts/default.vue.d.ts +20 -0
- package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
- package/dist/runtime/layouts/empty.vue +9 -0
- package/dist/runtime/layouts/empty.vue.d.ts +14 -0
- package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
- package/dist/runtime/page-meta.nuxt.d.ts +45 -0
- package/dist/runtime/pages/index.vue +14 -0
- package/dist/runtime/pages/index.vue.d.ts +4 -0
- package/dist/runtime/pages/index.vue.d.ts.map +1 -0
- package/dist/runtime/pages/login.vue +3 -0
- package/dist/runtime/pages/login.vue.d.ts +4 -0
- package/dist/runtime/pages/login.vue.d.ts.map +1 -0
- package/dist/runtime/plugins/media-adapter.d.ts +18 -0
- package/dist/runtime/plugins/media-adapter.d.ts.map +1 -0
- package/dist/runtime/plugins/media-adapter.js +8 -0
- package/dist/runtime/stores/media.d.ts +462 -0
- package/dist/runtime/stores/media.d.ts.map +1 -0
- package/dist/runtime/stores/media.js +344 -0
- package/dist/runtime/types/list.d.ts +59 -0
- package/dist/runtime/types/list.d.ts.map +1 -0
- package/dist/runtime/types/list.js +0 -0
- package/dist/runtime/types/media.d.ts +116 -0
- package/dist/runtime/types/media.d.ts.map +1 -0
- package/dist/runtime/types/media.js +0 -0
- package/dist/runtime/types/menu.d.ts +66 -0
- package/dist/runtime/types/menu.d.ts.map +1 -0
- package/dist/runtime/types/menu.js +30 -0
- package/dist/types.d.mts +9 -0
- package/package.json +67 -12
- package/src/index.ts +30 -0
- package/src/module.ts +311 -0
- package/src/runtime/adapters/defaultMediaAdapter.ts +57 -0
- package/src/runtime/assets/main.css +59 -0
- package/src/runtime/components/MapoConfirmDialog.vue +36 -0
- package/src/runtime/components/MapoDetail.vue +864 -0
- package/src/runtime/components/MapoDetailLangSwitch.vue +166 -0
- package/src/runtime/components/MapoDropArea.vue +127 -0
- package/src/runtime/components/MapoLangSwitcher.vue +74 -0
- package/src/runtime/components/MapoList.vue +339 -0
- package/src/runtime/components/MapoListActions.vue +158 -0
- package/src/runtime/components/MapoListFilters.vue +292 -0
- package/src/runtime/components/MapoListHead.vue +12 -0
- package/src/runtime/components/MapoListQuickEdit.vue +166 -0
- package/src/runtime/components/MapoListTable.vue +931 -0
- package/src/runtime/components/MapoListTabs.vue +48 -0
- package/src/runtime/components/MapoLogin.vue +212 -0
- package/src/runtime/components/MapoLogoutButton.vue +48 -0
- package/src/runtime/components/MapoMediaBreadcrumbs.vue +53 -0
- package/src/runtime/components/MapoMediaEditor.vue +350 -0
- package/src/runtime/components/MapoMediaFileChanger.vue +136 -0
- package/src/runtime/components/MapoMediaFolders.vue +239 -0
- package/src/runtime/components/MapoMediaGallery.vue +239 -0
- package/src/runtime/components/MapoMediaManager.vue +180 -0
- package/src/runtime/components/MapoMediaManagerDialog.vue +148 -0
- package/src/runtime/components/MapoMediaPreview.vue +111 -0
- package/src/runtime/components/MapoMediaUploader.vue +351 -0
- package/src/runtime/components/MapoMenuManager.vue +402 -0
- package/src/runtime/components/MapoMenuNodeEditor.vue +282 -0
- package/src/runtime/components/MapoMenuTreeview.vue +264 -0
- package/src/runtime/components/MapoMenuTreeviewNode.vue +234 -0
- package/src/runtime/components/MapoRootComponents.vue +9 -0
- package/src/runtime/components/MapoSidebar.vue +114 -0
- package/src/runtime/components/MapoSidebarList.vue +35 -0
- package/src/runtime/components/MapoSidebarListItem.vue +79 -0
- package/src/runtime/components/MapoSidebarProfile.vue +61 -0
- package/src/runtime/components/MapoSnackBar.vue +42 -0
- package/src/runtime/components/MapoThemeToggle.vue +27 -0
- package/src/runtime/components/MapoTopbar.vue +36 -0
- package/src/runtime/components/menuDndContext.ts +22 -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 +15 -0
- package/src/runtime/pages/login.vue +3 -0
- package/src/runtime/plugins/media-adapter.ts +33 -0
- package/src/runtime/stores/media.ts +474 -0
- package/src/runtime/types/list.ts +64 -0
- package/src/runtime/types/media.ts +126 -0
- package/src/runtime/types/menu.ts +105 -0
- package/CHANGELOG.md +0 -1030
- package/assets/mixins.scss +0 -22
- package/assets/variables.scss +0 -18
- package/components/ConfirmDialog.vue +0 -173
- package/components/Detail/Detail.vue +0 -696
- package/components/Detail/DetailLangSwitch.vue +0 -79
- package/components/DropArea.vue +0 -257
- package/components/Form/Form.vue +0 -218
- package/components/Form/FormField.vue +0 -216
- package/components/Form/FormGroup.vue +0 -146
- package/components/Form/FormTabs.vue +0 -188
- package/components/Form/defaults.js +0 -98
- package/components/Form/fields/ColorField.vue +0 -79
- package/components/Form/fields/DateField.vue +0 -77
- package/components/Form/fields/DateTimeField.vue +0 -271
- package/components/Form/fields/EnhancedMediaField.vue +0 -224
- package/components/Form/fields/FileField.vue +0 -125
- package/components/Form/fields/FksField.vue +0 -115
- package/components/Form/fields/MediaField.vue +0 -159
- package/components/Form/fields/MediaM2mField.vue +0 -149
- package/components/Form/fields/Repeater.vue +0 -618
- package/components/Form/fields/SeoPreview.vue +0 -89
- package/components/Form/fields/TimeField.vue +0 -154
- package/components/Form/fields/mapField/leaflet.injector.js +0 -39
- package/components/Form/fields/mapField/mapField.vue +0 -350
- package/components/Form/fields/wygEditor/defaults.js +0 -25
- package/components/Form/fields/wygEditor/utils/events.js +0 -64
- package/components/Form/fields/wygEditor/utils/mapomedia.plugin.js +0 -32
- package/components/Form/fields/wygEditor/utils/tinymce.injector.js +0 -29
- package/components/Form/fields/wygEditor/wygEditor.vue +0 -285
- package/components/Form/fields/wygEditorCKE/defaults.js +0 -103
- package/components/Form/fields/wygEditorCKE/utils/ckeditor.injector.js +0 -29
- package/components/Form/fields/wygEditorCKE/wygEditorCKE.vue +0 -270
- package/components/LangSwitcher.vue +0 -44
- package/components/List/List.vue +0 -271
- package/components/List/ListActions.vue +0 -164
- package/components/List/ListFilters.vue +0 -372
- package/components/List/ListHead.vue +0 -67
- package/components/List/ListQuickEdit.vue +0 -228
- package/components/List/ListTable.vue +0 -484
- package/components/List/ListTabs.vue +0 -65
- package/components/Login.vue +0 -125
- package/components/Logo.vue +0 -79
- package/components/LogoutButton.vue +0 -54
- package/components/MediaManager/MediaBreadcrumbs.vue +0 -45
- package/components/MediaManager/MediaEditor.vue +0 -340
- package/components/MediaManager/MediaFileChanger.vue +0 -78
- package/components/MediaManager/MediaFolders.vue +0 -287
- package/components/MediaManager/MediaGallery.vue +0 -281
- package/components/MediaManager/MediaManager.vue +0 -159
- package/components/MediaManager/MediaManagerDialog.vue +0 -104
- package/components/MediaManager/MediaPreview.vue +0 -258
- package/components/MediaManager/MediaUploader.vue +0 -163
- package/components/MenuManager/MenuManager.vue +0 -332
- package/components/MenuManager/MenuNodeEditor.vue +0 -270
- package/components/MenuManager/MenuTreeview.vue +0 -237
- package/components/MenuManager/MenuTreeviewNode.vue +0 -208
- package/components/PagePreview.vue +0 -58
- package/components/RootComponents.vue +0 -25
- package/components/SnackBar.vue +0 -69
- package/components/ThemeToggle.vue +0 -13
- package/components/layout/Sidebar/Sidebar.vue +0 -89
- package/components/layout/Sidebar/SidebarList.vue +0 -49
- package/components/layout/Sidebar/SidebarListItem.vue +0 -185
- package/components/layout/Sidebar/SidebarProfile.vue +0 -42
- package/components/layout/Sidebar/SidebarTitle.vue +0 -45
- package/components/layout/Topbar/Topbar.vue +0 -29
- package/components/layout/routebuilder.js +0 -48
- package/defaults/i18n.js +0 -37
- package/defaults/vuetify.js +0 -34
- package/layouts/default.vue +0 -47
- package/layouts/empty.vue +0 -16
- package/module.js +0 -80
- package/pages/index.vue +0 -37
- package/pages/login.vue +0 -10
- package/static/mapo/ckeditor/plugins/image2/dev/assets/image1.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/dev/assets/image2.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/dev/contents.css +0 -35
- package/static/mapo/ckeditor/plugins/image2/dev/image2.html +0 -338
- package/static/mapo/ckeditor/plugins/image2/dialogs/image2.js +0 -557
- package/static/mapo/ckeditor/plugins/image2/icons/hidpi/image.png +0 -0
- package/static/mapo/ckeditor/plugins/image2/icons/image.png +0 -0
- package/static/mapo/ckeditor/plugins/image2/lang/af.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ar.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/az.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/bg.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/bn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/bs.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ca.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/cs.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/cy.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/da.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/de-ch.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/de.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/el.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en-au.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en-ca.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en-gb.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/en.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/eo.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/es-mx.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/es.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/et.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/eu.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fa.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fi.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fo.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fr-ca.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/fr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/gl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/gu.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/he.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/hi.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/hr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/hu.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/id.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/is.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/it.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ja.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ka.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/km.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ko.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ku.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/lt.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/lv.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/mk.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/mn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ms.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/nb.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/nl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/no.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/oc.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/pl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/pt-br.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/pt.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ro.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ru.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/si.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sk.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sl.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sq.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sr-latn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/sv.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/th.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/tr.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/tt.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/ug.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/uk.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/vi.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/zh-cn.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/lang/zh.js +0 -21
- package/static/mapo/ckeditor/plugins/image2/plugin.js +0 -1798
- package/static/mapo/ckeditor/plugins/image2/samples/assets/image1.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/samples/assets/image2.jpg +0 -0
- package/static/mapo/ckeditor/plugins/image2/samples/image2.html +0 -68
- package/static/mapo/ckeditor/skins/moono/dev/icons16.png +0 -0
- package/static/mapo/ckeditor/skins/moono/dev/icons16.svg +0 -2374
- package/static/mapo/ckeditor/skins/moono/dev/icons32.png +0 -0
- package/static/mapo/ckeditor/skins/moono/dev/icons32.svg +0 -2722
- package/static/mapo/ckeditor/skins/moono/dev/locations.json +0 -144
- package/static/mapo/ckeditor/skins/moono/dialog.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono/dialog_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_gecko.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono/editor_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono/icons.png +0 -0
- package/static/mapo/ckeditor/skins/moono/icons_hidpi.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/anchor.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/arrow.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono/images/spinner.gif +0 -0
- package/static/mapo/ckeditor/skins/moono/readme.md +0 -49
- package/static/mapo/ckeditor/skins/moono/skin.js +0 -10
- package/static/mapo/ckeditor/skins/moono-dark/dialog.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/dialog_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_gecko.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_ie.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_ie7.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_ie8.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/editor_iequirks.css +0 -5
- package/static/mapo/ckeditor/skins/moono-dark/icons.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/icons_hidpi.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/arrow.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/close.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/hidpi/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/lock-open.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/lock.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/images/refresh.png +0 -0
- package/static/mapo/ckeditor/skins/moono-dark/readme.md +0 -51
- package/static/mapo/ckeditor/skins/moono-dark/skin.js +0 -5
- package/static/mapo/favicon.ico +0 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/content.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/content.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/skin.min.css +0 -7
- package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +0 -7
- package/translations/en-US.js +0 -177
- package/translations/it-IT.js +0 -180
package/package.json
CHANGED
|
@@ -1,19 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/uikit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.10",
|
|
4
|
+
"description": "Mapo UI components: Sidebar, Topbar, Login, SnackBar, ConfirmDialog, List, Detail, Media",
|
|
5
|
+
"type": "module",
|
|
4
6
|
"license": "MIT",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"repository":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
7
|
+
"author": "Lotrek Agency (https://lotrek.it)",
|
|
8
|
+
"homepage": "https://lotrekagency.github.io/mapo-new/",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/lotrekagency/mapo-new.git",
|
|
12
|
+
"directory": "packages/@mapomodule/uikit"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/lotrekagency/mapo-new/issues"
|
|
14
16
|
},
|
|
15
17
|
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
18
|
+
"access": "public",
|
|
19
|
+
"tag": "next"
|
|
20
|
+
},
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/module.d.mts",
|
|
24
|
+
"import": "./dist/module.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./types": {
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"import": "./dist/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./runtime/*": {
|
|
31
|
+
"types": "./src/runtime/*.ts",
|
|
32
|
+
"import": "./dist/runtime/*.js",
|
|
33
|
+
"default": "./src/runtime/*"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"src"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "nuxt-module-build build && vue-tsc -p tsconfig.build-types.json && node ../../../scripts/clean-empty-vue-dts.mjs dist",
|
|
42
|
+
"dev": "nuxt-module-build build --stub --watch",
|
|
43
|
+
"dev:prepare": "nuxt-module-build build --stub",
|
|
44
|
+
"typecheck": "vue-tsc --noEmit",
|
|
45
|
+
"lint": "eslint src"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@mapomodule/form": "2.0.0-beta.8",
|
|
49
|
+
"@mapomodule/i18n": "2.0.0-beta.2",
|
|
50
|
+
"@mapomodule/store": "2.0.0-beta.5",
|
|
51
|
+
"@mapomodule/utils": "2.0.0-beta.3",
|
|
52
|
+
"@mapomodule/core": "2.0.0-beta.7",
|
|
53
|
+
"tailwindcss": "^4.0.0",
|
|
54
|
+
"vue-draggable-plus": "^0.6.0",
|
|
55
|
+
"vue-i18n": "^11.4.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@nuxt/ui": ">=4.0.0",
|
|
59
|
+
"nuxt": ">=4.0.0",
|
|
60
|
+
"pinia": ">=3.0.0"
|
|
17
61
|
},
|
|
18
|
-
"
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@nuxt/kit": "4.4.2",
|
|
64
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
65
|
+
"@nuxt/schema": "4.4.2",
|
|
66
|
+
"@nuxt/ui": "^4.7.0",
|
|
67
|
+
"@tanstack/vue-table": "^8.21.3",
|
|
68
|
+
"nuxt": "^4.5.1",
|
|
69
|
+
"pinia": "^3.0.4",
|
|
70
|
+
"vue": "^3.5.40",
|
|
71
|
+
"vue-router": "^5.2.0",
|
|
72
|
+
"vue-tsc": "^3.3.4"
|
|
73
|
+
}
|
|
19
74
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type { MapoUikitOptions } from "./module";
|
|
2
|
+
export type {
|
|
3
|
+
ListColumn,
|
|
4
|
+
FilterChoice,
|
|
5
|
+
FilterDescriptor,
|
|
6
|
+
ActiveFilter,
|
|
7
|
+
ActionContext,
|
|
8
|
+
ActionDescriptor,
|
|
9
|
+
ListTabItem,
|
|
10
|
+
} from "./runtime/types/list.js";
|
|
11
|
+
export type {
|
|
12
|
+
MediaItem,
|
|
13
|
+
MediaFolder,
|
|
14
|
+
MediaApiResponse,
|
|
15
|
+
MediaGetRootParams,
|
|
16
|
+
MediaUploadPayload,
|
|
17
|
+
SelectMode,
|
|
18
|
+
} from "./runtime/types/media.js";
|
|
19
|
+
export type {
|
|
20
|
+
MapoMenu,
|
|
21
|
+
MenuTreeNode,
|
|
22
|
+
MenuNodeLink,
|
|
23
|
+
MenuTranslation,
|
|
24
|
+
} from "./runtime/types/menu.js";
|
|
25
|
+
export {
|
|
26
|
+
createMenuNode,
|
|
27
|
+
menuTreeDepth,
|
|
28
|
+
findMenuNode,
|
|
29
|
+
removeMenuNode,
|
|
30
|
+
} from "./runtime/types/menu.js";
|
package/src/module.ts
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import {
|
|
4
|
+
defineNuxtModule,
|
|
5
|
+
addComponent,
|
|
6
|
+
addLayout,
|
|
7
|
+
addPlugin,
|
|
8
|
+
addImports,
|
|
9
|
+
addTypeTemplate,
|
|
10
|
+
createResolver,
|
|
11
|
+
extendPages,
|
|
12
|
+
hasNuxtModule,
|
|
13
|
+
installModule,
|
|
14
|
+
} from "@nuxt/kit";
|
|
15
|
+
import type { NuxtModule } from "@nuxt/schema";
|
|
16
|
+
|
|
17
|
+
export interface MapoUikitOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Path to a CSS file that is injected after the base uikit CSS.
|
|
20
|
+
* Use it to override Tailwind theme tokens or add global styles.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* nuxt.config.ts
|
|
24
|
+
* mapoUikit: { css: '~/assets/css/theme.css' }
|
|
25
|
+
*
|
|
26
|
+
* assets/css/theme.css
|
|
27
|
+
* @import "@nuxt/ui";
|
|
28
|
+
* :root {
|
|
29
|
+
* --color-primary-500: oklch(0.7 0.2 240);
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
css?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Default Nuxt UI component config merged into nuxt.options.ui.
|
|
36
|
+
* Deep-merged so the consuming app can override individual keys.
|
|
37
|
+
* @see https://ui.nuxt.com/getting-started/theme
|
|
38
|
+
*/
|
|
39
|
+
ui?: Record<string, unknown>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Media Manager configuration. Endpoints and upload limits are
|
|
43
|
+
* forwarded to `runtimeConfig.public.mapoMedia` and read by `useMediaStore`.
|
|
44
|
+
*/
|
|
45
|
+
media?: MapoMediaOptions;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface MapoMediaOptions {
|
|
49
|
+
/**
|
|
50
|
+
* REST endpoints used by the media store.
|
|
51
|
+
* Defaults align with the Camomilla integration path-rewrites.
|
|
52
|
+
*/
|
|
53
|
+
endpoints?: {
|
|
54
|
+
/** Single-media CRUD (detail, update, delete, upload). Default `/api/media`. */
|
|
55
|
+
media?: string;
|
|
56
|
+
/** Folder navigation + CRUD. Default `/api/media-folders`. */
|
|
57
|
+
folders?: string;
|
|
58
|
+
};
|
|
59
|
+
/** Max image upload size in MB. Default 10. */
|
|
60
|
+
maxImageSize?: number;
|
|
61
|
+
/** Max video upload size in MB. Default 100. */
|
|
62
|
+
maxVideoSize?: number;
|
|
63
|
+
/** Max size for any other file type in MB. Default 10. */
|
|
64
|
+
maxDefaultSize?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Django model used for media permission checks (`change_<model>`,
|
|
67
|
+
* `delete_<model>`) in the editor. Default `"media"`.
|
|
68
|
+
*/
|
|
69
|
+
permissionsModel?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const MAPO_MEDIA_DEFAULTS = {
|
|
73
|
+
endpoints: {
|
|
74
|
+
media: "/api/media",
|
|
75
|
+
folders: "/api/media-folders",
|
|
76
|
+
},
|
|
77
|
+
maxImageSize: 10,
|
|
78
|
+
maxVideoSize: 100,
|
|
79
|
+
maxDefaultSize: 10,
|
|
80
|
+
permissionsModel: "media",
|
|
81
|
+
} satisfies Required<MapoMediaOptions>;
|
|
82
|
+
|
|
83
|
+
export default defineNuxtModule<MapoUikitOptions>({
|
|
84
|
+
meta: {
|
|
85
|
+
name: "@mapomodule/uikit",
|
|
86
|
+
configKey: "mapoUikit",
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
defaults: {
|
|
90
|
+
ui: {},
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// @nuxt/ui must be declared BEFORE mapomodule in the consuming app's modules[]
|
|
94
|
+
// so that @nuxt/icon's Icon component is available in SSR. Installing it via
|
|
95
|
+
// installModule() from inside another module causes an SSR Icon infinite loop.
|
|
96
|
+
moduleDependencies: {
|
|
97
|
+
"@nuxt/ui": {},
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
async setup(options, nuxt) {
|
|
101
|
+
const resolver = createResolver(import.meta.url);
|
|
102
|
+
|
|
103
|
+
// In consuming apps this runtime lives inside node_modules, where Nuxt
|
|
104
|
+
// skips auto-import injection by default (workspace apps are unaffected:
|
|
105
|
+
// pnpm symlinks resolve outside node_modules). Opt back in and transpile
|
|
106
|
+
// the runtime for the SSR build.
|
|
107
|
+
nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
|
|
108
|
+
nuxt.options.imports.transform ??= {};
|
|
109
|
+
(nuxt.options.imports.transform.include ??= []).push(
|
|
110
|
+
/@mapomodule[\\/]uikit[\\/]/,
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
// UIKit components render every user-facing string through vue-i18n
|
|
114
|
+
// (`useI18n().t("mapo...")`). @mapomodule/i18n provides the catalogs and
|
|
115
|
+
// installs @nuxtjs/i18n unless the app manages it itself.
|
|
116
|
+
if (!hasNuxtModule("@mapomodule/i18n")) {
|
|
117
|
+
await installModule(await resolver.resolvePath("@mapomodule/i18n"));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
addTypeTemplate({
|
|
121
|
+
filename: "types/mapo-uikit-page-meta.d.ts",
|
|
122
|
+
getContents: () =>
|
|
123
|
+
readFileSync(
|
|
124
|
+
resolver.resolve("./runtime/page-meta.nuxt.d.ts"),
|
|
125
|
+
"utf-8",
|
|
126
|
+
),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// Base CSS: Tailwind v4 entry + Nuxt UI design tokens
|
|
130
|
+
nuxt.options.css.unshift(resolver.resolve("./runtime/assets/main.css"));
|
|
131
|
+
|
|
132
|
+
// Allow Vite to serve files from this package when consumed outside its workspace root
|
|
133
|
+
nuxt.options.vite.server ??= {};
|
|
134
|
+
nuxt.options.vite.server.fs ??= {};
|
|
135
|
+
nuxt.options.vite.server.fs.allow ??= [];
|
|
136
|
+
nuxt.options.vite.server.fs.allow.push(resolver.resolve("."));
|
|
137
|
+
|
|
138
|
+
// Custom theme override CSS (injected after base so it wins)
|
|
139
|
+
if (options.css) {
|
|
140
|
+
nuxt.options.css.push(options.css);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Merge module-level ui config into nuxt.options so consuming apps
|
|
144
|
+
// can override Nuxt UI component defaults from the mapoUikit config key.
|
|
145
|
+
if (options.ui && Object.keys(options.ui).length) {
|
|
146
|
+
// @ts-expect-error — nuxt.options.ui typed by @nuxt/ui augmentation at app build time
|
|
147
|
+
nuxt.options.ui = { ...options.ui, ...(nuxt.options.ui ?? {}) };
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Media config → runtimeConfig.public.mapoMedia (read by useMediaStore + uploader).
|
|
151
|
+
// Only serializable values; the adapter functions go through the plugin below.
|
|
152
|
+
const media = options.media ?? {};
|
|
153
|
+
nuxt.options.runtimeConfig.public.mapoMedia = {
|
|
154
|
+
endpoints: {
|
|
155
|
+
media: media.endpoints?.media ?? MAPO_MEDIA_DEFAULTS.endpoints.media,
|
|
156
|
+
folders:
|
|
157
|
+
media.endpoints?.folders ?? MAPO_MEDIA_DEFAULTS.endpoints.folders,
|
|
158
|
+
},
|
|
159
|
+
maxImageSize: media.maxImageSize ?? MAPO_MEDIA_DEFAULTS.maxImageSize,
|
|
160
|
+
maxVideoSize: media.maxVideoSize ?? MAPO_MEDIA_DEFAULTS.maxVideoSize,
|
|
161
|
+
maxDefaultSize:
|
|
162
|
+
media.maxDefaultSize ?? MAPO_MEDIA_DEFAULTS.maxDefaultSize,
|
|
163
|
+
permissionsModel:
|
|
164
|
+
media.permissionsModel ?? MAPO_MEDIA_DEFAULTS.permissionsModel,
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const components = [
|
|
168
|
+
// ─── Shell / Layout ───────────────────────────────────────────────────
|
|
169
|
+
"MapoSnackBar",
|
|
170
|
+
"MapoConfirmDialog",
|
|
171
|
+
"MapoLogin",
|
|
172
|
+
"MapoRootComponents",
|
|
173
|
+
"MapoSidebar",
|
|
174
|
+
"MapoSidebarList",
|
|
175
|
+
"MapoSidebarListItem",
|
|
176
|
+
"MapoLogoutButton",
|
|
177
|
+
"MapoSidebarProfile",
|
|
178
|
+
"MapoTopbar",
|
|
179
|
+
"MapoLangSwitcher",
|
|
180
|
+
"MapoThemeToggle",
|
|
181
|
+
// ─── CRUD / Detail / List ─────────────────────────────────────────────
|
|
182
|
+
"MapoDetail",
|
|
183
|
+
"MapoDetailLangSwitch",
|
|
184
|
+
"MapoList",
|
|
185
|
+
"MapoListHead",
|
|
186
|
+
"MapoListTabs",
|
|
187
|
+
"MapoListFilters",
|
|
188
|
+
"MapoListActions",
|
|
189
|
+
"MapoListQuickEdit",
|
|
190
|
+
"MapoListTable",
|
|
191
|
+
// ─── Media ───────────────────────────────────────────────────────────
|
|
192
|
+
"MapoDropArea",
|
|
193
|
+
"MapoMediaBreadcrumbs",
|
|
194
|
+
"MapoMediaFolders",
|
|
195
|
+
"MapoMediaGallery",
|
|
196
|
+
"MapoMediaFileChanger",
|
|
197
|
+
"MapoMediaEditor",
|
|
198
|
+
"MapoMediaUploader",
|
|
199
|
+
"MapoMediaManager",
|
|
200
|
+
"MapoMediaManagerDialog",
|
|
201
|
+
// ─── Menu Manager ─────────────────────────────────────────────────────
|
|
202
|
+
"MapoMenuTreeviewNode",
|
|
203
|
+
"MapoMenuTreeview",
|
|
204
|
+
"MapoMenuNodeEditor",
|
|
205
|
+
"MapoMenuManager",
|
|
206
|
+
];
|
|
207
|
+
|
|
208
|
+
for (const name of components) {
|
|
209
|
+
addComponent({
|
|
210
|
+
name,
|
|
211
|
+
filePath: resolver.resolve(`./runtime/components/${name}.vue`),
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Registered as `global` so they survive runtime lookup from *another*
|
|
216
|
+
// package: the media fields in @mapomodule/form resolve the dialog by name
|
|
217
|
+
// (see useMediaManager) and render the preview in their templates. Nuxt's
|
|
218
|
+
// build-time auto-import only covers templates it scans, so a non-global
|
|
219
|
+
// registration resolves to nothing once the caller lives outside uikit.
|
|
220
|
+
for (const name of ["MapoMediaManagerDialog", "MapoMediaPreview"]) {
|
|
221
|
+
addComponent({
|
|
222
|
+
name,
|
|
223
|
+
global: true,
|
|
224
|
+
filePath: resolver.resolve(`./runtime/components/${name}.vue`),
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
addLayout(
|
|
229
|
+
{ src: resolver.resolve("./runtime/layouts/default.vue") },
|
|
230
|
+
"mapo-default",
|
|
231
|
+
);
|
|
232
|
+
addLayout(
|
|
233
|
+
{ src: resolver.resolve("./runtime/layouts/empty.vue") },
|
|
234
|
+
"mapo-empty",
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
// Ensure @nuxt/icon bundles lucide icons regardless of hoisting detection.
|
|
238
|
+
// Without this, in monorepo setups pnpm may hoist @iconify-json/lucide to the
|
|
239
|
+
// workspace root and @nuxt/icon fails to detect it as a local package.
|
|
240
|
+
nuxt.hook("modules:done", () => {
|
|
241
|
+
// icon options are typed by @nuxt/icon's NuxtOptions augmentation at app build time.
|
|
242
|
+
// Cast to any to avoid TS errors in the uikit package which doesn't depend on @nuxt/icon directly.
|
|
243
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
244
|
+
const iconOpts = nuxt.options as any;
|
|
245
|
+
iconOpts.icon ??= {};
|
|
246
|
+
iconOpts.icon.serverBundle ??= {};
|
|
247
|
+
const existing: string[] = iconOpts.icon.serverBundle.collections ?? [];
|
|
248
|
+
iconOpts.icon.serverBundle.collections = Array.from(
|
|
249
|
+
new Set([...existing, "lucide"]),
|
|
250
|
+
);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// NOTE: the `media` / `media-m2m` / `enhanced-media` field components live in
|
|
254
|
+
// @mapomodule/form with every other field type and are registered in its
|
|
255
|
+
// default registry. They resolve the picker dialog below at runtime.
|
|
256
|
+
|
|
257
|
+
// Plugin: provide the default $mapoMediaAdapter. Integrations register their
|
|
258
|
+
// own plugin ordered after this one to override request/response transforms.
|
|
259
|
+
addPlugin({
|
|
260
|
+
src: resolver.resolve("./runtime/plugins/media-adapter"),
|
|
261
|
+
order: 5,
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// Auto-import useMediaStore so consumers can use it without explicit imports
|
|
265
|
+
addImports([
|
|
266
|
+
{
|
|
267
|
+
name: "useMediaStore",
|
|
268
|
+
from: resolver.resolve("./runtime/stores/media"),
|
|
269
|
+
},
|
|
270
|
+
]);
|
|
271
|
+
|
|
272
|
+
// MapoOverride* system: if the consuming app has a `mapooverride/` directory
|
|
273
|
+
// inside its srcDir, any .vue file named like a Mapo component will replace it
|
|
274
|
+
// at build time. Convention: MapoTopbar.vue overrides MapoTopbar, etc.
|
|
275
|
+
nuxt.hook("components:extend", (components) => {
|
|
276
|
+
const overrideDir = resolve(nuxt.options.srcDir, "mapooverride");
|
|
277
|
+
if (!existsSync(overrideDir)) return;
|
|
278
|
+
for (const component of components) {
|
|
279
|
+
// Component type from @nuxt/schema doesn't expose name/filePath/shortPath directly
|
|
280
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
281
|
+
const c = component as any;
|
|
282
|
+
const overridePath = resolve(overrideDir, `${c.name}.vue`);
|
|
283
|
+
if (existsSync(overridePath)) {
|
|
284
|
+
c.filePath = overridePath;
|
|
285
|
+
c.shortPath = `mapooverride/${c.name}.vue`;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
extendPages((pages) => {
|
|
291
|
+
// Add a catch-all route for the login page that renders the MapoLogin component.
|
|
292
|
+
// This allows the login page to be rendered without requiring the consuming app
|
|
293
|
+
// to create its own login page and route.
|
|
294
|
+
if (!pages.some((p) => p.path === "/login"))
|
|
295
|
+
pages.push({
|
|
296
|
+
name: "mapo-login",
|
|
297
|
+
path: "/login",
|
|
298
|
+
file: resolver.resolve("./runtime/pages/login.vue"),
|
|
299
|
+
meta: { layout: "mapo-empty" },
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
if (!pages.some((p) => p.path === "/"))
|
|
303
|
+
pages.push({
|
|
304
|
+
name: "mapo-index",
|
|
305
|
+
path: "/",
|
|
306
|
+
file: resolver.resolve("./runtime/pages/index.vue"),
|
|
307
|
+
meta: { layout: "mapo-default" },
|
|
308
|
+
});
|
|
309
|
+
});
|
|
310
|
+
},
|
|
311
|
+
}) satisfies NuxtModule<MapoUikitOptions>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
MediaAdapter,
|
|
3
|
+
MediaApiResponse,
|
|
4
|
+
MediaFolder,
|
|
5
|
+
MediaItem,
|
|
6
|
+
MediaListParamsContext,
|
|
7
|
+
} from "../types/media.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Default media adapter — plain REST semantics.
|
|
11
|
+
*
|
|
12
|
+
* - List/detail params: passes `page`, `search`, `all`, and `mime` as-is.
|
|
13
|
+
* - Response: assumes the backend already returns the canonical
|
|
14
|
+
* `{ media: { items, paginator }, folders, parent_folder }` shape.
|
|
15
|
+
* - Detail params: passes `language_code` when a language is active.
|
|
16
|
+
*
|
|
17
|
+
* Integrations override any subset of these via their own `$mapoMediaAdapter`
|
|
18
|
+
* plugin (see `@mapomodule/mapo-integrations-camomilla`).
|
|
19
|
+
*/
|
|
20
|
+
export const defaultMediaAdapter: Required<MediaAdapter> = {
|
|
21
|
+
buildListParams(ctx: MediaListParamsContext): Record<string, unknown> {
|
|
22
|
+
const params: Record<string, unknown> = {};
|
|
23
|
+
if (ctx.page != null) params.page = ctx.page;
|
|
24
|
+
if (ctx.search) params.search = ctx.search;
|
|
25
|
+
if (ctx.all) params.all = true;
|
|
26
|
+
if (ctx.mime) params.mime = ctx.mime;
|
|
27
|
+
return params;
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
parseRootResponse(raw: unknown): MediaApiResponse {
|
|
31
|
+
return raw as MediaApiResponse;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
buildDetailParams(ctx: { lang?: string }): Record<string, unknown> {
|
|
35
|
+
return ctx.lang ? { language_code: ctx.lang } : {};
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
buildFolderPayload(folder: Partial<MediaFolder>): Record<string, unknown> {
|
|
39
|
+
return { ...folder };
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
buildMediaPatchPayload(media: MediaItem): Record<string, unknown> {
|
|
43
|
+
return {
|
|
44
|
+
title: media.title,
|
|
45
|
+
alt_text: media.alt_text,
|
|
46
|
+
description: media.description,
|
|
47
|
+
translations: media.translations,
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
buildReplaceFilePayload(
|
|
52
|
+
file: File,
|
|
53
|
+
maintainUrl: boolean,
|
|
54
|
+
): Record<string, unknown> {
|
|
55
|
+
return { file, maintain_url: maintainUrl };
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "@nuxt/ui";
|
|
3
|
+
|
|
4
|
+
/* Explicitly scan uikit Vue sources so Tailwind v4 generates their utility classes
|
|
5
|
+
even when the package is resolved through node_modules symlinks. */
|
|
6
|
+
@source "../components/**/*.vue";
|
|
7
|
+
@source "../layouts/**/*.vue";
|
|
8
|
+
@source "../pages/**/*.vue";
|
|
9
|
+
|
|
10
|
+
/* Scan form package sources (symlinked via pnpm workspace).
|
|
11
|
+
Path: uikit/src/runtime/assets/ → ../../../../ → @mapomodule/ → form/... */
|
|
12
|
+
@source "../../../../form/src/runtime/components/**/*.vue";
|
|
13
|
+
@source "../../../../form/src/runtime/composables/**/*.ts";
|
|
14
|
+
|
|
15
|
+
/* Safelist: grid utilities used dynamically by the form engine.
|
|
16
|
+
Tailwind v4 does not scan template literals — these must be explicit. */
|
|
17
|
+
@source inline("col-span-1 col-span-2 col-span-3 col-span-4 col-span-5 col-span-6 col-span-7 col-span-8 col-span-9 col-span-10 col-span-11 col-span-12");
|
|
18
|
+
@source inline("md:col-span-1 md:col-span-2 md:col-span-3 md:col-span-4 md:col-span-5 md:col-span-6 md:col-span-7 md:col-span-8 md:col-span-9 md:col-span-10 md:col-span-11 md:col-span-12");
|
|
19
|
+
@source inline("grid-cols-12");
|
|
20
|
+
@source inline("flex-1 min-h-0 h-full");
|
|
21
|
+
|
|
22
|
+
/* Expanded field panel — forces the entire chain to fill the available height */
|
|
23
|
+
.mapo-group-expand-body,
|
|
24
|
+
.mapo-group-expand-body > *,
|
|
25
|
+
.mapo-group-expand-body .mapo-form-field,
|
|
26
|
+
.mapo-group-expand-body .mapo-form-field > div {
|
|
27
|
+
flex: 1;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
}
|
|
30
|
+
/* The NuxtUI root wrapper (div root of UTextarea / UInput) must stretch */
|
|
31
|
+
.mapo-group-expand-body textarea,
|
|
32
|
+
.mapo-group-expand-body [contenteditable] {
|
|
33
|
+
height: 100% !important;
|
|
34
|
+
overflow-y: auto !important;
|
|
35
|
+
resize: none !important;
|
|
36
|
+
}
|
|
37
|
+
/* NuxtUI root wrapper (usually .relative or [data-slot]) */
|
|
38
|
+
.mapo-group-expand-body .mapo-form-field > div > * {
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@layer base {
|
|
43
|
+
html,
|
|
44
|
+
body {
|
|
45
|
+
height: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:root {
|
|
49
|
+
/* Height of the topbar — used by MapoDetail sticky sidebar positioning.
|
|
50
|
+
Override in the consuming app if the topbar height differs from the default. */
|
|
51
|
+
--mapo-topbar-height: 56px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Extend height chain through #__nuxt and the UApp wrapper div */
|
|
55
|
+
#__nuxt,
|
|
56
|
+
#__nuxt > * {
|
|
57
|
+
height: 100%;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useI18n } from "vue-i18n";
|
|
3
|
+
import { useConfirmStore } from "@mapomodule/store/runtime/stores/confirm";
|
|
4
|
+
|
|
5
|
+
const { t } = useI18n();
|
|
6
|
+
const store = useConfirmStore();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<UModal v-model:open="store.active" :dismissible="false">
|
|
11
|
+
<template #content>
|
|
12
|
+
<div class="p-6 space-y-4">
|
|
13
|
+
<div class="space-y-1">
|
|
14
|
+
<h3 class="text-base font-semibold text-highlighted">
|
|
15
|
+
{{ store.options?.title ?? t("mapo.confirm") }}
|
|
16
|
+
</h3>
|
|
17
|
+
<p class="text-sm text-muted">
|
|
18
|
+
{{ store.options?.message }}
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="flex justify-end gap-3">
|
|
23
|
+
<UButton variant="ghost" color="neutral" @click="store.cancel()">
|
|
24
|
+
{{ store.options?.cancelText ?? t("mapo.cancel") }}
|
|
25
|
+
</UButton>
|
|
26
|
+
<UButton
|
|
27
|
+
:color="store.options?.dangerous ? 'error' : 'primary'"
|
|
28
|
+
@click="store.confirm()"
|
|
29
|
+
>
|
|
30
|
+
{{ store.options?.confirmText ?? t("mapo.confirm") }}
|
|
31
|
+
</UButton>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
</UModal>
|
|
36
|
+
</template>
|