@mapomodule/uikit 1.0.0 → 2.0.0-beta.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.
- package/README.md +167 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/module.d.mts +30 -0
- package/dist/module.d.ts +27 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +114 -0
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/components/MapoConfirmDialog.vue +33 -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 +598 -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/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 +112 -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 +244 -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 +119 -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 +660 -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 +193 -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 +25 -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/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 +87 -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 +51 -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 +19 -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/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 +13 -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 +7 -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/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/types.d.mts +9 -0
- package/package.json +63 -12
- 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 -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
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed, watch } from "vue";
|
|
3
|
+
import type {
|
|
4
|
+
FilterDescriptor,
|
|
5
|
+
ActiveFilter,
|
|
6
|
+
FilterChoice,
|
|
7
|
+
} from "../types/list.js";
|
|
8
|
+
|
|
9
|
+
const props = defineProps<{
|
|
10
|
+
filters: FilterDescriptor[];
|
|
11
|
+
modelValue: ActiveFilter[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
const emit = defineEmits<{ "update:modelValue": [value: ActiveFilter[]] }>();
|
|
16
|
+
|
|
17
|
+
defineSlots<{
|
|
18
|
+
/**
|
|
19
|
+
* Per-filter override slots. Bindings vary by slot; `filter` is always provided:
|
|
20
|
+
* - `filter.{value}` — full override (default = title + content)
|
|
21
|
+
* - `filter.{value}.title` — title override
|
|
22
|
+
* - `filter.{value}.content` — content override (choices / datepicker)
|
|
23
|
+
* - `filter.{value}.icon` — per-choice icon override (also receives `choice`)
|
|
24
|
+
*/
|
|
25
|
+
[K: `filter.${string}`]: (props: {
|
|
26
|
+
filter: FilterDescriptor & { dates?: string[] };
|
|
27
|
+
choice?: FilterChoice;
|
|
28
|
+
toggleChoice?: (filter: FilterDescriptor, choice: FilterChoice) => void;
|
|
29
|
+
removeFilter?: (filter: FilterDescriptor) => void;
|
|
30
|
+
isChoiceActive?: (
|
|
31
|
+
filter: FilterDescriptor,
|
|
32
|
+
choice: FilterChoice,
|
|
33
|
+
) => boolean;
|
|
34
|
+
}) => any;
|
|
35
|
+
}>();
|
|
36
|
+
|
|
37
|
+
// Local copy of the filter descriptors with reactive date arrays for datepicker fields
|
|
38
|
+
const localFilters = ref<FilterDescriptor[]>([]);
|
|
39
|
+
const activeFilters = ref<ActiveFilter[]>([]);
|
|
40
|
+
|
|
41
|
+
watch(
|
|
42
|
+
() => props.filters,
|
|
43
|
+
(val) => {
|
|
44
|
+
localFilters.value = val.map((f) => ({
|
|
45
|
+
...f,
|
|
46
|
+
dates: f.datepicker ? [] : undefined,
|
|
47
|
+
}));
|
|
48
|
+
applyDefaults();
|
|
49
|
+
},
|
|
50
|
+
{ immediate: true },
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
watch(
|
|
54
|
+
() => props.modelValue,
|
|
55
|
+
(val) => {
|
|
56
|
+
if (JSON.stringify(val) !== JSON.stringify(activeFilters.value)) {
|
|
57
|
+
activeFilters.value = val;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{ deep: true },
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
watch(activeFilters, (val) => emit("update:modelValue", val), { deep: true });
|
|
64
|
+
|
|
65
|
+
function applyDefaults() {
|
|
66
|
+
localFilters.value.forEach((filter) => {
|
|
67
|
+
if (!filter.defaultChoice) return;
|
|
68
|
+
const choices = filter.choices ?? [];
|
|
69
|
+
filter.defaultChoice.split(",").forEach((dv) => {
|
|
70
|
+
const choice = choices.find((c) => String(c.value) === dv);
|
|
71
|
+
if (choice) toggleChoice(filter, choice);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function isChoiceActive(
|
|
77
|
+
filter: FilterDescriptor,
|
|
78
|
+
choice: FilterChoice,
|
|
79
|
+
): boolean {
|
|
80
|
+
const found = activeFilters.value.find((f) => f.value === filter.value);
|
|
81
|
+
return (found?.active ?? []).some((c) => c.value === choice.value);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function toggleChoice(filter: FilterDescriptor, choice: FilterChoice) {
|
|
85
|
+
const idx = activeFilters.value.findIndex((f) => f.value === filter.value);
|
|
86
|
+
const current = activeFilters.value[idx];
|
|
87
|
+
if (current) {
|
|
88
|
+
const ci = current.active.findIndex((c) => c.value === choice.value);
|
|
89
|
+
if (ci !== -1) {
|
|
90
|
+
// Deactivate the choice
|
|
91
|
+
const newActive = [...current.active];
|
|
92
|
+
newActive.splice(ci, 1);
|
|
93
|
+
const list = [...activeFilters.value];
|
|
94
|
+
if (!newActive.length) list.splice(idx, 1);
|
|
95
|
+
else list[idx] = { ...current, active: newActive };
|
|
96
|
+
activeFilters.value = list;
|
|
97
|
+
} else if (filter.multiple) {
|
|
98
|
+
const list = [...activeFilters.value];
|
|
99
|
+
list[idx] = { ...current, active: [...current.active, choice] };
|
|
100
|
+
activeFilters.value = list;
|
|
101
|
+
} else {
|
|
102
|
+
const list = [...activeFilters.value];
|
|
103
|
+
list[idx] = { ...current, active: [choice] };
|
|
104
|
+
activeFilters.value = list;
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
activeFilters.value = [
|
|
108
|
+
...activeFilters.value,
|
|
109
|
+
{ ...filter, active: [choice] },
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function removeFilter(filter: FilterDescriptor) {
|
|
115
|
+
activeFilters.value = activeFilters.value.filter(
|
|
116
|
+
(f) => f.value !== filter.value,
|
|
117
|
+
);
|
|
118
|
+
const lf = localFilters.value.find((f) => f.value === filter.value);
|
|
119
|
+
if (lf && lf.datepicker) (lf as any).dates = [];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function removeAll() {
|
|
123
|
+
activeFilters.value = [];
|
|
124
|
+
localFilters.value.forEach((f) => {
|
|
125
|
+
if (f.datepicker) (f as any).dates = [];
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function formatActive(filter: ActiveFilter): string {
|
|
130
|
+
return filter.active.map((c) => c.text).join(", ");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function handleDateFilter(filter: FilterDescriptor & { dates?: string[] }) {
|
|
134
|
+
if (!filter.dates || filter.dates.length < 2) {
|
|
135
|
+
removeFilter(filter);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const sorted = [...filter.dates].sort();
|
|
139
|
+
const choice: FilterChoice = {
|
|
140
|
+
text: sorted.map((d) => new Date(d).toLocaleDateString()).join(" → "),
|
|
141
|
+
value: sorted.join(","),
|
|
142
|
+
};
|
|
143
|
+
activeFilters.value = activeFilters.value.filter(
|
|
144
|
+
(f) => f.value !== filter.value,
|
|
145
|
+
);
|
|
146
|
+
activeFilters.value = [
|
|
147
|
+
...activeFilters.value,
|
|
148
|
+
{ ...filter, active: [choice] },
|
|
149
|
+
];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const hasFilters = computed(() => localFilters.value.length > 0);
|
|
153
|
+
const isOpen = ref(false);
|
|
154
|
+
</script>
|
|
155
|
+
|
|
156
|
+
<template>
|
|
157
|
+
<div
|
|
158
|
+
v-if="hasFilters"
|
|
159
|
+
class="mapo-list-filters flex flex-wrap items-center gap-2"
|
|
160
|
+
>
|
|
161
|
+
<!-- Active filter chips -->
|
|
162
|
+
<UBadge
|
|
163
|
+
v-for="af in activeFilters"
|
|
164
|
+
:key="af.value"
|
|
165
|
+
variant="soft"
|
|
166
|
+
color="primary"
|
|
167
|
+
class="cursor-default"
|
|
168
|
+
>
|
|
169
|
+
<span class="text-xs">
|
|
170
|
+
<strong>{{ af.text.toUpperCase() }}:</strong>
|
|
171
|
+
{{ formatActive(af) }}
|
|
172
|
+
</span>
|
|
173
|
+
<UButton
|
|
174
|
+
v-if="!disabled"
|
|
175
|
+
size="xs"
|
|
176
|
+
variant="ghost"
|
|
177
|
+
color="primary"
|
|
178
|
+
icon="i-lucide-x"
|
|
179
|
+
class="-mr-1 ml-1 h-3.5 w-3.5"
|
|
180
|
+
@click.stop="removeFilter(af)"
|
|
181
|
+
/>
|
|
182
|
+
</UBadge>
|
|
183
|
+
|
|
184
|
+
<UButton
|
|
185
|
+
v-if="activeFilters.length > 1"
|
|
186
|
+
size="xs"
|
|
187
|
+
variant="ghost"
|
|
188
|
+
color="neutral"
|
|
189
|
+
@click="removeAll"
|
|
190
|
+
>
|
|
191
|
+
Clear all
|
|
192
|
+
</UButton>
|
|
193
|
+
|
|
194
|
+
<!-- Filter dropdown button -->
|
|
195
|
+
<UPopover v-model:open="isOpen">
|
|
196
|
+
<UButton
|
|
197
|
+
size="sm"
|
|
198
|
+
variant="outline"
|
|
199
|
+
color="neutral"
|
|
200
|
+
icon="i-lucide-sliders-horizontal"
|
|
201
|
+
:disabled="disabled"
|
|
202
|
+
trailing-icon=""
|
|
203
|
+
>
|
|
204
|
+
Filters
|
|
205
|
+
</UButton>
|
|
206
|
+
|
|
207
|
+
<template #content>
|
|
208
|
+
<div class="w-64 p-2 space-y-1">
|
|
209
|
+
<div v-for="filter in localFilters" :key="filter.value">
|
|
210
|
+
<!-- Full per-filter override (`filter.{value}`); default = title + content. -->
|
|
211
|
+
<slot
|
|
212
|
+
:name="`filter.${filter.value}`"
|
|
213
|
+
:filter="filter"
|
|
214
|
+
:toggle-choice="toggleChoice"
|
|
215
|
+
:remove-filter="removeFilter"
|
|
216
|
+
:is-choice-active="isChoiceActive"
|
|
217
|
+
>
|
|
218
|
+
<!-- Title override (`filter.{value}.title`). -->
|
|
219
|
+
<slot :name="`filter.${filter.value}.title`" :filter="filter">
|
|
220
|
+
<p
|
|
221
|
+
class="px-2 py-1 text-xs font-semibold text-muted uppercase tracking-wide"
|
|
222
|
+
>
|
|
223
|
+
{{ filter.text }}
|
|
224
|
+
</p>
|
|
225
|
+
</slot>
|
|
226
|
+
|
|
227
|
+
<!-- Content override (`filter.{value}.content`). -->
|
|
228
|
+
<slot
|
|
229
|
+
:name="`filter.${filter.value}.content`"
|
|
230
|
+
:filter="filter"
|
|
231
|
+
:toggle-choice="toggleChoice"
|
|
232
|
+
:remove-filter="removeFilter"
|
|
233
|
+
:is-choice-active="isChoiceActive"
|
|
234
|
+
>
|
|
235
|
+
<!-- Datepicker filter -->
|
|
236
|
+
<UCalendar
|
|
237
|
+
v-if="filter.datepicker"
|
|
238
|
+
v-model="(filter as any).dates"
|
|
239
|
+
range
|
|
240
|
+
class="w-full"
|
|
241
|
+
@update:model-value="handleDateFilter(filter as any)"
|
|
242
|
+
/>
|
|
243
|
+
|
|
244
|
+
<!-- Choices filter -->
|
|
245
|
+
<template v-else-if="filter.choices?.length">
|
|
246
|
+
<button
|
|
247
|
+
v-for="choice in filter.choices"
|
|
248
|
+
:key="String(choice.value)"
|
|
249
|
+
class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors hover:bg-elevated"
|
|
250
|
+
:class="
|
|
251
|
+
isChoiceActive(filter, choice)
|
|
252
|
+
? 'text-primary font-medium'
|
|
253
|
+
: 'text-default'
|
|
254
|
+
"
|
|
255
|
+
@click="toggleChoice(filter, choice)"
|
|
256
|
+
>
|
|
257
|
+
<!-- Per-choice icon override (`filter.{value}.icon`). -->
|
|
258
|
+
<slot
|
|
259
|
+
:name="`filter.${filter.value}.icon`"
|
|
260
|
+
:filter="filter"
|
|
261
|
+
:choice="choice"
|
|
262
|
+
>
|
|
263
|
+
<UIcon
|
|
264
|
+
v-if="choice.icon"
|
|
265
|
+
:name="choice.icon"
|
|
266
|
+
class="h-4 w-4 shrink-0"
|
|
267
|
+
/>
|
|
268
|
+
<UIcon
|
|
269
|
+
v-else
|
|
270
|
+
name="i-lucide-circle-small"
|
|
271
|
+
class="h-4 w-4 shrink-0 opacity-40"
|
|
272
|
+
/>
|
|
273
|
+
</slot>
|
|
274
|
+
<span>{{ choice.text }}</span>
|
|
275
|
+
<UIcon
|
|
276
|
+
v-if="isChoiceActive(filter, choice)"
|
|
277
|
+
name="i-lucide-check"
|
|
278
|
+
class="ml-auto h-3.5 w-3.5"
|
|
279
|
+
/>
|
|
280
|
+
</button>
|
|
281
|
+
</template>
|
|
282
|
+
</slot>
|
|
283
|
+
</slot>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</template>
|
|
287
|
+
</UPopover>
|
|
288
|
+
</div>
|
|
289
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineSlots<{
|
|
3
|
+
/** Main content of the list header (page title, breadcrumbs, action buttons). */
|
|
4
|
+
head(): any;
|
|
5
|
+
}>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div class="mapo-list-head mb-4">
|
|
10
|
+
<slot name="head" />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<script setup lang="ts" generic="T extends object">
|
|
2
|
+
import { ref, computed, watch } from "vue";
|
|
3
|
+
import type { Ref } from "vue";
|
|
4
|
+
import type { AnyFieldDescriptor, FieldRegistry } from "@mapomodule/form/types";
|
|
5
|
+
import { useSnackStore } from "@mapomodule/store/runtime/stores/snack";
|
|
6
|
+
import { useCrud } from "@mapomodule/core/runtime/api/crud";
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(
|
|
9
|
+
defineProps<{
|
|
10
|
+
open: boolean;
|
|
11
|
+
endpoint?: string;
|
|
12
|
+
itemId?: string | number | null;
|
|
13
|
+
editFields?: AnyFieldDescriptor<T>[];
|
|
14
|
+
lookup?: string;
|
|
15
|
+
languages?: string[];
|
|
16
|
+
registry?: FieldRegistry;
|
|
17
|
+
/**
|
|
18
|
+
* Offline mode: skip backend detail/save calls. The form is seeded from
|
|
19
|
+
* `localItem`, and `saved` emits the locally edited model so the parent
|
|
20
|
+
* can splice it back into its array.
|
|
21
|
+
*/
|
|
22
|
+
offline?: boolean;
|
|
23
|
+
/** Seed item for offline mode (clone is taken to avoid mutating parent state). */
|
|
24
|
+
localItem?: T | null;
|
|
25
|
+
}>(),
|
|
26
|
+
{
|
|
27
|
+
endpoint: "",
|
|
28
|
+
lookup: "id",
|
|
29
|
+
editFields: () => [],
|
|
30
|
+
offline: false,
|
|
31
|
+
localItem: null,
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const emit = defineEmits<{
|
|
36
|
+
"update:open": [value: boolean];
|
|
37
|
+
saved: [item: T];
|
|
38
|
+
}>();
|
|
39
|
+
|
|
40
|
+
defineSlots<{
|
|
41
|
+
/**
|
|
42
|
+
* Additional content rendered below the form fields, above the action buttons.
|
|
43
|
+
* Receives `{ model: T }` — the current reactive form model.
|
|
44
|
+
*/
|
|
45
|
+
extra(props: { model: T }): any;
|
|
46
|
+
}>();
|
|
47
|
+
|
|
48
|
+
const snack = useSnackStore();
|
|
49
|
+
const crud = useCrud<T>(props.endpoint);
|
|
50
|
+
|
|
51
|
+
// Typed as Ref<T> (not Ref<UnwrapRef<T>>) so the template unwrap stays exactly T,
|
|
52
|
+
// which keeps the `extra` slot's `:model` binding type-correct for the generic T.
|
|
53
|
+
const model = ref({} as T) as Ref<T>;
|
|
54
|
+
const loading = ref(false);
|
|
55
|
+
const saving = ref(false);
|
|
56
|
+
const isOpen = computed({
|
|
57
|
+
get: () => props.open,
|
|
58
|
+
set: (v) => emit("update:open", v),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
watch(
|
|
62
|
+
() => [props.open, props.itemId] as const,
|
|
63
|
+
async ([open, id]) => {
|
|
64
|
+
if (!open) return;
|
|
65
|
+
if (id == null) {
|
|
66
|
+
model.value = {} as T;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// Offline: seed from the locally-passed item (cloned), no detail() call.
|
|
70
|
+
if (props.offline) {
|
|
71
|
+
model.value = props.localItem
|
|
72
|
+
? (JSON.parse(JSON.stringify(props.localItem)) as T)
|
|
73
|
+
: ({} as T);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
loading.value = true;
|
|
77
|
+
try {
|
|
78
|
+
model.value = await crud.detail(id as string | number);
|
|
79
|
+
} catch {
|
|
80
|
+
snack.show("Failed to load item", "error");
|
|
81
|
+
isOpen.value = false;
|
|
82
|
+
} finally {
|
|
83
|
+
loading.value = false;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
async function save() {
|
|
89
|
+
saving.value = true;
|
|
90
|
+
try {
|
|
91
|
+
// Offline: no backend roundtrip — emit the locally edited model and let
|
|
92
|
+
// the parent splice it back into the source array.
|
|
93
|
+
if (props.offline) {
|
|
94
|
+
snack.show("Saved", "success");
|
|
95
|
+
emit("saved", { ...model.value } as T);
|
|
96
|
+
isOpen.value = false;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const result =
|
|
100
|
+
props.itemId != null
|
|
101
|
+
? await crud.partialUpdate(props.itemId as string | number, model.value)
|
|
102
|
+
: await crud.create(model.value);
|
|
103
|
+
snack.show("Saved", "success");
|
|
104
|
+
emit("saved", result);
|
|
105
|
+
isOpen.value = false;
|
|
106
|
+
} catch (err: unknown) {
|
|
107
|
+
const detail = (err as { response?: { data?: { detail?: string } } })
|
|
108
|
+
?.response?.data?.detail;
|
|
109
|
+
snack.show(detail ?? "Failed to save", "error");
|
|
110
|
+
} finally {
|
|
111
|
+
saving.value = false;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<template>
|
|
117
|
+
<UModal v-model:open="isOpen">
|
|
118
|
+
<template #content>
|
|
119
|
+
<div class="p-6 space-y-4">
|
|
120
|
+
<div class="flex items-center justify-between">
|
|
121
|
+
<h3 class="text-base font-semibold text-highlighted">
|
|
122
|
+
{{ itemId != null ? "Edit" : "New item" }}
|
|
123
|
+
</h3>
|
|
124
|
+
<UButton
|
|
125
|
+
size="xs"
|
|
126
|
+
variant="ghost"
|
|
127
|
+
color="neutral"
|
|
128
|
+
icon="i-lucide-x"
|
|
129
|
+
@click="isOpen = false"
|
|
130
|
+
/>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<div v-if="loading" class="flex justify-center py-8">
|
|
134
|
+
<UIcon
|
|
135
|
+
name="i-lucide-loader-circle"
|
|
136
|
+
class="h-6 w-6 animate-spin text-muted"
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<template v-else>
|
|
141
|
+
<MapoForm
|
|
142
|
+
v-model="model"
|
|
143
|
+
:fields="editFields"
|
|
144
|
+
:languages="languages"
|
|
145
|
+
:registry="registry"
|
|
146
|
+
immediate
|
|
147
|
+
/>
|
|
148
|
+
|
|
149
|
+
<slot name="extra" :model="model" />
|
|
150
|
+
|
|
151
|
+
<div class="flex justify-end gap-2 pt-2">
|
|
152
|
+
<UButton variant="ghost" color="neutral" @click="isOpen = false">
|
|
153
|
+
Cancel
|
|
154
|
+
</UButton>
|
|
155
|
+
<UButton color="primary" :loading="saving" @click="save">
|
|
156
|
+
Save
|
|
157
|
+
</UButton>
|
|
158
|
+
</div>
|
|
159
|
+
</template>
|
|
160
|
+
</div>
|
|
161
|
+
</template>
|
|
162
|
+
</UModal>
|
|
163
|
+
</template>
|