@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
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<v-menu
|
|
4
|
-
ref="menu"
|
|
5
|
-
v-model="menu"
|
|
6
|
-
:close-on-content-click="false"
|
|
7
|
-
transition="scale-transition"
|
|
8
|
-
offset-y
|
|
9
|
-
min-width="auto"
|
|
10
|
-
>
|
|
11
|
-
<template v-slot:activator="{ on, attrs }">
|
|
12
|
-
<v-text-field
|
|
13
|
-
v-model="localModel"
|
|
14
|
-
prepend-inner-icon="mdi-clock"
|
|
15
|
-
v-bind="{ ...$attrs, ...attrs }"
|
|
16
|
-
v-on="readonly ? undefined : on"
|
|
17
|
-
readonly
|
|
18
|
-
:clearable="!readonly"
|
|
19
|
-
class="rounded-inherit"
|
|
20
|
-
></v-text-field>
|
|
21
|
-
</template>
|
|
22
|
-
<v-time-picker v-model="localModel" no-title v-bind="$attrs" ref="timePicker">
|
|
23
|
-
<div class="raw-input-container">
|
|
24
|
-
<input
|
|
25
|
-
:value="localModel"
|
|
26
|
-
type="time"
|
|
27
|
-
class="primary--text text-h6"
|
|
28
|
-
ref="rawInput"
|
|
29
|
-
@input="setModel"
|
|
30
|
-
autofocus
|
|
31
|
-
v-bind="$attrs"
|
|
32
|
-
/>
|
|
33
|
-
</div>
|
|
34
|
-
<v-btn text @click="menu = false">{{ $t('mapo.ok') }}</v-btn>
|
|
35
|
-
</v-time-picker>
|
|
36
|
-
</v-menu>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<style scoped>
|
|
41
|
-
.rounded-inherit {
|
|
42
|
-
border-radius: inherit;
|
|
43
|
-
}
|
|
44
|
-
.raw-input-container {
|
|
45
|
-
width: 100%;
|
|
46
|
-
}
|
|
47
|
-
.raw-input-container input {
|
|
48
|
-
width: 100%;
|
|
49
|
-
text-align: center;
|
|
50
|
-
outline: none;
|
|
51
|
-
}
|
|
52
|
-
</style>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
import {
|
|
56
|
-
formatLocalTime,
|
|
57
|
-
cleanDateStr,
|
|
58
|
-
formatUTCTime,
|
|
59
|
-
mergeTime,
|
|
60
|
-
} from "@mapomodule/utils/helpers/datetime";
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* This component is used to edit a time in iso format. It is a combination of "v-text-field" and "v-time-picker".
|
|
64
|
-
* Can get time from a full ISO date (as string in UTC timezone) or from string in a HH:MM:ss format.
|
|
65
|
-
*/
|
|
66
|
-
export default {
|
|
67
|
-
name: "TimeField",
|
|
68
|
-
data() {
|
|
69
|
-
return {
|
|
70
|
-
model: { model: null, returnDate: false },
|
|
71
|
-
menu: null,
|
|
72
|
-
isUpdating: false, // Add a flag to track updates
|
|
73
|
-
};
|
|
74
|
-
},
|
|
75
|
-
props: {
|
|
76
|
-
// V-model property. Is the time to be modified.
|
|
77
|
-
value: {
|
|
78
|
-
// `String`
|
|
79
|
-
type: String, // TODO: make it work also with arrays for ranges
|
|
80
|
-
},
|
|
81
|
-
// This set the component status to readonly, stopping the user interaction.
|
|
82
|
-
readonly: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
watch: {
|
|
88
|
-
value(val) {
|
|
89
|
-
if (!this.isUpdating) { // Check if an update is already in progress
|
|
90
|
-
const model = this.setupModel(val);
|
|
91
|
-
if (JSON.stringify(model) !== JSON.stringify(this.model)) {
|
|
92
|
-
this.isUpdating = true; // Set the flag to indicate an update is in progress
|
|
93
|
-
this.model = model;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
model: {
|
|
98
|
-
handler: function (val) {
|
|
99
|
-
// Fired when the v-model changes
|
|
100
|
-
//@arg Emits the time edited.
|
|
101
|
-
if (val.returnDate) this.$emit("input", val.model.toISOString());
|
|
102
|
-
else this.$emit("input", formatUTCTime(val.model));
|
|
103
|
-
},
|
|
104
|
-
deep: true,
|
|
105
|
-
},
|
|
106
|
-
menu(val) {
|
|
107
|
-
if (val)
|
|
108
|
-
setTimeout(() => {
|
|
109
|
-
this.$refs.rawInput.focus();
|
|
110
|
-
});
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
computed: {
|
|
114
|
-
localModel: {
|
|
115
|
-
get() {
|
|
116
|
-
return this.model?.model && formatLocalTime(this.model?.model);
|
|
117
|
-
},
|
|
118
|
-
set(value) {
|
|
119
|
-
this.model.model = mergeTime(this?.model?.model || new Date(), value);
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
methods: {
|
|
124
|
-
setModel(evt) {
|
|
125
|
-
const model = evt.target.value;
|
|
126
|
-
const currentValue = this.localModel?.split(":") || [];
|
|
127
|
-
const nextValue = model?.split(":") || [];
|
|
128
|
-
for (
|
|
129
|
-
let index = 0;
|
|
130
|
-
index < Math.min(currentValue.length, nextValue.length);
|
|
131
|
-
index++
|
|
132
|
-
) {
|
|
133
|
-
if (currentValue[index] != nextValue[index]) {
|
|
134
|
-
this.$refs.timePicker.selecting = index + 1;
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
this.localModel = model;
|
|
139
|
-
},
|
|
140
|
-
setupModel(val) {
|
|
141
|
-
const d = new Date(cleanDateStr(val));
|
|
142
|
-
const returnDate = !isNaN(d);
|
|
143
|
-
const model = !isNaN(d) ? d : mergeTime(new Date(), cleanDateStr(val));
|
|
144
|
-
return { returnDate, model };
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
mounted() {
|
|
148
|
-
this.model = this.setupModel(this.value); // Initialize the model on mount
|
|
149
|
-
},
|
|
150
|
-
updated() {
|
|
151
|
-
this.isUpdating = false; // Reset the flag after the component updates
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
</script>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export default async function () {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
if (typeof window.L !== 'undefined'){
|
|
4
|
-
resolve()
|
|
5
|
-
}
|
|
6
|
-
let scriptTag = document.getElementById("leaflet-script") || null
|
|
7
|
-
let styleTag = document.getElementById("leaflet-style") || null
|
|
8
|
-
const handler = () => {
|
|
9
|
-
scriptTag.removeEventListener('load', handler);
|
|
10
|
-
resolve()
|
|
11
|
-
};
|
|
12
|
-
if (!scriptTag) {
|
|
13
|
-
try {
|
|
14
|
-
scriptTag = document.createElement('script');
|
|
15
|
-
scriptTag.src = "https://unpkg.com/leaflet@1.7.1/dist/leaflet.js",
|
|
16
|
-
scriptTag.crossorigin = "anonymous",
|
|
17
|
-
scriptTag.async = true,
|
|
18
|
-
scriptTag.referrerPolicy = 'origin';
|
|
19
|
-
scriptTag.type = 'application/javascript';
|
|
20
|
-
scriptTag.id = 'leaflet-script';
|
|
21
|
-
scriptTag.addEventListener('load', handler);
|
|
22
|
-
document.head.appendChild(scriptTag);
|
|
23
|
-
styleTag = document.createElement('link');
|
|
24
|
-
|
|
25
|
-
styleTag.rel = "stylesheet",
|
|
26
|
-
styleTag.href = "https://unpkg.com/leaflet@1.7.1/dist/leaflet.css",
|
|
27
|
-
styleTag.crossorigin = "anonymous",
|
|
28
|
-
styleTag.id = 'leaflet-style';
|
|
29
|
-
document.head.appendChild(styleTag);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} catch (error) {
|
|
33
|
-
reject(error)
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
scriptTag.addEventListener('load', handler);
|
|
37
|
-
}
|
|
38
|
-
})
|
|
39
|
-
}
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<span v-if="label" class="v-label" :class="{'error--text': hasErrors, 'text--secondary': !hasErrors}">{{ label }}:</span>
|
|
4
|
-
<div ref="map" class="map"></div>
|
|
5
|
-
<div class="map-fields">
|
|
6
|
-
<div class="row search-row">
|
|
7
|
-
<div class="col-sm-12" style="padding: 0px">
|
|
8
|
-
<v-text-field
|
|
9
|
-
v-model="searchQuery"
|
|
10
|
-
:label="$t('mapo.searchLocation')"
|
|
11
|
-
@input="debouncedSearchLocation()"
|
|
12
|
-
v-bind="{ ...$attrs }"
|
|
13
|
-
class="col"
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="row input-gap" style="margin-top: 1rem;" v-for="(point, index) in model" :key="index">
|
|
18
|
-
<div class="col-sm-12"><v-divider></v-divider></div>
|
|
19
|
-
<div class="col-sm-6">
|
|
20
|
-
<div class="row">
|
|
21
|
-
<v-text-field
|
|
22
|
-
v-model="point.pointName"
|
|
23
|
-
:label="$t('mapo.pointName')"
|
|
24
|
-
v-bind="{ ...$attrs }"
|
|
25
|
-
ref="pointName"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="col">
|
|
30
|
-
<div class="row">
|
|
31
|
-
<v-text-field
|
|
32
|
-
v-model="point.lat"
|
|
33
|
-
:label="$t('mapo.latitude')"
|
|
34
|
-
v-bind="{ ...$attrs }"
|
|
35
|
-
readonly
|
|
36
|
-
class="col-5"
|
|
37
|
-
/>
|
|
38
|
-
<v-text-field
|
|
39
|
-
v-model="point.lon"
|
|
40
|
-
:label="$t('mapo.longitude')"
|
|
41
|
-
v-bind="{ ...$attrs }"
|
|
42
|
-
readonly
|
|
43
|
-
class="col-5"
|
|
44
|
-
/>
|
|
45
|
-
<v-btn
|
|
46
|
-
v-if="!readonly"
|
|
47
|
-
@click="removePointFromModel(index)"
|
|
48
|
-
class="col"
|
|
49
|
-
icon
|
|
50
|
-
><v-icon>mdi-close</v-icon></v-btn
|
|
51
|
-
>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="col-sm-12">
|
|
55
|
-
<div class="row">
|
|
56
|
-
<Form
|
|
57
|
-
v-model="point.extra_fields"
|
|
58
|
-
:fields="getFields(model.extra_fields)"
|
|
59
|
-
:errors="getErrors(index)"
|
|
60
|
-
:readonly="readonly"
|
|
61
|
-
immediate
|
|
62
|
-
>
|
|
63
|
-
<template
|
|
64
|
-
v-for="(slot, name) in templateSlots(model, $slots)"
|
|
65
|
-
:slot="slot"
|
|
66
|
-
>
|
|
67
|
-
<slot :name="name"></slot>
|
|
68
|
-
</template>
|
|
69
|
-
<template
|
|
70
|
-
v-for="(slot, name) in templateSlots(model, $scopedSlots)"
|
|
71
|
-
v-slot:[slot]="props"
|
|
72
|
-
>
|
|
73
|
-
<slot :name="name" v-bind="props" />
|
|
74
|
-
</template>
|
|
75
|
-
</Form>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</template>
|
|
82
|
-
|
|
83
|
-
<style>
|
|
84
|
-
.map {
|
|
85
|
-
height: 400px;
|
|
86
|
-
width: 100%;
|
|
87
|
-
}
|
|
88
|
-
.map-fields {
|
|
89
|
-
margin-top: 10px;
|
|
90
|
-
max-width: 100%;
|
|
91
|
-
padding: 12px;
|
|
92
|
-
}
|
|
93
|
-
.input-gap {
|
|
94
|
-
gap: 8px;
|
|
95
|
-
}
|
|
96
|
-
.search-row {
|
|
97
|
-
margin-bottom: 10px;
|
|
98
|
-
& > div {
|
|
99
|
-
padding: 0 !important;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
</style>
|
|
103
|
-
|
|
104
|
-
<script>
|
|
105
|
-
/**
|
|
106
|
-
* This component is made to get coordinates from a map.
|
|
107
|
-
*/
|
|
108
|
-
import { debounce } from "@mapomodule/utils/helpers/debounce";
|
|
109
|
-
import injectScript from "./leaflet.injector.js";
|
|
110
|
-
import { nameSpacedSlots } from "@mapomodule/utils/helpers/slots";
|
|
111
|
-
|
|
112
|
-
export default {
|
|
113
|
-
name: "MapField",
|
|
114
|
-
components: {
|
|
115
|
-
// For recursive dynamic components is better to resolve dependencies at runtime to avoid circular deps
|
|
116
|
-
Form: () => import("@mapomodule/uikit/components/Form/Form.vue"),
|
|
117
|
-
},
|
|
118
|
-
props: {
|
|
119
|
-
// V-model property.
|
|
120
|
-
value: {
|
|
121
|
-
type: Array,
|
|
122
|
-
default: () => [],
|
|
123
|
-
},
|
|
124
|
-
// This label will be shown at the top of the editor.
|
|
125
|
-
label: String,
|
|
126
|
-
// This set the component status to readonly, stopping the user interaction.
|
|
127
|
-
readonly: {
|
|
128
|
-
type: Boolean,
|
|
129
|
-
default: false,
|
|
130
|
-
},
|
|
131
|
-
// This set the component status to multiple, allowing the user to add multiple points. Pass it into attrs
|
|
132
|
-
multiple: {
|
|
133
|
-
type: Boolean,
|
|
134
|
-
default: false,
|
|
135
|
-
},
|
|
136
|
-
fields: {
|
|
137
|
-
// [`Array<FieldConfiguration>`](/components/Detail/Detail/#fieldconfiguration)
|
|
138
|
-
type: Array | Object,
|
|
139
|
-
default: () => [],
|
|
140
|
-
},
|
|
141
|
-
// Puts the input in an error state and passes through custom error messages.
|
|
142
|
-
errorMessages: {
|
|
143
|
-
type: Array,
|
|
144
|
-
default: () => [],
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
data() {
|
|
148
|
-
return {
|
|
149
|
-
model: this.value || [],
|
|
150
|
-
map: null,
|
|
151
|
-
searchQuery: "",
|
|
152
|
-
markers: [],
|
|
153
|
-
};
|
|
154
|
-
},
|
|
155
|
-
watch: {
|
|
156
|
-
value(val) {
|
|
157
|
-
this.model = val || [];
|
|
158
|
-
},
|
|
159
|
-
model(val) {
|
|
160
|
-
this.$emit("input", val);
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
mounted() {
|
|
164
|
-
injectScript().then(this.initMap);
|
|
165
|
-
},
|
|
166
|
-
methods: {
|
|
167
|
-
initMap() {
|
|
168
|
-
const coordinates = this.model || [];
|
|
169
|
-
if (coordinates.length > 0) {
|
|
170
|
-
const { lat, lon } = coordinates[coordinates.length - 1];
|
|
171
|
-
this.map = L.map(this.$refs.map).setView([lat, lon], 12);
|
|
172
|
-
coordinates.forEach((point, index) => {
|
|
173
|
-
const marker = L.marker([point.lat, point.lon]).addTo(this.map);
|
|
174
|
-
this.markers[index] = marker;
|
|
175
|
-
});
|
|
176
|
-
this.map.fitBounds(coordinates.map((point) => [point.lat, point.lon]));
|
|
177
|
-
} else {
|
|
178
|
-
this.map = L.map(this.$refs.map).setView([0, 0], 2);
|
|
179
|
-
}
|
|
180
|
-
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
|
|
181
|
-
attribution: "© OpenStreetMap contributors",
|
|
182
|
-
}).addTo(this.map);
|
|
183
|
-
this.handleClickOnMap();
|
|
184
|
-
},
|
|
185
|
-
handleClickOnMap() {
|
|
186
|
-
this.map.on("click", async (event) => {
|
|
187
|
-
const coordinates = event.latlng;
|
|
188
|
-
|
|
189
|
-
if (!this.multiple) {
|
|
190
|
-
this.removeAllMarkers();
|
|
191
|
-
this.model = [];
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
this.model.push({
|
|
195
|
-
lat: coordinates.lat,
|
|
196
|
-
lon: coordinates.lng,
|
|
197
|
-
pointName: "",
|
|
198
|
-
extra_fields: {},
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
const marker = L.marker([coordinates.lat, coordinates.lng]).addTo(
|
|
202
|
-
this.map
|
|
203
|
-
);
|
|
204
|
-
this.markers.push(marker);
|
|
205
|
-
await this.reverseGeoCoding(coordinates.lat, coordinates.lng);
|
|
206
|
-
});
|
|
207
|
-
},
|
|
208
|
-
removeAllMarkers() {
|
|
209
|
-
this.markers.forEach((marker) => this.map.removeLayer(marker));
|
|
210
|
-
this.markers = [];
|
|
211
|
-
},
|
|
212
|
-
async reverseGeoCoding(lat, lon) {
|
|
213
|
-
const reverseGeocodingResponse = await this.$axios.get(
|
|
214
|
-
"https://nominatim.openstreetmap.org/reverse",
|
|
215
|
-
{
|
|
216
|
-
params: {
|
|
217
|
-
lat,
|
|
218
|
-
lon,
|
|
219
|
-
format: "json",
|
|
220
|
-
addressdetails: 1,
|
|
221
|
-
"accept-language": this.$attrs.currentLang || "en",
|
|
222
|
-
},
|
|
223
|
-
}
|
|
224
|
-
);
|
|
225
|
-
|
|
226
|
-
if (
|
|
227
|
-
reverseGeocodingResponse.data &&
|
|
228
|
-
reverseGeocodingResponse.data.display_name
|
|
229
|
-
) {
|
|
230
|
-
this.model[this.currentIndex].pointName =
|
|
231
|
-
reverseGeocodingResponse.data.display_name;
|
|
232
|
-
} else {
|
|
233
|
-
this.model[this.currentIndex].pointName = this.searchQuery;
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
removePointFromModel(index) {
|
|
237
|
-
this.map.removeLayer(this.markers[index]);
|
|
238
|
-
this.markers.splice(index, 1);
|
|
239
|
-
this.model.splice(index, 1);
|
|
240
|
-
|
|
241
|
-
if (this.model.length > 0) {
|
|
242
|
-
this.map.fitBounds(this.model.map((point) => [point.lat, point.lon]));
|
|
243
|
-
} else {
|
|
244
|
-
this.map.setView([0, 0], 2);
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
async searchLocation() {
|
|
248
|
-
try {
|
|
249
|
-
const response = await this.$axios.get(
|
|
250
|
-
"https://nominatim.openstreetmap.org/search",
|
|
251
|
-
{
|
|
252
|
-
params: {
|
|
253
|
-
q: this.searchQuery,
|
|
254
|
-
format: "json",
|
|
255
|
-
limit: 1,
|
|
256
|
-
},
|
|
257
|
-
}
|
|
258
|
-
);
|
|
259
|
-
|
|
260
|
-
if (response.data.length > 0) {
|
|
261
|
-
if (!this.multiple) {
|
|
262
|
-
this.removeAllMarkers();
|
|
263
|
-
this.model = [];
|
|
264
|
-
}
|
|
265
|
-
const { lat, lon } = response.data[0];
|
|
266
|
-
this.map.setView([lat, lon], 12);
|
|
267
|
-
|
|
268
|
-
const marker = L.marker([lat, lon]).addTo(this.map);
|
|
269
|
-
this.markers.push(marker);
|
|
270
|
-
|
|
271
|
-
this.model.push({
|
|
272
|
-
lat,
|
|
273
|
-
lon,
|
|
274
|
-
pointName: this.searchQuery,
|
|
275
|
-
extra_fields: {},
|
|
276
|
-
});
|
|
277
|
-
|
|
278
|
-
await this.reverseGeoCoding(lat, lon);
|
|
279
|
-
this.map.fitBounds(this.model.map((point) => [point.lat, point.lon]));
|
|
280
|
-
}
|
|
281
|
-
} catch (error) {
|
|
282
|
-
console.error(`${this.$t("mapo.error.searchError")}: `, error);
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
debouncedSearchLocation: debounce(function () {
|
|
286
|
-
this.searchLocation();
|
|
287
|
-
}, 500),
|
|
288
|
-
getErrors(index) {
|
|
289
|
-
return (this.errorMessages[index]) || {};
|
|
290
|
-
},
|
|
291
|
-
getFields(model) {
|
|
292
|
-
if (this.hasTemplates) {
|
|
293
|
-
const template = this.templates.find(
|
|
294
|
-
(t) => model[t.tCodeField] == t.tCode
|
|
295
|
-
);
|
|
296
|
-
return template ? template.fields : [];
|
|
297
|
-
}
|
|
298
|
-
return this.fields;
|
|
299
|
-
},
|
|
300
|
-
templateSlots(model, slots) {
|
|
301
|
-
if (this.hasTemplates) {
|
|
302
|
-
const template = this.templates.find(
|
|
303
|
-
(t) => model[t.tCodeField] == t.tCode
|
|
304
|
-
);
|
|
305
|
-
return nameSpacedSlots(slots, `template.${template.tCode}.`).reduce(
|
|
306
|
-
(acc, v) => ({ [`template.${template.tCode}.${v}`]: v, ...acc }),
|
|
307
|
-
{}
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
return Object.keys(slots).reduce((acc, v) => ({ [v]: v, ...acc }), {});
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
computed: {
|
|
314
|
-
lat() {
|
|
315
|
-
return this.model?.lat || "";
|
|
316
|
-
},
|
|
317
|
-
lon() {
|
|
318
|
-
return this.model?.lon || "";
|
|
319
|
-
},
|
|
320
|
-
pointName() {
|
|
321
|
-
return this.model?.pointName || "";
|
|
322
|
-
},
|
|
323
|
-
currentIndex() {
|
|
324
|
-
return this.model.length > 0 ? this.model.length - 1 : 0;
|
|
325
|
-
},
|
|
326
|
-
hasTemplates() {
|
|
327
|
-
return typeof this.fields == "object" && !Array.isArray(this.fields);
|
|
328
|
-
},
|
|
329
|
-
hasErrors () { return this.errorMessages && this.errorMessages.length },
|
|
330
|
-
templates() {
|
|
331
|
-
const templates = {};
|
|
332
|
-
if (this.hasTemplates) {
|
|
333
|
-
Object.keys(this.fields).forEach((tKey) => {
|
|
334
|
-
const tValue = this.fields[tKey];
|
|
335
|
-
const { preview, description } = tValue;
|
|
336
|
-
templates[tKey] = {
|
|
337
|
-
fields: tValue.fields || tValue,
|
|
338
|
-
name: tValue.name || titleCase(tKey.replace(/_/, " ")),
|
|
339
|
-
tCode: tValue.tCode || tKey,
|
|
340
|
-
tCodeField: tValue.tCodeField || "tCode",
|
|
341
|
-
preview,
|
|
342
|
-
description,
|
|
343
|
-
};
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
return Object.values(templates);
|
|
347
|
-
},
|
|
348
|
-
},
|
|
349
|
-
};
|
|
350
|
-
</script>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export default ({ isDark, base }) => ({
|
|
2
|
-
plugins: "mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount textpattern noneditable help charmap quickbars emoticons",
|
|
3
|
-
menubar: "file edit view insert format tools table help",
|
|
4
|
-
menu: {
|
|
5
|
-
insert: {
|
|
6
|
-
title: "Insert",
|
|
7
|
-
items: "link mapomedia media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor | insertdatetime",
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
toolbar: "undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | mapomedia media template link anchor codesample | ltr rtl",
|
|
11
|
-
toolbar_sticky: true,
|
|
12
|
-
image_advtab: true,
|
|
13
|
-
importcss_append: true,
|
|
14
|
-
template_cdate_format: "[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]",
|
|
15
|
-
template_mdate_format: "[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]",
|
|
16
|
-
height: 400,
|
|
17
|
-
image_caption: true,
|
|
18
|
-
quickbars_insert_toolbar: "mapomedia quicktable",
|
|
19
|
-
quickbars_selection_toolbar: "bold italic | quicklink h2 h3 blockquote mapomedia quicktable",
|
|
20
|
-
noneditable_noneditable_class: "mceNonEditable",
|
|
21
|
-
toolbar_mode: "sliding",
|
|
22
|
-
contextmenu: "link mapomedia table",
|
|
23
|
-
skin_url: isDark ? `${base}mapo/tinymce-skins/mapo-dark` : `${base}mapo/tinymce-skins/mapo-light`,
|
|
24
|
-
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }",
|
|
25
|
-
});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
'Activate',
|
|
3
|
-
'AddUndo',
|
|
4
|
-
'BeforeAddUndo',
|
|
5
|
-
'BeforeExecCommand',
|
|
6
|
-
'BeforeGetContent',
|
|
7
|
-
'BeforeRenderUI',
|
|
8
|
-
'BeforeSetContent',
|
|
9
|
-
'BeforePaste',
|
|
10
|
-
'Blur',
|
|
11
|
-
'Change',
|
|
12
|
-
'ClearUndos',
|
|
13
|
-
'Click',
|
|
14
|
-
'ContextMenu',
|
|
15
|
-
'Copy',
|
|
16
|
-
'Cut',
|
|
17
|
-
'Dblclick',
|
|
18
|
-
'Deactivate',
|
|
19
|
-
'Dirty',
|
|
20
|
-
'Drag',
|
|
21
|
-
'DragDrop',
|
|
22
|
-
'DragEnd',
|
|
23
|
-
'DragGesture',
|
|
24
|
-
'DragOver',
|
|
25
|
-
'Drop',
|
|
26
|
-
'ExecCommand',
|
|
27
|
-
'Focus',
|
|
28
|
-
'FocusIn',
|
|
29
|
-
'FocusOut',
|
|
30
|
-
'GetContent',
|
|
31
|
-
'Hide',
|
|
32
|
-
'Init',
|
|
33
|
-
'KeyDown',
|
|
34
|
-
'KeyPress',
|
|
35
|
-
'KeyUp',
|
|
36
|
-
'LoadContent',
|
|
37
|
-
'MouseDown',
|
|
38
|
-
'MouseEnter',
|
|
39
|
-
'MouseLeave',
|
|
40
|
-
'MouseMove',
|
|
41
|
-
'MouseOut',
|
|
42
|
-
'MouseOver',
|
|
43
|
-
'MouseUp',
|
|
44
|
-
'NodeChange',
|
|
45
|
-
'ObjectResizeStart',
|
|
46
|
-
'ObjectResized',
|
|
47
|
-
'ObjectSelected',
|
|
48
|
-
'Paste',
|
|
49
|
-
'PostProcess',
|
|
50
|
-
'PostRender',
|
|
51
|
-
'PreProcess',
|
|
52
|
-
'ProgressState',
|
|
53
|
-
'Redo',
|
|
54
|
-
'Remove',
|
|
55
|
-
'Reset',
|
|
56
|
-
'SaveContent',
|
|
57
|
-
'SelectionChange',
|
|
58
|
-
'SetAttrib',
|
|
59
|
-
'SetContent',
|
|
60
|
-
'Show',
|
|
61
|
-
'Submit',
|
|
62
|
-
'Undo',
|
|
63
|
-
'VisualAid'
|
|
64
|
-
];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export default function (callback) {
|
|
2
|
-
const pluginmanager = window.tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
3
|
-
const pluginname = "mapomedia"
|
|
4
|
-
pluginmanager.add(pluginname, function (editor, url) {
|
|
5
|
-
const conf = {
|
|
6
|
-
icon: 'image',
|
|
7
|
-
tooltip: 'Insert image/video/audio/docs',
|
|
8
|
-
onAction: () => callback().then(html => {
|
|
9
|
-
editor.focus();
|
|
10
|
-
editor.undoManager.transact(() => editor.selection.setContent(html))
|
|
11
|
-
editor.selection.setCursorLocation();
|
|
12
|
-
editor.nodeChanged();
|
|
13
|
-
}).catch(() => null)
|
|
14
|
-
}
|
|
15
|
-
editor.addCommand('mceMapoMedia', () => callback().then(html => {
|
|
16
|
-
editor.focus();
|
|
17
|
-
editor.undoManager.transact(() => editor.selection.setContent(html))
|
|
18
|
-
editor.selection.setCursorLocation();
|
|
19
|
-
editor.nodeChanged();
|
|
20
|
-
}).catch(() => null))
|
|
21
|
-
editor.ui.registry.addButton(pluginname, conf);
|
|
22
|
-
editor.ui.registry.addMenuItem(pluginname, { text: "Mapo Media...", ...conf });
|
|
23
|
-
return {
|
|
24
|
-
getMetadata: function () {
|
|
25
|
-
return {
|
|
26
|
-
name: "Mapo Media",
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default async function () {
|
|
2
|
-
return new Promise((resolve, reject) => {
|
|
3
|
-
if (typeof window.tinymce !== 'undefined'){
|
|
4
|
-
resolve()
|
|
5
|
-
}
|
|
6
|
-
let scriptTag = document.getElementById("tinymce-script") || null
|
|
7
|
-
const handler = () => {
|
|
8
|
-
scriptTag.removeEventListener('load', handler);
|
|
9
|
-
resolve()
|
|
10
|
-
};
|
|
11
|
-
if (!scriptTag) {
|
|
12
|
-
try {
|
|
13
|
-
scriptTag = document.createElement('script');
|
|
14
|
-
scriptTag.referrerPolicy = 'origin';
|
|
15
|
-
scriptTag.type = 'application/javascript';
|
|
16
|
-
scriptTag.id = 'tinymce-script';
|
|
17
|
-
scriptTag.src = "https://cdn.tiny.cloud/1/y3orc2on59mn794gzviet9lpuj9sr051d0045ir9bmrixn3o/tinymce/5/tinymce.min.js";
|
|
18
|
-
// scriptTag.src = "https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js";
|
|
19
|
-
scriptTag.async = true
|
|
20
|
-
scriptTag.addEventListener('load', handler);
|
|
21
|
-
document.head.appendChild(scriptTag);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
reject(error)
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
scriptTag.addEventListener('load', handler);
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
}
|