diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index a4d66045f7..388d49eed2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -331,54 +331,14 @@ -
-

🚧 Static Page with Vue Components 🚧

- - -
- -
-

- Uncomment me in intranet-main.tt 👇
- -<!-- <hello-world></hello-world> -->
- +<hello-world></hello-world> -

- -
- - -
- - -
- [% MACRO jsinclude BLOCK %] [% INCLUDE 'calendar.inc' %] - [% Asset.js("js/vue/dist/islands.js", "init" => "1") | $raw %] - [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/DialogIsland.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/DialogIsland.vue deleted file mode 100644 index dd9a5da0a6..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/DialogIsland.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloIslands.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloIslands.vue deleted file mode 100644 index db824ba6d7..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloIslands.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloWorld.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloWorld.vue deleted file mode 100644 index 91494fb47e..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloWorld.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts index 9a96915af8..af004592a2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts @@ -19,52 +19,28 @@ type WebComponentDynamicImport = { /** * A registry for Vue components. * @type {Map} + * @property {string} key - The name of the component. + * @property {WebComponentDynamicImport} value - The configuration for the component. Includes the import function and optional configuration. + * @example + * // + * [ + * "hello-islands", + * { + * importFn: async () => { + * const module = await import( + * /* webpackChunkName: "hello-islands" */ +/** "../components/Islands/HelloIslands.vue" + * ); + * return module.default; + * }, + * config: { + * stores: ["mainStore", "navigationStore"], + * }, + * }, + * ], */ export const componentRegistry: Map = - new Map([ - [ - "hello-islands", - { - importFn: async () => { - const module = await import( - /* webpackChunkName: "hello-islands" */ - "../components/Islands/HelloIslands.vue" - ); - return module.default; - }, - config: { - stores: ["mainStore", "navigationStore"], - }, - }, - ], - [ - "hello-world", - { - importFn: async () => { - const module = await import( - /* webpackChunkName: "hello-world" */ - "../components/Islands/HelloWorld.vue" - ); - return module.default; - }, - }, - ], - [ - "dialog-island", - { - importFn: async () => { - const module = await import( - /* webpackChunkName: "vue-dialog" */ - "../components/Islands/DialogIsland.vue" - ); - return module.default; - }, - config: { - stores: ["mainStore"], - }, - }, - ], - ]); + new Map([]); /** * Hydrates custom elements by scanning the document and loading only necessary components. diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js index faceee6291..5734266b3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js @@ -13,7 +13,6 @@ export const useMainStore = defineStore("main", () => { displayed_already: false, is_submitting: false, is_loading: false, - stringFromStore: "Hello from main store", }); const actions = { diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js index 7c6fc27e56..d6da86988f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js @@ -12,7 +12,6 @@ export const useNavigationStore = defineStore("navigation", () => { }, current: null, params: {}, - anotherStoreString: "Hello from nav store", }); const actions = { setRoutes(routesDef) {