@coveo/atomic-angular 3.7.8-pre.b577091ab5 → 3.7.8-pre.b7cda80131
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, 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, AtomicPager as AtomicPager$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
|
|
@@ -764,34 +788,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
764
788
|
inputs: ['end', 'endInclusive', 'label', 'start'],
|
|
765
789
|
}]
|
|
766
790
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
767
|
-
let AtomicPager = class AtomicPager {
|
|
768
|
-
z;
|
|
769
|
-
el;
|
|
770
|
-
constructor(c, r, z) {
|
|
771
|
-
this.z = z;
|
|
772
|
-
c.detach();
|
|
773
|
-
this.el = r.nativeElement;
|
|
774
|
-
proxyOutputs(this, this.el, ['atomic/scrollToTop']);
|
|
775
|
-
}
|
|
776
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicPager, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
777
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicPager, isStandalone: false, selector: "atomic-pager", inputs: { nextButtonIcon: "nextButtonIcon", numberOfPages: "numberOfPages", previousButtonIcon: "previousButtonIcon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
778
|
-
};
|
|
779
|
-
AtomicPager = __decorate([
|
|
780
|
-
ProxyCmp({
|
|
781
|
-
inputs: ['nextButtonIcon', 'numberOfPages', 'previousButtonIcon'],
|
|
782
|
-
defineCustomElementFn: defineCustomElementAtomicPager
|
|
783
|
-
})
|
|
784
|
-
], AtomicPager);
|
|
785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicPager, decorators: [{
|
|
786
|
-
type: Component,
|
|
787
|
-
args: [{ standalone: false,
|
|
788
|
-
selector: 'atomic-pager',
|
|
789
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
790
|
-
template: '<ng-content></ng-content>',
|
|
791
|
-
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
792
|
-
inputs: ['nextButtonIcon', 'numberOfPages', 'previousButtonIcon'],
|
|
793
|
-
}]
|
|
794
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
795
791
|
let AtomicPopover = class AtomicPopover {
|
|
796
792
|
z;
|
|
797
793
|
el;
|
|
@@ -2540,7 +2536,7 @@ let AtomicCommerceInterface = class AtomicCommerceInterface {
|
|
|
2540
2536
|
AtomicCommerceInterface = __decorate([
|
|
2541
2537
|
ProxyCmp({
|
|
2542
2538
|
inputs: ['type', 'analytics', 'logLevel', 'language', 'reflectStateInUrl', 'disableStateReflectionInUrl', 'scrollContainer', 'languageAssetsPath', 'iconAssetsPath'],
|
|
2543
|
-
methods: ['initialize', 'initializeWithEngine', 'executeFirstRequest', 'toggleAnalytics', 'updateIconAssetsPath', 'updateLanguage', 'scrollToTop'],
|
|
2539
|
+
methods: ['initialize', 'initializeWithEngine', 'executeFirstRequest', 'updateLocale', 'toggleAnalytics', 'updateIconAssetsPath', 'updateLanguage', 'scrollToTop'],
|
|
2544
2540
|
defineCustomElementFn: () => { customElements.get('atomic-commerce-interface') || customElements.define('atomic-commerce-interface', AtomicCommerceInterface$1); }
|
|
2545
2541
|
})
|
|
2546
2542
|
], AtomicCommerceInterface);
|
|
@@ -2562,6 +2558,7 @@ let AtomicCommerceLayout = class AtomicCommerceLayout {
|
|
|
2562
2558
|
this.z = z;
|
|
2563
2559
|
c.detach();
|
|
2564
2560
|
this.el = el.nativeElement;
|
|
2561
|
+
proxyOutputs(this, this.el, ['atomic-layout-breakpoint-change']);
|
|
2565
2562
|
}
|
|
2566
2563
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicCommerceLayout, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2567
2564
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicCommerceLayout, isStandalone: false, selector: "atomic-commerce-layout", inputs: { mobileBreakpoint: "mobileBreakpoint" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -2569,7 +2566,7 @@ let AtomicCommerceLayout = class AtomicCommerceLayout {
|
|
|
2569
2566
|
AtomicCommerceLayout = __decorate([
|
|
2570
2567
|
ProxyCmp({
|
|
2571
2568
|
inputs: ['mobileBreakpoint'],
|
|
2572
|
-
methods: [],
|
|
2569
|
+
methods: ['onMobileBreakpointChange'],
|
|
2573
2570
|
defineCustomElementFn: () => { customElements.get('atomic-commerce-layout') || customElements.define('atomic-commerce-layout', AtomicCommerceLayout$1); }
|
|
2574
2571
|
})
|
|
2575
2572
|
], AtomicCommerceLayout);
|
|
@@ -3894,6 +3891,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
3894
3891
|
inputs: ['section', 'minWidth', 'maxWidth']
|
|
3895
3892
|
}]
|
|
3896
3893
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
3894
|
+
let AtomicPager = class AtomicPager {
|
|
3895
|
+
z;
|
|
3896
|
+
el;
|
|
3897
|
+
constructor(c, el, z) {
|
|
3898
|
+
this.z = z;
|
|
3899
|
+
c.detach();
|
|
3900
|
+
this.el = el.nativeElement;
|
|
3901
|
+
proxyOutputs(this, this.el, ['atomic/scrollToTop']);
|
|
3902
|
+
}
|
|
3903
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicPager, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
3904
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AtomicPager, isStandalone: false, selector: "atomic-pager", inputs: { numberOfPages: "numberOfPages", previousButtonIcon: "previousButtonIcon", nextButtonIcon: "nextButtonIcon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3905
|
+
};
|
|
3906
|
+
AtomicPager = __decorate([
|
|
3907
|
+
ProxyCmp({
|
|
3908
|
+
inputs: ['numberOfPages', 'previousButtonIcon', 'nextButtonIcon'],
|
|
3909
|
+
methods: ['initialize'],
|
|
3910
|
+
defineCustomElementFn: () => { customElements.get('atomic-pager') || customElements.define('atomic-pager', AtomicPager$1); }
|
|
3911
|
+
})
|
|
3912
|
+
], AtomicPager);
|
|
3913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AtomicPager, decorators: [{
|
|
3914
|
+
type: Component,
|
|
3915
|
+
args: [{
|
|
3916
|
+
selector: 'atomic-pager',
|
|
3917
|
+
standalone: false,
|
|
3918
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3919
|
+
template: '<ng-content></ng-content>',
|
|
3920
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
3921
|
+
inputs: ['numberOfPages', 'previousButtonIcon', 'nextButtonIcon']
|
|
3922
|
+
}]
|
|
3923
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
|
|
3897
3924
|
let AtomicQuerySummary = class AtomicQuerySummary {
|
|
3898
3925
|
z;
|
|
3899
3926
|
el;
|
|
@@ -4016,6 +4043,7 @@ const DECLARATIONS = [
|
|
|
4016
4043
|
AtomicComponentError,
|
|
4017
4044
|
AtomicIcon,
|
|
4018
4045
|
AtomicLayoutSection,
|
|
4046
|
+
AtomicPager,
|
|
4019
4047
|
AtomicProduct,
|
|
4020
4048
|
AtomicProductChildren,
|
|
4021
4049
|
AtomicProductDescription,
|
|
@@ -4067,7 +4095,6 @@ const DECLARATIONS = [
|
|
|
4067
4095
|
AtomicNotifications,
|
|
4068
4096
|
AtomicNumericFacet,
|
|
4069
4097
|
AtomicNumericRange,
|
|
4070
|
-
AtomicPager,
|
|
4071
4098
|
AtomicPopover,
|
|
4072
4099
|
AtomicQueryError,
|
|
4073
4100
|
AtomicQuickview,
|
|
@@ -4190,6 +4217,7 @@ class AtomicAngularModule {
|
|
|
4190
4217
|
AtomicComponentError,
|
|
4191
4218
|
AtomicIcon,
|
|
4192
4219
|
AtomicLayoutSection,
|
|
4220
|
+
AtomicPager,
|
|
4193
4221
|
AtomicProduct,
|
|
4194
4222
|
AtomicProductChildren,
|
|
4195
4223
|
AtomicProductDescription,
|
|
@@ -4241,7 +4269,6 @@ class AtomicAngularModule {
|
|
|
4241
4269
|
AtomicNotifications,
|
|
4242
4270
|
AtomicNumericFacet,
|
|
4243
4271
|
AtomicNumericRange,
|
|
4244
|
-
AtomicPager,
|
|
4245
4272
|
AtomicPopover,
|
|
4246
4273
|
AtomicQueryError,
|
|
4247
4274
|
AtomicQuickview,
|
|
@@ -4331,6 +4358,7 @@ class AtomicAngularModule {
|
|
|
4331
4358
|
AtomicComponentError,
|
|
4332
4359
|
AtomicIcon,
|
|
4333
4360
|
AtomicLayoutSection,
|
|
4361
|
+
AtomicPager,
|
|
4334
4362
|
AtomicProduct,
|
|
4335
4363
|
AtomicProductChildren,
|
|
4336
4364
|
AtomicProductDescription,
|
|
@@ -4382,7 +4410,6 @@ class AtomicAngularModule {
|
|
|
4382
4410
|
AtomicNotifications,
|
|
4383
4411
|
AtomicNumericFacet,
|
|
4384
4412
|
AtomicNumericRange,
|
|
4385
|
-
AtomicPager,
|
|
4386
4413
|
AtomicPopover,
|
|
4387
4414
|
AtomicQueryError,
|
|
4388
4415
|
AtomicQuickview,
|