@coveo/atomic-react 3.2.1-pre.94c445f363 → 3.2.1-pre.eb70faf263

Sign up to get free protection for your applications and to get access to all the features.
@@ -242,6 +242,7 @@ const AtomicProductExcerpt = /*@__PURE__*/ createReactComponent('atomic-product-
242
242
  const AtomicProductFieldCondition = /*@__PURE__*/ createReactComponent('atomic-product-field-condition');
243
243
  const AtomicProductImage = /*@__PURE__*/ createReactComponent('atomic-product-image');
244
244
  const AtomicProductLink = /*@__PURE__*/ createReactComponent('atomic-product-link');
245
+ const AtomicProductMultiValueText = /*@__PURE__*/ createReactComponent('atomic-product-multi-value-text');
245
246
  const AtomicProductNumericFieldValue = /*@__PURE__*/ createReactComponent('atomic-product-numeric-field-value');
246
247
  const AtomicProductPrice = /*@__PURE__*/ createReactComponent('atomic-product-price');
247
248
  const AtomicProductRating = /*@__PURE__*/ createReactComponent('atomic-product-rating');
@@ -392,6 +393,7 @@ exports.AtomicProductExcerpt = AtomicProductExcerpt;
392
393
  exports.AtomicProductFieldCondition = AtomicProductFieldCondition;
393
394
  exports.AtomicProductImage = AtomicProductImage;
394
395
  exports.AtomicProductLink = AtomicProductLink;
396
+ exports.AtomicProductMultiValueText = AtomicProductMultiValueText;
395
397
  exports.AtomicProductNumericFieldValue = AtomicProductNumericFieldValue;
396
398
  exports.AtomicProductPrice = AtomicProductPrice;
397
399
  exports.AtomicProductRating = AtomicProductRating;
@@ -1 +1 @@
1
- {"version":3,"file":"atomic-react.cjs","sources":["../../../src/components/stencil-generated/commerce/react-component-lib/utils/case.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx","../../../src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx","../../../src/components/stencil-generated/commerce/index.ts","../../../src/components/commerce/CommerceInterfaceWrapper.tsx","../../../src/components/commerce/CommerceProductListWrapper.tsx","../../../src/components/commerce/CommerceRecommendationListWrapper.tsx"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case.js';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces.js';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps.js';\nexport * from './case.js';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils/index.js';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib/index.js';\n\nimport type { JSX } from '@coveo/atomic';\n\nimport { defineCustomElements } from '@coveo/atomic/loader';\n\ndefineCustomElements();\nexport const AtomicCommerceBreadbox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceBreadbox, HTMLAtomicCommerceBreadboxElement>('atomic-commerce-breadbox');\nexport const AtomicCommerceCategoryFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceCategoryFacet, HTMLAtomicCommerceCategoryFacetElement>('atomic-commerce-category-facet');\nexport const AtomicCommerceDidYouMean = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceDidYouMean, HTMLAtomicCommerceDidYouMeanElement>('atomic-commerce-did-you-mean');\nexport const AtomicCommerceFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacet, HTMLAtomicCommerceFacetElement>('atomic-commerce-facet');\nexport const AtomicCommerceFacetNumberInput = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacetNumberInput, HTMLAtomicCommerceFacetNumberInputElement>('atomic-commerce-facet-number-input');\nexport const AtomicCommerceFacets = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacets, HTMLAtomicCommerceFacetsElement>('atomic-commerce-facets');\nexport const AtomicCommerceInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceInterface, HTMLAtomicCommerceInterfaceElement>('atomic-commerce-interface');\nexport const AtomicCommerceLayout = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLayout, HTMLAtomicCommerceLayoutElement>('atomic-commerce-layout');\nexport const AtomicCommerceLoadMoreProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLoadMoreProducts, HTMLAtomicCommerceLoadMoreProductsElement>('atomic-commerce-load-more-products');\nexport const AtomicCommerceNoProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNoProducts, HTMLAtomicCommerceNoProductsElement>('atomic-commerce-no-products');\nexport const AtomicCommerceNumericFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNumericFacet, HTMLAtomicCommerceNumericFacetElement>('atomic-commerce-numeric-facet');\nexport const AtomicCommercePager = /*@__PURE__*/createReactComponent<JSX.AtomicCommercePager, HTMLAtomicCommercePagerElement>('atomic-commerce-pager');\nexport const AtomicCommerceProductList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductList, HTMLAtomicCommerceProductListElement>('atomic-commerce-product-list');\nexport const AtomicCommerceProductsPerPage = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductsPerPage, HTMLAtomicCommerceProductsPerPageElement>('atomic-commerce-products-per-page');\nexport const AtomicCommerceQueryError = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQueryError, HTMLAtomicCommerceQueryErrorElement>('atomic-commerce-query-error');\nexport const AtomicCommerceQuerySummary = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQuerySummary, HTMLAtomicCommerceQuerySummaryElement>('atomic-commerce-query-summary');\nexport const AtomicCommerceRecommendationInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationInterface, HTMLAtomicCommerceRecommendationInterfaceElement>('atomic-commerce-recommendation-interface');\nexport const AtomicCommerceRecommendationList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationList, HTMLAtomicCommerceRecommendationListElement>('atomic-commerce-recommendation-list');\nexport const AtomicCommerceRefineModal = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineModal, HTMLAtomicCommerceRefineModalElement>('atomic-commerce-refine-modal');\nexport const AtomicCommerceRefineToggle = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineToggle, HTMLAtomicCommerceRefineToggleElement>('atomic-commerce-refine-toggle');\nexport const AtomicCommerceSearchBox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBox, HTMLAtomicCommerceSearchBoxElement>('atomic-commerce-search-box');\nexport const AtomicCommerceSearchBoxInstantProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxInstantProducts, HTMLAtomicCommerceSearchBoxInstantProductsElement>('atomic-commerce-search-box-instant-products');\nexport const AtomicCommerceSearchBoxQuerySuggestions = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxQuerySuggestions, HTMLAtomicCommerceSearchBoxQuerySuggestionsElement>('atomic-commerce-search-box-query-suggestions');\nexport const AtomicCommerceSearchBoxRecentQueries = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxRecentQueries, HTMLAtomicCommerceSearchBoxRecentQueriesElement>('atomic-commerce-search-box-recent-queries');\nexport const AtomicCommerceSortDropdown = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSortDropdown, HTMLAtomicCommerceSortDropdownElement>('atomic-commerce-sort-dropdown');\nexport const AtomicCommerceText = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceText, HTMLAtomicCommerceTextElement>('atomic-commerce-text');\nexport const AtomicCommerceTimeframeFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceTimeframeFacet, HTMLAtomicCommerceTimeframeFacetElement>('atomic-commerce-timeframe-facet');\nexport const AtomicIcon = /*@__PURE__*/createReactComponent<JSX.AtomicIcon, HTMLAtomicIconElement>('atomic-icon');\nexport const AtomicLayoutSection = /*@__PURE__*/createReactComponent<JSX.AtomicLayoutSection, HTMLAtomicLayoutSectionElement>('atomic-layout-section');\nexport const AtomicNumericRange = /*@__PURE__*/createReactComponent<JSX.AtomicNumericRange, HTMLAtomicNumericRangeElement>('atomic-numeric-range');\nexport const AtomicProduct = /*@__PURE__*/createReactComponent<JSX.AtomicProduct, HTMLAtomicProductElement>('atomic-product');\nexport const AtomicProductChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductChildren, HTMLAtomicProductChildrenElement>('atomic-product-children');\nexport const AtomicProductDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductDescription, HTMLAtomicProductDescriptionElement>('atomic-product-description');\nexport const AtomicProductExcerpt = /*@__PURE__*/createReactComponent<JSX.AtomicProductExcerpt, HTMLAtomicProductExcerptElement>('atomic-product-excerpt');\nexport const AtomicProductFieldCondition = /*@__PURE__*/createReactComponent<JSX.AtomicProductFieldCondition, HTMLAtomicProductFieldConditionElement>('atomic-product-field-condition');\nexport const AtomicProductImage = /*@__PURE__*/createReactComponent<JSX.AtomicProductImage, HTMLAtomicProductImageElement>('atomic-product-image');\nexport const AtomicProductLink = /*@__PURE__*/createReactComponent<JSX.AtomicProductLink, HTMLAtomicProductLinkElement>('atomic-product-link');\nexport const AtomicProductNumericFieldValue = /*@__PURE__*/createReactComponent<JSX.AtomicProductNumericFieldValue, HTMLAtomicProductNumericFieldValueElement>('atomic-product-numeric-field-value');\nexport const AtomicProductPrice = /*@__PURE__*/createReactComponent<JSX.AtomicProductPrice, HTMLAtomicProductPriceElement>('atomic-product-price');\nexport const AtomicProductRating = /*@__PURE__*/createReactComponent<JSX.AtomicProductRating, HTMLAtomicProductRatingElement>('atomic-product-rating');\nexport const AtomicProductSectionActions = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionActions, HTMLAtomicProductSectionActionsElement>('atomic-product-section-actions');\nexport const AtomicProductSectionBadges = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBadges, HTMLAtomicProductSectionBadgesElement>('atomic-product-section-badges');\nexport const AtomicProductSectionBottomMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBottomMetadata, HTMLAtomicProductSectionBottomMetadataElement>('atomic-product-section-bottom-metadata');\nexport const AtomicProductSectionChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionChildren, HTMLAtomicProductSectionChildrenElement>('atomic-product-section-children');\nexport const AtomicProductSectionDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionDescription, HTMLAtomicProductSectionDescriptionElement>('atomic-product-section-description');\nexport const AtomicProductSectionEmphasized = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionEmphasized, HTMLAtomicProductSectionEmphasizedElement>('atomic-product-section-emphasized');\nexport const AtomicProductSectionMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionMetadata, HTMLAtomicProductSectionMetadataElement>('atomic-product-section-metadata');\nexport const AtomicProductSectionName = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionName, HTMLAtomicProductSectionNameElement>('atomic-product-section-name');\nexport const AtomicProductSectionVisual = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionVisual, HTMLAtomicProductSectionVisualElement>('atomic-product-section-visual');\nexport const AtomicProductText = /*@__PURE__*/createReactComponent<JSX.AtomicProductText, HTMLAtomicProductTextElement>('atomic-product-text');\nexport const AtomicResultLocalizedText = /*@__PURE__*/createReactComponent<JSX.AtomicResultLocalizedText, HTMLAtomicResultLocalizedTextElement>('atomic-result-localized-text');\nexport const AtomicTimeframe = /*@__PURE__*/createReactComponent<JSX.AtomicTimeframe, HTMLAtomicTimeframeElement>('atomic-timeframe');\n","import type {JSX, i18n} from '@coveo/atomic';\nimport React, {useEffect, useRef} from 'react';\nimport {AtomicCommerceInterface} from '../stencil-generated/commerce/index.js';\n\ntype ExecuteRequest = HTMLAtomicCommerceInterfaceElement['executeFirstRequest'];\n\n/**\n * The properties of the AtomicCommerceInterface component\n */\ninterface WrapperProps\n extends Omit<JSX.AtomicCommerceInterface, 'i18n' | 'pipeline' | 'searchHub'> {\n /**\n * An optional callback function that can be used to control the execution of the first request.\n *\n * If not provided, a default function will be used, which executes the first request immediately after initialization.\n */\n onReady?: (executeFirstRequest: ExecuteRequest) => Promise<void>;\n /**\n * An optional callback that lets you control the interface localization.\n *\n * The function receives the search interface 18n instance, which you can then modify (see [Localization](https://docs.coveo.com/en/atomic/latest/usage/atomic-localization/)).\n *\n */\n localization?: (i18n: i18n) => void;\n}\n\nconst DefaultProps: Required<Pick<WrapperProps, 'onReady' | 'localization'>> = {\n onReady: (executeFirstRequest) => {\n return executeFirstRequest();\n },\n localization: () => {},\n};\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceInterface.\n * @param props\n * @returns\n */\nexport const InterfaceWrapper = (\n props: React.PropsWithChildren<WrapperProps>\n) => {\n const mergedProps = {...DefaultProps, ...props};\n if (!mergedProps.engine) {\n throw new Error('The \"engine\" prop is required.');\n //TODO, maybe: provide a default engine\n }\n const {engine, localization, onReady, ...allOtherProps} = mergedProps;\n const interfaceRef = useRef<HTMLAtomicCommerceInterfaceElement>(null);\n let initialization: Promise<void> | null = null;\n\n useEffect(() => {\n const commerceInterfaceAtomic = interfaceRef.current!;\n if (!initialization) {\n initialization = commerceInterfaceAtomic.initializeWithEngine(engine);\n initialization.then(() => {\n localization(commerceInterfaceAtomic.i18n);\n onReady(\n commerceInterfaceAtomic.executeFirstRequest.bind(\n commerceInterfaceAtomic\n )\n );\n });\n }\n }, [interfaceRef]);\n\n return (\n <AtomicCommerceInterface ref={interfaceRef} {...allOtherProps}>\n {props.children}\n </AtomicCommerceInterface>\n );\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceProductList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceProductList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceProductList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceProductList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceProductListRef =\n useRef<HTMLAtomicCommerceProductListElement>(null);\n useEffect(() => {\n commerceProductListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceProductListRef]);\n return (\n <AtomicCommerceProductList ref={commerceProductListRef} {...otherProps} />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceRecommendationList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceRecommendationList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceRecommendationList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceRecommendationList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceRecsListRef =\n useRef<HTMLAtomicCommerceRecommendationListElement>(null);\n useEffect(() => {\n commerceRecsListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceRecsListRef]);\n return (\n <AtomicCommerceRecommendationList\n ref={commerceRecsListRef}\n {...otherProps}\n />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n"],"names":["createElement","defineCustomElements","useRef","useEffect","ListWrapper","hasLinkTemplate","createRoot","renderToString"],"mappings":";;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,GAAW,KAC1C,GAAG;AACA,KAAA,WAAW,EAAE;KACb,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpE,IAAI,CAAC,EAAE,CAAC,CAAC;AACP,MAAM,eAAe,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAS,KAAK,CAAA,CAAA,EAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,CAAE,CAAC;;ACJzG,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAE,QAAa,EAAE,QAAA,GAAgB,EAAE,KAAI;;AAElF,IAAA,IAAI,IAAI,YAAY,OAAO,EAAE;;AAE3B,QAAA,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnE,QAAA,IAAI,SAAS,KAAK,EAAE,EAAE;AACpB,YAAA,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;SAC5B;QAED,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;YACrC,IACE,IAAI,KAAK,UAAU;AACnB,gBAAA,IAAI,KAAK,OAAO;AAChB,gBAAA,IAAI,KAAK,KAAK;AACd,gBAAA,IAAI,KAAK,OAAO;AAChB,gBAAA,IAAI,KAAK,WAAW;gBACpB,IAAI,KAAK,cAAc,EACvB;gBACA,OAAO;aACR;YACD,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,KA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"version":3,"file":"atomic-react.cjs","sources":["../../../src/components/stencil-generated/commerce/react-component-lib/utils/case.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx","../../../src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx","../../../src/components/stencil-generated/commerce/index.ts","../../../src/components/commerce/CommerceInterfaceWrapper.tsx","../../../src/components/commerce/CommerceProductListWrapper.tsx","../../../src/components/commerce/CommerceRecommendationListWrapper.tsx"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case.js';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces.js';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps.js';\nexport * from './case.js';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils/index.js';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib/index.js';\n\nimport type { JSX } from '@coveo/atomic';\n\nimport { defineCustomElements } from '@coveo/atomic/loader';\n\ndefineCustomElements();\nexport const AtomicCommerceBreadbox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceBreadbox, HTMLAtomicCommerceBreadboxElement>('atomic-commerce-breadbox');\nexport const AtomicCommerceCategoryFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceCategoryFacet, HTMLAtomicCommerceCategoryFacetElement>('atomic-commerce-category-facet');\nexport const AtomicCommerceDidYouMean = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceDidYouMean, HTMLAtomicCommerceDidYouMeanElement>('atomic-commerce-did-you-mean');\nexport const AtomicCommerceFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacet, HTMLAtomicCommerceFacetElement>('atomic-commerce-facet');\nexport const AtomicCommerceFacetNumberInput = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacetNumberInput, HTMLAtomicCommerceFacetNumberInputElement>('atomic-commerce-facet-number-input');\nexport const AtomicCommerceFacets = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacets, HTMLAtomicCommerceFacetsElement>('atomic-commerce-facets');\nexport const AtomicCommerceInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceInterface, HTMLAtomicCommerceInterfaceElement>('atomic-commerce-interface');\nexport const AtomicCommerceLayout = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLayout, HTMLAtomicCommerceLayoutElement>('atomic-commerce-layout');\nexport const AtomicCommerceLoadMoreProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLoadMoreProducts, HTMLAtomicCommerceLoadMoreProductsElement>('atomic-commerce-load-more-products');\nexport const AtomicCommerceNoProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNoProducts, HTMLAtomicCommerceNoProductsElement>('atomic-commerce-no-products');\nexport const AtomicCommerceNumericFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNumericFacet, HTMLAtomicCommerceNumericFacetElement>('atomic-commerce-numeric-facet');\nexport const AtomicCommercePager = /*@__PURE__*/createReactComponent<JSX.AtomicCommercePager, HTMLAtomicCommercePagerElement>('atomic-commerce-pager');\nexport const AtomicCommerceProductList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductList, HTMLAtomicCommerceProductListElement>('atomic-commerce-product-list');\nexport const AtomicCommerceProductsPerPage = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductsPerPage, HTMLAtomicCommerceProductsPerPageElement>('atomic-commerce-products-per-page');\nexport const AtomicCommerceQueryError = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQueryError, HTMLAtomicCommerceQueryErrorElement>('atomic-commerce-query-error');\nexport const AtomicCommerceQuerySummary = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQuerySummary, HTMLAtomicCommerceQuerySummaryElement>('atomic-commerce-query-summary');\nexport const AtomicCommerceRecommendationInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationInterface, HTMLAtomicCommerceRecommendationInterfaceElement>('atomic-commerce-recommendation-interface');\nexport const AtomicCommerceRecommendationList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationList, HTMLAtomicCommerceRecommendationListElement>('atomic-commerce-recommendation-list');\nexport const AtomicCommerceRefineModal = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineModal, HTMLAtomicCommerceRefineModalElement>('atomic-commerce-refine-modal');\nexport const AtomicCommerceRefineToggle = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineToggle, HTMLAtomicCommerceRefineToggleElement>('atomic-commerce-refine-toggle');\nexport const AtomicCommerceSearchBox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBox, HTMLAtomicCommerceSearchBoxElement>('atomic-commerce-search-box');\nexport const AtomicCommerceSearchBoxInstantProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxInstantProducts, HTMLAtomicCommerceSearchBoxInstantProductsElement>('atomic-commerce-search-box-instant-products');\nexport const AtomicCommerceSearchBoxQuerySuggestions = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxQuerySuggestions, HTMLAtomicCommerceSearchBoxQuerySuggestionsElement>('atomic-commerce-search-box-query-suggestions');\nexport const AtomicCommerceSearchBoxRecentQueries = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxRecentQueries, HTMLAtomicCommerceSearchBoxRecentQueriesElement>('atomic-commerce-search-box-recent-queries');\nexport const AtomicCommerceSortDropdown = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSortDropdown, HTMLAtomicCommerceSortDropdownElement>('atomic-commerce-sort-dropdown');\nexport const AtomicCommerceText = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceText, HTMLAtomicCommerceTextElement>('atomic-commerce-text');\nexport const AtomicCommerceTimeframeFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceTimeframeFacet, HTMLAtomicCommerceTimeframeFacetElement>('atomic-commerce-timeframe-facet');\nexport const AtomicIcon = /*@__PURE__*/createReactComponent<JSX.AtomicIcon, HTMLAtomicIconElement>('atomic-icon');\nexport const AtomicLayoutSection = /*@__PURE__*/createReactComponent<JSX.AtomicLayoutSection, HTMLAtomicLayoutSectionElement>('atomic-layout-section');\nexport const AtomicNumericRange = /*@__PURE__*/createReactComponent<JSX.AtomicNumericRange, HTMLAtomicNumericRangeElement>('atomic-numeric-range');\nexport const AtomicProduct = /*@__PURE__*/createReactComponent<JSX.AtomicProduct, HTMLAtomicProductElement>('atomic-product');\nexport const AtomicProductChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductChildren, HTMLAtomicProductChildrenElement>('atomic-product-children');\nexport const AtomicProductDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductDescription, HTMLAtomicProductDescriptionElement>('atomic-product-description');\nexport const AtomicProductExcerpt = /*@__PURE__*/createReactComponent<JSX.AtomicProductExcerpt, HTMLAtomicProductExcerptElement>('atomic-product-excerpt');\nexport const AtomicProductFieldCondition = /*@__PURE__*/createReactComponent<JSX.AtomicProductFieldCondition, HTMLAtomicProductFieldConditionElement>('atomic-product-field-condition');\nexport const AtomicProductImage = /*@__PURE__*/createReactComponent<JSX.AtomicProductImage, HTMLAtomicProductImageElement>('atomic-product-image');\nexport const AtomicProductLink = /*@__PURE__*/createReactComponent<JSX.AtomicProductLink, HTMLAtomicProductLinkElement>('atomic-product-link');\nexport const AtomicProductMultiValueText = /*@__PURE__*/createReactComponent<JSX.AtomicProductMultiValueText, HTMLAtomicProductMultiValueTextElement>('atomic-product-multi-value-text');\nexport const AtomicProductNumericFieldValue = /*@__PURE__*/createReactComponent<JSX.AtomicProductNumericFieldValue, HTMLAtomicProductNumericFieldValueElement>('atomic-product-numeric-field-value');\nexport const AtomicProductPrice = /*@__PURE__*/createReactComponent<JSX.AtomicProductPrice, HTMLAtomicProductPriceElement>('atomic-product-price');\nexport const AtomicProductRating = /*@__PURE__*/createReactComponent<JSX.AtomicProductRating, HTMLAtomicProductRatingElement>('atomic-product-rating');\nexport const AtomicProductSectionActions = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionActions, HTMLAtomicProductSectionActionsElement>('atomic-product-section-actions');\nexport const AtomicProductSectionBadges = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBadges, HTMLAtomicProductSectionBadgesElement>('atomic-product-section-badges');\nexport const AtomicProductSectionBottomMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBottomMetadata, HTMLAtomicProductSectionBottomMetadataElement>('atomic-product-section-bottom-metadata');\nexport const AtomicProductSectionChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionChildren, HTMLAtomicProductSectionChildrenElement>('atomic-product-section-children');\nexport const AtomicProductSectionDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionDescription, HTMLAtomicProductSectionDescriptionElement>('atomic-product-section-description');\nexport const AtomicProductSectionEmphasized = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionEmphasized, HTMLAtomicProductSectionEmphasizedElement>('atomic-product-section-emphasized');\nexport const AtomicProductSectionMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionMetadata, HTMLAtomicProductSectionMetadataElement>('atomic-product-section-metadata');\nexport const AtomicProductSectionName = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionName, HTMLAtomicProductSectionNameElement>('atomic-product-section-name');\nexport const AtomicProductSectionVisual = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionVisual, HTMLAtomicProductSectionVisualElement>('atomic-product-section-visual');\nexport const AtomicProductText = /*@__PURE__*/createReactComponent<JSX.AtomicProductText, HTMLAtomicProductTextElement>('atomic-product-text');\nexport const AtomicResultLocalizedText = /*@__PURE__*/createReactComponent<JSX.AtomicResultLocalizedText, HTMLAtomicResultLocalizedTextElement>('atomic-result-localized-text');\nexport const AtomicTimeframe = /*@__PURE__*/createReactComponent<JSX.AtomicTimeframe, HTMLAtomicTimeframeElement>('atomic-timeframe');\n","import type {JSX, i18n} from '@coveo/atomic';\nimport React, {useEffect, useRef} from 'react';\nimport {AtomicCommerceInterface} from '../stencil-generated/commerce/index.js';\n\ntype ExecuteRequest = HTMLAtomicCommerceInterfaceElement['executeFirstRequest'];\n\n/**\n * The properties of the AtomicCommerceInterface component\n */\ninterface WrapperProps\n extends Omit<JSX.AtomicCommerceInterface, 'i18n' | 'pipeline' | 'searchHub'> {\n /**\n * An optional callback function that can be used to control the execution of the first request.\n *\n * If not provided, a default function will be used, which executes the first request immediately after initialization.\n */\n onReady?: (executeFirstRequest: ExecuteRequest) => Promise<void>;\n /**\n * An optional callback that lets you control the interface localization.\n *\n * The function receives the search interface 18n instance, which you can then modify (see [Localization](https://docs.coveo.com/en/atomic/latest/usage/atomic-localization/)).\n *\n */\n localization?: (i18n: i18n) => void;\n}\n\nconst DefaultProps: Required<Pick<WrapperProps, 'onReady' | 'localization'>> = {\n onReady: (executeFirstRequest) => {\n return executeFirstRequest();\n },\n localization: () => {},\n};\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceInterface.\n * @param props\n * @returns\n */\nexport const InterfaceWrapper = (\n props: React.PropsWithChildren<WrapperProps>\n) => {\n const mergedProps = {...DefaultProps, ...props};\n if (!mergedProps.engine) {\n throw new Error('The \"engine\" prop is required.');\n //TODO, maybe: provide a default engine\n }\n const {engine, localization, onReady, ...allOtherProps} = mergedProps;\n const interfaceRef = useRef<HTMLAtomicCommerceInterfaceElement>(null);\n let initialization: Promise<void> | null = null;\n\n useEffect(() => {\n const commerceInterfaceAtomic = interfaceRef.current!;\n if (!initialization) {\n initialization = commerceInterfaceAtomic.initializeWithEngine(engine);\n initialization.then(() => {\n localization(commerceInterfaceAtomic.i18n);\n onReady(\n commerceInterfaceAtomic.executeFirstRequest.bind(\n commerceInterfaceAtomic\n )\n );\n });\n }\n }, [interfaceRef]);\n\n return (\n <AtomicCommerceInterface ref={interfaceRef} {...allOtherProps}>\n {props.children}\n </AtomicCommerceInterface>\n );\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceProductList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceProductList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceProductList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceProductList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceProductListRef =\n useRef<HTMLAtomicCommerceProductListElement>(null);\n useEffect(() => {\n commerceProductListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceProductListRef]);\n return (\n <AtomicCommerceProductList ref={commerceProductListRef} {...otherProps} />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceRecommendationList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceRecommendationList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceRecommendationList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceRecommendationList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceRecsListRef =\n useRef<HTMLAtomicCommerceRecommendationListElement>(null);\n useEffect(() => {\n commerceRecsListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceRecsListRef]);\n return (\n <AtomicCommerceRecommendationList\n ref={commerceRecsListRef}\n {...otherProps}\n />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n"],"names":["createElement","defineCustomElements","useRef","useEffect","ListWrapper","hasLinkTemplate","createRoot","renderToString"],"mappings":";;;;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,GAAW,KAC1C,GAAG;AACA,KAAA,WAAW,EAAE;KACb,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpE,IAAI,CAAC,EAAE,CAAC,CAAC;AACP,MAAM,eAAe,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAS,KAAK,CAAA,CAAA,EAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA,CAAE,CAAC;;ACJzG,MAAM,WAAW,GAAG,CAAC,IAAiB,EAAE,QAAa,EAAE,QAAA,GAAgB,EAAE,KAAI;;AAElF,IAAA,IAAI,IAAI,YAAY,OAAO,EAAE;;AAE3B,QAAA,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;A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,MAAM,CAAC,KAAK,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAC,CAAC;AAC7C,gBAAA,OAAOC,qBAAc,CAAC,cAAc,CAAC,CAAC;aACvC;AACH,SAAC,CACF,CAAC;AACJ,KAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC1B,QACE,KAAC,CAAA,aAAA,CAAA,gCAAgC,EAC/B,EAAA,GAAG,EAAE,mBAAmB,EACpB,GAAA,UAAU,EACd,CAAA,EACF;AACJ,EAAE;AAEF,MAAM,eAAe,GAAG,CACtB,QAAgC,KACR;AACxB,IAAA,OAAQ,QAAqB,CAAC,YAAY,KAAK,SAAS,CAAC;AAC3D,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -240,6 +240,7 @@ const AtomicProductExcerpt = /*@__PURE__*/ createReactComponent('atomic-product-
240
240
  const AtomicProductFieldCondition = /*@__PURE__*/ createReactComponent('atomic-product-field-condition');
241
241
  const AtomicProductImage = /*@__PURE__*/ createReactComponent('atomic-product-image');
242
242
  const AtomicProductLink = /*@__PURE__*/ createReactComponent('atomic-product-link');
243
+ const AtomicProductMultiValueText = /*@__PURE__*/ createReactComponent('atomic-product-multi-value-text');
243
244
  const AtomicProductNumericFieldValue = /*@__PURE__*/ createReactComponent('atomic-product-numeric-field-value');
244
245
  const AtomicProductPrice = /*@__PURE__*/ createReactComponent('atomic-product-price');
245
246
  const AtomicProductRating = /*@__PURE__*/ createReactComponent('atomic-product-rating');
@@ -353,5 +354,5 @@ const hasLinkTemplate = (template) => {
353
354
  return template.linkTemplate !== undefined;
354
355
  };
355
356
 
356
- export { AtomicCommerceBreadbox, AtomicCommerceCategoryFacet, AtomicCommerceDidYouMean, AtomicCommerceFacet, AtomicCommerceFacetNumberInput, AtomicCommerceFacets, InterfaceWrapper as AtomicCommerceInterface, AtomicCommerceLayout, AtomicCommerceLoadMoreProducts, AtomicCommerceNoProducts, AtomicCommerceNumericFacet, AtomicCommercePager, ListWrapper$1 as AtomicCommerceProductList, AtomicCommerceProductsPerPage, AtomicCommerceQueryError, AtomicCommerceQuerySummary, AtomicCommerceRecommendationInterface, ListWrapper as AtomicCommerceRecommendationList, AtomicCommerceRefineModal, AtomicCommerceRefineToggle, AtomicCommerceSearchBox, AtomicCommerceSearchBoxInstantProducts, AtomicCommerceSearchBoxQuerySuggestions, AtomicCommerceSearchBoxRecentQueries, AtomicCommerceSortDropdown, AtomicCommerceText, AtomicCommerceTimeframeFacet, AtomicIcon, AtomicLayoutSection, AtomicNumericRange, AtomicProduct, AtomicProductChildren, AtomicProductDescription, AtomicProductExcerpt, AtomicProductFieldCondition, AtomicProductImage, AtomicProductLink, AtomicProductNumericFieldValue, AtomicProductPrice, AtomicProductRating, AtomicProductSectionActions, AtomicProductSectionBadges, AtomicProductSectionBottomMetadata, AtomicProductSectionChildren, AtomicProductSectionDescription, AtomicProductSectionEmphasized, AtomicProductSectionMetadata, AtomicProductSectionName, AtomicProductSectionVisual, AtomicProductText, AtomicResultLocalizedText, AtomicTimeframe };
357
+ export { AtomicCommerceBreadbox, AtomicCommerceCategoryFacet, AtomicCommerceDidYouMean, AtomicCommerceFacet, AtomicCommerceFacetNumberInput, AtomicCommerceFacets, InterfaceWrapper as AtomicCommerceInterface, AtomicCommerceLayout, AtomicCommerceLoadMoreProducts, AtomicCommerceNoProducts, AtomicCommerceNumericFacet, AtomicCommercePager, ListWrapper$1 as AtomicCommerceProductList, AtomicCommerceProductsPerPage, AtomicCommerceQueryError, AtomicCommerceQuerySummary, AtomicCommerceRecommendationInterface, ListWrapper as AtomicCommerceRecommendationList, AtomicCommerceRefineModal, AtomicCommerceRefineToggle, AtomicCommerceSearchBox, AtomicCommerceSearchBoxInstantProducts, AtomicCommerceSearchBoxQuerySuggestions, AtomicCommerceSearchBoxRecentQueries, AtomicCommerceSortDropdown, AtomicCommerceText, AtomicCommerceTimeframeFacet, AtomicIcon, AtomicLayoutSection, AtomicNumericRange, AtomicProduct, AtomicProductChildren, AtomicProductDescription, AtomicProductExcerpt, AtomicProductFieldCondition, AtomicProductImage, AtomicProductLink, AtomicProductMultiValueText, AtomicProductNumericFieldValue, AtomicProductPrice, AtomicProductRating, AtomicProductSectionActions, AtomicProductSectionBadges, AtomicProductSectionBottomMetadata, AtomicProductSectionChildren, AtomicProductSectionDescription, AtomicProductSectionEmphasized, AtomicProductSectionMetadata, AtomicProductSectionName, AtomicProductSectionVisual, AtomicProductText, AtomicResultLocalizedText, AtomicTimeframe };
357
358
  //# sourceMappingURL=atomic-react.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"atomic-react.mjs","sources":["../../../src/components/stencil-generated/commerce/react-component-lib/utils/case.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx","../../../src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx","../../../src/components/stencil-generated/commerce/index.ts","../../../src/components/commerce/CommerceInterfaceWrapper.tsx","../../../src/components/commerce/CommerceProductListWrapper.tsx","../../../src/components/commerce/CommerceRecommendationListWrapper.tsx"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case.js';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces.js';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps.js';\nexport * from './case.js';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils/index.js';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib/index.js';\n\nimport type { JSX } from '@coveo/atomic';\n\nimport { defineCustomElements } from '@coveo/atomic/loader';\n\ndefineCustomElements();\nexport const AtomicCommerceBreadbox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceBreadbox, HTMLAtomicCommerceBreadboxElement>('atomic-commerce-breadbox');\nexport const AtomicCommerceCategoryFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceCategoryFacet, HTMLAtomicCommerceCategoryFacetElement>('atomic-commerce-category-facet');\nexport const AtomicCommerceDidYouMean = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceDidYouMean, HTMLAtomicCommerceDidYouMeanElement>('atomic-commerce-did-you-mean');\nexport const AtomicCommerceFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacet, HTMLAtomicCommerceFacetElement>('atomic-commerce-facet');\nexport const AtomicCommerceFacetNumberInput = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacetNumberInput, HTMLAtomicCommerceFacetNumberInputElement>('atomic-commerce-facet-number-input');\nexport const AtomicCommerceFacets = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacets, HTMLAtomicCommerceFacetsElement>('atomic-commerce-facets');\nexport const AtomicCommerceInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceInterface, HTMLAtomicCommerceInterfaceElement>('atomic-commerce-interface');\nexport const AtomicCommerceLayout = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLayout, HTMLAtomicCommerceLayoutElement>('atomic-commerce-layout');\nexport const AtomicCommerceLoadMoreProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLoadMoreProducts, HTMLAtomicCommerceLoadMoreProductsElement>('atomic-commerce-load-more-products');\nexport const AtomicCommerceNoProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNoProducts, HTMLAtomicCommerceNoProductsElement>('atomic-commerce-no-products');\nexport const AtomicCommerceNumericFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNumericFacet, HTMLAtomicCommerceNumericFacetElement>('atomic-commerce-numeric-facet');\nexport const AtomicCommercePager = /*@__PURE__*/createReactComponent<JSX.AtomicCommercePager, HTMLAtomicCommercePagerElement>('atomic-commerce-pager');\nexport const AtomicCommerceProductList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductList, HTMLAtomicCommerceProductListElement>('atomic-commerce-product-list');\nexport const AtomicCommerceProductsPerPage = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductsPerPage, HTMLAtomicCommerceProductsPerPageElement>('atomic-commerce-products-per-page');\nexport const AtomicCommerceQueryError = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQueryError, HTMLAtomicCommerceQueryErrorElement>('atomic-commerce-query-error');\nexport const AtomicCommerceQuerySummary = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQuerySummary, HTMLAtomicCommerceQuerySummaryElement>('atomic-commerce-query-summary');\nexport const AtomicCommerceRecommendationInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationInterface, HTMLAtomicCommerceRecommendationInterfaceElement>('atomic-commerce-recommendation-interface');\nexport const AtomicCommerceRecommendationList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationList, HTMLAtomicCommerceRecommendationListElement>('atomic-commerce-recommendation-list');\nexport const AtomicCommerceRefineModal = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineModal, HTMLAtomicCommerceRefineModalElement>('atomic-commerce-refine-modal');\nexport const AtomicCommerceRefineToggle = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineToggle, HTMLAtomicCommerceRefineToggleElement>('atomic-commerce-refine-toggle');\nexport const AtomicCommerceSearchBox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBox, HTMLAtomicCommerceSearchBoxElement>('atomic-commerce-search-box');\nexport const AtomicCommerceSearchBoxInstantProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxInstantProducts, HTMLAtomicCommerceSearchBoxInstantProductsElement>('atomic-commerce-search-box-instant-products');\nexport const AtomicCommerceSearchBoxQuerySuggestions = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxQuerySuggestions, HTMLAtomicCommerceSearchBoxQuerySuggestionsElement>('atomic-commerce-search-box-query-suggestions');\nexport const AtomicCommerceSearchBoxRecentQueries = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxRecentQueries, HTMLAtomicCommerceSearchBoxRecentQueriesElement>('atomic-commerce-search-box-recent-queries');\nexport const AtomicCommerceSortDropdown = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSortDropdown, HTMLAtomicCommerceSortDropdownElement>('atomic-commerce-sort-dropdown');\nexport const AtomicCommerceText = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceText, HTMLAtomicCommerceTextElement>('atomic-commerce-text');\nexport const AtomicCommerceTimeframeFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceTimeframeFacet, HTMLAtomicCommerceTimeframeFacetElement>('atomic-commerce-timeframe-facet');\nexport const AtomicIcon = /*@__PURE__*/createReactComponent<JSX.AtomicIcon, HTMLAtomicIconElement>('atomic-icon');\nexport const AtomicLayoutSection = /*@__PURE__*/createReactComponent<JSX.AtomicLayoutSection, HTMLAtomicLayoutSectionElement>('atomic-layout-section');\nexport const AtomicNumericRange = /*@__PURE__*/createReactComponent<JSX.AtomicNumericRange, HTMLAtomicNumericRangeElement>('atomic-numeric-range');\nexport const AtomicProduct = /*@__PURE__*/createReactComponent<JSX.AtomicProduct, HTMLAtomicProductElement>('atomic-product');\nexport const AtomicProductChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductChildren, HTMLAtomicProductChildrenElement>('atomic-product-children');\nexport const AtomicProductDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductDescription, HTMLAtomicProductDescriptionElement>('atomic-product-description');\nexport const AtomicProductExcerpt = /*@__PURE__*/createReactComponent<JSX.AtomicProductExcerpt, HTMLAtomicProductExcerptElement>('atomic-product-excerpt');\nexport const AtomicProductFieldCondition = /*@__PURE__*/createReactComponent<JSX.AtomicProductFieldCondition, HTMLAtomicProductFieldConditionElement>('atomic-product-field-condition');\nexport const AtomicProductImage = /*@__PURE__*/createReactComponent<JSX.AtomicProductImage, HTMLAtomicProductImageElement>('atomic-product-image');\nexport const AtomicProductLink = /*@__PURE__*/createReactComponent<JSX.AtomicProductLink, HTMLAtomicProductLinkElement>('atomic-product-link');\nexport const AtomicProductNumericFieldValue = /*@__PURE__*/createReactComponent<JSX.AtomicProductNumericFieldValue, HTMLAtomicProductNumericFieldValueElement>('atomic-product-numeric-field-value');\nexport const AtomicProductPrice = /*@__PURE__*/createReactComponent<JSX.AtomicProductPrice, HTMLAtomicProductPriceElement>('atomic-product-price');\nexport const AtomicProductRating = /*@__PURE__*/createReactComponent<JSX.AtomicProductRating, HTMLAtomicProductRatingElement>('atomic-product-rating');\nexport const AtomicProductSectionActions = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionActions, HTMLAtomicProductSectionActionsElement>('atomic-product-section-actions');\nexport const AtomicProductSectionBadges = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBadges, HTMLAtomicProductSectionBadgesElement>('atomic-product-section-badges');\nexport const AtomicProductSectionBottomMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBottomMetadata, HTMLAtomicProductSectionBottomMetadataElement>('atomic-product-section-bottom-metadata');\nexport const AtomicProductSectionChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionChildren, HTMLAtomicProductSectionChildrenElement>('atomic-product-section-children');\nexport const AtomicProductSectionDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionDescription, HTMLAtomicProductSectionDescriptionElement>('atomic-product-section-description');\nexport const AtomicProductSectionEmphasized = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionEmphasized, HTMLAtomicProductSectionEmphasizedElement>('atomic-product-section-emphasized');\nexport const AtomicProductSectionMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionMetadata, HTMLAtomicProductSectionMetadataElement>('atomic-product-section-metadata');\nexport const AtomicProductSectionName = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionName, HTMLAtomicProductSectionNameElement>('atomic-product-section-name');\nexport const AtomicProductSectionVisual = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionVisual, HTMLAtomicProductSectionVisualElement>('atomic-product-section-visual');\nexport const AtomicProductText = /*@__PURE__*/createReactComponent<JSX.AtomicProductText, HTMLAtomicProductTextElement>('atomic-product-text');\nexport const AtomicResultLocalizedText = /*@__PURE__*/createReactComponent<JSX.AtomicResultLocalizedText, HTMLAtomicResultLocalizedTextElement>('atomic-result-localized-text');\nexport const AtomicTimeframe = /*@__PURE__*/createReactComponent<JSX.AtomicTimeframe, HTMLAtomicTimeframeElement>('atomic-timeframe');\n","import type {JSX, i18n} from '@coveo/atomic';\nimport React, {useEffect, useRef} from 'react';\nimport {AtomicCommerceInterface} from '../stencil-generated/commerce/index.js';\n\ntype ExecuteRequest = HTMLAtomicCommerceInterfaceElement['executeFirstRequest'];\n\n/**\n * The properties of the AtomicCommerceInterface component\n */\ninterface WrapperProps\n extends Omit<JSX.AtomicCommerceInterface, 'i18n' | 'pipeline' | 'searchHub'> {\n /**\n * An optional callback function that can be used to control the execution of the first request.\n *\n * If not provided, a default function will be used, which executes the first request immediately after initialization.\n */\n onReady?: (executeFirstRequest: ExecuteRequest) => Promise<void>;\n /**\n * An optional callback that lets you control the interface localization.\n *\n * The function receives the search interface 18n instance, which you can then modify (see [Localization](https://docs.coveo.com/en/atomic/latest/usage/atomic-localization/)).\n *\n */\n localization?: (i18n: i18n) => void;\n}\n\nconst DefaultProps: Required<Pick<WrapperProps, 'onReady' | 'localization'>> = {\n onReady: (executeFirstRequest) => {\n return executeFirstRequest();\n },\n localization: () => {},\n};\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceInterface.\n * @param props\n * @returns\n */\nexport const InterfaceWrapper = (\n props: React.PropsWithChildren<WrapperProps>\n) => {\n const mergedProps = {...DefaultProps, ...props};\n if (!mergedProps.engine) {\n throw new Error('The \"engine\" prop is required.');\n //TODO, maybe: provide a default engine\n }\n const {engine, localization, onReady, ...allOtherProps} = mergedProps;\n const interfaceRef = useRef<HTMLAtomicCommerceInterfaceElement>(null);\n let initialization: Promise<void> | null = null;\n\n useEffect(() => {\n const commerceInterfaceAtomic = interfaceRef.current!;\n if (!initialization) {\n initialization = commerceInterfaceAtomic.initializeWithEngine(engine);\n initialization.then(() => {\n localization(commerceInterfaceAtomic.i18n);\n onReady(\n commerceInterfaceAtomic.executeFirstRequest.bind(\n commerceInterfaceAtomic\n )\n );\n });\n }\n }, [interfaceRef]);\n\n return (\n <AtomicCommerceInterface ref={interfaceRef} {...allOtherProps}>\n {props.children}\n </AtomicCommerceInterface>\n );\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceProductList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceProductList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceProductList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceProductList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceProductListRef =\n useRef<HTMLAtomicCommerceProductListElement>(null);\n useEffect(() => {\n commerceProductListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceProductListRef]);\n return (\n <AtomicCommerceProductList ref={commerceProductListRef} {...otherProps} />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceRecommendationList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceRecommendationList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceRecommendationList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceRecommendationList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceRecsListRef =\n useRef<HTMLAtomicCommerceRecommendationListElement>(null);\n useEffect(() => {\n commerceRecsListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceRecsListRef]);\n return (\n <AtomicCommerceRecommendationList\n ref={commerceRecsListRef}\n {...otherProps}\n />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n"],"names":["ListWrapper","hasLinkTemplate"],"mappings":";;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,GAAW,KAC1C,GAAG;AACA,KAAA,WAAW,EAAE;KACb,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACpE,IAAI,CAAC,EAAE,CAAC,CAAC;AACP,MAAM,eAAe,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAS,KAAK,CAAA,CAAA,EAAI,CAAC,CAAC,CAAC,CAAC,CAA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AO,KAAK,MAAM;sBACzB,UAAU,CAAC,aAAc,CAAC,CAAC,MAAM,CAC/B,KAAA,CAAA,aAAA,CAAC,iBAAiB,EAAA,IAAA,CAAqB,CACxC;sBACD,UAAU,CAAC,aAAc,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAC,CAAC;AAC7C,gBAAA,OAAO,cAAc,CAAC,cAAc,CAAC,CAAC;aACvC;AACH,SAAC,CACF,CAAC;AACJ,KAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC1B,QACE,KAAC,CAAA,aAAA,CAAA,gCAAgC,EAC/B,EAAA,GAAG,EAAE,mBAAmB,EACpB,GAAA,UAAU,EACd,CAAA,EACF;AACJ,EAAE;AAEF,MAAM,eAAe,GAAG,CACtB,QAAgC,KACR;AACxB,IAAA,OAAQ,QAAqB,CAAC,YAAY,KAAK,SAAS,CAAC;AAC3D,CAAC;;;;"}
1
+ {"version":3,"file":"atomic-react.mjs","sources":["../../../src/components/stencil-generated/commerce/react-component-lib/utils/case.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/attachProps.ts","../../../src/components/stencil-generated/commerce/react-component-lib/utils/index.tsx","../../../src/components/stencil-generated/commerce/react-component-lib/createComponent.tsx","../../../src/components/stencil-generated/commerce/index.ts","../../../src/components/commerce/CommerceInterfaceWrapper.tsx","../../../src/components/commerce/CommerceProductListWrapper.tsx","../../../src/components/commerce/CommerceRecommendationListWrapper.tsx"],"sourcesContent":["export const dashToPascalCase = (str: string) =>\n str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nexport const camelToDashCase = (str: string) => str.replace(/([A-Z])/g, (m: string) => `-${m[0].toLowerCase()}`);\n","import { camelToDashCase } from './case.js';\n\nexport const attachProps = (node: HTMLElement, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n\n Object.keys(newProps).forEach((name) => {\n if (\n name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef'\n ) {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n } else {\n (node as any)[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class;\n const oldClassProp: string = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames: string[] = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n\n/**\n * Transforms a React event name to a browser event name.\n */\nexport const transformReactEventName = (eventNameSuffix: string) => {\n switch (eventNameSuffix) {\n case 'doubleclick':\n return 'dblclick';\n }\n return eventNameSuffix;\n};\n\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nexport const isCoveredByReact = (eventNameSuffix: string) => {\n if (typeof document === 'undefined') {\n return true;\n } else {\n const eventName = 'on' + transformReactEventName(eventNameSuffix);\n let isSupported = eventName in document;\n\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof (element as any)[eventName] === 'function';\n }\n\n return isSupported;\n }\n};\n\nexport const syncEvent = (\n node: Element & { __events?: { [key: string]: ((e: Event) => any) | undefined } },\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n\n // Bind new listener.\n node.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n })\n );\n};\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s));\n return map;\n};\n","import React from 'react';\n\nimport type { StyleReactProps } from '../interfaces.js';\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\n Omit<React.HTMLAttributes<ElementType>, 'style'> &\n StyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value;\n }\n};\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value);\n });\n };\n};\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />;\n };\n forwardRef.displayName = displayName;\n\n return React.forwardRef(forwardRef);\n};\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nexport * from './attachProps.js';\nexport * from './case.js';\n","import React, { createElement } from 'react';\n\nimport { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils/index.js';\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>;\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>;\n ref?: React.Ref<any>;\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = {},\n ExpandedPropsTypes = {}\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType;\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element;\n };\n\n constructor(props: StencilReactInternalProps<ElementType>) {\n super(props);\n }\n\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n\n componentDidUpdate(prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n\n render() {\n const { children, forwardedRef, style, className, ref, ...cProps } = this.props;\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name];\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value;\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value;\n\n if (type === 'string' || type === 'boolean' || type === 'number') {\n acc[camelToDashCase(name)] = value;\n }\n }\n return acc;\n }, {} as ExpandedPropsTypes);\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n style,\n };\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n\n static get displayName() {\n return displayName;\n }\n };\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName);\n};\n","/* eslint-disable */\n/* tslint:disable */\n/* auto-generated react proxies */\nimport { createReactComponent } from './react-component-lib/index.js';\n\nimport type { JSX } from '@coveo/atomic';\n\nimport { defineCustomElements } from '@coveo/atomic/loader';\n\ndefineCustomElements();\nexport const AtomicCommerceBreadbox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceBreadbox, HTMLAtomicCommerceBreadboxElement>('atomic-commerce-breadbox');\nexport const AtomicCommerceCategoryFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceCategoryFacet, HTMLAtomicCommerceCategoryFacetElement>('atomic-commerce-category-facet');\nexport const AtomicCommerceDidYouMean = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceDidYouMean, HTMLAtomicCommerceDidYouMeanElement>('atomic-commerce-did-you-mean');\nexport const AtomicCommerceFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacet, HTMLAtomicCommerceFacetElement>('atomic-commerce-facet');\nexport const AtomicCommerceFacetNumberInput = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacetNumberInput, HTMLAtomicCommerceFacetNumberInputElement>('atomic-commerce-facet-number-input');\nexport const AtomicCommerceFacets = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacets, HTMLAtomicCommerceFacetsElement>('atomic-commerce-facets');\nexport const AtomicCommerceInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceInterface, HTMLAtomicCommerceInterfaceElement>('atomic-commerce-interface');\nexport const AtomicCommerceLayout = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLayout, HTMLAtomicCommerceLayoutElement>('atomic-commerce-layout');\nexport const AtomicCommerceLoadMoreProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLoadMoreProducts, HTMLAtomicCommerceLoadMoreProductsElement>('atomic-commerce-load-more-products');\nexport const AtomicCommerceNoProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNoProducts, HTMLAtomicCommerceNoProductsElement>('atomic-commerce-no-products');\nexport const AtomicCommerceNumericFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNumericFacet, HTMLAtomicCommerceNumericFacetElement>('atomic-commerce-numeric-facet');\nexport const AtomicCommercePager = /*@__PURE__*/createReactComponent<JSX.AtomicCommercePager, HTMLAtomicCommercePagerElement>('atomic-commerce-pager');\nexport const AtomicCommerceProductList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductList, HTMLAtomicCommerceProductListElement>('atomic-commerce-product-list');\nexport const AtomicCommerceProductsPerPage = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceProductsPerPage, HTMLAtomicCommerceProductsPerPageElement>('atomic-commerce-products-per-page');\nexport const AtomicCommerceQueryError = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQueryError, HTMLAtomicCommerceQueryErrorElement>('atomic-commerce-query-error');\nexport const AtomicCommerceQuerySummary = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceQuerySummary, HTMLAtomicCommerceQuerySummaryElement>('atomic-commerce-query-summary');\nexport const AtomicCommerceRecommendationInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationInterface, HTMLAtomicCommerceRecommendationInterfaceElement>('atomic-commerce-recommendation-interface');\nexport const AtomicCommerceRecommendationList = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRecommendationList, HTMLAtomicCommerceRecommendationListElement>('atomic-commerce-recommendation-list');\nexport const AtomicCommerceRefineModal = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineModal, HTMLAtomicCommerceRefineModalElement>('atomic-commerce-refine-modal');\nexport const AtomicCommerceRefineToggle = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceRefineToggle, HTMLAtomicCommerceRefineToggleElement>('atomic-commerce-refine-toggle');\nexport const AtomicCommerceSearchBox = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBox, HTMLAtomicCommerceSearchBoxElement>('atomic-commerce-search-box');\nexport const AtomicCommerceSearchBoxInstantProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxInstantProducts, HTMLAtomicCommerceSearchBoxInstantProductsElement>('atomic-commerce-search-box-instant-products');\nexport const AtomicCommerceSearchBoxQuerySuggestions = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxQuerySuggestions, HTMLAtomicCommerceSearchBoxQuerySuggestionsElement>('atomic-commerce-search-box-query-suggestions');\nexport const AtomicCommerceSearchBoxRecentQueries = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSearchBoxRecentQueries, HTMLAtomicCommerceSearchBoxRecentQueriesElement>('atomic-commerce-search-box-recent-queries');\nexport const AtomicCommerceSortDropdown = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceSortDropdown, HTMLAtomicCommerceSortDropdownElement>('atomic-commerce-sort-dropdown');\nexport const AtomicCommerceText = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceText, HTMLAtomicCommerceTextElement>('atomic-commerce-text');\nexport const AtomicCommerceTimeframeFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceTimeframeFacet, HTMLAtomicCommerceTimeframeFacetElement>('atomic-commerce-timeframe-facet');\nexport const AtomicIcon = /*@__PURE__*/createReactComponent<JSX.AtomicIcon, HTMLAtomicIconElement>('atomic-icon');\nexport const AtomicLayoutSection = /*@__PURE__*/createReactComponent<JSX.AtomicLayoutSection, HTMLAtomicLayoutSectionElement>('atomic-layout-section');\nexport const AtomicNumericRange = /*@__PURE__*/createReactComponent<JSX.AtomicNumericRange, HTMLAtomicNumericRangeElement>('atomic-numeric-range');\nexport const AtomicProduct = /*@__PURE__*/createReactComponent<JSX.AtomicProduct, HTMLAtomicProductElement>('atomic-product');\nexport const AtomicProductChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductChildren, HTMLAtomicProductChildrenElement>('atomic-product-children');\nexport const AtomicProductDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductDescription, HTMLAtomicProductDescriptionElement>('atomic-product-description');\nexport const AtomicProductExcerpt = /*@__PURE__*/createReactComponent<JSX.AtomicProductExcerpt, HTMLAtomicProductExcerptElement>('atomic-product-excerpt');\nexport const AtomicProductFieldCondition = /*@__PURE__*/createReactComponent<JSX.AtomicProductFieldCondition, HTMLAtomicProductFieldConditionElement>('atomic-product-field-condition');\nexport const AtomicProductImage = /*@__PURE__*/createReactComponent<JSX.AtomicProductImage, HTMLAtomicProductImageElement>('atomic-product-image');\nexport const AtomicProductLink = /*@__PURE__*/createReactComponent<JSX.AtomicProductLink, HTMLAtomicProductLinkElement>('atomic-product-link');\nexport const AtomicProductMultiValueText = /*@__PURE__*/createReactComponent<JSX.AtomicProductMultiValueText, HTMLAtomicProductMultiValueTextElement>('atomic-product-multi-value-text');\nexport const AtomicProductNumericFieldValue = /*@__PURE__*/createReactComponent<JSX.AtomicProductNumericFieldValue, HTMLAtomicProductNumericFieldValueElement>('atomic-product-numeric-field-value');\nexport const AtomicProductPrice = /*@__PURE__*/createReactComponent<JSX.AtomicProductPrice, HTMLAtomicProductPriceElement>('atomic-product-price');\nexport const AtomicProductRating = /*@__PURE__*/createReactComponent<JSX.AtomicProductRating, HTMLAtomicProductRatingElement>('atomic-product-rating');\nexport const AtomicProductSectionActions = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionActions, HTMLAtomicProductSectionActionsElement>('atomic-product-section-actions');\nexport const AtomicProductSectionBadges = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBadges, HTMLAtomicProductSectionBadgesElement>('atomic-product-section-badges');\nexport const AtomicProductSectionBottomMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionBottomMetadata, HTMLAtomicProductSectionBottomMetadataElement>('atomic-product-section-bottom-metadata');\nexport const AtomicProductSectionChildren = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionChildren, HTMLAtomicProductSectionChildrenElement>('atomic-product-section-children');\nexport const AtomicProductSectionDescription = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionDescription, HTMLAtomicProductSectionDescriptionElement>('atomic-product-section-description');\nexport const AtomicProductSectionEmphasized = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionEmphasized, HTMLAtomicProductSectionEmphasizedElement>('atomic-product-section-emphasized');\nexport const AtomicProductSectionMetadata = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionMetadata, HTMLAtomicProductSectionMetadataElement>('atomic-product-section-metadata');\nexport const AtomicProductSectionName = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionName, HTMLAtomicProductSectionNameElement>('atomic-product-section-name');\nexport const AtomicProductSectionVisual = /*@__PURE__*/createReactComponent<JSX.AtomicProductSectionVisual, HTMLAtomicProductSectionVisualElement>('atomic-product-section-visual');\nexport const AtomicProductText = /*@__PURE__*/createReactComponent<JSX.AtomicProductText, HTMLAtomicProductTextElement>('atomic-product-text');\nexport const AtomicResultLocalizedText = /*@__PURE__*/createReactComponent<JSX.AtomicResultLocalizedText, HTMLAtomicResultLocalizedTextElement>('atomic-result-localized-text');\nexport const AtomicTimeframe = /*@__PURE__*/createReactComponent<JSX.AtomicTimeframe, HTMLAtomicTimeframeElement>('atomic-timeframe');\n","import type {JSX, i18n} from '@coveo/atomic';\nimport React, {useEffect, useRef} from 'react';\nimport {AtomicCommerceInterface} from '../stencil-generated/commerce/index.js';\n\ntype ExecuteRequest = HTMLAtomicCommerceInterfaceElement['executeFirstRequest'];\n\n/**\n * The properties of the AtomicCommerceInterface component\n */\ninterface WrapperProps\n extends Omit<JSX.AtomicCommerceInterface, 'i18n' | 'pipeline' | 'searchHub'> {\n /**\n * An optional callback function that can be used to control the execution of the first request.\n *\n * If not provided, a default function will be used, which executes the first request immediately after initialization.\n */\n onReady?: (executeFirstRequest: ExecuteRequest) => Promise<void>;\n /**\n * An optional callback that lets you control the interface localization.\n *\n * The function receives the search interface 18n instance, which you can then modify (see [Localization](https://docs.coveo.com/en/atomic/latest/usage/atomic-localization/)).\n *\n */\n localization?: (i18n: i18n) => void;\n}\n\nconst DefaultProps: Required<Pick<WrapperProps, 'onReady' | 'localization'>> = {\n onReady: (executeFirstRequest) => {\n return executeFirstRequest();\n },\n localization: () => {},\n};\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceInterface.\n * @param props\n * @returns\n */\nexport const InterfaceWrapper = (\n props: React.PropsWithChildren<WrapperProps>\n) => {\n const mergedProps = {...DefaultProps, ...props};\n if (!mergedProps.engine) {\n throw new Error('The \"engine\" prop is required.');\n //TODO, maybe: provide a default engine\n }\n const {engine, localization, onReady, ...allOtherProps} = mergedProps;\n const interfaceRef = useRef<HTMLAtomicCommerceInterfaceElement>(null);\n let initialization: Promise<void> | null = null;\n\n useEffect(() => {\n const commerceInterfaceAtomic = interfaceRef.current!;\n if (!initialization) {\n initialization = commerceInterfaceAtomic.initializeWithEngine(engine);\n initialization.then(() => {\n localization(commerceInterfaceAtomic.i18n);\n onReady(\n commerceInterfaceAtomic.executeFirstRequest.bind(\n commerceInterfaceAtomic\n )\n );\n });\n }\n }, [interfaceRef]);\n\n return (\n <AtomicCommerceInterface ref={interfaceRef} {...allOtherProps}>\n {props.children}\n </AtomicCommerceInterface>\n );\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceProductList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceProductList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceProductList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceProductList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceProductListRef =\n useRef<HTMLAtomicCommerceProductListElement>(null);\n useEffect(() => {\n commerceProductListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceProductListRef]);\n return (\n <AtomicCommerceProductList ref={commerceProductListRef} {...otherProps} />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n","import type {JSX as AtomicJSX} from '@coveo/atomic';\nimport type {Product} from '@coveo/headless/commerce';\nimport React, {useEffect, useRef} from 'react';\nimport {createRoot} from 'react-dom/client';\nimport {renderToString} from 'react-dom/server';\nimport {\n AtomicCommerceRecommendationList,\n AtomicProductLink,\n} from '../stencil-generated/commerce/index.js';\n\ninterface Template {\n contentTemplate: JSX.Element;\n linkTemplate: JSX.Element;\n}\n\n/**\n * The properties of the AtomicCommerceRecommendationList component\n */\ninterface WrapperProps extends AtomicJSX.AtomicCommerceRecommendationList {\n /**\n * A template function that takes a result item and outputs its target rendering as a JSX element.\n * It can be used to conditionally render different type of result templates based on the properties of each result.\n */\n template: (result: Product) => JSX.Element | Template;\n}\n\n/**\n * This component serves as a wrapper for the core AtomicCommerceRecommendationList.\n *\n * @param props\n * @returns\n */\nexport const ListWrapper: React.FC<WrapperProps> = (props) => {\n const {template, ...otherProps} = props;\n const commerceRecsListRef =\n useRef<HTMLAtomicCommerceRecommendationListElement>(null);\n useEffect(() => {\n commerceRecsListRef.current?.setRenderFunction(\n (product, root, linkContainer) => {\n const templateResult = template(product as Product);\n if (hasLinkTemplate(templateResult)) {\n createRoot(linkContainer!).render(templateResult.linkTemplate);\n createRoot(root).render(templateResult.contentTemplate);\n return renderToString(templateResult.contentTemplate);\n } else {\n createRoot(root).render(templateResult);\n otherProps.display === 'grid'\n ? createRoot(linkContainer!).render(\n <AtomicProductLink></AtomicProductLink>\n )\n : createRoot(linkContainer!).render(<></>);\n return renderToString(templateResult);\n }\n }\n );\n }, [commerceRecsListRef]);\n return (\n <AtomicCommerceRecommendationList\n ref={commerceRecsListRef}\n {...otherProps}\n />\n );\n};\n\nconst hasLinkTemplate = (\n template: JSX.Element | Template\n): template is Template => {\n return (template as Template).linkTemplate !== undefined;\n};\n"],"names":["ListWrapper","hasLinkTemplate"],"mappings":";;;;;;AAAO,MAAM,gBAAgB,GAAG,CAAC,GAAW,KAC1C,GAAG;AACA,KAAA,WAAW,EAAE;KACb,KAAK,CAAC,GAAG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AAC,CAAC;AACpD,YAAA,IAAI,eAAe,CAAC,cAAc,CAAC,EAAE;gBACnC,UAAU,CAAC,aAAc,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;gBAC/D,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;AACxD,gBAAA,OAAO,cAAc,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;aACvD;iBAAM;gBACL,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBACxC,UAAU,CAAC,OAAO,KAAK,MAAM;sBACzB,UAAU,CAAC,aAAc,CAAC,CAAC,MAAM,CAC/B,KAAA,CAAA,aAAA,CAAC,iBAAiB,EAAA,IAAA,CAAqB,CACxC;sBACD,UAAU,CAAC,aAAc,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAC,CAAC;AAC7C,gBAAA,OAAO,cAAc,CAAC,cAAc,CAAC,CAAC;aACvC;AACH,SAAC,CACF,CAAC;AACJ,KAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC1B,QACE,KAAC,CAAA,aAAA,CAAA,gCAAgC,EAC/B,EAAA,GAAG,EAAE,mBAAmB,EACpB,GAAA,UAAU,EACd,CAAA,EACF;AACJ,EAAE;AAEF,MAAM,eAAe,GAAG,CACtB,QAAgC,KACR;AACxB,IAAA,OAAQ,QAAqB,CAAC,YAAY,KAAK,SAAS,CAAC;AAC3D,CAAC;;;;"}
@@ -37,6 +37,7 @@ export declare const AtomicProductExcerpt: import("react").ForwardRefExoticCompo
37
37
  export declare const AtomicProductFieldCondition: import("react").ForwardRefExoticComponent<JSX.AtomicProductFieldCondition & Omit<import("react").HTMLAttributes<HTMLAtomicProductFieldConditionElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductFieldConditionElement>>;
38
38
  export declare const AtomicProductImage: import("react").ForwardRefExoticComponent<JSX.AtomicProductImage & Omit<import("react").HTMLAttributes<HTMLAtomicProductImageElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductImageElement>>;
39
39
  export declare const AtomicProductLink: import("react").ForwardRefExoticComponent<JSX.AtomicProductLink & Omit<import("react").HTMLAttributes<HTMLAtomicProductLinkElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductLinkElement>>;
40
+ export declare const AtomicProductMultiValueText: import("react").ForwardRefExoticComponent<JSX.AtomicProductMultiValueText & Omit<import("react").HTMLAttributes<HTMLAtomicProductMultiValueTextElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductMultiValueTextElement>>;
40
41
  export declare const AtomicProductNumericFieldValue: import("react").ForwardRefExoticComponent<JSX.AtomicProductNumericFieldValue & Omit<import("react").HTMLAttributes<HTMLAtomicProductNumericFieldValueElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductNumericFieldValueElement>>;
41
42
  export declare const AtomicProductPrice: import("react").ForwardRefExoticComponent<JSX.AtomicProductPrice & Omit<import("react").HTMLAttributes<HTMLAtomicProductPriceElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductPriceElement>>;
42
43
  export declare const AtomicProductRating: import("react").ForwardRefExoticComponent<JSX.AtomicProductRating & Omit<import("react").HTMLAttributes<HTMLAtomicProductRatingElement>, "style"> & import("./react-component-lib/interfaces.js").StyleReactProps & import("react").RefAttributes<HTMLAtomicProductRatingElement>>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@coveo/atomic-react",
3
3
  "sideEffects": false,
4
4
  "type": "module",
5
- "version": "3.2.1-pre.94c445f363",
5
+ "version": "3.2.1-pre.eb70faf263",
6
6
  "description": "React specific wrapper for the Atomic component library",
7
7
  "repository": {
8
8
  "type": "git",
@@ -30,7 +30,7 @@
30
30
  "commerce/"
31
31
  ],
32
32
  "dependencies": {
33
- "@coveo/atomic": "3.8.0-pre.94c445f363"
33
+ "@coveo/atomic": "3.8.0-pre.eb70faf263"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@coveo/release": "1.0.0",
@@ -49,12 +49,12 @@
49
49
  "rollup-plugin-polyfill-node": "^0.13.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@coveo/headless": "3.6.0-pre.94c445f363",
52
+ "@coveo/headless": "3.6.0-pre.eb70faf263",
53
53
  "react": ">=18.0.0",
54
54
  "react-dom": ">=18.0.0"
55
55
  },
56
56
  "engines": {
57
- "node": "^20.9.0"
57
+ "node": "^20.9.0 || ^22.11.0"
58
58
  },
59
59
  "exports": {
60
60
  ".": {