@coveo/atomic-angular 3.7.8-pre.f71538d21f → 3.7.8-pre.f790c888d3
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.
|
@@ -4,10 +4,31 @@ import * as i0 from '@angular/core';
|
|
|
4
4
|
import { ChangeDetectionStrategy, Component, APP_INITIALIZER, NgModule } from '@angular/core';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import { fromEvent } from 'rxjs';
|
|
7
|
-
import
|
|
7
|
+
import customElementsManifest from '@coveo/atomic/custom-elements-manifest';
|
|
8
|
+
import { defineCustomElementAtomicAutomaticFacet, defineCustomElementAtomicAutomaticFacetGenerator, defineCustomElementAtomicBreadbox, defineCustomElementAtomicCategoryFacet, defineCustomElementAtomicCitation, defineCustomElementAtomicColorFacet, defineCustomElementAtomicDidYouMean, defineCustomElementAtomicExternal, defineCustomElementAtomicFacet, defineCustomElementAtomicFacetManager, defineCustomElementAtomicFieldCondition, defineCustomElementAtomicFoldedResultList, defineCustomElementAtomicFormatCurrency, defineCustomElementAtomicFormatNumber, defineCustomElementAtomicFormatUnit, defineCustomElementAtomicGeneratedAnswer, defineCustomElementAtomicGeneratedAnswerFeedbackModal, defineCustomElementAtomicHtml, defineCustomElementAtomicInsightInterface, defineCustomElementAtomicInsightUserActionsTimeline, defineCustomElementAtomicInsightUserActionsToggle, defineCustomElementAtomicLoadMoreResults, defineCustomElementAtomicNoResults, defineCustomElementAtomicNotifications, defineCustomElementAtomicNumericFacet, defineCustomElementAtomicNumericRange, defineCustomElementAtomicPager, defineCustomElementAtomicPopover, defineCustomElementAtomicQueryError, defineCustomElementAtomicQuickview, defineCustomElementAtomicQuickviewModal, defineCustomElementAtomicRatingFacet, defineCustomElementAtomicRatingRangeFacet, defineCustomElementAtomicRecsError, defineCustomElementAtomicRecsInterface, defineCustomElementAtomicRecsList, defineCustomElementAtomicRecsResult, defineCustomElementAtomicRecsResultTemplate, defineCustomElementAtomicRefineModal, defineCustomElementAtomicRefineToggle, defineCustomElementAtomicRelevanceInspector, defineCustomElementAtomicResult, defineCustomElementAtomicResultBadge, defineCustomElementAtomicResultChildren, defineCustomElementAtomicResultChildrenTemplate, defineCustomElementAtomicResultDate, defineCustomElementAtomicResultFieldsList, defineCustomElementAtomicResultHtml, defineCustomElementAtomicResultIcon, defineCustomElementAtomicResultImage, defineCustomElementAtomicResultLink, defineCustomElementAtomicResultList, defineCustomElementAtomicResultLocalizedText, defineCustomElementAtomicResultMultiValueText, defineCustomElementAtomicResultNumber, defineCustomElementAtomicResultPrintableUri, defineCustomElementAtomicResultRating, defineCustomElementAtomicResultSectionActions, defineCustomElementAtomicResultSectionBadges, defineCustomElementAtomicResultSectionBottomMetadata, defineCustomElementAtomicResultSectionChildren, defineCustomElementAtomicResultSectionEmphasized, defineCustomElementAtomicResultSectionExcerpt, defineCustomElementAtomicResultSectionTitle, defineCustomElementAtomicResultSectionTitleMetadata, defineCustomElementAtomicResultSectionVisual, defineCustomElementAtomicResultTemplate, defineCustomElementAtomicResultText, defineCustomElementAtomicResultTimespan, defineCustomElementAtomicSearchBox, defineCustomElementAtomicSearchBoxInstantResults, defineCustomElementAtomicSearchBoxRecentQueries, defineCustomElementAtomicSearchInterface, defineCustomElementAtomicSegmentedFacet, defineCustomElementAtomicSegmentedFacetScrollable, defineCustomElementAtomicSmartSnippet, defineCustomElementAtomicSmartSnippetFeedbackModal, defineCustomElementAtomicSmartSnippetSuggestions, defineCustomElementAtomicSortDropdown, defineCustomElementAtomicSortExpression, defineCustomElementAtomicTab, defineCustomElementAtomicTabManager, defineCustomElementAtomicTableElement, defineCustomElementAtomicText, defineCustomElementAtomicTimeframe, defineCustomElementAtomicTimeframeFacet, AtomicCommerceBreadbox as AtomicCommerceBreadbox$1, AtomicCommerceCategoryFacet as AtomicCommerceCategoryFacet$1, AtomicCommerceDidYouMean as AtomicCommerceDidYouMean$1, AtomicCommerceFacet as AtomicCommerceFacet$1, AtomicCommerceFacets as AtomicCommerceFacets$1, AtomicCommerceInterface as AtomicCommerceInterface$1, AtomicCommerceLayout as AtomicCommerceLayout$1, AtomicCommerceLoadMoreProducts as AtomicCommerceLoadMoreProducts$1, AtomicCommerceNoProducts as AtomicCommerceNoProducts$1, AtomicCommerceNumericFacet as AtomicCommerceNumericFacet$1, AtomicCommercePager as AtomicCommercePager$1, AtomicCommerceProductList as AtomicCommerceProductList$1, AtomicCommerceProductsPerPage as AtomicCommerceProductsPerPage$1, AtomicCommerceQueryError as AtomicCommerceQueryError$1, AtomicCommerceQuerySummary as AtomicCommerceQuerySummary$1, AtomicCommerceRecommendationInterface as AtomicCommerceRecommendationInterface$1, AtomicCommerceRecommendationList as AtomicCommerceRecommendationList$1, AtomicCommerceRefineModal as AtomicCommerceRefineModal$1, AtomicCommerceRefineToggle as AtomicCommerceRefineToggle$1, AtomicCommerceSearchBoxInstantProducts as AtomicCommerceSearchBoxInstantProducts$1, AtomicCommerceSearchBoxQuerySuggestions as AtomicCommerceSearchBoxQuerySuggestions$1, AtomicCommerceSearchBoxRecentQueries as AtomicCommerceSearchBoxRecentQueries$1, AtomicCommerceSearchBox as AtomicCommerceSearchBox$1, AtomicCommerceSortDropdown as AtomicCommerceSortDropdown$1, AtomicCommerceText as AtomicCommerceText$1, AtomicCommerceTimeframeFacet as AtomicCommerceTimeframeFacet$1, AtomicProductChildren as AtomicProductChildren$1, AtomicProductDescription as AtomicProductDescription$1, AtomicProductExcerpt as AtomicProductExcerpt$1, AtomicProductFieldCondition as AtomicProductFieldCondition$1, AtomicProductImage as AtomicProductImage$1, AtomicProductLink as AtomicProductLink$1, AtomicProductMultiValueText as AtomicProductMultiValueText$1, AtomicProductNumericFieldValue as AtomicProductNumericFieldValue$1, AtomicProductPrice as AtomicProductPrice$1, AtomicProductRating as AtomicProductRating$1, AtomicProductSectionActions as AtomicProductSectionActions$1, AtomicProductSectionBadges as AtomicProductSectionBadges$1, AtomicProductSectionBottomMetadata as AtomicProductSectionBottomMetadata$1, AtomicProductSectionChildren as AtomicProductSectionChildren$1, AtomicProductSectionDescription as AtomicProductSectionDescription$1, AtomicProductSectionEmphasized as AtomicProductSectionEmphasized$1, AtomicProductSectionMetadata as AtomicProductSectionMetadata$1, AtomicProductSectionName as AtomicProductSectionName$1, AtomicProductSectionVisual as AtomicProductSectionVisual$1, AtomicProductTemplate as AtomicProductTemplate$1, AtomicProductText as AtomicProductText$1, AtomicProduct as AtomicProduct$1, AtomicAriaLive as AtomicAriaLive$1, AtomicComponentError as AtomicComponentError$1, AtomicIcon as AtomicIcon$1, AtomicLayoutSection as AtomicLayoutSection$1, AtomicQuerySummary as AtomicQuerySummary$1, AtomicResultsPerPage as AtomicResultsPerPage$1, AtomicSearchBoxQuerySuggestions as AtomicSearchBoxQuerySuggestions$1, AtomicSearchLayout as AtomicSearchLayout$1 } from '@coveo/atomic/components';
|
|
8
9
|
|
|
9
10
|
/* eslint-disable */
|
|
10
11
|
/* tslint:disable */
|
|
12
|
+
const createPropertyToAttributeMap = () => {
|
|
13
|
+
const map = new Map();
|
|
14
|
+
customElementsManifest.modules.forEach((module) => {
|
|
15
|
+
module.declarations?.forEach((declaration) => {
|
|
16
|
+
if (declaration.kind === 'class' && declaration.attributes) {
|
|
17
|
+
declaration.attributes.forEach((attr) => {
|
|
18
|
+
if (attr.fieldName && attr.name) {
|
|
19
|
+
map.set(attr.fieldName, attr.name);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
return map;
|
|
26
|
+
};
|
|
27
|
+
const propertyToAttributeMap = createPropertyToAttributeMap();
|
|
28
|
+
const getAttributeName = (propertyName) => {
|
|
29
|
+
const mappedAttr = propertyToAttributeMap.get(propertyName);
|
|
30
|
+
return mappedAttr || propertyName.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
31
|
+
};
|
|
11
32
|
const proxyInputs = (Cmp, inputs) => {
|
|
12
33
|
const Prototype = Cmp.prototype;
|
|
13
34
|
inputs.forEach((item) => {
|
|
@@ -16,7 +37,10 @@ const proxyInputs = (Cmp, inputs) => {
|
|
|
16
37
|
return this.el[item];
|
|
17
38
|
},
|
|
18
39
|
set(val) {
|
|
19
|
-
this.z.runOutsideAngular(() =>
|
|
40
|
+
this.z.runOutsideAngular(() => {
|
|
41
|
+
const attrName = getAttributeName(item);
|
|
42
|
+
this.el.setAttribute(attrName, val);
|
|
43
|
+
});
|
|
20
44
|
},
|
|
21
45
|
/**
|
|
22
46
|
* In the event that proxyInputs is called
|
|
@@ -1952,33 +1976,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
1952
1976
|
inputs: ['ariaLabelGenerator', 'density', 'imageSize', 'maxResultsPerQuery'],
|
|
1953
1977
|
}]
|
|
1954
1978
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
1955
|
-
let AtomicSearchBoxQuerySuggestions = class AtomicSearchBoxQuerySuggestions {
|
|
1956
|
-
z;
|
|
1957
|
-
el;
|
|
1958
|
-
constructor(c, r, z) {
|
|
1959
|
-
this.z = z;
|
|
1960
|
-
c.detach();
|
|
1961
|
-
this.el = r.nativeElement;
|
|
1962
|
-
}
|
|
1963
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchBoxQuerySuggestions, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1964
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicSearchBoxQuerySuggestions, isStandalone: false, selector: "atomic-search-box-query-suggestions", inputs: { icon: "icon", maxWithQuery: "maxWithQuery", maxWithoutQuery: "maxWithoutQuery" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1965
|
-
};
|
|
1966
|
-
AtomicSearchBoxQuerySuggestions = __decorate([
|
|
1967
|
-
ProxyCmp({
|
|
1968
|
-
inputs: ['icon', 'maxWithQuery', 'maxWithoutQuery'],
|
|
1969
|
-
defineCustomElementFn: defineCustomElementAtomicSearchBoxQuerySuggestions
|
|
1970
|
-
})
|
|
1971
|
-
], AtomicSearchBoxQuerySuggestions);
|
|
1972
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchBoxQuerySuggestions, decorators: [{
|
|
1973
|
-
type: Component,
|
|
1974
|
-
args: [{ standalone: false,
|
|
1975
|
-
selector: 'atomic-search-box-query-suggestions',
|
|
1976
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1977
|
-
template: '<ng-content></ng-content>',
|
|
1978
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
1979
|
-
inputs: ['icon', 'maxWithQuery', 'maxWithoutQuery'],
|
|
1980
|
-
}]
|
|
1981
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
1982
1979
|
let AtomicSearchBoxRecentQueries = class AtomicSearchBoxRecentQueries {
|
|
1983
1980
|
z;
|
|
1984
1981
|
el;
|
|
@@ -2540,7 +2537,7 @@ let AtomicCommerceInterface = class AtomicCommerceInterface {
|
|
|
2540
2537
|
AtomicCommerceInterface = __decorate([
|
|
2541
2538
|
ProxyCmp({
|
|
2542
2539
|
inputs: ['type', 'analytics', 'logLevel', 'language', 'reflectStateInUrl', 'disableStateReflectionInUrl', 'scrollContainer', 'languageAssetsPath', 'iconAssetsPath'],
|
|
2543
|
-
methods: ['initialize', 'initializeWithEngine', 'executeFirstRequest', 'toggleAnalytics', 'updateIconAssetsPath', 'updateLanguage', 'scrollToTop'],
|
|
2540
|
+
methods: ['initialize', 'initializeWithEngine', 'executeFirstRequest', 'updateLocale', 'toggleAnalytics', 'updateIconAssetsPath', 'updateLanguage', 'scrollToTop'],
|
|
2544
2541
|
defineCustomElementFn: () => { customElements.get('atomic-commerce-interface') || customElements.define('atomic-commerce-interface', AtomicCommerceInterface$1); }
|
|
2545
2542
|
})
|
|
2546
2543
|
], AtomicCommerceInterface);
|
|
@@ -3954,6 +3951,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
3954
3951
|
inputs: ['choicesDisplayed', 'initialChoice']
|
|
3955
3952
|
}]
|
|
3956
3953
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
3954
|
+
let AtomicSearchBoxQuerySuggestions = class AtomicSearchBoxQuerySuggestions {
|
|
3955
|
+
z;
|
|
3956
|
+
el;
|
|
3957
|
+
constructor(c, el, z) {
|
|
3958
|
+
this.z = z;
|
|
3959
|
+
c.detach();
|
|
3960
|
+
this.el = el.nativeElement;
|
|
3961
|
+
}
|
|
3962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchBoxQuerySuggestions, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicSearchBoxQuerySuggestions, isStandalone: false, selector: "atomic-search-box-query-suggestions", inputs: { icon: "icon", maxWithQuery: "maxWithQuery", maxWithoutQuery: "maxWithoutQuery" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3964
|
+
};
|
|
3965
|
+
AtomicSearchBoxQuerySuggestions = __decorate([
|
|
3966
|
+
ProxyCmp({
|
|
3967
|
+
inputs: ['icon', 'maxWithQuery', 'maxWithoutQuery'],
|
|
3968
|
+
methods: ['initialize'],
|
|
3969
|
+
defineCustomElementFn: () => { customElements.get('atomic-search-box-query-suggestions') || customElements.define('atomic-search-box-query-suggestions', AtomicSearchBoxQuerySuggestions$1); }
|
|
3970
|
+
})
|
|
3971
|
+
], AtomicSearchBoxQuerySuggestions);
|
|
3972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchBoxQuerySuggestions, decorators: [{
|
|
3973
|
+
type: Component,
|
|
3974
|
+
args: [{
|
|
3975
|
+
selector: 'atomic-search-box-query-suggestions',
|
|
3976
|
+
standalone: false,
|
|
3977
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3978
|
+
template: '<ng-content></ng-content>',
|
|
3979
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
3980
|
+
inputs: ['icon', 'maxWithQuery', 'maxWithoutQuery']
|
|
3981
|
+
}]
|
|
3982
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
3957
3983
|
let AtomicSearchLayout = class AtomicSearchLayout {
|
|
3958
3984
|
z;
|
|
3959
3985
|
el;
|
|
@@ -4041,6 +4067,7 @@ const DECLARATIONS = [
|
|
|
4041
4067
|
AtomicProductText,
|
|
4042
4068
|
AtomicQuerySummary,
|
|
4043
4069
|
AtomicResultsPerPage,
|
|
4070
|
+
AtomicSearchBoxQuerySuggestions,
|
|
4044
4071
|
AtomicSearchLayout,
|
|
4045
4072
|
AtomicAutomaticFacet,
|
|
4046
4073
|
AtomicAutomaticFacetGenerator,
|
|
@@ -4113,7 +4140,6 @@ const DECLARATIONS = [
|
|
|
4113
4140
|
AtomicResultTimespan,
|
|
4114
4141
|
AtomicSearchBox,
|
|
4115
4142
|
AtomicSearchBoxInstantResults,
|
|
4116
|
-
AtomicSearchBoxQuerySuggestions,
|
|
4117
4143
|
AtomicSearchBoxRecentQueries,
|
|
4118
4144
|
AtomicSearchInterface,
|
|
4119
4145
|
AtomicSegmentedFacet,
|
|
@@ -4215,6 +4241,7 @@ class AtomicAngularModule {
|
|
|
4215
4241
|
AtomicProductText,
|
|
4216
4242
|
AtomicQuerySummary,
|
|
4217
4243
|
AtomicResultsPerPage,
|
|
4244
|
+
AtomicSearchBoxQuerySuggestions,
|
|
4218
4245
|
AtomicSearchLayout,
|
|
4219
4246
|
AtomicAutomaticFacet,
|
|
4220
4247
|
AtomicAutomaticFacetGenerator,
|
|
@@ -4287,7 +4314,6 @@ class AtomicAngularModule {
|
|
|
4287
4314
|
AtomicResultTimespan,
|
|
4288
4315
|
AtomicSearchBox,
|
|
4289
4316
|
AtomicSearchBoxInstantResults,
|
|
4290
|
-
AtomicSearchBoxQuerySuggestions,
|
|
4291
4317
|
AtomicSearchBoxRecentQueries,
|
|
4292
4318
|
AtomicSearchInterface,
|
|
4293
4319
|
AtomicSegmentedFacet,
|
|
@@ -4356,6 +4382,7 @@ class AtomicAngularModule {
|
|
|
4356
4382
|
AtomicProductText,
|
|
4357
4383
|
AtomicQuerySummary,
|
|
4358
4384
|
AtomicResultsPerPage,
|
|
4385
|
+
AtomicSearchBoxQuerySuggestions,
|
|
4359
4386
|
AtomicSearchLayout,
|
|
4360
4387
|
AtomicAutomaticFacet,
|
|
4361
4388
|
AtomicAutomaticFacetGenerator,
|
|
@@ -4428,7 +4455,6 @@ class AtomicAngularModule {
|
|
|
4428
4455
|
AtomicResultTimespan,
|
|
4429
4456
|
AtomicSearchBox,
|
|
4430
4457
|
AtomicSearchBoxInstantResults,
|
|
4431
|
-
AtomicSearchBoxQuerySuggestions,
|
|
4432
4458
|
AtomicSearchBoxRecentQueries,
|
|
4433
4459
|
AtomicSearchInterface,
|
|
4434
4460
|
AtomicSegmentedFacet,
|