@coveo/atomic-react 3.11.34 → 3.11.35
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/README.md +11 -43
- package/dist/cjs/atomic-react.cjs +174 -478
- package/dist/cjs/atomic-react.cjs.map +1 -1
- package/dist/cjs/commerce/atomic-react.cjs +115 -318
- package/dist/cjs/commerce/atomic-react.cjs.map +1 -1
- package/dist/cjs/recommendation/atomic-react.cjs +174 -479
- package/dist/cjs/recommendation/atomic-react.cjs.map +1 -1
- package/dist/esm/atomic-react.mjs +1 -1
- package/dist/esm/atomic-react.mjs.map +1 -1
- package/dist/esm/commerce/atomic-react.mjs +2 -3
- package/dist/esm/commerce/atomic-react.mjs.map +1 -1
- package/dist/esm/recommendation/atomic-react.mjs +1 -2
- package/dist/esm/recommendation/atomic-react.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -360,8 +360,7 @@ const renderButton = ({ props })=>(children)=>{
|
|
|
360
360
|
?disabled=${props.disabled}
|
|
361
361
|
${props.ref ? ref_js.ref(props.ref) : lit.nothing}
|
|
362
362
|
>
|
|
363
|
-
${when_js.when(props.text, ()=>lit.html`<span class="truncate">${props.text}</span>`)}
|
|
364
|
-
${children}
|
|
363
|
+
${when_js.when(props.text, ()=>lit.html`<span class="truncate">${props.text}</span>`)} ${children}
|
|
365
364
|
</button>`;
|
|
366
365
|
};
|
|
367
366
|
|
|
@@ -3424,11 +3423,7 @@ const renderBreadcrumbContent = ({ props })=>{
|
|
|
3424
3423
|
<span part="breadcrumb-value" class=${multiClassMap(valueClass)}>
|
|
3425
3424
|
${props.breadcrumb.content ?? value}
|
|
3426
3425
|
</span>
|
|
3427
|
-
<atomic-icon
|
|
3428
|
-
part="breadcrumb-clear"
|
|
3429
|
-
class="mt-px ml-2 h-2.5 w-2.5"
|
|
3430
|
-
icon=${images_close}
|
|
3431
|
-
>
|
|
3426
|
+
<atomic-icon part="breadcrumb-clear" class="mt-px ml-2 h-2.5 w-2.5" icon=${images_close}>
|
|
3432
3427
|
</atomic-icon>`;
|
|
3433
3428
|
};
|
|
3434
3429
|
|
|
@@ -4157,13 +4152,8 @@ AtomicCommerceBreadbox$1 = _ts_decorate$12([
|
|
|
4157
4152
|
], AtomicCommerceBreadbox$1);
|
|
4158
4153
|
|
|
4159
4154
|
const renderFacetContainer = ()=>(children)=>lit.html`
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
part="facet"
|
|
4163
|
-
>
|
|
4164
|
-
${children}
|
|
4165
|
-
</div>
|
|
4166
|
-
`;
|
|
4155
|
+
<div class="bg-background border-neutral rounded-lg border p-4" part="facet">${children}</div>
|
|
4156
|
+
`;
|
|
4167
4157
|
|
|
4168
4158
|
var arrow_bottom_rounded = "<svg viewBox=\"0 0 12.6 7.2\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m11.421 7.04c-.3 0-.5-.1-.7-.3l-4.6-4.6-4.6 4.6c-.4.4-1 .4-1.4 0s-.4-1 0-1.4l5.2-5.2c.4-.4 1.2-.4 1.6 0l5.2 5.2c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3\" transform=\"matrix(-1 0 0 -1 12.366 7.086)\"/></svg>";
|
|
4169
4159
|
|
|
@@ -4402,10 +4392,7 @@ const renderFacetSearchInput = ({ props })=>{
|
|
|
4402
4392
|
inputRef.value?.focus();
|
|
4403
4393
|
}
|
|
4404
4394
|
}
|
|
4405
|
-
})(lit.html`<atomic-icon
|
|
4406
|
-
part="search-clear-button"
|
|
4407
|
-
.icon=${images_close}
|
|
4408
|
-
></atomic-icon>`))}
|
|
4395
|
+
})(lit.html`<atomic-icon part="search-clear-button" .icon=${images_close}></atomic-icon>`))}
|
|
4409
4396
|
</div>
|
|
4410
4397
|
</div>
|
|
4411
4398
|
`;
|
|
@@ -4567,11 +4554,7 @@ const renderCategoryFacetAllCategoryButton = ({ props: { i18n, onClick, facetId,
|
|
|
4567
4554
|
part: 'all-categories-button',
|
|
4568
4555
|
onClick: onClick
|
|
4569
4556
|
}
|
|
4570
|
-
})(lit.html`<atomic-icon
|
|
4571
|
-
aria-hidden="true"
|
|
4572
|
-
icon=${arrow_left_rounded}
|
|
4573
|
-
part="back-arrow"
|
|
4574
|
-
></atomic-icon>
|
|
4557
|
+
})(lit.html`<atomic-icon aria-hidden="true" icon=${arrow_left_rounded} part="back-arrow"></atomic-icon>
|
|
4575
4558
|
<span class="truncate">${allCategories}</span>`)}
|
|
4576
4559
|
`;
|
|
4577
4560
|
};
|
|
@@ -4605,11 +4588,7 @@ const renderCategoryFacetParentButton = ({ props })=>{
|
|
|
4605
4588
|
ariaLabel: ariaLabel
|
|
4606
4589
|
}
|
|
4607
4590
|
})(lit.html`
|
|
4608
|
-
<atomic-icon
|
|
4609
|
-
icon=${arrow_left_rounded}
|
|
4610
|
-
part="back-arrow"
|
|
4611
|
-
class="back-arrow"
|
|
4612
|
-
></atomic-icon>
|
|
4591
|
+
<atomic-icon icon=${arrow_left_rounded} part="back-arrow" class="back-arrow"></atomic-icon>
|
|
4613
4592
|
<span class="truncate">${displayValue}</span>
|
|
4614
4593
|
`);
|
|
4615
4594
|
};
|
|
@@ -4710,9 +4689,7 @@ class HierarchicalPathDirective extends directive_js.Directive {
|
|
|
4710
4689
|
const ellipsedPath = this.getEllipsedPath(path, maxLength, ellipsis);
|
|
4711
4690
|
return ellipsedPath.map((value, index)=>lit.html`
|
|
4712
4691
|
${index > 0 ? lit.html`<span class=${separatorClass}>${separator}</span>` : ''}
|
|
4713
|
-
<span class=${value === ellipsis ? ellipsisClass : itemClass}>
|
|
4714
|
-
${value}
|
|
4715
|
-
</span>
|
|
4692
|
+
<span class=${value === ellipsis ? ellipsisClass : itemClass}> ${value} </span>
|
|
4716
4693
|
`);
|
|
4717
4694
|
}
|
|
4718
4695
|
getEllipsedPath(path, maxLength, ellipsis) {
|
|
@@ -4785,9 +4762,7 @@ const renderCategoryFacetSearchValue = ({ props })=>{
|
|
|
4785
4762
|
path: localizedPath,
|
|
4786
4763
|
separator: SEPARATOR,
|
|
4787
4764
|
maxLength: PATH_MAX_LENGTH,
|
|
4788
|
-
emptyPathContent: lit.html`<span class="truncate">
|
|
4789
|
-
${inLabel} ${allCategories}
|
|
4790
|
-
</span>`,
|
|
4765
|
+
emptyPathContent: lit.html`<span class="truncate"> ${inLabel} ${allCategories} </span>`,
|
|
4791
4766
|
separatorClass: 'mx-0.5',
|
|
4792
4767
|
itemClass: 'max-w-max flex-1 truncate',
|
|
4793
4768
|
ellipsisClass: ''
|
|
@@ -5940,9 +5915,7 @@ class AtomicCommerceFacetNumberInput extends LightDomMixin(lit.LitElement) {
|
|
|
5940
5915
|
return false;
|
|
5941
5916
|
}}
|
|
5942
5917
|
>
|
|
5943
|
-
<label part="label-start" class=${labelClasses} for="${facetId}_start">
|
|
5944
|
-
${minText}
|
|
5945
|
-
</label>
|
|
5918
|
+
<label part="label-start" class=${labelClasses} for="${facetId}_start"> ${minText} </label>
|
|
5946
5919
|
<input
|
|
5947
5920
|
part="input-start"
|
|
5948
5921
|
id="${facetId}_start"
|
|
@@ -5961,9 +5934,7 @@ class AtomicCommerceFacetNumberInput extends LightDomMixin(lit.LitElement) {
|
|
|
5961
5934
|
this.startRef = ref;
|
|
5962
5935
|
})}
|
|
5963
5936
|
/>
|
|
5964
|
-
<label part="label-end" class=${labelClasses} for="${facetId}_end">
|
|
5965
|
-
${maxText}
|
|
5966
|
-
</label>
|
|
5937
|
+
<label part="label-end" class=${labelClasses} for="${facetId}_end"> ${maxText} </label>
|
|
5967
5938
|
<input
|
|
5968
5939
|
part="input-end"
|
|
5969
5940
|
id="${facetId}_end"
|
|
@@ -6056,11 +6027,7 @@ class AtomicFacetPlaceholder extends lit.LitElement {
|
|
|
6056
6027
|
class="bg-background border-neutral mb-4 animate-pulse rounded-lg border p-7"
|
|
6057
6028
|
aria-hidden="true"
|
|
6058
6029
|
>
|
|
6059
|
-
<div
|
|
6060
|
-
part="title-skeleton"
|
|
6061
|
-
class="bg-neutral h-8 rounded"
|
|
6062
|
-
style="width: 75%;"
|
|
6063
|
-
></div>
|
|
6030
|
+
<div part="title-skeleton" class="bg-neutral h-8 rounded" style="width: 75%;"></div>
|
|
6064
6031
|
<div part="values-container" class="mt-7">
|
|
6065
6032
|
${map_js.map(Array.from({
|
|
6066
6033
|
length: this.valueCount
|
|
@@ -6508,11 +6475,7 @@ class AtomicFacetDateInput extends LightDomMixin(lit.LitElement) {
|
|
|
6508
6475
|
return false;
|
|
6509
6476
|
}}
|
|
6510
6477
|
>
|
|
6511
|
-
<label
|
|
6512
|
-
part="input-label"
|
|
6513
|
-
class=${labelClasses}
|
|
6514
|
-
for=${`${this.facetId}_start`}
|
|
6515
|
-
>
|
|
6478
|
+
<label part="input-label" class=${labelClasses} for=${`${this.facetId}_start`}>
|
|
6516
6479
|
${startLabel}:
|
|
6517
6480
|
</label>
|
|
6518
6481
|
<input
|
|
@@ -6532,11 +6495,7 @@ class AtomicFacetDateInput extends LightDomMixin(lit.LitElement) {
|
|
|
6532
6495
|
this.start = parseDate(e.target.value).toDate();
|
|
6533
6496
|
}}
|
|
6534
6497
|
/>
|
|
6535
|
-
<label
|
|
6536
|
-
part="input-label"
|
|
6537
|
-
class=${labelClasses}
|
|
6538
|
-
for=${`${this.facetId}_end`}
|
|
6539
|
-
>
|
|
6498
|
+
<label part="input-label" class=${labelClasses} for=${`${this.facetId}_end`}>
|
|
6540
6499
|
${endLabel}:
|
|
6541
6500
|
</label>
|
|
6542
6501
|
<input
|
|
@@ -6774,10 +6733,10 @@ let AtomicCommerceTimeframeFacet$1 = class AtomicCommerceTimeframeFacet extends
|
|
|
6774
6733
|
render() {
|
|
6775
6734
|
const { hasError, firstRequestExecuted } = this.summaryState;
|
|
6776
6735
|
return lit.html`${when_js.when(!hasError && firstRequestExecuted && this.shouldRenderFacet, ()=>renderFacetContainer()(lit.html`${this.renderHeader()}
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6736
|
+
${when_js.when(!this.isCollapsed, ()=>lit.html`
|
|
6737
|
+
${when_js.when(this.shouldRenderValues, ()=>this.renderValues())}
|
|
6738
|
+
${when_js.when(this.shouldRenderInput, ()=>this.renderDateInput())}
|
|
6739
|
+
`)}`))}`;
|
|
6781
6740
|
}
|
|
6782
6741
|
updated(changedProps) {
|
|
6783
6742
|
super.updated(changedProps);
|
|
@@ -6894,9 +6853,7 @@ let AtomicCommerceFacets$1 = class AtomicCommerceFacets extends LightDomMixin(li
|
|
|
6894
6853
|
renderFacetPlaceholders() {
|
|
6895
6854
|
return map_js.map(Array.from({
|
|
6896
6855
|
length: this.collapseFacetsAfter
|
|
6897
|
-
}), ()=>lit.html`<atomic-facet-placeholder
|
|
6898
|
-
value-count="8"
|
|
6899
|
-
></atomic-facet-placeholder>`);
|
|
6856
|
+
}), ()=>lit.html`<atomic-facet-placeholder value-count="8"></atomic-facet-placeholder>`);
|
|
6900
6857
|
}
|
|
6901
6858
|
renderFacets() {
|
|
6902
6859
|
return map_js.map(this.facetGenerator.facets, (facet, index)=>{
|
|
@@ -9340,7 +9297,7 @@ function getWindow() {
|
|
|
9340
9297
|
}
|
|
9341
9298
|
function getAtomicEnvironment(headlessVersion) {
|
|
9342
9299
|
return {
|
|
9343
|
-
version: "3.60.
|
|
9300
|
+
version: "3.60.3",
|
|
9344
9301
|
headlessVersion
|
|
9345
9302
|
};
|
|
9346
9303
|
}
|
|
@@ -10779,11 +10736,7 @@ class LayoutStylesController {
|
|
|
10779
10736
|
|
|
10780
10737
|
const styles$8 = 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-commerce-layout{display:none;grid-template-areas:". atomic-section-search ." ". atomic-section-main .";grid-template-columns:var(--atomic-layout-spacing-x) minmax(0,1fr) var(
|
|
10781
10738
|
--atomic-layout-spacing-x
|
|
10782
|
-
);height:100%;width:100%;atomic-layout-section[section=search]{justify-self:center;margin:var(--atomic-layout-spacing-y) 0;max-width:var(--atomic-layout-max-search-box-input-width,678px);width:100%;atomic-commerce-search-box{&::part(suggestions-double-list){max-width:var(
|
|
10783
|
-
--atomic-layout-max-search-box-double-suggestions-width,800px
|
|
10784
|
-
);width:125%}&::part(suggestions-left){flex-basis:var(
|
|
10785
|
-
--atomic-layout-search-box-left-suggestions-width,30%
|
|
10786
|
-
)}&::part(suggestions-right){flex-basis:calc(100% - var(--atomic-layout-search-box-left-suggestions-width, 30%))}}}atomic-layout-section[section=facets]{display:none;atomic-commerce-facets *{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;&>atomic-popover{display:none;margin-right:.5rem}}atomic-layout-section[section=horizontal-facets]>*{max-width:100%}atomic-layout-section[section=status]{display:grid;grid-template-areas:"atomic-breadbox atomic-breadbox" "atomic-query-summary atomic-sort" "atomic-did-you-mean atomic-did-you-mean" "atomic-notifications atomic-notifications";justify-content:space-between;atomic-commerce-breadbox{grid-area:atomic-breadbox}atomic-commerce-query-summary{align-self:center;grid-area:atomic-query-summary;overflow:hidden}atomic-commerce-sort-dropdown{grid-area:atomic-sort;justify-self:end}atomic-commerce-refine-toggle{grid-area:atomic-sort}atomic-commerce-did-you-mean{grid-area:atomic-did-you-mean}atomic-commerce-notifications{grid-area:atomic-notifications}}atomic-layout-section[section=status]>*{margin-bottom:var(--atomic-layout-spacing-y)}atomic-layout-section[section=pagination]{align-items:center;display:flex;flex-direction:column;justify-content:space-between;atomic-commerce-load-more-products{width:100%}&:has(:only-child){justify-content:center}@media only screen and (min-width:50rem){flex-direction:row}}atomic-layout-section[section=pagination]>*{margin-top:var(--atomic-layout-spacing-y)}}`;
|
|
10739
|
+
);height:100%;width:100%;atomic-layout-section[section=search]{justify-self:center;margin:var(--atomic-layout-spacing-y) 0;max-width:var(--atomic-layout-max-search-box-input-width,678px);width:100%;atomic-commerce-search-box{&::part(suggestions-double-list){max-width:var(--atomic-layout-max-search-box-double-suggestions-width,800px);width:125%}&::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;atomic-commerce-facets *{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;&>atomic-popover{display:none;margin-right:.5rem}}atomic-layout-section[section=horizontal-facets]>*{max-width:100%}atomic-layout-section[section=status]{display:grid;grid-template-areas:"atomic-breadbox atomic-breadbox" "atomic-query-summary atomic-sort" "atomic-did-you-mean atomic-did-you-mean" "atomic-notifications atomic-notifications";justify-content:space-between;atomic-commerce-breadbox{grid-area:atomic-breadbox}atomic-commerce-query-summary{align-self:center;grid-area:atomic-query-summary;overflow:hidden}atomic-commerce-sort-dropdown{grid-area:atomic-sort;justify-self:end}atomic-commerce-refine-toggle{grid-area:atomic-sort}atomic-commerce-did-you-mean{grid-area:atomic-did-you-mean}atomic-commerce-notifications{grid-area:atomic-notifications}}atomic-layout-section[section=status]>*{margin-bottom:var(--atomic-layout-spacing-y)}atomic-layout-section[section=pagination]{align-items:center;display:flex;flex-direction:column;justify-content:space-between;atomic-commerce-load-more-products{width:100%}&:has(:only-child){justify-content:center}@media only screen and (min-width:50rem){flex-direction:row}}atomic-layout-section[section=pagination]>*{margin-top:var(--atomic-layout-spacing-y)}}`;
|
|
10787
10740
|
var atomic_commerce_layout_tw_css = styles$8;
|
|
10788
10741
|
|
|
10789
10742
|
function _ts_decorate$S(decorators, target, key, desc) {
|
|
@@ -10851,9 +10804,7 @@ const renderLoadMoreButton = ({ props })=>{
|
|
|
10851
10804
|
})(lit.html`${i18n.t(label)}`);
|
|
10852
10805
|
};
|
|
10853
10806
|
|
|
10854
|
-
const renderLoadMoreContainer = ()=>(children)=>lit.html`
|
|
10855
|
-
<div class="flex flex-col items-center" part="container">${children}</div>
|
|
10856
|
-
`;
|
|
10807
|
+
const renderLoadMoreContainer = ()=>(children)=>lit.html` <div class="flex flex-col items-center" part="container">${children}</div> `;
|
|
10857
10808
|
|
|
10858
10809
|
const renderLoadMoreProgressBar = ({ props })=>{
|
|
10859
10810
|
const { from, to } = props;
|
|
@@ -10883,9 +10834,7 @@ const renderLoadMoreSummary = ({ props })=>{
|
|
|
10883
10834
|
total: wrapHighlight(to.toLocaleString(locale))
|
|
10884
10835
|
});
|
|
10885
10836
|
return lit.html`
|
|
10886
|
-
<div class="text-neutral-dark my-2 text-lg" part="showing-results">
|
|
10887
|
-
${unsafeHtml_js.unsafeHTML(content)}
|
|
10888
|
-
</div>
|
|
10837
|
+
<div class="text-neutral-dark my-2 text-lg" part="showing-results">${unsafeHtml_js.unsafeHTML(content)}</div>
|
|
10889
10838
|
`;
|
|
10890
10839
|
};
|
|
10891
10840
|
|
|
@@ -10982,11 +10931,9 @@ AtomicCommerceLoadMoreProducts$1 = _ts_decorate$R([
|
|
|
10982
10931
|
], AtomicCommerceLoadMoreProducts$1);
|
|
10983
10932
|
|
|
10984
10933
|
const renderNoItemsContainer = ()=>(children)=>lit.html`
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
<slot></slot>
|
|
10989
|
-
`;
|
|
10934
|
+
<div class="text-on-background flex h-full w-full flex-col items-center">${children}</div>
|
|
10935
|
+
<slot></slot>
|
|
10936
|
+
`;
|
|
10990
10937
|
|
|
10991
10938
|
class NoItemsGuardDirective extends directive_js.Directive {
|
|
10992
10939
|
render({ firstSearchExecuted, isLoading, hasResults }, content) {
|
|
@@ -11026,12 +10973,7 @@ const renderNoItems = ({ props })=>{
|
|
|
11026
10973
|
}
|
|
11027
10974
|
}) : props.i18n.t(props.i18nKey);
|
|
11028
10975
|
return lit.html`
|
|
11029
|
-
<div
|
|
11030
|
-
class="my-2 max-w-full text-center text-2xl font-medium"
|
|
11031
|
-
part="no-results"
|
|
11032
|
-
>
|
|
11033
|
-
${content}
|
|
11034
|
-
</div>
|
|
10976
|
+
<div class="my-2 max-w-full text-center text-2xl font-medium" part="no-results">${content}</div>
|
|
11035
10977
|
`;
|
|
11036
10978
|
};
|
|
11037
10979
|
|
|
@@ -11075,8 +11017,7 @@ let AtomicCommerceNoProducts$1 = class AtomicCommerceNoProducts extends lit.LitE
|
|
|
11075
11017
|
firstSearchExecuted: this.summaryState.firstRequestExecuted,
|
|
11076
11018
|
hasResults: this.summaryState.hasProducts
|
|
11077
11019
|
}, ()=>renderNoItemsContainer()(lit.html`
|
|
11078
|
-
${renderMagnifyingGlass()} ${this.renderNoItems()}
|
|
11079
|
-
${this.renderSearchTips()}
|
|
11020
|
+
${renderMagnifyingGlass()} ${this.renderNoItems()} ${this.renderSearchTips()}
|
|
11080
11021
|
`))}`;
|
|
11081
11022
|
}
|
|
11082
11023
|
renderNoItems() {
|
|
@@ -12424,10 +12365,7 @@ let AtomicProductLink$1 = class AtomicProductLink extends LightDomMixin(SlotsFor
|
|
|
12424
12365
|
}
|
|
12425
12366
|
}
|
|
12426
12367
|
})(lit.html`
|
|
12427
|
-
${this.renderDefaultSlotContent(lit.html`<atomic-product-text
|
|
12428
|
-
field="ec_name"
|
|
12429
|
-
default="no-title"
|
|
12430
|
-
></atomic-product-text>`)}
|
|
12368
|
+
${this.renderDefaultSlotContent(lit.html`<atomic-product-text field="ec_name" default="no-title"></atomic-product-text>`)}
|
|
12431
12369
|
`);
|
|
12432
12370
|
})}`;
|
|
12433
12371
|
}
|
|
@@ -12537,11 +12475,7 @@ const renderImageCarousel = ({ props })=>{
|
|
|
12537
12475
|
class: `${commonPaginationClasses} right-0 mr-1`
|
|
12538
12476
|
}
|
|
12539
12477
|
})(lit.html`
|
|
12540
|
-
<atomic-icon
|
|
12541
|
-
part="next-icon"
|
|
12542
|
-
icon=${arrow_right}
|
|
12543
|
-
class=${commonArrowClasses}
|
|
12544
|
-
></atomic-icon>
|
|
12478
|
+
<atomic-icon part="next-icon" icon=${arrow_right} class=${commonArrowClasses}></atomic-icon>
|
|
12545
12479
|
`);
|
|
12546
12480
|
const renderIndicators = ()=>renderCarouselIndicator({
|
|
12547
12481
|
props: {
|
|
@@ -12559,9 +12493,7 @@ const renderImageCarousel = ({ props })=>{
|
|
|
12559
12493
|
aria-label=${props.label}
|
|
12560
12494
|
>
|
|
12561
12495
|
${renderPreviousButton()}
|
|
12562
|
-
<div class="w-full h-full" aria-live="polite" aria-atomic="false">
|
|
12563
|
-
${children}
|
|
12564
|
-
</div>
|
|
12496
|
+
<div class="w-full h-full" aria-live="polite" aria-atomic="false">${children}</div>
|
|
12565
12497
|
${renderNextButton()} ${renderIndicators()}
|
|
12566
12498
|
</div>`;
|
|
12567
12499
|
};
|
|
@@ -13197,10 +13129,7 @@ class AtomicResultPlaceholder extends lit.LitElement {
|
|
|
13197
13129
|
renderExcerptLine(width) {
|
|
13198
13130
|
return lit.html`
|
|
13199
13131
|
<div style="height: var(--line-height); width: ${width};">
|
|
13200
|
-
<div
|
|
13201
|
-
class=${placeholderClasses}
|
|
13202
|
-
style="height: var(--font-size);"
|
|
13203
|
-
></div>
|
|
13132
|
+
<div class=${placeholderClasses} style="height: var(--font-size);"></div>
|
|
13204
13133
|
</div>
|
|
13205
13134
|
`;
|
|
13206
13135
|
}
|
|
@@ -13234,11 +13163,7 @@ class AtomicResultPlaceholder extends lit.LitElement {
|
|
|
13234
13163
|
<div class="fields-placeholder">
|
|
13235
13164
|
${Array.from({
|
|
13236
13165
|
length: 4
|
|
13237
|
-
}, ()=>lit.html`
|
|
13238
|
-
<div
|
|
13239
|
-
class="field-value-placeholder ${placeholderClasses}"
|
|
13240
|
-
></div>
|
|
13241
|
-
`)}
|
|
13166
|
+
}, ()=>lit.html` <div class="field-value-placeholder ${placeholderClasses}"></div> `)}
|
|
13242
13167
|
</div>
|
|
13243
13168
|
</atomic-result-section-bottom-metadata>
|
|
13244
13169
|
</div>
|
|
@@ -13289,22 +13214,13 @@ class AtomicResultTablePlaceholder extends lit.LitElement {
|
|
|
13289
13214
|
<thead aria-hidden="true">
|
|
13290
13215
|
<tr>
|
|
13291
13216
|
<th>
|
|
13292
|
-
<div
|
|
13293
|
-
class="mt-2 h-8 block bg-neutral rounded"
|
|
13294
|
-
style="width: 14.5rem;"
|
|
13295
|
-
></div>
|
|
13217
|
+
<div class="mt-2 h-8 block bg-neutral rounded" style="width: 14.5rem;"></div>
|
|
13296
13218
|
</th>
|
|
13297
13219
|
<th>
|
|
13298
|
-
<div
|
|
13299
|
-
class="mt-2 h-8 block bg-neutral rounded"
|
|
13300
|
-
style="width: 9.75rem;"
|
|
13301
|
-
></div>
|
|
13220
|
+
<div class="mt-2 h-8 block bg-neutral rounded" style="width: 9.75rem;"></div>
|
|
13302
13221
|
</th>
|
|
13303
13222
|
<th>
|
|
13304
|
-
<div
|
|
13305
|
-
class="mt-2 h-8 block bg-neutral rounded"
|
|
13306
|
-
style="width: 6.5rem;"
|
|
13307
|
-
></div>
|
|
13223
|
+
<div class="mt-2 h-8 block bg-neutral rounded" style="width: 6.5rem;"></div>
|
|
13308
13224
|
</th>
|
|
13309
13225
|
</tr>
|
|
13310
13226
|
</thead>
|
|
@@ -13314,30 +13230,15 @@ class AtomicResultTablePlaceholder extends lit.LitElement {
|
|
|
13314
13230
|
}), ()=>lit.html`
|
|
13315
13231
|
<tr>
|
|
13316
13232
|
<td>
|
|
13317
|
-
<div
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
></div>
|
|
13321
|
-
<div
|
|
13322
|
-
class="mb-2 h-5 block bg-neutral rounded"
|
|
13323
|
-
style="width: 23.75rem;"
|
|
13324
|
-
></div>
|
|
13325
|
-
<div
|
|
13326
|
-
class="h-5 block bg-neutral rounded"
|
|
13327
|
-
style="width: 11.5rem;"
|
|
13328
|
-
></div>
|
|
13233
|
+
<div class="mb-6 h-8 block bg-neutral rounded" style="width: 22.875rem;"></div>
|
|
13234
|
+
<div class="mb-2 h-5 block bg-neutral rounded" style="width: 23.75rem;"></div>
|
|
13235
|
+
<div class="h-5 block bg-neutral rounded" style="width: 11.5rem;"></div>
|
|
13329
13236
|
</td>
|
|
13330
13237
|
<td>
|
|
13331
|
-
<div
|
|
13332
|
-
class="mt-1.5 h-5 block bg-neutral rounded"
|
|
13333
|
-
style="width: 11rem;"
|
|
13334
|
-
></div>
|
|
13238
|
+
<div class="mt-1.5 h-5 block bg-neutral rounded" style="width: 11rem;"></div>
|
|
13335
13239
|
</td>
|
|
13336
13240
|
<td>
|
|
13337
|
-
<div
|
|
13338
|
-
class="mt-1.5 h-5 block bg-neutral rounded"
|
|
13339
|
-
style="width: 4.875rem;"
|
|
13340
|
-
></div>
|
|
13241
|
+
<div class="mt-1.5 h-5 block bg-neutral rounded" style="width: 4.875rem;"></div>
|
|
13341
13242
|
</td>
|
|
13342
13243
|
</tr>
|
|
13343
13244
|
`)}
|
|
@@ -13417,9 +13318,7 @@ const renderListWrapper = ({ props })=>{
|
|
|
13417
13318
|
};
|
|
13418
13319
|
const renderListRoot = ({ props })=>{
|
|
13419
13320
|
const { listClasses } = props;
|
|
13420
|
-
return (children)=>lit.html`<div class="list-root ${listClasses}" part="result-list"
|
|
13421
|
-
${children}
|
|
13422
|
-
</div>`;
|
|
13321
|
+
return (children)=>lit.html`<div class="list-root ${listClasses}" part="result-list">${children}</div>`;
|
|
13423
13322
|
};
|
|
13424
13323
|
|
|
13425
13324
|
const renderGridLayout = ({ props })=>{
|
|
@@ -13537,17 +13436,11 @@ const renderTableLayout = ({ props })=>{
|
|
|
13537
13436
|
const { host, listClasses, logger, label } = props;
|
|
13538
13437
|
const fieldColumns = getFieldTableColumns(props);
|
|
13539
13438
|
if (!fieldColumns.length) logger.error('atomic-table-element elements missing in the template to display columns.', host);
|
|
13540
|
-
return (children)=>lit.html`<table
|
|
13541
|
-
class="list-root ${listClasses}"
|
|
13542
|
-
part="result-table"
|
|
13543
|
-
aria-label=${label}
|
|
13544
|
-
>
|
|
13439
|
+
return (children)=>lit.html`<table class="list-root ${listClasses}" part="result-table" aria-label=${label}>
|
|
13545
13440
|
<thead part="result-table-heading">
|
|
13546
13441
|
<tr part="result-table-heading-row">
|
|
13547
13442
|
${map_js.map(fieldColumns, (column)=>lit.html`<th part="result-table-heading-cell">
|
|
13548
|
-
<atomic-text
|
|
13549
|
-
.value=${column.getAttribute('label')}
|
|
13550
|
-
></atomic-text>
|
|
13443
|
+
<atomic-text .value=${column.getAttribute('label')}></atomic-text>
|
|
13551
13444
|
</th>`)}
|
|
13552
13445
|
</tr>
|
|
13553
13446
|
</thead>
|
|
@@ -14026,12 +13919,7 @@ const renderChoices = ({ props })=>{
|
|
|
14026
13919
|
else if (choice > pageSize) focusOnNextNewResult();
|
|
14027
13920
|
};
|
|
14028
13921
|
return lit.html`
|
|
14029
|
-
<div
|
|
14030
|
-
part="buttons"
|
|
14031
|
-
role="radiogroup"
|
|
14032
|
-
aria-label=${label}
|
|
14033
|
-
class="flex flex-wrap gap-2"
|
|
14034
|
-
>
|
|
13922
|
+
<div part="buttons" role="radiogroup" aria-label=${label} class="flex flex-wrap gap-2">
|
|
14035
13923
|
${choices.map((choice)=>{
|
|
14036
13924
|
const isSelected = pageSize === choice;
|
|
14037
13925
|
const parts = [
|
|
@@ -14062,14 +13950,14 @@ const renderChoices = ({ props })=>{
|
|
|
14062
13950
|
};
|
|
14063
13951
|
|
|
14064
13952
|
const renderLabel = ()=>(children)=>lit.html`
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
|
|
14072
|
-
|
|
13953
|
+
<span
|
|
13954
|
+
part="label"
|
|
13955
|
+
class="text-on-background mr-3 self-start text-lg leading-10"
|
|
13956
|
+
aria-hidden="true"
|
|
13957
|
+
>
|
|
13958
|
+
${children}
|
|
13959
|
+
</span>
|
|
13960
|
+
`;
|
|
14073
13961
|
|
|
14074
13962
|
class ChoiceIsNaNError extends Error {
|
|
14075
13963
|
constructor(choice){
|
|
@@ -14313,11 +14201,7 @@ const renderQueryErrorLink = ({ props })=>{
|
|
|
14313
14201
|
}
|
|
14314
14202
|
};
|
|
14315
14203
|
const link = getErrorLink();
|
|
14316
|
-
return link ? lit.html`<a
|
|
14317
|
-
href=${link}
|
|
14318
|
-
part="doc-link"
|
|
14319
|
-
class="btn-primary mt-10 inline-block p-3"
|
|
14320
|
-
>
|
|
14204
|
+
return link ? lit.html`<a href=${link} part="doc-link" class="btn-primary mt-10 inline-block p-3">
|
|
14321
14205
|
${props.i18n.t('coveo-online-help')}
|
|
14322
14206
|
</a>` : lit.nothing;
|
|
14323
14207
|
};
|
|
@@ -14451,9 +14335,7 @@ const renderQuerySummaryContainer = ({ props })=>(children)=>{
|
|
|
14451
14335
|
'text-on-background': true,
|
|
14452
14336
|
[props.additionalClasses ?? '']: Boolean(props.additionalClasses)
|
|
14453
14337
|
};
|
|
14454
|
-
return lit.html`
|
|
14455
|
-
<div class=${multiClassMap(classNames)} part="container">${children}</div>
|
|
14456
|
-
`;
|
|
14338
|
+
return lit.html` <div class=${multiClassMap(classNames)} part="container">${children}</div> `;
|
|
14457
14339
|
};
|
|
14458
14340
|
|
|
14459
14341
|
const renderQuerySummaryGuard = ({ props })=>(children)=>{
|
|
@@ -14894,9 +14776,7 @@ const renderCarousel = ({ props })=>(children)=>{
|
|
|
14894
14776
|
${renderPreviousButton(numberOfPages, previousPage, props.bindings)}
|
|
14895
14777
|
${renderNextButton(numberOfPages, nextPage, props.bindings)}
|
|
14896
14778
|
</div>
|
|
14897
|
-
<div class="carousel-items" aria-live="polite" aria-atomic="false">
|
|
14898
|
-
${children}
|
|
14899
|
-
</div>
|
|
14779
|
+
<div class="carousel-items" aria-live="polite" aria-atomic="false">${children}</div>
|
|
14900
14780
|
</div>
|
|
14901
14781
|
${renderIndicators(numberOfPages, currentPage)}
|
|
14902
14782
|
</div>
|
|
@@ -15012,10 +14892,7 @@ let AtomicCommerceRecommendationList$1 = class AtomicCommerceRecommendationList
|
|
|
15012
14892
|
if (!this.augmentedRecommendationListState.headline) return;
|
|
15013
14893
|
if (this.augmentedRecommendationListState.hasError) return;
|
|
15014
14894
|
if (!this.isEveryProductReady && this.isAppLoaded) return lit.html`
|
|
15015
|
-
<div
|
|
15016
|
-
aria-hidden="true"
|
|
15017
|
-
class="bg-neutral my-2 h-8 w-60 animate-pulse rounded"
|
|
15018
|
-
></div>
|
|
14895
|
+
<div aria-hidden="true" class="bg-neutral my-2 h-8 w-60 animate-pulse rounded"></div>
|
|
15019
14896
|
`;
|
|
15020
14897
|
return lit.html`${renderHeading({
|
|
15021
14898
|
props: {
|
|
@@ -15315,10 +15192,7 @@ const renderRefineModalBody = (i18n)=>(children)=>lit.html`
|
|
|
15315
15192
|
|
|
15316
15193
|
const renderRefineModalFiltersSection = ({ props })=>(children)=>lit.html`
|
|
15317
15194
|
<div part="filter-section" class="mt-8 mb-3 flex w-full justify-between">
|
|
15318
|
-
<h2
|
|
15319
|
-
part="section-title section-filters-title"
|
|
15320
|
-
class="truncate text-2xl font-bold"
|
|
15321
|
-
>
|
|
15195
|
+
<h2 part="section-title section-filters-title" class="truncate text-2xl font-bold">
|
|
15322
15196
|
${props.i18n.t('filters')}
|
|
15323
15197
|
</h2>
|
|
15324
15198
|
${children}
|
|
@@ -15636,11 +15510,7 @@ const renderRefineModal = ({ props })=>(children)=>{
|
|
|
15636
15510
|
onClick: props.onClose,
|
|
15637
15511
|
ariaLabel: props.i18n.t('close')
|
|
15638
15512
|
}
|
|
15639
|
-
})(lit.html`<atomic-icon
|
|
15640
|
-
part="close-icon"
|
|
15641
|
-
class="h-5 w-5"
|
|
15642
|
-
icon=${images_close}
|
|
15643
|
-
></atomic-icon>`)}
|
|
15513
|
+
})(lit.html`<atomic-icon part="close-icon" class="h-5 w-5" icon=${images_close}></atomic-icon>`)}
|
|
15644
15514
|
</div>
|
|
15645
15515
|
`;
|
|
15646
15516
|
const renderFooter = ()=>lit.html`
|
|
@@ -15690,10 +15560,7 @@ const renderRefineModal = ({ props })=>(children)=>{
|
|
|
15690
15560
|
var sort = "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.5 6L7.5 17\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M11 14L7.5 18L4 14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M16.5 18L16.5 6\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <path d=\"M13 10L16.5 6L20 10\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
|
|
15691
15561
|
|
|
15692
15562
|
const renderRefineModalSortSection = ({ props })=>(children)=>lit.html`
|
|
15693
|
-
<h2
|
|
15694
|
-
part="section-title section-sort-title"
|
|
15695
|
-
class="mb-3 truncate text-2xl font-bold"
|
|
15696
|
-
>
|
|
15563
|
+
<h2 part="section-title section-sort-title" class="mb-3 truncate text-2xl font-bold">
|
|
15697
15564
|
${props.i18n.t('sort')}
|
|
15698
15565
|
</h2>
|
|
15699
15566
|
<div part="select-wrapper" class="relative">
|
|
@@ -15709,18 +15576,12 @@ const renderRefineModalSortSection = ({ props })=>(children)=>lit.html`
|
|
|
15709
15576
|
part="select-icon-wrapper"
|
|
15710
15577
|
class="peer-hover:text-primary-light peer-focus-within:text-primary-light pointer-events-none absolute top-0 right-0 bottom-0 flex items-center justify-center pr-6"
|
|
15711
15578
|
>
|
|
15712
|
-
<atomic-icon
|
|
15713
|
-
part="select-icon"
|
|
15714
|
-
icon=${sort}
|
|
15715
|
-
class="h-6 w-6"
|
|
15716
|
-
></atomic-icon>
|
|
15579
|
+
<atomic-icon part="select-icon" icon=${sort} class="h-6 w-6"></atomic-icon>
|
|
15717
15580
|
</div>
|
|
15718
15581
|
</div>
|
|
15719
15582
|
`;
|
|
15720
15583
|
|
|
15721
|
-
const renderSortOption = ({ props: { value, selected, i18n, label } })=>lit.html`
|
|
15722
|
-
<option value=${value} ?selected=${selected}>${i18n.t(label)}</option>
|
|
15723
|
-
`;
|
|
15584
|
+
const renderSortOption = ({ props: { value, selected, i18n, label } })=>lit.html` <option value=${value} ?selected=${selected}>${i18n.t(label)}</option> `;
|
|
15724
15585
|
|
|
15725
15586
|
const renderCommerceSortOption = ({ props })=>{
|
|
15726
15587
|
const { sort } = props;
|
|
@@ -16014,11 +15875,7 @@ const renderSearchBoxWrapper = ({ props })=>(children)=>{
|
|
|
16014
15875
|
'focus-within:border-disabled focus-within:ring-neutral': props.disabled,
|
|
16015
15876
|
'focus-within:border-primary focus-within:ring-ring-primary': !props.disabled
|
|
16016
15877
|
});
|
|
16017
|
-
return lit.html`<div
|
|
16018
|
-
part="wrapper"
|
|
16019
|
-
class=${multiClassMap(classes)}
|
|
16020
|
-
@focusout=${props.onFocusout}
|
|
16021
|
-
>
|
|
15878
|
+
return lit.html`<div part="wrapper" class=${multiClassMap(classes)} @focusout=${props.onFocusout}>
|
|
16022
15879
|
${children}
|
|
16023
15880
|
</div>`;
|
|
16024
15881
|
};
|
|
@@ -16041,11 +15898,7 @@ const renderTextAreaClearButton = ({ props: { textAreaRef, i18n, onClick } })=>l
|
|
|
16041
15898
|
},
|
|
16042
15899
|
ariaLabel: i18n.t('clear-searchbox')
|
|
16043
15900
|
}
|
|
16044
|
-
})(lit.html`<atomic-icon
|
|
16045
|
-
part="clear-icon"
|
|
16046
|
-
icon=${clear_slim}
|
|
16047
|
-
class="h-4 w-4"
|
|
16048
|
-
></atomic-icon>`)}
|
|
15901
|
+
})(lit.html`<atomic-icon part="clear-icon" icon=${clear_slim} class="h-4 w-4"></atomic-icon>`)}
|
|
16049
15902
|
</div>`;
|
|
16050
15903
|
|
|
16051
15904
|
function syncTextWithReplica(ref, value) {
|
|
@@ -16139,10 +15992,7 @@ var search_slim = "<svg width=\"17\" height=\"17\" viewBox=\"0 0 17 17\" fill=\"
|
|
|
16139
15992
|
|
|
16140
15993
|
const renderSubmitButton = ({ props })=>{
|
|
16141
15994
|
const { i18n, disabled, onClick } = props;
|
|
16142
|
-
return lit.html`<div
|
|
16143
|
-
part="submit-button-wrapper"
|
|
16144
|
-
class="mr-2 flex items-center justify-center py-2"
|
|
16145
|
-
>
|
|
15995
|
+
return lit.html`<div part="submit-button-wrapper" class="mr-2 flex items-center justify-center py-2">
|
|
16146
15996
|
${renderButton({
|
|
16147
15997
|
props: {
|
|
16148
15998
|
style: 'text-primary',
|
|
@@ -16154,11 +16004,7 @@ const renderSubmitButton = ({ props })=>{
|
|
|
16154
16004
|
},
|
|
16155
16005
|
disabled
|
|
16156
16006
|
}
|
|
16157
|
-
})(lit.html`<atomic-icon
|
|
16158
|
-
part="submit-icon"
|
|
16159
|
-
icon=${search_slim}
|
|
16160
|
-
class="h-4 w-4"
|
|
16161
|
-
></atomic-icon>`)}
|
|
16007
|
+
})(lit.html`<atomic-icon part="submit-icon" icon=${search_slim} class="h-4 w-4"></atomic-icon>`)}
|
|
16162
16008
|
</div>`;
|
|
16163
16009
|
};
|
|
16164
16010
|
|
|
@@ -16490,16 +16336,16 @@ let AtomicCommerceSearchBoxInstantProducts$1 = class AtomicCommerceSearchBoxInst
|
|
|
16490
16336
|
const partialItem = getPartialInstantItemElement(this.bindings.i18n, 'instant-products-suggestion-label', this.ariaLabelGenerator?.(this.bindings, product) || product.ec_name, product.permanentid);
|
|
16491
16337
|
const key = `instant-product-${encodeForDomAttribute(product.permanentid)}`;
|
|
16492
16338
|
const template = lit.html`${keyed_js.keyed(key, lit.html`<atomic-product
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16497
|
-
|
|
16498
|
-
|
|
16499
|
-
|
|
16500
|
-
|
|
16501
|
-
|
|
16502
|
-
|
|
16339
|
+
part="outline"
|
|
16340
|
+
.product=${product}
|
|
16341
|
+
.interactiveProduct=${interactiveProduct}
|
|
16342
|
+
.display=${this.display}
|
|
16343
|
+
.density=${this.density}
|
|
16344
|
+
.imageSize=${this.imageSize}
|
|
16345
|
+
.content=${this.itemTemplateProvider.getTemplateContent(product)}
|
|
16346
|
+
.stopPropagation=${false}
|
|
16347
|
+
.renderingFunction=${this.itemRenderingFunction}
|
|
16348
|
+
></atomic-product>`)}`;
|
|
16503
16349
|
const container = document.createElement('div');
|
|
16504
16350
|
lit.render(template, container);
|
|
16505
16351
|
const productElement = container.firstElementChild;
|
|
@@ -16628,10 +16474,7 @@ const getPartialSearchBoxSuggestionElement = (suggestion, i18n)=>({
|
|
|
16628
16474
|
const renderQuerySuggestion = ({ icon, hasQuery, suggestion, hasMultipleKindOfSuggestions, alwaysShowIcon = false })=>{
|
|
16629
16475
|
const shouldShowIcon = alwaysShowIcon || hasMultipleKindOfSuggestions;
|
|
16630
16476
|
const template = lit.html`
|
|
16631
|
-
<div
|
|
16632
|
-
part="query-suggestion-content"
|
|
16633
|
-
class="pointer-events-none flex items-center"
|
|
16634
|
-
>
|
|
16477
|
+
<div part="query-suggestion-content" class="pointer-events-none flex items-center">
|
|
16635
16478
|
${shouldShowIcon ? lit.html`<atomic-icon
|
|
16636
16479
|
part="query-suggestion-icon"
|
|
16637
16480
|
icon=${icon}
|
|
@@ -16786,11 +16629,7 @@ const renderRecentQuery = ({ icon, query, value })=>{
|
|
|
16786
16629
|
part="recent-query-content"
|
|
16787
16630
|
class="pointer-events-none flex items-center text-left break-all"
|
|
16788
16631
|
>
|
|
16789
|
-
<atomic-icon
|
|
16790
|
-
part="recent-query-icon"
|
|
16791
|
-
icon=${icon}
|
|
16792
|
-
class="mr-2 h-4 w-4 shrink-0"
|
|
16793
|
-
></atomic-icon>
|
|
16632
|
+
<atomic-icon part="recent-query-icon" icon=${icon} class="mr-2 h-4 w-4 shrink-0"></atomic-icon>
|
|
16794
16633
|
|
|
16795
16634
|
${when_js.when(hasQuery, ()=>lit.html`<span
|
|
16796
16635
|
part="recent-query-text"
|
|
@@ -16806,9 +16645,7 @@ const renderRecentQuery = ({ icon, query, value })=>{
|
|
|
16806
16645
|
}
|
|
16807
16646
|
]
|
|
16808
16647
|
})}
|
|
16809
|
-
></span>`, ()=>lit.html`<span part="recent-query-text" class="line-clamp-2 break-all">
|
|
16810
|
-
${value}
|
|
16811
|
-
</span>`)}
|
|
16648
|
+
></span>`, ()=>lit.html`<span part="recent-query-text" class="line-clamp-2 break-all"> ${value} </span>`)}
|
|
16812
16649
|
</div>`;
|
|
16813
16650
|
const container = document.createElement('div');
|
|
16814
16651
|
lit.render(template, container);
|
|
@@ -16819,9 +16656,7 @@ const renderRecentQueryClear = ({ i18n })=>{
|
|
|
16819
16656
|
part="recent-query-title-content"
|
|
16820
16657
|
class="pointer-events-none flex w-full justify-between"
|
|
16821
16658
|
>
|
|
16822
|
-
<span class="font-bold" part="recent-query-title">
|
|
16823
|
-
${i18n.t('recent-searches')}
|
|
16824
|
-
</span>
|
|
16659
|
+
<span class="font-bold" part="recent-query-title"> ${i18n.t('recent-searches')} </span>
|
|
16825
16660
|
<span part="recent-query-clear">${i18n.t('clear')}</span>
|
|
16826
16661
|
</div>`;
|
|
16827
16662
|
const container = document.createElement('div');
|
|
@@ -19093,11 +18928,7 @@ AtomicCommerceSearchBox$1 = _ts_decorate$n([
|
|
|
19093
18928
|
withTailwindStyles
|
|
19094
18929
|
], AtomicCommerceSearchBox$1);
|
|
19095
18930
|
|
|
19096
|
-
const renderSortLabel = ({ props: { i18n, id } })=>lit.html`<label
|
|
19097
|
-
class="m-2 cursor-pointer text-sm font-bold"
|
|
19098
|
-
part="label"
|
|
19099
|
-
for=${id}
|
|
19100
|
-
>
|
|
18931
|
+
const renderSortLabel = ({ props: { i18n, id } })=>lit.html`<label class="m-2 cursor-pointer text-sm font-bold" part="label" for=${id}>
|
|
19101
18932
|
${i18n.t('with-colon', {
|
|
19102
18933
|
text: i18n.t('sort-by')
|
|
19103
18934
|
})}
|
|
@@ -19290,9 +19121,7 @@ let AtomicProductChildren$1 = class AtomicProductChildren extends LightDomMixin(
|
|
|
19290
19121
|
renderLabel() {
|
|
19291
19122
|
return lit.html`
|
|
19292
19123
|
<div class="text-neutral-dark my-2 font-semibold">
|
|
19293
|
-
<atomic-commerce-text
|
|
19294
|
-
.value=${this.bindings.i18n.t(this.label)}
|
|
19295
|
-
></atomic-commerce-text>
|
|
19124
|
+
<atomic-commerce-text .value=${this.bindings.i18n.t(this.label)}></atomic-commerce-text>
|
|
19296
19125
|
</div>
|
|
19297
19126
|
`;
|
|
19298
19127
|
}
|
|
@@ -19389,11 +19218,7 @@ const renderExpandableText = ({ props: { isExpanded, isTruncated, isCollapsible,
|
|
|
19389
19218
|
const buttonLabel = isExpanded ? showLessLabel : showMoreLabel;
|
|
19390
19219
|
const icon = isExpanded ? minus : plus;
|
|
19391
19220
|
return lit.html`<div class="flex flex-col items-start">
|
|
19392
|
-
<div
|
|
19393
|
-
part="expandable-text"
|
|
19394
|
-
class="${multiClassMap(expandableTextClasses)}"
|
|
19395
|
-
${ref_js.ref(textRef)}
|
|
19396
|
-
>
|
|
19221
|
+
<div part="expandable-text" class="${multiClassMap(expandableTextClasses)}" ${ref_js.ref(textRef)}>
|
|
19397
19222
|
${children}
|
|
19398
19223
|
</div>
|
|
19399
19224
|
|
|
@@ -19407,10 +19232,7 @@ const renderExpandableText = ({ props: { isExpanded, isTruncated, isCollapsible,
|
|
|
19407
19232
|
},
|
|
19408
19233
|
onClick: onToggleExpand
|
|
19409
19234
|
}
|
|
19410
|
-
})(lit.html` <atomic-icon
|
|
19411
|
-
icon="${icon}"
|
|
19412
|
-
class="mx-1 w-2 align-baseline"
|
|
19413
|
-
></atomic-icon>
|
|
19235
|
+
})(lit.html` <atomic-icon icon="${icon}" class="mx-1 w-2 align-baseline"></atomic-icon>
|
|
19414
19236
|
${buttonLabel}`)}
|
|
19415
19237
|
</div>`;
|
|
19416
19238
|
};
|
|
@@ -19478,9 +19300,7 @@ let AtomicProductDescription$1 = class AtomicProductDescription extends LightDom
|
|
|
19478
19300
|
isCollapsible: this.isCollapsible,
|
|
19479
19301
|
textRef: this.descriptionRef
|
|
19480
19302
|
}
|
|
19481
|
-
})(lit.html`
|
|
19482
|
-
<atomic-product-text field=${this.field}></atomic-product-text>
|
|
19483
|
-
`)}`;
|
|
19303
|
+
})(lit.html` <atomic-product-text field=${this.field}></atomic-product-text> `)}`;
|
|
19484
19304
|
}
|
|
19485
19305
|
constructor(){
|
|
19486
19306
|
super(), this.productController = createProductContextController(this), this.isExpanded = false, this.isTruncated = false, this.descriptionRef = ref_js.createRef(), this.truncateAfter = '2', this.field = 'ec_shortdesc', this.isCollapsible = false, this.onToggleExpand = (e)=>{
|
|
@@ -19763,9 +19583,7 @@ let AtomicProductMultiValueText$1 = class AtomicProductMultiValueText extends li
|
|
|
19763
19583
|
const kebabValue = titleToKebab(value);
|
|
19764
19584
|
return lit.html`
|
|
19765
19585
|
<li part="product-multi-value-text-value" class="inline-block">
|
|
19766
|
-
<slot name=${`product-multi-value-text-value-${kebabValue}`}>
|
|
19767
|
-
${label}
|
|
19768
|
-
</slot>
|
|
19586
|
+
<slot name=${`product-multi-value-text-value-${kebabValue}`}> ${label} </slot>
|
|
19769
19587
|
</li>
|
|
19770
19588
|
`;
|
|
19771
19589
|
}
|
|
@@ -19803,10 +19621,7 @@ let AtomicProductMultiValueText$1 = class AtomicProductMultiValueText extends li
|
|
|
19803
19621
|
render() {
|
|
19804
19622
|
if (0 === this.sortedValues.length) return lit.nothing;
|
|
19805
19623
|
return lit.html`
|
|
19806
|
-
<ul
|
|
19807
|
-
part="product-multi-value-text-list"
|
|
19808
|
-
class="m-0 flex list-none p-0 set-font-size-sm"
|
|
19809
|
-
>
|
|
19624
|
+
<ul part="product-multi-value-text-list" class="m-0 flex list-none p-0 set-font-size-sm">
|
|
19810
19625
|
${this.renderListItems(this.sortedValues)}
|
|
19811
19626
|
</ul>
|
|
19812
19627
|
`;
|
|
@@ -20061,12 +19876,9 @@ const renderRating = ({ props })=>{
|
|
|
20061
19876
|
})}
|
|
20062
19877
|
>
|
|
20063
19878
|
<div class="z-0 flex gap-0.5">${emptyIconDisplay()}</div>
|
|
20064
|
-
<div
|
|
20065
|
-
class="absolute top-0 left-0 z-1 flex gap-0.5 overflow-hidden"
|
|
20066
|
-
style=${styleMap_js.styleMap({
|
|
19879
|
+
<div class="absolute top-0 left-0 z-1 flex gap-0.5 overflow-hidden" style=${styleMap_js.styleMap({
|
|
20067
19880
|
width
|
|
20068
|
-
})}
|
|
20069
|
-
>
|
|
19881
|
+
})}>
|
|
20070
19882
|
${filledIconDisplay()}
|
|
20071
19883
|
</div>
|
|
20072
19884
|
</div>`;
|
|
@@ -20127,9 +19939,7 @@ let AtomicProductRating$1 = class AtomicProductRating extends LightDomMixin(lit.
|
|
|
20127
19939
|
}
|
|
20128
19940
|
})}
|
|
20129
19941
|
${when_js.when(null !== this.ratingDetails, ()=>lit.html`
|
|
20130
|
-
<span class="text-neutral-dark rating-details pl-1">
|
|
20131
|
-
(${this.ratingDetails})
|
|
20132
|
-
</span>
|
|
19942
|
+
<span class="text-neutral-dark rating-details pl-1"> (${this.ratingDetails}) </span>
|
|
20133
19943
|
`)}
|
|
20134
19944
|
</div>
|
|
20135
19945
|
`)}
|
|
@@ -20591,9 +20401,7 @@ let AtomicGeneratedAnswerFeedbackModal$1 = class AtomicGeneratedAnswerFeedbackMo
|
|
|
20591
20401
|
${this.bindings.i18n.t(label)}
|
|
20592
20402
|
<span class=${multiClassMap({
|
|
20593
20403
|
'text-error-red ml-0.5': true
|
|
20594
|
-
})}
|
|
20595
|
-
>*</span
|
|
20596
|
-
>
|
|
20404
|
+
})}>*</span>
|
|
20597
20405
|
</label>
|
|
20598
20406
|
</div>
|
|
20599
20407
|
<span
|
|
@@ -20633,29 +20441,29 @@ let AtomicGeneratedAnswerFeedbackModal$1 = class AtomicGeneratedAnswerFeedbackMo
|
|
|
20633
20441
|
label: this.bindings.i18n.t(localeKey)
|
|
20634
20442
|
}
|
|
20635
20443
|
})(lit.html`
|
|
20636
|
-
|
|
20637
|
-
|
|
20444
|
+
<div
|
|
20445
|
+
class=${multiClassMap({
|
|
20638
20446
|
'answer-evaluation mt-3 flex items-center': true,
|
|
20639
20447
|
[String(correspondingAnswer)]: true
|
|
20640
20448
|
})}
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20449
|
+
key=${String(correspondingAnswer)}
|
|
20450
|
+
>
|
|
20451
|
+
<div class=${multiClassMap({
|
|
20644
20452
|
'flex-1 pr-4': true
|
|
20645
20453
|
})}>
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20454
|
+
${this.renderAnswerEvaluation(localeKey, correspondingAnswer)}
|
|
20455
|
+
</div>
|
|
20456
|
+
<div
|
|
20457
|
+
class=${multiClassMap({
|
|
20650
20458
|
'options flex flex-shrink-0 text-base': true
|
|
20651
20459
|
})}
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
</div>
|
|
20460
|
+
>
|
|
20461
|
+
${this.renderFeedbackOption('yes', correspondingAnswer)}
|
|
20462
|
+
${this.renderFeedbackOption('unknown', correspondingAnswer)}
|
|
20463
|
+
${this.renderFeedbackOption('no', correspondingAnswer)}
|
|
20657
20464
|
</div>
|
|
20658
|
-
|
|
20465
|
+
</div>
|
|
20466
|
+
`))}
|
|
20659
20467
|
</fieldset>
|
|
20660
20468
|
`;
|
|
20661
20469
|
}
|
|
@@ -20718,18 +20526,12 @@ let AtomicGeneratedAnswerFeedbackModal$1 = class AtomicGeneratedAnswerFeedbackMo
|
|
|
20718
20526
|
}
|
|
20719
20527
|
renderSuccessMessage() {
|
|
20720
20528
|
return lit.html`
|
|
20721
|
-
<div
|
|
20722
|
-
slot="body"
|
|
20723
|
-
class=${multiClassMap({
|
|
20529
|
+
<div slot="body" class=${multiClassMap({
|
|
20724
20530
|
'my-4 flex flex-col items-center gap-4': true
|
|
20725
|
-
})}
|
|
20726
|
-
|
|
20727
|
-
<atomic-icon
|
|
20728
|
-
icon=${success}
|
|
20729
|
-
class=${multiClassMap({
|
|
20531
|
+
})}>
|
|
20532
|
+
<atomic-icon icon=${success} class=${multiClassMap({
|
|
20730
20533
|
'w-48': true
|
|
20731
|
-
})}
|
|
20732
|
-
></atomic-icon>
|
|
20534
|
+
})}></atomic-icon>
|
|
20733
20535
|
<p
|
|
20734
20536
|
class=${multiClassMap({
|
|
20735
20537
|
'text-base': true
|
|
@@ -20751,19 +20553,15 @@ let AtomicGeneratedAnswerFeedbackModal$1 = class AtomicGeneratedAnswerFeedbackMo
|
|
|
20751
20553
|
const buttonClasses = 'flex items-center justify-center text-sm leading-4 p-2 rounded-md';
|
|
20752
20554
|
return lit.html`
|
|
20753
20555
|
<div slot="footer" part="modal-footer">
|
|
20754
|
-
<div
|
|
20755
|
-
class=${multiClassMap({
|
|
20556
|
+
<div class=${multiClassMap({
|
|
20756
20557
|
'flex items-center justify-between': true
|
|
20757
|
-
})}
|
|
20758
|
-
>
|
|
20558
|
+
})}>
|
|
20759
20559
|
<div class=${multiClassMap({
|
|
20760
20560
|
'required-label text-base': true
|
|
20761
20561
|
})}>
|
|
20762
20562
|
<span class=${multiClassMap({
|
|
20763
20563
|
'text-error-red mr-0.5': true
|
|
20764
|
-
})}
|
|
20765
|
-
>*</span
|
|
20766
|
-
>
|
|
20564
|
+
})}>*</span>
|
|
20767
20565
|
${this.bindings.i18n.t('required-fields')}
|
|
20768
20566
|
</div>
|
|
20769
20567
|
<div class=${multiClassMap({
|
|
@@ -21409,7 +21207,7 @@ const ListWrapper$1 = (props) => {
|
|
|
21409
21207
|
}
|
|
21410
21208
|
});
|
|
21411
21209
|
}, [otherProps.display, template]);
|
|
21412
|
-
return
|
|
21210
|
+
return React.createElement(AtomicCommerceProductList, { ref: commerceProductListRef, ...otherProps });
|
|
21413
21211
|
};
|
|
21414
21212
|
const isTemplate = (template) => {
|
|
21415
21213
|
return template.linkTemplate !== undefined;
|
|
@@ -21459,8 +21257,7 @@ const InterfaceWrapper = (props) => {
|
|
|
21459
21257
|
React.useEffect(() => {
|
|
21460
21258
|
const CommerceRecommendationInterfaceAtomic = interfaceRef.current;
|
|
21461
21259
|
if (!initialization) {
|
|
21462
|
-
initialization =
|
|
21463
|
-
CommerceRecommendationInterfaceAtomic.initializeWithEngine(engine);
|
|
21260
|
+
initialization = CommerceRecommendationInterfaceAtomic.initializeWithEngine(engine);
|
|
21464
21261
|
initialization.then(() => {
|
|
21465
21262
|
localization(CommerceRecommendationInterfaceAtomic.i18n);
|
|
21466
21263
|
});
|