@empathyco/x-components 6.0.0-alpha.238 → 6.0.0-alpha.239
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/CHANGELOG.md +11 -0
- package/core/index.d.ts +0 -1
- package/docs/API-reference/api/x-components.allfilter.md +1 -1
- package/docs/API-reference/api/x-components.highlight_2.md +1 -1
- package/docs/API-reference/api/x-components.slidingpanel.md +2 -2
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +1 -1
- package/docs/API-reference/components/common/x-components.base-slider.md +2 -2
- package/js/components/animations/change-height.vue.js.map +1 -1
- package/js/components/animations/change-height.vue2.js.map +1 -1
- package/js/components/auto-progress-bar.vue.js +2 -2
- package/js/components/auto-progress-bar.vue.js.map +1 -1
- package/js/components/auto-progress-bar.vue2.js.map +1 -1
- package/js/components/base-slider.vue.js.map +1 -1
- package/js/components/base-slider.vue2.js.map +1 -1
- package/js/components/base-slider.vue3.js +1 -1
- package/js/components/base-switch.vue.js.map +1 -1
- package/js/components/base-switch.vue2.js +1 -1
- package/js/components/base-switch.vue2.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue.js +2 -2
- package/js/components/column-picker/base-column-picker-list.vue.js.map +1 -1
- package/js/components/column-picker/base-column-picker-list.vue2.js +1 -1
- package/js/components/column-picker/base-column-picker-list.vue2.js.map +1 -1
- package/js/components/highlight.vue.js +1 -1
- package/js/components/highlight.vue.js.map +1 -1
- package/js/components/highlight.vue2.js +1 -1
- package/js/components/highlight.vue2.js.map +1 -1
- package/js/components/icons/ai-star.vue.js +1 -0
- package/js/components/icons/ai-star.vue.js.map +1 -1
- package/js/components/icons/arrow-down.vue.js +1 -1
- package/js/components/icons/arrow-down.vue.js.map +1 -1
- package/js/components/icons/arrow-left.vue.js +1 -1
- package/js/components/icons/arrow-left.vue.js.map +1 -1
- package/js/components/icons/arrow-right.vue.js +1 -1
- package/js/components/icons/arrow-right.vue.js.map +1 -1
- package/js/components/icons/arrow-up.vue.js +1 -1
- package/js/components/icons/arrow-up.vue.js.map +1 -1
- package/js/components/icons/bag.vue.js +1 -1
- package/js/components/icons/bag.vue.js.map +1 -1
- package/js/components/icons/bar-code.vue.js +1 -1
- package/js/components/icons/bar-code.vue.js.map +1 -1
- package/js/components/icons/barcode-tiny.vue.js +1 -1
- package/js/components/icons/barcode-tiny.vue.js.map +1 -1
- package/js/components/icons/cart-filled.vue.js +1 -1
- package/js/components/icons/cart-filled.vue.js.map +1 -1
- package/js/components/icons/cart.vue.js +1 -1
- package/js/components/icons/cart.vue.js.map +1 -1
- package/js/components/icons/check-tiny.vue.js +1 -1
- package/js/components/icons/check-tiny.vue.js.map +1 -1
- package/js/components/icons/check.vue.js +1 -1
- package/js/components/icons/check.vue.js.map +1 -1
- package/js/components/icons/checkbox-selected-filled.vue.js +1 -1
- package/js/components/icons/checkbox-selected-filled.vue.js.map +1 -1
- package/js/components/icons/checkbox-selected.vue.js +1 -1
- package/js/components/icons/checkbox-selected.vue.js.map +1 -1
- package/js/components/icons/checkbox-unselected-filled.vue.js +1 -1
- package/js/components/icons/checkbox-unselected-filled.vue.js.map +1 -1
- package/js/components/icons/checkbox-unselected.vue.js +1 -1
- package/js/components/icons/checkbox-unselected.vue.js.map +1 -1
- package/js/components/icons/chevron-down.vue.js +1 -1
- package/js/components/icons/chevron-down.vue.js.map +1 -1
- package/js/components/icons/chevron-left.vue.js +1 -1
- package/js/components/icons/chevron-left.vue.js.map +1 -1
- package/js/components/icons/chevron-right.vue.js +1 -1
- package/js/components/icons/chevron-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-down.vue.js +1 -1
- package/js/components/icons/chevron-tiny-down.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-left.vue.js +1 -1
- package/js/components/icons/chevron-tiny-left.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-right.vue.js +1 -1
- package/js/components/icons/chevron-tiny-right.vue.js.map +1 -1
- package/js/components/icons/chevron-tiny-up.vue.js +1 -1
- package/js/components/icons/chevron-tiny-up.vue.js.map +1 -1
- package/js/components/icons/chevron-up.vue.js +1 -1
- package/js/components/icons/chevron-up.vue.js.map +1 -1
- package/js/components/icons/corner-arrow-left.vue.js +1 -1
- package/js/components/icons/corner-arrow-left.vue.js.map +1 -1
- package/js/components/icons/corner-arrow-right.vue.js +1 -1
- package/js/components/icons/corner-arrow-right.vue.js.map +1 -1
- package/js/components/icons/cross-tiny.vue.js +1 -1
- package/js/components/icons/cross-tiny.vue.js.map +1 -1
- package/js/components/icons/cross.vue.js +1 -1
- package/js/components/icons/cross.vue.js.map +1 -1
- package/js/components/icons/curated-check-filled.vue.js +1 -1
- package/js/components/icons/curated-check-filled.vue.js.map +1 -1
- package/js/components/icons/curated-check-tiny-filled.vue.js +1 -1
- package/js/components/icons/curated-check-tiny-filled.vue.js.map +1 -1
- package/js/components/icons/curated-check-tiny.vue.js +1 -1
- package/js/components/icons/curated-check-tiny.vue.js.map +1 -1
- package/js/components/icons/curated-check.vue.js +1 -1
- package/js/components/icons/curated-check.vue.js.map +1 -1
- package/js/components/icons/diagonal-arrow-left-down.vue.js +1 -1
- package/js/components/icons/diagonal-arrow-left-down.vue.js.map +1 -1
- package/js/components/icons/diagonal-arrow-left-top.vue.js +1 -1
- package/js/components/icons/diagonal-arrow-left-top.vue.js.map +1 -1
- package/js/components/icons/diagonal-arrow-right-down.vue.js +1 -1
- package/js/components/icons/diagonal-arrow-right-down.vue.js.map +1 -1
- package/js/components/icons/diagonal-arrow-right-top.vue.js +1 -1
- package/js/components/icons/diagonal-arrow-right-top.vue.js.map +1 -1
- package/js/components/icons/filters.vue.js +1 -1
- package/js/components/icons/filters.vue.js.map +1 -1
- package/js/components/icons/grid-1-col.vue.js +1 -1
- package/js/components/icons/grid-1-col.vue.js.map +1 -1
- package/js/components/icons/grid-2-col.vue.js +1 -1
- package/js/components/icons/grid-2-col.vue.js.map +1 -1
- package/js/components/icons/grid-2-rows.vue.js +1 -1
- package/js/components/icons/grid-2-rows.vue.js.map +1 -1
- package/js/components/icons/grid-4-col.vue.js +1 -1
- package/js/components/icons/grid-4-col.vue.js.map +1 -1
- package/js/components/icons/heart-filled.vue.js +1 -1
- package/js/components/icons/heart-filled.vue.js.map +1 -1
- package/js/components/icons/heart.vue.js +1 -1
- package/js/components/icons/heart.vue.js.map +1 -1
- package/js/components/icons/hide.vue.js +1 -1
- package/js/components/icons/hide.vue.js.map +1 -1
- package/js/components/icons/history-tiny.vue.js +1 -1
- package/js/components/icons/history-tiny.vue.js.map +1 -1
- package/js/components/icons/history.vue.js +1 -1
- package/js/components/icons/history.vue.js.map +1 -1
- package/js/components/icons/light-bulb-off.vue.js +1 -1
- package/js/components/icons/light-bulb-off.vue.js.map +1 -1
- package/js/components/icons/light-bulb-on.vue.js +1 -1
- package/js/components/icons/light-bulb-on.vue.js.map +1 -1
- package/js/components/icons/menu.vue.js +1 -1
- package/js/components/icons/menu.vue.js.map +1 -1
- package/js/components/icons/minus-tiny.vue.js +1 -1
- package/js/components/icons/minus-tiny.vue.js.map +1 -1
- package/js/components/icons/minus.vue.js +1 -1
- package/js/components/icons/minus.vue.js.map +1 -1
- package/js/components/icons/plus-tiny.vue.js +1 -1
- package/js/components/icons/plus-tiny.vue.js.map +1 -1
- package/js/components/icons/plus.vue.js +1 -1
- package/js/components/icons/plus.vue.js.map +1 -1
- package/js/components/icons/radiobutton-selected.vue.js +1 -1
- package/js/components/icons/radiobutton-selected.vue.js.map +1 -1
- package/js/components/icons/radiobutton-unselected.vue.js +1 -1
- package/js/components/icons/radiobutton-unselected.vue.js.map +1 -1
- package/js/components/icons/search-tiny.vue.js +1 -1
- package/js/components/icons/search-tiny.vue.js.map +1 -1
- package/js/components/icons/search.vue.js +1 -1
- package/js/components/icons/search.vue.js.map +1 -1
- package/js/components/icons/settings.vue.js +1 -1
- package/js/components/icons/settings.vue.js.map +1 -1
- package/js/components/icons/show.vue.js +1 -1
- package/js/components/icons/show.vue.js.map +1 -1
- package/js/components/icons/sort-az.vue.js +1 -1
- package/js/components/icons/sort-az.vue.js.map +1 -1
- package/js/components/icons/sort-price-down.vue.js +1 -1
- package/js/components/icons/sort-price-down.vue.js.map +1 -1
- package/js/components/icons/sort-price-up.vue.js +1 -1
- package/js/components/icons/sort-price-up.vue.js.map +1 -1
- package/js/components/icons/sort-relevancy.vue.js +1 -1
- package/js/components/icons/sort-relevancy.vue.js.map +1 -1
- package/js/components/icons/sort-za.vue.js +1 -1
- package/js/components/icons/sort-za.vue.js.map +1 -1
- package/js/components/icons/spinner.vue.js +1 -1
- package/js/components/icons/spinner.vue.js.map +1 -1
- package/js/components/icons/star-filled.vue.js +1 -1
- package/js/components/icons/star-filled.vue.js.map +1 -1
- package/js/components/icons/star.vue.js +1 -1
- package/js/components/icons/star.vue.js.map +1 -1
- package/js/components/icons/tag-filled.vue.js +1 -1
- package/js/components/icons/tag-filled.vue.js.map +1 -1
- package/js/components/icons/tag.vue.js +1 -1
- package/js/components/icons/tag.vue.js.map +1 -1
- package/js/components/icons/trash-open.vue.js +1 -1
- package/js/components/icons/trash-open.vue.js.map +1 -1
- package/js/components/icons/trash.vue.js +1 -1
- package/js/components/icons/trash.vue.js.map +1 -1
- package/js/components/icons/trending-tiny.vue.js +1 -1
- package/js/components/icons/trending-tiny.vue.js.map +1 -1
- package/js/components/icons/trending.vue.js +1 -1
- package/js/components/icons/trending.vue.js.map +1 -1
- package/js/components/icons/user-filled.vue.js +1 -1
- package/js/components/icons/user-filled.vue.js.map +1 -1
- package/js/components/icons/user.vue.js +1 -1
- package/js/components/icons/user.vue.js.map +1 -1
- package/js/components/layouts/multi-column-max-width-layout.vue4.js +1 -1
- package/js/components/layouts/single-column-layout.vue3.js +1 -1
- package/js/components/modals/base-events-modal-close.vue.js +1 -1
- package/js/components/modals/base-events-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-close.vue2.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue.js +1 -1
- package/js/components/modals/base-events-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-events-modal-open.vue2.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue.js +1 -1
- package/js/components/modals/base-id-modal-close.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-close.vue2.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue.js +1 -1
- package/js/components/modals/base-id-modal-open.vue.js.map +1 -1
- package/js/components/modals/base-id-modal-open.vue2.js.map +1 -1
- package/js/components/page-loader-button.vue.js +1 -1
- package/js/components/page-loader-button.vue.js.map +1 -1
- package/js/components/page-loader-button.vue2.js.map +1 -1
- package/js/components/page-selector.vue.js +3 -3
- package/js/components/page-selector.vue.js.map +1 -1
- package/js/components/page-selector.vue2.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel-button.vue2.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js +1 -1
- package/js/components/result/base-result-add-to-cart.vue.js.map +1 -1
- package/js/components/result/base-result-add-to-cart.vue2.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +3 -3
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue2.js.map +1 -1
- package/js/components/scroll/base-scroll.vue.js +1 -1
- package/js/components/scroll/base-scroll.vue.js.map +1 -1
- package/js/components/scroll/base-scroll.vue2.js.map +1 -1
- package/js/components/sliding-panel.vue.js +4 -4
- package/js/components/sliding-panel.vue.js.map +1 -1
- package/js/components/sliding-panel.vue2.js +2 -2
- package/js/components/sliding-panel.vue2.js.map +1 -1
- package/js/components/sliding-panel.vue3.js +1 -1
- package/js/x-bus/x-bus.js +1 -3
- package/js/x-bus/x-bus.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue.js +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue2.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue3.js +1 -1
- package/js/x-modules/ai/components/ai-overview.vue.js.map +1 -1
- package/js/x-modules/ai/components/ai-overview.vue2.js.map +1 -1
- package/js/x-modules/ai/components/ai-overview.vue3.js +1 -1
- package/js/x-modules/facets/components/clear-filters.vue.js +1 -1
- package/js/x-modules/facets/components/clear-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/clear-filters.vue2.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue2.js +1 -1
- package/js/x-modules/facets/components/filters/all-filter.vue2.js.map +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js +4 -4
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/filters/editable-number-range-filter.vue2.js.map +1 -1
- package/js/x-modules/facets/components/filters/renderless-filter.vue.js +2 -2
- package/js/x-modules/facets/components/filters/renderless-filter.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue.js +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/filters-search.vue2.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js +1 -1
- package/js/x-modules/facets/components/lists/selected-filters-list.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/selected-filters-list.vue2.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js +2 -2
- package/js/x-modules/facets/components/lists/sliced-filters.vue.js.map +1 -1
- package/js/x-modules/facets/components/lists/sliced-filters.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/clear-history-queries.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue.js +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-queries.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue.js +2 -2
- package/js/x-modules/history-queries/components/history-query.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/history-query.vue2.js.map +1 -1
- package/js/x-modules/history-queries/components/my-history.vue.js +1 -1
- package/js/x-modules/history-queries/components/my-history.vue.js.map +1 -1
- package/js/x-modules/history-queries/components/my-history.vue2.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue.js.map +1 -1
- package/js/x-modules/next-queries/components/next-queries.vue2.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue.js.map +1 -1
- package/js/x-modules/popular-searches/components/popular-searches.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue.js +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-list.vue3.js +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue.js.map +1 -1
- package/js/x-modules/query-suggestions/components/query-suggestions.vue2.js.map +1 -1
- package/js/x-modules/related-prompts/components/related-prompt.vue3.js +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue.js +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue.js.map +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue2.js +1 -1
- package/js/x-modules/related-tags/components/related-tag.vue2.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue.js +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js +1 -1
- package/js/x-modules/search/components/partial-query-button.vue.js.map +1 -1
- package/js/x-modules/search/components/partial-query-button.vue2.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue.js +1 -1
- package/js/x-modules/search/components/sort-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-list.vue2.js.map +1 -1
- package/js/x-modules/search/components/sort-picker-list.vue.js.map +1 -1
- package/js/x-modules/search/components/sort-picker-list.vue2.js +1 -1
- package/js/x-modules/search/components/sort-picker-list.vue2.js.map +1 -1
- package/js/x-modules/search-box/components/clear-search-input.vue.js +1 -1
- package/js/x-modules/search-box/components/clear-search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/clear-search-input.vue2.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue.js +2 -2
- package/js/x-modules/search-box/components/search-button.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-button.vue2.js.map +1 -1
- package/js/x-modules/search-box/components/search-input-placeholder.vue.js +1 -1
- package/js/x-modules/search-box/components/search-input-placeholder.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input-placeholder.vue2.js.map +1 -1
- package/js/x-modules/search-box/components/search-input-placeholder.vue4.js +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js +1 -1
- package/js/x-modules/search-box/components/search-input.vue.js.map +1 -1
- package/js/x-modules/search-box/components/search-input.vue2.js.map +1 -1
- package/package.json +6 -9
- package/report/x-components.api.json +3 -3
- package/report/x-components.api.md +5 -5
- package/types/demo/main.d.ts +1 -1
- package/types/demo/main.d.ts.map +1 -1
- package/types/demo/views/base-config.d.ts.map +1 -1
- package/types/demo/views/home/types.d.ts +0 -3
- package/types/demo/views/home/types.d.ts.map +1 -1
- package/types/demo/vite.config.d.ts.map +1 -1
- package/types/src/components/base-grid.types.d.ts.map +1 -1
- package/types/src/components/column-picker/base-column-picker-list.vue.d.ts +8 -1
- package/types/src/components/column-picker/base-column-picker-list.vue.d.ts.map +1 -1
- package/types/src/components/highlight.vue.d.ts +1 -1
- package/types/src/components/sliding-panel.vue.d.ts +2 -2
- package/types/src/index.d.ts +0 -1
- package/types/src/index.d.ts.map +1 -1
- package/types/src/x-bus/x-bus.d.ts.map +1 -1
- package/types/src/x-modules/facets/components/filters/all-filter.vue.d.ts +1 -1
- package/types/demo/views/adapter.d.ts +0 -3
- package/types/demo/views/adapter.d.ts.map +0 -1
- package/types/src/components/column-picker/base-column-picker-list.types.d.ts +0 -9
- package/types/src/components/column-picker/base-column-picker-list.types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.vue.js","sources":["../../../../../src/x-modules/search-box/components/search-input.vue"],"sourcesContent":["<template>\n <input\n ref=\"inputElement\"\n :maxlength=\"maxLength\"\n :value=\"query\"\n autocomplete=\"off\"\n class=\"x-search-input x-input\"\n enterkeyhint=\"search\"\n inputmode=\"search\"\n type=\"search\"\n data-test=\"search-input\"\n aria-label=\"type your query here\"\n @mouseenter=\"emitUserHoveredInSearchBox\"\n @mouseleave=\"emitUserHoveredOutSearchBox\"\n @blur=\"emitUserBlurredSearchBox\"\n @click=\"emitUserClickedSearchBox\"\n @focus=\"emitUserFocusedSearchBox\"\n @input=\"emitUserIsTypingAQueryEvents\"\n @keydown.enter=\"emitUserPressedEnterKey\"\n @keydown.up.down.prevent=\"emitUserPressedArrowKey\"\n @beforeinput=\"preventSpecialKey\"\n />\n</template>\n\n<script lang=\"ts\">\nimport type { ArrowKey } from '../../../utils'\nimport type { DebouncedFunction } from '../../../utils/types'\nimport type { XEvent } from '../../../wiring/events.types'\nimport type { WireMetadata } from '../../../wiring/wiring.types'\nimport { defineComponent, onMounted, ref } from 'vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { debounce } from '../../../utils/debounce'\nimport { searchBoxXModule } from '../x-module'\n\n/**\n * This component renders an input field that allows the user to type a query. It also reacts to\n * query changes through event listening.\n *\n * @public\n */\nexport default defineComponent({\n name: 'SearchInput',\n xModule: searchBoxXModule.name,\n props: {\n /**\n * Maximum characters allowed in the input search.\n */\n maxLength: {\n type: Number,\n default: 64,\n },\n /**\n * Allows input autofocus when the search field is rendered.\n */\n autofocus: {\n type: Boolean,\n default: true,\n },\n /**\n * Enables the auto-accept query after debounce.\n */\n instant: {\n type: Boolean,\n default: true,\n },\n /**\n * Debounce time for the instant.\n */\n instantDebounceInMs: {\n type: Number,\n default: 500,\n },\n },\n setup(props) {\n const $x = use$x()\n\n const { query } = useState('searchBox')\n\n const inputElement = ref<HTMLInputElement>()\n\n let debouncedUserAcceptedAQuery: DebouncedFunction<[string]>\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n const createEventMetadata = (): Omit<WireMetadata, 'moduleName'> => {\n return {\n target: inputElement.value,\n feature: 'search_box',\n }\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event.\n *\n * @remarks It is necessary in a separated method to use it as the parameter of debounce in\n * emitDebouncedUserAcceptedAQuery method.\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitUserAcceptedAQuery = (query: string): void => {\n $x.emit('UserAcceptedAQuery', query, createEventMetadata())\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event with a debounce configured in\n * `instantDebounceInMs` prop.\n *\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitDebouncedUserAcceptedAQuery = (query: string): void => {\n if (props.instant) {\n if (!debouncedUserAcceptedAQuery) {\n debouncedUserAcceptedAQuery = debounce(emitUserAcceptedAQuery, props.instantDebounceInMs)\n }\n debouncedUserAcceptedAQuery(query)\n }\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredInSearchBox} when search box is hovered in.\n *\n * @internal\n */\n const emitUserHoveredInSearchBox = (): void => {\n $x.emit('UserHoveredInSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredOutSearchBox} when search box is hovered out.\n *\n * @internal\n */\n const emitUserHoveredOutSearchBox = (): void => {\n $x.emit('UserHoveredOutSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserBlurredSearchBox} when search box loses focus.\n *\n * @internal\n */\n const emitUserBlurredSearchBox = (): void => {\n $x.emit('UserBlurredSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserClickedSearchBox} when user clicks the search input.\n *\n * @internal\n */\n const emitUserClickedSearchBox = (): void => {\n $x.emit('UserClickedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserFocusedSearchBox} when search box gains focus.\n *\n * @internal\n */\n const emitUserFocusedSearchBox = (): void => {\n $x.emit('UserFocusedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserIsTypingAQuery} when the user typed/pasted something\n * into the search-box. Also emits event {@link SearchBoxXEvents.UserClearedQuery} when the user\n * removes all characters in the search-box.\n *\n * @internal\n */\n const emitUserIsTypingAQueryEvents = (): void => {\n const query = inputElement.value?.value ?? ''\n\n $x.emit('UserIsTypingAQuery', query, { target: inputElement.value })\n if (query.trim()) {\n emitDebouncedUserAcceptedAQuery(query)\n } else {\n cancelDebouncedUserAcceptedAQuery()\n }\n }\n\n /**\n * Emits event {@link XEventsTypes.UserPressedArrowKey} when the user pressed an arrow key.\n *\n * @param event - The keyboard event with the arrow key pressed.\n * @internal\n */\n const emitUserPressedArrowKey = (event: KeyboardEvent): void => {\n $x.emit('UserPressedArrowKey', event.key as ArrowKey, createEventMetadata())\n }\n\n /**\n * Emits multiple events when the user pressed the enter key.\n *\n * @remarks\n * Emitted events are:\n * {@link SearchBoxXEvents.UserPressedEnterKey}\n * {@link XEventsTypes.UserAcceptedAQuery}\n *\n * @internal\n */\n const emitUserPressedEnterKey = (): void => {\n const query = inputElement.value?.value.trim()\n if (!!query && query.length > 0) {\n $x.emit('UserPressedEnterKey', query, createEventMetadata())\n emitUserAcceptedAQuery(query)\n }\n inputElement.value?.blur()\n }\n\n /**\n * Prevents the user from either typing or pasting special characters in the input field.\n *\n * @internal\n * @param event - The event that will be checked for special characters.\n */\n const preventSpecialKey = (event: InputEvent): void => {\n if (/[<>]/.test(event.data ?? '')) {\n event.preventDefault()\n }\n }\n\n /**\n * When event {@link XEventsTypes.UserReachedEmpathizeTop} or\n * {@link SearchBoxXEvents.UserPressedClearSearchBoxButton}\n * are emitted the search input is focused.\n *\n * @internal\n */\n function focusInput(): void {\n inputElement.value?.focus()\n }\n ;['UserReachedEmpathizeTop', 'UserPressedClearSearchBoxButton'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(focusInput),\n )\n\n /**\n * When event {@link XEventsTypes.UserAcceptedAQuery} or\n * {@link SearchBoxXEvents.UserClearedQuery} are emitted the pending debounced emit\n * {@link XEvent} `UserAcceptedAQuery` is canceled.\n *\n * @internal\n */\n function cancelDebouncedUserAcceptedAQuery(): void {\n debouncedUserAcceptedAQuery?.cancel()\n }\n ;['UserAcceptedAQuery', 'UserClearedQuery'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(cancelDebouncedUserAcceptedAQuery),\n )\n\n onMounted(() => {\n if (props.autofocus) {\n focusInput()\n }\n })\n\n return {\n query,\n inputElement,\n emitUserHoveredInSearchBox,\n emitUserHoveredOutSearchBox,\n emitUserBlurredSearchBox,\n emitUserClickedSearchBox,\n emitUserFocusedSearchBox,\n emitUserIsTypingAQueryEvents,\n emitUserPressedEnterKey,\n emitUserPressedArrowKey,\n preventSpecialKey,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-search-input::-webkit-search-decoration,\n.x-search-input::-webkit-search-cancel-button,\n.x-search-input::-webkit-search-results-button,\n.x-search-input::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserClickedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserBlurredSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserFocusedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserIsTypingAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedEnterKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedArrowKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserAcceptedAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Search service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example of how the search input is rendered.\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <SearchInput />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with props\n\nIn this example, the search input has been limited to accept a maximum of 5 characters, including\nspaces, it won't take the focus when it is rendered, and it will emit the `UserAcceptedAQuery` event\nafter 1000 milliseconds without typing.\n\n_Type a term with more than 5 characters to try it out!_\n\n```vue live\n<template>\n <SearchInput :maxLength=\"5\" :autofocus=\"false\" :instant=\"true\" :instantDebounceInMs=\"1000\" />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with events\n\nIn this example, a message has been added below the search input to illustrate the action performed.\nFor example, if you select the search input box, the message “focus” appears. When you start to\nenter a search term, the message “typing” appears. If you press Enter after typing a search term,\nthe message “enter” appears.\n\n<!-- prettier-ignore-start -->\n:::warning X Events are only emitted from the root X Component.\nAt the moment, X Events are only emitted from the root X Component. This means that if you wrap\nthe `SearchInput` with another component of another module like the `MainScroll`, you should add\nthe listeners to the `MainScroll` instead of the `SearchInput`. If you need to subscribe to these\nevents, it is recommended to use the [`GlobalXBus`](../common/x-components.global-x-bus.md)\ncomponent instead.\n:::\n<!-- prettier-ignore-end -->\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <div>\n <SearchInput\n @UserPressedEnterKey=\"value = 'enter'\"\n @UserFocusedSearchBox=\"hasFocus = true\"\n @UserBlurredSearchBox=\"hasFocus = false\"\n @UserIsTypingAQuery=\"value = 'typing'\"\n />\n <strong>{{ value }}</strong>\n <span>{{ hasFocus ? 'focused' : 'unfocused' }}</span>\n </div>\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { ref } from 'vue'\n\nconst value = ref('')\nconst hasFocus = ref(false)\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `SearchInput` component\ncommunicates with the [`SearchButton`](x-components.search-button.md) and the\n[`ClearSearchInput`](x-components.clear-search-input.md) to offer a full query entry experience.\nFurthermore, you can use it together with the [`QuerySuggestions`](query-suggestions.md) component\nto autocomplete the typed search term.\n\n_Type “trousers” or another fashion term in the input field and then click the clear icon to try it\nout!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex; flex-flow: row nowrap;\">\n <SearchInput />\n <ClearSearchInput>\n <img src=\"/assets/icons/cross.svg\" />\n </ClearSearchInput>\n <SearchButton>Search</SearchButton>\n </div>\n <QuerySuggestions />\n </div>\n</template>\n\n<script setup>\nimport { SearchInput, ClearSearchInput, SearchButton } from '@empathyco/x-components/search-box'\nimport { QuerySuggestions } from '@empathyco/x-components/query-suggestions'\n</script>\n```\n</docs>\n"],"names":["_createElementBlock","_withKeys","_withModifiers"],"mappings":";;;;;;;sBACEA,kBAAA,CAoBE,OAAA,EAAA;AAAA,IAnBA,GAAA,EAAI,cAAA;AAAA,IACH,SAAA,EAAW,IAAA,CAAA,SAAA;AAAA,IACX,KAAA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AAA,IAAA,CAAA,4BAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,IACP,SAAA,EAAO;AAAA,MAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAC,QAAA,CAAA,CAAA,GAAA,IAAA,KAAQ,IAAA,CAAA,uBAAA,IAAA,IAAA,CAAA,uBAAA,CAAA,GAAA,IAAA,CAAA,EAAuB,CAAA,OAAA,CAAA,CAAA,CAAA;AAAA,MAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAAA,QAAA,CAAAC,aAAA,CAAA,CAAA,GAAA,IAAA,KACb,IAAA,CAAA,uBAAA,IAAA,IAAA,CAAA,uBAAA,CAAA,GAAA,IAAA,CAAA,EAAuB,CAAA,SAAA,CAAA,CAAA,EAAA,CAAA,IAAA,EAAA,MAAA,CAAA,CAAA;AAAA,KAAA;AAChD,IAAA,aAAA,EAAW,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAE,IAAA,CAAA,iBAAA,IAAA,IAAA,CAAA,iBAAA,CAAA,GAAA,IAAA,CAAA;AAAA,GAAA,EAAA,IAAA,EAAA,EAAA,EAAA,UAAA,CAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"search-input.vue.js","sources":["../../../../../src/x-modules/search-box/components/search-input.vue"],"sourcesContent":["<template>\n <input\n ref=\"inputElement\"\n :maxlength=\"maxLength\"\n :value=\"query\"\n autocomplete=\"off\"\n class=\"x-search-input xds:input\"\n enterkeyhint=\"search\"\n inputmode=\"search\"\n type=\"search\"\n data-test=\"search-input\"\n aria-label=\"type your query here\"\n @mouseenter=\"emitUserHoveredInSearchBox\"\n @mouseleave=\"emitUserHoveredOutSearchBox\"\n @blur=\"emitUserBlurredSearchBox\"\n @click=\"emitUserClickedSearchBox\"\n @focus=\"emitUserFocusedSearchBox\"\n @input=\"emitUserIsTypingAQueryEvents\"\n @keydown.enter=\"emitUserPressedEnterKey\"\n @keydown.up.down.prevent=\"emitUserPressedArrowKey\"\n @beforeinput=\"preventSpecialKey\"\n />\n</template>\n\n<script lang=\"ts\">\nimport type { ArrowKey } from '../../../utils'\nimport type { DebouncedFunction } from '../../../utils/types'\nimport type { XEvent } from '../../../wiring/events.types'\nimport type { WireMetadata } from '../../../wiring/wiring.types'\nimport { defineComponent, onMounted, ref } from 'vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { debounce } from '../../../utils/debounce'\nimport { searchBoxXModule } from '../x-module'\n\n/**\n * This component renders an input field that allows the user to type a query. It also reacts to\n * query changes through event listening.\n *\n * @public\n */\nexport default defineComponent({\n name: 'SearchInput',\n xModule: searchBoxXModule.name,\n props: {\n /**\n * Maximum characters allowed in the input search.\n */\n maxLength: {\n type: Number,\n default: 64,\n },\n /**\n * Allows input autofocus when the search field is rendered.\n */\n autofocus: {\n type: Boolean,\n default: true,\n },\n /**\n * Enables the auto-accept query after debounce.\n */\n instant: {\n type: Boolean,\n default: true,\n },\n /**\n * Debounce time for the instant.\n */\n instantDebounceInMs: {\n type: Number,\n default: 500,\n },\n },\n setup(props) {\n const $x = use$x()\n\n const { query } = useState('searchBox')\n\n const inputElement = ref<HTMLInputElement>()\n\n let debouncedUserAcceptedAQuery: DebouncedFunction<[string]>\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n const createEventMetadata = (): Omit<WireMetadata, 'moduleName'> => {\n return {\n target: inputElement.value,\n feature: 'search_box',\n }\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event.\n *\n * @remarks It is necessary in a separated method to use it as the parameter of debounce in\n * emitDebouncedUserAcceptedAQuery method.\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitUserAcceptedAQuery = (query: string): void => {\n $x.emit('UserAcceptedAQuery', query, createEventMetadata())\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event with a debounce configured in\n * `instantDebounceInMs` prop.\n *\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitDebouncedUserAcceptedAQuery = (query: string): void => {\n if (props.instant) {\n if (!debouncedUserAcceptedAQuery) {\n debouncedUserAcceptedAQuery = debounce(emitUserAcceptedAQuery, props.instantDebounceInMs)\n }\n debouncedUserAcceptedAQuery(query)\n }\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredInSearchBox} when search box is hovered in.\n *\n * @internal\n */\n const emitUserHoveredInSearchBox = (): void => {\n $x.emit('UserHoveredInSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredOutSearchBox} when search box is hovered out.\n *\n * @internal\n */\n const emitUserHoveredOutSearchBox = (): void => {\n $x.emit('UserHoveredOutSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserBlurredSearchBox} when search box loses focus.\n *\n * @internal\n */\n const emitUserBlurredSearchBox = (): void => {\n $x.emit('UserBlurredSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserClickedSearchBox} when user clicks the search input.\n *\n * @internal\n */\n const emitUserClickedSearchBox = (): void => {\n $x.emit('UserClickedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserFocusedSearchBox} when search box gains focus.\n *\n * @internal\n */\n const emitUserFocusedSearchBox = (): void => {\n $x.emit('UserFocusedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserIsTypingAQuery} when the user typed/pasted something\n * into the search-box. Also emits event {@link SearchBoxXEvents.UserClearedQuery} when the user\n * removes all characters in the search-box.\n *\n * @internal\n */\n const emitUserIsTypingAQueryEvents = (): void => {\n const query = inputElement.value?.value ?? ''\n\n $x.emit('UserIsTypingAQuery', query, { target: inputElement.value })\n if (query.trim()) {\n emitDebouncedUserAcceptedAQuery(query)\n } else {\n cancelDebouncedUserAcceptedAQuery()\n }\n }\n\n /**\n * Emits event {@link XEventsTypes.UserPressedArrowKey} when the user pressed an arrow key.\n *\n * @param event - The keyboard event with the arrow key pressed.\n * @internal\n */\n const emitUserPressedArrowKey = (event: KeyboardEvent): void => {\n $x.emit('UserPressedArrowKey', event.key as ArrowKey, createEventMetadata())\n }\n\n /**\n * Emits multiple events when the user pressed the enter key.\n *\n * @remarks\n * Emitted events are:\n * {@link SearchBoxXEvents.UserPressedEnterKey}\n * {@link XEventsTypes.UserAcceptedAQuery}\n *\n * @internal\n */\n const emitUserPressedEnterKey = (): void => {\n const query = inputElement.value?.value.trim()\n if (!!query && query.length > 0) {\n $x.emit('UserPressedEnterKey', query, createEventMetadata())\n emitUserAcceptedAQuery(query)\n }\n inputElement.value?.blur()\n }\n\n /**\n * Prevents the user from either typing or pasting special characters in the input field.\n *\n * @internal\n * @param event - The event that will be checked for special characters.\n */\n const preventSpecialKey = (event: InputEvent): void => {\n if (/[<>]/.test(event.data ?? '')) {\n event.preventDefault()\n }\n }\n\n /**\n * When event {@link XEventsTypes.UserReachedEmpathizeTop} or\n * {@link SearchBoxXEvents.UserPressedClearSearchBoxButton}\n * are emitted the search input is focused.\n *\n * @internal\n */\n function focusInput(): void {\n inputElement.value?.focus()\n }\n ;['UserReachedEmpathizeTop', 'UserPressedClearSearchBoxButton'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(focusInput),\n )\n\n /**\n * When event {@link XEventsTypes.UserAcceptedAQuery} or\n * {@link SearchBoxXEvents.UserClearedQuery} are emitted the pending debounced emit\n * {@link XEvent} `UserAcceptedAQuery` is canceled.\n *\n * @internal\n */\n function cancelDebouncedUserAcceptedAQuery(): void {\n debouncedUserAcceptedAQuery?.cancel()\n }\n ;['UserAcceptedAQuery', 'UserClearedQuery'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(cancelDebouncedUserAcceptedAQuery),\n )\n\n onMounted(() => {\n if (props.autofocus) {\n focusInput()\n }\n })\n\n return {\n query,\n inputElement,\n emitUserHoveredInSearchBox,\n emitUserHoveredOutSearchBox,\n emitUserBlurredSearchBox,\n emitUserClickedSearchBox,\n emitUserFocusedSearchBox,\n emitUserIsTypingAQueryEvents,\n emitUserPressedEnterKey,\n emitUserPressedArrowKey,\n preventSpecialKey,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-search-input::-webkit-search-decoration,\n.x-search-input::-webkit-search-cancel-button,\n.x-search-input::-webkit-search-results-button,\n.x-search-input::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserClickedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserBlurredSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserFocusedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserIsTypingAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedEnterKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedArrowKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserAcceptedAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Search service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example of how the search input is rendered.\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <SearchInput />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with props\n\nIn this example, the search input has been limited to accept a maximum of 5 characters, including\nspaces, it won't take the focus when it is rendered, and it will emit the `UserAcceptedAQuery` event\nafter 1000 milliseconds without typing.\n\n_Type a term with more than 5 characters to try it out!_\n\n```vue live\n<template>\n <SearchInput :maxLength=\"5\" :autofocus=\"false\" :instant=\"true\" :instantDebounceInMs=\"1000\" />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with events\n\nIn this example, a message has been added below the search input to illustrate the action performed.\nFor example, if you select the search input box, the message “focus” appears. When you start to\nenter a search term, the message “typing” appears. If you press Enter after typing a search term,\nthe message “enter” appears.\n\n<!-- prettier-ignore-start -->\n:::warning X Events are only emitted from the root X Component.\nAt the moment, X Events are only emitted from the root X Component. This means that if you wrap\nthe `SearchInput` with another component of another module like the `MainScroll`, you should add\nthe listeners to the `MainScroll` instead of the `SearchInput`. If you need to subscribe to these\nevents, it is recommended to use the [`GlobalXBus`](../common/x-components.global-x-bus.md)\ncomponent instead.\n:::\n<!-- prettier-ignore-end -->\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <div>\n <SearchInput\n @UserPressedEnterKey=\"value = 'enter'\"\n @UserFocusedSearchBox=\"hasFocus = true\"\n @UserBlurredSearchBox=\"hasFocus = false\"\n @UserIsTypingAQuery=\"value = 'typing'\"\n />\n <strong>{{ value }}</strong>\n <span>{{ hasFocus ? 'focused' : 'unfocused' }}</span>\n </div>\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { ref } from 'vue'\n\nconst value = ref('')\nconst hasFocus = ref(false)\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `SearchInput` component\ncommunicates with the [`SearchButton`](x-components.search-button.md) and the\n[`ClearSearchInput`](x-components.clear-search-input.md) to offer a full query entry experience.\nFurthermore, you can use it together with the [`QuerySuggestions`](query-suggestions.md) component\nto autocomplete the typed search term.\n\n_Type “trousers” or another fashion term in the input field and then click the clear icon to try it\nout!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex; flex-flow: row nowrap;\">\n <SearchInput />\n <ClearSearchInput>\n <img src=\"/assets/icons/cross.svg\" />\n </ClearSearchInput>\n <SearchButton>Search</SearchButton>\n </div>\n <QuerySuggestions />\n </div>\n</template>\n\n<script setup>\nimport { SearchInput, ClearSearchInput, SearchButton } from '@empathyco/x-components/search-box'\nimport { QuerySuggestions } from '@empathyco/x-components/query-suggestions'\n</script>\n```\n</docs>\n"],"names":["_createElementBlock","_withKeys","_withModifiers"],"mappings":";;;;;;;sBACEA,kBAAA,CAoBE,OAAA,EAAA;AAAA,IAnBA,GAAA,EAAI,cAAA;AAAA,IACH,SAAA,EAAW,IAAA,CAAA,SAAA;AAAA,IACX,KAAA,EAAO,IAAA,CAAA,KAAA;AAAA,IACR,YAAA,EAAa,KAAA;AAAA,IACb,KAAA,EAAM,0BAAA;AAAA,IACN,YAAA,EAAa,QAAA;AAAA,IACb,SAAA,EAAU,QAAA;AAAA,IACV,IAAA,EAAK,QAAA;AAAA,IACL,WAAA,EAAU,cAAA;AAAA,IACV,YAAA,EAAW,sBAAA;AAAA,IACV,cAAU,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAE,IAAA,CAAA,0BAAA,IAAA,IAAA,CAAA,0BAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,IACZ,cAAU,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAE,IAAA,CAAA,2BAAA,IAAA,IAAA,CAAA,2BAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,IACZ,QAAI,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,CAAA,GAAA,IAAA,KAAE,IAAA,CAAA,wBAAA,IAAA,IAAA,CAAA,wBAAA,CAAA,GAAA,IAAA,CAAA,CAAA;AAAA,IACN,SAAK,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,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1
|
-
{"version":3,"file":"search-input.vue2.js","sources":["../../../../../src/x-modules/search-box/components/search-input.vue"],"sourcesContent":["<template>\n <input\n ref=\"inputElement\"\n :maxlength=\"maxLength\"\n :value=\"query\"\n autocomplete=\"off\"\n class=\"x-search-input x-input\"\n enterkeyhint=\"search\"\n inputmode=\"search\"\n type=\"search\"\n data-test=\"search-input\"\n aria-label=\"type your query here\"\n @mouseenter=\"emitUserHoveredInSearchBox\"\n @mouseleave=\"emitUserHoveredOutSearchBox\"\n @blur=\"emitUserBlurredSearchBox\"\n @click=\"emitUserClickedSearchBox\"\n @focus=\"emitUserFocusedSearchBox\"\n @input=\"emitUserIsTypingAQueryEvents\"\n @keydown.enter=\"emitUserPressedEnterKey\"\n @keydown.up.down.prevent=\"emitUserPressedArrowKey\"\n @beforeinput=\"preventSpecialKey\"\n />\n</template>\n\n<script lang=\"ts\">\nimport type { ArrowKey } from '../../../utils'\nimport type { DebouncedFunction } from '../../../utils/types'\nimport type { XEvent } from '../../../wiring/events.types'\nimport type { WireMetadata } from '../../../wiring/wiring.types'\nimport { defineComponent, onMounted, ref } from 'vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { debounce } from '../../../utils/debounce'\nimport { searchBoxXModule } from '../x-module'\n\n/**\n * This component renders an input field that allows the user to type a query. It also reacts to\n * query changes through event listening.\n *\n * @public\n */\nexport default defineComponent({\n name: 'SearchInput',\n xModule: searchBoxXModule.name,\n props: {\n /**\n * Maximum characters allowed in the input search.\n */\n maxLength: {\n type: Number,\n default: 64,\n },\n /**\n * Allows input autofocus when the search field is rendered.\n */\n autofocus: {\n type: Boolean,\n default: true,\n },\n /**\n * Enables the auto-accept query after debounce.\n */\n instant: {\n type: Boolean,\n default: true,\n },\n /**\n * Debounce time for the instant.\n */\n instantDebounceInMs: {\n type: Number,\n default: 500,\n },\n },\n setup(props) {\n const $x = use$x()\n\n const { query } = useState('searchBox')\n\n const inputElement = ref<HTMLInputElement>()\n\n let debouncedUserAcceptedAQuery: DebouncedFunction<[string]>\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n const createEventMetadata = (): Omit<WireMetadata, 'moduleName'> => {\n return {\n target: inputElement.value,\n feature: 'search_box',\n }\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event.\n *\n * @remarks It is necessary in a separated method to use it as the parameter of debounce in\n * emitDebouncedUserAcceptedAQuery method.\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitUserAcceptedAQuery = (query: string): void => {\n $x.emit('UserAcceptedAQuery', query, createEventMetadata())\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event with a debounce configured in\n * `instantDebounceInMs` prop.\n *\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitDebouncedUserAcceptedAQuery = (query: string): void => {\n if (props.instant) {\n if (!debouncedUserAcceptedAQuery) {\n debouncedUserAcceptedAQuery = debounce(emitUserAcceptedAQuery, props.instantDebounceInMs)\n }\n debouncedUserAcceptedAQuery(query)\n }\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredInSearchBox} when search box is hovered in.\n *\n * @internal\n */\n const emitUserHoveredInSearchBox = (): void => {\n $x.emit('UserHoveredInSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredOutSearchBox} when search box is hovered out.\n *\n * @internal\n */\n const emitUserHoveredOutSearchBox = (): void => {\n $x.emit('UserHoveredOutSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserBlurredSearchBox} when search box loses focus.\n *\n * @internal\n */\n const emitUserBlurredSearchBox = (): void => {\n $x.emit('UserBlurredSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserClickedSearchBox} when user clicks the search input.\n *\n * @internal\n */\n const emitUserClickedSearchBox = (): void => {\n $x.emit('UserClickedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserFocusedSearchBox} when search box gains focus.\n *\n * @internal\n */\n const emitUserFocusedSearchBox = (): void => {\n $x.emit('UserFocusedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserIsTypingAQuery} when the user typed/pasted something\n * into the search-box. Also emits event {@link SearchBoxXEvents.UserClearedQuery} when the user\n * removes all characters in the search-box.\n *\n * @internal\n */\n const emitUserIsTypingAQueryEvents = (): void => {\n const query = inputElement.value?.value ?? ''\n\n $x.emit('UserIsTypingAQuery', query, { target: inputElement.value })\n if (query.trim()) {\n emitDebouncedUserAcceptedAQuery(query)\n } else {\n cancelDebouncedUserAcceptedAQuery()\n }\n }\n\n /**\n * Emits event {@link XEventsTypes.UserPressedArrowKey} when the user pressed an arrow key.\n *\n * @param event - The keyboard event with the arrow key pressed.\n * @internal\n */\n const emitUserPressedArrowKey = (event: KeyboardEvent): void => {\n $x.emit('UserPressedArrowKey', event.key as ArrowKey, createEventMetadata())\n }\n\n /**\n * Emits multiple events when the user pressed the enter key.\n *\n * @remarks\n * Emitted events are:\n * {@link SearchBoxXEvents.UserPressedEnterKey}\n * {@link XEventsTypes.UserAcceptedAQuery}\n *\n * @internal\n */\n const emitUserPressedEnterKey = (): void => {\n const query = inputElement.value?.value.trim()\n if (!!query && query.length > 0) {\n $x.emit('UserPressedEnterKey', query, createEventMetadata())\n emitUserAcceptedAQuery(query)\n }\n inputElement.value?.blur()\n }\n\n /**\n * Prevents the user from either typing or pasting special characters in the input field.\n *\n * @internal\n * @param event - The event that will be checked for special characters.\n */\n const preventSpecialKey = (event: InputEvent): void => {\n if (/[<>]/.test(event.data ?? '')) {\n event.preventDefault()\n }\n }\n\n /**\n * When event {@link XEventsTypes.UserReachedEmpathizeTop} or\n * {@link SearchBoxXEvents.UserPressedClearSearchBoxButton}\n * are emitted the search input is focused.\n *\n * @internal\n */\n function focusInput(): void {\n inputElement.value?.focus()\n }\n ;['UserReachedEmpathizeTop', 'UserPressedClearSearchBoxButton'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(focusInput),\n )\n\n /**\n * When event {@link XEventsTypes.UserAcceptedAQuery} or\n * {@link SearchBoxXEvents.UserClearedQuery} are emitted the pending debounced emit\n * {@link XEvent} `UserAcceptedAQuery` is canceled.\n *\n * @internal\n */\n function cancelDebouncedUserAcceptedAQuery(): void {\n debouncedUserAcceptedAQuery?.cancel()\n }\n ;['UserAcceptedAQuery', 'UserClearedQuery'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(cancelDebouncedUserAcceptedAQuery),\n )\n\n onMounted(() => {\n if (props.autofocus) {\n focusInput()\n }\n })\n\n return {\n query,\n inputElement,\n emitUserHoveredInSearchBox,\n emitUserHoveredOutSearchBox,\n emitUserBlurredSearchBox,\n emitUserClickedSearchBox,\n emitUserFocusedSearchBox,\n emitUserIsTypingAQueryEvents,\n emitUserPressedEnterKey,\n emitUserPressedArrowKey,\n preventSpecialKey,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-search-input::-webkit-search-decoration,\n.x-search-input::-webkit-search-cancel-button,\n.x-search-input::-webkit-search-results-button,\n.x-search-input::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserClickedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserBlurredSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserFocusedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserIsTypingAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedEnterKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedArrowKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserAcceptedAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Search service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example of how the search input is rendered.\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <SearchInput />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with props\n\nIn this example, the search input has been limited to accept a maximum of 5 characters, including\nspaces, it won't take the focus when it is rendered, and it will emit the `UserAcceptedAQuery` event\nafter 1000 milliseconds without typing.\n\n_Type a term with more than 5 characters to try it out!_\n\n```vue live\n<template>\n <SearchInput :maxLength=\"5\" :autofocus=\"false\" :instant=\"true\" :instantDebounceInMs=\"1000\" />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with events\n\nIn this example, a message has been added below the search input to illustrate the action performed.\nFor example, if you select the search input box, the message “focus” appears. When you start to\nenter a search term, the message “typing” appears. If you press Enter after typing a search term,\nthe message “enter” appears.\n\n<!-- prettier-ignore-start -->\n:::warning X Events are only emitted from the root X Component.\nAt the moment, X Events are only emitted from the root X Component. This means that if you wrap\nthe `SearchInput` with another component of another module like the `MainScroll`, you should add\nthe listeners to the `MainScroll` instead of the `SearchInput`. If you need to subscribe to these\nevents, it is recommended to use the [`GlobalXBus`](../common/x-components.global-x-bus.md)\ncomponent instead.\n:::\n<!-- prettier-ignore-end -->\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <div>\n <SearchInput\n @UserPressedEnterKey=\"value = 'enter'\"\n @UserFocusedSearchBox=\"hasFocus = true\"\n @UserBlurredSearchBox=\"hasFocus = false\"\n @UserIsTypingAQuery=\"value = 'typing'\"\n />\n <strong>{{ value }}</strong>\n <span>{{ hasFocus ? 'focused' : 'unfocused' }}</span>\n </div>\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { ref } from 'vue'\n\nconst value = ref('')\nconst hasFocus = ref(false)\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `SearchInput` component\ncommunicates with the [`SearchButton`](x-components.search-button.md) and the\n[`ClearSearchInput`](x-components.clear-search-input.md) to offer a full query entry experience.\nFurthermore, you can use it together with the [`QuerySuggestions`](query-suggestions.md) component\nto autocomplete the typed search term.\n\n_Type “trousers” or another fashion term in the input field and then click the clear icon to try it\nout!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex; flex-flow: row nowrap;\">\n <SearchInput />\n <ClearSearchInput>\n <img src=\"/assets/icons/cross.svg\" />\n </ClearSearchInput>\n <SearchButton>Search</SearchButton>\n </div>\n <QuerySuggestions />\n </div>\n</template>\n\n<script setup>\nimport { SearchInput, ClearSearchInput, SearchButton } from '@empathyco/x-components/search-box'\nimport { QuerySuggestions } from '@empathyco/x-components/query-suggestions'\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;AAmCA;;;;;AAKE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,gBAAgB,CAAC,IAAI;AAC9B,IAAA,KAAK,EAAE;AACL;;AAEE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,EAAE;AACZ,SAAA;AACD;;AAEE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD;;AAEE;AACF,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD;;AAEE;AACF,QAAA,mBAAmB,EAAE;AACnB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,GAAG;AACb,SAAA;AACF,KAA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KAAK,EAAE,mBAAmB,EAAE,CAAA;gBAC3D,sBAAsB,CAAC,KAAK,CAAA;YAC9B;AACA,YAAA,YAAY,CAAC,KAAK,EAAE,IAAI,EAAC;AAC3B,QAAA,CAAA;AAEA;;;;;AAKE;AACF,QAAA,MAAM,iBAAgB,GAAI,CAAC,KAAiB,KAAS;YACnD,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAG,IAAK,EAAE,CAAC,EAAE;gBACjC,KAAK,CAAC,cAAc,EAAC;YACvB;AACF,QAAA,CAAA;AAEA;;;;;;AAME;AACF,QAAA,SAAS,UAAU,GAAA;AACjB,YAAA,YAAY,CAAC,KAAK,EAAE,KAAK,EAAC;QAC5B;QACC,CAAC,yBAAyB,EAAE,iCAAiC,CAAC,CAAC,OAAO,CAAC,SACtE,EAAE,CAAC,EAAE,CAAC,KAAe,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CACrD;AAEA;;;;;;AAME;AACF,QAAA,SAAS,iCAAiC,GAAA;YACxC,2BAA2B,EAAE,MAAM,EAAC;QACtC;QACC,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC,OAAO,CAAC,KAAI,IACtD,EAAE,CAAC,EAAE,CAAC,KAAe,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAC5E;QAEA,SAAS,CAAC,MAAI;AACZ,YAAA,IAAI,KAAK,CAAC,SAAS,EAAE;AACnB,gBAAA,UAAU,EAAC;YACb;AACF,QAAA,CAAC,CAAA;QAED,OAAO;YACL,KAAK;YACL,YAAY;YACZ,0BAA0B;YAC1B,2BAA2B;YAC3B,wBAAwB;YACxB,wBAAwB;YACxB,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,uBAAuB;YACvB,iBAAiB;SACnB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"search-input.vue2.js","sources":["../../../../../src/x-modules/search-box/components/search-input.vue"],"sourcesContent":["<template>\n <input\n ref=\"inputElement\"\n :maxlength=\"maxLength\"\n :value=\"query\"\n autocomplete=\"off\"\n class=\"x-search-input xds:input\"\n enterkeyhint=\"search\"\n inputmode=\"search\"\n type=\"search\"\n data-test=\"search-input\"\n aria-label=\"type your query here\"\n @mouseenter=\"emitUserHoveredInSearchBox\"\n @mouseleave=\"emitUserHoveredOutSearchBox\"\n @blur=\"emitUserBlurredSearchBox\"\n @click=\"emitUserClickedSearchBox\"\n @focus=\"emitUserFocusedSearchBox\"\n @input=\"emitUserIsTypingAQueryEvents\"\n @keydown.enter=\"emitUserPressedEnterKey\"\n @keydown.up.down.prevent=\"emitUserPressedArrowKey\"\n @beforeinput=\"preventSpecialKey\"\n />\n</template>\n\n<script lang=\"ts\">\nimport type { ArrowKey } from '../../../utils'\nimport type { DebouncedFunction } from '../../../utils/types'\nimport type { XEvent } from '../../../wiring/events.types'\nimport type { WireMetadata } from '../../../wiring/wiring.types'\nimport { defineComponent, onMounted, ref } from 'vue'\nimport { use$x } from '../../../composables/use-$x'\nimport { useState } from '../../../composables/use-state'\nimport { debounce } from '../../../utils/debounce'\nimport { searchBoxXModule } from '../x-module'\n\n/**\n * This component renders an input field that allows the user to type a query. It also reacts to\n * query changes through event listening.\n *\n * @public\n */\nexport default defineComponent({\n name: 'SearchInput',\n xModule: searchBoxXModule.name,\n props: {\n /**\n * Maximum characters allowed in the input search.\n */\n maxLength: {\n type: Number,\n default: 64,\n },\n /**\n * Allows input autofocus when the search field is rendered.\n */\n autofocus: {\n type: Boolean,\n default: true,\n },\n /**\n * Enables the auto-accept query after debounce.\n */\n instant: {\n type: Boolean,\n default: true,\n },\n /**\n * Debounce time for the instant.\n */\n instantDebounceInMs: {\n type: Number,\n default: 500,\n },\n },\n setup(props) {\n const $x = use$x()\n\n const { query } = useState('searchBox')\n\n const inputElement = ref<HTMLInputElement>()\n\n let debouncedUserAcceptedAQuery: DebouncedFunction<[string]>\n\n /**\n * Generates the {@link WireMetadata} object omitting the moduleName.\n *\n * @returns The {@link WireMetadata} object omitting the moduleName.\n * @internal\n */\n const createEventMetadata = (): Omit<WireMetadata, 'moduleName'> => {\n return {\n target: inputElement.value,\n feature: 'search_box',\n }\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event.\n *\n * @remarks It is necessary in a separated method to use it as the parameter of debounce in\n * emitDebouncedUserAcceptedAQuery method.\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitUserAcceptedAQuery = (query: string): void => {\n $x.emit('UserAcceptedAQuery', query, createEventMetadata())\n }\n\n /**\n * Emits {@link XEventsTypes.UserAcceptedAQuery} event with a debounce configured in\n * `instantDebounceInMs` prop.\n *\n * @internal\n * @param query - The query that will be emitted.\n */\n const emitDebouncedUserAcceptedAQuery = (query: string): void => {\n if (props.instant) {\n if (!debouncedUserAcceptedAQuery) {\n debouncedUserAcceptedAQuery = debounce(emitUserAcceptedAQuery, props.instantDebounceInMs)\n }\n debouncedUserAcceptedAQuery(query)\n }\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredInSearchBox} when search box is hovered in.\n *\n * @internal\n */\n const emitUserHoveredInSearchBox = (): void => {\n $x.emit('UserHoveredInSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserHoveredOutSearchBox} when search box is hovered out.\n *\n * @internal\n */\n const emitUserHoveredOutSearchBox = (): void => {\n $x.emit('UserHoveredOutSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserBlurredSearchBox} when search box loses focus.\n *\n * @internal\n */\n const emitUserBlurredSearchBox = (): void => {\n $x.emit('UserBlurredSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserClickedSearchBox} when user clicks the search input.\n *\n * @internal\n */\n const emitUserClickedSearchBox = (): void => {\n $x.emit('UserClickedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserFocusedSearchBox} when search box gains focus.\n *\n * @internal\n */\n const emitUserFocusedSearchBox = (): void => {\n $x.emit('UserFocusedSearchBox', undefined, { target: inputElement.value })\n }\n\n /**\n * Emits event {@link SearchBoxXEvents.UserIsTypingAQuery} when the user typed/pasted something\n * into the search-box. Also emits event {@link SearchBoxXEvents.UserClearedQuery} when the user\n * removes all characters in the search-box.\n *\n * @internal\n */\n const emitUserIsTypingAQueryEvents = (): void => {\n const query = inputElement.value?.value ?? ''\n\n $x.emit('UserIsTypingAQuery', query, { target: inputElement.value })\n if (query.trim()) {\n emitDebouncedUserAcceptedAQuery(query)\n } else {\n cancelDebouncedUserAcceptedAQuery()\n }\n }\n\n /**\n * Emits event {@link XEventsTypes.UserPressedArrowKey} when the user pressed an arrow key.\n *\n * @param event - The keyboard event with the arrow key pressed.\n * @internal\n */\n const emitUserPressedArrowKey = (event: KeyboardEvent): void => {\n $x.emit('UserPressedArrowKey', event.key as ArrowKey, createEventMetadata())\n }\n\n /**\n * Emits multiple events when the user pressed the enter key.\n *\n * @remarks\n * Emitted events are:\n * {@link SearchBoxXEvents.UserPressedEnterKey}\n * {@link XEventsTypes.UserAcceptedAQuery}\n *\n * @internal\n */\n const emitUserPressedEnterKey = (): void => {\n const query = inputElement.value?.value.trim()\n if (!!query && query.length > 0) {\n $x.emit('UserPressedEnterKey', query, createEventMetadata())\n emitUserAcceptedAQuery(query)\n }\n inputElement.value?.blur()\n }\n\n /**\n * Prevents the user from either typing or pasting special characters in the input field.\n *\n * @internal\n * @param event - The event that will be checked for special characters.\n */\n const preventSpecialKey = (event: InputEvent): void => {\n if (/[<>]/.test(event.data ?? '')) {\n event.preventDefault()\n }\n }\n\n /**\n * When event {@link XEventsTypes.UserReachedEmpathizeTop} or\n * {@link SearchBoxXEvents.UserPressedClearSearchBoxButton}\n * are emitted the search input is focused.\n *\n * @internal\n */\n function focusInput(): void {\n inputElement.value?.focus()\n }\n ;['UserReachedEmpathizeTop', 'UserPressedClearSearchBoxButton'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(focusInput),\n )\n\n /**\n * When event {@link XEventsTypes.UserAcceptedAQuery} or\n * {@link SearchBoxXEvents.UserClearedQuery} are emitted the pending debounced emit\n * {@link XEvent} `UserAcceptedAQuery` is canceled.\n *\n * @internal\n */\n function cancelDebouncedUserAcceptedAQuery(): void {\n debouncedUserAcceptedAQuery?.cancel()\n }\n ;['UserAcceptedAQuery', 'UserClearedQuery'].forEach(event =>\n $x.on(event as XEvent, false).subscribe(cancelDebouncedUserAcceptedAQuery),\n )\n\n onMounted(() => {\n if (props.autofocus) {\n focusInput()\n }\n })\n\n return {\n query,\n inputElement,\n emitUserHoveredInSearchBox,\n emitUserHoveredOutSearchBox,\n emitUserBlurredSearchBox,\n emitUserClickedSearchBox,\n emitUserFocusedSearchBox,\n emitUserIsTypingAQueryEvents,\n emitUserPressedEnterKey,\n emitUserPressedArrowKey,\n preventSpecialKey,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-search-input::-webkit-search-decoration,\n.x-search-input::-webkit-search-cancel-button,\n.x-search-input::-webkit-search-results-button,\n.x-search-input::-webkit-search-results-decoration {\n -webkit-appearance: none;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Events\n\nThis component emits the following events:\n\n- [`UserClickedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserBlurredSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserFocusedSearchBox`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserIsTypingAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedEnterKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserPressedArrowKey`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n- [`UserAcceptedAQuery`](https://github.com/empathyco/x/blob/main/packages/x-components/src/wiring/events.types.ts)\n\n## See it in action\n\n<!-- prettier-ignore-start -->\n:::warning Backend service required\nTo use this component, the Search service must be implemented.\n:::\n<!-- prettier-ignore-end -->\n\nHere you have a basic example of how the search input is rendered.\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <SearchInput />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with props\n\nIn this example, the search input has been limited to accept a maximum of 5 characters, including\nspaces, it won't take the focus when it is rendered, and it will emit the `UserAcceptedAQuery` event\nafter 1000 milliseconds without typing.\n\n_Type a term with more than 5 characters to try it out!_\n\n```vue live\n<template>\n <SearchInput :maxLength=\"5\" :autofocus=\"false\" :instant=\"true\" :instantDebounceInMs=\"1000\" />\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\n</script>\n```\n\n### Play with events\n\nIn this example, a message has been added below the search input to illustrate the action performed.\nFor example, if you select the search input box, the message “focus” appears. When you start to\nenter a search term, the message “typing” appears. If you press Enter after typing a search term,\nthe message “enter” appears.\n\n<!-- prettier-ignore-start -->\n:::warning X Events are only emitted from the root X Component.\nAt the moment, X Events are only emitted from the root X Component. This means that if you wrap\nthe `SearchInput` with another component of another module like the `MainScroll`, you should add\nthe listeners to the `MainScroll` instead of the `SearchInput`. If you need to subscribe to these\nevents, it is recommended to use the [`GlobalXBus`](../common/x-components.global-x-bus.md)\ncomponent instead.\n:::\n<!-- prettier-ignore-end -->\n\n_Type any term in the input field to try it out!_\n\n```vue live\n<template>\n <div>\n <SearchInput\n @UserPressedEnterKey=\"value = 'enter'\"\n @UserFocusedSearchBox=\"hasFocus = true\"\n @UserBlurredSearchBox=\"hasFocus = false\"\n @UserIsTypingAQuery=\"value = 'typing'\"\n />\n <strong>{{ value }}</strong>\n <span>{{ hasFocus ? 'focused' : 'unfocused' }}</span>\n </div>\n</template>\n\n<script setup>\nimport { SearchInput } from '@empathyco/x-components/search-box'\nimport { ref } from 'vue'\n\nconst value = ref('')\nconst hasFocus = ref(false)\n</script>\n```\n\n## Extending the component\n\nComponents can be combined and communicate with each other. Commonly, the `SearchInput` component\ncommunicates with the [`SearchButton`](x-components.search-button.md) and the\n[`ClearSearchInput`](x-components.clear-search-input.md) to offer a full query entry experience.\nFurthermore, you can use it together with the [`QuerySuggestions`](query-suggestions.md) component\nto autocomplete the typed search term.\n\n_Type “trousers” or another fashion term in the input field and then click the clear icon to try it\nout!_\n\n```vue live\n<template>\n <div>\n <div style=\"display: flex; flex-flow: row nowrap;\">\n <SearchInput />\n <ClearSearchInput>\n <img src=\"/assets/icons/cross.svg\" />\n </ClearSearchInput>\n <SearchButton>Search</SearchButton>\n </div>\n <QuerySuggestions />\n </div>\n</template>\n\n<script setup>\nimport { SearchInput, ClearSearchInput, SearchButton } from '@empathyco/x-components/search-box'\nimport { QuerySuggestions } from '@empathyco/x-components/query-suggestions'\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;;AAmCA;;;;;AAKE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,gBAAgB,CAAC,IAAI;AAC9B,IAAA,KAAK,EAAE;AACL;;AAEE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,EAAE;AACZ,SAAA;AACD;;AAEE;AACF,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD;;AAEE;AACF,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,IAAI;AACd,SAAA;AACD;;AAEE;AACF,QAAA,mBAAmB,EAAE;AACnB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,OAAO,EAAE,GAAG;AACb,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT,QAAA,MAAM,EAAC,GAAI,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-alpha.239",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -83,9 +83,10 @@
|
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@babel/preset-env": "7.29.2",
|
|
86
|
-
"@empathyco/x-
|
|
86
|
+
"@empathyco/x-design-system": "0.1.0-alpha.3",
|
|
87
87
|
"@microsoft/api-documenter": "7.29.9",
|
|
88
88
|
"@microsoft/api-extractor": "7.58.0",
|
|
89
|
+
"@tailwindcss/vite": "4.2.2",
|
|
89
90
|
"@testing-library/vue": "8.1.0",
|
|
90
91
|
"@types/aria-query": "5.0.4",
|
|
91
92
|
"@types/node": "24.12.2",
|
|
@@ -93,13 +94,9 @@
|
|
|
93
94
|
"@vitest/browser": "4.1.2",
|
|
94
95
|
"@vitest/ui": "4.1.2",
|
|
95
96
|
"@vue/test-utils": "2.4.6",
|
|
96
|
-
"autoprefixer": "10.4.27",
|
|
97
97
|
"convert-source-map": "2.0.0",
|
|
98
98
|
"esbuild": "0.28.0",
|
|
99
99
|
"jsdom": "28.1.0",
|
|
100
|
-
"postcss": "8.5.8",
|
|
101
|
-
"postcss-dir-pseudo-class": "7.0.2",
|
|
102
|
-
"postcss-logical": "4.0.2",
|
|
103
100
|
"rollup": "4.60.1",
|
|
104
101
|
"rollup-plugin-copy": "3.5.0",
|
|
105
102
|
"rollup-plugin-delete": "2.2.0",
|
|
@@ -107,10 +104,10 @@
|
|
|
107
104
|
"rollup-plugin-typescript2": "0.37.0",
|
|
108
105
|
"rollup-plugin-vue": "6.0.0",
|
|
109
106
|
"start-server-and-test": "2.1.5",
|
|
110
|
-
"tailwindcss": "
|
|
107
|
+
"tailwindcss": "4.2.2",
|
|
111
108
|
"ts-node": "10.9.2",
|
|
112
109
|
"typescript": "5.9.3",
|
|
113
|
-
"vite": "6.4.
|
|
110
|
+
"vite": "6.4.2",
|
|
114
111
|
"vite-plugin-vue-inspector": "5.4.0",
|
|
115
112
|
"vitest": "4.1.2",
|
|
116
113
|
"vue": "3.5.32",
|
|
@@ -122,5 +119,5 @@
|
|
|
122
119
|
"access": "public",
|
|
123
120
|
"directory": "dist"
|
|
124
121
|
},
|
|
125
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "cb1002d210e4731704977a5d86193fcc5f2d0406"
|
|
126
123
|
}
|
|
@@ -3532,7 +3532,7 @@
|
|
|
3532
3532
|
},
|
|
3533
3533
|
{
|
|
3534
3534
|
"kind": "Content",
|
|
3535
|
-
"text": "<{\n '
|
|
3535
|
+
"text": "<{\n 'xds:selected x-all-filter--is-selected': boolean;\n }>;\n isSelected: import(\"vue\")."
|
|
3536
3536
|
},
|
|
3537
3537
|
{
|
|
3538
3538
|
"kind": "Reference",
|
|
@@ -35077,7 +35077,7 @@
|
|
|
35077
35077
|
},
|
|
35078
35078
|
{
|
|
35079
35079
|
"kind": "Content",
|
|
35080
|
-
"text": "<{\n [x: string]: boolean;\n 'x-highlight--has-match': boolean;\n '
|
|
35080
|
+
"text": "<{\n [x: string]: boolean;\n 'x-highlight--has-match': boolean;\n 'xds:highlight-text': boolean;\n }>;\n}, {}, {}, {}, import(\"vue\")."
|
|
35081
35081
|
},
|
|
35082
35082
|
{
|
|
35083
35083
|
"kind": "Reference",
|
|
@@ -74023,7 +74023,7 @@
|
|
|
74023
74023
|
},
|
|
74024
74024
|
{
|
|
74025
74025
|
"kind": "Content",
|
|
74026
|
-
"text": "<{\n '
|
|
74026
|
+
"text": "<{\n 'xds:sliding-panel-at-start': boolean;\n 'xds:sliding-panel-at-end': boolean;\n }>;\n scrollContainerRef: import(\"vue\")."
|
|
74027
74027
|
},
|
|
74028
74028
|
{
|
|
74029
74029
|
"kind": "Reference",
|
|
@@ -462,7 +462,7 @@ required: true;
|
|
|
462
462
|
}>, {
|
|
463
463
|
clickEvent: ComputedRef<Partial<XEventsTypes>>;
|
|
464
464
|
cssClasses: ComputedRef< {
|
|
465
|
-
'
|
|
465
|
+
'xds:selected x-all-filter--is-selected': boolean;
|
|
466
466
|
}>;
|
|
467
467
|
isSelected: ComputedRef<boolean>;
|
|
468
468
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -3868,7 +3868,7 @@ end: string;
|
|
|
3868
3868
|
dynamicCSSClasses: ComputedRef< {
|
|
3869
3869
|
[x: string]: boolean;
|
|
3870
3870
|
'x-highlight--has-match': boolean;
|
|
3871
|
-
'
|
|
3871
|
+
'xds:highlight-text': boolean;
|
|
3872
3872
|
}>;
|
|
3873
3873
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
3874
3874
|
text: {
|
|
@@ -8053,8 +8053,8 @@ top: boolean;
|
|
|
8053
8053
|
bottom: boolean;
|
|
8054
8054
|
};
|
|
8055
8055
|
cssClasses: ComputedRef< {
|
|
8056
|
-
'
|
|
8057
|
-
'
|
|
8056
|
+
'xds:sliding-panel-at-start': boolean;
|
|
8057
|
+
'xds:sliding-panel-at-end': boolean;
|
|
8058
8058
|
}>;
|
|
8059
8059
|
scrollContainerRef: Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
8060
8060
|
slotContainerWidth: ShallowRef<number, number>;
|
|
@@ -9676,7 +9676,7 @@ export type XStoreModuleOptions<StoreModule extends AnyXStoreModule> = StoreModu
|
|
|
9676
9676
|
// dist/types/src/components/animations/animate-clip-path.vue.d.ts:5:9 - (ae-forgotten-export) The symbol "AnimationOrigin" needs to be exported by the entry point index.d.ts
|
|
9677
9677
|
// dist/types/src/components/base-dropdown.vue.d.ts:11:9 - (ae-forgotten-export) The symbol "DropdownItem" needs to be exported by the entry point index.d.ts
|
|
9678
9678
|
// dist/types/src/components/base-grid.vue.d.ts:37:5 - (ae-forgotten-export) The symbol "GridItem" needs to be exported by the entry point index.d.ts
|
|
9679
|
-
// dist/types/src/components/column-picker/base-column-picker-list.vue.d.ts:
|
|
9679
|
+
// dist/types/src/components/column-picker/base-column-picker-list.vue.d.ts:29:5 - (ae-forgotten-export) The symbol "ColumnPickerItem" needs to be exported by the entry point index.d.ts
|
|
9680
9680
|
// dist/types/src/components/filters/labels/base-price-filter-label.vue.d.ts:13:13 - (ae-forgotten-export) The symbol "RangeValue" needs to be exported by the entry point index.d.ts
|
|
9681
9681
|
// dist/types/src/components/filters/labels/base-rating-filter-label.vue.d.ts:16:9 - (ae-forgotten-export) The symbol "BooleanFilter" needs to be exported by the entry point index.d.ts
|
|
9682
9682
|
// dist/types/src/components/page-selector.vue.d.ts:65:5 - (ae-forgotten-export) The symbol "PageItem" needs to be exported by the entry point index.d.ts
|
package/types/demo/main.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './tailwind/
|
|
1
|
+
import './tailwind/xds.css';
|
|
2
2
|
//# sourceMappingURL=main.d.ts.map
|
package/types/demo/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../demo/main.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../demo/main.ts"],"names":[],"mappings":"AAOA,OAAO,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../../../demo/views/base-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-config.d.ts","sourceRoot":"","sources":["../../../../demo/views/base-config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAGpE,eAAO,MAAM,iBAAiB,EAAE,aAK/B,CAAA;AASD,eAAO,MAAM,mBAAmB,EAAE,eAUjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../demo/views/home/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE;QACX,OAAO,EAAE,OAAO,CAAA;QAChB,mBAAmB,EAAE,MAAM,CAAA;KAC5B,CAAA;IACD,eAAe,EAAE;QACf,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,aAAa,EAAE;QACb,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,cAAc,EAAE;QACd,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,kBAAkB,EAAE;QAClB,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,eAAe,EAAE;QACf,mBAAmB,EAAE,OAAO,CAAA;KAC7B,CAAA;IACD,kBAAkB,EAAE;QAClB,mBAAmB,EAAE,OAAO,CAAA;KAC7B,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../demo/views/home/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE;QACX,OAAO,EAAE,OAAO,CAAA;QAChB,mBAAmB,EAAE,MAAM,CAAA;KAC5B,CAAA;IACD,eAAe,EAAE;QACf,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,aAAa,EAAE;QACb,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,cAAc,EAAE;QACd,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,kBAAkB,EAAE;QAClB,gBAAgB,EAAE,MAAM,CAAA;KACzB,CAAA;IACD,eAAe,EAAE;QACf,mBAAmB,EAAE,OAAO,CAAA;KAC7B,CAAA;IACD,kBAAkB,EAAE;QAClB,mBAAmB,EAAE,OAAO,CAAA;KAC7B,CAAA;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../../demo/vite.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vite.config.d.ts","sourceRoot":"","sources":["../../../demo/vite.config.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa;;oBAER,MAAM,MAAM,MAAM;CAGnC,CAAA;;AAED,wBA0BE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-grid.types.d.ts","sourceRoot":"","sources":["../../../../src/components/base-grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"base-grid.types.d.ts","sourceRoot":"","sources":["../../../../src/components/base-grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE7D;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,aAAa,CAAA;CACxB"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { VueCSSClasses } from '../../utils/types';
|
|
3
|
+
import type { XEventsTypes } from '../../wiring';
|
|
4
|
+
export interface ColumnPickerItem {
|
|
5
|
+
column: number;
|
|
6
|
+
cssClasses: VueCSSClasses;
|
|
7
|
+
events: Partial<XEventsTypes>;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
}
|
|
3
10
|
/**
|
|
4
11
|
* Column picker list component renders a list of buttons to choose the columns number.
|
|
5
12
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-column-picker-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/components/column-picker/base-column-picker-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"base-column-picker-list.vue?vue&type=script&lang.d.ts","sourceRoot":"","sources":["../../../../../src/components/column-picker/base-column-picker-list.vue?vue&type=script&lang.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAKhD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,aAAa,CAAA;IACzB,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;GAOG;;IAKC,2EAA2E;;cAE1D,QAAQ,CAAC,MAAM,EAAE,CAAC;;;IAGnC,gDAAgD;;IAEhD,sCAAsC;;;;;IAPtC,2EAA2E;;cAE1D,QAAQ,CAAC,MAAM,EAAE,CAAC;;;IAGnC,gDAAgD;;IAEhD,sCAAsC;;;;;;;AAX1C,wBAmFE"}
|
|
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
40
40
|
dynamicCSSClasses: import("vue").ComputedRef<{
|
|
41
41
|
[x: string]: boolean;
|
|
42
42
|
'x-highlight--has-match': boolean;
|
|
43
|
-
'
|
|
43
|
+
'xds:highlight-text': boolean;
|
|
44
44
|
}>;
|
|
45
45
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
46
|
/** The text to highlight some part of it. */
|
|
@@ -45,8 +45,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
45
|
bottom: boolean;
|
|
46
46
|
};
|
|
47
47
|
cssClasses: import("vue").ComputedRef<{
|
|
48
|
-
'
|
|
49
|
-
'
|
|
48
|
+
'xds:sliding-panel-at-start': boolean;
|
|
49
|
+
'xds:sliding-panel-at-end': boolean;
|
|
50
50
|
}>;
|
|
51
51
|
scrollContainerRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
|
52
52
|
slotContainerWidth: import("vue").ShallowRef<number, number>;
|
package/types/src/index.d.ts
CHANGED
package/types/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0BAA0B,CAAA;AACxC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;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UR;;;;;;;;OAQG;IAEH,IAAI,CAAC,SAAS,SAAS,MAAM,UAAU,EACrC,KAAK,EAAE,SAAS,EAEhB,OAAO,CAAC,EAAE,YAAY,CAAC,UAAU,EAAE,SAAS,CAAC,EAC7C,QAAQ,GAAS,iBAAiB,GACjC,OAAO,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAejE;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,UAAU,EAAE,QAAQ,EAAE,iBAAiB,GAAG,QAAQ;IAa1F;;;;;;;;;OASG;IACH,SAAS,CAAC,UAAU,IAAI,IAAI;IAgC5B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;;;;;;OAOG;IACH,EAAE,CAAC,SAAS,SAAS,MAAM,UAAU,EACnC,KAAK,EAAE,SAAS,EAChB,YAAY,UAAQ,GACnB,OAAO,YAAY,SAAS,IAAI,GAC/B,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,iBAAiB,CAAC,CAAC,GAClF,UAAU,CAAC,YAAY,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAanD;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAAC,SAAS,SAAS,MAAM,UAAU,EACrD,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAC;IAQpD;;;;;;;;;;OAUG;IACH,SAAS,CAAC,aAAa,CAAC,SAAS,SAAS,MAAM,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI;CAKpF"}
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
19
19
|
}>, {
|
|
20
20
|
clickEvent: import("vue").ComputedRef<Partial<XEventsTypes>>;
|
|
21
21
|
cssClasses: import("vue").ComputedRef<{
|
|
22
|
-
'
|
|
22
|
+
'xds:selected x-all-filter--is-selected': boolean;
|
|
23
23
|
}>;
|
|
24
24
|
isSelected: import("vue").ComputedRef<boolean>;
|
|
25
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../demo/views/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGpE,eAAO,MAAM,OAAO,iBAElB,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { VueCSSClasses } from '../../utils/types';
|
|
2
|
-
import type { XEventsTypes } from '../../wiring';
|
|
3
|
-
export interface ColumnPickerItem {
|
|
4
|
-
column: number;
|
|
5
|
-
cssClasses: VueCSSClasses;
|
|
6
|
-
events: Partial<XEventsTypes>;
|
|
7
|
-
isSelected: boolean;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=base-column-picker-list.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-column-picker-list.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/column-picker/base-column-picker-list.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,aAAa,CAAA;IACzB,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAA;CACpB"}
|