@coveo/atomic 3.63.0 → 3.64.1
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/custom-elements.json +194 -8
- package/dist/cjs/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.cjs +1 -0
- package/dist/cjs/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.cjs +1 -1
- package/dist/cjs/components/commerce/atomic-commerce-facet/atomic-commerce-facet.cjs +1 -1
- package/dist/cjs/components/commerce/atomic-product-field-condition/atomic-product-field-condition.cjs +1 -4
- package/dist/cjs/components/commerce/atomic-product-template/atomic-product-template.cjs +15 -1
- package/dist/cjs/components/common/atomic-focus-trap/atomic-focus-trap.cjs +11 -1
- package/dist/cjs/components/common/atomic-layout-section/layout.cjs +6 -2
- package/dist/cjs/components/common/facets/facet-common.cjs +21 -2
- package/dist/cjs/components/common/facets/facet-search/facet-search-aria-live.cjs +21 -8
- package/dist/cjs/components/common/query-error/icon.cjs +7 -26
- package/dist/cjs/components/common/query-error/icons.cjs +68 -0
- package/dist/cjs/components/common/template-controller/template-utils.cjs +9 -0
- package/dist/cjs/components/insight/atomic-insight-facet/atomic-insight-facet.cjs +1 -1
- package/dist/cjs/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.cjs +1 -5
- package/dist/cjs/components/insight/atomic-insight-result-template/atomic-insight-result-template.cjs +15 -1
- package/dist/cjs/components/insight/atomic-insight-smart-snippet/atomic-insight-smart-snippet.cjs +3 -3
- package/dist/cjs/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.cjs +15 -1
- package/dist/cjs/components/search/atomic-category-facet/atomic-category-facet.cjs +1 -1
- package/dist/cjs/components/search/atomic-color-facet/atomic-color-facet.cjs +1 -1
- package/dist/cjs/components/search/atomic-facet/atomic-facet.cjs +1 -1
- package/dist/cjs/components/search/atomic-facet-manager/atomic-facet-manager.cjs +7 -3
- package/dist/cjs/components/search/atomic-field-condition/atomic-field-condition.cjs +1 -4
- package/dist/cjs/components/search/atomic-popover/atomic-popover.cjs +1 -2
- package/dist/cjs/components/search/atomic-result-children-template/atomic-result-children-template.cjs +15 -1
- package/dist/cjs/components/search/atomic-result-template/atomic-result-template.cjs +15 -1
- package/dist/cjs/components/search/atomic-search-layout/atomic-search-layout.tw.css.cjs +12 -2
- package/dist/cjs/decorators/bind-state.cjs +38 -8
- package/dist/cjs/decorators/with-tailwind-styles.cjs +2 -1
- package/dist/cjs/global/environment.cjs +1 -1
- package/dist/cjs/utils/init-queue.cjs +6 -4
- package/dist/cjs/utils/replace-breakpoint-utils.cjs +9 -4
- package/dist/cjs/versions.cjs +1 -1
- package/dist/esm/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +1 -0
- package/dist/esm/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +1 -1
- package/dist/esm/components/commerce/atomic-commerce-facet/atomic-commerce-facet.js +1 -1
- package/dist/esm/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +1 -1
- package/dist/esm/components/commerce/atomic-product-field-condition/atomic-product-field-condition.js +2 -5
- package/dist/esm/components/commerce/atomic-product-template/atomic-product-template.js +16 -2
- package/dist/esm/components/common/atomic-focus-trap/atomic-focus-trap.js +11 -1
- package/dist/esm/components/common/atomic-layout-section/layout.js +6 -2
- package/dist/esm/components/common/facets/facet-common.js +16 -3
- package/dist/esm/components/common/facets/facet-search/facet-search-aria-live.js +21 -8
- package/dist/esm/components/common/query-error/icon.js +5 -23
- package/dist/esm/components/common/query-error/icons.js +17 -0
- package/dist/esm/components/common/template-controller/template-utils.js +7 -1
- package/dist/esm/components/insight/atomic-insight-facet/atomic-insight-facet.js +1 -1
- package/dist/esm/components/insight/atomic-insight-result-children/atomic-insight-result-children.js +1 -1
- package/dist/esm/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.js +2 -6
- package/dist/esm/components/insight/atomic-insight-result-template/atomic-insight-result-template.js +16 -2
- package/dist/esm/components/insight/atomic-insight-smart-snippet/atomic-insight-smart-snippet.js +3 -3
- package/dist/esm/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.js +16 -2
- package/dist/esm/components/search/atomic-category-facet/atomic-category-facet.js +1 -1
- package/dist/esm/components/search/atomic-color-facet/atomic-color-facet.js +1 -1
- package/dist/esm/components/search/atomic-facet/atomic-facet.js +1 -1
- package/dist/esm/components/search/atomic-facet-manager/atomic-facet-manager.js +8 -4
- package/dist/esm/components/search/atomic-field-condition/atomic-field-condition.js +2 -5
- package/dist/esm/components/search/atomic-popover/atomic-popover.js +1 -2
- package/dist/esm/components/search/atomic-result-children-template/atomic-result-children-template.js +16 -2
- package/dist/esm/components/search/atomic-result-template/atomic-result-template.js +16 -2
- package/dist/esm/components/search/atomic-search-box/atomic-search-box.js +1 -1
- package/dist/esm/components/search/atomic-search-layout/atomic-search-layout.tw.css.js +1 -1
- package/dist/esm/decorators/bind-state.js +38 -8
- package/dist/esm/decorators/with-tailwind-styles.js +2 -1
- package/dist/esm/global/environment.js +1 -1
- package/dist/esm/utils/init-queue.js +6 -4
- package/dist/esm/utils/replace-breakpoint-utils.js +9 -4
- package/dist/esm/versions.js +1 -1
- package/dist/types/components/commerce/atomic-product-template/atomic-product-template.d.ts +12 -0
- package/dist/types/components/common/atomic-focus-trap/atomic-focus-trap.d.ts +1 -0
- package/dist/types/components/common/atomic-smart-snippet-source/atomic-smart-snippet-source.d.ts +4 -4
- package/dist/types/components/common/facets/facet-common.d.ts +2 -0
- package/dist/types/components/common/facets/facet-search/facet-search-aria-live.d.ts +7 -1
- package/dist/types/components/common/query-error/icon.d.ts +6 -0
- package/dist/types/components/common/query-error/icons.d.ts +5 -0
- package/dist/types/components/common/template-controller/template-utils.d.ts +7 -0
- package/dist/types/components/insight/atomic-insight-result-children-template/atomic-insight-result-children-template.d.ts +4 -4
- package/dist/types/components/insight/atomic-insight-result-template/atomic-insight-result-template.d.ts +12 -0
- package/dist/types/components/recommendations/atomic-recs-result-template/atomic-recs-result-template.d.ts +12 -0
- package/dist/types/components/search/atomic-facet-manager/atomic-facet-manager.d.ts +6 -1
- package/dist/types/components/search/atomic-result-children-template/atomic-result-children-template.d.ts +12 -0
- package/dist/types/components/search/atomic-result-template/atomic-result-template.d.ts +12 -0
- package/dist/types/utils/init-queue.d.ts +3 -2
- package/docs/adr/0001-group-shared-modules-in-one-cdn-chunk.md +147 -0
- package/package.json +17 -14
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
+
})();
|
|
27
|
+
(()=>{
|
|
28
|
+
__webpack_require__.r = (exports1)=>{
|
|
29
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
+
value: 'Module'
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
+
value: true
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
var __webpack_exports__ = {};
|
|
38
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
getQueryErrorIcon: ()=>getQueryErrorIcon
|
|
41
|
+
});
|
|
42
|
+
const cannot_access_cjs_namespaceObject = require("../../../images/cannot-access.cjs");
|
|
43
|
+
var cannot_access_cjs_default = /*#__PURE__*/ __webpack_require__.n(cannot_access_cjs_namespaceObject);
|
|
44
|
+
const indexing_cjs_namespaceObject = require("../../../images/indexing.cjs");
|
|
45
|
+
var indexing_cjs_default = /*#__PURE__*/ __webpack_require__.n(indexing_cjs_namespaceObject);
|
|
46
|
+
const search_inactive_cjs_namespaceObject = require("../../../images/search-inactive.cjs");
|
|
47
|
+
var search_inactive_cjs_default = /*#__PURE__*/ __webpack_require__.n(search_inactive_cjs_namespaceObject);
|
|
48
|
+
const something_wrong_cjs_namespaceObject = require("../../../images/something-wrong.cjs");
|
|
49
|
+
var something_wrong_cjs_default = /*#__PURE__*/ __webpack_require__.n(something_wrong_cjs_namespaceObject);
|
|
50
|
+
function getQueryErrorIcon(errorType) {
|
|
51
|
+
switch(errorType){
|
|
52
|
+
case 'NoEndpointsException':
|
|
53
|
+
return indexing_cjs_default();
|
|
54
|
+
case 'InvalidTokenException':
|
|
55
|
+
return cannot_access_cjs_default();
|
|
56
|
+
case 'OrganizationIsPausedException':
|
|
57
|
+
return search_inactive_cjs_default();
|
|
58
|
+
default:
|
|
59
|
+
return something_wrong_cjs_default();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.getQueryErrorIcon = __webpack_exports__.getQueryErrorIcon;
|
|
63
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
64
|
+
"getQueryErrorIcon"
|
|
65
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
66
|
+
Object.defineProperty(exports, '__esModule', {
|
|
67
|
+
value: true
|
|
68
|
+
});
|
|
@@ -29,6 +29,7 @@ var __webpack_exports__ = {};
|
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
makeDefinedConditions: ()=>makeDefinedConditions,
|
|
32
|
+
makeFieldConditions: ()=>makeFieldConditions,
|
|
32
33
|
makeMatchConditions: ()=>makeMatchConditions
|
|
33
34
|
});
|
|
34
35
|
const set_cjs_namespaceObject = require("../../../utils/set.cjs");
|
|
@@ -63,10 +64,18 @@ function makeDefinedConditions(ifDefined, ifNotDefined, helpers) {
|
|
|
63
64
|
}
|
|
64
65
|
return conditions;
|
|
65
66
|
}
|
|
67
|
+
function makeFieldConditions({ ifDefined, ifNotDefined, mustMatch, mustNotMatch }, helpers) {
|
|
68
|
+
return [
|
|
69
|
+
...makeDefinedConditions(ifDefined, ifNotDefined, helpers),
|
|
70
|
+
...makeMatchConditions(mustMatch, mustNotMatch, helpers)
|
|
71
|
+
];
|
|
72
|
+
}
|
|
66
73
|
exports.makeDefinedConditions = __webpack_exports__.makeDefinedConditions;
|
|
74
|
+
exports.makeFieldConditions = __webpack_exports__.makeFieldConditions;
|
|
67
75
|
exports.makeMatchConditions = __webpack_exports__.makeMatchConditions;
|
|
68
76
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
69
77
|
"makeDefinedConditions",
|
|
78
|
+
"makeFieldConditions",
|
|
70
79
|
"makeMatchConditions"
|
|
71
80
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
72
81
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -213,7 +213,7 @@ class AtomicInsightFacet extends external_lit_namespaceObject.LitElement {
|
|
|
213
213
|
}
|
|
214
214
|
initAriaLive() {
|
|
215
215
|
this.facetSearchAriaLiveController = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'facet-search');
|
|
216
|
-
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.label, (msg)=>{
|
|
216
|
+
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this, this.facet, this.label, (msg)=>{
|
|
217
217
|
this.facetSearchAriaLiveController.message = msg;
|
|
218
218
|
}, this.bindings.i18n);
|
|
219
219
|
}
|
|
@@ -51,11 +51,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
51
51
|
class AtomicInsightResultChildrenTemplate extends external_lit_namespaceObject.LitElement {
|
|
52
52
|
connectedCallback() {
|
|
53
53
|
super.connectedCallback();
|
|
54
|
-
this.
|
|
55
|
-
...this.conditions,
|
|
56
|
-
...(0, template_utils_cjs_namespaceObject.makeDefinedConditions)(this.ifDefined, this.ifNotDefined, insight_namespaceObject.ResultTemplatesHelpers)
|
|
57
|
-
];
|
|
58
|
-
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeMatchConditions)(this.mustMatch, this.mustNotMatch, insight_namespaceObject.ResultTemplatesHelpers);
|
|
54
|
+
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, insight_namespaceObject.ResultTemplatesHelpers);
|
|
59
55
|
}
|
|
60
56
|
render() {
|
|
61
57
|
return external_lit_namespaceObject.nothing;
|
|
@@ -52,7 +52,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
52
52
|
class AtomicInsightResultTemplate extends external_lit_namespaceObject.LitElement {
|
|
53
53
|
connectedCallback() {
|
|
54
54
|
super.connectedCallback();
|
|
55
|
-
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.
|
|
55
|
+
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, insight_namespaceObject.ResultTemplatesHelpers);
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
return external_lit_namespaceObject.nothing;
|
|
@@ -83,6 +83,20 @@ _ts_decorate([
|
|
|
83
83
|
}),
|
|
84
84
|
_ts_metadata("design:type", Array)
|
|
85
85
|
], AtomicInsightResultTemplate.prototype, "conditions", void 0);
|
|
86
|
+
_ts_decorate([
|
|
87
|
+
(0, decorators_js_namespaceObject.property)({
|
|
88
|
+
type: String,
|
|
89
|
+
attribute: 'if-defined'
|
|
90
|
+
}),
|
|
91
|
+
_ts_metadata("design:type", String)
|
|
92
|
+
], AtomicInsightResultTemplate.prototype, "ifDefined", void 0);
|
|
93
|
+
_ts_decorate([
|
|
94
|
+
(0, decorators_js_namespaceObject.property)({
|
|
95
|
+
type: String,
|
|
96
|
+
attribute: 'if-not-defined'
|
|
97
|
+
}),
|
|
98
|
+
_ts_metadata("design:type", String)
|
|
99
|
+
], AtomicInsightResultTemplate.prototype, "ifNotDefined", void 0);
|
|
86
100
|
_ts_decorate([
|
|
87
101
|
(0, props_utils_cjs_namespaceObject.mapProperty)({
|
|
88
102
|
splitValues: true,
|
package/dist/cjs/components/insight/atomic-insight-smart-snippet/atomic-insight-smart-snippet.cjs
CHANGED
|
@@ -94,10 +94,10 @@ class AtomicInsightSmartSnippet extends external_lit_namespaceObject.LitElement
|
|
|
94
94
|
if (!source) return external_lit_namespaceObject.nothing;
|
|
95
95
|
return (0, external_lit_namespaceObject.html)`<atomic-smart-snippet-source
|
|
96
96
|
.anchorAttributes=${(0, attributes_slot_cjs_namespaceObject.getAttributesFromLinkSlotContent)(this, 'source-anchor-attributes')}
|
|
97
|
-
.onBeginDelayedSelectSource=${this.smartSnippet.beginDelayedSelectSource}
|
|
98
|
-
.onCancelPendingSelectSource=${this.smartSnippet.cancelPendingSelectSource}
|
|
99
|
-
.onSelectSource=${this.smartSnippet.selectSource}
|
|
100
97
|
.source=${source}
|
|
98
|
+
@select-source=${()=>this.smartSnippet.selectSource()}
|
|
99
|
+
@begin-delayed-select-source=${()=>this.smartSnippet.beginDelayedSelectSource()}
|
|
100
|
+
@cancel-pending-select-source=${()=>this.smartSnippet.cancelPendingSelectSource()}
|
|
101
101
|
></atomic-smart-snippet-source>`;
|
|
102
102
|
}
|
|
103
103
|
renderFeedbackBanner() {
|
|
@@ -53,7 +53,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
53
53
|
class AtomicRecsResultTemplate extends external_lit_namespaceObject.LitElement {
|
|
54
54
|
connectedCallback() {
|
|
55
55
|
super.connectedCallback();
|
|
56
|
-
this.recsResultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.
|
|
56
|
+
this.recsResultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, recommendation_namespaceObject.ResultTemplatesHelpers);
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
59
|
return external_lit_namespaceObject.nothing;
|
|
@@ -83,6 +83,20 @@ _ts_decorate([
|
|
|
83
83
|
}),
|
|
84
84
|
_ts_metadata("design:type", Array)
|
|
85
85
|
], AtomicRecsResultTemplate.prototype, "conditions", void 0);
|
|
86
|
+
_ts_decorate([
|
|
87
|
+
(0, decorators_js_namespaceObject.property)({
|
|
88
|
+
type: String,
|
|
89
|
+
attribute: 'if-defined'
|
|
90
|
+
}),
|
|
91
|
+
_ts_metadata("design:type", String)
|
|
92
|
+
], AtomicRecsResultTemplate.prototype, "ifDefined", void 0);
|
|
93
|
+
_ts_decorate([
|
|
94
|
+
(0, decorators_js_namespaceObject.property)({
|
|
95
|
+
type: String,
|
|
96
|
+
attribute: 'if-not-defined'
|
|
97
|
+
}),
|
|
98
|
+
_ts_metadata("design:type", String)
|
|
99
|
+
], AtomicRecsResultTemplate.prototype, "ifNotDefined", void 0);
|
|
86
100
|
_ts_decorate([
|
|
87
101
|
(0, props_utils_cjs_namespaceObject.mapProperty)({
|
|
88
102
|
splitValues: true,
|
|
@@ -126,7 +126,7 @@ class AtomicCategoryFacet extends external_lit_namespaceObject.LitElement {
|
|
|
126
126
|
options
|
|
127
127
|
});
|
|
128
128
|
this.facetId = this.facet.state.facetId;
|
|
129
|
-
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.label, (msg)=>{
|
|
129
|
+
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this, this.facet, this.label, (msg)=>{
|
|
130
130
|
this.facetSearchAriaMessage.message = msg;
|
|
131
131
|
}, this.bindings.i18n);
|
|
132
132
|
this.bindings.store.registerFacet('categoryFacets', this.facetInfo);
|
|
@@ -327,7 +327,7 @@ class AtomicColorFacet extends external_lit_namespaceObject.LitElement {
|
|
|
327
327
|
}
|
|
328
328
|
initAriaLive() {
|
|
329
329
|
this.facetSearchAriaLive = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'facet-search');
|
|
330
|
-
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.label, (msg)=>{
|
|
330
|
+
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this, this.facet, this.label, (msg)=>{
|
|
331
331
|
this.facetSearchAriaLive.message = msg;
|
|
332
332
|
}, this.bindings.i18n);
|
|
333
333
|
}
|
|
@@ -310,7 +310,7 @@ class AtomicFacet extends external_lit_namespaceObject.LitElement {
|
|
|
310
310
|
}
|
|
311
311
|
initAriaLive() {
|
|
312
312
|
this.facetSearchAriaLive = new accessibility_utils_cjs_namespaceObject.AriaLiveRegionController(this, 'facet-search');
|
|
313
|
-
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this.facet, this.label, (msg)=>{
|
|
313
|
+
(0, facet_search_aria_live_cjs_namespaceObject.announceFacetSearchResultsWithAriaLive)(this, this.facet, this.label, (msg)=>{
|
|
314
314
|
this.facetSearchAriaLive.message = msg;
|
|
315
315
|
}, this.bindings.i18n);
|
|
316
316
|
}
|
|
@@ -77,9 +77,13 @@ class AtomicFacetManager extends (0, children_update_complete_mixin_cjs_namespac
|
|
|
77
77
|
const sortedFacets = this.sortFacetsUsingManager(facets, this.facetManager);
|
|
78
78
|
const { visibleFacets, invisibleFacets } = (0, facet_common_cjs_namespaceObject.sortFacetVisibility)(sortedFacets, this.bindings.store.getAllFacets());
|
|
79
79
|
const generator = (0, facet_common_cjs_namespaceObject.getAutomaticFacetGenerator)(this);
|
|
80
|
-
(0, facet_common_cjs_namespaceObject.
|
|
81
|
-
|
|
82
|
-
this.
|
|
80
|
+
const collapsibleFacets = visibleFacets.filter((facet)=>!(0, facet_common_cjs_namespaceObject.isFacetNestedInPopover)(facet));
|
|
81
|
+
(0, facet_common_cjs_namespaceObject.collapseFacetsAfter)(collapsibleFacets, this.collapseFacetsAfter);
|
|
82
|
+
generator?.updateCollapseFacetsDependingOnFacetsVisibility?.(this.collapseFacetsAfter, collapsibleFacets.length);
|
|
83
|
+
this.append(...[
|
|
84
|
+
...visibleFacets,
|
|
85
|
+
...invisibleFacets
|
|
86
|
+
].map((facet)=>(0, facet_common_cjs_namespaceObject.getFacetElementToReorder)(facet)), ...generator ? [
|
|
83
87
|
generator
|
|
84
88
|
] : []);
|
|
85
89
|
};
|
|
@@ -51,10 +51,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
51
51
|
class AtomicFieldCondition extends (0, light_dom_cjs_namespaceObject.LightDomMixin)(external_lit_namespaceObject.LitElement) {
|
|
52
52
|
initialize() {}
|
|
53
53
|
get conditions() {
|
|
54
|
-
return
|
|
55
|
-
...(0, template_utils_cjs_namespaceObject.makeDefinedConditions)(this.ifDefined, this.ifNotDefined, headless_namespaceObject.ResultTemplatesHelpers),
|
|
56
|
-
...(0, template_utils_cjs_namespaceObject.makeMatchConditions)(this.mustMatch, this.mustNotMatch, headless_namespaceObject.ResultTemplatesHelpers)
|
|
57
|
-
];
|
|
54
|
+
return (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, headless_namespaceObject.ResultTemplatesHelpers);
|
|
58
55
|
}
|
|
59
56
|
getResult() {
|
|
60
57
|
const item = this.resultController.item;
|
|
@@ -104,9 +104,8 @@ class AtomicPopover extends external_lit_namespaceObject.LitElement {
|
|
|
104
104
|
.active=${this.isOpen}
|
|
105
105
|
.shouldHideSelf=${false}
|
|
106
106
|
>
|
|
107
|
-
${this.renderPopover()}
|
|
107
|
+
${this.renderPopover()} ${(0, when_js_namespaceObject.when)(this.isOpen, ()=>this.renderBackdrop())}
|
|
108
108
|
</atomic-focus-trap>
|
|
109
|
-
${(0, when_js_namespaceObject.when)(this.isOpen, ()=>this.renderBackdrop())}
|
|
110
109
|
`;
|
|
111
110
|
}
|
|
112
111
|
updated() {
|
|
@@ -52,7 +52,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
52
52
|
class AtomicResultChildrenTemplate extends external_lit_namespaceObject.LitElement {
|
|
53
53
|
connectedCallback() {
|
|
54
54
|
super.connectedCallback();
|
|
55
|
-
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.
|
|
55
|
+
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, headless_namespaceObject.ResultTemplatesHelpers);
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
return external_lit_namespaceObject.nothing;
|
|
@@ -79,6 +79,20 @@ _ts_decorate([
|
|
|
79
79
|
}),
|
|
80
80
|
_ts_metadata("design:type", Array)
|
|
81
81
|
], AtomicResultChildrenTemplate.prototype, "conditions", void 0);
|
|
82
|
+
_ts_decorate([
|
|
83
|
+
(0, decorators_js_namespaceObject.property)({
|
|
84
|
+
type: String,
|
|
85
|
+
attribute: 'if-defined'
|
|
86
|
+
}),
|
|
87
|
+
_ts_metadata("design:type", String)
|
|
88
|
+
], AtomicResultChildrenTemplate.prototype, "ifDefined", void 0);
|
|
89
|
+
_ts_decorate([
|
|
90
|
+
(0, decorators_js_namespaceObject.property)({
|
|
91
|
+
type: String,
|
|
92
|
+
attribute: 'if-not-defined'
|
|
93
|
+
}),
|
|
94
|
+
_ts_metadata("design:type", String)
|
|
95
|
+
], AtomicResultChildrenTemplate.prototype, "ifNotDefined", void 0);
|
|
82
96
|
_ts_decorate([
|
|
83
97
|
(0, props_utils_cjs_namespaceObject.mapProperty)({
|
|
84
98
|
splitValues: true,
|
|
@@ -53,7 +53,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
53
53
|
class AtomicResultTemplate extends external_lit_namespaceObject.LitElement {
|
|
54
54
|
connectedCallback() {
|
|
55
55
|
super.connectedCallback();
|
|
56
|
-
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.
|
|
56
|
+
this.resultTemplateController.matchConditions = (0, template_utils_cjs_namespaceObject.makeFieldConditions)(this, headless_namespaceObject.ResultTemplatesHelpers);
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
59
|
return external_lit_namespaceObject.nothing;
|
|
@@ -84,6 +84,20 @@ _ts_decorate([
|
|
|
84
84
|
}),
|
|
85
85
|
_ts_metadata("design:type", Array)
|
|
86
86
|
], AtomicResultTemplate.prototype, "conditions", void 0);
|
|
87
|
+
_ts_decorate([
|
|
88
|
+
(0, decorators_js_namespaceObject.property)({
|
|
89
|
+
type: String,
|
|
90
|
+
attribute: 'if-defined'
|
|
91
|
+
}),
|
|
92
|
+
_ts_metadata("design:type", String)
|
|
93
|
+
], AtomicResultTemplate.prototype, "ifDefined", void 0);
|
|
94
|
+
_ts_decorate([
|
|
95
|
+
(0, decorators_js_namespaceObject.property)({
|
|
96
|
+
type: String,
|
|
97
|
+
attribute: 'if-not-defined'
|
|
98
|
+
}),
|
|
99
|
+
_ts_metadata("design:type", String)
|
|
100
|
+
], AtomicResultTemplate.prototype, "ifNotDefined", void 0);
|
|
87
101
|
_ts_decorate([
|
|
88
102
|
(0, props_utils_cjs_namespaceObject.mapProperty)({
|
|
89
103
|
splitValues: true,
|
|
@@ -117,12 +117,22 @@ const styles = (0, external_lit_namespaceObject.css)`
|
|
|
117
117
|
max-width: 100%;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
& > atomic-facet-manager {
|
|
121
|
+
display: contents;
|
|
122
|
+
|
|
123
|
+
& > * {
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
120
128
|
& > atomic-segmented-facet,
|
|
121
|
-
& > atomic-popover
|
|
129
|
+
& > atomic-popover,
|
|
130
|
+
& > atomic-facet-manager > atomic-popover {
|
|
122
131
|
margin-right: 0.5rem;
|
|
123
132
|
}
|
|
124
133
|
|
|
125
|
-
& > atomic-popover
|
|
134
|
+
& > atomic-popover,
|
|
135
|
+
& > atomic-facet-manager > atomic-popover {
|
|
126
136
|
display: none;
|
|
127
137
|
}
|
|
128
138
|
}
|
|
@@ -27,27 +27,57 @@ var __webpack_require__ = {};
|
|
|
27
27
|
})();
|
|
28
28
|
var __webpack_exports__ = {};
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
const subscriptionsByComponent = new WeakMap();
|
|
31
|
+
function getSubscriptions(component) {
|
|
32
|
+
let subscriptions = subscriptionsByComponent.get(component);
|
|
33
|
+
if (!subscriptions) {
|
|
34
|
+
const newSubscriptions = new Set();
|
|
35
|
+
subscriptionsByComponent.set(component, newSubscriptions);
|
|
36
|
+
component.addController({
|
|
37
|
+
hostConnected () {
|
|
38
|
+
newSubscriptions.forEach((subscription)=>{
|
|
39
|
+
subscription.unsubscribe ??= subscription.subscribe();
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
hostDisconnected () {
|
|
43
|
+
if (component.isConnected) return;
|
|
44
|
+
newSubscriptions.forEach((subscription)=>{
|
|
45
|
+
subscription.unsubscribe?.();
|
|
46
|
+
subscription.unsubscribe = void 0;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
subscriptions = newSubscriptions;
|
|
51
|
+
}
|
|
52
|
+
return subscriptions;
|
|
53
|
+
}
|
|
54
|
+
function releaseSubscriptions(component) {
|
|
55
|
+
const subscriptions = subscriptionsByComponent.get(component);
|
|
56
|
+
subscriptions?.forEach((subscription)=>subscription.unsubscribe?.());
|
|
57
|
+
subscriptions?.clear();
|
|
58
|
+
}
|
|
30
59
|
function bindStateToController(controllerProperty, options) {
|
|
31
60
|
return (proto, stateProperty)=>{
|
|
32
61
|
const ctor = proto.constructor;
|
|
33
62
|
ctor.addInitializer((instance)=>{
|
|
34
63
|
const component = instance;
|
|
35
|
-
const {
|
|
64
|
+
const { initialize } = component;
|
|
36
65
|
component.initialize = function() {
|
|
66
|
+
releaseSubscriptions(component);
|
|
37
67
|
initialize?.call(this);
|
|
38
68
|
if (!initialize) return console.error(`ControllerState: The "initialize" method has to be defined and instantiate a controller for the property ${controllerProperty.toString()}`, component);
|
|
39
69
|
if (!component[controllerProperty]) return console.error(`${controllerProperty.toString()} property is not defined on component`, component);
|
|
40
70
|
if (options?.onUpdateCallbackMethod && !component[options.onUpdateCallbackMethod]) return console.error(`ControllerState: The onUpdateCallbackMethod property "${options.onUpdateCallbackMethod}" is not defined`, component);
|
|
41
71
|
const controller = component[controllerProperty];
|
|
42
72
|
const updateCallback = options?.onUpdateCallbackMethod ? component[options.onUpdateCallbackMethod] : void 0;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
component.isConnected || unsubscribeController?.();
|
|
49
|
-
disconnectedCallback?.call(component);
|
|
73
|
+
const subscription = {
|
|
74
|
+
subscribe: ()=>controller.subscribe(()=>{
|
|
75
|
+
component[stateProperty] = controller.state;
|
|
76
|
+
'function' == typeof updateCallback && updateCallback();
|
|
77
|
+
})
|
|
50
78
|
};
|
|
79
|
+
if (component.isConnected) subscription.unsubscribe = subscription.subscribe();
|
|
80
|
+
getSubscriptions(component).add(subscription);
|
|
51
81
|
};
|
|
52
82
|
});
|
|
53
83
|
};
|
|
@@ -42,6 +42,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
42
42
|
const external_lit_namespaceObject = require("lit");
|
|
43
43
|
const tailwind_global_tw_css_namespaceObject = require("../utils/tailwind.global.tw.css");
|
|
44
44
|
var tailwind_global_tw_css_default = /*#__PURE__*/ __webpack_require__.n(tailwind_global_tw_css_namespaceObject);
|
|
45
|
+
const tailwindStyles = (0, external_lit_namespaceObject.unsafeCSS)(tailwind_global_tw_css_default());
|
|
45
46
|
const tailwindPropertiesSheet = "u" > typeof window ? (()=>{
|
|
46
47
|
const propCss = tailwind_global_tw_css_default();
|
|
47
48
|
const fullCss = Array.isArray(propCss) ? propCss.join('') : propCss;
|
|
@@ -68,7 +69,7 @@ const withTailwindStyles = (Base)=>class extends Base {
|
|
|
68
69
|
}
|
|
69
70
|
static get styles() {
|
|
70
71
|
const baseStyles = [
|
|
71
|
-
|
|
72
|
+
tailwindStyles
|
|
72
73
|
];
|
|
73
74
|
const customStyles = Base.styles;
|
|
74
75
|
if (Array.isArray(customStyles)) return [
|
|
@@ -31,11 +31,13 @@ function getWindow() {
|
|
|
31
31
|
return window;
|
|
32
32
|
}
|
|
33
33
|
function getInitQueueNamespace() {
|
|
34
|
-
|
|
35
|
-
eventQueueMap: new
|
|
36
|
-
parentReadyMap: new
|
|
34
|
+
const namespace = getWindow().initQueueNamespace ??= {
|
|
35
|
+
eventQueueMap: new WeakMap(),
|
|
36
|
+
parentReadyMap: new WeakMap()
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
if (namespace.eventQueueMap instanceof Map) namespace.eventQueueMap = new WeakMap(namespace.eventQueueMap);
|
|
39
|
+
if (namespace.parentReadyMap instanceof Map) namespace.parentReadyMap = new WeakMap(namespace.parentReadyMap);
|
|
40
|
+
return namespace;
|
|
39
41
|
}
|
|
40
42
|
function getEventQueueMap() {
|
|
41
43
|
return getInitQueueNamespace().eventQueueMap;
|
|
@@ -38,11 +38,16 @@ function replaceMediaQuery(style, mobileBreakpoint) {
|
|
|
38
38
|
return style.replace(regex, `(width >= ${mobileBreakpoint})`);
|
|
39
39
|
}
|
|
40
40
|
function replaceStyleSheet(element, mobileBreakpoint) {
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const shadowRoot = element.shadowRoot;
|
|
42
|
+
const [stylesheet, ...otherStylesheets] = shadowRoot?.adoptedStyleSheets ?? [];
|
|
43
|
+
if (!shadowRoot || !stylesheet) return;
|
|
44
44
|
const style = Object.values(stylesheet.cssRules).map((rule)=>rule.cssText).join('');
|
|
45
|
-
|
|
45
|
+
const replacedStylesheet = new CSSStyleSheet();
|
|
46
|
+
replacedStylesheet.replaceSync(replaceMediaQuery(style, mobileBreakpoint));
|
|
47
|
+
shadowRoot.adoptedStyleSheets = [
|
|
48
|
+
replacedStylesheet,
|
|
49
|
+
...otherStylesheets
|
|
50
|
+
];
|
|
46
51
|
}
|
|
47
52
|
function replateStyleContent(element, breakpoint) {
|
|
48
53
|
const styleTag = element.shadowRoot?.querySelector('style');
|
package/dist/cjs/versions.cjs
CHANGED
|
@@ -32,7 +32,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
32
32
|
headlessVersion: ()=>package_json_namespaceObject.version
|
|
33
33
|
});
|
|
34
34
|
const package_json_namespaceObject = require("@coveo/headless/package.json");
|
|
35
|
-
const atomicVersion = "3.
|
|
35
|
+
const atomicVersion = "3.64.1";
|
|
36
36
|
exports.atomicVersion = __webpack_exports__.atomicVersion;
|
|
37
37
|
exports.headlessVersion = __webpack_exports__.headlessVersion;
|
|
38
38
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -42,7 +42,7 @@ function _ts_metadata(metadataKey, metadataValue) {
|
|
|
42
42
|
class AtomicCommerceCategoryFacet extends LitElement {
|
|
43
43
|
initialize() {
|
|
44
44
|
this.validateFacet();
|
|
45
|
-
this.facet && announceFacetSearchResultsWithAriaLive(this.facet, this.displayName, (msg)=>{
|
|
45
|
+
this.facet && announceFacetSearchResultsWithAriaLive(this, this.facet, this.displayName, (msg)=>{
|
|
46
46
|
this.facetSearchAriaMessage.message = msg;
|
|
47
47
|
}, this.bindings.i18n);
|
|
48
48
|
}
|
|
@@ -196,7 +196,7 @@ class AtomicCommerceFacet extends LitElement {
|
|
|
196
196
|
if (!this.headerFocus) this.headerFocus = new FocusTargetController(this, this.bindings);
|
|
197
197
|
}
|
|
198
198
|
initAriaLive() {
|
|
199
|
-
announceFacetSearchResultsWithAriaLive(this.facet, this.displayName, (msg)=>{
|
|
199
|
+
announceFacetSearchResultsWithAriaLive(this, this.facet, this.displayName, (msg)=>{
|
|
200
200
|
this.ariaLiveRegion.message = msg;
|
|
201
201
|
}, this.bindings.i18n);
|
|
202
202
|
}
|