@coveo/atomic-react 3.11.48 → 3.11.49
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/cjs/atomic-react.cjs +42 -12
- package/dist/cjs/atomic-react.cjs.map +1 -1
- package/dist/cjs/commerce/atomic-react.cjs +18 -4
- package/dist/cjs/commerce/atomic-react.cjs.map +1 -1
- package/dist/cjs/recommendation/atomic-react.cjs +42 -12
- package/dist/cjs/recommendation/atomic-react.cjs.map +1 -1
- package/package.json +7 -4
|
@@ -5379,9 +5379,22 @@ function isAutomaticFacetGenerator(element) {
|
|
|
5379
5379
|
function isPseudoFacet(el) {
|
|
5380
5380
|
return 'facetId' in el;
|
|
5381
5381
|
}
|
|
5382
|
+
function isPopover(element) {
|
|
5383
|
+
return 'ATOMIC-POPOVER' === element.tagName;
|
|
5384
|
+
}
|
|
5385
|
+
function isFacetNestedInPopover(facet) {
|
|
5386
|
+
return !!facet.parentElement && isPopover(facet.parentElement);
|
|
5387
|
+
}
|
|
5388
|
+
function getFacetElementToReorder(facet) {
|
|
5389
|
+
return isFacetNestedInPopover(facet) ? facet.parentElement : facet;
|
|
5390
|
+
}
|
|
5382
5391
|
function getFacetsInChildren(parent) {
|
|
5383
|
-
|
|
5384
|
-
|
|
5392
|
+
return Array.from(parent.children).flatMap((child)=>{
|
|
5393
|
+
if (isPseudoFacet(child)) return [
|
|
5394
|
+
child
|
|
5395
|
+
];
|
|
5396
|
+
return isPopover(child) ? Array.from(child.children).filter(isPseudoFacet) : [];
|
|
5397
|
+
});
|
|
5385
5398
|
}
|
|
5386
5399
|
function getAutomaticFacetGenerator(parent) {
|
|
5387
5400
|
return Array.from(parent.children).find(isAutomaticFacetGenerator);
|
|
@@ -8437,11 +8450,15 @@ function buildCommonLayout(element, mobileBreakpoint, layoutWebComponentTagName,
|
|
|
8437
8450
|
}
|
|
8438
8451
|
}`;
|
|
8439
8452
|
};
|
|
8440
|
-
const horizontalFacets = ()
|
|
8441
|
-
|
|
8453
|
+
const horizontalFacets = ()=>{
|
|
8454
|
+
const horizontalFacetsSelector = `${layoutSelector} ${sectionSelector('horizontal-facets')}`;
|
|
8455
|
+
return `${mediaQuerySelector} {
|
|
8456
|
+
${horizontalFacetsSelector} > atomic-popover:not(.atomic-hidden),
|
|
8457
|
+
${horizontalFacetsSelector} > atomic-facet-manager > atomic-popover:not(.atomic-hidden) {
|
|
8442
8458
|
display: block;
|
|
8443
8459
|
}
|
|
8444
8460
|
}`;
|
|
8461
|
+
};
|
|
8445
8462
|
return [
|
|
8446
8463
|
display,
|
|
8447
8464
|
search,
|
|
@@ -8456,7 +8473,7 @@ function getWindow$1() {
|
|
|
8456
8473
|
}
|
|
8457
8474
|
function getAtomicEnvironment(headlessVersion) {
|
|
8458
8475
|
return {
|
|
8459
|
-
version: "3.64.
|
|
8476
|
+
version: "3.64.1",
|
|
8460
8477
|
headlessVersion
|
|
8461
8478
|
};
|
|
8462
8479
|
}
|
|
@@ -19305,6 +19322,10 @@ let AtomicFocusTrap$1 = class AtomicFocusTrap extends LightDomMixin(lit.LitEleme
|
|
|
19305
19322
|
if (element.hasAttribute('aria-hidden') || element.hasAttribute('aria-live') || 'atomic-aria-live' === element.tagName.toLowerCase()) return;
|
|
19306
19323
|
element.setAttribute('aria-hidden', 'true');
|
|
19307
19324
|
this.hiddenElements.push(element);
|
|
19325
|
+
if (!element.hasAttribute('inert')) {
|
|
19326
|
+
element.setAttribute('inert', '');
|
|
19327
|
+
this.inertElements.push(element);
|
|
19328
|
+
}
|
|
19308
19329
|
}
|
|
19309
19330
|
showAll() {
|
|
19310
19331
|
let el = this.hiddenElements.pop();
|
|
@@ -19312,6 +19333,11 @@ let AtomicFocusTrap$1 = class AtomicFocusTrap extends LightDomMixin(lit.LitEleme
|
|
|
19312
19333
|
el.removeAttribute('aria-hidden');
|
|
19313
19334
|
el = this.hiddenElements.pop();
|
|
19314
19335
|
}
|
|
19336
|
+
let inertElement = this.inertElements.pop();
|
|
19337
|
+
while(inertElement){
|
|
19338
|
+
inertElement.removeAttribute('inert');
|
|
19339
|
+
inertElement = this.inertElements.pop();
|
|
19340
|
+
}
|
|
19315
19341
|
}
|
|
19316
19342
|
hideSiblingsRecursively(element) {
|
|
19317
19343
|
const parent = getParent(element);
|
|
@@ -19345,6 +19371,7 @@ let AtomicFocusTrap$1 = class AtomicFocusTrap extends LightDomMixin(lit.LitEleme
|
|
|
19345
19371
|
this.showSelf();
|
|
19346
19372
|
if (!isInitialLoad) {
|
|
19347
19373
|
await defer$1();
|
|
19374
|
+
if (!this.active) return;
|
|
19348
19375
|
getFirstFocusableDescendant(this)?.focus();
|
|
19349
19376
|
}
|
|
19350
19377
|
this.hideSiblingsRecursively(this);
|
|
@@ -19358,7 +19385,7 @@ let AtomicFocusTrap$1 = class AtomicFocusTrap extends LightDomMixin(lit.LitEleme
|
|
|
19358
19385
|
return this.container ?? this;
|
|
19359
19386
|
}
|
|
19360
19387
|
constructor(...args){
|
|
19361
|
-
super(...args), this.active = false, this.shouldHideSelf = true, this.scope = document.body, this.hiddenElements = [], this.onFocusChanged = (e)=>{
|
|
19388
|
+
super(...args), this.active = false, this.shouldHideSelf = true, this.scope = document.body, this.hiddenElements = [], this.inertElements = [], this.onFocusChanged = (e)=>{
|
|
19362
19389
|
if (!e.target || !this.active) return;
|
|
19363
19390
|
const focusedElement = getFocusedElement();
|
|
19364
19391
|
if (focusedElement && isAncestorOf(this, focusedElement)) return;
|
|
@@ -27849,9 +27876,13 @@ let AtomicFacetManager$1 = class AtomicFacetManager extends ChildrenUpdateComple
|
|
|
27849
27876
|
const sortedFacets = this.sortFacetsUsingManager(facets, this.facetManager);
|
|
27850
27877
|
const { visibleFacets, invisibleFacets } = sortFacetVisibility(sortedFacets, this.bindings.store.getAllFacets());
|
|
27851
27878
|
const generator = getAutomaticFacetGenerator(this);
|
|
27852
|
-
|
|
27853
|
-
|
|
27854
|
-
this.
|
|
27879
|
+
const collapsibleFacets = visibleFacets.filter((facet)=>!isFacetNestedInPopover(facet));
|
|
27880
|
+
collapseFacetsAfter(collapsibleFacets, this.collapseFacetsAfter);
|
|
27881
|
+
generator?.updateCollapseFacetsDependingOnFacetsVisibility?.(this.collapseFacetsAfter, collapsibleFacets.length);
|
|
27882
|
+
this.append(...[
|
|
27883
|
+
...visibleFacets,
|
|
27884
|
+
...invisibleFacets
|
|
27885
|
+
].map((facet)=>getFacetElementToReorder(facet)), ...generator ? [
|
|
27855
27886
|
generator
|
|
27856
27887
|
] : []);
|
|
27857
27888
|
};
|
|
@@ -30359,9 +30390,8 @@ let AtomicPopover$1 = class AtomicPopover extends lit.LitElement {
|
|
|
30359
30390
|
.active=${this.isOpen}
|
|
30360
30391
|
.shouldHideSelf=${false}
|
|
30361
30392
|
>
|
|
30362
|
-
${this.renderPopover()}
|
|
30393
|
+
${this.renderPopover()} ${when_js.when(this.isOpen, ()=>this.renderBackdrop())}
|
|
30363
30394
|
</atomic-focus-trap>
|
|
30364
|
-
${when_js.when(this.isOpen, ()=>this.renderBackdrop())}
|
|
30365
30395
|
`;
|
|
30366
30396
|
}
|
|
30367
30397
|
updated() {
|
|
@@ -36593,7 +36623,7 @@ AtomicSearchInterface$1 = _ts_decorate$c([
|
|
|
36593
36623
|
|
|
36594
36624
|
const styles$4 = lit.css`.atomic-modal-opened{overflow-y:hidden}atomic-layout-section[section=search]{grid-area:atomic-section-search}atomic-layout-section[section=facets]{grid-area:atomic-section-facets}atomic-layout-section[section=main]{grid-area:atomic-section-main}atomic-layout-section[section=status]{grid-area:atomic-section-status}atomic-layout-section[section=pagination]{grid-area:atomic-section-pagination}atomic-search-layout{width:100%;height:100%;display:none;grid-template-areas:". atomic-section-search ." ". atomic-section-main .";grid-template-columns:var(--atomic-layout-spacing-x) minmax(0,1fr) var(
|
|
36595
36625
|
--atomic-layout-spacing-x
|
|
36596
|
-
);atomic-layout-section[section=search]{margin:var(--atomic-layout-spacing-y) 0;max-width:var(--atomic-layout-max-search-box-input-width,678px);width:100%;justify-self:center;atomic-search-box{&::part(suggestions-double-list){width:125%;max-width:var(--atomic-layout-max-search-box-double-suggestions-width,800px)}&::part(suggestions-left){flex-basis:var(--atomic-layout-search-box-left-suggestions-width,30%)}&::part(suggestions-right){flex-basis:calc(100% - var(--atomic-layout-search-box-left-suggestions-width, 30%))}}}atomic-layout-section[section=facets]{display:none;& *{margin-bottom:var(--atomic-layout-spacing-y)}}atomic-layout-section[section=main]{margin-bottom:var(--atomic-layout-spacing-y)}atomic-layout-section[section=horizontal-facets]{display:flex;flex-wrap:wrap;margin-bottom:var(--atomic-layout-spacing-y);row-gap:.5rem;&>*{max-width:100%}&>atomic-popover,&>atomic-segmented-facet{margin-right:.5rem}&>atomic-popover{display:none}}atomic-layout-section[section=status]{display:grid;justify-content:space-between;grid-template-areas:"atomic-breadbox atomic-breadbox" "atomic-query-summary atomic-sort" "atomic-did-you-mean atomic-did-you-mean" "atomic-notifications atomic-notifications";&>*{margin-bottom:var(--atomic-layout-spacing-y)}atomic-breadbox{grid-area:atomic-breadbox}atomic-query-summary{grid-area:atomic-query-summary;align-self:center;overflow:hidden}atomic-sort-dropdown{justify-self:end}atomic-refine-toggle,atomic-sort-dropdown{grid-area:atomic-sort}atomic-did-you-mean{grid-area:atomic-did-you-mean}atomic-notifications{grid-area:atomic-notifications}}atomic-layout-section[section=results]{atomic-smart-snippet,atomic-smart-snippet-suggestions{margin-bottom:1.5rem}}atomic-layout-section[section=pagination]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;atomic-load-more-results{width:100%}&:has(:only-child){justify-content:center}&>*{margin-top:var(--atomic-layout-spacing-y)}@media only screen and (min-width:50rem){flex-direction:row}}}`;
|
|
36626
|
+
);atomic-layout-section[section=search]{margin:var(--atomic-layout-spacing-y) 0;max-width:var(--atomic-layout-max-search-box-input-width,678px);width:100%;justify-self:center;atomic-search-box{&::part(suggestions-double-list){width:125%;max-width:var(--atomic-layout-max-search-box-double-suggestions-width,800px)}&::part(suggestions-left){flex-basis:var(--atomic-layout-search-box-left-suggestions-width,30%)}&::part(suggestions-right){flex-basis:calc(100% - var(--atomic-layout-search-box-left-suggestions-width, 30%))}}}atomic-layout-section[section=facets]{display:none;& *{margin-bottom:var(--atomic-layout-spacing-y)}}atomic-layout-section[section=main]{margin-bottom:var(--atomic-layout-spacing-y)}atomic-layout-section[section=horizontal-facets]{display:flex;flex-wrap:wrap;margin-bottom:var(--atomic-layout-spacing-y);row-gap:.5rem;&>*{max-width:100%}&>atomic-facet-manager{display:contents;&>*{max-width:100%}}&>atomic-facet-manager>atomic-popover,&>atomic-popover,&>atomic-segmented-facet{margin-right:.5rem}&>atomic-facet-manager>atomic-popover,&>atomic-popover{display:none}}atomic-layout-section[section=status]{display:grid;justify-content:space-between;grid-template-areas:"atomic-breadbox atomic-breadbox" "atomic-query-summary atomic-sort" "atomic-did-you-mean atomic-did-you-mean" "atomic-notifications atomic-notifications";&>*{margin-bottom:var(--atomic-layout-spacing-y)}atomic-breadbox{grid-area:atomic-breadbox}atomic-query-summary{grid-area:atomic-query-summary;align-self:center;overflow:hidden}atomic-sort-dropdown{justify-self:end}atomic-refine-toggle,atomic-sort-dropdown{grid-area:atomic-sort}atomic-did-you-mean{grid-area:atomic-did-you-mean}atomic-notifications{grid-area:atomic-notifications}}atomic-layout-section[section=results]{atomic-smart-snippet,atomic-smart-snippet-suggestions{margin-bottom:1.5rem}}atomic-layout-section[section=pagination]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;atomic-load-more-results{width:100%}&:has(:only-child){justify-content:center}&>*{margin-top:var(--atomic-layout-spacing-y)}@media only screen and (min-width:50rem){flex-direction:row}}}`;
|
|
36597
36627
|
const atomic_search_layout_tw_css = styles$4;
|
|
36598
36628
|
|
|
36599
36629
|
function _ts_decorate$b(decorators, target, key, desc) {
|