@coveo/atomic 3.31.2-pre.da74c43571 → 3.31.2-pre.dbdab38fe6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atomic/_atomic.esm.js +1 -1
- package/dist/atomic/components/analytics-config.js +299 -235
- package/dist/atomic/components/analytics-config.js.map +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +26 -15
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +35 -16
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +0 -3
- package/dist/atomic/components/components/common/interface/interface-common.js +95 -0
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/{p-ef45ff5c.entry.js → p-062ba992.entry.js} +2 -2
- package/dist/atomic/p-1226244c.js +2 -0
- package/dist/atomic/p-1226244c.js.map +1 -0
- package/dist/atomic/{p-7db6d666.entry.js → p-30a955cc.entry.js} +2 -2
- package/dist/atomic/{p-6c412aa0.entry.js → p-739a1a93.entry.js} +2 -2
- package/dist/cjs/{analytics-config-e18c57f7.js → analytics-config-ebc13649.js} +300 -236
- package/dist/cjs/analytics-config-ebc13649.js.map +1 -0
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/{analytics-config-b8b6bdbb.js → analytics-config-3ce0ea6f.js} +300 -236
- package/dist/esm/analytics-config-3ce0ea6f.js.map +1 -0
- package/dist/esm/atomic-insight-interface.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +1 -1
- package/dist/esm/atomic-search-interface.entry.js +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +4 -3
- package/dist/types/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.d.ts +6 -5
- package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +0 -3
- package/dist/types/components/common/interface/i18n.d.ts +1 -1
- package/dist/types/components/common/interface/{interface-controller.d.ts → interface-common.d.ts} +11 -14
- package/docs/atomic-docs.json +38 -33
- package/package.json +5 -5
- package/dist/atomic/components/components/common/interface/interface-controller.js +0 -89
- package/dist/atomic/p-d99e359b.js +0 -2
- package/dist/atomic/p-d99e359b.js.map +0 -1
- package/dist/cjs/analytics-config-e18c57f7.js.map +0 -1
- package/dist/esm/analytics-config-b8b6bdbb.js.map +0 -1
- /package/dist/atomic/{p-ef45ff5c.entry.js.map → p-062ba992.entry.js.map} +0 -0
- /package/dist/atomic/{p-7db6d666.entry.js.map → p-30a955cc.entry.js.map} +0 -0
- /package/dist/atomic/{p-6c412aa0.entry.js.map → p-739a1a93.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-
|
|
4
|
+
import { g as getNextAnalyticsConfig, a as augmentWithExternalMiddleware, b as augmentAnalyticsWithAtomicVersion, C as CommonAtomicInterfaceHelper, i as instance } from './analytics-config-3ce0ea6f.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-
|
|
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-3ce0ea6f.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-
|
|
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-3ce0ea6f.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';
|
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const headlessVersion = '3.27.8-pre.
|
|
2
|
-
export const atomicVersion = '3.31.2-pre.
|
|
1
|
+
export const headlessVersion = '3.27.8-pre.dbdab38fe6';
|
|
2
|
+
export const atomicVersion = '3.31.2-pre.dbdab38fe6';
|
package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts
CHANGED
|
@@ -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-
|
|
5
|
+
import { type BaseAtomicInterface } from '../../common/interface/interface-common';
|
|
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
|
|
29
|
-
error
|
|
28
|
+
private commonInterfaceHelper;
|
|
29
|
+
error?: Error;
|
|
30
30
|
static styles: CSSResultGroup;
|
|
31
31
|
/**
|
|
32
32
|
* The type of the interface.
|
|
@@ -107,6 +107,7 @@ export declare class AtomicCommerceInterface extends AtomicCommerceInterface_bas
|
|
|
107
107
|
private getBindings;
|
|
108
108
|
private initEngine;
|
|
109
109
|
private get fragment();
|
|
110
|
+
private initAriaLive;
|
|
110
111
|
private initUrlManager;
|
|
111
112
|
private initRequestStatus;
|
|
112
113
|
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 { CommonBindings } from '../../common/interface/bindings.js';
|
|
6
|
-
import { type BaseAtomicInterface } from '../../common/interface/interface-
|
|
5
|
+
import type { AdoptedStylesBindings, CommonBindings } from '../../common/interface/bindings.js';
|
|
6
|
+
import { type BaseAtomicInterface } from '../../common/interface/interface-common.js';
|
|
7
7
|
import { type CommerceRecommendationStore } from './store.js';
|
|
8
8
|
export type CommerceInitializationOptions = CommerceEngineConfiguration;
|
|
9
|
-
export type CommerceBindings = CommonBindings<CommerceEngine, CommerceRecommendationStore, AtomicCommerceRecommendationInterface
|
|
9
|
+
export type CommerceBindings = CommonBindings<CommerceEngine, CommerceRecommendationStore, AtomicCommerceRecommendationInterface> & AdoptedStylesBindings;
|
|
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
|
|
19
|
+
error?: Error;
|
|
20
20
|
context: Context;
|
|
21
21
|
store: CommerceRecommendationStore;
|
|
22
|
-
private
|
|
22
|
+
private commonInterfaceHelper;
|
|
23
23
|
static styles: CSSResultGroup;
|
|
24
24
|
/**
|
|
25
25
|
* The commerce interface i18next instance.
|
|
@@ -98,6 +98,7 @@ export declare class AtomicCommerceRecommendationInterface extends AtomicCommerc
|
|
|
98
98
|
private handleInitialization;
|
|
99
99
|
private scrollToTop;
|
|
100
100
|
private internalInitialization;
|
|
101
|
+
private initAriaLive;
|
|
101
102
|
private initContext;
|
|
102
103
|
private getBindings;
|
|
103
104
|
private initLanguage;
|
package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts
CHANGED
|
@@ -3,9 +3,6 @@ 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';
|
|
9
6
|
/**
|
|
10
7
|
* 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.
|
|
11
8
|
*
|
|
@@ -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-
|
|
3
|
+
import type { BaseAtomicInterface } from './interface-common';
|
|
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>>;
|
package/dist/types/components/common/interface/{interface-controller.d.ts → interface-common.d.ts}
RENAMED
|
@@ -1,36 +1,33 @@
|
|
|
1
|
+
import "../atomic-component-error/atomic-component-error.js";
|
|
1
2
|
import type { LogLevel } from '@coveo/headless';
|
|
2
3
|
import type { i18n } from 'i18next';
|
|
3
|
-
import type {
|
|
4
|
-
import type { AnyBindings, AnyEngineType } from './bindings';
|
|
4
|
+
import type { AnyBindings, AnyEngineType } from "./bindings.js";
|
|
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;
|
|
10
11
|
languageAssetsPath: string;
|
|
11
12
|
iconAssetsPath: string;
|
|
12
|
-
bindings: AnyBindings;
|
|
13
|
-
updateIconAssetsPath(): void;
|
|
14
|
-
error: Error;
|
|
15
|
-
engine?: EngineType;
|
|
16
13
|
logLevel?: LogLevel;
|
|
17
14
|
language?: string;
|
|
15
|
+
bindings: AnyBindings;
|
|
16
|
+
error?: Error;
|
|
17
|
+
updateIconAssetsPath(): void;
|
|
18
18
|
registerFieldsToInclude?: () => void;
|
|
19
19
|
}
|
|
20
|
-
export declare
|
|
21
|
-
|
|
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;
|
|
22
23
|
private i18nPromise;
|
|
23
24
|
private hangingComponentsInitialization;
|
|
24
|
-
constructor(
|
|
25
|
-
hostConnected(): void;
|
|
26
|
-
hostDisconnected(): void;
|
|
25
|
+
constructor(atomicInterface: BaseAtomicInterface<Engine> & HTMLElement, globalVariableName: string);
|
|
27
26
|
onComponentInitializing(event: InitializeEvent): void;
|
|
28
27
|
onInitialization(initEngine: () => void): Promise<void>;
|
|
29
28
|
onAnalyticsChange(): void;
|
|
30
29
|
onLanguageChange(newLanguage?: string): void;
|
|
31
|
-
engineIsCreated(engine?:
|
|
30
|
+
engineIsCreated(engine?: Engine): engine is Engine;
|
|
32
31
|
private get interfaceTagname();
|
|
33
32
|
private initComponents;
|
|
34
|
-
private initAriaLive;
|
|
35
|
-
private removeAriaLive;
|
|
36
33
|
}
|
package/docs/atomic-docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-07-
|
|
2
|
+
"timestamp": "2025-07-31T14:20:07",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.20.0",
|
|
@@ -7209,10 +7209,10 @@
|
|
|
7209
7209
|
"props": [
|
|
7210
7210
|
{
|
|
7211
7211
|
"name": "imageSize",
|
|
7212
|
-
"type": "undefined | ({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>;
|
|
7212
|
+
"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; })",
|
|
7213
7213
|
"complexType": {
|
|
7214
7214
|
"original": "Omit<ItemDisplayImageSize, 'icon'>",
|
|
7215
|
-
"resolved": "undefined | ({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>;
|
|
7215
|
+
"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; })",
|
|
7216
7216
|
"references": {
|
|
7217
7217
|
"Omit": {
|
|
7218
7218
|
"location": "global",
|
|
@@ -7234,28 +7234,7 @@
|
|
|
7234
7234
|
"type": "undefined"
|
|
7235
7235
|
},
|
|
7236
7236
|
{
|
|
7237
|
-
"type": "({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>;
|
|
7238
|
-
},
|
|
7239
|
-
{
|
|
7240
|
-
"type": "undefined, end?: number"
|
|
7241
|
-
},
|
|
7242
|
-
{
|
|
7243
|
-
"type": "undefined) => string; indexOf: (searchString: string, position?: number"
|
|
7244
|
-
},
|
|
7245
|
-
{
|
|
7246
|
-
"type": "undefined) => number; lastIndexOf: (searchString: string, position?: number"
|
|
7247
|
-
},
|
|
7248
|
-
{
|
|
7249
|
-
"type": "undefined) => number; includes: (searchString: string, position?: number"
|
|
7250
|
-
},
|
|
7251
|
-
{
|
|
7252
|
-
"type": "undefined) => boolean; at: { (index: number): string"
|
|
7253
|
-
},
|
|
7254
|
-
{
|
|
7255
|
-
"type": "undefined; (index: number): string; }; link: (url: string) => string; search: { (regexp: string"
|
|
7256
|
-
},
|
|
7257
|
-
{
|
|
7258
|
-
"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\""
|
|
7237
|
+
"type": "({ readonly [x: number]: string; [Symbol.iterator]: () => IterableIterator<string>; normalize: { (form: \"NFC\""
|
|
7259
7238
|
},
|
|
7260
7239
|
{
|
|
7261
7240
|
"value": "NFD",
|
|
@@ -7269,7 +7248,13 @@
|
|
|
7269
7248
|
"type": "\"NFKD\"): string; (form?: string"
|
|
7270
7249
|
},
|
|
7271
7250
|
{
|
|
7272
|
-
"type": "undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number;
|
|
7251
|
+
"type": "undefined): string; }; charAt: (pos: number) => string; charCodeAt: (index: number) => number; concat: (...strings: string[]) => string; indexOf: (searchString: string, position?: number"
|
|
7252
|
+
},
|
|
7253
|
+
{
|
|
7254
|
+
"type": "undefined) => number; lastIndexOf: (searchString: string, position?: number"
|
|
7255
|
+
},
|
|
7256
|
+
{
|
|
7257
|
+
"type": "undefined) => number; localeCompare: { (that: string): number; (that: string, locales?: string"
|
|
7273
7258
|
},
|
|
7274
7259
|
{
|
|
7275
7260
|
"type": "string[]"
|
|
@@ -7299,7 +7284,16 @@
|
|
|
7299
7284
|
"type": "RegExp, replaceValue: string): string; (searchValue: string"
|
|
7300
7285
|
},
|
|
7301
7286
|
{
|
|
7302
|
-
"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; };
|
|
7287
|
+
"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"
|
|
7288
|
+
},
|
|
7289
|
+
{
|
|
7290
|
+
"type": "RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }; slice: (start?: number"
|
|
7291
|
+
},
|
|
7292
|
+
{
|
|
7293
|
+
"type": "undefined, end?: number"
|
|
7294
|
+
},
|
|
7295
|
+
{
|
|
7296
|
+
"type": "undefined) => string; split: { (separator: string"
|
|
7303
7297
|
},
|
|
7304
7298
|
{
|
|
7305
7299
|
"type": "RegExp, limit?: number"
|
|
@@ -7326,19 +7320,22 @@
|
|
|
7326
7320
|
"type": "string[]"
|
|
7327
7321
|
},
|
|
7328
7322
|
{
|
|
7329
|
-
"type": "undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; substr: (from: number, length?: number"
|
|
7323
|
+
"type": "undefined): string; (locales?: LocalesArgument): string; }; trim: () => string; readonly length: number; substr: (from: number, length?: number"
|
|
7330
7324
|
},
|
|
7331
7325
|
{
|
|
7332
7326
|
"type": "undefined) => string; codePointAt: (pos: number) => number"
|
|
7333
7327
|
},
|
|
7334
7328
|
{
|
|
7335
|
-
"type": "undefined;
|
|
7329
|
+
"type": "undefined; includes: (searchString: string, position?: number"
|
|
7330
|
+
},
|
|
7331
|
+
{
|
|
7332
|
+
"type": "undefined) => boolean; endsWith: (searchString: string, endPosition?: number"
|
|
7336
7333
|
},
|
|
7337
7334
|
{
|
|
7338
7335
|
"type": "undefined) => boolean; repeat: (count: number) => string; startsWith: (searchString: string, position?: number"
|
|
7339
7336
|
},
|
|
7340
7337
|
{
|
|
7341
|
-
"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"
|
|
7338
|
+
"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"
|
|
7342
7339
|
},
|
|
7343
7340
|
{
|
|
7344
7341
|
"type": "undefined): string; (length: number, fillStr?: string"
|
|
@@ -7356,7 +7353,10 @@
|
|
|
7356
7353
|
"type": "RegExp, replaceValue: string): string; (searchValue: string"
|
|
7357
7354
|
},
|
|
7358
7355
|
{
|
|
7359
|
-
"type": "RegExp, replacer: (substring: string, ...args: any[]) => string): string; };
|
|
7356
|
+
"type": "RegExp, replacer: (substring: string, ...args: any[]) => string): string; }; at: { (index: number): string"
|
|
7357
|
+
},
|
|
7358
|
+
{
|
|
7359
|
+
"type": "undefined; (index: number): string; }; escapeHTML: () => string; unescapeHTML: () => string; toString: () => string; valueOf: () => string; })"
|
|
7360
7360
|
}
|
|
7361
7361
|
],
|
|
7362
7362
|
"optional": true,
|
|
@@ -9063,7 +9063,7 @@
|
|
|
9063
9063
|
"i18n": {
|
|
9064
9064
|
"location": "import",
|
|
9065
9065
|
"path": "i18next",
|
|
9066
|
-
"id": "node_modules::i18n"
|
|
9066
|
+
"id": "../../node_modules/i18next/index.d.mts::i18n"
|
|
9067
9067
|
}
|
|
9068
9068
|
}
|
|
9069
9069
|
},
|
|
@@ -14527,7 +14527,7 @@
|
|
|
14527
14527
|
"i18n": {
|
|
14528
14528
|
"location": "import",
|
|
14529
14529
|
"path": "i18next",
|
|
14530
|
-
"id": "node_modules::i18n"
|
|
14530
|
+
"id": "../../node_modules/i18next/index.d.mts::i18n"
|
|
14531
14531
|
}
|
|
14532
14532
|
}
|
|
14533
14533
|
},
|
|
@@ -17573,6 +17573,11 @@
|
|
|
17573
17573
|
"docstring": "",
|
|
17574
17574
|
"path": "../headless/dist/definitions/index.d.ts"
|
|
17575
17575
|
},
|
|
17576
|
+
"../../node_modules/i18next/index.d.mts::i18n": {
|
|
17577
|
+
"declaration": "export interface i18n extends i18nextMod.i18n, CustomInstanceExtensions {}",
|
|
17578
|
+
"docstring": "",
|
|
17579
|
+
"path": "../../node_modules/i18next/index.d.mts"
|
|
17580
|
+
},
|
|
17576
17581
|
"../headless/dist/definitions/index.d.ts::SearchEngine": {
|
|
17577
17582
|
"declaration": "any",
|
|
17578
17583
|
"docstring": "",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveo/atomic",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.31.2-pre.
|
|
4
|
+
"version": "3.31.2-pre.dbdab38fe6",
|
|
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": {
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"validate:definitions": "tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@coveo/bueno": "1.0.24",
|
|
74
|
-
"@coveo/headless": "3.27.8-pre.da74c43571",
|
|
75
73
|
"@lit/context": "1.1.6",
|
|
74
|
+
"@coveo/bueno": "1.0.24",
|
|
75
|
+
"@coveo/headless": "3.27.8-pre.dbdab38fe6",
|
|
76
76
|
"@popperjs/core": "2.11.8",
|
|
77
77
|
"@salesforce-ux/design-system": "2.27.2",
|
|
78
78
|
"@stencil/core": "4.20.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"dompurify": "3.2.6",
|
|
81
81
|
"escape-html": "1.0.3",
|
|
82
82
|
"focus-visible": "5.2.1",
|
|
83
|
-
"i18next": "
|
|
83
|
+
"i18next": "24.2.3",
|
|
84
84
|
"i18next-http-backend": "3.0.2",
|
|
85
85
|
"lit": "3.3.1",
|
|
86
86
|
"marked": "12.0.2",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
},
|
|
159
159
|
"peerDependencies": {
|
|
160
160
|
"@coveo/bueno": "1.0.24",
|
|
161
|
-
"@coveo/headless": "3.27.8-pre.
|
|
161
|
+
"@coveo/headless": "3.27.8-pre.dbdab38fe6",
|
|
162
162
|
"typescript": ">=5.0.0"
|
|
163
163
|
},
|
|
164
164
|
"peerDependenciesMeta": {
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import Backend from 'i18next-http-backend';
|
|
2
|
-
import { setCoveoGlobal } from "../../../global/environment";
|
|
3
|
-
import { loadDayjsLocale } from "../../../utils/dayjs-locales";
|
|
4
|
-
import { i18nBackendOptions, i18nTranslationNamespace, init18n } from './i18n';
|
|
5
|
-
export class InterfaceController {
|
|
6
|
-
constructor(host, globalVariableName) {
|
|
7
|
-
this.hangingComponentsInitialization = [];
|
|
8
|
-
this.host = host;
|
|
9
|
-
this.host.addController(this);
|
|
10
|
-
setCoveoGlobal(globalVariableName);
|
|
11
|
-
}
|
|
12
|
-
hostConnected() {
|
|
13
|
-
this.i18nPromise = init18n(this.host);
|
|
14
|
-
this.initAriaLive();
|
|
15
|
-
}
|
|
16
|
-
hostDisconnected() {
|
|
17
|
-
this.removeAriaLive();
|
|
18
|
-
}
|
|
19
|
-
onComponentInitializing(event) {
|
|
20
|
-
event.preventDefault();
|
|
21
|
-
event.stopPropagation();
|
|
22
|
-
if (this.host.engine) {
|
|
23
|
-
event.detail(this.host.bindings);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
this.hangingComponentsInitialization.push(event);
|
|
27
|
-
}
|
|
28
|
-
async onInitialization(initEngine) {
|
|
29
|
-
if (this.host.engine) {
|
|
30
|
-
this.host.engine.logger.warn(`The ${this.interfaceTagname} component "initialize" has already been called.`, this.host);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
this.host.updateIconAssetsPath();
|
|
34
|
-
initEngine();
|
|
35
|
-
if (this.host.registerFieldsToInclude) {
|
|
36
|
-
this.host.registerFieldsToInclude();
|
|
37
|
-
}
|
|
38
|
-
loadDayjsLocale(this.host.language || 'en');
|
|
39
|
-
await this.i18nPromise;
|
|
40
|
-
this.initComponents();
|
|
41
|
-
}
|
|
42
|
-
onAnalyticsChange() {
|
|
43
|
-
const { engine, analytics } = this.host;
|
|
44
|
-
if (!this.engineIsCreated(engine)) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (!analytics) {
|
|
48
|
-
engine.disableAnalytics();
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
engine.enableAnalytics();
|
|
52
|
-
}
|
|
53
|
-
onLanguageChange(newLanguage) {
|
|
54
|
-
const language = newLanguage ?? this.host.language;
|
|
55
|
-
const languageWithFallback = language ?? 'en';
|
|
56
|
-
const { i18n } = this.host;
|
|
57
|
-
loadDayjsLocale(languageWithFallback);
|
|
58
|
-
new Backend(i18n.services, i18nBackendOptions(this.host)).read(languageWithFallback.split('-')[0], i18nTranslationNamespace, (_, data) => {
|
|
59
|
-
i18n.addResourceBundle(languageWithFallback.split('-')[0], i18nTranslationNamespace, data, true, false);
|
|
60
|
-
i18n.changeLanguage(language);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
engineIsCreated(engine) {
|
|
64
|
-
if (!engine) {
|
|
65
|
-
console.error(`You have to call "initialize" on the ${this.interfaceTagname} component before modifying the props or calling other public methods.`, this.host);
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
get interfaceTagname() {
|
|
71
|
-
return this.host.tagName.toLowerCase();
|
|
72
|
-
}
|
|
73
|
-
initComponents() {
|
|
74
|
-
this.hangingComponentsInitialization.forEach((event) => event.detail(this.host.bindings));
|
|
75
|
-
}
|
|
76
|
-
initAriaLive() {
|
|
77
|
-
if (Array.from(this.host.children).some((element) => element.tagName === 'ATOMIC-ARIA-LIVE')) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const ariaLive = document.createElement('atomic-aria-live');
|
|
81
|
-
this.host.prepend(ariaLive);
|
|
82
|
-
}
|
|
83
|
-
removeAriaLive() {
|
|
84
|
-
const ariaLive = this.host.querySelector('atomic-aria-live');
|
|
85
|
-
if (ariaLive) {
|
|
86
|
-
ariaLive.remove();
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|