@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,244 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, watch } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
filters: { type: Array, required: true },
|
|
5
|
+
modelValue: { type: Array, required: true },
|
|
6
|
+
disabled: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
9
|
+
defineSlots();
|
|
10
|
+
const localFilters = ref([]);
|
|
11
|
+
const activeFilters = ref([]);
|
|
12
|
+
watch(
|
|
13
|
+
() => props.filters,
|
|
14
|
+
(val) => {
|
|
15
|
+
localFilters.value = val.map((f) => ({
|
|
16
|
+
...f,
|
|
17
|
+
dates: f.datepicker ? [] : void 0
|
|
18
|
+
}));
|
|
19
|
+
applyDefaults();
|
|
20
|
+
},
|
|
21
|
+
{ immediate: true }
|
|
22
|
+
);
|
|
23
|
+
watch(
|
|
24
|
+
() => props.modelValue,
|
|
25
|
+
(val) => {
|
|
26
|
+
if (JSON.stringify(val) !== JSON.stringify(activeFilters.value)) {
|
|
27
|
+
activeFilters.value = val;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{ deep: true }
|
|
31
|
+
);
|
|
32
|
+
watch(activeFilters, (val) => emit("update:modelValue", val), { deep: true });
|
|
33
|
+
function applyDefaults() {
|
|
34
|
+
localFilters.value.forEach((filter) => {
|
|
35
|
+
if (!filter.defaultChoice) return;
|
|
36
|
+
const choices = filter.choices ?? [];
|
|
37
|
+
filter.defaultChoice.split(",").forEach((dv) => {
|
|
38
|
+
const choice = choices.find((c) => String(c.value) === dv);
|
|
39
|
+
if (choice) toggleChoice(filter, choice);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function isChoiceActive(filter, choice) {
|
|
44
|
+
const found = activeFilters.value.find((f) => f.value === filter.value);
|
|
45
|
+
return (found?.active ?? []).some((c) => c.value === choice.value);
|
|
46
|
+
}
|
|
47
|
+
function toggleChoice(filter, choice) {
|
|
48
|
+
const idx = activeFilters.value.findIndex((f) => f.value === filter.value);
|
|
49
|
+
const current = activeFilters.value[idx];
|
|
50
|
+
if (current) {
|
|
51
|
+
const ci = current.active.findIndex((c) => c.value === choice.value);
|
|
52
|
+
if (ci !== -1) {
|
|
53
|
+
const newActive = [...current.active];
|
|
54
|
+
newActive.splice(ci, 1);
|
|
55
|
+
const list = [...activeFilters.value];
|
|
56
|
+
if (!newActive.length) list.splice(idx, 1);
|
|
57
|
+
else list[idx] = { ...current, active: newActive };
|
|
58
|
+
activeFilters.value = list;
|
|
59
|
+
} else if (filter.multiple) {
|
|
60
|
+
const list = [...activeFilters.value];
|
|
61
|
+
list[idx] = { ...current, active: [...current.active, choice] };
|
|
62
|
+
activeFilters.value = list;
|
|
63
|
+
} else {
|
|
64
|
+
const list = [...activeFilters.value];
|
|
65
|
+
list[idx] = { ...current, active: [choice] };
|
|
66
|
+
activeFilters.value = list;
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
activeFilters.value = [
|
|
70
|
+
...activeFilters.value,
|
|
71
|
+
{ ...filter, active: [choice] }
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function removeFilter(filter) {
|
|
76
|
+
activeFilters.value = activeFilters.value.filter(
|
|
77
|
+
(f) => f.value !== filter.value
|
|
78
|
+
);
|
|
79
|
+
const lf = localFilters.value.find((f) => f.value === filter.value);
|
|
80
|
+
if (lf && lf.datepicker) lf.dates = [];
|
|
81
|
+
}
|
|
82
|
+
function removeAll() {
|
|
83
|
+
activeFilters.value = [];
|
|
84
|
+
localFilters.value.forEach((f) => {
|
|
85
|
+
if (f.datepicker) f.dates = [];
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function formatActive(filter) {
|
|
89
|
+
return filter.active.map((c) => c.text).join(", ");
|
|
90
|
+
}
|
|
91
|
+
function handleDateFilter(filter) {
|
|
92
|
+
if (!filter.dates || filter.dates.length < 2) {
|
|
93
|
+
removeFilter(filter);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const sorted = [...filter.dates].sort();
|
|
97
|
+
const choice = {
|
|
98
|
+
text: sorted.map((d) => new Date(d).toLocaleDateString()).join(" \u2192 "),
|
|
99
|
+
value: sorted.join(",")
|
|
100
|
+
};
|
|
101
|
+
activeFilters.value = activeFilters.value.filter(
|
|
102
|
+
(f) => f.value !== filter.value
|
|
103
|
+
);
|
|
104
|
+
activeFilters.value = [
|
|
105
|
+
...activeFilters.value,
|
|
106
|
+
{ ...filter, active: [choice] }
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
const hasFilters = computed(() => localFilters.value.length > 0);
|
|
110
|
+
const isOpen = ref(false);
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<template>
|
|
114
|
+
<div
|
|
115
|
+
v-if="hasFilters"
|
|
116
|
+
class="mapo-list-filters flex flex-wrap items-center gap-2"
|
|
117
|
+
>
|
|
118
|
+
<!-- Active filter chips -->
|
|
119
|
+
<UBadge
|
|
120
|
+
v-for="af in activeFilters"
|
|
121
|
+
:key="af.value"
|
|
122
|
+
variant="soft"
|
|
123
|
+
color="primary"
|
|
124
|
+
class="cursor-default"
|
|
125
|
+
>
|
|
126
|
+
<span class="text-xs">
|
|
127
|
+
<strong>{{ af.text.toUpperCase() }}:</strong>
|
|
128
|
+
{{ formatActive(af) }}
|
|
129
|
+
</span>
|
|
130
|
+
<UButton
|
|
131
|
+
v-if="!disabled"
|
|
132
|
+
size="xs"
|
|
133
|
+
variant="ghost"
|
|
134
|
+
color="primary"
|
|
135
|
+
icon="i-lucide-x"
|
|
136
|
+
class="-mr-1 ml-1 h-3.5 w-3.5"
|
|
137
|
+
@click.stop="removeFilter(af)"
|
|
138
|
+
/>
|
|
139
|
+
</UBadge>
|
|
140
|
+
|
|
141
|
+
<UButton
|
|
142
|
+
v-if="activeFilters.length > 1"
|
|
143
|
+
size="xs"
|
|
144
|
+
variant="ghost"
|
|
145
|
+
color="neutral"
|
|
146
|
+
@click="removeAll"
|
|
147
|
+
>
|
|
148
|
+
Clear all
|
|
149
|
+
</UButton>
|
|
150
|
+
|
|
151
|
+
<!-- Filter dropdown button -->
|
|
152
|
+
<UPopover v-model:open="isOpen">
|
|
153
|
+
<UButton
|
|
154
|
+
size="sm"
|
|
155
|
+
variant="outline"
|
|
156
|
+
color="neutral"
|
|
157
|
+
icon="i-lucide-sliders-horizontal"
|
|
158
|
+
:disabled="disabled"
|
|
159
|
+
trailing-icon=""
|
|
160
|
+
>
|
|
161
|
+
Filters
|
|
162
|
+
</UButton>
|
|
163
|
+
|
|
164
|
+
<template #content>
|
|
165
|
+
<div class="w-64 p-2 space-y-1">
|
|
166
|
+
<div v-for="filter in localFilters" :key="filter.value">
|
|
167
|
+
<!-- Full per-filter override (`filter.{value}`); default = title + content. -->
|
|
168
|
+
<slot
|
|
169
|
+
:name="`filter.${filter.value}`"
|
|
170
|
+
:filter="filter"
|
|
171
|
+
:toggle-choice="toggleChoice"
|
|
172
|
+
:remove-filter="removeFilter"
|
|
173
|
+
:is-choice-active="isChoiceActive"
|
|
174
|
+
>
|
|
175
|
+
<!-- Title override (`filter.{value}.title`). -->
|
|
176
|
+
<slot :name="`filter.${filter.value}.title`" :filter="filter">
|
|
177
|
+
<p
|
|
178
|
+
class="px-2 py-1 text-xs font-semibold text-muted uppercase tracking-wide"
|
|
179
|
+
>
|
|
180
|
+
{{ filter.text }}
|
|
181
|
+
</p>
|
|
182
|
+
</slot>
|
|
183
|
+
|
|
184
|
+
<!-- Content override (`filter.{value}.content`). -->
|
|
185
|
+
<slot
|
|
186
|
+
:name="`filter.${filter.value}.content`"
|
|
187
|
+
:filter="filter"
|
|
188
|
+
:toggle-choice="toggleChoice"
|
|
189
|
+
:remove-filter="removeFilter"
|
|
190
|
+
:is-choice-active="isChoiceActive"
|
|
191
|
+
>
|
|
192
|
+
<!-- Datepicker filter -->
|
|
193
|
+
<UCalendar
|
|
194
|
+
v-if="filter.datepicker"
|
|
195
|
+
v-model="filter.dates"
|
|
196
|
+
range
|
|
197
|
+
class="w-full"
|
|
198
|
+
@update:model-value="handleDateFilter(filter)"
|
|
199
|
+
/>
|
|
200
|
+
|
|
201
|
+
<!-- Choices filter -->
|
|
202
|
+
<template v-else-if="filter.choices?.length">
|
|
203
|
+
<button
|
|
204
|
+
v-for="choice in filter.choices"
|
|
205
|
+
:key="String(choice.value)"
|
|
206
|
+
class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm transition-colors hover:bg-elevated"
|
|
207
|
+
:class="
|
|
208
|
+
isChoiceActive(filter, choice) ? 'text-primary font-medium' : 'text-default'
|
|
209
|
+
"
|
|
210
|
+
@click="toggleChoice(filter, choice)"
|
|
211
|
+
>
|
|
212
|
+
<!-- Per-choice icon override (`filter.{value}.icon`). -->
|
|
213
|
+
<slot
|
|
214
|
+
:name="`filter.${filter.value}.icon`"
|
|
215
|
+
:filter="filter"
|
|
216
|
+
:choice="choice"
|
|
217
|
+
>
|
|
218
|
+
<UIcon
|
|
219
|
+
v-if="choice.icon"
|
|
220
|
+
:name="choice.icon"
|
|
221
|
+
class="h-4 w-4 shrink-0"
|
|
222
|
+
/>
|
|
223
|
+
<UIcon
|
|
224
|
+
v-else
|
|
225
|
+
name="i-lucide-circle-small"
|
|
226
|
+
class="h-4 w-4 shrink-0 opacity-40"
|
|
227
|
+
/>
|
|
228
|
+
</slot>
|
|
229
|
+
<span>{{ choice.text }}</span>
|
|
230
|
+
<UIcon
|
|
231
|
+
v-if="isChoiceActive(filter, choice)"
|
|
232
|
+
name="i-lucide-check"
|
|
233
|
+
class="ml-auto h-3.5 w-3.5"
|
|
234
|
+
/>
|
|
235
|
+
</button>
|
|
236
|
+
</template>
|
|
237
|
+
</slot>
|
|
238
|
+
</slot>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
</template>
|
|
242
|
+
</UPopover>
|
|
243
|
+
</div>
|
|
244
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FilterDescriptor, ActiveFilter, FilterChoice } from "../types/list.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
filters: FilterDescriptor[];
|
|
4
|
+
modelValue: ActiveFilter[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
/**
|
|
9
|
+
* Per-filter override slots. Bindings vary by slot; `filter` is always provided:
|
|
10
|
+
* - `filter.{value}` — full override (default = title + content)
|
|
11
|
+
* - `filter.{value}.title` — title override
|
|
12
|
+
* - `filter.{value}.content` — content override (choices / datepicker)
|
|
13
|
+
* - `filter.{value}.icon` — per-choice icon override (also receives `choice`)
|
|
14
|
+
*/
|
|
15
|
+
[K: `filter.${string}`]: (props: {
|
|
16
|
+
filter: FilterDescriptor & {
|
|
17
|
+
dates?: string[];
|
|
18
|
+
};
|
|
19
|
+
choice?: FilterChoice;
|
|
20
|
+
toggleChoice?: (filter: FilterDescriptor, choice: FilterChoice) => void;
|
|
21
|
+
removeFilter?: (filter: FilterDescriptor) => void;
|
|
22
|
+
isChoiceActive?: (filter: FilterDescriptor, choice: FilterChoice) => boolean;
|
|
23
|
+
}) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: ActiveFilter[]) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: ActiveFilter[]) => any) | undefined;
|
|
29
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
34
|
+
new (): {
|
|
35
|
+
$slots: S;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=MapoListFilters.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoListFilters.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoListFilters.vue"],"names":[],"mappings":"AAqSA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAMF,KAAK,WAAW,GAAG;IACjB;;;;;;OAMG;IACH,CAAC,CAAC,EAAE,UAAU,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE;QAC/B,MAAM,EAAE,gBAAgB,GAAG;YAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC;QAChD,MAAM,CAAC,EAAE,YAAY,CAAC;QACtB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;QACxE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;QAClD,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,KACjB,OAAO,CAAC;KACd,KAAK,GAAG,CAAC;CACX,CAAC;AAqdF,QAAA,MAAM,UAAU;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
/** Main content of the list header (page title, breadcrumbs, action buttons). */
|
|
3
|
+
head(): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=MapoListHead.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoListHead.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoListHead.vue"],"names":[],"mappings":"AAeA,KAAK,WAAW,GAAG;IACjB,iFAAiF;IACjF,IAAI,IAAI,GAAG,CAAC;CACb,CAAC;AAoBF,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed, watch } from "vue";
|
|
3
|
+
import { useSnackStore } from "@mapomodule/store/runtime/stores/snack";
|
|
4
|
+
import { useCrud } from "@mapomodule/core/runtime/api/crud";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
open: { type: Boolean, required: true },
|
|
7
|
+
endpoint: { type: String, required: false, default: "" },
|
|
8
|
+
itemId: { type: [String, Number, null], required: false },
|
|
9
|
+
editFields: { type: Array, required: false, default: () => [] },
|
|
10
|
+
lookup: { type: String, required: false, default: "id" },
|
|
11
|
+
languages: { type: Array, required: false },
|
|
12
|
+
registry: { type: null, required: false },
|
|
13
|
+
offline: { type: Boolean, required: false, default: false },
|
|
14
|
+
localItem: { type: null, required: false, default: null }
|
|
15
|
+
});
|
|
16
|
+
const emit = defineEmits(["update:open", "saved"]);
|
|
17
|
+
defineSlots();
|
|
18
|
+
const snack = useSnackStore();
|
|
19
|
+
const crud = useCrud(props.endpoint);
|
|
20
|
+
const model = ref({});
|
|
21
|
+
const loading = ref(false);
|
|
22
|
+
const saving = ref(false);
|
|
23
|
+
const isOpen = computed({
|
|
24
|
+
get: () => props.open,
|
|
25
|
+
set: (v) => emit("update:open", v)
|
|
26
|
+
});
|
|
27
|
+
watch(
|
|
28
|
+
() => [props.open, props.itemId],
|
|
29
|
+
async ([open, id]) => {
|
|
30
|
+
if (!open) return;
|
|
31
|
+
if (id == null) {
|
|
32
|
+
model.value = {};
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (props.offline) {
|
|
36
|
+
model.value = props.localItem ? JSON.parse(JSON.stringify(props.localItem)) : {};
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
loading.value = true;
|
|
40
|
+
try {
|
|
41
|
+
model.value = await crud.detail(id);
|
|
42
|
+
} catch {
|
|
43
|
+
snack.show("Failed to load item", "error");
|
|
44
|
+
isOpen.value = false;
|
|
45
|
+
} finally {
|
|
46
|
+
loading.value = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
async function save() {
|
|
51
|
+
saving.value = true;
|
|
52
|
+
try {
|
|
53
|
+
if (props.offline) {
|
|
54
|
+
snack.show("Saved", "success");
|
|
55
|
+
emit("saved", { ...model.value });
|
|
56
|
+
isOpen.value = false;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const result = props.itemId != null ? await crud.partialUpdate(props.itemId, model.value) : await crud.create(model.value);
|
|
60
|
+
snack.show("Saved", "success");
|
|
61
|
+
emit("saved", result);
|
|
62
|
+
isOpen.value = false;
|
|
63
|
+
} catch (err) {
|
|
64
|
+
const detail = err?.response?.data?.detail;
|
|
65
|
+
snack.show(detail ?? "Failed to save", "error");
|
|
66
|
+
} finally {
|
|
67
|
+
saving.value = false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<UModal v-model:open="isOpen">
|
|
74
|
+
<template #content>
|
|
75
|
+
<div class="p-6 space-y-4">
|
|
76
|
+
<div class="flex items-center justify-between">
|
|
77
|
+
<h3 class="text-base font-semibold text-highlighted">
|
|
78
|
+
{{ itemId != null ? "Edit" : "New item" }}
|
|
79
|
+
</h3>
|
|
80
|
+
<UButton
|
|
81
|
+
size="xs"
|
|
82
|
+
variant="ghost"
|
|
83
|
+
color="neutral"
|
|
84
|
+
icon="i-lucide-x"
|
|
85
|
+
@click="isOpen = false"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div v-if="loading" class="flex justify-center py-8">
|
|
90
|
+
<UIcon
|
|
91
|
+
name="i-lucide-loader-circle"
|
|
92
|
+
class="h-6 w-6 animate-spin text-muted"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<template v-else>
|
|
97
|
+
<MapoForm
|
|
98
|
+
v-model="model"
|
|
99
|
+
:fields="editFields"
|
|
100
|
+
:languages="languages"
|
|
101
|
+
:registry="registry"
|
|
102
|
+
immediate
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<slot name="extra" :model="model" />
|
|
106
|
+
|
|
107
|
+
<div class="flex justify-end gap-2 pt-2">
|
|
108
|
+
<UButton variant="ghost" color="neutral" @click="isOpen = false">
|
|
109
|
+
Cancel
|
|
110
|
+
</UButton>
|
|
111
|
+
<UButton color="primary" :loading="saving" @click="save">
|
|
112
|
+
Save
|
|
113
|
+
</UButton>
|
|
114
|
+
</div>
|
|
115
|
+
</template>
|
|
116
|
+
</div>
|
|
117
|
+
</template>
|
|
118
|
+
</UModal>
|
|
119
|
+
</template>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AnyFieldDescriptor, FieldRegistry } from "@mapomodule/form/types";
|
|
2
|
+
declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
open: boolean;
|
|
5
|
+
endpoint?: string;
|
|
6
|
+
itemId?: string | number | null;
|
|
7
|
+
editFields?: AnyFieldDescriptor<T>[];
|
|
8
|
+
lookup?: string;
|
|
9
|
+
languages?: string[];
|
|
10
|
+
registry?: FieldRegistry;
|
|
11
|
+
/**
|
|
12
|
+
* Offline mode: skip backend detail/save calls. The form is seeded from
|
|
13
|
+
* `localItem`, and `saved` emits the locally edited model so the parent
|
|
14
|
+
* can splice it back into its array.
|
|
15
|
+
*/
|
|
16
|
+
offline?: boolean;
|
|
17
|
+
/** Seed item for offline mode (clone is taken to avoid mutating parent state). */
|
|
18
|
+
localItem?: T | null;
|
|
19
|
+
} & {
|
|
20
|
+
onSaved?: ((item: T) => any) | undefined;
|
|
21
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
}> & (typeof globalThis extends {
|
|
23
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
24
|
+
} ? P : {});
|
|
25
|
+
expose: (exposed: {}) => void;
|
|
26
|
+
attrs: any;
|
|
27
|
+
slots: {
|
|
28
|
+
/**
|
|
29
|
+
* Additional content rendered below the form fields, above the action buttons.
|
|
30
|
+
* Receives `{ model: T }` — the current reactive form model.
|
|
31
|
+
*/
|
|
32
|
+
extra(props: {
|
|
33
|
+
model: T;
|
|
34
|
+
}): any;
|
|
35
|
+
};
|
|
36
|
+
emit: ((evt: "saved", item: T) => void) & ((evt: "update:open", value: boolean) => void);
|
|
37
|
+
}>) => import("vue").VNode & {
|
|
38
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
39
|
+
};
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
43
|
+
[K in keyof T]: T[K];
|
|
44
|
+
} : {
|
|
45
|
+
[K in keyof T as K]: T[K];
|
|
46
|
+
}) & {};
|
|
47
|
+
//# sourceMappingURL=MapoListQuickEdit.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoListQuickEdit.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoListQuickEdit.vue"],"names":[],"mappings":"AAwKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIhF,QAAA,MAAM,YAAY,GAAK,CAAC,SAAS,MAAM,EACtC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WAgUO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;cA9T9C,OAAO;mBACF,MAAM;iBACR,MAAM,GAAG,MAAM,GAAG,IAAI;qBAClB,kBAAkB,CAAC,CAAC,CAAC,EAAE;iBAC3B,MAAM;oBACH,MAAM,EAAE;mBACT,aAAa;QACxB;;;;WAIG;kBACO,OAAO;QACjB,kFAAkF;oBACtE,CAAC,GAAG,IAAI;;;;KAgTmE,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;QA9RT;;;WAGG;qBACU;YAAE,KAAK,EAAE,CAAC,CAAA;SAAE,GAAG,GAAG;;;EA8R7B,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;wBACvD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|