From 6424358f3546ea43b680e78eb7511f902224a5ce Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Fri, 18 Oct 2024 11:14:29 +0000 Subject: [PATCH] Bug 37911: (follow-up) Remove example islands for core submission Signed-off-by: Paul Derscheid --- .../prog/en/modules/intranet-main.tt | 37 +----- .../vue/components/Islands/DialogIsland.vue | 107 ------------------ .../vue/components/Islands/HelloIslands.vue | 56 --------- .../js/vue/components/Islands/HelloWorld.vue | 18 --- .../prog/js/vue/modules/islands.ts | 64 ++++------- .../intranet-tmpl/prog/js/vue/stores/main.js | 1 - .../prog/js/vue/stores/navigation.js | 1 - 7 files changed, 21 insertions(+), 263 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/DialogIsland.vue delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloIslands.vue delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/HelloWorld.vue 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 9d1b6592799..fff114fb1f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -301,51 +301,16 @@ -
-

🚧 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 35986463037..00000000000 --- 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 ef83b0dbe07..00000000000 --- 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 51b5fbc732d..00000000000 --- 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 9a96915af84..af004592a29 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 b9317d79721..7a0c9e65166 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/main.js @@ -12,7 +12,6 @@ export const useMainStore = defineStore("main", { displayed_already: false, _is_submitting: false, _is_loading: false, - stringFromStore: "Hello from main store", }), actions: { setMessage(message, displayed = false) { 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 e76802b7e2e..1e3ecb58b36 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/navigation.js @@ -11,7 +11,6 @@ export const useNavigationStore = defineStore("navigation", { }, current: null, params: {}, - anotherStoreString: "Hello from nav store", }), actions: { setRoutes(routesDef) { -- 2.39.3 (Apple Git-146)