@empathyco/x-components 6.0.0-alpha.214 → 6.0.0-alpha.216
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 +13 -0
- package/ai/index.js +1 -0
- package/core/index.js.map +1 -1
- package/docs/API-reference/api/x-components.aicarousel.md +57 -0
- package/docs/API-reference/api/x-components.md +9 -0
- package/docs/API-reference/api/x-components.resultfeature.md +1 -1
- package/docs/API-reference/components/ai/x-components.ai-carousel.md +28 -0
- package/js/components/animations/change-height.vue.js +2 -1
- 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/animations/change-height.vue3.js +7 -0
- package/js/components/animations/change-height.vue3.js.map +1 -0
- package/js/components/base-dropdown.vue2.js +1 -0
- package/js/components/base-dropdown.vue2.js.map +1 -1
- package/js/components/modals/base-modal.vue2.js +1 -0
- package/js/components/modals/base-modal.vue2.js.map +1 -1
- package/js/components/panels/base-header-toggle-panel.vue2.js +1 -0
- package/js/components/panels/base-header-toggle-panel.vue2.js.map +1 -1
- package/js/components/panels/base-id-toggle-panel.vue2.js +1 -0
- package/js/components/panels/base-id-toggle-panel.vue2.js.map +1 -1
- package/js/components/panels/base-tabs-panel.vue2.js +1 -0
- package/js/components/panels/base-tabs-panel.vue2.js.map +1 -1
- package/js/components/result/base-result-image.vue2.js +1 -0
- package/js/components/result/base-result-image.vue2.js.map +1 -1
- package/js/index.js +1 -0
- package/js/index.js.map +1 -1
- package/js/x-modules/ai/components/ai-carousel.vue.js +150 -0
- package/js/x-modules/ai/components/ai-carousel.vue.js.map +1 -0
- package/js/x-modules/ai/components/ai-carousel.vue2.js +199 -0
- package/js/x-modules/ai/components/ai-carousel.vue2.js.map +1 -0
- package/js/x-modules/ai/components/ai-carousel.vue3.js +7 -0
- package/js/x-modules/ai/components/ai-carousel.vue3.js.map +1 -0
- package/js/x-modules/ai/wiring.js +7 -3
- package/js/x-modules/ai/wiring.js.map +1 -1
- package/js/x-modules/empathize/components/empathize.vue2.js +1 -0
- package/js/x-modules/empathize/components/empathize.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js +1 -0
- package/js/x-modules/queries-preview/components/query-preview-button.vue2.js.map +1 -1
- package/js/x-modules/queries-preview/components/query-preview.vue2.js +1 -0
- package/js/x-modules/queries-preview/components/query-preview.vue2.js.map +1 -1
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js +1 -0
- package/js/x-modules/scroll/components/scroll-to-top.vue2.js.map +1 -1
- package/package.json +2 -2
- package/report/x-components.api.json +375 -1
- package/report/x-components.api.md +58 -6
- package/types/types/origin.d.ts +1 -1
- package/types/types/origin.d.ts.map +1 -1
- package/types/x-modules/ai/components/ai-carousel.vue.d.ts +50 -0
- package/types/x-modules/ai/components/ai-carousel.vue.d.ts.map +1 -0
- package/types/x-modules/ai/components/index.d.ts +1 -0
- package/types/x-modules/ai/components/index.d.ts.map +1 -1
- package/types/x-modules/ai/wiring.d.ts +4 -1
- package/types/x-modules/ai/wiring.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-result-image.vue2.js","sources":["../../../../src/components/result/base-result-image.vue"],"sourcesContent":["<template>\n <!-- This is a div because using a picture causes the onload event of the image to fire twice. -->\n <!-- eslint-disable-next-line vuejs-accessibility/mouse-events-have-key-events -->\n <div\n class=\"x-result-picture x-picture\"\n data-test=\"result-picture\"\n @mouseenter.once=\"userHasHoveredImage = true\"\n @mouseenter=\"isHovering = true\"\n @mouseleave=\"isHovering = false\"\n >\n <img\n v-if=\"shouldLoadNextImage\"\n loading=\"lazy\"\n :src=\"pendingImages[0]\"\n :style=\"loaderStyles\"\n class=\"x-picture-image\"\n data-test=\"result-picture-loader\"\n alt=\"\"\n role=\"presentation\"\n @load=\"flagImageLoaded\"\n @error=\"flagImageAsFailed\"\n />\n <component :is=\"animation\" class=\"x-picture-image\" :appear=\"false\">\n <!-- @slot Fallback image content. It will be rendered when all the images failed -->\n <slot v-if=\"!loadedImages.length && !pendingImages.length\" name=\"fallback\" />\n\n <!-- @slot Loading image content. It will be rendered while the real image is not loaded -->\n <slot v-else-if=\"!loadedImages.length\" name=\"placeholder\" />\n\n <img\n v-else\n :key=\"imageSrc\"\n :alt=\"result.name\"\n :src=\"imageSrc\"\n class=\"x-result-picture-image\"\n data-test=\"result-picture-image\"\n />\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType, Ref, StyleValue } from 'vue'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { AnimationProp } from '../../types'\nimport { NoAnimation } from '../animations'\n\n/**\n * Component to be reused that renders an `<img>`.\n *\n * @public\n */\nexport default defineComponent({\n name: 'BaseResultImage',\n props: {\n /** (Required) The {@link @empathyco/x-types#Result} information. */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Animation to use when switching between the placeholder, the loaded image, or the failed\n * image fallback.\n */\n loadAnimation: {\n type: AnimationProp,\n default: () => NoAnimation,\n },\n /** Animation to use when switching between the loaded image and the hover image. */\n hoverAnimation: {\n type: AnimationProp,\n },\n /**\n * Indicates if the next valid image should be displayed on hover.\n *\n * @public\n */\n showNextImageOnHover: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n /**\n * Copy of the images of the result.\n *\n * It is used as a queue of images to load, once an image loads/fails to load, it is removed\n * from this array.\n *\n * @internal\n */\n const pendingImages: Ref<string[]> = ref([])\n\n /**\n * Contains the images that have been loaded successfully.\n *\n * @internal\n */\n const loadedImages: Ref<string[]> = ref([])\n\n /**\n * Indicates if the user is hovering the image.\n *\n * @internal\n */\n const isHovering = ref(false)\n\n /**\n * Indicates if the user has hovered the image.\n *\n * @internal\n */\n const userHasHoveredImage = ref(false)\n\n /**\n * Styles to use inline in the image loader, to prevent override from CSS\n *\n * @internal\n */\n const loaderStyles: StyleValue = {\n // csstype issue: https://github.com/frenic/csstype/issues/160\n position: 'absolute !important' as 'absolute',\n top: '0 !important' as '0',\n left: '0 !important' as '0',\n width: '100% !important' as '100%',\n height: '100% !important' as '100%',\n pointerEvents: 'none !important' as 'none',\n visibility: 'hidden !important' as 'hidden',\n }\n\n /**\n * Initializes images state and resets when the result's images change.\n *\n * @internal\n */\n watch(\n () => props.result.images,\n () => {\n pendingImages.value = [...(props.result.images ?? [])]\n loadedImages.value = pendingImages.value.filter(image => loadedImages.value.includes(image))\n },\n { immediate: true },\n )\n\n /**\n * Animation to be used.\n *\n * @returns The animation to be used, taking into account if the user has hovered the image.\n *\n * @internal\n */\n const animation = computed(() => {\n return userHasHoveredImage.value\n ? (props.hoverAnimation ?? props.loadAnimation)\n : props.loadAnimation\n })\n\n /**\n * Gets the src from the result image.\n *\n * @returns The result image src.\n *\n * @internal\n */\n const imageSrc = computed(() => {\n return loadedImages.value[\n !props.showNextImageOnHover || !isHovering.value ? 0 : loadedImages.value.length - 1\n ]\n })\n\n /**\n * Indicates if the loader should try to load the next image.\n *\n * @returns True if it should try to load the next image.\n *\n * @internal\n */\n const shouldLoadNextImage = computed(() => {\n const numImagesToLoad = props.showNextImageOnHover && userHasHoveredImage.value ? 2 : 1\n return !!pendingImages.value.length && loadedImages.value.length < numImagesToLoad\n })\n\n /**\n * Sets an image as failed.\n *\n * @internal\n */\n const flagImageAsFailed = () => {\n pendingImages.value.shift()\n }\n\n /**\n * Sets an image as loaded.\n *\n * @internal\n */\n const flagImageLoaded = () => {\n const image = pendingImages.value.shift()\n if (image) {\n loadedImages.value.push(image)\n }\n }\n\n return {\n pendingImages,\n loadedImages,\n isHovering,\n userHasHoveredImage,\n loaderStyles,\n animation,\n imageSrc,\n shouldLoadNextImage,\n flagImageAsFailed,\n flagImageLoaded,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-result-picture {\n position: relative;\n min-width: 1px;\n min-height: 1px;\n}\n\n.x-result-picture-image {\n max-width: 100%;\n max-height: 100%;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component is for the result image. It may be part of the search result page, recommendations or\nother section which needs to include results.\n\nThe result prop is required. It will render a `<img/>` with the result image:\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Showing the next image on hover\n\nIf a result has multiple images, it can show the next one on hover.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" showNextImageOnHover />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n\n### Customizing slots content\n\nFallback and placeholder contents can be customized.\n\nThe fallback slot allows you to replace the content of the fallback image.\n\nThe other slot is called `placeholder`, and allows you to set the image that its going to be\ndisplayed while the real one is loaded.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\">\n <template #placeholder>\n <img alt=\"Placeholder image\" src=\"./placeholder-image.svg\" />\n </template>\n <template #fallback>\n <img alt=\"Fallback image\" src=\"./fallback-image.svg\" />\n </template>\n </BaseResultImage>\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Customizing the animations\n\nTwo animations can be used in this component.\n\nThe `loadAnimation` is used to transition between the placeholder, the fallback and the image.\n\nThe `hoverAnimation` is used to transition between the image and the hover image, if the\n`showNextImageOnHover` prop is `true`.\n\n`hoverAnimation` will default to `loadAnimation` if it is not provided.\n\n```vue\n<template>\n <BaseResultImage\n :result=\"result\"\n :loadAnimation=\"loadAnimation\"\n :hoverAnimation=\"hoverAnimation\"\n showNextImageOnHover\n />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nimport { CrossFade, CollapseHeight } from '@empathyco/x-components/animations'\nconst loadAnimation = CrossFade\nconst hoverAnimation = CollapseHeight\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgDA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,KAAK,EAAE;;AAEL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;AAGE;AACF,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,MAAMA,WAAW;AAC3B,SAAA;;AAED,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,aAAa;AACpB,SAAA;AACD;;;;AAIE;AACF,QAAA,oBAAoB,EAAE;AACpB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAK;AACf,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;;;;;;AAOE;AACF,QAAA,MAAM,aAAa,GAAkB,GAAG,CAAC,EAAE,CAAA;AAE3C;;;;AAIE;AACF,QAAA,MAAM,YAAY,GAAkB,GAAG,CAAC,EAAE,CAAA;AAE1C;;;;AAIE;AACF,QAAA,MAAM,UAAS,GAAI,GAAG,CAAC,KAAK,CAAA;AAE5B;;;;AAIE;AACF,QAAA,MAAM,sBAAsB,GAAG,CAAC,KAAK,CAAA;AAErC;;;;AAIE;AACF,QAAA,MAAM,YAAY,GAAe;;AAE/B,YAAA,QAAQ,EAAE,qBAAmC;AAC7C,YAAA,GAAG,EAAE,cAAqB;AAC1B,YAAA,IAAI,EAAE,cAAqB;AAC3B,YAAA,KAAK,EAAE,iBAA2B;AAClC,YAAA,MAAM,EAAE,iBAA2B;AACn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AAa,CAAC,KAAK,CAAC,KAAK,EAAC;AAC5B,QAAA,CAAA;AAEA;;;;AAIE;QACF,MAAM,kBAAkB,MAAI;YAC1B,MAAM,KAAI,GAAI,aAAa,CAAC,KAAK,CAAC,KAAK,EAAC;YACxC,IAAI,KAAK,EAAE;AACT,gBAAA,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAA;YAC/B;AACF,QAAA,CAAA;QAEA,OAAO;YACL,aAAa;YACb,YAAY;YACZ,UAAU;YACV,mBAAmB;YACnB,YAAY;YACZ,SAAS;YACT,QAAQ;YACR,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;SACjB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"base-result-image.vue2.js","sources":["../../../../src/components/result/base-result-image.vue"],"sourcesContent":["<template>\n <!-- This is a div because using a picture causes the onload event of the image to fire twice. -->\n <!-- eslint-disable-next-line vuejs-accessibility/mouse-events-have-key-events -->\n <div\n class=\"x-result-picture x-picture\"\n data-test=\"result-picture\"\n @mouseenter.once=\"userHasHoveredImage = true\"\n @mouseenter=\"isHovering = true\"\n @mouseleave=\"isHovering = false\"\n >\n <img\n v-if=\"shouldLoadNextImage\"\n loading=\"lazy\"\n :src=\"pendingImages[0]\"\n :style=\"loaderStyles\"\n class=\"x-picture-image\"\n data-test=\"result-picture-loader\"\n alt=\"\"\n role=\"presentation\"\n @load=\"flagImageLoaded\"\n @error=\"flagImageAsFailed\"\n />\n <component :is=\"animation\" class=\"x-picture-image\" :appear=\"false\">\n <!-- @slot Fallback image content. It will be rendered when all the images failed -->\n <slot v-if=\"!loadedImages.length && !pendingImages.length\" name=\"fallback\" />\n\n <!-- @slot Loading image content. It will be rendered while the real image is not loaded -->\n <slot v-else-if=\"!loadedImages.length\" name=\"placeholder\" />\n\n <img\n v-else\n :key=\"imageSrc\"\n :alt=\"result.name\"\n :src=\"imageSrc\"\n class=\"x-result-picture-image\"\n data-test=\"result-picture-image\"\n />\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType, Ref, StyleValue } from 'vue'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { AnimationProp } from '../../types'\nimport { NoAnimation } from '../animations'\n\n/**\n * Component to be reused that renders an `<img>`.\n *\n * @public\n */\nexport default defineComponent({\n name: 'BaseResultImage',\n props: {\n /** (Required) The {@link @empathyco/x-types#Result} information. */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Animation to use when switching between the placeholder, the loaded image, or the failed\n * image fallback.\n */\n loadAnimation: {\n type: AnimationProp,\n default: () => NoAnimation,\n },\n /** Animation to use when switching between the loaded image and the hover image. */\n hoverAnimation: {\n type: AnimationProp,\n },\n /**\n * Indicates if the next valid image should be displayed on hover.\n *\n * @public\n */\n showNextImageOnHover: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n /**\n * Copy of the images of the result.\n *\n * It is used as a queue of images to load, once an image loads/fails to load, it is removed\n * from this array.\n *\n * @internal\n */\n const pendingImages: Ref<string[]> = ref([])\n\n /**\n * Contains the images that have been loaded successfully.\n *\n * @internal\n */\n const loadedImages: Ref<string[]> = ref([])\n\n /**\n * Indicates if the user is hovering the image.\n *\n * @internal\n */\n const isHovering = ref(false)\n\n /**\n * Indicates if the user has hovered the image.\n *\n * @internal\n */\n const userHasHoveredImage = ref(false)\n\n /**\n * Styles to use inline in the image loader, to prevent override from CSS\n *\n * @internal\n */\n const loaderStyles: StyleValue = {\n // csstype issue: https://github.com/frenic/csstype/issues/160\n position: 'absolute !important' as 'absolute',\n top: '0 !important' as '0',\n left: '0 !important' as '0',\n width: '100% !important' as '100%',\n height: '100% !important' as '100%',\n pointerEvents: 'none !important' as 'none',\n visibility: 'hidden !important' as 'hidden',\n }\n\n /**\n * Initializes images state and resets when the result's images change.\n *\n * @internal\n */\n watch(\n () => props.result.images,\n () => {\n pendingImages.value = [...(props.result.images ?? [])]\n loadedImages.value = pendingImages.value.filter(image => loadedImages.value.includes(image))\n },\n { immediate: true },\n )\n\n /**\n * Animation to be used.\n *\n * @returns The animation to be used, taking into account if the user has hovered the image.\n *\n * @internal\n */\n const animation = computed(() => {\n return userHasHoveredImage.value\n ? (props.hoverAnimation ?? props.loadAnimation)\n : props.loadAnimation\n })\n\n /**\n * Gets the src from the result image.\n *\n * @returns The result image src.\n *\n * @internal\n */\n const imageSrc = computed(() => {\n return loadedImages.value[\n !props.showNextImageOnHover || !isHovering.value ? 0 : loadedImages.value.length - 1\n ]\n })\n\n /**\n * Indicates if the loader should try to load the next image.\n *\n * @returns True if it should try to load the next image.\n *\n * @internal\n */\n const shouldLoadNextImage = computed(() => {\n const numImagesToLoad = props.showNextImageOnHover && userHasHoveredImage.value ? 2 : 1\n return !!pendingImages.value.length && loadedImages.value.length < numImagesToLoad\n })\n\n /**\n * Sets an image as failed.\n *\n * @internal\n */\n const flagImageAsFailed = () => {\n pendingImages.value.shift()\n }\n\n /**\n * Sets an image as loaded.\n *\n * @internal\n */\n const flagImageLoaded = () => {\n const image = pendingImages.value.shift()\n if (image) {\n loadedImages.value.push(image)\n }\n }\n\n return {\n pendingImages,\n loadedImages,\n isHovering,\n userHasHoveredImage,\n loaderStyles,\n animation,\n imageSrc,\n shouldLoadNextImage,\n flagImageAsFailed,\n flagImageLoaded,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-result-picture {\n position: relative;\n min-width: 1px;\n min-height: 1px;\n}\n\n.x-result-picture-image {\n max-width: 100%;\n max-height: 100%;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component is for the result image. It may be part of the search result page, recommendations or\nother section which needs to include results.\n\nThe result prop is required. It will render a `<img/>` with the result image:\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Showing the next image on hover\n\nIf a result has multiple images, it can show the next one on hover.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" showNextImageOnHover />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n\n### Customizing slots content\n\nFallback and placeholder contents can be customized.\n\nThe fallback slot allows you to replace the content of the fallback image.\n\nThe other slot is called `placeholder`, and allows you to set the image that its going to be\ndisplayed while the real one is loaded.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\">\n <template #placeholder>\n <img alt=\"Placeholder image\" src=\"./placeholder-image.svg\" />\n </template>\n <template #fallback>\n <img alt=\"Fallback image\" src=\"./fallback-image.svg\" />\n </template>\n </BaseResultImage>\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Customizing the animations\n\nTwo animations can be used in this component.\n\nThe `loadAnimation` is used to transition between the placeholder, the fallback and the image.\n\nThe `hoverAnimation` is used to transition between the image and the hover image, if the\n`showNextImageOnHover` prop is `true`.\n\n`hoverAnimation` will default to `loadAnimation` if it is not provided.\n\n```vue\n<template>\n <BaseResultImage\n :result=\"result\"\n :loadAnimation=\"loadAnimation\"\n :hoverAnimation=\"hoverAnimation\"\n showNextImageOnHover\n />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nimport { CrossFade, CollapseHeight } from '@empathyco/x-components/animations'\nconst loadAnimation = CrossFade\nconst hoverAnimation = CollapseHeight\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgDA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,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AAA;QAEA,OAAO;YACL,aAAa;YACb,YAAY;YACZ,UAAU;YACV,mBAAmB;YACnB,YAAY;YACZ,SAAS;YACT,QAAQ;YACR,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;SACjB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
package/js/index.js
CHANGED
|
@@ -199,6 +199,7 @@ export { XPriorityBus } from './x-bus/x-bus.js';
|
|
|
199
199
|
export { BaseXPriorityQueue, BaseXPriorityQueueNode } from './x-bus/x-priority-queue/x-priority-queue.js';
|
|
200
200
|
export { BaseXAPI } from './x-installer/api/base-api.js';
|
|
201
201
|
export { XInstaller } from './x-installer/x-installer/x-installer.js';
|
|
202
|
+
export { default as AiCarousel } from './x-modules/ai/components/ai-carousel.vue.js';
|
|
202
203
|
export { default as AiOverview } from './x-modules/ai/components/ai-overview.vue.js';
|
|
203
204
|
export { fetchAndSaveAiSuggestionsSearch } from './x-modules/ai/store/actions/fetch-and-save-ai-suggestions-search.action.js';
|
|
204
205
|
export { fetchAndSaveAiSuggestions } from './x-modules/ai/store/actions/fetch-and-save-ai-suggestions.action.js';
|
package/js/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import _sfc_main from './ai-carousel.vue2.js';
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createElementBlock, createVNode, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList } from 'vue';
|
|
3
|
+
import './ai-carousel.vue3.js';
|
|
4
|
+
import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js';
|
|
5
|
+
|
|
6
|
+
const _hoisted_1 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "x-ai-carousel"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_2 = ["aria-label"];
|
|
11
|
+
const _hoisted_3 = { class: "x-flex x-gap-8" };
|
|
12
|
+
const _hoisted_4 = { class: "x-ai-carousel-suggestion-results" };
|
|
13
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
const _component_AIStarIcon = resolveComponent("AIStarIcon");
|
|
15
|
+
const _component_ChangeHeight = resolveComponent("ChangeHeight");
|
|
16
|
+
const _component_ChevronDownIcon = resolveComponent("ChevronDownIcon");
|
|
17
|
+
const _component_DisplayEmitter = resolveComponent("DisplayEmitter");
|
|
18
|
+
const _component_DisplayClickProvider = resolveComponent("DisplayClickProvider");
|
|
19
|
+
const _component_SlidingPanel = resolveComponent("SlidingPanel");
|
|
20
|
+
const _component_CollapseHeight = resolveComponent("CollapseHeight");
|
|
21
|
+
return openBlock(), createBlock(_component_CollapseHeight, null, {
|
|
22
|
+
default: withCtx(() => [
|
|
23
|
+
_ctx.suggestionsSearch.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
24
|
+
createVNode(_component_DisplayEmitter, {
|
|
25
|
+
payload: _ctx.tagging?.toolingDisplay ?? _ctx.emptyTaggingRequest,
|
|
26
|
+
"event-metadata": {
|
|
27
|
+
feature: "ai_carousel",
|
|
28
|
+
displayOriginalQuery: _ctx.query || "ai-carousel-without-query",
|
|
29
|
+
replaceable: false
|
|
30
|
+
},
|
|
31
|
+
"data-test": "ai-carousel-display-emitter"
|
|
32
|
+
}, {
|
|
33
|
+
default: withCtx(() => [
|
|
34
|
+
createElementVNode(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
class: normalizeClass(["x-ai-carousel-title", { "x-ai-carousel-title--expanded": _ctx.titleExpanded }]),
|
|
38
|
+
"data-test": "ai-carousel-title",
|
|
39
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleTitleExpansion && _ctx.toggleTitleExpansion(...args))
|
|
40
|
+
},
|
|
41
|
+
[
|
|
42
|
+
createVNode(_component_AIStarIcon, { class: "x-ai-carousel-title-icon" }),
|
|
43
|
+
createVNode(_component_ChangeHeight, null, {
|
|
44
|
+
default: withCtx(() => [
|
|
45
|
+
createElementVNode(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
ref: "titleRef",
|
|
49
|
+
class: normalizeClass(["x-ai-carousel-title-text", { "x-ai-carousel-title-text--expanded": _ctx.titleExpanded }])
|
|
50
|
+
},
|
|
51
|
+
toDisplayString(_ctx.title),
|
|
52
|
+
3
|
|
53
|
+
/* TEXT, CLASS */
|
|
54
|
+
)
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
/* STABLE */
|
|
58
|
+
}),
|
|
59
|
+
_ctx.isTitleOverflowing ? (openBlock(), createElementBlock("button", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "x-ai-carousel-title-button",
|
|
62
|
+
"data-test": "ai-carousel-title-button",
|
|
63
|
+
"aria-label": _ctx.titleExpanded ? "Collapse" : "Expand"
|
|
64
|
+
}, [
|
|
65
|
+
createVNode(_component_ChevronDownIcon, {
|
|
66
|
+
class: normalizeClass(["x-ai-carousel-title-button-icon", { "x-ai-carousel-title-button-icon--expanded": _ctx.titleExpanded }])
|
|
67
|
+
}, null, 8, ["class"])
|
|
68
|
+
], 8, _hoisted_2)) : createCommentVNode("v-if", true)
|
|
69
|
+
],
|
|
70
|
+
2
|
|
71
|
+
/* CLASS */
|
|
72
|
+
)
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
/* STABLE */
|
|
76
|
+
}, 8, ["payload", "event-metadata"]),
|
|
77
|
+
renderSlot(_ctx.$slots, "sliding-panel", {
|
|
78
|
+
suggestions: _ctx.suggestionsSearch,
|
|
79
|
+
tagging: _ctx.tagging
|
|
80
|
+
}, () => [
|
|
81
|
+
createVNode(_component_SlidingPanel, {
|
|
82
|
+
class: normalizeClass(_ctx.slidingPanelClasses),
|
|
83
|
+
"scroll-container-class": _ctx.slidingPanelContainerClasses,
|
|
84
|
+
"button-class": _ctx.slidingPanelButtonsClasses,
|
|
85
|
+
"reset-on-content-change": false
|
|
86
|
+
}, {
|
|
87
|
+
"sliding-panel-addons": withCtx(({ arrivedState }) => [
|
|
88
|
+
renderSlot(_ctx.$slots, "sliding-panels-addons", { arrivedState })
|
|
89
|
+
]),
|
|
90
|
+
"sliding-panel-left-button": withCtx(() => [
|
|
91
|
+
renderSlot(_ctx.$slots, "sliding-panels-left-button")
|
|
92
|
+
]),
|
|
93
|
+
"sliding-panel-right-button": withCtx(() => [
|
|
94
|
+
renderSlot(_ctx.$slots, "sliding-panels-right-button")
|
|
95
|
+
]),
|
|
96
|
+
default: withCtx(() => [
|
|
97
|
+
createElementVNode("div", _hoisted_3, [
|
|
98
|
+
createElementVNode("ul", _hoisted_4, [
|
|
99
|
+
(openBlock(true), createElementBlock(
|
|
100
|
+
Fragment,
|
|
101
|
+
null,
|
|
102
|
+
renderList(_ctx.suggestionsSearch, (suggestion) => {
|
|
103
|
+
return openBlock(), createBlock(_component_DisplayClickProvider, {
|
|
104
|
+
key: suggestion.query,
|
|
105
|
+
"tooling-display-tagging": _ctx.tagging?.searchQueries[suggestion.query].toolingDisplayClick,
|
|
106
|
+
"tooling-add2-cart-tagging": _ctx.tagging?.searchQueries[suggestion.query].toolingDisplayAdd2Cart,
|
|
107
|
+
"result-feature": "ai_carousel"
|
|
108
|
+
}, {
|
|
109
|
+
default: withCtx(() => [
|
|
110
|
+
(openBlock(true), createElementBlock(
|
|
111
|
+
Fragment,
|
|
112
|
+
null,
|
|
113
|
+
renderList(suggestion.results, (result) => {
|
|
114
|
+
return openBlock(), createElementBlock("li", {
|
|
115
|
+
key: result.id,
|
|
116
|
+
"data-test": "ai-carousel-suggestion-result"
|
|
117
|
+
}, [
|
|
118
|
+
renderSlot(_ctx.$slots, "result", { result })
|
|
119
|
+
]);
|
|
120
|
+
}),
|
|
121
|
+
128
|
|
122
|
+
/* KEYED_FRAGMENT */
|
|
123
|
+
))
|
|
124
|
+
]),
|
|
125
|
+
_: 2
|
|
126
|
+
/* DYNAMIC */
|
|
127
|
+
}, 1032, ["tooling-display-tagging", "tooling-add2-cart-tagging"]);
|
|
128
|
+
}),
|
|
129
|
+
128
|
|
130
|
+
/* KEYED_FRAGMENT */
|
|
131
|
+
))
|
|
132
|
+
])
|
|
133
|
+
])
|
|
134
|
+
]),
|
|
135
|
+
_: 3
|
|
136
|
+
/* FORWARDED */
|
|
137
|
+
}, 8, ["class", "scroll-container-class", "button-class"])
|
|
138
|
+
]),
|
|
139
|
+
renderSlot(_ctx.$slots, "extra-content"),
|
|
140
|
+
renderSlot(_ctx.$slots, "cta-button")
|
|
141
|
+
])) : createCommentVNode("v-if", true)
|
|
142
|
+
]),
|
|
143
|
+
_: 3
|
|
144
|
+
/* FORWARDED */
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
var aiCarousel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
148
|
+
|
|
149
|
+
export { aiCarousel as default };
|
|
150
|
+
//# sourceMappingURL=ai-carousel.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-carousel.vue.js","sources":["../../../../../src/x-modules/ai/components/ai-carousel.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div v-if=\"suggestionsSearch.length\" class=\"x-ai-carousel\">\n <DisplayEmitter\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'ai_carousel',\n displayOriginalQuery: query || 'ai-carousel-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-carousel-display-emitter\"\n >\n <span\n class=\"x-ai-carousel-title\"\n :class=\"{ 'x-ai-carousel-title--expanded': titleExpanded }\"\n data-test=\"ai-carousel-title\"\n @click=\"toggleTitleExpansion\"\n >\n <AIStarIcon class=\"x-ai-carousel-title-icon\" />\n <ChangeHeight>\n <span\n ref=\"titleRef\"\n class=\"x-ai-carousel-title-text\"\n :class=\"{ 'x-ai-carousel-title-text--expanded': titleExpanded }\"\n >\n {{ title }}\n </span>\n </ChangeHeight>\n <button\n v-if=\"isTitleOverflowing\"\n class=\"x-ai-carousel-title-button\"\n data-test=\"ai-carousel-title-button\"\n :aria-label=\"titleExpanded ? 'Collapse' : 'Expand'\"\n >\n <ChevronDownIcon\n class=\"x-ai-carousel-title-button-icon\"\n :class=\"{ 'x-ai-carousel-title-button-icon--expanded': titleExpanded }\"\n />\n </button>\n </span>\n </DisplayEmitter>\n <slot name=\"sliding-panel\" :suggestions=\"suggestionsSearch\" :tagging=\"tagging\">\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <div class=\"x-flex x-gap-8\">\n <ul class=\"x-ai-carousel-suggestion-results\">\n <DisplayClickProvider\n v-for=\"suggestion in suggestionsSearch\"\n :key=\"suggestion.query\"\n :tooling-display-tagging=\"\n tagging?.searchQueries[suggestion.query].toolingDisplayClick\n \"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestion.query].toolingDisplayAdd2Cart\n \"\n result-feature=\"ai_carousel\"\n >\n <li\n v-for=\"result in suggestion.results\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </DisplayClickProvider>\n </ul>\n </div>\n </SlidingPanel>\n </slot>\n <slot name=\"extra-content\" />\n <slot name=\"cta-button\" />\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n SlidingPanel,\n} from '../../../components'\nimport DisplayEmitter from '../../../components/display-emitter.vue'\nimport { use$x, useState } from '../../../composables'\nimport { aiXModule } from '../x-module'\n\nexport default defineComponent({\n xModule: aiXModule.name,\n components: {\n ChangeHeight,\n DisplayClickProvider,\n DisplayEmitter,\n CollapseHeight,\n AIStarIcon,\n ChevronDownIcon,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: {\n type: String,\n },\n /* The classes added to the sliding panel. */\n slidingPanelClasses: {\n type: String,\n },\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: {\n type: String,\n },\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: {\n type: String,\n },\n },\n setup(props) {\n const $x = use$x()\n const { query, isNoResults, suggestionsSearch, queries, tagging } = useState('ai')\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const titleRef = ref<HTMLElement | null>(null)\n const titleExpanded = ref(false)\n const isTitleOverflowing = ref(false)\n\n /**\n * Checks if the title is overflowing and updates the state.\n */\n function updateTitleOverflow() {\n if (titleExpanded.value) {\n return\n }\n if (titleRef.value) {\n isTitleOverflowing.value = titleRef.value.scrollWidth > titleRef.value.clientWidth\n }\n }\n\n /**\n * Toggles the title expanded state if it is overflowing.\n */\n function toggleTitleExpansion() {\n if (isTitleOverflowing.value) {\n titleExpanded.value = !titleExpanded.value\n }\n }\n\n const title = computed(() => {\n if (!props.title) {\n const queriesList = new Intl.ListFormat('en', {\n style: 'long',\n type: 'conjunction',\n }).format(queries.value.map(({ query }) => query))\n return `Searching for ${queriesList}`\n }\n return props.title\n })\n\n watch(queries, () => {\n if (queries.value.length > 0) {\n $x.emit('AiSuggestionsSearchRequestUpdated')\n }\n })\n\n useResizeObserver(titleRef, updateTitleOverflow)\n\n return {\n emptyTaggingRequest,\n isNoResults,\n isTitleOverflowing,\n queries,\n query,\n suggestionsSearch,\n tagging,\n title,\n titleExpanded,\n titleRef,\n toggleTitleExpansion,\n }\n },\n})\n</script>\n<style lang=\"css\">\n.x-ai-carousel {\n --color: var(--x-ai-carousel-color, #bbc9cf);\n --color-lighter: var(--x-ai-carousel-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n padding: 8px 0;\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-carousel-title {\n display: flex;\n font-size: 12px;\n gap: 8px;\n align-items: flex-start;\n margin: 0 14px 8px;\n cursor: pointer;\n}\n.x-ai-carousel-title-text {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.x-ai-carousel-title-text--expanded {\n white-space: normal;\n}\n.x-ai-carousel-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--color);\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition: transform 0.3s ease;\n}\n.x-ai-carousel-title-button-icon--expanded {\n transform: rotate(180deg);\n}\n.x-ai-carousel-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n</style>\n"],"names":["_createBlock","_withCtx","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_normalizeClass","_renderSlot","_Fragment","_renderList","_createCommentVNode"],"mappings":";;;;;;;EAEyC,KAAA,EAAM;;;AAuDhC,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,gBAAA,EAAgB;AACrB,MAAA,UAAA,GAAA,EAAA,KAAA,EAAM,kCAAA,EAAkC;;;;;;;;;sBAzDtDA,WAAA,CAqFiB,yBAAA,EAAA,IAAA,EAAA;AAAA,IAAA,OAAA,EAAAC,OAAA,CApFf,MAmFM;AAAA,MAnFK,IAAA,CAAA,iBAAA,CAAkB,MAAA,IAAAC,SAAA,EAAA,EAA7BC,kBAAA,CAmFM,KAAA,EAnFN,UAAA,EAmFM;AAAA,QAlFJC,WAAA,CAqCiB,yBAAA,EAAA;AAAA,UApCd,OAAA,EAAS,cAAS,cAAA,IAAkB,IAAA,CAAA,mBAAA;AAAA,UACpC,gBAAA,EAAc;AAAA,YAAA,OAAA,EAAA,aAAA;kCAAsE,IAAA,CAAA,KAAA,IAAK,2BAAA;AAAA,YAAA,WAAA,EAAA;;UAK1F,WAAA,EAAU;AAAA,SAAA,EAAA;2BAEV,MA2BO;AAAA,YA3BPC,kBAAA;AAAA,cA2BO,MAAA;AAAA,cAAA;AAAA,gBA1BL,KAAA,EAAKC,cAAA,CAAA,CAAC,qBAAA,EAAqB,EAAA,+BAAA,EACgB,IAAA,CAAA,aAAA,EAAa,CAAA,CAAA;AAAA,gBACxD,WAAA,EAAU,mBAAA;AAAA,gBACT,SAAK,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA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A,CAAA,EADtCC,kBAAA;AAAA,4BAOKK,QAAA;AAAA,4BAAA,IAAA;AAAA,4BAAAC,UAAA,CANc,UAAA,CAAW,OAAA,EAAO,CAA5B,MAAA,KAAM;kDADfN,kBAAA,CAOK,IAAA,EAAA;AAAA,gCALF,KAAK,MAAA,CAAO,EAAA;AAAA,gCACb,WAAA,EAAU;AAAA,+BAAA,EAAA;AAGV,gCAAAI,UAAA,CAAuC,yBAAlB,MAAA,EAAc;AAAA,+BAAA,CAAA;;;;;;;;;;;;;;;;;;;;QAO/CA,UAAA,CAA6B,IAAA,CAAA,MAAA,EAAA,eAAA,CAAA;AAAA,QAC7BA,UAAA,CAA0B,IAAA,CAAA,MAAA,EAAA,YAAA;AAAA,OAAA,CAAA,IAAAG,kBAAA,CAAA,MAAA,EAAA,IAAA;;;;;;;;;;"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { useResizeObserver } from '@vueuse/core';
|
|
2
|
+
import { defineComponent, ref, computed, watch } from 'vue';
|
|
3
|
+
import '../../../components/animations/animate-clip-path/animate-clip-path.style.css.js';
|
|
4
|
+
import '../../../components/animations/animate-scale/animate-scale.style.css.js';
|
|
5
|
+
import '../../../components/animations/animate-translate/animate-translate.style.css.js';
|
|
6
|
+
import '../../../components/animations/animate-width.vue2.js';
|
|
7
|
+
import '../../../components/animations/animate-width.vue3.js';
|
|
8
|
+
import ChangeHeight from '../../../components/animations/change-height.vue.js';
|
|
9
|
+
import CollapseHeight from '../../../components/animations/collapse-height.vue.js';
|
|
10
|
+
import '../../../components/animations/collapse-width.vue2.js';
|
|
11
|
+
import '../../../components/animations/collapse-width.vue3.js';
|
|
12
|
+
import '../../../components/animations/cross-fade.vue2.js';
|
|
13
|
+
import '../../../components/animations/cross-fade.vue3.js';
|
|
14
|
+
import '../../../components/animations/fade-and-slide.vue2.js';
|
|
15
|
+
import '../../../components/animations/fade-and-slide.vue3.js';
|
|
16
|
+
import '../../../components/animations/fade.vue2.js';
|
|
17
|
+
import '../../../components/animations/fade.vue3.js';
|
|
18
|
+
import '../../../components/animations/no-animation.vue.js';
|
|
19
|
+
import '../../../components/animations/staggered-fade-and-slide.vue2.js';
|
|
20
|
+
import '../../../components/animations/staggered-fade-and-slide.vue3.js';
|
|
21
|
+
import '../../../components/auto-progress-bar.vue2.js';
|
|
22
|
+
import '../../../components/auto-progress-bar.vue3.js';
|
|
23
|
+
import '../../../components/base-dropdown.vue2.js';
|
|
24
|
+
import '../../../components/base-dropdown.vue3.js';
|
|
25
|
+
import '../../../components/base-event-button.vue2.js';
|
|
26
|
+
import '../../../components/base-grid.vue2.js';
|
|
27
|
+
import '../../../components/base-grid.vue3.js';
|
|
28
|
+
import '../../../components/base-keyboard-navigation.vue2.js';
|
|
29
|
+
import '../../../components/base-rating.vue2.js';
|
|
30
|
+
import '../../../components/base-rating.vue3.js';
|
|
31
|
+
import '../../../components/base-slider.vue2.js';
|
|
32
|
+
import '../../../components/base-slider.vue3.js';
|
|
33
|
+
import '../../../components/base-switch.vue2.js';
|
|
34
|
+
import '../../../components/base-switch.vue3.js';
|
|
35
|
+
import '../../../components/base-teleport.vue2.js';
|
|
36
|
+
import '../../../components/base-variable-column-grid.vue2.js';
|
|
37
|
+
import '../../../components/column-picker/base-column-picker-dropdown.vue2.js';
|
|
38
|
+
import '../../../components/column-picker/base-column-picker-list.vue2.js';
|
|
39
|
+
import '../../../components/currency/base-currency.vue2.js';
|
|
40
|
+
import _sfc_main$2 from '../../../components/display-click-provider.vue.js';
|
|
41
|
+
import _sfc_main$1 from '../../../components/display-emitter.vue.js';
|
|
42
|
+
import '../../../components/filters/labels/base-price-filter-label.vue.js';
|
|
43
|
+
import '../../../components/filters/labels/base-rating-filter-label.vue2.js';
|
|
44
|
+
import '../../../components/global-x-bus.vue.js';
|
|
45
|
+
import '../../../components/highlight.vue2.js';
|
|
46
|
+
import AIStarIcon from '../../../components/icons/ai-star.vue.js';
|
|
47
|
+
import ChevronDownIcon from '../../../components/icons/chevron-down.vue.js';
|
|
48
|
+
import '../../../components/items-list.vue2.js';
|
|
49
|
+
import '../../../components/layouts/fixed-header-and-asides-layout.vue2.js';
|
|
50
|
+
import '../../../components/layouts/fixed-header-and-asides-layout.vue3.js';
|
|
51
|
+
import '../../../components/layouts/multi-column-max-width-layout.vue2.js';
|
|
52
|
+
import '../../../components/layouts/multi-column-max-width-layout.vue3.js';
|
|
53
|
+
import '../../../components/layouts/multi-column-max-width-layout.vue4.js';
|
|
54
|
+
import '../../../components/layouts/single-column-layout.vue2.js';
|
|
55
|
+
import '../../../components/layouts/single-column-layout.vue3.js';
|
|
56
|
+
import '../../../components/location-provider.vue.js';
|
|
57
|
+
import '../../../components/modals/base-events-modal-close.vue2.js';
|
|
58
|
+
import '../../../components/modals/base-events-modal-open.vue2.js';
|
|
59
|
+
import '../../../components/modals/base-events-modal.vue2.js';
|
|
60
|
+
import '../../../components/modals/base-id-modal-close.vue2.js';
|
|
61
|
+
import '../../../components/modals/base-id-modal-open.vue2.js';
|
|
62
|
+
import '../../../components/modals/base-id-modal.vue2.js';
|
|
63
|
+
import '../../../components/modals/base-modal.vue2.js';
|
|
64
|
+
import '../../../components/modals/base-modal.vue3.js';
|
|
65
|
+
import '../../../components/modals/close-main-modal.vue2.js';
|
|
66
|
+
import '../../../components/modals/main-modal.vue2.js';
|
|
67
|
+
import '../../../components/modals/open-main-modal.vue2.js';
|
|
68
|
+
import '../../../components/page-loader-button.vue2.js';
|
|
69
|
+
import '../../../components/page-loader-button.vue3.js';
|
|
70
|
+
import '../../../components/page-selector.vue2.js';
|
|
71
|
+
import '../../../components/page-selector.vue3.js';
|
|
72
|
+
import '../../../components/panels/base-header-toggle-panel.vue2.js';
|
|
73
|
+
import '../../../components/panels/base-header-toggle-panel.vue3.js';
|
|
74
|
+
import '../../../components/panels/base-id-toggle-panel-button.vue2.js';
|
|
75
|
+
import '../../../components/panels/base-id-toggle-panel.vue2.js';
|
|
76
|
+
import '../../../components/panels/base-tabs-panel.vue2.js';
|
|
77
|
+
import '../../../components/panels/base-tabs-panel.vue3.js';
|
|
78
|
+
import '../../../components/panels/base-toggle-panel.vue2.js';
|
|
79
|
+
import '../../../components/result/base-result-add-to-cart.vue2.js';
|
|
80
|
+
import '../../../components/result/base-result-current-price.vue2.js';
|
|
81
|
+
import '../../../components/result/base-result-image.vue2.js';
|
|
82
|
+
import '../../../components/result/base-result-image.vue3.js';
|
|
83
|
+
import '../../../components/result/base-result-link.vue2.js';
|
|
84
|
+
import '../../../components/result/base-result-link.vue3.js';
|
|
85
|
+
import '../../../components/result/base-result-previous-price.vue2.js';
|
|
86
|
+
import '../../../components/result/base-result-rating.vue2.js';
|
|
87
|
+
import '../../../components/result/base-result-rating.vue3.js';
|
|
88
|
+
import '../../../components/result/result-variant-selector.vue2.js';
|
|
89
|
+
import '../../../components/result/result-variant-selector.vue3.js';
|
|
90
|
+
import '../../../components/result/result-variants-provider.vue.js';
|
|
91
|
+
import '../../../components/scroll/base-scroll.vue2.js';
|
|
92
|
+
import '@empathyco/x-utils';
|
|
93
|
+
import { use$x } from '../../../composables/use-_x.js';
|
|
94
|
+
import SlidingPanel from '../../../components/sliding-panel.vue.js';
|
|
95
|
+
import '../../../components/snippet-callbacks.vue2.js';
|
|
96
|
+
import '../../../components/suggestions/base-suggestion.vue2.js';
|
|
97
|
+
import '../../../components/suggestions/base-suggestions.vue2.js';
|
|
98
|
+
import '../../../components/suggestions/base-suggestions.vue3.js';
|
|
99
|
+
import '../../../composables/create-use-device.js';
|
|
100
|
+
import 'vuex';
|
|
101
|
+
import '@vue/devtools-api';
|
|
102
|
+
import '../../../plugins/devtools/timeline.devtools.js';
|
|
103
|
+
import 'rxjs/operators';
|
|
104
|
+
import 'rxjs';
|
|
105
|
+
import '../../../plugins/devtools/colors.utils.js';
|
|
106
|
+
import '../../../plugins/x-bus.js';
|
|
107
|
+
import '../../../plugins/x-plugin.js';
|
|
108
|
+
import { useState } from '../../../composables/use-state.js';
|
|
109
|
+
import { aiXModule } from '../x-module.js';
|
|
110
|
+
|
|
111
|
+
var _sfc_main = defineComponent({
|
|
112
|
+
xModule: aiXModule.name,
|
|
113
|
+
components: {
|
|
114
|
+
ChangeHeight,
|
|
115
|
+
DisplayClickProvider: _sfc_main$2,
|
|
116
|
+
DisplayEmitter: _sfc_main$1,
|
|
117
|
+
CollapseHeight,
|
|
118
|
+
AIStarIcon,
|
|
119
|
+
ChevronDownIcon,
|
|
120
|
+
SlidingPanel,
|
|
121
|
+
},
|
|
122
|
+
props: {
|
|
123
|
+
/* The title text displayed */
|
|
124
|
+
title: {
|
|
125
|
+
type: String,
|
|
126
|
+
},
|
|
127
|
+
/* The classes added to the sliding panel. */
|
|
128
|
+
slidingPanelClasses: {
|
|
129
|
+
type: String,
|
|
130
|
+
},
|
|
131
|
+
/* The classes added to the sliding panel container. */
|
|
132
|
+
slidingPanelContainerClasses: {
|
|
133
|
+
type: String,
|
|
134
|
+
},
|
|
135
|
+
/* The classes added to the sliding panel buttons. */
|
|
136
|
+
slidingPanelButtonsClasses: {
|
|
137
|
+
type: String,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
setup(props) {
|
|
141
|
+
const $x = use$x();
|
|
142
|
+
const { query, isNoResults, suggestionsSearch, queries, tagging } = useState('ai');
|
|
143
|
+
const emptyTaggingRequest = { url: '', params: {} };
|
|
144
|
+
const titleRef = ref(null);
|
|
145
|
+
const titleExpanded = ref(false);
|
|
146
|
+
const isTitleOverflowing = ref(false);
|
|
147
|
+
/**
|
|
148
|
+
* Checks if the title is overflowing and updates the state.
|
|
149
|
+
*/
|
|
150
|
+
function updateTitleOverflow() {
|
|
151
|
+
if (titleExpanded.value) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (titleRef.value) {
|
|
155
|
+
isTitleOverflowing.value = titleRef.value.scrollWidth > titleRef.value.clientWidth;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Toggles the title expanded state if it is overflowing.
|
|
160
|
+
*/
|
|
161
|
+
function toggleTitleExpansion() {
|
|
162
|
+
if (isTitleOverflowing.value) {
|
|
163
|
+
titleExpanded.value = !titleExpanded.value;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
const title = computed(() => {
|
|
167
|
+
if (!props.title) {
|
|
168
|
+
const queriesList = new Intl.ListFormat('en', {
|
|
169
|
+
style: 'long',
|
|
170
|
+
type: 'conjunction',
|
|
171
|
+
}).format(queries.value.map(({ query }) => query));
|
|
172
|
+
return `Searching for ${queriesList}`;
|
|
173
|
+
}
|
|
174
|
+
return props.title;
|
|
175
|
+
});
|
|
176
|
+
watch(queries, () => {
|
|
177
|
+
if (queries.value.length > 0) {
|
|
178
|
+
$x.emit('AiSuggestionsSearchRequestUpdated');
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
useResizeObserver(titleRef, updateTitleOverflow);
|
|
182
|
+
return {
|
|
183
|
+
emptyTaggingRequest,
|
|
184
|
+
isNoResults,
|
|
185
|
+
isTitleOverflowing,
|
|
186
|
+
queries,
|
|
187
|
+
query,
|
|
188
|
+
suggestionsSearch,
|
|
189
|
+
tagging,
|
|
190
|
+
title,
|
|
191
|
+
titleExpanded,
|
|
192
|
+
titleRef,
|
|
193
|
+
toggleTitleExpansion,
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
export { _sfc_main as default };
|
|
199
|
+
//# sourceMappingURL=ai-carousel.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-carousel.vue2.js","sources":["../../../../../src/x-modules/ai/components/ai-carousel.vue"],"sourcesContent":["<template>\n <CollapseHeight>\n <div v-if=\"suggestionsSearch.length\" class=\"x-ai-carousel\">\n <DisplayEmitter\n :payload=\"tagging?.toolingDisplay ?? emptyTaggingRequest\"\n :event-metadata=\"{\n feature: 'ai_carousel',\n displayOriginalQuery: query || 'ai-carousel-without-query',\n replaceable: false,\n }\"\n data-test=\"ai-carousel-display-emitter\"\n >\n <span\n class=\"x-ai-carousel-title\"\n :class=\"{ 'x-ai-carousel-title--expanded': titleExpanded }\"\n data-test=\"ai-carousel-title\"\n @click=\"toggleTitleExpansion\"\n >\n <AIStarIcon class=\"x-ai-carousel-title-icon\" />\n <ChangeHeight>\n <span\n ref=\"titleRef\"\n class=\"x-ai-carousel-title-text\"\n :class=\"{ 'x-ai-carousel-title-text--expanded': titleExpanded }\"\n >\n {{ title }}\n </span>\n </ChangeHeight>\n <button\n v-if=\"isTitleOverflowing\"\n class=\"x-ai-carousel-title-button\"\n data-test=\"ai-carousel-title-button\"\n :aria-label=\"titleExpanded ? 'Collapse' : 'Expand'\"\n >\n <ChevronDownIcon\n class=\"x-ai-carousel-title-button-icon\"\n :class=\"{ 'x-ai-carousel-title-button-icon--expanded': titleExpanded }\"\n />\n </button>\n </span>\n </DisplayEmitter>\n <slot name=\"sliding-panel\" :suggestions=\"suggestionsSearch\" :tagging=\"tagging\">\n <SlidingPanel\n :class=\"slidingPanelClasses\"\n :scroll-container-class=\"slidingPanelContainerClasses\"\n :button-class=\"slidingPanelButtonsClasses\"\n :reset-on-content-change=\"false\"\n >\n <template #sliding-panel-addons=\"{ arrivedState }\">\n <slot name=\"sliding-panels-addons\" :arrived-state=\"arrivedState\" />\n </template>\n <template #sliding-panel-left-button>\n <slot name=\"sliding-panels-left-button\" />\n </template>\n <template #sliding-panel-right-button>\n <slot name=\"sliding-panels-right-button\" />\n </template>\n <div class=\"x-flex x-gap-8\">\n <ul class=\"x-ai-carousel-suggestion-results\">\n <DisplayClickProvider\n v-for=\"suggestion in suggestionsSearch\"\n :key=\"suggestion.query\"\n :tooling-display-tagging=\"\n tagging?.searchQueries[suggestion.query].toolingDisplayClick\n \"\n :tooling-add2-cart-tagging=\"\n tagging?.searchQueries[suggestion.query].toolingDisplayAdd2Cart\n \"\n result-feature=\"ai_carousel\"\n >\n <li\n v-for=\"result in suggestion.results\"\n :key=\"result.id\"\n data-test=\"ai-carousel-suggestion-result\"\n >\n <!-- @slot (required) result card -->\n <slot name=\"result\" :result=\"result\" />\n </li>\n </DisplayClickProvider>\n </ul>\n </div>\n </SlidingPanel>\n </slot>\n <slot name=\"extra-content\" />\n <slot name=\"cta-button\" />\n </div>\n </CollapseHeight>\n</template>\n\n<script lang=\"ts\">\nimport type { TaggingRequest } from '@empathyco/x-types'\nimport { useResizeObserver } from '@vueuse/core'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport {\n AIStarIcon,\n ChangeHeight,\n ChevronDownIcon,\n CollapseHeight,\n DisplayClickProvider,\n SlidingPanel,\n} from '../../../components'\nimport DisplayEmitter from '../../../components/display-emitter.vue'\nimport { use$x, useState } from '../../../composables'\nimport { aiXModule } from '../x-module'\n\nexport default defineComponent({\n xModule: aiXModule.name,\n components: {\n ChangeHeight,\n DisplayClickProvider,\n DisplayEmitter,\n CollapseHeight,\n AIStarIcon,\n ChevronDownIcon,\n SlidingPanel,\n },\n props: {\n /* The title text displayed */\n title: {\n type: String,\n },\n /* The classes added to the sliding panel. */\n slidingPanelClasses: {\n type: String,\n },\n /* The classes added to the sliding panel container. */\n slidingPanelContainerClasses: {\n type: String,\n },\n /* The classes added to the sliding panel buttons. */\n slidingPanelButtonsClasses: {\n type: String,\n },\n },\n setup(props) {\n const $x = use$x()\n const { query, isNoResults, suggestionsSearch, queries, tagging } = useState('ai')\n const emptyTaggingRequest: TaggingRequest = { url: '', params: {} }\n\n const titleRef = ref<HTMLElement | null>(null)\n const titleExpanded = ref(false)\n const isTitleOverflowing = ref(false)\n\n /**\n * Checks if the title is overflowing and updates the state.\n */\n function updateTitleOverflow() {\n if (titleExpanded.value) {\n return\n }\n if (titleRef.value) {\n isTitleOverflowing.value = titleRef.value.scrollWidth > titleRef.value.clientWidth\n }\n }\n\n /**\n * Toggles the title expanded state if it is overflowing.\n */\n function toggleTitleExpansion() {\n if (isTitleOverflowing.value) {\n titleExpanded.value = !titleExpanded.value\n }\n }\n\n const title = computed(() => {\n if (!props.title) {\n const queriesList = new Intl.ListFormat('en', {\n style: 'long',\n type: 'conjunction',\n }).format(queries.value.map(({ query }) => query))\n return `Searching for ${queriesList}`\n }\n return props.title\n })\n\n watch(queries, () => {\n if (queries.value.length > 0) {\n $x.emit('AiSuggestionsSearchRequestUpdated')\n }\n })\n\n useResizeObserver(titleRef, updateTitleOverflow)\n\n return {\n emptyTaggingRequest,\n isNoResults,\n isTitleOverflowing,\n queries,\n query,\n suggestionsSearch,\n tagging,\n title,\n titleExpanded,\n titleRef,\n toggleTitleExpansion,\n }\n },\n})\n</script>\n<style lang=\"css\">\n.x-ai-carousel {\n --color: var(--x-ai-carousel-color, #bbc9cf);\n --color-lighter: var(--x-ai-carousel-color-lighter, color-mix(in srgb, var(--color) 25%, white));\n\n padding: 8px 0;\n position: relative;\n border-radius: 1.5rem;\n background-color: var(--color-lighter);\n}\n\n.x-ai-carousel-title {\n display: flex;\n font-size: 12px;\n gap: 8px;\n align-items: flex-start;\n margin: 0 14px 8px;\n cursor: pointer;\n}\n.x-ai-carousel-title-text {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.x-ai-carousel-title-text--expanded {\n white-space: normal;\n}\n.x-ai-carousel-title-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n color: var(--color);\n flex-shrink: 0;\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--color);\n margin-bottom: auto;\n}\n.x-ai-carousel-title-button-icon {\n height: 1rem;\n aspect-ratio: 1 / 1;\n transition: transform 0.3s ease;\n}\n.x-ai-carousel-title-button-icon--expanded {\n transform: rotate(180deg);\n}\n.x-ai-carousel-suggestion-results {\n display: flex;\n gap: 1rem;\n padding-left: 1rem;\n padding-right: 1rem;\n}\n</style>\n"],"names":["DisplayClickProvider","DisplayEmitter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AQ,CAAC,KAAK,CAAC,WAAU;YACnF;QACF;AAEA;;AAEE;AACF,QAAA,SAAS,oBAAoB,GAAA;AAC3B,YAAA,IAAI,kBAAkB,CAAC,KAAK,EAAE;AAC5B,gBAAA,aAAa,CAAC,KAAI,GAAI,CAAC,aAAa,CAAC,KAAI;YAC3C;QACF;AAEA,QAAA,MAAM,KAAI,GAAI,QAAQ,CAAC,MAAI;AACzB,YAAA,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBAChB,MAAM,WAAU,GAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AAC5C,oBAAA,KAAK,EAAE,MAAM;AACb,oBAAA,IAAI,EAAE,aAAa;AACpB,iBAAA,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,KAAK,CAAC,CAAA;gBACjD,OAAO,CAAA,cAAA,EAAiB,WAAW,CAAA,CAAC;YACtC;YACA,OAAO,KAAK,CAAC,KAAI;AACnB,QAAA,CAAC,CAAA;AAED,QAAA,KAAK,CAAC,OAAO,EAAE,MAAI;YACjB,IAAI,OAAO,CAAC,KAAK,CAAC,MAAK,GAAI,CAAC,EAAE;AAC5B,gBAAA,EAAE,CAAC,IAAI,CAAC,mCAAmC,CAAA;YAC7C;AACF,QAAA,CAAC,CAAA;AAED,QAAA,iBAAiB,CAAC,QAAQ,EAAE,mBAAmB,CAAA;QAE/C,OAAO;YACL,mBAAmB;YACnB,WAAW;YACX,kBAAkB;YAClB,OAAO;YACP,KAAK;YACL,iBAAiB;YACjB,OAAO;YACP,KAAK;YACL,aAAa;YACb,QAAQ;YACR,oBAAoB;SACtB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import injectCss from '../../../../tools/inject-css.js';
|
|
2
|
+
|
|
3
|
+
var css = ".x-ai-carousel{--color:var(--x-ai-carousel-color,#bbc9cf);--color-lighter:var(--x-ai-carousel-color-lighter,color-mix(in srgb,var(--color) 25%,#fff));background-color:var(--color-lighter);border-radius:1.5rem;padding:8px 0;position:relative}.x-ai-carousel-title{align-items:flex-start;cursor:pointer;display:flex;font-size:12px;gap:8px;margin:0 14px 8px}.x-ai-carousel-title-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-ai-carousel-title-text--expanded{white-space:normal}.x-ai-carousel-title-icon{aspect-ratio:1/1;color:var(--color);flex-shrink:0;height:1rem;margin-bottom:auto}.x-ai-carousel-title-button{align-items:center;background:none;border:none;color:var(--color);cursor:pointer;display:flex;justify-content:center;margin-bottom:auto;padding:0}.x-ai-carousel-title-button-icon{aspect-ratio:1/1;height:1rem;transition:transform .3s ease}.x-ai-carousel-title-button-icon--expanded{transform:rotate(180deg)}.x-ai-carousel-suggestion-results{display:flex;gap:1rem;padding-left:1rem;padding-right:1rem}";
|
|
4
|
+
injectCss(css);
|
|
5
|
+
|
|
6
|
+
export { css };
|
|
7
|
+
//# sourceMappingURL=ai-carousel.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-carousel.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -21,7 +21,9 @@ const setAiQueryFromPreviewWire = wireCommit('setQuery', ({ eventPayload: { quer
|
|
|
21
21
|
/** Fetches the AI suggestions streaming response. */
|
|
22
22
|
const fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions');
|
|
23
23
|
/** Fetches and save the AI suggestions search response. */
|
|
24
|
-
const fetchAndSaveAiSuggestionsSearchWire =
|
|
24
|
+
const fetchAndSaveAiSuggestionsSearchWire = wireDispatch('fetchAndSaveAiSuggestionsSearch', true);
|
|
25
|
+
/** Fetches and save the AI suggestions search response. */
|
|
26
|
+
const fetchAndSaveAiSuggestionsSearchIfExpandedWire = filterTruthyPayload(wireDispatch('fetchAndSaveAiSuggestionsSearch'));
|
|
25
27
|
/** Sets the AI state `relatedTags`.*/
|
|
26
28
|
const setAiRelatedTagsWire = wireCommit('setAiRelatedTags');
|
|
27
29
|
/** Resets the related prompts state. */
|
|
@@ -55,10 +57,12 @@ const aiWiring = createWiring({
|
|
|
55
57
|
resetAiStateWire,
|
|
56
58
|
fetchAndSaveAiSuggestionsWire,
|
|
57
59
|
},
|
|
58
|
-
|
|
59
|
-
UserClickedAiOverviewExpandButton: {
|
|
60
|
+
AiSuggestionsSearchRequestUpdated: {
|
|
60
61
|
fetchAndSaveAiSuggestionsSearchWire,
|
|
61
62
|
},
|
|
63
|
+
UserClickedAiOverviewExpandButton: {
|
|
64
|
+
fetchAndSaveAiSuggestionsSearchIfExpandedWire,
|
|
65
|
+
},
|
|
62
66
|
SelectedRelatedTagsChanged: {
|
|
63
67
|
setAiRelatedTagsWire,
|
|
64
68
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import {\n createWiring,\n filterTruthyPayload,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** AI XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the AI state from URL data. */\nconst setUrlParamsWire = wireDispatch('setUrlParams')\n/** Sets the AI state `params`. */\nconst setExtraParamsWire = wireCommit('setParams')\n\n/** Sets the AI state `query`. */\nconst setAiQueryWire = wireCommit('setQuery')\n\n/** Sets the AI state `query` with the selectedQueryPreview's query. */\nconst setAiQueryFromPreviewWire = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the AI suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearchWire = filterTruthyPayload(\n wireDispatch('fetchAndSaveAiSuggestionsSearch'),\n)\n\n/** Sets the AI state `relatedTags`.*/\nconst setAiRelatedTagsWire = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiStateWire = wireCommitWithoutPayload('resetAiState')\n\n/** Sets the origin for the AI requests. */\nconst saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata)\n\n/** Sets the AI state `selectedFilters`. */\nconst setSelectedFiltersWire = wireCommit('setSelectedFilters')\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n ExtraParamsChanged: {\n setExtraParamsWire,\n },\n UserAcceptedAQuery: {\n setAiQueryWire,\n },\n UserAcceptedAQueryPreview: {\n setAiQueryFromPreviewWire,\n },\n UserClearedQuery: {\n setAiQueryWire,\n },\n AiSuggestionsRequestUpdated: {\n resetAiStateWire,\n fetchAndSaveAiSuggestionsWire,\n },\n
|
|
1
|
+
{"version":3,"file":"wiring.js","sources":["../../../../src/x-modules/ai/wiring.ts"],"sourcesContent":["import {\n createWiring,\n filterTruthyPayload,\n namespacedWireCommit,\n namespacedWireCommitWithoutPayload,\n namespacedWireDispatch,\n} from '../../wiring'\n\n/** AI XModule name. */\nconst moduleName = 'ai'\n/** WireCommit for AiXModule. */\nconst wireCommit = namespacedWireCommit(moduleName)\n/** WireCommitWithoutPayload for AiXModule. */\nconst wireCommitWithoutPayload = namespacedWireCommitWithoutPayload(moduleName)\n/** WireDispatch for AiXModule.*/\nconst wireDispatch = namespacedWireDispatch(moduleName)\n\n/** Sets the AI state from URL data. */\nconst setUrlParamsWire = wireDispatch('setUrlParams')\n/** Sets the AI state `params`. */\nconst setExtraParamsWire = wireCommit('setParams')\n\n/** Sets the AI state `query`. */\nconst setAiQueryWire = wireCommit('setQuery')\n\n/** Sets the AI state `query` with the selectedQueryPreview's query. */\nconst setAiQueryFromPreviewWire = wireCommit('setQuery', ({ eventPayload: { query } }) => query)\n\n/** Fetches the AI suggestions streaming response. */\nconst fetchAndSaveAiSuggestionsWire = wireDispatch('fetchAndSaveAiSuggestions')\n\n/** Fetches and save the AI suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearchWire = wireDispatch('fetchAndSaveAiSuggestionsSearch', true)\n\n/** Fetches and save the AI suggestions search response. */\nconst fetchAndSaveAiSuggestionsSearchIfExpandedWire = filterTruthyPayload(\n wireDispatch('fetchAndSaveAiSuggestionsSearch'),\n)\n\n/** Sets the AI state `relatedTags`.*/\nconst setAiRelatedTagsWire = wireCommit('setAiRelatedTags')\n\n/** Resets the related prompts state. */\nconst resetAiStateWire = wireCommitWithoutPayload('resetAiState')\n\n/** Sets the origin for the AI requests. */\nconst saveAiOriginWire = wireDispatch('saveOrigin', ({ metadata }) => metadata)\n\n/** Sets the AI state `selectedFilters`. */\nconst setSelectedFiltersWire = wireCommit('setSelectedFilters')\n\n/**\n * Wiring configuration for the {@link AiXModule | AI module}.\n *\n * @internal\n */\nexport const aiWiring = createWiring({\n ParamsLoadedFromUrl: {\n setUrlParamsWire,\n },\n ExtraParamsChanged: {\n setExtraParamsWire,\n },\n UserAcceptedAQuery: {\n setAiQueryWire,\n },\n UserAcceptedAQueryPreview: {\n setAiQueryFromPreviewWire,\n },\n UserClearedQuery: {\n setAiQueryWire,\n },\n AiSuggestionsRequestUpdated: {\n resetAiStateWire,\n fetchAndSaveAiSuggestionsWire,\n },\n AiSuggestionsSearchRequestUpdated: {\n fetchAndSaveAiSuggestionsSearchWire,\n },\n UserClickedAiOverviewExpandButton: {\n fetchAndSaveAiSuggestionsSearchIfExpandedWire,\n },\n SelectedRelatedTagsChanged: {\n setAiRelatedTagsWire,\n },\n SelectedFiltersForRequestChanged: {\n setSelectedFiltersWire,\n },\n AiOverviewMounted: {\n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A,yBAAyB,EAAE;QACzB,yBAAyB;AAC1B,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,cAAc;AACf,KAAA;AACD,IAAA,2BAA2B,EAAE;QAC3B,gBAAgB;QAChB,6BAA6B;AAC9B,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,mCAAmC;AACpC,KAAA;AACD,IAAA,iCAAiC,EAAE;QACjC,6CAA6C;AAC9C,KAAA;AACD,IAAA,0BAA0B,EAAE;QAC1B,oBAAoB;AACrB,KAAA;AACD,IAAA,gCAAgC,EAAE;QAChC,sBAAsB;AACvB,KAAA;AACD,IAAA,iBAAiB,EAAE;QACjB,gBAAgB;AACjB,KAAA;AACF,CAAA;;;;"}
|
|
@@ -5,6 +5,7 @@ import '../../../components/animations/animate-translate/animate-translate.style
|
|
|
5
5
|
import '../../../components/animations/animate-width.vue2.js';
|
|
6
6
|
import '../../../components/animations/animate-width.vue3.js';
|
|
7
7
|
import '../../../components/animations/change-height.vue2.js';
|
|
8
|
+
import '../../../components/animations/change-height.vue3.js';
|
|
8
9
|
import '../../../components/animations/collapse-height.vue2.js';
|
|
9
10
|
import '../../../components/animations/collapse-height.vue3.js';
|
|
10
11
|
import '../../../components/animations/collapse-width.vue2.js';
|