From a6add1d53a451b2ca5cc89e63b324acbd8974294 Mon Sep 17 00:00:00 2001 From: Alex Prudhomme <78121423+alexprudhomme@users.noreply.github.com> Date: Wed, 5 Feb 2025 08:49:58 -0500 Subject: [PATCH 01/21] chore(headless): make ssr-commerce definers public (#4929) https://coveord.atlassian.net/browse/KIT-3690 headless/ssr-commerce is public ! --- .../controllers/commerce/context/cart/headless-cart.ssr.ts | 2 -- .../src/controllers/commerce/context/headless-context.ssr.ts | 2 -- .../headless-core-breadcrumb-manager.ssr.ts | 2 -- .../facets/generator/headless-commerce-facet-generator.ssr.ts | 2 -- .../core/pagination/headless-core-commerce-pagination.ssr.ts | 2 -- .../parameter-manager/headless-core-parameter-manager.ssr.ts | 2 -- .../commerce/core/sort/headless-core-commerce-sort.ssr.ts | 2 -- .../commerce/core/summary/headless-core-summary.ssr.ts | 2 -- .../headless-field-suggestions-generator.ssr.ts | 2 -- .../instant-products/headless-instant-products.ssr.ts | 2 -- .../commerce/product-list/headless-product-list.ssr.ts | 4 +--- .../commerce/product-view/headless-product-view.ssr.ts | 1 - .../recent-queries-list/headless-recent-queries-list.ssr.ts | 2 -- .../commerce/recommendations/headless-recommendations.ssr.ts | 4 ---- .../commerce/search-box/headless-search-box.ssr.ts | 2 -- .../commerce/search/did-you-mean/headless-did-you-mean.ssr.ts | 4 +--- .../headless-standalone-search-box.ssr.ts | 2 -- .../commerce/triggers/headless-notify-trigger.ssr.ts | 2 -- .../commerce/triggers/headless-query-trigger.ssr.ts | 2 -- .../commerce/triggers/headless-redirection-trigger.ssr.ts | 2 -- 20 files changed, 2 insertions(+), 43 deletions(-) diff --git a/packages/headless/src/controllers/commerce/context/cart/headless-cart.ssr.ts b/packages/headless/src/controllers/commerce/context/cart/headless-cart.ssr.ts index 46e661cb182..b35f2ee259e 100644 --- a/packages/headless/src/controllers/commerce/context/cart/headless-cart.ssr.ts +++ b/packages/headless/src/controllers/commerce/context/cart/headless-cart.ssr.ts @@ -21,8 +21,6 @@ export interface CartDefinition * @group Definers * * @returns The `Cart` controller definition. - * - * @internal */ export function defineCart(): CartDefinition { return { diff --git a/packages/headless/src/controllers/commerce/context/headless-context.ssr.ts b/packages/headless/src/controllers/commerce/context/headless-context.ssr.ts index 6d892598181..0d6cec5835c 100644 --- a/packages/headless/src/controllers/commerce/context/headless-context.ssr.ts +++ b/packages/headless/src/controllers/commerce/context/headless-context.ssr.ts @@ -23,8 +23,6 @@ export interface ContextDefinition * @group Definers * * @returns The `Context` controller definition. - * - * @internal */ export function defineContext(): ContextDefinition { return { diff --git a/packages/headless/src/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.ts b/packages/headless/src/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.ts index 4a46144d91b..b913045688c 100644 --- a/packages/headless/src/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/breadcrumb-manager/headless-core-breadcrumb-manager.ssr.ts @@ -18,8 +18,6 @@ export type {BreadcrumbManager, BreadcrumbManagerState}; * @group Definers * * @returns The `BreadcrumbManager` controller definition. - * - * @internal */ export function defineBreadcrumbManager< TOptions extends ControllerDefinitionOption | undefined, diff --git a/packages/headless/src/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.ts b/packages/headless/src/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.ts index bf90e4ddd14..020cf191627 100644 --- a/packages/headless/src/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/facets/generator/headless-commerce-facet-generator.ssr.ts @@ -167,8 +167,6 @@ export interface FacetGeneratorProps { } /** - * @internal - * * Creates a `FacetGenerator` sub-controller for server-side rendering purposes (SSR). * * @param engine - The SSR commerce engine. diff --git a/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts b/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts index 0fe04c67d38..4e453d78cf6 100644 --- a/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/pagination/headless-core-commerce-pagination.ssr.ts @@ -20,8 +20,6 @@ export type {Pagination, PaginationProps, PaginationState}; * * @param props - The configurable `Pagination` properties. * @returns The `Pagination` controller definition. - * - * @internal */ export function definePagination< TOptions extends ControllerDefinitionOption | undefined, diff --git a/packages/headless/src/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.ts b/packages/headless/src/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.ts index 42efaceb758..ded374f8bdb 100644 --- a/packages/headless/src/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/parameter-manager/headless-core-parameter-manager.ssr.ts @@ -43,8 +43,6 @@ export type { * @group Definers * * @returns The `ParameterManager` controller definition. - * - * @internal */ export function defineParameterManager< TOptions extends ControllerDefinitionOption | undefined, diff --git a/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts b/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts index 126497a8580..08303b3fb81 100644 --- a/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/sort/headless-core-commerce-sort.ssr.ts @@ -16,8 +16,6 @@ export type {Sort, SortProps, SortState}; * * @param props - The configurable `Sort` properties. * @returns The `Sort` controller definition. - * - * @internal */ export function defineSort< TOptions extends ControllerDefinitionOption | undefined, diff --git a/packages/headless/src/controllers/commerce/core/summary/headless-core-summary.ssr.ts b/packages/headless/src/controllers/commerce/core/summary/headless-core-summary.ssr.ts index 85e788de36a..0adf9ff401b 100644 --- a/packages/headless/src/controllers/commerce/core/summary/headless-core-summary.ssr.ts +++ b/packages/headless/src/controllers/commerce/core/summary/headless-core-summary.ssr.ts @@ -24,8 +24,6 @@ export type { * @group Definers * * @returns The `Summary` controller definition. - * - * @internal */ export function defineSummary< TOptions extends ControllerDefinitionOption | undefined, diff --git a/packages/headless/src/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.ts b/packages/headless/src/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.ts index ee89bd6b5bc..687d75dd93a 100644 --- a/packages/headless/src/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.ts +++ b/packages/headless/src/controllers/commerce/field-suggestions/headless-field-suggestions-generator.ssr.ts @@ -24,8 +24,6 @@ export interface FieldSuggestionsGeneratorDefinition * @group Definers * * @returns The `FieldSuggestionsGenerator` controller definition. - * - * @internal */ export function defineFieldSuggestionsGenerator(): FieldSuggestionsGeneratorDefinition { return { diff --git a/packages/headless/src/controllers/commerce/instant-products/headless-instant-products.ssr.ts b/packages/headless/src/controllers/commerce/instant-products/headless-instant-products.ssr.ts index bf6941c388e..72a1f888270 100644 --- a/packages/headless/src/controllers/commerce/instant-products/headless-instant-products.ssr.ts +++ b/packages/headless/src/controllers/commerce/instant-products/headless-instant-products.ssr.ts @@ -19,8 +19,6 @@ export interface InstantProductsDefinition * @group Definers * * @returns The `InstantProducts` controller definition. - * - * @internal */ export function defineInstantProducts( props: InstantProductsProps = {options: {}} diff --git a/packages/headless/src/controllers/commerce/product-list/headless-product-list.ssr.ts b/packages/headless/src/controllers/commerce/product-list/headless-product-list.ssr.ts index 879b9fc30d7..e27776e3a17 100644 --- a/packages/headless/src/controllers/commerce/product-list/headless-product-list.ssr.ts +++ b/packages/headless/src/controllers/commerce/product-list/headless-product-list.ssr.ts @@ -26,9 +26,7 @@ export type ProductList = Pick< * @group Definers * * @returns The `ProductList` controller definition. - * - * @internal - * */ + */ export function defineProductList< TOptions extends ControllerDefinitionOption | undefined, >(options?: TOptions) { diff --git a/packages/headless/src/controllers/commerce/product-view/headless-product-view.ssr.ts b/packages/headless/src/controllers/commerce/product-view/headless-product-view.ssr.ts index e73f49586c8..1ca07474b6d 100644 --- a/packages/headless/src/controllers/commerce/product-view/headless-product-view.ssr.ts +++ b/packages/headless/src/controllers/commerce/product-view/headless-product-view.ssr.ts @@ -21,7 +21,6 @@ export interface ProductViewDefinition * * @returns The `ProductView` controller definition. * - * @internal * @group Definers */ export function defineProductView(): ProductViewDefinition { diff --git a/packages/headless/src/controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.ts b/packages/headless/src/controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.ts index 9db774096f1..fee4e53f01c 100644 --- a/packages/headless/src/controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.ts +++ b/packages/headless/src/controllers/commerce/recent-queries-list/headless-recent-queries-list.ssr.ts @@ -21,8 +21,6 @@ export interface RecentQueriesListDefinition * * @param props - The configuration `RecentQueriesList` properties. * @returns The `RecentQueriesList` controller definition. - * - * @internal */ export function defineRecentQueriesList( props: RecentQueriesListProps = {} diff --git a/packages/headless/src/controllers/commerce/recommendations/headless-recommendations.ssr.ts b/packages/headless/src/controllers/commerce/recommendations/headless-recommendations.ssr.ts index b19f83d16f5..077f4cf5136 100644 --- a/packages/headless/src/controllers/commerce/recommendations/headless-recommendations.ssr.ts +++ b/packages/headless/src/controllers/commerce/recommendations/headless-recommendations.ssr.ts @@ -18,9 +18,6 @@ import { export type {Recommendations, RecommendationsState}; -/** - * @internal - * */ export type RecommendationsDefinitionMeta = { [recommendationInternalOptionKey]: {} & RecommendationsProps['options']; }; @@ -32,7 +29,6 @@ export interface RecommendationsDefinition > {} /** - * @internal * Defines a `Recommendations` controller instance. * @group Definers * diff --git a/packages/headless/src/controllers/commerce/search-box/headless-search-box.ssr.ts b/packages/headless/src/controllers/commerce/search-box/headless-search-box.ssr.ts index 8045dc5ec05..bf5e4749740 100644 --- a/packages/headless/src/controllers/commerce/search-box/headless-search-box.ssr.ts +++ b/packages/headless/src/controllers/commerce/search-box/headless-search-box.ssr.ts @@ -23,8 +23,6 @@ export interface SearchBoxDefinition * @group Definers * * @returns The `SearchBox` controller definition. - * - * @internal */ export function defineSearchBox( props: SearchBoxProps = {} diff --git a/packages/headless/src/controllers/commerce/search/did-you-mean/headless-did-you-mean.ssr.ts b/packages/headless/src/controllers/commerce/search/did-you-mean/headless-did-you-mean.ssr.ts index ec9072c3f31..da1128ab92c 100644 --- a/packages/headless/src/controllers/commerce/search/did-you-mean/headless-did-you-mean.ssr.ts +++ b/packages/headless/src/controllers/commerce/search/did-you-mean/headless-did-you-mean.ssr.ts @@ -9,9 +9,7 @@ export type {DidYouMean, DidYouMeanState}; * @group Definers * * @returns The `DidYouMean` controller definition. - * - * @internal - * */ + */ export function defineDidYouMean(): SearchOnlyControllerDefinitionWithoutProps { return { search: true, diff --git a/packages/headless/src/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.ts b/packages/headless/src/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.ts index 927f8b1b8e0..ba3916dbe07 100644 --- a/packages/headless/src/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.ts +++ b/packages/headless/src/controllers/commerce/standalone-search-box/headless-standalone-search-box.ssr.ts @@ -18,8 +18,6 @@ export interface StandaloneSearchBoxDefinition * * @param props - The configurable `StandaloneSearchBox` properties. * @returns The `StandaloneSearchBox` controller definition. - * - * @internal */ export function defineStandaloneSearchBox( props: StandaloneSearchBoxProps diff --git a/packages/headless/src/controllers/commerce/triggers/headless-notify-trigger.ssr.ts b/packages/headless/src/controllers/commerce/triggers/headless-notify-trigger.ssr.ts index d04c4c8537c..e8a15842d2c 100644 --- a/packages/headless/src/controllers/commerce/triggers/headless-notify-trigger.ssr.ts +++ b/packages/headless/src/controllers/commerce/triggers/headless-notify-trigger.ssr.ts @@ -12,8 +12,6 @@ export interface NotifyTriggerDefinition * @group Definers * * @returns The `NotifyTrigger` controller definition. - * - * @internal */ export function defineNotifyTrigger(): NotifyTriggerDefinition { return { diff --git a/packages/headless/src/controllers/commerce/triggers/headless-query-trigger.ssr.ts b/packages/headless/src/controllers/commerce/triggers/headless-query-trigger.ssr.ts index e9780db937c..c4658e8fb40 100644 --- a/packages/headless/src/controllers/commerce/triggers/headless-query-trigger.ssr.ts +++ b/packages/headless/src/controllers/commerce/triggers/headless-query-trigger.ssr.ts @@ -12,8 +12,6 @@ export interface QueryTriggerDefinition * @group Definers * * @returns The `NotifyTrigger` controller definition. - * - * @internal */ export function defineQueryTrigger(): QueryTriggerDefinition { return { diff --git a/packages/headless/src/controllers/commerce/triggers/headless-redirection-trigger.ssr.ts b/packages/headless/src/controllers/commerce/triggers/headless-redirection-trigger.ssr.ts index 1c9b2280c9f..87fa5d0964d 100644 --- a/packages/headless/src/controllers/commerce/triggers/headless-redirection-trigger.ssr.ts +++ b/packages/headless/src/controllers/commerce/triggers/headless-redirection-trigger.ssr.ts @@ -12,8 +12,6 @@ export interface RedirectionTriggerDefinition * @group Definers * * @returns The `NotifyTrigger` controller definition. - * - * @internal */ export function defineRedirectionTrigger(): RedirectionTriggerDefinition { return { From cf5ce1d4d64fcd05ee0ff41c71a7a624a16ce74b Mon Sep 17 00:00:00 2001 From: Alex Prudhomme <78121423+alexprudhomme@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:19:57 -0500 Subject: [PATCH 02/21] chore(atomic): add index & lazy-index file in every use case (#4927) https://coveord.atlassian.net/browse/KIT-3923 This PR adds the index.ts & lazy-index.ts file in every sub package of atomic. It was also required to change how some headless import worked in insight & recommendations to clean up the index files. @coveo/service-integration @coveo/service-core We need an index.ts & a lazy-index.ts file for every sub package of atomic (commerce, insight, ipx, ...) for the Lit migration and for going forward with Lit. This will enable us to better organize the code and also make it possible for implementers to only import a sub package specifically by doing `import '@coveo/atomic/insight'` for example. For insight and recommendations, there were special exports in the index.ts file. I took the time to remove them and rework the imports in the files affected. No functionality is lost, only small refactor. --- packages/atomic/src/components.d.ts | 10 +- .../atomic/src/components/commerce/index.ts | 5 + .../src/components/commerce/lazy-index.ts | 6 + .../common/interface/analytics-config.ts | 4 +- .../components/common/interface/bindings.ts | 2 +- .../src/components/common/interface/item.ts | 2 +- packages/atomic/src/components/index.ts | 4 + .../atomic-insight-facet.tsx | 28 ++--- .../atomic-insight-generated-answer.tsx | 18 +-- .../analytics-config.ts | 5 +- .../atomic-insight-interface.tsx | 14 +-- .../atomic-insight-numeric-facet.tsx | 40 +++--- .../atomic-insight-pager.tsx | 16 +-- .../atomic-insight-refine-modal.tsx | 16 +-- .../atomic-insight-refine-toggle.tsx | 16 +-- .../atomic-insight-result.tsx | 6 +- .../atomic-insight-search-box.tsx | 12 +- .../atomic-insight-tab/atomic-insight-tab.tsx | 6 +- .../atomic-insight-timeframe-facet.tsx | 38 +++--- .../atomic/src/components/insight/index.ts | 115 +----------------- .../src/components/insight/lazy-index.ts | 6 + .../atomic-insight-folded-result-list.tsx | 20 +-- .../atomic-insight-result-list.tsx | 20 +-- .../atomic-insight-result-children.tsx | 12 +- .../atomic-insight-result-template.tsx | 5 +- ...c-insight-smart-snippet-feedback-modal.tsx | 10 +- ...omic-insight-smart-snippet-suggestions.tsx | 12 +- .../atomic-insight-smart-snippet.tsx | 10 +- .../atomic-insight-user-actions-session.tsx | 2 +- .../user-action.tsx | 2 +- .../atomic-insight-user-actions-timeline.tsx | 12 +- .../atomic-insight-user-actions-toggle.tsx | 10 +- .../atomic-recs-list/atomic-ipx-recs-list.tsx | 3 +- packages/atomic/src/components/ipx/index.ts | 5 + .../atomic/src/components/ipx/lazy-index.ts | 6 + packages/atomic/src/components/lazy-index.ts | 12 +- .../atomic-recs-interface.tsx | 2 +- .../atomic-recs-list/atomic-recs-list.tsx | 3 +- .../atomic-recs-result-template.tsx | 5 +- .../atomic-recs-result/atomic-recs-result.tsx | 5 +- .../src/components/recommendations/index.ts | 15 +-- .../components/recommendations/lazy-index.ts | 6 + .../atomic/stencil-proxy/cjs/loader.cjs.js | 22 +++- packages/atomic/stencil-proxy/esm/index.js | 4 + packages/atomic/stencil-proxy/esm/loader.js | 12 +- 45 files changed, 288 insertions(+), 296 deletions(-) create mode 100644 packages/atomic/src/components/commerce/index.ts create mode 100644 packages/atomic/src/components/commerce/lazy-index.ts create mode 100644 packages/atomic/src/components/insight/lazy-index.ts create mode 100644 packages/atomic/src/components/ipx/index.ts create mode 100644 packages/atomic/src/components/ipx/lazy-index.ts create mode 100644 packages/atomic/src/components/recommendations/lazy-index.ts diff --git a/packages/atomic/src/components.d.ts b/packages/atomic/src/components.d.ts index 199cd500d50..07e23cdf3cb 100644 --- a/packages/atomic/src/components.d.ts +++ b/packages/atomic/src/components.d.ts @@ -21,7 +21,7 @@ import { unknown as AnyBindings, ItemDisplayBasicLayout as ItemDisplayBasicLayou import { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; import { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; import { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; -import { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction } from "./components/insight"; +import { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction } from "@coveo/headless/insight"; import { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; import { InsightStore } from "./components/insight/atomic-insight-interface/store"; import { InsightResultActionClickedEvent } from "./components/insight/atomic-insight-result-action/atomic-insight-result-action"; @@ -31,8 +31,7 @@ import { CommerceStore } from "./components/commerce/atomic-commerce-interface/s import { CommerceRecommendationStore } from "./components/commerce/atomic-commerce-recommendation-interface/store"; import { SelectChildProductEventArgs } from "./components/commerce/product-template-components/atomic-product-children/atomic-product-children"; import { TruncateAfter } from "./components/common/expandable-text/expandable-text"; -import { RecommendationEngine } from "@coveo/headless/recommendation"; -import { InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "./components/recommendations"; +import { RecommendationEngine, InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "@coveo/headless/recommendation"; import { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface"; import { RecsStore } from "./components/recommendations/atomic-recs-interface/store"; import { Bindings as Bindings1 } from "./components/search/atomic-search-interface/atomic-search-interface"; @@ -55,7 +54,7 @@ export { unknown as AnyBindings, ItemDisplayBasicLayout as ItemDisplayBasicLayou export { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; export { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; export { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; -export { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction } from "./components/insight"; +export { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction } from "@coveo/headless/insight"; export { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; export { InsightStore } from "./components/insight/atomic-insight-interface/store"; export { InsightResultActionClickedEvent } from "./components/insight/atomic-insight-result-action/atomic-insight-result-action"; @@ -65,8 +64,7 @@ export { CommerceStore } from "./components/commerce/atomic-commerce-interface/s export { CommerceRecommendationStore } from "./components/commerce/atomic-commerce-recommendation-interface/store"; export { SelectChildProductEventArgs } from "./components/commerce/product-template-components/atomic-product-children/atomic-product-children"; export { TruncateAfter } from "./components/common/expandable-text/expandable-text"; -export { RecommendationEngine } from "@coveo/headless/recommendation"; -export { InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "./components/recommendations"; +export { RecommendationEngine, InteractiveResult as RecsInteractiveResult, LogLevel as RecsLogLevel, Result as RecsResult, ResultTemplate as RecsResultTemplate, ResultTemplateCondition as RecsResultTemplateCondition } from "@coveo/headless/recommendation"; export { RecsInitializationOptions } from "./components/recommendations/atomic-recs-interface/atomic-recs-interface"; export { RecsStore } from "./components/recommendations/atomic-recs-interface/store"; export { Bindings as Bindings1 } from "./components/search/atomic-search-interface/atomic-search-interface"; diff --git a/packages/atomic/src/components/commerce/index.ts b/packages/atomic/src/components/commerce/index.ts new file mode 100644 index 00000000000..c4c89001dce --- /dev/null +++ b/packages/atomic/src/components/commerce/index.ts @@ -0,0 +1,5 @@ +// Export the class of the components migrated to Lit here, like this: +//export {AtomicCommerceBreadbox} from './atomic-commerce-breadbox/atomic-commerce-breadbox.js'; + +// TODO: Remove this line once at least one component is migrated to Lit. +export {}; diff --git a/packages/atomic/src/components/commerce/lazy-index.ts b/packages/atomic/src/components/commerce/lazy-index.ts new file mode 100644 index 00000000000..3a8e1fdd2ac --- /dev/null +++ b/packages/atomic/src/components/commerce/lazy-index.ts @@ -0,0 +1,6 @@ +export default { + // Add entries as such when new components are added/moved to Lit. + // 'atomic-commerce-breadbox': async () => await import('./atomic-commerce-breadbox/atomic-commerce-breadbox.js'), +} as Record Promise>; + +export type * from './index.js'; diff --git a/packages/atomic/src/components/common/interface/analytics-config.ts b/packages/atomic/src/components/common/interface/analytics-config.ts index cf5bd19657a..046a4290b65 100644 --- a/packages/atomic/src/components/common/interface/analytics-config.ts +++ b/packages/atomic/src/components/common/interface/analytics-config.ts @@ -4,9 +4,9 @@ import { EngineConfiguration, } from '@coveo/headless'; import {AnalyticsClientSendEventHook} from '@coveo/headless'; +import {InsightEngineConfiguration} from '@coveo/headless/insight'; +import {RecommendationEngineConfiguration} from '@coveo/headless/recommendation'; import {getAtomicEnvironment} from '../../../global/environment'; -import {InsightEngineConfiguration} from '../../insight'; -import {RecommendationEngineConfiguration} from '../../recommendations'; export type AnalyticsPayload = Parameters[1]; diff --git a/packages/atomic/src/components/common/interface/bindings.ts b/packages/atomic/src/components/common/interface/bindings.ts index d59a75b07f1..6c0239670f2 100644 --- a/packages/atomic/src/components/common/interface/bindings.ts +++ b/packages/atomic/src/components/common/interface/bindings.ts @@ -1,10 +1,10 @@ import type {SearchEngine} from '@coveo/headless'; import {CommerceEngine} from '@coveo/headless/commerce'; +import {InsightEngine} from '@coveo/headless/insight'; import type {RecommendationEngine} from '@coveo/headless/recommendation'; import {i18n} from 'i18next'; import {CommerceStore} from '../../commerce/atomic-commerce-interface/store'; import {CommerceRecommendationStore} from '../../commerce/atomic-commerce-recommendation-interface/store'; -import {InsightEngine} from '../../insight'; import {InsightStore} from '../../insight/atomic-insight-interface/store'; import {RecsStore} from '../../recommendations/atomic-recs-interface/store'; import {SearchStore} from '../../search/atomic-search-interface/store'; diff --git a/packages/atomic/src/components/common/interface/item.ts b/packages/atomic/src/components/common/interface/item.ts index ab9d8ba8bc5..86ce1aafc5c 100644 --- a/packages/atomic/src/components/common/interface/item.ts +++ b/packages/atomic/src/components/common/interface/item.ts @@ -1,6 +1,6 @@ import {FoldedResult, Result} from '@coveo/headless'; import {Product} from '@coveo/headless/commerce'; -import {InsightResult} from '../../insight'; +import {Result as InsightResult} from '@coveo/headless/insight'; export type AnyItem = FoldedResult | AnyUnfoldedItem | Product; export type AnyUnfoldedItem = Result | InsightResult; diff --git a/packages/atomic/src/components/index.ts b/packages/atomic/src/components/index.ts index a5fa9b02d4c..b4ba0bddaf1 100644 --- a/packages/atomic/src/components/index.ts +++ b/packages/atomic/src/components/index.ts @@ -1 +1,5 @@ export * from './search/index.js'; +export * from './insight/index.js'; +export * from './commerce/index.js'; +export * from './ipx/index.js'; +export * from './recommendations/index.js'; diff --git a/packages/atomic/src/components/insight/atomic-insight-facet/atomic-insight-facet.tsx b/packages/atomic/src/components/insight/atomic-insight-facet/atomic-insight-facet.tsx index 4659573457e..229e79c1ba9 100644 --- a/packages/atomic/src/components/insight/atomic-insight-facet/atomic-insight-facet.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-facet/atomic-insight-facet.tsx @@ -1,19 +1,19 @@ import {FacetResultsMustMatch} from '@coveo/headless'; -import {Component, h, State, Prop, Element, VNode} from '@stencil/core'; import { - buildInsightFacet, - buildInsightFacetConditionsManager, - buildInsightSearchStatus, - InsightCategoryFacetValueRequest, - InsightFacet, - InsightFacetConditionsManager, - InsightFacetOptions, - InsightFacetSortCriterion, - InsightFacetState, - InsightFacetValueRequest, - InsightSearchStatus, - InsightSearchStatusState, -} from '..'; + buildFacet as buildInsightFacet, + buildFacetConditionsManager as buildInsightFacetConditionsManager, + buildSearchStatus as buildInsightSearchStatus, + CategoryFacetValueRequest as InsightCategoryFacetValueRequest, + Facet as InsightFacet, + FacetConditionsManager as InsightFacetConditionsManager, + FacetOptions as InsightFacetOptions, + FacetSortCriterion as InsightFacetSortCriterion, + FacetState as InsightFacetState, + FacetValueRequest as InsightFacetValueRequest, + SearchStatus as InsightSearchStatus, + SearchStatusState as InsightSearchStatusState, +} from '@coveo/headless/insight'; +import {Component, h, State, Prop, Element, VNode} from '@stencil/core'; import { AriaLiveRegion, FocusTargetController, diff --git a/packages/atomic/src/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.tsx b/packages/atomic/src/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.tsx index 7b05385f2f6..9fc06e3c7d8 100644 --- a/packages/atomic/src/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-generated-answer/atomic-insight-generated-answer.tsx @@ -1,13 +1,13 @@ -import {Component, Element, State, Prop, Watch} from '@stencil/core'; import { - InsightSearchStatus, - InsightSearchStatusState, - buildInsightGeneratedAnswer, - buildInsightInteractiveCitation, - buildInsightSearchStatus, - InsightGeneratedAnswer, - InsightGeneratedAnswerState, -} from '..'; + SearchStatus as InsightSearchStatus, + SearchStatusState as InsightSearchStatusState, + buildGeneratedAnswer as buildInsightGeneratedAnswer, + buildInteractiveCitation as buildInsightInteractiveCitation, + buildSearchStatus as buildInsightSearchStatus, + GeneratedAnswer as InsightGeneratedAnswer, + GeneratedAnswerState as InsightGeneratedAnswerState, +} from '@coveo/headless/insight'; +import {Component, Element, State, Prop, Watch} from '@stencil/core'; import {AriaLiveRegion} from '../../../utils/accessibility-utils'; import {debounce} from '../../../utils/debounce-utils'; import { diff --git a/packages/atomic/src/components/insight/atomic-insight-interface/analytics-config.ts b/packages/atomic/src/components/insight/atomic-insight-interface/analytics-config.ts index ca5f8174fe2..ec5a06db19f 100644 --- a/packages/atomic/src/components/insight/atomic-insight-interface/analytics-config.ts +++ b/packages/atomic/src/components/insight/atomic-insight-interface/analytics-config.ts @@ -1,4 +1,7 @@ -import {InsightAnalyticsConfiguration, InsightEngineConfiguration} from '..'; +import { + AnalyticsConfiguration as InsightAnalyticsConfiguration, + EngineConfiguration as InsightEngineConfiguration, +} from '@coveo/headless/insight'; import { AnalyticsPayload, augmentAnalyticsWithAtomicVersion, diff --git a/packages/atomic/src/components/insight/atomic-insight-interface/atomic-insight-interface.tsx b/packages/atomic/src/components/insight/atomic-insight-interface/atomic-insight-interface.tsx index 566b984d9a5..50cecfd5a50 100644 --- a/packages/atomic/src/components/insight/atomic-insight-interface/atomic-insight-interface.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-interface/atomic-insight-interface.tsx @@ -1,4 +1,11 @@ import {loadFieldActions} from '@coveo/headless/insight'; +import { + LogLevel as InsightLogLevel, + InsightEngine, + InsightEngineConfiguration, + buildInsightEngine, + buildResultsPerPage as buildInsightResultsPerPage, +} from '@coveo/headless/insight'; import { Component, Element, @@ -11,13 +18,6 @@ import { Watch, } from '@stencil/core'; import i18next, {i18n} from 'i18next'; -import { - InsightLogLevel, - InsightEngine, - InsightEngineConfiguration, - buildInsightEngine, - buildInsightResultsPerPage, -} from '..'; import {InitializeEvent} from '../../../utils/initialization-utils'; import {ArrayProp} from '../../../utils/props-utils'; import {CommonBindings, NonceBindings} from '../../common/interface/bindings'; diff --git a/packages/atomic/src/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.tsx b/packages/atomic/src/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.tsx index 10376a64311..8513d7f67c2 100644 --- a/packages/atomic/src/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-numeric-facet/atomic-insight-numeric-facet.tsx @@ -1,25 +1,25 @@ import {Schema, StringValue} from '@coveo/bueno'; -import {Component, Element, h, Listen, Prop, State} from '@stencil/core'; import { - buildInsightFacetConditionsManager, - buildInsightNumericFacet, - buildInsightNumericFilter, - buildInsightNumericRange, - buildInsightSearchStatus, - InsightCategoryFacetValueRequest, - InsightFacetConditionsManager, - InsightFacetValueRequest, - InsightNumericFacet, - InsightNumericFacetState, - InsightNumericFilter, - InsightNumericFilterState, - InsightNumericRangeRequest, - InsightRangeFacetRangeAlgorithm, - InsightRangeFacetSortCriterion, - InsightSearchStatus, - InsightSearchStatusState, - loadInsightNumericFacetSetActions, -} from '..'; + buildFacetConditionsManager as buildInsightFacetConditionsManager, + buildNumericFacet as buildInsightNumericFacet, + buildNumericFilter as buildInsightNumericFilter, + buildNumericRange as buildInsightNumericRange, + buildSearchStatus as buildInsightSearchStatus, + CategoryFacetValueRequest as InsightCategoryFacetValueRequest, + FacetConditionsManager as InsightFacetConditionsManager, + FacetValueRequest as InsightFacetValueRequest, + NumericFacet as InsightNumericFacet, + NumericFacetState as InsightNumericFacetState, + NumericFilter as InsightNumericFilter, + NumericFilterState as InsightNumericFilterState, + NumericRangeRequest as InsightNumericRangeRequest, + RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, + RangeFacetSortCriterion as InsightRangeFacetSortCriterion, + SearchStatus as InsightSearchStatus, + SearchStatusState as InsightSearchStatusState, + loadNumericFacetSetActions as loadInsightNumericFacetSetActions, +} from '@coveo/headless/insight'; +import {Component, Element, h, Listen, Prop, State} from '@stencil/core'; import {FocusTargetController} from '../../../utils/accessibility-utils'; import { BindStateToController, diff --git a/packages/atomic/src/components/insight/atomic-insight-pager/atomic-insight-pager.tsx b/packages/atomic/src/components/insight/atomic-insight-pager/atomic-insight-pager.tsx index 3ffadacf09e..1f5fba679f3 100644 --- a/packages/atomic/src/components/insight/atomic-insight-pager/atomic-insight-pager.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-pager/atomic-insight-pager.tsx @@ -1,12 +1,12 @@ -import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core'; import { - buildInsightPager, - buildInsightSearchStatus, - InsightPager, - InsightPagerState, - InsightSearchStatus, - InsightSearchStatusState, -} from '../'; + buildPager as buildInsightPager, + buildSearchStatus as buildInsightSearchStatus, + Pager as InsightPager, + PagerState as InsightPagerState, + SearchStatus as InsightSearchStatus, + SearchStatusState as InsightSearchStatusState, +} from '@coveo/headless/insight'; +import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core'; import ArrowLeftIcon from '../../../images/arrow-left-rounded.svg'; import ArrowRightIcon from '../../../images/arrow-right-rounded.svg'; import {FocusTargetController} from '../../../utils/accessibility-utils'; diff --git a/packages/atomic/src/components/insight/atomic-insight-refine-modal/atomic-insight-refine-modal.tsx b/packages/atomic/src/components/insight/atomic-insight-refine-modal/atomic-insight-refine-modal.tsx index f6e3f6e1d00..b01c0582b8a 100644 --- a/packages/atomic/src/components/insight/atomic-insight-refine-modal/atomic-insight-refine-modal.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-refine-modal/atomic-insight-refine-modal.tsx @@ -1,12 +1,12 @@ -import {Component, h, State, Prop, Element, Watch, Host} from '@stencil/core'; import { - InsightQuerySummary, - InsightQuerySummaryState, - buildInsightQuerySummary, - InsightBreadcrumbManager, - InsightBreadcrumbManagerState, - buildInsightBreadcrumbManager, -} from '..'; + QuerySummary as InsightQuerySummary, + QuerySummaryState as InsightQuerySummaryState, + buildQuerySummary as buildInsightQuerySummary, + BreadcrumbManager as InsightBreadcrumbManager, + BreadcrumbManagerState as InsightBreadcrumbManagerState, + buildBreadcrumbManager as buildInsightBreadcrumbManager, +} from '@coveo/headless/insight'; +import {Component, h, State, Prop, Element, Watch, Host} from '@stencil/core'; import {rectEquals} from '../../../utils/dom-utils'; import { BindStateToController, diff --git a/packages/atomic/src/components/insight/atomic-insight-refine-toggle/atomic-insight-refine-toggle.tsx b/packages/atomic/src/components/insight/atomic-insight-refine-toggle/atomic-insight-refine-toggle.tsx index 6aeff8ec001..b44ba502ca6 100644 --- a/packages/atomic/src/components/insight/atomic-insight-refine-toggle/atomic-insight-refine-toggle.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-refine-toggle/atomic-insight-refine-toggle.tsx @@ -1,12 +1,12 @@ -import {Component, h, State, Element} from '@stencil/core'; import { - buildInsightBreadcrumbManager, - buildInsightSearchStatus, - InsightBreadcrumbManager, - InsightBreadcrumbManagerState, - InsightSearchStatus, - InsightSearchStatusState, -} from '..'; + buildBreadcrumbManager as buildInsightBreadcrumbManager, + buildSearchStatus as buildInsightSearchStatus, + BreadcrumbManager as InsightBreadcrumbManager, + BreadcrumbManagerState as InsightBreadcrumbManagerState, + SearchStatus as InsightSearchStatus, + SearchStatusState as InsightSearchStatusState, +} from '@coveo/headless/insight'; +import {Component, h, State, Element} from '@stencil/core'; import FilterIcon from '../../../images/filter.svg'; import { InitializeBindings, diff --git a/packages/atomic/src/components/insight/atomic-insight-result/atomic-insight-result.tsx b/packages/atomic/src/components/insight/atomic-insight-result/atomic-insight-result.tsx index b1b3d1f0404..03a0d35d1d1 100644 --- a/packages/atomic/src/components/insight/atomic-insight-result/atomic-insight-result.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-result/atomic-insight-result.tsx @@ -1,5 +1,9 @@ +import { + Result as InsightResult, + InteractiveResult as InsightInteractiveResult, + FoldedResult as InsightFoldedResult, +} from '@coveo/headless/insight'; import {Component, h, Prop, Element, Listen, Host} from '@stencil/core'; -import {InsightResult, InsightInteractiveResult, InsightFoldedResult} from '..'; import {applyFocusVisiblePolyfill} from '../../../utils/initialization-utils'; import { DisplayConfig, diff --git a/packages/atomic/src/components/insight/atomic-insight-search-box/atomic-insight-search-box.tsx b/packages/atomic/src/components/insight/atomic-insight-search-box/atomic-insight-search-box.tsx index 16ecded04a9..a20f21ee969 100644 --- a/packages/atomic/src/components/insight/atomic-insight-search-box/atomic-insight-search-box.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-search-box/atomic-insight-search-box.tsx @@ -1,11 +1,11 @@ import {loadInsightSearchActions} from '@coveo/headless/insight'; -import {Component, Element, h, Prop, State} from '@stencil/core'; import { - buildInsightSearchBox, - InsightSearchBox, - InsightSearchBoxState, - InsightSuggestion, -} from '..'; + buildSearchBox as buildInsightSearchBox, + SearchBox as InsightSearchBox, + SearchBoxState as InsightSearchBoxState, + Suggestion as InsightSuggestion, +} from '@coveo/headless/insight'; +import {Component, Element, h, Prop, State} from '@stencil/core'; import SearchSlimIcon from '../../../images/search-slim.svg'; import {AriaLiveRegion} from '../../../utils/accessibility-utils'; import {hasKeyboard, isMacOS} from '../../../utils/device-utils'; diff --git a/packages/atomic/src/components/insight/atomic-insight-tab/atomic-insight-tab.tsx b/packages/atomic/src/components/insight/atomic-insight-tab/atomic-insight-tab.tsx index cc76136dc54..8fcb4e2966e 100644 --- a/packages/atomic/src/components/insight/atomic-insight-tab/atomic-insight-tab.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-tab/atomic-insight-tab.tsx @@ -1,6 +1,10 @@ import {Unsubscribe} from '@coveo/headless'; +import { + buildTab as buildInsightTab, + Tab as InsightTab, + TabState as InsightTabState, +} from '@coveo/headless/insight'; import {Component, h, Prop, State, Method, Element} from '@stencil/core'; -import {buildInsightTab, InsightTab, InsightTabState} from '..'; import { BindStateToController, InitializableComponent, diff --git a/packages/atomic/src/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.tsx b/packages/atomic/src/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.tsx index 7c6fa398536..492b8879e48 100644 --- a/packages/atomic/src/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.tsx +++ b/packages/atomic/src/components/insight/atomic-insight-timeframe-facet/atomic-insight-timeframe-facet.tsx @@ -1,23 +1,23 @@ -import {Component, Element, h, Listen, Prop, State} from '@stencil/core'; import { - buildInsightDateFacet, - buildInsightDateFilter, - buildInsightDateRange, - buildInsightFacetConditionsManager, - buildInsightSearchStatus, - deserializeInsightRelativeDate, - InsightDateFacet, - InsightDateFacetState, - InsightDateFilter, - InsightDateFilterState, - InsightDateRangeRequest, - InsightSearchStatus, - InsightSearchStatusState, - loadInsightDateFacetSetActions, - InsightRangeFacetSortCriterion, - InsightFacetValueRequest, - InsightCategoryFacetValueRequest, -} from '..'; + buildDateFacet as buildInsightDateFacet, + buildDateFilter as buildInsightDateFilter, + buildDateRange as buildInsightDateRange, + buildFacetConditionsManager as buildInsightFacetConditionsManager, + buildSearchStatus as buildInsightSearchStatus, + deserializeRelativeDate as deserializeInsightRelativeDate, + DateFacet as InsightDateFacet, + DateFacetState as InsightDateFacetState, + DateFilter as InsightDateFilter, + DateFilterState as InsightDateFilterState, + DateRangeRequest as InsightDateRangeRequest, + SearchStatus as InsightSearchStatus, + SearchStatusState as InsightSearchStatusState, + loadDateFacetSetActions as loadInsightDateFacetSetActions, + RangeFacetSortCriterion as InsightRangeFacetSortCriterion, + FacetValueRequest as InsightFacetValueRequest, + CategoryFacetValueRequest as InsightCategoryFacetValueRequest, +} from '@coveo/headless/insight'; +import {Component, Element, h, Listen, Prop, State} from '@stencil/core'; import {FocusTargetController} from '../../../utils/accessibility-utils'; import { BindStateToController, diff --git a/packages/atomic/src/components/insight/index.ts b/packages/atomic/src/components/insight/index.ts index 0febfc784fe..e222af309e2 100644 --- a/packages/atomic/src/components/insight/index.ts +++ b/packages/atomic/src/components/insight/index.ts @@ -1,110 +1,5 @@ -export { - AnalyticsConfiguration as InsightAnalyticsConfiguration, - LogLevel as InsightLogLevel, - InsightEngine, - InsightEngineConfiguration, - buildInsightEngine, - getSampleInsightEngineConfiguration, - ResultList as InsightResultList, - ResultListState as InsightResultListState, - buildResultList as buildInsightResultList, - Result as InsightResult, - ResultTemplate as InsightResultTemplate, - ResultTemplateCondition as InsightResultTemplateCondition, - ResultTemplatesManager as InsightResultTemplatesManager, - buildResultTemplatesManager as insightBuildResultTemplatesManager, - SearchBox as InsightSearchBox, - SearchBoxState as InsightSearchBoxState, - buildSearchBox as buildInsightSearchBox, - SearchStatus as InsightSearchStatus, - SearchStatusState as InsightSearchStatusState, - buildSearchStatus as buildInsightSearchStatus, - Facet as InsightFacet, - FacetState as InsightFacetState, - FacetSearchState as InsightFacetSearchState, - buildFacet as buildInsightFacet, - FacetOptions as InsightFacetOptions, - FacetValue as InsightFacetValue, - NumericRangeRequest as InsightNumericRangeRequest, - NumericFacet as InsightNumericFacet, - DateFacet as InsightDateFacet, - NumericFacetValue as InsightNumericFacetValue, - NumericFacetState as InsightNumericFacetState, - NumericFilter as InsightNumericFilter, - NumericFilterState as InsightNumericFilterState, - DateFacetValue as InsightDateFacetValue, - QuerySummary as InsightQuerySummary, - QuerySummaryState as InsightQuerySummaryState, - buildQuerySummary as buildInsightQuerySummary, - DateFacetState as InsightDateFacetState, - DateFilter as InsightDateFilter, - DateFilterState as InsightDateFilterState, - DateFacetOptions as InsightDateFacetOptions, - DateRangeOptions as InsightDateRangeOptions, - DateRangeRequest as InsightDateRangeRequest, - RelativeDate as InsightRelativeDate, - deserializeRelativeDate as deserializeInsightRelativeDate, - buildDateRange as buildInsightDateRange, - buildDateFacet as buildInsightDateFacet, - buildDateFilter as buildInsightDateFilter, - loadDateFacetSetActions as loadInsightDateFacetSetActions, - FacetSortCriterion as InsightFacetSortCriterion, - FacetValueRequest as InsightFacetValueRequest, - CategoryFacetValueRequest as InsightCategoryFacetValueRequest, - FacetConditionsManager as InsightFacetConditionsManager, - FacetConditionsManagerProps as InsightFacetConditionsManagerProps, - RangeFacetSortCriterion as InsightRangeFacetSortCriterion, - RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, - buildNumericFacet as buildInsightNumericFacet, - buildNumericFilter as buildInsightNumericFilter, - buildNumericRange as buildInsightNumericRange, - loadNumericFacetSetActions as loadInsightNumericFacetSetActions, - AnyFacetValuesCondition as InsightAnyFacetValuesCondition, - buildFacetConditionsManager as buildInsightFacetConditionsManager, - FacetManager as InsightFacetManager, - buildFacetManager as buildInsightFacetManager, - Tab as InsightTab, - TabState as InsightTabState, - buildTab as buildInsightTab, - BreadcrumbManagerState as InsightBreadcrumbManagerState, - BreadcrumbManager as InsightBreadcrumbManager, - buildBreadcrumbManager as buildInsightBreadcrumbManager, - Pager as InsightPager, - PagerState as InsightPagerState, - buildPager as buildInsightPager, - buildResultsPerPage as buildInsightResultsPerPage, - ResultsPerPageState as InsightResultsPerPageState, - ResultsPerPage as InsightResultsPerPage, - ResultTemplatesHelpers as InsightResultTemplatesHelpers, - buildInteractiveResult as buildInsightInteractiveResult, - InteractiveResult as InsightInteractiveResult, - loadQuerySetActions as loadInsightQuerySetActions, - PlatformEnvironment as PlatformEnvironmentInsight, - SmartSnippetState as InsightSmartSnippetState, - SmartSnippet as InsightSmartSnippet, - buildSmartSnippet as buildInsightSmartSnippet, - SmartSnippetFeedback as InsightSmartSnippetFeedback, - buildSmartSnippetQuestionsList as buildInsightSmartSnippetQuestionsList, - SmartSnippetQuestionsList as InsightSmartSnippetQuestionsList, - SmartSnippetQuestionsListState as InsightSmartSnippetQuestionsListState, - SmartSnippetRelatedQuestion as InsightSmartSnippetRelatedQuestion, - buildFoldedResultList as buildInsightFoldedResultList, - FoldedResultListOptions as InsightFoldedResultListOptions, - FoldedResult as InsightFoldedResult, - FoldedResultList as InsightFoldedResultList, - FoldedResultListState as InsightFoldedResultListState, - FoldedCollection as InsightFoldedCollection, - buildGeneratedAnswer as buildInsightGeneratedAnswer, - buildInteractiveCitation as buildInsightInteractiveCitation, - GeneratedAnswer as InsightGeneratedAnswer, - GeneratedAnswerState as InsightGeneratedAnswerState, - Suggestion as InsightSuggestion, - UserActionsState as InsightUserActionsState, - UserActionsProps as InsightUserActionsProps, - UserActions as InsightUserActions, - UserSession as InsightUserSession, - UserAction as InsightUserAction, - buildUserActions as buildInsightUserActions, - Quickview as InsightQuickview, - QuickviewState as InsightQuickviewState, -} from '@coveo/headless/insight'; +// Export the class of the components migrated to Lit here, like this: +//export {AtomicInsightFacet} from './atomic-insight-facet/atomic-insight-facet.js'; + +// TODO: Remove this line once at least one component is migrated to Lit. +export {}; diff --git a/packages/atomic/src/components/insight/lazy-index.ts b/packages/atomic/src/components/insight/lazy-index.ts new file mode 100644 index 00000000000..29bae6104f7 --- /dev/null +++ b/packages/atomic/src/components/insight/lazy-index.ts @@ -0,0 +1,6 @@ +export default { + // Add entries as such when new components are added/moved to Lit. + // 'atomic-insight-facet': async () => await import('./atomic-insight-facet/atomic-insight-facet.js'), +} as Record Promise>; + +export type * from './index.js'; diff --git a/packages/atomic/src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.tsx b/packages/atomic/src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.tsx index 1c4d90a7aef..0597d69a379 100644 --- a/packages/atomic/src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.tsx +++ b/packages/atomic/src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.tsx @@ -1,3 +1,13 @@ +import { + ResultsPerPageState as InsightResultsPerPageState, + ResultsPerPage as InsightResultsPerPage, + buildFoldedResultList as buildInsightFoldedResultList, + FoldedResultList as InsightFoldedResultList, + FoldedResultListState as InsightFoldedResultListState, + buildResultsPerPage as buildInsightResultsPerPage, + FoldedCollection as InsightFoldedCollection, + buildInteractiveResult as buildInsightInteractiveResult, +} from '@coveo/headless/insight'; import { Component, Element, @@ -7,16 +17,6 @@ import { Method, h, } from '@stencil/core'; -import { - InsightResultsPerPageState, - InsightResultsPerPage, - buildInsightFoldedResultList, - InsightFoldedResultList, - InsightFoldedResultListState, - buildInsightResultsPerPage, - InsightFoldedCollection, - buildInsightInteractiveResult, -} from '../..'; import {FocusTargetController} from '../../../../utils/accessibility-utils'; import { BindStateToController, diff --git a/packages/atomic/src/components/insight/result-lists/atomic-insight-result-list/atomic-insight-result-list.tsx b/packages/atomic/src/components/insight/result-lists/atomic-insight-result-list/atomic-insight-result-list.tsx index 342455b789c..09822982938 100644 --- a/packages/atomic/src/components/insight/result-lists/atomic-insight-result-list/atomic-insight-result-list.tsx +++ b/packages/atomic/src/components/insight/result-lists/atomic-insight-result-list/atomic-insight-result-list.tsx @@ -1,14 +1,14 @@ -import {Component, h, Element, State, Prop, Method} from '@stencil/core'; import { - InsightResultList, - InsightResultListState, - buildInsightResultList, - InsightResult, - buildInsightInteractiveResult, - buildInsightResultsPerPage, - InsightResultsPerPage, - InsightResultsPerPageState, -} from '../..'; + ResultList as InsightResultList, + ResultListState as InsightResultListState, + buildResultList as buildInsightResultList, + Result as InsightResult, + buildInteractiveResult as buildInsightInteractiveResult, + buildResultsPerPage as buildInsightResultsPerPage, + ResultsPerPage as InsightResultsPerPage, + ResultsPerPageState as InsightResultsPerPageState, +} from '@coveo/headless/insight'; +import {Component, h, Element, State, Prop, Method} from '@stencil/core'; import {FocusTargetController} from '../../../../utils/accessibility-utils'; import { BindStateToController, diff --git a/packages/atomic/src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.tsx b/packages/atomic/src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.tsx index 607ddc67059..9ede0a2fa50 100644 --- a/packages/atomic/src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.tsx +++ b/packages/atomic/src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.tsx @@ -1,10 +1,10 @@ -import {Component, Element, State, h, Listen, Prop} from '@stencil/core'; import { - buildInsightInteractiveResult, - InsightFoldedResultListState, - InsightFoldedResult, - InsightFoldedResultList, -} from '../..'; + buildInteractiveResult as buildInsightInteractiveResult, + FoldedResultListState as InsightFoldedResultListState, + FoldedResult as InsightFoldedResult, + FoldedResultList as InsightFoldedResultList, +} from '@coveo/headless/insight'; +import {Component, Element, State, h, Listen, Prop} from '@stencil/core'; import {buildCustomEvent} from '../../../../utils/event-utils'; import { InitializableComponent, diff --git a/packages/atomic/src/components/insight/result-templates/atomic-insight-result-template/atomic-insight-result-template.tsx b/packages/atomic/src/components/insight/result-templates/atomic-insight-result-template/atomic-insight-result-template.tsx index f416d666417..bb89d1a8e80 100644 --- a/packages/atomic/src/components/insight/result-templates/atomic-insight-result-template/atomic-insight-result-template.tsx +++ b/packages/atomic/src/components/insight/result-templates/atomic-insight-result-template/atomic-insight-result-template.tsx @@ -1,5 +1,8 @@ +import { + ResultTemplate as InsightResultTemplate, + ResultTemplateCondition as InsightResultTemplateCondition, +} from '@coveo/headless/insight'; import {Component, Element, Prop, Method, State} from '@stencil/core'; -import {InsightResultTemplate, InsightResultTemplateCondition} from '../..'; import {MapProp} from '../../../../utils/props-utils'; import { makeDefinedConditions, diff --git a/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-feedback-modal/atomic-insight-smart-snippet-feedback-modal.tsx b/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-feedback-modal/atomic-insight-smart-snippet-feedback-modal.tsx index 24a35bc7b62..c82102e9c01 100644 --- a/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-feedback-modal/atomic-insight-smart-snippet-feedback-modal.tsx +++ b/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-feedback-modal/atomic-insight-smart-snippet-feedback-modal.tsx @@ -1,3 +1,8 @@ +import { + buildSmartSnippet as buildInsightSmartSnippet, + SmartSnippet as InsightSmartSnippet, + SmartSnippetFeedback as InsightSmartSnippetFeedback, +} from '@coveo/headless/insight'; import { Component, State, @@ -7,11 +12,6 @@ import { Event, EventEmitter, } from '@stencil/core'; -import { - buildInsightSmartSnippet, - InsightSmartSnippet, - InsightSmartSnippetFeedback, -} from '../..'; import { InitializableComponent, InitializeBindings, diff --git a/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tsx b/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tsx index 79f408132f4..c8fec67e6f3 100644 --- a/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tsx +++ b/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet-suggestions/atomic-insight-smart-snippet-suggestions.tsx @@ -1,10 +1,10 @@ -import {Component, Prop, State, Element} from '@stencil/core'; import { - buildInsightSmartSnippetQuestionsList, - InsightSmartSnippetQuestionsList, - InsightSmartSnippetQuestionsListState, - InsightSmartSnippetRelatedQuestion, -} from '../..'; + buildSmartSnippetQuestionsList as buildInsightSmartSnippetQuestionsList, + SmartSnippetQuestionsList as InsightSmartSnippetQuestionsList, + SmartSnippetQuestionsListState as InsightSmartSnippetQuestionsListState, + SmartSnippetRelatedQuestion as InsightSmartSnippetRelatedQuestion, +} from '@coveo/headless/insight'; +import {Component, Prop, State, Element} from '@stencil/core'; import { InitializableComponent, InitializeBindings, diff --git a/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tsx b/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tsx index 46ac1ac7008..54d2520bdad 100644 --- a/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tsx +++ b/packages/atomic/src/components/insight/smart-snippets/atomic-insight-smart-snippet/atomic-insight-smart-snippet.tsx @@ -1,9 +1,9 @@ -import {Component, Prop, State, Element} from '@stencil/core'; import { - buildInsightSmartSnippet, - InsightSmartSnippet, - InsightSmartSnippetState, -} from '../..'; + buildSmartSnippet as buildInsightSmartSnippet, + SmartSnippet as InsightSmartSnippet, + SmartSnippetState as InsightSmartSnippetState, +} from '@coveo/headless/insight'; +import {Component, Prop, State, Element} from '@stencil/core'; import { InitializableComponent, InitializeBindings, diff --git a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/atomic-insight-user-actions-session.tsx b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/atomic-insight-user-actions-session.tsx index e25c26df612..79663e3fdc2 100644 --- a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/atomic-insight-user-actions-session.tsx +++ b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/atomic-insight-user-actions-session.tsx @@ -1,5 +1,5 @@ +import {UserAction as IUserAction} from '@coveo/headless/insight'; import {Component, h, Prop, Watch, State} from '@stencil/core'; -import {InsightUserAction as IUserAction} from '../..'; import Flag from '../../../../images/flag.svg'; import ThreeDotsIcon from '../../../../images/three-dots.svg'; import {parseTimestampToDateDetails} from '../../../../utils/date-utils'; diff --git a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/user-action.tsx b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/user-action.tsx index 9e090f39e8a..e074b681e42 100644 --- a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/user-action.tsx +++ b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-session/user-action.tsx @@ -1,5 +1,5 @@ +import {UserAction as IUserAction} from '@coveo/headless/insight'; import {FunctionalComponent, h} from '@stencil/core'; -import {InsightUserAction as IUserAction} from '../..'; import BookmarkIcon from '../../../../images/bookmark.svg'; import DocumentIcon from '../../../../images/document.svg'; import PointIcon from '../../../../images/point.svg'; diff --git a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.tsx b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.tsx index 1136461670a..4019c701b46 100644 --- a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.tsx +++ b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-timeline/atomic-insight-user-actions-timeline.tsx @@ -1,10 +1,10 @@ -import {Component, h, State, Prop} from '@stencil/core'; import { - buildInsightUserActions, - InsightUserActions, - InsightUserActionsState, - InsightUserSession, -} from '../..'; + buildUserActions as buildInsightUserActions, + UserActions as InsightUserActions, + UserActionsState as InsightUserActionsState, + UserSession as InsightUserSession, +} from '@coveo/headless/insight'; +import {Component, h, State, Prop} from '@stencil/core'; import ArrowDownIcon from '../../../../images/big-arrow-down.svg'; import ArrowUpIcon from '../../../../images/big-arrow-up.svg'; import { diff --git a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.tsx b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.tsx index 178b2402d91..054dfdc942e 100644 --- a/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.tsx +++ b/packages/atomic/src/components/insight/user-actions/atomic-insight-user-actions-toggle/atomic-insight-user-actions-toggle.tsx @@ -1,9 +1,9 @@ -import {Component, h, Prop, Element, State} from '@stencil/core'; import { - buildInsightUserActions, - InsightUserActions, - InsightUserActionsState, -} from '../..'; + buildUserActions as buildInsightUserActions, + UserActions as InsightUserActions, + UserActionsState as InsightUserActionsState, +} from '@coveo/headless/insight'; +import {Component, h, Prop, Element, State} from '@stencil/core'; import Clockicon from '../../../../images/clock.svg'; import { BindStateToController, diff --git a/packages/atomic/src/components/ipx/atomic-ipx-recs-list/atomic-recs-list/atomic-ipx-recs-list.tsx b/packages/atomic/src/components/ipx/atomic-ipx-recs-list/atomic-recs-list/atomic-ipx-recs-list.tsx index d0cc7661fcb..b7761594861 100644 --- a/packages/atomic/src/components/ipx/atomic-ipx-recs-list/atomic-recs-list/atomic-ipx-recs-list.tsx +++ b/packages/atomic/src/components/ipx/atomic-ipx-recs-list/atomic-recs-list/atomic-ipx-recs-list.tsx @@ -8,6 +8,8 @@ import { RecommendationList, RecommendationListState, loadConfigurationActions, + Result as RecsResult, + buildInteractiveResult as buildRecsInteractiveResult, } from '@coveo/headless/recommendation'; import { Component, @@ -42,7 +44,6 @@ import {ItemDisplayGuard} from '../../../common/item-list/item-display-guard'; import {ItemListCommon} from '../../../common/item-list/item-list-common'; import {ItemTemplateProvider} from '../../../common/item-list/item-template-provider'; import {getItemListDisplayClasses} from '../../../common/layout/display-options'; -import {RecsResult, buildRecsInteractiveResult} from '../../../recommendations'; import {RecsBindings} from '../../../recommendations/atomic-recs-interface/atomic-recs-interface'; /** diff --git a/packages/atomic/src/components/ipx/index.ts b/packages/atomic/src/components/ipx/index.ts new file mode 100644 index 00000000000..946dd1f6785 --- /dev/null +++ b/packages/atomic/src/components/ipx/index.ts @@ -0,0 +1,5 @@ +// Export the class of the components migrated to Lit here, like this: +//export {AtomicIPXBody} from './atomic-ipx-body/atomic-ipx-body.js'; + +// TODO: Remove this line once at least one component is migrated to Lit. +export {}; diff --git a/packages/atomic/src/components/ipx/lazy-index.ts b/packages/atomic/src/components/ipx/lazy-index.ts new file mode 100644 index 00000000000..22c513b94be --- /dev/null +++ b/packages/atomic/src/components/ipx/lazy-index.ts @@ -0,0 +1,6 @@ +export default { + // Add entries as such when new components are added/moved to Lit. + // 'atomic-ipx-body': async () => await import('./atomic-ipx-body/atomic-ipx-body.js'), +} as Record Promise>; + +export type * from './index.js'; diff --git a/packages/atomic/src/components/lazy-index.ts b/packages/atomic/src/components/lazy-index.ts index 04883185c08..1c263eaba44 100644 --- a/packages/atomic/src/components/lazy-index.ts +++ b/packages/atomic/src/components/lazy-index.ts @@ -1,5 +1,15 @@ +import CommerceComponentMap from './commerce/lazy-index.js'; +import InsightComponentMap from './insight/lazy-index.js'; +import IpxComponentMap from './ipx/lazy-index.js'; +import RecommendationsComponentMap from './recommendations/lazy-index.js'; import SearchComponentMap from './search/lazy-index.js'; -export default {...SearchComponentMap}; +export default { + ...RecommendationsComponentMap, + ...IpxComponentMap, + ...InsightComponentMap, + ...CommerceComponentMap, + ...SearchComponentMap, +}; export type * from './index.js'; diff --git a/packages/atomic/src/components/recommendations/atomic-recs-interface/atomic-recs-interface.tsx b/packages/atomic/src/components/recommendations/atomic-recs-interface/atomic-recs-interface.tsx index 91b8da68a12..168525bc96b 100644 --- a/packages/atomic/src/components/recommendations/atomic-recs-interface/atomic-recs-interface.tsx +++ b/packages/atomic/src/components/recommendations/atomic-recs-interface/atomic-recs-interface.tsx @@ -6,6 +6,7 @@ import { buildRecommendationEngine, loadRecommendationActions, loadSearchConfigurationActions, + LogLevel as RecsLogLevel, } from '@coveo/headless/recommendation'; import { Component, @@ -19,7 +20,6 @@ import { setNonce, } from '@stencil/core'; import i18next, {i18n} from 'i18next'; -import {RecsLogLevel} from '..'; import {InitializeEvent} from '../../../utils/initialization-utils'; import {ArrayProp} from '../../../utils/props-utils'; import {CommonBindings} from '../../common/interface/bindings'; diff --git a/packages/atomic/src/components/recommendations/atomic-recs-list/atomic-recs-list.tsx b/packages/atomic/src/components/recommendations/atomic-recs-list/atomic-recs-list.tsx index 5c66e126e73..e2f93044e22 100644 --- a/packages/atomic/src/components/recommendations/atomic-recs-list/atomic-recs-list.tsx +++ b/packages/atomic/src/components/recommendations/atomic-recs-list/atomic-recs-list.tsx @@ -4,6 +4,8 @@ import { RecommendationList, RecommendationListState, loadConfigurationActions, + buildInteractiveResult as buildRecsInteractiveResult, + Result as RecsResult, } from '@coveo/headless/recommendation'; import { Component, @@ -15,7 +17,6 @@ import { Fragment, Watch, } from '@stencil/core'; -import {buildRecsInteractiveResult, RecsResult} from '..'; import {FocusTargetController} from '../../../utils/accessibility-utils'; import { BindStateToController, diff --git a/packages/atomic/src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.tsx b/packages/atomic/src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.tsx index 41b56daff5b..2b35ec1676b 100644 --- a/packages/atomic/src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.tsx +++ b/packages/atomic/src/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.tsx @@ -1,5 +1,8 @@ +import { + ResultTemplateCondition as RecsResultTemplateCondition, + ResultTemplate as RecsResultTemplate, +} from '@coveo/headless/recommendation'; import {Component, Element, Prop, Method, State} from '@stencil/core'; -import {RecsResultTemplateCondition, RecsResultTemplate} from '..'; import {MapProp} from '../../../utils/props-utils'; import { makeDefinedConditions, diff --git a/packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.tsx b/packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.tsx index 249dc1732a1..333d0475403 100644 --- a/packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.tsx +++ b/packages/atomic/src/components/recommendations/atomic-recs-result/atomic-recs-result.tsx @@ -1,5 +1,8 @@ +import { + InteractiveResult as RecsInteractiveResult, + Result as RecsResult, +} from '@coveo/headless/recommendation'; import {Component, h, Prop, Element, Listen, Host} from '@stencil/core'; -import {RecsInteractiveResult, RecsResult} from '..'; import {parentNodeToString} from '../../../utils/dom-utils'; import {applyFocusVisiblePolyfill} from '../../../utils/initialization-utils'; import { diff --git a/packages/atomic/src/components/recommendations/index.ts b/packages/atomic/src/components/recommendations/index.ts index 40d8ef37375..c26d3484a88 100644 --- a/packages/atomic/src/components/recommendations/index.ts +++ b/packages/atomic/src/components/recommendations/index.ts @@ -1,10 +1,5 @@ -export { - RecommendationEngineConfiguration, - Result as RecsResult, - InteractiveResult as RecsInteractiveResult, - buildInteractiveResult as buildRecsInteractiveResult, - ResultTemplateCondition as RecsResultTemplateCondition, - ResultTemplate as RecsResultTemplate, - ResultTemplatesHelpers as RecsResultTemplatesHelpers, - LogLevel as RecsLogLevel, -} from '@coveo/headless/recommendation'; +// Export the class of the components migrated to Lit here, like this: +//export {AtomicRecsError} from './atomic-recs-error/atomic-recs-error.js'; + +// TODO: Remove this line once at least one component is migrated to Lit. +export {}; diff --git a/packages/atomic/src/components/recommendations/lazy-index.ts b/packages/atomic/src/components/recommendations/lazy-index.ts new file mode 100644 index 00000000000..a605114aeff --- /dev/null +++ b/packages/atomic/src/components/recommendations/lazy-index.ts @@ -0,0 +1,6 @@ +export default { + // Add entries as such when new components are added/moved to Lit. + // 'atomic-recs-error': async () => await import('./atomic-recs-error/atomic-recs-error.js'), +} as Record Promise>; + +export type * from './index.js'; diff --git a/packages/atomic/stencil-proxy/cjs/loader.cjs.js b/packages/atomic/stencil-proxy/cjs/loader.cjs.js index 52a475e8647..7dfb1c3cb20 100644 --- a/packages/atomic/stencil-proxy/cjs/loader.cjs.js +++ b/packages/atomic/stencil-proxy/cjs/loader.cjs.js @@ -2,10 +2,30 @@ const exportModule = require('./_loader.cjs.js'); const searchComponents = import( '../atomic/components/components/search/lazy-index.js' ); +const commerceComponents = import( + '../atomic/components/components/commerce/lazy-index.js' +); +const insightComponents = import( + '../atomic/components/components/insight/lazy-index.js' +); +const ipxComponents = import( + '../atomic/components/components/ipx/lazy-index.js' +); +const recommendationsComponents = import( + '../atomic/components/components/recommendations/lazy-index.js' +); + +const allComponents = Promise.all([ + searchComponents, + commerceComponents, + insightComponents, + ipxComponents, + recommendationsComponents, +]); const originalDefineCustomElements = exportModule.defineCustomElements; exportModule.defineCustomElements = function (...args) { - searchComponents.then((module) => + allComponents.then((module) => Object.values(module).forEach((importFunction) => importFunction()) ); originalDefineCustomElements(...args); diff --git a/packages/atomic/stencil-proxy/esm/index.js b/packages/atomic/stencil-proxy/esm/index.js index 44a5dc8abbb..9f7b5b5eb84 100644 --- a/packages/atomic/stencil-proxy/esm/index.js +++ b/packages/atomic/stencil-proxy/esm/index.js @@ -2,3 +2,7 @@ import '../atomic/autoloader/index.esm.js'; export * from './_index.js'; export * as SearchComponentMap from '../atomic/components/components/search/lazy-index.js'; +export * as CommerceComponentMap from '../atomic/components/components/commerce/lazy-index.js'; +export * as InsightComponentMap from '../atomic/components/components/insight/lazy-index.js'; +export * as IpxComponentMap from '../atomic/components/components/ipx/lazy-index.js'; +export * as RecommendationsComponentMap from '../atomic/components/components/recommendations/lazy-index.js'; diff --git a/packages/atomic/stencil-proxy/esm/loader.js b/packages/atomic/stencil-proxy/esm/loader.js index 5bdd475b776..da75bec021d 100644 --- a/packages/atomic/stencil-proxy/esm/loader.js +++ b/packages/atomic/stencil-proxy/esm/loader.js @@ -1,8 +1,18 @@ +import commerceComponents from '../atomic/components/components/commerce/lazy-index.js'; +import insightComponents from '../atomic/components/components/insight/lazy-index.js'; +import ipxComponents from '../atomic/components/components/ipx/lazy-index.js'; +import recommendationsComponents from '../atomic/components/components/recommendations/lazy-index.js'; import searchComponents from '../atomic/components/components/search/lazy-index.js'; import {defineCustomElements as originalDefineCustomElements} from './_loader.js'; const defineCustomElements = function (...args) { - Object.values(searchComponents).forEach((importFunction) => importFunction()); + Object.values({ + ...recommendationsComponents, + ...ipxComponents, + ...insightComponents, + ...commerceComponents, + ...searchComponents, + }).forEach((importFunction) => importFunction()); originalDefineCustomElements(...args); }; From e986e85ac919177159198db5f3402a7d4204e1bc Mon Sep 17 00:00:00 2001 From: "developer-experience-bot[bot]" <91079284+developer-experience-bot[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:05:51 +0000 Subject: [PATCH 03/21] [Version Bump][skip ci]: ui-kit publish @coveo/headless@3.15.0 @coveo/atomic@3.18.0 @coveo/headless-react@2.4.5 @coveo/atomic-react@3.2.17 @coveo/atomic-angular@3.3.7 @coveo/auth@2.0.7 @coveo/atomic-hosted-page@1.1.0 @coveo/quantic@3.14.0 **/CHANGELOG.md **/package.json CHANGELOG.md package.json package-lock.json --- package-lock.json | 84 +++++++++---------- package.json | 2 +- packages/atomic-angular/package.json | 6 +- .../projects/atomic-angular/package.json | 6 +- packages/atomic-hosted-page/CHANGELOG.md | 9 ++ packages/atomic-hosted-page/package.json | 4 +- packages/atomic-react/CHANGELOG.md | 6 ++ packages/atomic-react/package.json | 6 +- packages/atomic/CHANGELOG.md | 20 +++++ packages/atomic/package.json | 6 +- packages/auth/CHANGELOG.md | 4 + packages/auth/package.json | 2 +- packages/headless-react/package.json | 4 +- packages/headless/CHANGELOG.md | 11 +++ packages/headless/package.json | 2 +- packages/quantic/CHANGELOG.md | 10 +++ packages/quantic/package.json | 4 +- packages/samples/angular/package.json | 2 +- packages/samples/atomic-next/package.json | 6 +- packages/samples/atomic-react/package.json | 4 +- .../headless-commerce-react/package.json | 2 +- .../headless-commerce-ssr-remix/package.json | 2 +- packages/samples/headless-react/package.json | 4 +- .../headless-ssr-commerce/package.json | 2 +- packages/samples/headless-ssr/package.json | 4 +- packages/samples/iife/package.json | 8 +- packages/samples/stencil/package.json | 4 +- packages/samples/vuejs/package.json | 2 +- 28 files changed, 143 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index c2228be73a1..e81ac8d957f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ui-kit", - "version": "3.0.13", + "version": "3.0.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ui-kit", - "version": "3.0.13", + "version": "3.0.14", "hasInstallScript": true, "workspaces": [ "packages/bueno", @@ -60844,11 +60844,11 @@ }, "packages/atomic": { "name": "@coveo/atomic", - "version": "3.17.0", + "version": "3.18.0", "license": "Apache-2.0", "dependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "@popperjs/core": "2.11.8", "@salesforce-ux/design-system": "2.25.6", "dayjs": "1.11.13", @@ -60940,7 +60940,7 @@ }, "peerDependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" } }, "packages/atomic-angular": { @@ -60955,14 +60955,14 @@ "@angular/platform-browser": "18.2.13", "@angular/platform-browser-dynamic": "18.2.13", "@angular/router": "18.2.13", - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "rxjs": "7.8.1" }, "devDependencies": { "@angular-devkit/build-angular": "18.2.12", "@angular/cli": "18.2.12", "@angular/compiler-cli": "18.2.13", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "@types/node": "22.12.0", "ng-packagr": "18.2.1", "typescript": "5.5.4" @@ -60971,15 +60971,15 @@ "node": "^20.9.0 || ^22.11.0" }, "peerDependencies": { - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" } }, "packages/atomic-angular/projects/atomic-angular": { "name": "@coveo/atomic-angular", - "version": "3.3.6", + "version": "3.3.7", "license": "Apache-2.0", "dependencies": { - "@coveo/atomic": "3.17.0" + "@coveo/atomic": "3.18.0" }, "engines": { "node": "^20.9.0 || ^22.11.0" @@ -60987,16 +60987,16 @@ "peerDependencies": { "@angular/common": "14 - 18", "@angular/core": "14 - 18", - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" } }, "packages/atomic-hosted-page": { "name": "@coveo/atomic-hosted-page", - "version": "1.0.21", + "version": "1.1.0", "license": "Apache-2.0", "dependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "lit": "3.2.1" }, "devDependencies": { @@ -61318,9 +61318,9 @@ }, "packages/atomic-react": { "name": "@coveo/atomic-react", - "version": "3.2.16", + "version": "3.2.17", "dependencies": { - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "@lit/react": "1.0.6", "lit": "3.2.1" }, @@ -61341,7 +61341,7 @@ "node": "^20.9.0 || ^22.11.0" }, "peerDependencies": { - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "react": ">=18.0.0", "react-dom": ">=18.0.0" } @@ -62240,7 +62240,7 @@ }, "packages/auth": { "name": "@coveo/auth", - "version": "2.0.6", + "version": "2.0.7", "license": "Apache-2.0", "devDependencies": { "@coveo/release": "1.0.0", @@ -62268,7 +62268,7 @@ }, "packages/headless": { "name": "@coveo/headless", - "version": "3.14.0", + "version": "3.15.0", "license": "Apache-2.0", "dependencies": { "@coveo/bueno": "1.0.7", @@ -62310,10 +62310,10 @@ }, "packages/headless-react": { "name": "@coveo/headless-react", - "version": "2.4.4", + "version": "2.4.5", "license": "Apache-2.0", "dependencies": { - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" }, "devDependencies": { "@coveo/release": "1.0.0", @@ -62353,12 +62353,12 @@ }, "packages/quantic": { "name": "@coveo/quantic", - "version": "3.13.1", + "version": "3.14.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "dompurify": "3.2.3", "fs-extra": "11.3.0", "marked": "12.0.2" @@ -62601,7 +62601,7 @@ "@angular/platform-browser": "18.2.13", "@angular/platform-browser-dynamic": "18.2.13", "@angular/router": "18.2.13", - "@coveo/atomic-angular": "3.3.6", + "@coveo/atomic-angular": "3.3.7", "rxjs": "7.8.1", "zone.js": "0.15.0" }, @@ -62626,9 +62626,9 @@ "name": "@coveo/atomic-next-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.17.0", - "@coveo/atomic-react": "3.2.16", - "@coveo/headless": "3.14.0", + "@coveo/atomic": "3.18.0", + "@coveo/atomic-react": "3.2.17", + "@coveo/headless": "3.15.0", "next": "14.2.20", "react": "18.3.1", "react-dom": "18.3.1" @@ -62647,8 +62647,8 @@ "name": "@coveo/atomic-react-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic-react": "3.2.16", - "@coveo/headless": "3.14.0", + "@coveo/atomic-react": "3.2.17", + "@coveo/headless": "3.15.0", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -62666,7 +62666,7 @@ "name": "@coveo/headless-commerce-react-samples", "version": "0.1.0", "dependencies": { - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -62732,7 +62732,7 @@ "packages/samples/headless-commerce-ssr-remix": { "name": "@coveo/headless-commerce-ssr-remix-samples", "dependencies": { - "@coveo/headless-react": "2.4.4", + "@coveo/headless-react": "2.4.5", "@remix-run/node": "2.15.2", "@remix-run/react": "2.15.2", "@remix-run/serve": "2.15.2", @@ -62753,8 +62753,8 @@ "name": "@coveo/headless-react-samples", "version": "0.0.0", "dependencies": { - "@coveo/auth": "2.0.6", - "@coveo/headless": "3.14.0", + "@coveo/auth": "2.0.7", + "@coveo/headless": "3.15.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "14.3.1", "@testing-library/user-event": "14.6.1", @@ -63142,8 +63142,8 @@ "name": "@coveo/headless-ssr-samples-common", "version": "0.0.0", "dependencies": { - "@coveo/headless": "3.14.0", - "@coveo/headless-react": "2.4.4", + "@coveo/headless": "3.15.0", + "@coveo/headless-react": "2.4.5", "next": "14.2.20", "react": "18.3.1", "react-dom": "18.3.1" @@ -63164,7 +63164,7 @@ "name": "@coveo/headless-ssr-commerce-samples", "version": "0.0.0", "dependencies": { - "@coveo/headless-react": "2.4.4", + "@coveo/headless-react": "2.4.5", "next": "14.2.20", "react": "18.3.1", "react-dom": "18.3.1" @@ -63217,10 +63217,10 @@ "version": "0.1.0", "dependencies": { "@babel/standalone": "7.26.7", - "@coveo/atomic": "3.17.0", - "@coveo/atomic-hosted-page": "1.0.21", - "@coveo/atomic-react": "3.2.16", - "@coveo/headless": "3.14.0", + "@coveo/atomic": "3.18.0", + "@coveo/atomic-hosted-page": "1.1.0", + "@coveo/atomic-react": "3.2.17", + "@coveo/headless": "3.15.0", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -63237,9 +63237,9 @@ "name": "@coveo/atomic-stencil-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "@stencil/core": "4.20.0", "stencil-router-v2": "0.6.0" }, @@ -63255,7 +63255,7 @@ "name": "@coveo/atomic-vuejs-samples", "version": "0.0.0", "dependencies": { - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "vue": "3.5.13" }, "devDependencies": { diff --git a/package.json b/package.json index c04d2911174..e436c9b888a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ui-kit", "private": true, - "version": "3.0.13", + "version": "3.0.14", "scripts": { "postinstall": "husky install && patch-package && npx playwright install", "reset:install": "git checkout origin/master package-lock.json && npm i", diff --git a/packages/atomic-angular/package.json b/packages/atomic-angular/package.json index dc405c7713d..bf3b8b1b181 100644 --- a/packages/atomic-angular/package.json +++ b/packages/atomic-angular/package.json @@ -20,17 +20,17 @@ "@angular/platform-browser": "18.2.13", "@angular/platform-browser-dynamic": "18.2.13", "@angular/router": "18.2.13", - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "rxjs": "7.8.1" }, "peerDependencies": { - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "18.2.12", "@angular/cli": "18.2.12", "@angular/compiler-cli": "18.2.13", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "@types/node": "22.12.0", "ng-packagr": "18.2.1", "typescript": "5.5.4" diff --git a/packages/atomic-angular/projects/atomic-angular/package.json b/packages/atomic-angular/projects/atomic-angular/package.json index 259ce2caa5a..d006df37392 100644 --- a/packages/atomic-angular/projects/atomic-angular/package.json +++ b/packages/atomic-angular/projects/atomic-angular/package.json @@ -1,6 +1,6 @@ { "name": "@coveo/atomic-angular", - "version": "3.3.6", + "version": "3.3.7", "license": "Apache-2.0", "repository": { "url": "https://github.com/coveo/ui-kit" @@ -8,10 +8,10 @@ "peerDependencies": { "@angular/common": "14 - 18", "@angular/core": "14 - 18", - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" }, "dependencies": { - "@coveo/atomic": "3.17.0" + "@coveo/atomic": "3.18.0" }, "engines": { "node": "^20.9.0 || ^22.11.0" diff --git a/packages/atomic-hosted-page/CHANGELOG.md b/packages/atomic-hosted-page/CHANGELOG.md index 644db343722..3cd0a2917f2 100644 --- a/packages/atomic-hosted-page/CHANGELOG.md +++ b/packages/atomic-hosted-page/CHANGELOG.md @@ -1,3 +1,12 @@ +## 1.1.0 (2025-02-05) + +- fix(deps): update all dependencies j:kit-282 (#4903) ([192cf67](https://github.com/coveo/ui-kit/commits/192cf67)), closes [#4903](https://github.com/coveo/ui-kit/issues/4903) +- fix(deps): update all dependencies j:kit-282 (#4933) ([9016283](https://github.com/coveo/ui-kit/commits/9016283)), closes [#4933](https://github.com/coveo/ui-kit/issues/4933) +- chore(atomic): bundle lit dependencies for CDN build (#4908) ([87681ca](https://github.com/coveo/ui-kit/commits/87681ca)), closes [#4908](https://github.com/coveo/ui-kit/issues/4908) +- chore(deps): update dependency vite to v5.4.14 j:kit-282 (#4902) ([e0b448b](https://github.com/coveo/ui-kit/commits/e0b448b)), closes [#4902](https://github.com/coveo/ui-kit/issues/4902) +- refactor(atomic-hosted-page): refactor common files into atomic-hosted-ui (#4898) ([6c74af7](https://github.com/coveo/ui-kit/commits/6c74af7)), closes [#4898](https://github.com/coveo/ui-kit/issues/4898) +- feat(atomic-hosted-page): migrate from stencil to lit (#4897) ([bf6bed4](https://github.com/coveo/ui-kit/commits/bf6bed4)), closes [#4897](https://github.com/coveo/ui-kit/issues/4897) + ## 1.0.21 (2025-01-29) - fix(atomic-hosted-page): fix cdn import errors by externalizing headless (#4884) ([2364a8d](https://github.com/coveo/ui-kit/commits/2364a8d)), closes [#4884](https://github.com/coveo/ui-kit/issues/4884) diff --git a/packages/atomic-hosted-page/package.json b/packages/atomic-hosted-page/package.json index 6796ead976f..95a990ec15f 100644 --- a/packages/atomic-hosted-page/package.json +++ b/packages/atomic-hosted-page/package.json @@ -1,7 +1,7 @@ { "name": "@coveo/atomic-hosted-page", "description": "Web Component used to inject a Coveo Hosted Search Page in the DOM.", - "version": "1.0.21", + "version": "1.1.0", "repository": { "type": "git", "url": "git+https://github.com/coveo/ui-kit.git", @@ -32,7 +32,7 @@ }, "dependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "lit": "3.2.1" }, "devDependencies": { diff --git a/packages/atomic-react/CHANGELOG.md b/packages/atomic-react/CHANGELOG.md index ecb1ffb28e2..8080acf1823 100644 --- a/packages/atomic-react/CHANGELOG.md +++ b/packages/atomic-react/CHANGELOG.md @@ -1,3 +1,9 @@ +## 3.2.17 (2025-02-05) + +- fix(atomic-react): stop exporting atomicResultChildren and atomicResultChildrenTemplate (#4931) ([c0d2f08](https://github.com/coveo/ui-kit/commits/c0d2f08)), closes [#4931](https://github.com/coveo/ui-kit/issues/4931) +- fix(deps): update all dependencies j:kit-282 (#4903) ([192cf67](https://github.com/coveo/ui-kit/commits/192cf67)), closes [#4903](https://github.com/coveo/ui-kit/issues/4903) +- fix(deps): update all dependencies j:kit-282 (#4933) ([9016283](https://github.com/coveo/ui-kit/commits/9016283)), closes [#4933](https://github.com/coveo/ui-kit/issues/4933) + ## 3.2.16 (2025-01-29) - chore: add tailwind styles support for lit components (#4862) ([6537c36](https://github.com/coveo/ui-kit/commits/6537c36)), closes [#4862](https://github.com/coveo/ui-kit/issues/4862) [/github.com/coveo/ui-kit/pull/4804#issue-2751560151](https://github.com//github.com/coveo/ui-kit/pull/4804/issues/issue-2751560151) [/github.com/coveo/ui-kit/pull/4804#discussion_r1894392106](https://github.com//github.com/coveo/ui-kit/pull/4804/issues/discussion_r1894392106) [#4804](https://github.com/coveo/ui-kit/issues/4804) diff --git a/packages/atomic-react/package.json b/packages/atomic-react/package.json index 16d31245d63..6d13d0cf03c 100644 --- a/packages/atomic-react/package.json +++ b/packages/atomic-react/package.json @@ -2,7 +2,7 @@ "name": "@coveo/atomic-react", "sideEffects": false, "type": "module", - "version": "3.2.16", + "version": "3.2.17", "description": "React specific wrapper for the Atomic component library", "repository": { "type": "git", @@ -30,7 +30,7 @@ "commerce/" ], "dependencies": { - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "@lit/react": "1.0.6", "lit": "3.2.1" }, @@ -48,7 +48,7 @@ "rollup-plugin-polyfill-node": "^0.13.0" }, "peerDependencies": { - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "react": ">=18.0.0", "react-dom": ">=18.0.0" }, diff --git a/packages/atomic/CHANGELOG.md b/packages/atomic/CHANGELOG.md index 356ad0c99fb..287d2e0526e 100644 --- a/packages/atomic/CHANGELOG.md +++ b/packages/atomic/CHANGELOG.md @@ -1,3 +1,23 @@ +## 3.18.0 (2025-02-05) + +- chore: fix failing atomic test due to source change (#4909) ([ac4da32](https://github.com/coveo/ui-kit/commits/ac4da32)), closes [#4909](https://github.com/coveo/ui-kit/issues/4909) +- chore: script to create new setup for atomic component (#4913) ([f872a49](https://github.com/coveo/ui-kit/commits/f872a49)), closes [#4913](https://github.com/coveo/ui-kit/issues/4913) [#4914](https://github.com/coveo/ui-kit/issues/4914) +- chore(atomic): add index & lazy-index file in every use case (#4927) ([cf5ce1d](https://github.com/coveo/ui-kit/commits/cf5ce1d)), closes [#4927](https://github.com/coveo/ui-kit/issues/4927) +- chore(atomic): better dev mode (#4920) ([3ba383c](https://github.com/coveo/ui-kit/commits/3ba383c)), closes [#4920](https://github.com/coveo/ui-kit/issues/4920) +- chore(atomic): bundle lit dependencies for CDN build (#4908) ([87681ca](https://github.com/coveo/ui-kit/commits/87681ca)), closes [#4908](https://github.com/coveo/ui-kit/issues/4908) +- chore(deps): update dependency vite to v5.4.14 j:kit-282 (#4902) ([e0b448b](https://github.com/coveo/ui-kit/commits/e0b448b)), closes [#4902](https://github.com/coveo/ui-kit/issues/4902) +- chore(tests): fix flakiness issue (#4905) ([ab7f0d5](https://github.com/coveo/ui-kit/commits/ab7f0d5)), closes [#4905](https://github.com/coveo/ui-kit/issues/4905) [/github.com/cypress-io/cypress/issues/29085#issuecomment-2040258080](https://github.com//github.com/cypress-io/cypress/issues/29085/issues/issuecomment-2040258080) [/docs.cypress.io/app/references/changelog#13-7-3](https://github.com//docs.cypress.io/app/references/changelog/issues/13-7-3) [/github.com/coveo/ui-kit/pull/4905#discussion_r1933951647](https://github.com//github.com/coveo/ui-kit/pull/4905/issues/discussion_r1933951647) +- test(atomic): add lit checkbox tests (#4899) ([694475f](https://github.com/coveo/ui-kit/commits/694475f)), closes [#4899](https://github.com/coveo/ui-kit/issues/4899) +- test(atomic): add tests to binding decorators (#4911) ([12c4aac](https://github.com/coveo/ui-kit/commits/12c4aac)), closes [#4911](https://github.com/coveo/ui-kit/issues/4911) +- test(atomic): test radio-button render function (#4896) ([7c5ac43](https://github.com/coveo/ui-kit/commits/7c5ac43)), closes [#4896](https://github.com/coveo/ui-kit/issues/4896) +- fix(atomic-react): stop exporting atomicResultChildren and atomicResultChildrenTemplate (#4931) ([c0d2f08](https://github.com/coveo/ui-kit/commits/c0d2f08)), closes [#4931](https://github.com/coveo/ui-kit/issues/4931) +- fix(atomic): hide unhydrated results (#4900) ([5bb6b51](https://github.com/coveo/ui-kit/commits/5bb6b51)), closes [#4900](https://github.com/coveo/ui-kit/issues/4900) +- fix(atomic): reset dependent numeric / date facet input when parent facet is cleared (#4851) ([b30b8a2](https://github.com/coveo/ui-kit/commits/b30b8a2)), closes [#4851](https://github.com/coveo/ui-kit/issues/4851) +- fix(deps): update all dependencies j:kit-282 (#4903) ([192cf67](https://github.com/coveo/ui-kit/commits/192cf67)), closes [#4903](https://github.com/coveo/ui-kit/issues/4903) +- fix(deps): update all dependencies j:kit-282 (#4933) ([9016283](https://github.com/coveo/ui-kit/commits/9016283)), closes [#4933](https://github.com/coveo/ui-kit/issues/4933) +- feat(atomic-hosted-page): migrate from stencil to lit (#4897) ([bf6bed4](https://github.com/coveo/ui-kit/commits/bf6bed4)), closes [#4897](https://github.com/coveo/ui-kit/issues/4897) +- fix(headless+atomic): make recent queries case insensitive + display recent query even if it fully m ([6ceebaa](https://github.com/coveo/ui-kit/commits/6ceebaa)), closes [#4854](https://github.com/coveo/ui-kit/issues/4854) + ## 3.17.0 (2025-01-29) - chore: add tailwind styles support for lit components (#4862) ([6537c36](https://github.com/coveo/ui-kit/commits/6537c36)), closes [#4862](https://github.com/coveo/ui-kit/issues/4862) [/github.com/coveo/ui-kit/pull/4804#issue-2751560151](https://github.com//github.com/coveo/ui-kit/pull/4804/issues/issue-2751560151) [/github.com/coveo/ui-kit/pull/4804#discussion_r1894392106](https://github.com//github.com/coveo/ui-kit/pull/4804/issues/discussion_r1894392106) [#4804](https://github.com/coveo/ui-kit/issues/4804) diff --git a/packages/atomic/package.json b/packages/atomic/package.json index 460b4af6671..04c9d9b28bf 100644 --- a/packages/atomic/package.json +++ b/packages/atomic/package.json @@ -1,7 +1,7 @@ { "name": "@coveo/atomic", "type": "module", - "version": "3.17.0", + "version": "3.18.0", "description": "A web-component library for building modern UIs interfacing with the Coveo platform", "homepage": "https://docs.coveo.com/en/atomic/latest/", "repository": { @@ -71,7 +71,7 @@ }, "dependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "@popperjs/core": "2.11.8", "@salesforce-ux/design-system": "2.25.6", "dayjs": "1.11.13", @@ -160,7 +160,7 @@ }, "peerDependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" }, "license": "Apache-2.0", "engines": { diff --git a/packages/auth/CHANGELOG.md b/packages/auth/CHANGELOG.md index 0df09167321..e905f73a59e 100644 --- a/packages/auth/CHANGELOG.md +++ b/packages/auth/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.7 (2025-02-05) + +- chore(deps): update dependency vite to v5.4.14 j:kit-282 (#4902) ([e0b448b](https://github.com/coveo/ui-kit/commits/e0b448b)), closes [#4902](https://github.com/coveo/ui-kit/issues/4902) + ## 2.0.6 (2025-01-08) - fix(deps): update all dependencies j:kit-282 (#4753) ([8a2cae4](https://github.com/coveo/ui-kit/commits/8a2cae4)), closes [#4753](https://github.com/coveo/ui-kit/issues/4753) diff --git a/packages/auth/package.json b/packages/auth/package.json index 9b863e512fe..cec939cfbff 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@coveo/auth", - "version": "2.0.6", + "version": "2.0.7", "description": "Functions to help authenticate with the Coveo platform.", "main": "./dist/auth.js", "module": "./dist/auth.esm.js", diff --git a/packages/headless-react/package.json b/packages/headless-react/package.json index 89a9d269e42..bc7ba3c85cb 100644 --- a/packages/headless-react/package.json +++ b/packages/headless-react/package.json @@ -1,6 +1,6 @@ { "name": "@coveo/headless-react", - "version": "2.4.4", + "version": "2.4.5", "description": "React utilities for SSR (Server Side Rendering) with headless", "homepage": "https://docs.coveo.com/en/headless/latest/", "repository": { @@ -40,7 +40,7 @@ "build:typedoc:merge": "typedoc --tsconfig tsconfig.typedoc.json" }, "dependencies": { - "@coveo/headless": "3.14.0" + "@coveo/headless": "3.15.0" }, "devDependencies": { "@coveo/release": "1.0.0", diff --git a/packages/headless/CHANGELOG.md b/packages/headless/CHANGELOG.md index d706f18c5c2..4c579396965 100644 --- a/packages/headless/CHANGELOG.md +++ b/packages/headless/CHANGELOG.md @@ -1,3 +1,14 @@ +## 3.15.0 (2025-02-05) + +- chore(headless): make ssr-commerce definers public (#4929) ([a6add1d](https://github.com/coveo/ui-kit/commits/a6add1d)), closes [#4929](https://github.com/coveo/ui-kit/issues/4929) +- feat(headless): export the search/product-listing serializers (#4930) ([0d90c64](https://github.com/coveo/ui-kit/commits/0d90c64)), closes [#4930](https://github.com/coveo/ui-kit/issues/4930) +- fix: ensure we give auth query param to html-api-client (#4916) ([2955a0c](https://github.com/coveo/ui-kit/commits/2955a0c)), closes [#4916](https://github.com/coveo/ui-kit/issues/4916) +- fix(deps): update all dependencies j:kit-282 (#4903) ([192cf67](https://github.com/coveo/ui-kit/commits/192cf67)), closes [#4903](https://github.com/coveo/ui-kit/issues/4903) +- fix(deps): update dependency @coveo/relay to v1 j:kit-282 (#4915) ([bd4d888](https://github.com/coveo/ui-kit/commits/bd4d888)), closes [#4915](https://github.com/coveo/ui-kit/issues/4915) +- fix(deps): update dependency @reduxjs/toolkit to v2.5.1 j:kit-282 (#4934) ([4c0600a](https://github.com/coveo/ui-kit/commits/4c0600a)), closes [#4934](https://github.com/coveo/ui-kit/issues/4934) +- fix(headless): collapsible key added to insightGenQAOptions type (#4912) ([5bb7cd9](https://github.com/coveo/ui-kit/commits/5bb7cd9)), closes [#4912](https://github.com/coveo/ui-kit/issues/4912) +- fix(headless+atomic): make recent queries case insensitive + display recent query even if it fully m ([6ceebaa](https://github.com/coveo/ui-kit/commits/6ceebaa)), closes [#4854](https://github.com/coveo/ui-kit/issues/4854) + ## 3.14.0 (2025-01-29) - feat(headless): Add answerConfigId to the InsightInterface to be supported in insight use case (#488 ([4678a59](https://github.com/coveo/ui-kit/commits/4678a59)), closes [#4887](https://github.com/coveo/ui-kit/issues/4887) diff --git a/packages/headless/package.json b/packages/headless/package.json index c7c46ceb3c6..825825efd92 100644 --- a/packages/headless/package.json +++ b/packages/headless/package.json @@ -118,7 +118,7 @@ }, "types": "./dist/definitions/index.d.ts", "license": "Apache-2.0", - "version": "3.14.0", + "version": "3.15.0", "files": [ "dist/" ], diff --git a/packages/quantic/CHANGELOG.md b/packages/quantic/CHANGELOG.md index d05c5aeda90..3eb66576ff8 100644 --- a/packages/quantic/CHANGELOG.md +++ b/packages/quantic/CHANGELOG.md @@ -1,3 +1,13 @@ +## 3.14.0 (2025-02-05) + +- fix(deps): update all dependencies j:kit-282 (#4903) ([192cf67](https://github.com/coveo/ui-kit/commits/192cf67)), closes [#4903](https://github.com/coveo/ui-kit/issues/4903) +- fix(deps): update all dependencies j:kit-282 (#4933) ([9016283](https://github.com/coveo/ui-kit/commits/9016283)), closes [#4933](https://github.com/coveo/ui-kit/issues/4933) +- feat(quantic): add collapsible max height option to the quanticGeneratedAnswer component (#4871) ([a92f563](https://github.com/coveo/ui-kit/commits/a92f563)), closes [#4871](https://github.com/coveo/ui-kit/issues/4871) +- feat(quantic): Migration of Quantic Smart Snippet suggestions to Playwright (#4888) ([7b277e1](https://github.com/coveo/ui-kit/commits/7b277e1)), closes [#4888](https://github.com/coveo/ui-kit/issues/4888) +- feat(quantic): QuanticResultsPerPage fixes and refactor tests (#4889) ([0d63ca9](https://github.com/coveo/ui-kit/commits/0d63ca9)), closes [#4889](https://github.com/coveo/ui-kit/issues/4889) +- chore(tests): fix flakiness issue (#4905) ([ab7f0d5](https://github.com/coveo/ui-kit/commits/ab7f0d5)), closes [#4905](https://github.com/coveo/ui-kit/issues/4905) [/github.com/cypress-io/cypress/issues/29085#issuecomment-2040258080](https://github.com//github.com/cypress-io/cypress/issues/29085/issues/issuecomment-2040258080) [/docs.cypress.io/app/references/changelog#13-7-3](https://github.com//docs.cypress.io/app/references/changelog/issues/13-7-3) [/github.com/coveo/ui-kit/pull/4905#discussion_r1933951647](https://github.com//github.com/coveo/ui-kit/pull/4905/issues/discussion_r1933951647) +- fix(headless+atomic): make recent queries case insensitive + display recent query even if it fully m ([6ceebaa](https://github.com/coveo/ui-kit/commits/6ceebaa)), closes [#4854](https://github.com/coveo/ui-kit/issues/4854) + ## 3.13.0 (2025-01-23) - fix(deps): update all dependencies j:kit-282 (#4881) ([9cac893](https://github.com/coveo/ui-kit/commits/9cac893)), closes [#4881](https://github.com/coveo/ui-kit/issues/4881) diff --git a/packages/quantic/package.json b/packages/quantic/package.json index 052e0530869..beecfe202c9 100644 --- a/packages/quantic/package.json +++ b/packages/quantic/package.json @@ -1,6 +1,6 @@ { "name": "@coveo/quantic", - "version": "3.13.1", + "version": "3.14.0", "description": "A Salesforce Lightning Web Component (LWC) library for building modern UIs interfacing with the Coveo platform", "author": "coveo.com", "homepage": "https://coveo.com", @@ -51,7 +51,7 @@ }, "dependencies": { "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "dompurify": "3.2.3", "fs-extra": "11.3.0", "marked": "12.0.2" diff --git a/packages/samples/angular/package.json b/packages/samples/angular/package.json index b8fcdfd62e7..215f7d0095e 100644 --- a/packages/samples/angular/package.json +++ b/packages/samples/angular/package.json @@ -19,7 +19,7 @@ "@angular/platform-browser": "18.2.13", "@angular/platform-browser-dynamic": "18.2.13", "@angular/router": "18.2.13", - "@coveo/atomic-angular": "3.3.6", + "@coveo/atomic-angular": "3.3.7", "rxjs": "7.8.1", "zone.js": "0.15.0" }, diff --git a/packages/samples/atomic-next/package.json b/packages/samples/atomic-next/package.json index 38cbce96349..72c2e262a6e 100644 --- a/packages/samples/atomic-next/package.json +++ b/packages/samples/atomic-next/package.json @@ -4,9 +4,9 @@ "private": true, "type": "module", "dependencies": { - "@coveo/atomic": "3.17.0", - "@coveo/atomic-react": "3.2.16", - "@coveo/headless": "3.14.0", + "@coveo/atomic": "3.18.0", + "@coveo/atomic-react": "3.2.17", + "@coveo/headless": "3.15.0", "next": "14.2.20", "react": "18.3.1", "react-dom": "18.3.1" diff --git a/packages/samples/atomic-react/package.json b/packages/samples/atomic-react/package.json index 94fe5e945a3..5045956af1c 100644 --- a/packages/samples/atomic-react/package.json +++ b/packages/samples/atomic-react/package.json @@ -10,8 +10,8 @@ "build": "nx build" }, "dependencies": { - "@coveo/atomic-react": "3.2.16", - "@coveo/headless": "3.14.0", + "@coveo/atomic-react": "3.2.17", + "@coveo/headless": "3.15.0", "react": "18.3.1", "react-dom": "18.3.1" }, diff --git a/packages/samples/headless-commerce-react/package.json b/packages/samples/headless-commerce-react/package.json index 1d544c8c50b..16aaaa5b70f 100644 --- a/packages/samples/headless-commerce-react/package.json +++ b/packages/samples/headless-commerce-react/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "dependencies": { - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "react": "18.3.1", "react-dom": "18.3.1" }, diff --git a/packages/samples/headless-commerce-ssr-remix/package.json b/packages/samples/headless-commerce-ssr-remix/package.json index 801955792de..5d30ad8b9dd 100644 --- a/packages/samples/headless-commerce-ssr-remix/package.json +++ b/packages/samples/headless-commerce-ssr-remix/package.json @@ -10,7 +10,7 @@ "typecheck": "tsc" }, "dependencies": { - "@coveo/headless-react": "2.4.4", + "@coveo/headless-react": "2.4.5", "@remix-run/node": "2.15.2", "@remix-run/react": "2.15.2", "@remix-run/serve": "2.15.2", diff --git a/packages/samples/headless-react/package.json b/packages/samples/headless-react/package.json index 3ce319c4958..9f88710660f 100644 --- a/packages/samples/headless-react/package.json +++ b/packages/samples/headless-react/package.json @@ -8,8 +8,8 @@ "node": "^20.9.0 || ^22.11.0" }, "dependencies": { - "@coveo/auth": "2.0.6", - "@coveo/headless": "3.14.0", + "@coveo/auth": "2.0.7", + "@coveo/headless": "3.15.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "14.3.1", "@testing-library/user-event": "14.6.1", diff --git a/packages/samples/headless-ssr-commerce/package.json b/packages/samples/headless-ssr-commerce/package.json index 3ff21e9f1f2..c9cde46ddb9 100644 --- a/packages/samples/headless-ssr-commerce/package.json +++ b/packages/samples/headless-ssr-commerce/package.json @@ -11,7 +11,7 @@ "build:next": "next build" }, "dependencies": { - "@coveo/headless-react": "2.4.4", + "@coveo/headless-react": "2.4.5", "next": "14.2.20", "react": "18.3.1", "react-dom": "18.3.1" diff --git a/packages/samples/headless-ssr/package.json b/packages/samples/headless-ssr/package.json index cac0911005b..59d8e755d32 100644 --- a/packages/samples/headless-ssr/package.json +++ b/packages/samples/headless-ssr/package.json @@ -8,8 +8,8 @@ "e2e:watch": "cypress open --browser chrome --e2e" }, "dependencies": { - "@coveo/headless-react": "2.4.4", - "@coveo/headless": "3.14.0", + "@coveo/headless-react": "2.4.5", + "@coveo/headless": "3.15.0", "next": "14.2.20", "react": "18.3.1", "react-dom": "18.3.1" diff --git a/packages/samples/iife/package.json b/packages/samples/iife/package.json index f772247a397..994d2062dcc 100644 --- a/packages/samples/iife/package.json +++ b/packages/samples/iife/package.json @@ -12,10 +12,10 @@ }, "dependencies": { "@babel/standalone": "7.26.7", - "@coveo/atomic": "3.17.0", - "@coveo/atomic-hosted-page": "1.0.21", - "@coveo/atomic-react": "3.2.16", - "@coveo/headless": "3.14.0", + "@coveo/atomic": "3.18.0", + "@coveo/atomic-hosted-page": "1.1.0", + "@coveo/atomic-react": "3.2.17", + "@coveo/headless": "3.15.0", "react": "18.3.1", "react-dom": "18.3.1" }, diff --git a/packages/samples/stencil/package.json b/packages/samples/stencil/package.json index c0dfb329635..b88cdae6107 100644 --- a/packages/samples/stencil/package.json +++ b/packages/samples/stencil/package.json @@ -8,9 +8,9 @@ "e2e:watch": "cypress open --browser chrome --e2e" }, "dependencies": { - "@coveo/atomic": "3.17.0", + "@coveo/atomic": "3.18.0", "@coveo/bueno": "1.0.7", - "@coveo/headless": "3.14.0", + "@coveo/headless": "3.15.0", "@stencil/core": "4.20.0", "stencil-router-v2": "0.6.0" }, diff --git a/packages/samples/vuejs/package.json b/packages/samples/vuejs/package.json index f492d3e7471..b2d6928fde9 100644 --- a/packages/samples/vuejs/package.json +++ b/packages/samples/vuejs/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "vue": "3.5.13", - "@coveo/atomic": "3.17.0" + "@coveo/atomic": "3.18.0" }, "devDependencies": { "@vitejs/plugin-vue": "5.2.1", From 1c8d484dc6a4db654786861e768e95ee45ec700a Mon Sep 17 00:00:00 2001 From: Alex Prudhomme <78121423+alexprudhomme@users.noreply.github.com> Date: Wed, 5 Feb 2025 15:08:09 -0500 Subject: [PATCH 04/21] fix(atomic): fix broken generated types (#4932) KIT-3933 --- package-lock.json | 2 +- packages/atomic/package.json | 2 +- packages/atomic/src/components.d.ts | 30 +++++++++---------- .../atomic-product-numeric-field-value.tsx | 4 +-- .../facet-date-input/facet-date-input.tsx | 2 +- ...atomic-generated-answer-feedback-modal.tsx | 2 +- .../common/tab-manager/tab-manager-bar.tsx | 2 +- .../src/components/common/tabs/tab-bar.tsx | 2 +- .../components/common/tabs/tab-popover.tsx | 8 ++--- .../atomic-insight-result-action.tsx | 2 +- .../atomic-recs-list/atomic-ipx-recs-list.tsx | 18 ++++++----- .../adopted-stylesheets.d.ts | 7 ----- .../atomic/src/utils/replace-breakpoint.ts | 5 +--- packages/samples/angular/tsconfig.json | 3 +- 14 files changed, 39 insertions(+), 50 deletions(-) delete mode 100644 packages/atomic/src/components/search/result-lists/atomic-result-list/adopted-stylesheets.d.ts diff --git a/package-lock.json b/package-lock.json index e81ac8d957f..a12bf230fd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60851,6 +60851,7 @@ "@coveo/headless": "3.15.0", "@popperjs/core": "2.11.8", "@salesforce-ux/design-system": "2.25.6", + "@stencil/core": "4.20.0", "dayjs": "1.11.13", "dompurify": "3.2.3", "escape-html": "1.0.3", @@ -60873,7 +60874,6 @@ "@rollup/plugin-replace": "6.0.2", "@stencil-community/postcss": "2.2.0", "@stencil/angular-output-target": "0.8.4", - "@stencil/core": "4.20.0", "@stencil/react-output-target": "0.5.3", "@storybook/addon-a11y": "8.1.11", "@storybook/addon-essentials": "8.1.11", diff --git a/packages/atomic/package.json b/packages/atomic/package.json index 04c9d9b28bf..46b5a8c5389 100644 --- a/packages/atomic/package.json +++ b/packages/atomic/package.json @@ -74,6 +74,7 @@ "@coveo/headless": "3.15.0", "@popperjs/core": "2.11.8", "@salesforce-ux/design-system": "2.25.6", + "@stencil/core": "4.20.0", "dayjs": "1.11.13", "dompurify": "3.2.3", "escape-html": "1.0.3", @@ -96,7 +97,6 @@ "@rollup/plugin-replace": "6.0.2", "@stencil-community/postcss": "2.2.0", "@stencil/angular-output-target": "0.8.4", - "@stencil/core": "4.20.0", "@stencil/react-output-target": "0.5.3", "@storybook/addon-a11y": "8.1.11", "@storybook/addon-essentials": "8.1.11", diff --git a/packages/atomic/src/components.d.ts b/packages/atomic/src/components.d.ts index 07e23cdf3cb..3db7c908033 100644 --- a/packages/atomic/src/components.d.ts +++ b/packages/atomic/src/components.d.ts @@ -17,14 +17,13 @@ import { ItemRenderingFunction } from "./components/common/item-list/item-list-c import { RedirectionPayload } from "./components/search/atomic-search-box/redirection-payload"; import { AriaLabelGenerator } from "./components/commerce/search-box-suggestions/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products"; import { AtomicInterface } from "./utils/initialization-utils"; -import { unknown as AnyBindings, ItemDisplayBasicLayout as ItemDisplayBasicLayout1, ItemDisplayDensity as ItemDisplayDensity1, ItemDisplayImageSize as ItemDisplayImageSize1, ItemRenderingFunction as ItemRenderingFunction1 } from "./components"; -import { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; +import { AnyBindings } from "./components/common/interface/bindings"; import { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; import { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; import { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction } from "@coveo/headless/insight"; import { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; import { InsightStore } from "./components/insight/atomic-insight-interface/store"; -import { InsightResultActionClickedEvent } from "./components/insight/atomic-insight-result-action/atomic-insight-result-action"; +import { Actions, InsightResultActionClickedEvent } from "./components/insight/atomic-insight-result-action/atomic-insight-result-action"; import { InsightResultAttachToCaseEvent } from "./components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action"; import { Section } from "./components/common/atomic-layout-section/sections"; import { CommerceStore } from "./components/commerce/atomic-commerce-interface/store"; @@ -50,14 +49,13 @@ export { ItemRenderingFunction } from "./components/common/item-list/item-list-c export { RedirectionPayload } from "./components/search/atomic-search-box/redirection-payload"; export { AriaLabelGenerator } from "./components/commerce/search-box-suggestions/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products"; export { AtomicInterface } from "./utils/initialization-utils"; -export { unknown as AnyBindings, ItemDisplayBasicLayout as ItemDisplayBasicLayout1, ItemDisplayDensity as ItemDisplayDensity1, ItemDisplayImageSize as ItemDisplayImageSize1, ItemRenderingFunction as ItemRenderingFunction1 } from "./components"; -export { AnyBindings as AnyBindings1 } from "./components/common/interface/bindings"; +export { AnyBindings } from "./components/common/interface/bindings"; export { NumberInputType } from "./components/common/facets/facet-number-input/number-input-type"; export { NumericFilter, NumericFilterState, RelativeDateUnit } from "./components/common/types"; export { InsightEngine, FacetSortCriterion as InsightFacetSortCriterion, FoldedResult as InsightFoldedResult, InteractiveResult as InsightInteractiveResult, LogLevel as InsightLogLevel, RangeFacetRangeAlgorithm as InsightRangeFacetRangeAlgorithm, RangeFacetSortCriterion as InsightRangeFacetSortCriterion, Result as InsightResult, ResultTemplate as InsightResultTemplate, ResultTemplateCondition as InsightResultTemplateCondition, UserAction as IUserAction } from "@coveo/headless/insight"; export { InsightInitializationOptions } from "./components/insight/atomic-insight-interface/atomic-insight-interface"; export { InsightStore } from "./components/insight/atomic-insight-interface/store"; -export { InsightResultActionClickedEvent } from "./components/insight/atomic-insight-result-action/atomic-insight-result-action"; +export { Actions, InsightResultActionClickedEvent } from "./components/insight/atomic-insight-result-action/atomic-insight-result-action"; export { InsightResultAttachToCaseEvent } from "./components/insight/atomic-insight-result-attach-to-case-action/atomic-insight-result-attach-to-case-action"; export { Section } from "./components/common/atomic-layout-section/sections"; export { CommerceStore } from "./components/commerce/atomic-commerce-interface/store"; @@ -931,7 +929,7 @@ export namespace Components { * Internal component made to be integrated in a NumericFacet. */ interface AtomicFacetNumberInput { - "bindings": AnyBindings1; + "bindings": AnyBindings; "filter": NumericFilter; "filterState": NumericFilterState; "label": string; @@ -1749,11 +1747,11 @@ export namespace Components { /** * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result. */ - "density": ItemDisplayDensity1; + "density": ItemDisplayDensity; /** * The layout to apply when displaying results themselves. This does not affect the display of the surrounding list itself. To modify the number of recommendations per column, modify the --atomic-recs-number-of-columns CSS variable. */ - "display": ItemDisplayBasicLayout1; + "display": ItemDisplayBasicLayout; /** * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading label, from 1 to 6. */ @@ -1761,7 +1759,7 @@ export namespace Components { /** * The expected size of the image displayed in the results. */ - "imageSize": ItemDisplayImageSize1; + "imageSize": ItemDisplayImageSize; /** * The non-localized label for the list of recommendations. */ @@ -1790,7 +1788,7 @@ export namespace Components { * Sets a rendering function to bypass the standard HTML template mechanism for rendering results. You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue. Do not use this method if you integrate Atomic in a plain HTML deployment. * @param resultRenderingFunction */ - "setRenderFunction": (resultRenderingFunction: ItemRenderingFunction1) => Promise; + "setRenderFunction": (resultRenderingFunction: ItemRenderingFunction) => Promise; } interface AtomicIpxRefineModal { /** @@ -3715,7 +3713,7 @@ export namespace Components { interface AtomicTabPopover { "closePopoverOnFocusOut": (event: FocusEvent) => Promise; "setButtonVisibility": (isVisible: boolean) => Promise; - "togglePopover": () => Promise; + "toggle": () => Promise; } /** * The `atomic-table-element` element defines a table column in a result list. @@ -7126,7 +7124,7 @@ declare namespace LocalJSX { * Internal component made to be integrated in a NumericFacet. */ interface AtomicFacetNumberInput { - "bindings": AnyBindings1; + "bindings": AnyBindings; "filter": NumericFilter; "filterState": NumericFilterState; "label": string; @@ -7917,11 +7915,11 @@ declare namespace LocalJSX { /** * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result. */ - "density"?: ItemDisplayDensity1; + "density"?: ItemDisplayDensity; /** * The layout to apply when displaying results themselves. This does not affect the display of the surrounding list itself. To modify the number of recommendations per column, modify the --atomic-recs-number-of-columns CSS variable. */ - "display"?: ItemDisplayBasicLayout1; + "display"?: ItemDisplayBasicLayout; /** * The [heading level](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements) to use for the heading label, from 1 to 6. */ @@ -7929,7 +7927,7 @@ declare namespace LocalJSX { /** * The expected size of the image displayed in the results. */ - "imageSize"?: ItemDisplayImageSize1; + "imageSize"?: ItemDisplayImageSize; /** * The non-localized label for the list of recommendations. */ diff --git a/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx b/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx index 15295522b03..6064b7befdf 100644 --- a/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx +++ b/packages/atomic/src/components/commerce/product-template-components/atomic-product-numeric-field-value/atomic-product-numeric-field-value.tsx @@ -1,11 +1,11 @@ import {Product} from '@coveo/headless/commerce'; import {Component, Prop, Element, State, Listen} from '@stencil/core'; -import {Bindings} from '../../../../components'; import {InitializeBindings} from '../../../../utils/initialization-utils'; import { defaultNumberFormatter, NumberFormatter, } from '../../../common/formats/format-common'; +import {CommerceBindings} from '../../atomic-commerce-interface/atomic-commerce-interface'; import {ProductContext} from '../product-template-decorators'; import {parseValue} from '../product-utils'; @@ -20,7 +20,7 @@ import {parseValue} from '../product-utils'; shadow: false, }) export class AtomicProductNumber { - @InitializeBindings() public bindings!: Bindings; + @InitializeBindings() public bindings!: CommerceBindings; @ProductContext() private product!: Product; @Element() host!: HTMLElement; diff --git a/packages/atomic/src/components/common/facets/facet-date-input/facet-date-input.tsx b/packages/atomic/src/components/common/facets/facet-date-input/facet-date-input.tsx index b1ff09a8730..ee1c390c31a 100644 --- a/packages/atomic/src/components/common/facets/facet-date-input/facet-date-input.tsx +++ b/packages/atomic/src/components/common/facets/facet-date-input/facet-date-input.tsx @@ -4,9 +4,9 @@ import { DateRangeRequest, } from '@coveo/headless'; import {Component, h, State, Prop, Event, EventEmitter} from '@stencil/core'; -import {AnyBindings} from '../../../../components'; import {parseDate} from '../../../../utils/date-utils'; import {Button} from '../../../common/button'; +import {AnyBindings} from '../../interface/bindings'; /** * Internal component made to be integrated in a TimeframeFacet. diff --git a/packages/atomic/src/components/common/generated-answer/atomic-generated-answer-feedback/atomic-generated-answer-feedback-modal.tsx b/packages/atomic/src/components/common/generated-answer/atomic-generated-answer-feedback/atomic-generated-answer-feedback-modal.tsx index eec072958a7..37e9d2db577 100644 --- a/packages/atomic/src/components/common/generated-answer/atomic-generated-answer-feedback/atomic-generated-answer-feedback-modal.tsx +++ b/packages/atomic/src/components/common/generated-answer/atomic-generated-answer-feedback/atomic-generated-answer-feedback-modal.tsx @@ -13,7 +13,6 @@ import { Event, EventEmitter, } from '@stencil/core/internal'; -import {AnyBindings} from '../../../../components'; import CloseIcon from '../../../../images/close.svg'; import Success from '../../../../images/success.svg'; import { @@ -25,6 +24,7 @@ import {once, randomID} from '../../../../utils/utils'; import {Button} from '../../button'; import {FieldsetGroup} from '../../fieldset-group'; import {IconButton} from '../../iconButton'; +import {AnyBindings} from '../../interface/bindings'; import {RadioButton} from '../../stencil-radio-button'; /** diff --git a/packages/atomic/src/components/common/tab-manager/tab-manager-bar.tsx b/packages/atomic/src/components/common/tab-manager/tab-manager-bar.tsx index eec14f93793..2fa15bc4909 100644 --- a/packages/atomic/src/components/common/tab-manager/tab-manager-bar.tsx +++ b/packages/atomic/src/components/common/tab-manager/tab-manager-bar.tsx @@ -153,7 +153,7 @@ export class AtomicTabManagerBar { onClick={() => { tab.select(); this.updatePopoverTabs(); - this.tabPopover?.togglePopover(); + this.tabPopover?.toggle(); }} > {tab.label} diff --git a/packages/atomic/src/components/common/tabs/tab-bar.tsx b/packages/atomic/src/components/common/tabs/tab-bar.tsx index 41d49778914..9add1af2e43 100644 --- a/packages/atomic/src/components/common/tabs/tab-bar.tsx +++ b/packages/atomic/src/components/common/tabs/tab-bar.tsx @@ -153,7 +153,7 @@ export class TabBar { onClick={() => { tab.select(); this.updatePopoverTabs(); - this.tabPopover?.togglePopover(); + this.tabPopover?.toggle(); }} > {tab.label} diff --git a/packages/atomic/src/components/common/tabs/tab-popover.tsx b/packages/atomic/src/components/common/tabs/tab-popover.tsx index e6e08940808..2ce8ce7bca6 100644 --- a/packages/atomic/src/components/common/tabs/tab-popover.tsx +++ b/packages/atomic/src/components/common/tabs/tab-popover.tsx @@ -60,7 +60,7 @@ export class TabPopover implements InitializableComponent { } if (e.key === 'Escape') { - this.togglePopover(); + this.toggle(); } else if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); this.navigatePopover(e.key); @@ -123,7 +123,7 @@ export class TabPopover implements InitializableComponent { } @Method() - public async togglePopover() { + public async toggle() { this.isOpen = !this.isOpen; } @@ -172,7 +172,7 @@ export class TabPopover implements InitializableComponent {