From a7e54577b5e94c77930e7dce02bb930643f3eb0d Mon Sep 17 00:00:00 2001 From: John Cowen Date: Wed, 22 Jan 2025 12:50:31 +0000 Subject: [PATCH] fix(deps): uses defineSlots macro over useSlots (#3444) Required for https://github.com/kumahq/kuma-gui/pull/3336 I got a bit more time to look at https://github.com/kumahq/kuma-gui/pull/3336 and it looks like Vue folks are moving more and more to macro-based `defineSlots` for defining slots. Moving everything to use defineSlots worked in most areas and I only had to define the types also for areas where we actually need the type information, otherwise defineSlots is a `Record` (see https://vuejs-language-tools.vercel.app/features/slots#how-to-handle-indeterminate-slot-types) There 'may' be some other places where it would be advantageous to define our slots as more than `Record` but for the moment this is enough to unblock the upgrade. We can add any more type information if required in later PRs. Also see https://vuejs.org/api/sfc-script-setup#defineslots Signed-off-by: John Cowen --- .../app-collection/AppCollection.vue | 11 +++--- .../components/app-view/AppView.vue | 17 ++++++---- .../components/data-source/DataLoader.vue | 34 ++++++++++++++++--- .../kuma-gui/src/app/common/ErrorBlock.vue | 10 +++--- .../src/app/common/ResourceStatus.vue | 3 +- .../app/kuma/components/ApplicationShell.vue | 8 +++-- .../x/components/x-about-card/XAboutCard.vue | 11 ++++-- .../x-action-group/XActionGroup.vue | 3 +- .../src/app/x/components/x-alert/XAlert.vue | 8 ++--- .../components/x-breadcrumbs/XBreadcrumbs.vue | 3 +- .../x/components/x-code-block/XCodeBlock.vue | 5 +-- .../components/x-empty-state/XEmptyState.vue | 6 ++-- .../src/app/x/components/x-i18n/XI18n.vue | 4 +-- .../src/app/x/components/x-modal/XModal.vue | 3 +- .../src/app/x/components/x-select/XSelect.vue | 4 +-- .../src/app/x/components/x-tabs/XTabs.vue | 12 +++---- 16 files changed, 93 insertions(+), 49 deletions(-) diff --git a/packages/kuma-gui/src/app/application/components/app-collection/AppCollection.vue b/packages/kuma-gui/src/app/application/components/app-collection/AppCollection.vue index ae418654a..1816c3ec9 100644 --- a/packages/kuma-gui/src/app/application/components/app-collection/AppCollection.vue +++ b/packages/kuma-gui/src/app/application/components/app-collection/AppCollection.vue @@ -29,13 +29,12 @@ @@ -43,7 +42,7 @@