@coveo/atomic 3.31.0 → 3.31.1-pre.4862ba88ca

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/components/analytics-config.js +1 -1
  3. package/dist/atomic/components/analytics-config.js.map +1 -1
  4. package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +15 -26
  5. package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +16 -35
  6. package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +3 -0
  7. package/dist/atomic/components/components/common/interface/interface-controller.js +89 -0
  8. package/dist/atomic/components/global/environment.js +1 -1
  9. package/dist/atomic/{p-6cf521a3.entry.js → p-49323e5f.entry.js} +2 -2
  10. package/dist/atomic/{p-76489bf6.entry.js → p-72313200.entry.js} +2 -2
  11. package/dist/atomic/{p-be5e8359.js → p-c03cb4a0.js} +2 -2
  12. package/dist/atomic/{p-be5e8359.js.map → p-c03cb4a0.js.map} +1 -1
  13. package/dist/atomic/{p-e0169a14.entry.js → p-e22d721c.entry.js} +2 -2
  14. package/dist/cjs/{analytics-config-d10e762b.js → analytics-config-df48e87a.js} +2 -2
  15. package/dist/cjs/analytics-config-df48e87a.js.map +1 -0
  16. package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
  17. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  18. package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
  19. package/dist/cjs/version.cjs.js +2 -2
  20. package/dist/esm/{analytics-config-e2c4641d.js → analytics-config-daf979cf.js} +2 -2
  21. package/dist/esm/analytics-config-daf979cf.js.map +1 -0
  22. package/dist/esm/atomic-insight-interface.entry.js +1 -1
  23. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  24. package/dist/esm/atomic-search-interface.entry.js +1 -1
  25. package/dist/esm/version.js +2 -2
  26. package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +3 -4
  27. package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +5 -6
  28. package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +3 -0
  29. package/dist/types/components/common/interface/i18n.d.ts +1 -1
  30. package/dist/types/components/common/interface/{interface-common.d.ts → interface-controller.d.ts} +14 -11
  31. package/docs/atomic-docs.json +31 -31
  32. package/package.json +5 -5
  33. package/dist/atomic/components/components/common/interface/interface-common.js +0 -95
  34. package/dist/cjs/analytics-config-d10e762b.js.map +0 -1
  35. package/dist/esm/analytics-config-e2c4641d.js.map +0 -1
  36. /package/dist/atomic/{p-6cf521a3.entry.js.map → p-49323e5f.entry.js.map} +0 -0
  37. /package/dist/atomic/{p-76489bf6.entry.js.map → p-72313200.entry.js.map} +0 -0
  38. /package/dist/atomic/{p-e0169a14.entry.js.map → p-e22d721c.entry.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, s as setNonce, h, H as Host, g as getElement } from './index-3f35faca.js';
2
2
  import { m as markParentAsReady } from './init-queue-fbe942c3.js';
3
3
  import { buildResultsPerPage, loadFieldActions, buildInsightEngine } from '@coveo/headless/insight';
4
- import { g as getNextAnalyticsConfig, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance } from './analytics-config-e2c4641d.js';
4
+ import { g as getNextAnalyticsConfig, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance } from './analytics-config-daf979cf.js';
5
5
  import { A as ArrayProp } from './props-utils-e17fa18c.js';
6
6
  import { D as DEFAULT_MOBILE_BREAKPOINT } from './replace-breakpoint-213367f8.js';
7
7
  import { u as unsetLoadingFlag, s as setLoadingFlag, r as registerFacet, g as getFacetElements, w as waitUntilAppLoaded, a as createBaseStore } from './store-5fcae420.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, s as setNonce, h, g as getElement } from './index-3f35faca.js';
2
2
  import { m as markParentAsReady } from './init-queue-fbe942c3.js';
3
3
  import { loadRecommendationActions, loadSearchConfigurationActions, EcommerceDefaultFieldsToInclude, loadFieldActions, buildRecommendationEngine } from '@coveo/headless/recommendation';
4
- import { g as getNextAnalyticsConfig, c as augmentAnalyticsConfigWithDocument, d as augmentAnalyticsConfigWithAtomicVersion, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config-e2c4641d.js';
4
+ import { g as getNextAnalyticsConfig, c as augmentAnalyticsConfigWithDocument, d as augmentAnalyticsConfigWithAtomicVersion, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config-daf979cf.js';
5
5
  import { A as ArrayProp } from './props-utils-e17fa18c.js';
6
6
  import { u as unsetLoadingFlag, s as setLoadingFlag, a as createBaseStore } from './store-5fcae420.js';
7
7
  import './dayjs.min-d04628c6.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, s as setNonce, h, g as getElement } from './index-3f35faca.js';
2
2
  import { m as markParentAsReady } from './init-queue-fbe942c3.js';
3
3
  import { loadSearchConfigurationActions, loadQueryActions, EcommerceDefaultFieldsToInclude, loadFieldActions, buildSearchEngine, buildUrlManager, buildSearchStatus } from '@coveo/headless';
4
- import { g as getNextAnalyticsConfig, d as augmentAnalyticsConfigWithAtomicVersion, c as augmentAnalyticsConfigWithDocument, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config-e2c4641d.js';
4
+ import { g as getNextAnalyticsConfig, d as augmentAnalyticsConfigWithAtomicVersion, c as augmentAnalyticsConfigWithDocument, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance, m as mismatchedInterfaceAndEnginePropError } from './analytics-config-daf979cf.js';
5
5
  import { a as StorageItems, S as SafeStorage } from './local-storage-utils-410269e6.js';
6
6
  import { A as ArrayProp } from './props-utils-e17fa18c.js';
7
7
  import { m as makeDesktopQuery, n as noResultsSelector, e as errorSelector, f as firstSearchExecutedSelector } from './search-layout-1e3bd9fd.js';
@@ -1,2 +1,2 @@
1
- export const headlessVersion = '3.27.6';
2
- export const atomicVersion = '3.31.0';
1
+ export const headlessVersion = '3.27.7-pre.4862ba88ca';
2
+ export const atomicVersion = '3.31.1-pre.4862ba88ca';
@@ -2,7 +2,7 @@ import { type CommerceEngine, type CommerceEngineConfiguration, type Context, ty
2
2
  import { type i18n } from 'i18next';
3
3
  import { type CSSResultGroup, LitElement } from 'lit';
4
4
  import type { CommonBindings } from '../../common/interface/bindings';
5
- import { type BaseAtomicInterface } from '../../common/interface/interface-common';
5
+ import { type BaseAtomicInterface } from '../../common/interface/interface-controller';
6
6
  import { type CommerceStore } from '../atomic-commerce-interface/store';
7
7
  export type CommerceInitializationOptions = CommerceEngineConfiguration;
8
8
  export type CommerceBindings = CommonBindings<CommerceEngine, CommerceStore, AtomicCommerceInterface>;
@@ -25,8 +25,8 @@ export declare class AtomicCommerceInterface extends AtomicCommerceInterface_bas
25
25
  private unsubscribeSummary?;
26
26
  private initialized;
27
27
  store: CommerceStore;
28
- private commonInterfaceHelper;
29
- error?: Error;
28
+ private interfaceController;
29
+ error: Error;
30
30
  static styles: CSSResultGroup;
31
31
  /**
32
32
  * The type of the interface.
@@ -107,7 +107,6 @@ export declare class AtomicCommerceInterface extends AtomicCommerceInterface_bas
107
107
  private getBindings;
108
108
  private initEngine;
109
109
  private get fragment();
110
- private initAriaLive;
111
110
  private initUrlManager;
112
111
  private initRequestStatus;
113
112
  private initSummary;
@@ -2,11 +2,11 @@ import { type CommerceEngine, type CommerceEngineConfiguration, type Context } f
2
2
  import type { CurrencyCodeISO4217 } from '@coveo/relay-event-types';
3
3
  import { type i18n } from 'i18next';
4
4
  import { type CSSResultGroup, LitElement } from 'lit';
5
- import type { AdoptedStylesBindings, CommonBindings } from '../../common/interface/bindings.js';
6
- import { type BaseAtomicInterface } from '../../common/interface/interface-common.js';
5
+ import type { CommonBindings } from '../../common/interface/bindings.js';
6
+ import { type BaseAtomicInterface } from '../../common/interface/interface-controller.js';
7
7
  import { type CommerceRecommendationStore } from './store.js';
8
8
  export type CommerceInitializationOptions = CommerceEngineConfiguration;
9
- export type CommerceBindings = CommonBindings<CommerceEngine, CommerceRecommendationStore, AtomicCommerceRecommendationInterface> & AdoptedStylesBindings;
9
+ export type CommerceBindings = CommonBindings<CommerceEngine, CommerceRecommendationStore, AtomicCommerceRecommendationInterface>;
10
10
  declare const AtomicCommerceRecommendationInterface_base: typeof LitElement;
11
11
  /**
12
12
  * The `atomic-commerce-recommendation-interface` component is meant to be used
@@ -16,10 +16,10 @@ declare const AtomicCommerceRecommendationInterface_base: typeof LitElement;
16
16
  */
17
17
  export declare class AtomicCommerceRecommendationInterface extends AtomicCommerceRecommendationInterface_base implements BaseAtomicInterface<CommerceEngine> {
18
18
  bindings: CommerceBindings;
19
- error?: Error;
19
+ error: Error;
20
20
  context: Context;
21
21
  store: CommerceRecommendationStore;
22
- private commonInterfaceHelper;
22
+ private interfaceController;
23
23
  static styles: CSSResultGroup;
24
24
  /**
25
25
  * The commerce interface i18next instance.
@@ -98,7 +98,6 @@ export declare class AtomicCommerceRecommendationInterface extends AtomicCommerc
98
98
  private handleInitialization;
99
99
  private scrollToTop;
100
100
  private internalInitialization;
101
- private initAriaLive;
102
101
  private initContext;
103
102
  private getBindings;
104
103
  private initLanguage;
@@ -3,6 +3,9 @@ import { type CSSResultGroup, LitElement } from 'lit';
3
3
  import type { InitializableComponent } from "../../../decorators/types";
4
4
  import { AriaLiveRegionController } from "../../../utils/accessibility-utils";
5
5
  import type { CommerceBindings } from '../atomic-commerce-interface/atomic-commerce-interface';
6
+ import '../atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products';
7
+ import '../atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions';
8
+ import '../atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries';
6
9
  /**
7
10
  * The `atomic-commerce-search-box` component enables users to perform product searches with built-in query suggestions and optional redirection to a search results page.
8
11
  *
@@ -1,6 +1,6 @@
1
1
  import { type HttpBackendOptions } from 'i18next-http-backend';
2
2
  import type { AnyEngineType } from './bindings';
3
- import type { BaseAtomicInterface } from './interface-common';
3
+ import type { BaseAtomicInterface } from './interface-controller';
4
4
  export declare const i18nTranslationNamespace = "translation";
5
5
  export declare function i18nBackendOptions(atomicInterface: BaseAtomicInterface<AnyEngineType>): HttpBackendOptions;
6
6
  export declare function init18n(atomicInterface: BaseAtomicInterface<AnyEngineType>): Promise<import("i18next").TFunction<"translation", undefined>>;
@@ -1,33 +1,36 @@
1
- import "../atomic-component-error/atomic-component-error.js";
2
1
  import type { LogLevel } from '@coveo/headless';
3
2
  import type { i18n } from 'i18next';
4
- import type { AnyBindings, AnyEngineType } from "./bindings.js";
3
+ import type { LitElement, ReactiveController } from 'lit';
4
+ import type { AnyBindings, AnyEngineType } from './bindings';
5
5
  export type InitializeEventHandler = (bindings: AnyBindings) => void;
6
6
  export type InitializeEvent = CustomEvent<InitializeEventHandler>;
7
7
  export interface BaseAtomicInterface<EngineType extends AnyEngineType> {
8
8
  analytics: boolean;
9
9
  i18n: i18n;
10
- engine?: EngineType;
11
10
  languageAssetsPath: string;
12
11
  iconAssetsPath: string;
13
- logLevel?: LogLevel;
14
- language?: string;
15
12
  bindings: AnyBindings;
16
- error?: Error;
17
13
  updateIconAssetsPath(): void;
14
+ error: Error;
15
+ engine?: EngineType;
16
+ logLevel?: LogLevel;
17
+ language?: string;
18
18
  registerFieldsToInclude?: () => void;
19
19
  }
20
- export declare const mismatchedInterfaceAndEnginePropError: (interfaceKind: "search" | "recommendation", configurationName: "query pipeline" | "search hub") => string;
21
- export declare class CommonAtomicInterfaceHelper<Engine extends AnyEngineType> {
22
- private atomicInterface;
20
+ export declare class InterfaceController<EngineType extends AnyEngineType> implements ReactiveController {
21
+ private host;
23
22
  private i18nPromise;
24
23
  private hangingComponentsInitialization;
25
- constructor(atomicInterface: BaseAtomicInterface<Engine> & HTMLElement, globalVariableName: string);
24
+ constructor(host: LitElement & BaseAtomicInterface<EngineType>, globalVariableName: string);
25
+ hostConnected(): void;
26
+ hostDisconnected(): void;
26
27
  onComponentInitializing(event: InitializeEvent): void;
27
28
  onInitialization(initEngine: () => void): Promise<void>;
28
29
  onAnalyticsChange(): void;
29
30
  onLanguageChange(newLanguage?: string): void;
30
- engineIsCreated(engine?: Engine): engine is Engine;
31
+ engineIsCreated(engine?: EngineType): engine is EngineType;
31
32
  private get interfaceTagname();
32
33
  private initComponents;
34
+ private initAriaLive;
35
+ private removeAriaLive;
33
36
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-07-30T02:51:58",
2
+ "timestamp": "2025-07-30T12:28:12",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.20.0",
@@ -7358,10 +7358,10 @@
7358
7358
  "props": [
7359
7359
  {
7360
7360
  "name": "imageSize",
7361
- "type": "undefined | ({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; normalize: { (form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string; (form?: string | undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; concat: (...strings: string[]) => string; indexOf: (searchString: string, position?: number | undefined) => number; lastIndexOf: (searchString: string, position?: number | undefined) => number; localeCompare: { (that: string): number; (that: string, locales?: string | string[] | undefined, options?: CollatorOptions | undefined): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions | undefined): number; }; match: { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }; replace: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; search: { (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; slice: (start?: number | undefined, end?: number | undefined) => string; split: { (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; }; substring: (start: number, end?: number | undefined) => string; toLowerCase: () => string; toLocaleLowerCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; toUpperCase: () => string; toLocaleUpperCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; readonly length: number; substr: (from: number, length?: number | undefined) => string; codePointAt: (pos: number) => number | undefined; includes: (searchString: string, position?: number | undefined) => boolean; endsWith: (searchString: string, endPosition?: number | undefined) => boolean; repeat: (count: number) => string; startsWith: (searchString: string, position?: number | undefined) => boolean; anchor: (name: string) => string; big: () => string; blink: () => string; bold: () => string; fixed: () => string; fontcolor: (color: string) => string; fontsize: { (size: number): string; (size: string): string; }; italics: () => string; link: (url: string) => string; small: () => string; strike: () => string; sub: () => string; sup: () => string; padStart: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; padEnd: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; trimEnd: () => string; trimStart: () => string; trimLeft: () => string; trimRight: () => string; matchAll: (regexp: RegExp) => IterableIterator<RegExpExecArray>; replaceAll: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; at: { (index: number): string | undefined; (index: number): string; }; escapeHTML: () => string; unescapeHTML: () => string; toString: () => string; valueOf: () => string; })",
7361
+ "type": "undefined | ({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; readonly length: number; toString: () => string; concat: (...strings: string[]) => string; slice: (start?: number | undefined, end?: number | undefined) => string; indexOf: (searchString: string, position?: number | undefined) => number; lastIndexOf: (searchString: string, position?: number | undefined) => number; includes: (searchString: string, position?: number | undefined) => boolean; at: { (index: number): string | undefined; (index: number): string; }; link: (url: string) => string; search: { (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; small: () => string; sub: () => string; sup: () => string; big: () => string; blink: () => string; strike: () => string; normalize: { (form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string; (form?: string | undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; localeCompare: { (that: string): number; (that: string, locales?: string | string[] | undefined, options?: CollatorOptions | undefined): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions | undefined): number; }; match: { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }; replace: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; split: { (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; }; substring: (start: number, end?: number | undefined) => string; toLowerCase: () => string; toLocaleLowerCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; toUpperCase: () => string; toLocaleUpperCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; substr: (from: number, length?: number | undefined) => string; codePointAt: (pos: number) => number | undefined; endsWith: (searchString: string, endPosition?: number | undefined) => boolean; repeat: (count: number) => string; startsWith: (searchString: string, position?: number | undefined) => boolean; anchor: (name: string) => string; bold: () => string; fixed: () => string; fontcolor: (color: string) => string; fontsize: { (size: number): string; (size: string): string; }; italics: () => string; padStart: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; padEnd: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; trimEnd: () => string; trimStart: () => string; trimLeft: () => string; trimRight: () => string; matchAll: (regexp: RegExp) => IterableIterator<RegExpExecArray>; replaceAll: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; escapeHTML: () => string; unescapeHTML: () => string; valueOf: () => string; })",
7362
7362
  "complexType": {
7363
7363
  "original": "Omit<ItemDisplayImageSize, 'icon'>",
7364
- "resolved": "undefined | ({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; normalize: { (form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string; (form?: string | undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; concat: (...strings: string[]) => string; indexOf: (searchString: string, position?: number | undefined) => number; lastIndexOf: (searchString: string, position?: number | undefined) => number; localeCompare: { (that: string): number; (that: string, locales?: string | string[] | undefined, options?: CollatorOptions | undefined): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions | undefined): number; }; match: { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }; replace: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; search: { (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; slice: (start?: number | undefined, end?: number | undefined) => string; split: { (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; }; substring: (start: number, end?: number | undefined) => string; toLowerCase: () => string; toLocaleLowerCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; toUpperCase: () => string; toLocaleUpperCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; readonly length: number; substr: (from: number, length?: number | undefined) => string; codePointAt: (pos: number) => number | undefined; includes: (searchString: string, position?: number | undefined) => boolean; endsWith: (searchString: string, endPosition?: number | undefined) => boolean; repeat: (count: number) => string; startsWith: (searchString: string, position?: number | undefined) => boolean; anchor: (name: string) => string; big: () => string; blink: () => string; bold: () => string; fixed: () => string; fontcolor: (color: string) => string; fontsize: { (size: number): string; (size: string): string; }; italics: () => string; link: (url: string) => string; small: () => string; strike: () => string; sub: () => string; sup: () => string; padStart: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; padEnd: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; trimEnd: () => string; trimStart: () => string; trimLeft: () => string; trimRight: () => string; matchAll: (regexp: RegExp) => IterableIterator<RegExpExecArray>; replaceAll: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; at: { (index: number): string | undefined; (index: number): string; }; escapeHTML: () => string; unescapeHTML: () => string; toString: () => string; valueOf: () => string; })",
7364
+ "resolved": "undefined | ({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; readonly length: number; toString: () => string; concat: (...strings: string[]) => string; slice: (start?: number | undefined, end?: number | undefined) => string; indexOf: (searchString: string, position?: number | undefined) => number; lastIndexOf: (searchString: string, position?: number | undefined) => number; includes: (searchString: string, position?: number | undefined) => boolean; at: { (index: number): string | undefined; (index: number): string; }; link: (url: string) => string; search: { (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; small: () => string; sub: () => string; sup: () => string; big: () => string; blink: () => string; strike: () => string; normalize: { (form: \"NFC\" | \"NFD\" | \"NFKC\" | \"NFKD\"): string; (form?: string | undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; localeCompare: { (that: string): number; (that: string, locales?: string | string[] | undefined, options?: CollatorOptions | undefined): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions | undefined): number; }; match: { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }; replace: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; split: { (separator: string | RegExp, limit?: number | undefined): string[]; (splitter: { [Symbol.split](string: string, limit?: number | undefined): string[]; }, limit?: number | undefined): string[]; }; substring: (start: number, end?: number | undefined) => string; toLowerCase: () => string; toLocaleLowerCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; toUpperCase: () => string; toLocaleUpperCase: { (locales?: string | string[] | undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; substr: (from: number, length?: number | undefined) => string; codePointAt: (pos: number) => number | undefined; endsWith: (searchString: string, endPosition?: number | undefined) => boolean; repeat: (count: number) => string; startsWith: (searchString: string, position?: number | undefined) => boolean; anchor: (name: string) => string; bold: () => string; fixed: () => string; fontcolor: (color: string) => string; fontsize: { (size: number): string; (size: string): string; }; italics: () => string; padStart: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; padEnd: { (maxLength: number, fillString?: string | undefined): string; (length: number, fillStr?: string | undefined): string; }; trimEnd: () => string; trimStart: () => string; trimLeft: () => string; trimRight: () => string; matchAll: (regexp: RegExp) => IterableIterator<RegExpExecArray>; replaceAll: { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; escapeHTML: () => string; unescapeHTML: () => string; valueOf: () => string; })",
7365
7365
  "references": {
7366
7366
  "Omit": {
7367
7367
  "location": "global",
@@ -7383,7 +7383,28 @@
7383
7383
  "type": "undefined"
7384
7384
  },
7385
7385
  {
7386
- "type": "({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; normalize: { (form: \"NFC\""
7386
+ "type": "({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; readonly length: number; toString: () => string; concat: (...strings: string[]) => string; slice: (start?: number"
7387
+ },
7388
+ {
7389
+ "type": "undefined, end?: number"
7390
+ },
7391
+ {
7392
+ "type": "undefined) => string; indexOf: (searchString: string, position?: number"
7393
+ },
7394
+ {
7395
+ "type": "undefined) => number; lastIndexOf: (searchString: string, position?: number"
7396
+ },
7397
+ {
7398
+ "type": "undefined) => number; includes: (searchString: string, position?: number"
7399
+ },
7400
+ {
7401
+ "type": "undefined) => boolean; at: { (index: number): string"
7402
+ },
7403
+ {
7404
+ "type": "undefined; (index: number): string; }; link: (url: string) => string; search: { (regexp: string"
7405
+ },
7406
+ {
7407
+ "type": "RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; small: () => string; sub: () => string; sup: () => string; big: () => string; blink: () => string; strike: () => string; normalize: { (form: \"NFC\""
7387
7408
  },
7388
7409
  {
7389
7410
  "value": "NFD",
@@ -7397,13 +7418,7 @@
7397
7418
  "type": "\"NFKD\"): string; (form?: string"
7398
7419
  },
7399
7420
  {
7400
- "type": "undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; concat: (...strings: string[]) => string; indexOf: (searchString: string, position?: number"
7401
- },
7402
- {
7403
- "type": "undefined) => number; lastIndexOf: (searchString: string, position?: number"
7404
- },
7405
- {
7406
- "type": "undefined) => number; localeCompare: { (that: string): number; (that: string, locales?: string"
7421
+ "type": "undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; localeCompare: { (that: string): number; (that: string, locales?: string"
7407
7422
  },
7408
7423
  {
7409
7424
  "type": "string[]"
@@ -7433,16 +7448,7 @@
7433
7448
  "type": "RegExp, replaceValue: string): string; (searchValue: string"
7434
7449
  },
7435
7450
  {
7436
- "type": "RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; search: { (regexp: string"
7437
- },
7438
- {
7439
- "type": "RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; slice: (start?: number"
7440
- },
7441
- {
7442
- "type": "undefined, end?: number"
7443
- },
7444
- {
7445
- "type": "undefined) => string; split: { (separator: string"
7451
+ "type": "RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }; split: { (separator: string"
7446
7452
  },
7447
7453
  {
7448
7454
  "type": "RegExp, limit?: number"
@@ -7469,22 +7475,19 @@
7469
7475
  "type": "string[]"
7470
7476
  },
7471
7477
  {
7472
- "type": "undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; readonly length: number; substr: (from: number, length?: number"
7478
+ "type": "undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; substr: (from: number, length?: number"
7473
7479
  },
7474
7480
  {
7475
7481
  "type": "undefined) => string; codePointAt: (pos: number) => number"
7476
7482
  },
7477
7483
  {
7478
- "type": "undefined; includes: (searchString: string, position?: number"
7479
- },
7480
- {
7481
- "type": "undefined) => boolean; endsWith: (searchString: string, endPosition?: number"
7484
+ "type": "undefined; endsWith: (searchString: string, endPosition?: number"
7482
7485
  },
7483
7486
  {
7484
7487
  "type": "undefined) => boolean; repeat: (count: number) => string; startsWith: (searchString: string, position?: number"
7485
7488
  },
7486
7489
  {
7487
- "type": "undefined) => boolean; anchor: (name: string) => string; big: () => string; blink: () => string; bold: () => string; fixed: () => string; fontcolor: (color: string) => string; fontsize: { (size: number): string; (size: string): string; }; italics: () => string; link: (url: string) => string; small: () => string; strike: () => string; sub: () => string; sup: () => string; padStart: { (maxLength: number, fillString?: string"
7490
+ "type": "undefined) => boolean; anchor: (name: string) => string; bold: () => string; fixed: () => string; fontcolor: (color: string) => string; fontsize: { (size: number): string; (size: string): string; }; italics: () => string; padStart: { (maxLength: number, fillString?: string"
7488
7491
  },
7489
7492
  {
7490
7493
  "type": "undefined): string; (length: number, fillStr?: string"
@@ -7502,10 +7505,7 @@
7502
7505
  "type": "RegExp, replaceValue: string): string; (searchValue: string"
7503
7506
  },
7504
7507
  {
7505
- "type": "RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; at: { (index: number): string"
7506
- },
7507
- {
7508
- "type": "undefined; (index: number): string; }; escapeHTML: () => string; unescapeHTML: () => string; toString: () => string; valueOf: () => string; })"
7508
+ "type": "RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; escapeHTML: () => string; unescapeHTML: () => string; valueOf: () => string; })"
7509
7509
  }
7510
7510
  ],
7511
7511
  "optional": true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.31.0",
4
+ "version": "3.31.1-pre.4862ba88ca",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -71,8 +71,8 @@
71
71
  },
72
72
  "dependencies": {
73
73
  "@lit/context": "1.1.6",
74
- "@coveo/bueno": "1.0.23",
75
- "@coveo/headless": "3.27.6",
74
+ "@coveo/bueno": "1.0.24-pre.4862ba88ca",
75
+ "@coveo/headless": "3.27.7-pre.4862ba88ca",
76
76
  "@popperjs/core": "2.11.8",
77
77
  "@salesforce-ux/design-system": "2.27.2",
78
78
  "@stencil/core": "4.20.0",
@@ -157,8 +157,8 @@
157
157
  "wait-on": "8.0.3"
158
158
  },
159
159
  "peerDependencies": {
160
- "@coveo/bueno": "1.0.23",
161
- "@coveo/headless": "3.27.6",
160
+ "@coveo/bueno": "1.0.24-pre.4862ba88ca",
161
+ "@coveo/headless": "3.27.7-pre.4862ba88ca",
162
162
  "typescript": ">=5.0.0"
163
163
  },
164
164
  "peerDependenciesMeta": {
@@ -1,95 +0,0 @@
1
- import "../atomic-component-error/atomic-component-error.js";
2
- import Backend from 'i18next-http-backend';
3
- import { html } from 'lit';
4
- import { i18nBackendOptions, i18nTranslationNamespace, init18n, } from "./i18n.js";
5
- import { setCoveoGlobal } from "../../../global/environment.js";
6
- import { loadDayjsLocale } from "../../../utils/dayjs-locales.js";
7
- export const mismatchedInterfaceAndEnginePropError = (interfaceKind, configurationName) => `A ${configurationName} is configured on the ${interfaceKind} interface element, but the ${interfaceKind} interface was initialized with an engine. You should only configure the ${configurationName} in the target engine.`;
8
- export class CommonAtomicInterfaceHelper {
9
- constructor(atomicInterface, globalVariableName) {
10
- this.atomicInterface = atomicInterface;
11
- this.hangingComponentsInitialization = [];
12
- setCoveoGlobal(globalVariableName);
13
- if ('connectedCallback' in atomicInterface && 'render' in atomicInterface) {
14
- const { connectedCallback: originalConnectedCallback, render: originalRender, } = atomicInterface;
15
- atomicInterface.connectedCallback = () => {
16
- this.i18nPromise = init18n(atomicInterface);
17
- if (typeof originalConnectedCallback === 'function') {
18
- return originalConnectedCallback.call(atomicInterface);
19
- }
20
- return;
21
- };
22
- atomicInterface.render = () => {
23
- if (atomicInterface.error) {
24
- return html `<atomic-component-error
25
- .element=${atomicInterface}
26
- .error=${atomicInterface.error}
27
- ></atomic-component-error>`;
28
- }
29
- return typeof originalRender === 'function'
30
- ? originalRender.call(atomicInterface)
31
- : null;
32
- };
33
- }
34
- else {
35
- this.i18nPromise = init18n(atomicInterface);
36
- }
37
- }
38
- onComponentInitializing(event) {
39
- event.preventDefault();
40
- event.stopPropagation();
41
- if (this.atomicInterface.engine) {
42
- event.detail(this.atomicInterface.bindings);
43
- return;
44
- }
45
- this.hangingComponentsInitialization.push(event);
46
- }
47
- async onInitialization(initEngine) {
48
- if (this.atomicInterface.engine) {
49
- this.atomicInterface.engine.logger.warn(`The ${this.interfaceTagname} component "initialize" has already been called.`, this.atomicInterface);
50
- return;
51
- }
52
- this.atomicInterface.updateIconAssetsPath();
53
- initEngine();
54
- if (this.atomicInterface.registerFieldsToInclude) {
55
- this.atomicInterface.registerFieldsToInclude();
56
- }
57
- loadDayjsLocale(this.atomicInterface.language || 'en');
58
- await this.i18nPromise;
59
- this.initComponents();
60
- }
61
- onAnalyticsChange() {
62
- const { engine, analytics } = this.atomicInterface;
63
- if (!this.engineIsCreated(engine)) {
64
- return;
65
- }
66
- if (!analytics) {
67
- engine.disableAnalytics();
68
- return;
69
- }
70
- engine.enableAnalytics();
71
- }
72
- onLanguageChange(newLanguage) {
73
- const language = newLanguage ?? this.atomicInterface.language;
74
- const languageWithFallback = language ?? 'en';
75
- const { i18n } = this.atomicInterface;
76
- loadDayjsLocale(languageWithFallback);
77
- new Backend(i18n.services, i18nBackendOptions(this.atomicInterface)).read(languageWithFallback.split('-')[0], i18nTranslationNamespace, (_, data) => {
78
- i18n.addResourceBundle(languageWithFallback.split('-')[0], i18nTranslationNamespace, data, true, false);
79
- i18n.changeLanguage(language);
80
- });
81
- }
82
- engineIsCreated(engine) {
83
- if (!engine) {
84
- console.error(`You have to call "initialize" on the ${this.interfaceTagname} component before modifying the props or calling other public methods.`, this.atomicInterface);
85
- return false;
86
- }
87
- return true;
88
- }
89
- get interfaceTagname() {
90
- return this.atomicInterface.tagName.toLowerCase();
91
- }
92
- initComponents() {
93
- this.hangingComponentsInitialization.forEach((event) => event.detail(this.atomicInterface.bindings));
94
- }
95
- }