@coveo/atomic-angular 3.7.8-pre.e3728c3548 → 3.7.8-pre.e427c1e54b
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, defineCustomElementAtomicSearchBoxQuerySuggestions, 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, 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
|
|
@@ -2006,6 +2030,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
2006
2030
|
inputs: ['icon', 'maxWithQuery', 'maxWithoutQuery'],
|
|
2007
2031
|
}]
|
|
2008
2032
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
2033
|
+
let AtomicSearchInterface = class AtomicSearchInterface {
|
|
2034
|
+
z;
|
|
2035
|
+
el;
|
|
2036
|
+
constructor(c, r, z) {
|
|
2037
|
+
this.z = z;
|
|
2038
|
+
c.detach();
|
|
2039
|
+
this.el = r.nativeElement;
|
|
2040
|
+
}
|
|
2041
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchInterface, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2042
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicSearchInterface, isStandalone: false, selector: "atomic-search-interface", inputs: { CspNonce: "CspNonce", analytics: "analytics", enableRelevanceInspector: "enableRelevanceInspector", engine: "engine", fieldsToInclude: "fieldsToInclude", i18n: "i18n", iconAssetsPath: "iconAssetsPath", language: "language", languageAssetsPath: "languageAssetsPath", logLevel: "logLevel", pipeline: "pipeline", reflectStateInUrl: "reflectStateInUrl", scrollContainer: "scrollContainer", searchHub: "searchHub", timezone: "timezone" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2043
|
+
};
|
|
2044
|
+
AtomicSearchInterface = __decorate([
|
|
2045
|
+
ProxyCmp({
|
|
2046
|
+
inputs: ['CspNonce', 'analytics', 'enableRelevanceInspector', 'engine', 'fieldsToInclude', 'i18n', 'iconAssetsPath', 'language', 'languageAssetsPath', 'logLevel', 'pipeline', 'reflectStateInUrl', 'scrollContainer', 'searchHub', 'timezone'],
|
|
2047
|
+
methods: ['initialize', 'initializeWithSearchEngine', 'executeFirstSearch'],
|
|
2048
|
+
defineCustomElementFn: defineCustomElementAtomicSearchInterface
|
|
2049
|
+
})
|
|
2050
|
+
], AtomicSearchInterface);
|
|
2051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchInterface, decorators: [{
|
|
2052
|
+
type: Component,
|
|
2053
|
+
args: [{ standalone: false,
|
|
2054
|
+
selector: 'atomic-search-interface',
|
|
2055
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2056
|
+
template: '<ng-content></ng-content>',
|
|
2057
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
2058
|
+
inputs: ['CspNonce', 'analytics', 'enableRelevanceInspector', 'engine', 'fieldsToInclude', 'i18n', 'iconAssetsPath', 'language', 'languageAssetsPath', 'logLevel', 'pipeline', 'reflectStateInUrl', 'scrollContainer', 'searchHub', 'timezone'],
|
|
2059
|
+
}]
|
|
2060
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
2009
2061
|
let AtomicSegmentedFacet = class AtomicSegmentedFacet {
|
|
2010
2062
|
z;
|
|
2011
2063
|
el;
|
|
@@ -3926,35 +3978,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
3926
3978
|
inputs: ['choicesDisplayed', 'initialChoice']
|
|
3927
3979
|
}]
|
|
3928
3980
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
3929
|
-
let AtomicSearchInterface = class AtomicSearchInterface {
|
|
3930
|
-
z;
|
|
3931
|
-
el;
|
|
3932
|
-
constructor(c, el, z) {
|
|
3933
|
-
this.z = z;
|
|
3934
|
-
c.detach();
|
|
3935
|
-
this.el = el.nativeElement;
|
|
3936
|
-
}
|
|
3937
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchInterface, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3938
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicSearchInterface, isStandalone: false, selector: "atomic-search-interface", inputs: { fieldsToInclude: "fieldsToInclude", pipeline: "pipeline", searchHub: "searchHub", analytics: "analytics", timezone: "timezone", logLevel: "logLevel", language: "language", reflectStateInUrl: "reflectStateInUrl", disableStateReflectionInUrl: "disableStateReflectionInUrl", scrollContainer: "scrollContainer", languageAssetsPath: "languageAssetsPath", iconAssetsPath: "iconAssetsPath", enableRelevanceInspector: "enableRelevanceInspector", disableRelevanceInspector: "disableRelevanceInspector" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3939
|
-
};
|
|
3940
|
-
AtomicSearchInterface = __decorate([
|
|
3941
|
-
ProxyCmp({
|
|
3942
|
-
inputs: ['fieldsToInclude', 'pipeline', 'searchHub', 'analytics', 'timezone', 'logLevel', 'language', 'reflectStateInUrl', 'disableStateReflectionInUrl', 'scrollContainer', 'languageAssetsPath', 'iconAssetsPath', 'enableRelevanceInspector', 'disableRelevanceInspector'],
|
|
3943
|
-
methods: ['scrollToTop', 'closeRelevanceInspector', 'initialize', 'initializeWithSearchEngine', 'executeFirstSearch', 'updateSearchConfiguration', 'updateSearchHub', 'updatePipeline', 'toggleAnalytics', 'updateLanguage', 'updateIconAssetsPath', 'registerFieldsToInclude'],
|
|
3944
|
-
defineCustomElementFn: () => { customElements.get('atomic-search-interface') || customElements.define('atomic-search-interface', AtomicSearchInterface$1); }
|
|
3945
|
-
})
|
|
3946
|
-
], AtomicSearchInterface);
|
|
3947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchInterface, decorators: [{
|
|
3948
|
-
type: Component,
|
|
3949
|
-
args: [{
|
|
3950
|
-
selector: 'atomic-search-interface',
|
|
3951
|
-
standalone: false,
|
|
3952
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3953
|
-
template: '<ng-content></ng-content>',
|
|
3954
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
3955
|
-
inputs: ['fieldsToInclude', 'pipeline', 'searchHub', 'analytics', 'timezone', 'logLevel', 'language', 'reflectStateInUrl', 'disableStateReflectionInUrl', 'scrollContainer', 'languageAssetsPath', 'iconAssetsPath', 'enableRelevanceInspector', 'disableRelevanceInspector']
|
|
3956
|
-
}]
|
|
3957
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
3958
3981
|
let AtomicSearchLayout = class AtomicSearchLayout {
|
|
3959
3982
|
z;
|
|
3960
3983
|
el;
|
|
@@ -3962,7 +3985,6 @@ let AtomicSearchLayout = class AtomicSearchLayout {
|
|
|
3962
3985
|
this.z = z;
|
|
3963
3986
|
c.detach();
|
|
3964
3987
|
this.el = el.nativeElement;
|
|
3965
|
-
proxyOutputs(this, this.el, ['atomic-layout-breakpoint-change']);
|
|
3966
3988
|
}
|
|
3967
3989
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicSearchLayout, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3968
3990
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicSearchLayout, isStandalone: false, selector: "atomic-search-layout", inputs: { mobileBreakpoint: "mobileBreakpoint" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -3970,7 +3992,7 @@ let AtomicSearchLayout = class AtomicSearchLayout {
|
|
|
3970
3992
|
AtomicSearchLayout = __decorate([
|
|
3971
3993
|
ProxyCmp({
|
|
3972
3994
|
inputs: ['mobileBreakpoint'],
|
|
3973
|
-
methods: [
|
|
3995
|
+
methods: [],
|
|
3974
3996
|
defineCustomElementFn: () => { customElements.get('atomic-search-layout') || customElements.define('atomic-search-layout', AtomicSearchLayout$1); }
|
|
3975
3997
|
})
|
|
3976
3998
|
], AtomicSearchLayout);
|
|
@@ -4043,7 +4065,6 @@ const DECLARATIONS = [
|
|
|
4043
4065
|
AtomicProductText,
|
|
4044
4066
|
AtomicQuerySummary,
|
|
4045
4067
|
AtomicResultsPerPage,
|
|
4046
|
-
AtomicSearchInterface,
|
|
4047
4068
|
AtomicSearchLayout,
|
|
4048
4069
|
AtomicAutomaticFacet,
|
|
4049
4070
|
AtomicAutomaticFacetGenerator,
|
|
@@ -4118,6 +4139,7 @@ const DECLARATIONS = [
|
|
|
4118
4139
|
AtomicSearchBoxInstantResults,
|
|
4119
4140
|
AtomicSearchBoxQuerySuggestions,
|
|
4120
4141
|
AtomicSearchBoxRecentQueries,
|
|
4142
|
+
AtomicSearchInterface,
|
|
4121
4143
|
AtomicSegmentedFacet,
|
|
4122
4144
|
AtomicSegmentedFacetScrollable,
|
|
4123
4145
|
AtomicSmartSnippet,
|
|
@@ -4217,7 +4239,6 @@ class AtomicAngularModule {
|
|
|
4217
4239
|
AtomicProductText,
|
|
4218
4240
|
AtomicQuerySummary,
|
|
4219
4241
|
AtomicResultsPerPage,
|
|
4220
|
-
AtomicSearchInterface,
|
|
4221
4242
|
AtomicSearchLayout,
|
|
4222
4243
|
AtomicAutomaticFacet,
|
|
4223
4244
|
AtomicAutomaticFacetGenerator,
|
|
@@ -4292,6 +4313,7 @@ class AtomicAngularModule {
|
|
|
4292
4313
|
AtomicSearchBoxInstantResults,
|
|
4293
4314
|
AtomicSearchBoxQuerySuggestions,
|
|
4294
4315
|
AtomicSearchBoxRecentQueries,
|
|
4316
|
+
AtomicSearchInterface,
|
|
4295
4317
|
AtomicSegmentedFacet,
|
|
4296
4318
|
AtomicSegmentedFacetScrollable,
|
|
4297
4319
|
AtomicSmartSnippet,
|
|
@@ -4358,7 +4380,6 @@ class AtomicAngularModule {
|
|
|
4358
4380
|
AtomicProductText,
|
|
4359
4381
|
AtomicQuerySummary,
|
|
4360
4382
|
AtomicResultsPerPage,
|
|
4361
|
-
AtomicSearchInterface,
|
|
4362
4383
|
AtomicSearchLayout,
|
|
4363
4384
|
AtomicAutomaticFacet,
|
|
4364
4385
|
AtomicAutomaticFacetGenerator,
|
|
@@ -4433,6 +4454,7 @@ class AtomicAngularModule {
|
|
|
4433
4454
|
AtomicSearchBoxInstantResults,
|
|
4434
4455
|
AtomicSearchBoxQuerySuggestions,
|
|
4435
4456
|
AtomicSearchBoxRecentQueries,
|
|
4457
|
+
AtomicSearchInterface,
|
|
4436
4458
|
AtomicSegmentedFacet,
|
|
4437
4459
|
AtomicSegmentedFacetScrollable,
|
|
4438
4460
|
AtomicSmartSnippet,
|