diff --git a/packages/x-components/src/components/__tests__/no-element.spec.ts b/packages/x-components/src/components/__tests__/no-element.spec.ts
deleted file mode 100644
index e9febd19d5..0000000000
--- a/packages/x-components/src/components/__tests__/no-element.spec.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { mount } from '@vue/test-utils';
-import { getDataTestSelector } from '../../__tests__/utils';
-import { NoElement } from '../no-element';
-
-describe('testing no component', () => {
- it('renders the first node passed in the default slot and bind the css classes', () => {
- const wrapper = mount({
- template: `
-
- test
- `,
- components: {
- NoElement
- }
- });
- expect(wrapper.find(getDataTestSelector('node')).element).toBeDefined();
- expect(wrapper.find(getDataTestSelector('node')).classes()).toEqual(['test']);
- });
-});
diff --git a/packages/x-components/src/components/animations/index.ts b/packages/x-components/src/components/animations/index.ts
index 26240a7f04..2c4fb0a84c 100644
--- a/packages/x-components/src/components/animations/index.ts
+++ b/packages/x-components/src/components/animations/index.ts
@@ -4,6 +4,7 @@ export { default as CollapseWidth } from './collapse-width.vue';
export { default as CrossFade } from './cross-fade.vue';
export { default as Fade } from './fade.vue';
export { default as FadeAndSlide } from './fade-and-slide.vue';
+export { default as NoAnimation } from './no-animation.vue';
export { default as StaggeredFadeAndSlide } from './staggered-fade-and-slide.vue';
export { default as StaggeringTransitionGroup } from './staggering-transition-group.vue';
export { createDirectionalAnimationFactory } from './create-directional-animation-factory';
diff --git a/packages/x-components/src/components/animations/no-animation.vue b/packages/x-components/src/components/animations/no-animation.vue
new file mode 100644
index 0000000000..86034a9501
--- /dev/null
+++ b/packages/x-components/src/components/animations/no-animation.vue
@@ -0,0 +1,14 @@
+
diff --git a/packages/x-components/src/components/base-dropdown.vue b/packages/x-components/src/components/base-dropdown.vue
index b40341033d..4bacbb459c 100644
--- a/packages/x-components/src/components/base-dropdown.vue
+++ b/packages/x-components/src/components/base-dropdown.vue
@@ -80,11 +80,8 @@
import { Identifiable } from '@empathyco/x-types';
import { computed, defineComponent, nextTick, onBeforeUnmount, PropType, ref, watch } from 'vue';
import { AnimationProp } from '../types';
- import { getTargetElement } from '../utils/html';
- import { normalizeString } from '../utils/normalize';
- import { isInRange } from '../utils/number';
- import { debounce as debounceFunction } from '../utils/debounce';
- import { NoElement } from './no-element';
+ import { debounceFunction, normalizeString, getTargetElement, isInRange } from '../utils';
+ import { NoAnimation } from './animations';
type DropdownItem = string | number | Identifiable;
let dropdownCount = 0;
@@ -95,7 +92,6 @@
*/
export default defineComponent({
name: 'BaseDropdown',
- components: { NoElement },
props: {
/** List of items to display.*/
items: {
@@ -117,7 +113,7 @@
*/
animation: {
type: AnimationProp,
- default: () => NoElement
+ default: () => NoAnimation
},
/** Time to wait without receiving any keystroke before resetting the items search query. */
searchTimeoutMs: {
diff --git a/packages/x-components/src/components/display-emitter.vue b/packages/x-components/src/components/display-emitter.vue
index 720c9a0506..59a9d1e667 100644
--- a/packages/x-components/src/components/display-emitter.vue
+++ b/packages/x-components/src/components/display-emitter.vue
@@ -2,7 +2,6 @@
import {
defineComponent,
getCurrentInstance,
- h,
onMounted,
onUnmounted,
PropType,
@@ -30,7 +29,7 @@
let unwatchDisplay: WatchStopHandle | undefined;
onMounted(() => {
- const element = getCurrentInstance()?.proxy.$el as HTMLElement | undefined;
+ const element = getCurrentInstance()?.proxy?.$el as HTMLElement | undefined;
if (element) {
unwatchDisplay = useEmitDisplayEvent({
element,
diff --git a/packages/x-components/src/components/filters/labels/base-price-filter-label.vue b/packages/x-components/src/components/filters/labels/base-price-filter-label.vue
index 40de7cfa04..048330fc5e 100644
--- a/packages/x-components/src/components/filters/labels/base-price-filter-label.vue
+++ b/packages/x-components/src/components/filters/labels/base-price-filter-label.vue
@@ -1,5 +1,5 @@
diff --git a/packages/x-components/src/components/index.ts b/packages/x-components/src/components/index.ts
index 911e226bae..3f751fbb89 100644
--- a/packages/x-components/src/components/index.ts
+++ b/packages/x-components/src/components/index.ts
@@ -24,7 +24,6 @@ export { default as GlobalXBus } from './global-x-bus.vue';
export { default as Highlight } from './highlight.vue';
export { default as ItemsList } from './items-list.vue';
export { default as LocationProvider } from './location-provider.vue';
-export { NoElement } from './no-element';
export { default as SlidingPanel } from './sliding-panel.vue';
export { default as SnippetCallbacks } from './snippet-callbacks.vue';
export { default as PageLoaderButton } from './page-loader-button.vue';
diff --git a/packages/x-components/src/components/location-provider.vue b/packages/x-components/src/components/location-provider.vue
index 0dc38d159b..74568b3d77 100644
--- a/packages/x-components/src/components/location-provider.vue
+++ b/packages/x-components/src/components/location-provider.vue
@@ -1,7 +1,6 @@
diff --git a/packages/x-components/src/components/modals/base-events-modal.vue b/packages/x-components/src/components/modals/base-events-modal.vue
index 4d4a7fe449..db99852842 100644
--- a/packages/x-components/src/components/modals/base-events-modal.vue
+++ b/packages/x-components/src/components/modals/base-events-modal.vue
@@ -1,6 +1,5 @@
-
-
-
-
-
-
+
diff --git a/packages/x-components/src/components/modals/base-id-modal-open.vue b/packages/x-components/src/components/modals/base-id-modal-open.vue
index 0c4e201c57..acc11f96a7 100644
--- a/packages/x-components/src/components/modals/base-id-modal-open.vue
+++ b/packages/x-components/src/components/modals/base-id-modal-open.vue
@@ -1,27 +1,17 @@
-
-
-
-
-
-
+
diff --git a/packages/x-components/src/components/modals/base-id-modal.vue b/packages/x-components/src/components/modals/base-id-modal.vue
index 4525b49d41..e52d10d1e1 100644
--- a/packages/x-components/src/components/modals/base-id-modal.vue
+++ b/packages/x-components/src/components/modals/base-id-modal.vue
@@ -1,6 +1,5 @@
diff --git a/packages/x-components/src/components/result/result-variants-provider.vue b/packages/x-components/src/components/result/result-variants-provider.vue
index 52f602e9df..25bb9d0663 100644
--- a/packages/x-components/src/components/result/result-variants-provider.vue
+++ b/packages/x-components/src/components/result/result-variants-provider.vue
@@ -1,5 +1,5 @@
diff --git a/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue b/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue
index ce1f68ca5e..14dcf09b07 100644
--- a/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue
+++ b/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue
@@ -1,6 +1,6 @@
diff --git a/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue b/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue
index 78fa8603c1..33a888a9bc 100644
--- a/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue
+++ b/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue
@@ -1,6 +1,6 @@
diff --git a/packages/x-components/src/x-modules/facets/components/preselected-filters.vue b/packages/x-components/src/x-modules/facets/components/preselected-filters.vue
index 6c4c3b879e..2fe31022e6 100644
--- a/packages/x-components/src/x-modules/facets/components/preselected-filters.vue
+++ b/packages/x-components/src/x-modules/facets/components/preselected-filters.vue
@@ -4,7 +4,6 @@
import { isArrayEmpty } from '../../../utils/array';
import { SnippetConfig } from '../../../x-installer/api/api.types';
import { useXBus } from '../../../composables/use-x-bus';
- import { useNoElementRender } from '../../../composables';
import { facetsXModule } from '../x-module';
/**
@@ -70,7 +69,7 @@
*/
watch(preselectedFilters, emitPreselectedFilters, { immediate: true });
- return () => useNoElementRender(slots);
+ return () => slots.default?.()[0] ?? '';
}
});
diff --git a/packages/x-components/src/x-modules/history-queries/components/history-queries.vue b/packages/x-components/src/x-modules/history-queries/components/history-queries.vue
index 1243fc01f6..69f260b6d8 100644
--- a/packages/x-components/src/x-modules/history-queries/components/history-queries.vue
+++ b/packages/x-components/src/x-modules/history-queries/components/history-queries.vue
@@ -1,6 +1,5 @@
-
-
-
+
-
- -
-
-
- {{ result.name }}
-
-
-
-
-
+
+
+ {{ result.name }}
+
+
+
diff --git a/packages/x-components/src/x-modules/query-suggestions/components/query-suggestions.vue b/packages/x-components/src/x-modules/query-suggestions/components/query-suggestions.vue
index e7c83f2079..5933572d20 100644
--- a/packages/x-components/src/x-modules/query-suggestions/components/query-suggestions.vue
+++ b/packages/x-components/src/x-modules/query-suggestions/components/query-suggestions.vue
@@ -1,6 +1,5 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/packages/x-components/src/x-modules/scroll/components/main-scroll.vue b/packages/x-components/src/x-modules/scroll/components/main-scroll.vue
index 745ec33f5a..991d0e899c 100644
--- a/packages/x-components/src/x-modules/scroll/components/main-scroll.vue
+++ b/packages/x-components/src/x-modules/scroll/components/main-scroll.vue
@@ -3,7 +3,6 @@
computed,
defineComponent,
getCurrentInstance,
- h,
onBeforeUnmount,
onMounted,
provide,
diff --git a/packages/x-components/src/x-modules/scroll/components/scroll-to-top.vue b/packages/x-components/src/x-modules/scroll/components/scroll-to-top.vue
index 623c91ae7e..9afae11466 100644
--- a/packages/x-components/src/x-modules/scroll/components/scroll-to-top.vue
+++ b/packages/x-components/src/x-modules/scroll/components/scroll-to-top.vue
@@ -2,7 +2,6 @@
import { computed, defineComponent } from 'vue';
- import BaseEventButton from '../../../components/base-event-button.vue';
- import { NoElement } from '../../../components/no-element';
+ import { NoAnimation, BaseEventButton } from '../../../components';
import { XEventsTypes } from '../../../wiring';
import { scrollXModule } from '../x-module';
- import { AnimationProp } from '../../../types/animation-prop';
- import { useState } from '../../../composables/use-state';
+ import { AnimationProp } from '../../../types';
+ import { useState } from '../../../composables';
import { MainScrollId } from './scroll.const';
/**
@@ -42,7 +40,7 @@
*/
animation: {
type: AnimationProp,
- default: () => NoElement
+ default: () => NoAnimation
},
/**
* Threshold in pixels from the top to show the button.
diff --git a/packages/x-components/src/x-modules/semantic-queries/components/semantic-queries.vue b/packages/x-components/src/x-modules/semantic-queries/components/semantic-queries.vue
index b2f345b75b..8032eefcd9 100644
--- a/packages/x-components/src/x-modules/semantic-queries/components/semantic-queries.vue
+++ b/packages/x-components/src/x-modules/semantic-queries/components/semantic-queries.vue
@@ -1,52 +1,34 @@
-
-
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
-
+