@coveo/atomic 3.31.0-pre.f83bd005a5 → 3.31.0
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/atomic/_atomic.esm.js +1 -1
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/analytics-config.js.map +1 -1
- package/dist/atomic/components/atomic-folded-result-list.js +1 -1
- package/dist/atomic/components/atomic-folded-result-list.js.map +1 -1
- package/dist/atomic/components/atomic-insight-folded-result-list.js +2 -2
- package/dist/atomic/components/atomic-insight-folded-result-list.js.map +1 -1
- package/dist/atomic/components/atomic-insight-result-children.js +2 -2
- package/dist/atomic/components/atomic-insight-result-children.js.map +1 -1
- package/dist/atomic/components/atomic-ipx-result-link.js +1 -1
- package/dist/atomic/components/atomic-ipx-result-link.js.map +1 -1
- package/dist/atomic/components/atomic-result-children.js +2 -2
- package/dist/atomic/components/atomic-result-children.js.map +1 -1
- package/dist/atomic/components/atomic-result-link.js +1 -1
- package/dist/atomic/components/atomic-result-link.js.map +1 -1
- package/dist/atomic/components/atomic-result-list.js.map +1 -1
- package/dist/atomic/components/atomic-tab-manager.js +1 -1
- package/dist/atomic/components/atomic-tab-manager.js.map +1 -1
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/props-utils.js +3 -0
- package/dist/atomic/components/props-utils.js.map +1 -1
- package/dist/atomic/components/stencil-item-decorators.js.map +1 -1
- package/dist/atomic/components/stencil-item-list-common.js.map +1 -1
- package/dist/atomic/components/{item.js → unfolded-item.js} +1 -1
- package/dist/atomic/components/unfolded-item.js.map +1 -0
- package/dist/atomic/components/utils/props-utils.js +3 -0
- package/dist/atomic/{p-b8beb062.entry.js → p-0007beed.entry.js} +2 -2
- package/dist/atomic/{p-9c091b29.entry.js → p-0077ba58.entry.js} +2 -2
- package/dist/atomic/p-0077ba58.entry.js.map +1 -0
- package/dist/atomic/{p-07d19b22.entry.js → p-01e9f7b0.entry.js} +2 -2
- package/dist/atomic/p-01e9f7b0.entry.js.map +1 -0
- package/dist/atomic/{p-446b788b.entry.js → p-0674783d.entry.js} +2 -2
- package/dist/atomic/p-0674783d.entry.js.map +1 -0
- package/dist/atomic/{p-1234c69e.js → p-0f046687.js} +1 -1
- package/dist/atomic/p-0f046687.js.map +1 -0
- package/dist/atomic/{p-a24a8702.entry.js → p-0f3df0e6.entry.js} +2 -2
- package/dist/atomic/{p-85749286.entry.js → p-11dd759c.entry.js} +2 -2
- package/dist/atomic/{p-d1d012bc.entry.js → p-16914fd4.entry.js} +2 -2
- package/dist/atomic/{p-10f25780.entry.js → p-1b491649.entry.js} +2 -2
- package/dist/atomic/p-1b491649.entry.js.map +1 -0
- package/dist/atomic/{p-7b6843d6.entry.js → p-2e00152f.entry.js} +2 -2
- package/dist/atomic/{p-7969276e.entry.js → p-2e028d26.entry.js} +2 -2
- package/dist/atomic/{p-bdfd2e76.entry.js → p-391c26ba.entry.js} +2 -2
- package/dist/atomic/p-391c26ba.entry.js.map +1 -0
- package/dist/atomic/p-3dc06261.js.map +1 -1
- package/dist/atomic/{p-28cea2b1.entry.js → p-494c57a0.entry.js} +2 -2
- package/dist/atomic/{p-64dc1a62.entry.js → p-4e77fe24.entry.js} +2 -2
- package/dist/atomic/p-61f9c3f7.js.map +1 -1
- package/dist/atomic/{p-9d3858df.entry.js → p-66eeb9f8.entry.js} +2 -2
- package/dist/atomic/p-66eeb9f8.entry.js.map +1 -0
- package/dist/atomic/{p-e53f3fe2.entry.js → p-6cf521a3.entry.js} +2 -2
- package/dist/atomic/{p-55b7c67f.entry.js → p-76489bf6.entry.js} +2 -2
- package/dist/atomic/{p-be04b3b0.entry.js → p-7d2a47f5.entry.js} +2 -2
- package/dist/atomic/{p-d2db2d70.js → p-86428057.js} +1 -1
- package/dist/atomic/p-86428057.js.map +1 -0
- package/dist/atomic/{p-741cfe8d.entry.js → p-89fbc54c.entry.js} +2 -2
- package/dist/atomic/{p-e14019fd.entry.js → p-8bb323e8.entry.js} +2 -2
- package/dist/atomic/{p-8edfd289.entry.js → p-a0b3c6e2.entry.js} +2 -2
- package/dist/atomic/{p-800ffc7e.js → p-be5e8359.js} +2 -2
- package/dist/atomic/{p-800ffc7e.js.map → p-be5e8359.js.map} +1 -1
- package/dist/atomic/{p-f7ae7657.entry.js → p-c874a70b.entry.js} +2 -2
- package/dist/atomic/{p-174f6410.entry.js → p-c9fc93d7.entry.js} +2 -2
- package/dist/atomic/{p-84740eed.entry.js → p-cbaf262a.entry.js} +2 -2
- package/dist/atomic/{p-0ec46480.entry.js → p-d8953e30.entry.js} +2 -2
- package/dist/atomic/{p-5a1b0c43.entry.js → p-da185993.entry.js} +2 -2
- package/dist/atomic/{p-c2a06774.entry.js → p-e0169a14.entry.js} +2 -2
- package/dist/atomic/{p-609d801e.entry.js → p-e215ba76.entry.js} +2 -2
- package/dist/atomic/{p-842bd0bc.entry.js → p-e2560da8.entry.js} +2 -2
- package/dist/atomic/p-e2560da8.entry.js.map +1 -0
- package/dist/atomic/{p-a4f1e397.entry.js → p-ebb8ae5b.entry.js} +2 -2
- package/dist/atomic/{p-c4b07e90.entry.js → p-efe9ef19.entry.js} +2 -2
- package/dist/atomic/p-efe9ef19.entry.js.map +1 -0
- package/dist/atomic/{p-538fa6a8.entry.js → p-fae68fde.entry.js} +2 -2
- package/dist/atomic/{p-c8f4a164.entry.js → p-fc73190d.entry.js} +2 -2
- package/dist/cjs/{analytics-config-90c18094.js → analytics-config-d10e762b.js} +2 -2
- package/dist/cjs/analytics-config-d10e762b.js.map +1 -0
- package/dist/cjs/atomic-category-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-color-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-field-condition.cjs.entry.js +1 -1
- package/dist/cjs/atomic-folded-result-list.cjs.entry.js +3 -3
- package/dist/cjs/atomic-folded-result-list.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-generated-answer.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-folded-result-list.cjs.entry.js +3 -3
- package/dist/cjs/atomic-insight-folded-result-list.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-numeric-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-children-template.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-children.cjs.entry.js +3 -3
- package/dist/cjs/atomic-insight-result-children.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-result-template.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-timeframe-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-result-link.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-numeric-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-product-field-condition.cjs.entry.js +1 -1
- package/dist/cjs/atomic-rating-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-rating-range-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-recs-result-template.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-children-template.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-children.cjs.entry.js +3 -3
- package/dist/cjs/atomic-result-children.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-link.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-list.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-result-localized-text.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-template.cjs.entry.js +1 -1
- package/dist/cjs/atomic-search-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-segmented-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-smart-snippet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-manager.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-timeframe-facet.cjs.entry.js +1 -1
- package/dist/cjs/{props-utils-dd638419.js → props-utils-1e4ba1b0.js} +4 -1
- package/dist/cjs/props-utils-1e4ba1b0.js.map +1 -0
- package/dist/cjs/stencil-item-decorators-43a96f33.js.map +1 -1
- package/dist/cjs/stencil-item-list-common-013ad9a0.js.map +1 -1
- package/dist/cjs/{item-c460c5a3.js → unfolded-item-148d21d6.js} +1 -1
- package/dist/cjs/unfolded-item-148d21d6.js.map +1 -0
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/{analytics-config-e5bd4e1b.js → analytics-config-e2c4641d.js} +2 -2
- package/dist/esm/analytics-config-e2c4641d.js.map +1 -0
- package/dist/esm/atomic-category-facet.entry.js +1 -1
- package/dist/esm/atomic-color-facet.entry.js +1 -1
- package/dist/esm/atomic-facet.entry.js +1 -1
- package/dist/esm/atomic-field-condition.entry.js +1 -1
- package/dist/esm/atomic-folded-result-list.entry.js +2 -2
- package/dist/esm/atomic-folded-result-list.entry.js.map +1 -1
- package/dist/esm/atomic-generated-answer.entry.js +1 -1
- package/dist/esm/atomic-insight-folded-result-list.entry.js +2 -2
- package/dist/esm/atomic-insight-folded-result-list.entry.js.map +1 -1
- package/dist/esm/atomic-insight-interface.entry.js +2 -2
- package/dist/esm/atomic-insight-numeric-facet.entry.js +1 -1
- package/dist/esm/atomic-insight-result-children-template.entry.js +1 -1
- package/dist/esm/atomic-insight-result-children.entry.js +2 -2
- package/dist/esm/atomic-insight-result-children.entry.js.map +1 -1
- package/dist/esm/atomic-insight-result-template.entry.js +1 -1
- package/dist/esm/atomic-insight-timeframe-facet.entry.js +1 -1
- package/dist/esm/atomic-ipx-result-link.entry.js +1 -1
- package/dist/esm/atomic-ipx-result-link.entry.js.map +1 -1
- package/dist/esm/atomic-numeric-facet.entry.js +1 -1
- package/dist/esm/atomic-product-field-condition.entry.js +1 -1
- package/dist/esm/atomic-rating-facet.entry.js +1 -1
- package/dist/esm/atomic-rating-range-facet.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +2 -2
- package/dist/esm/atomic-recs-result-template.entry.js +1 -1
- package/dist/esm/atomic-result-children-template.entry.js +1 -1
- package/dist/esm/atomic-result-children.entry.js +2 -2
- package/dist/esm/atomic-result-children.entry.js.map +1 -1
- package/dist/esm/atomic-result-link.entry.js +1 -1
- package/dist/esm/atomic-result-link.entry.js.map +1 -1
- package/dist/esm/atomic-result-list.entry.js +1 -1
- package/dist/esm/atomic-result-list.entry.js.map +1 -1
- package/dist/esm/atomic-result-localized-text.entry.js +1 -1
- package/dist/esm/atomic-result-template.entry.js +1 -1
- package/dist/esm/atomic-search-interface.entry.js +2 -2
- package/dist/esm/atomic-segmented-facet.entry.js +1 -1
- package/dist/esm/atomic-smart-snippet.entry.js +1 -1
- package/dist/esm/atomic-sort-expression.entry.js +1 -1
- package/dist/esm/atomic-tab-manager.entry.js +1 -1
- package/dist/esm/atomic-tab-manager.entry.js.map +1 -1
- package/dist/esm/atomic-timeframe-facet.entry.js +1 -1
- package/dist/esm/{props-utils-8e3d7f26.js → props-utils-e17fa18c.js} +4 -1
- package/dist/esm/props-utils-e17fa18c.js.map +1 -0
- package/dist/esm/stencil-item-decorators-6c453c11.js.map +1 -1
- package/dist/esm/stencil-item-list-common-ddc6fb51.js.map +1 -1
- package/dist/esm/{item-813944d1.js → unfolded-item-c5795c0f.js} +1 -1
- package/dist/esm/unfolded-item-c5795c0f.js.map +1 -0
- package/dist/esm/version.js +2 -2
- package/dist/types/components/common/item-list/item-list-common.d.ts +1 -1
- package/dist/types/components/common/item-list/stencil-display-table.d.ts +1 -1
- package/dist/types/components/common/item-list/stencil-item-list-common.d.ts +1 -1
- package/dist/types/components/common/item-list/table-layout.d.ts +1 -1
- package/dist/types/components/search/tabs/atomic-tab-manager/atomic-tab-manager.d.ts +6 -0
- package/dist/types/utils/props-utils.d.ts +3 -0
- package/docs/atomic-docs.json +49 -1
- package/package.json +5 -5
- package/dist/atomic/components/item.js.map +0 -1
- package/dist/atomic/p-07d19b22.entry.js.map +0 -1
- package/dist/atomic/p-10f25780.entry.js.map +0 -1
- package/dist/atomic/p-1234c69e.js.map +0 -1
- package/dist/atomic/p-446b788b.entry.js.map +0 -1
- package/dist/atomic/p-842bd0bc.entry.js.map +0 -1
- package/dist/atomic/p-9c091b29.entry.js.map +0 -1
- package/dist/atomic/p-9d3858df.entry.js.map +0 -1
- package/dist/atomic/p-bdfd2e76.entry.js.map +0 -1
- package/dist/atomic/p-c4b07e90.entry.js.map +0 -1
- package/dist/atomic/p-d2db2d70.js.map +0 -1
- package/dist/cjs/analytics-config-90c18094.js.map +0 -1
- package/dist/cjs/item-c460c5a3.js.map +0 -1
- package/dist/cjs/props-utils-dd638419.js.map +0 -1
- package/dist/esm/analytics-config-e5bd4e1b.js.map +0 -1
- package/dist/esm/item-813944d1.js.map +0 -1
- package/dist/esm/props-utils-8e3d7f26.js.map +0 -1
- /package/dist/atomic/components/components/common/{interface/item.js → item-list/unfolded-item.js} +0 -0
- /package/dist/atomic/{p-b8beb062.entry.js.map → p-0007beed.entry.js.map} +0 -0
- /package/dist/atomic/{p-a24a8702.entry.js.map → p-0f3df0e6.entry.js.map} +0 -0
- /package/dist/atomic/{p-85749286.entry.js.map → p-11dd759c.entry.js.map} +0 -0
- /package/dist/atomic/{p-d1d012bc.entry.js.map → p-16914fd4.entry.js.map} +0 -0
- /package/dist/atomic/{p-7b6843d6.entry.js.map → p-2e00152f.entry.js.map} +0 -0
- /package/dist/atomic/{p-7969276e.entry.js.map → p-2e028d26.entry.js.map} +0 -0
- /package/dist/atomic/{p-28cea2b1.entry.js.map → p-494c57a0.entry.js.map} +0 -0
- /package/dist/atomic/{p-64dc1a62.entry.js.map → p-4e77fe24.entry.js.map} +0 -0
- /package/dist/atomic/{p-e53f3fe2.entry.js.map → p-6cf521a3.entry.js.map} +0 -0
- /package/dist/atomic/{p-55b7c67f.entry.js.map → p-76489bf6.entry.js.map} +0 -0
- /package/dist/atomic/{p-be04b3b0.entry.js.map → p-7d2a47f5.entry.js.map} +0 -0
- /package/dist/atomic/{p-741cfe8d.entry.js.map → p-89fbc54c.entry.js.map} +0 -0
- /package/dist/atomic/{p-e14019fd.entry.js.map → p-8bb323e8.entry.js.map} +0 -0
- /package/dist/atomic/{p-8edfd289.entry.js.map → p-a0b3c6e2.entry.js.map} +0 -0
- /package/dist/atomic/{p-f7ae7657.entry.js.map → p-c874a70b.entry.js.map} +0 -0
- /package/dist/atomic/{p-174f6410.entry.js.map → p-c9fc93d7.entry.js.map} +0 -0
- /package/dist/atomic/{p-84740eed.entry.js.map → p-cbaf262a.entry.js.map} +0 -0
- /package/dist/atomic/{p-0ec46480.entry.js.map → p-d8953e30.entry.js.map} +0 -0
- /package/dist/atomic/{p-5a1b0c43.entry.js.map → p-da185993.entry.js.map} +0 -0
- /package/dist/atomic/{p-c2a06774.entry.js.map → p-e0169a14.entry.js.map} +0 -0
- /package/dist/atomic/{p-609d801e.entry.js.map → p-e215ba76.entry.js.map} +0 -0
- /package/dist/atomic/{p-a4f1e397.entry.js.map → p-ebb8ae5b.entry.js.map} +0 -0
- /package/dist/atomic/{p-538fa6a8.entry.js.map → p-fae68fde.entry.js.map} +0 -0
- /package/dist/atomic/{p-c8f4a164.entry.js.map → p-fc73190d.entry.js.map} +0 -0
- /package/dist/types/components/common/{interface/item.d.ts → item-list/unfolded-item.d.ts} +0 -0
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
7
|
const fieldUtils = require('./field-utils-a715deca.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const valueAsTreeContainer = require('./value-as-tree-container-d9952f1f.js');
|
|
12
12
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
7
|
const fieldUtils = require('./field-utils-a715deca.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
12
12
|
const stencilFacetHeader = require('./stencil-facet-header-60732c1b.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
7
|
const fieldUtils = require('./field-utils-a715deca.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
12
12
|
const stencilFacetHeader = require('./stencil-facet-header-60732c1b.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
|
-
const propsUtils = require('./props-utils-
|
|
7
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
8
8
|
const resultTemplateCommon = require('./result-template-common-88359dad.js');
|
|
9
9
|
const resultTemplateDecorators = require('./result-template-decorators-432d11a9.js');
|
|
10
10
|
require('@coveo/bueno');
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
7
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
8
|
-
const propsUtils = require('./props-utils-
|
|
8
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
9
9
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
10
10
|
const tabUtils = require('./tab-utils-d202a0aa.js');
|
|
11
11
|
const utils = require('./utils-7153ae6b.js');
|
|
12
12
|
const stencilPlaceholders = require('./stencil-placeholders-b8c896fa.js');
|
|
13
|
-
const
|
|
13
|
+
const unfoldedItem = require('./unfolded-item-148d21d6.js');
|
|
14
14
|
const store = require('./store-82abd941.js');
|
|
15
15
|
const stencilDisplayWrapper = require('./stencil-display-wrapper-498de571.js');
|
|
16
16
|
const itemListGuard = require('./item-list-guard-506b695a.js');
|
|
@@ -197,7 +197,7 @@ const AtomicFoldedResultList = class {
|
|
|
197
197
|
this.foldedResultListState.isLoading, displayPlaceholders);
|
|
198
198
|
}
|
|
199
199
|
getPropsForAtomicResult(collection) {
|
|
200
|
-
const result =
|
|
200
|
+
const result = unfoldedItem.extractUnfoldedItem(collection);
|
|
201
201
|
return {
|
|
202
202
|
interactiveResult: headless.buildInteractiveResult(this.bindings.engine, {
|
|
203
203
|
options: { result },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"atomic-folded-result-list.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,yBAAyB,GAAG,k9wEAAk9wE,CAAC;AACr/wE,qCAAe,yBAAyB;;;;;;;;;;;;MCgE3B,sBAAsB;;;QAKzB,gBAAW,GAAGA,cAAQ,CAAC,oBAAoB,CAAC,CAAC;QAI7C,YAAO,GAAsB,MAAM,CAAC;QAc3B,6BAAwB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B,CAAC;YACF,MAAM,EAAE,UAAU;YAClB,iBAAiB,EAAE,IAAI,CAAC,uBAAuB;YAC/C,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAClC,MAAM,CAAC,QAAQ,EACf,IAAI,CAAC,qBAAqB,CAAC,gBAAgB,EAC3C,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,CACf;YACD,OAAO,EAAE,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,MAAM,CAAC;YAC7D,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;KACH;;;;;;AAtR4B;IAA5BC,sCAAkB,EAAE;wDAA4B;AAc1C;IAFNC,yCAAqB,CAAC,kBAAkB,CAAC;qEAEW;AAG9C;IAFNA,yCAAqB,CAAC,gBAAgB,CAAC;mEAES;AAI1C;IAFNA,yCAAqB,CAAC,YAAY,CAAC;+DAEK;AAyBlC;IAFNC,oBAAS,EAAE;4DAEkC;AAavC;IAFNA,oBAAS,EAAE;4DAEkC;;;;;","names":["randomID","FocusTargetController","buildResultsPerPage","ItemTemplateProvider","ItemListCommon","buildTabManager","createAppLoadedListener","buildFoldedResultList","shouldDisplayOnCurrentTab","h","Hidden","ItemListGuard","DisplayWrapper","ResultsPlaceholdersGuard","ItemDisplayGuard","getItemListDisplayClasses","extractUnfoldedItem","buildInteractiveResult","InitializeBindings","BindStateToController","ArrayProp"],"sources":["src/components/search/result-lists/atomic-folded-result-list/atomic-folded-result-list.pcss?tag=atomic-folded-result-list&encapsulation=shadow","src/components/search/result-lists/atomic-folded-result-list/atomic-folded-result-list.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n@import '../../../common/item-list/styles/placeholders.pcss';\n@import '../../../common/item-list/styles/list-display.pcss';\natomic-result:not(.hydrated) {\n visibility: hidden;\n}\n","import {FoldedItemListStateContextEvent} from '@/src/components/common/item-list/item-list-decorators';\nimport {\n ResultsPerPageState,\n ResultsPerPage,\n buildFoldedResultList,\n FoldedResultList,\n FoldedResultListState,\n buildResultsPerPage,\n ResultListProps,\n FoldedCollection,\n buildInteractiveResult,\n TabManager,\n TabManagerState,\n buildTabManager,\n} from '@coveo/headless';\nimport {\n Component,\n Element,\n State,\n Prop,\n Listen,\n Method,\n h,\n Watch,\n} from '@stencil/core';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {ArrayProp} from '../../../../utils/props-utils';\nimport {FocusTargetController} from '../../../../utils/stencil-accessibility-utils';\nimport {shouldDisplayOnCurrentTab} from '../../../../utils/tab-utils';\nimport {randomID} from '../../../../utils/utils';\nimport {ResultsPlaceholdersGuard} from '../../../common/atomic-result-placeholder/stencil-placeholders';\nimport {extractUnfoldedItem} from '../../../common/interface/item';\nimport {createAppLoadedListener} from '../../../common/interface/store';\nimport {ItemDisplayGuard} from '../../../common/item-list/item-display-guard';\nimport {ItemListGuard} from '../../../common/item-list/item-list-guard';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {DisplayWrapper} from '../../../common/item-list/stencil-display-wrapper';\nimport {\n ItemListCommon,\n ItemRenderingFunction,\n} from '../../../common/item-list/stencil-item-list-common';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n ItemDisplayLayout,\n getItemListDisplayClasses,\n} from '../../../common/layout/display-options';\nimport {Hidden} from '../../../common/stencil-hidden';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-folded-result-list` component is responsible for displaying folded query results, by applying one or more result templates for up to three layers (i.e., to the result, child and grandchild).\n * @slot default - The default slot where the result templates are inserted.\n * @part result-list - The element containing every result of a result list\n * @part outline - The element displaying an outline or a divider around a result\n */\n@Component({\n tag: 'atomic-folded-result-list',\n styleUrl: 'atomic-folded-result-list.pcss',\n shadow: true,\n})\nexport class AtomicFoldedResultList implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n public foldedResultList!: FoldedResultList;\n public resultsPerPage!: ResultsPerPage;\n private resultRenderingFunction: ItemRenderingFunction;\n private loadingFlag = randomID('firstResultLoaded-');\n private itemTemplateProvider!: ItemTemplateProvider;\n private nextNewResultTarget?: FocusTargetController;\n private itemListCommon!: ItemListCommon;\n private display: ItemDisplayLayout = 'list';\n\n @Element() public host!: HTMLDivElement;\n\n @BindStateToController('foldedResultList')\n @State()\n public foldedResultListState!: FoldedResultListState;\n @BindStateToController('resultsPerPage')\n @State()\n public resultsPerPageState!: ResultsPerPageState;\n public tabManager!: TabManager;\n @BindStateToController('tabManager')\n @State()\n public tabManagerState!: TabManagerState;\n @State() private resultTemplateRegistered = false;\n @State() public error!: Error;\n @State() private templateHasError = false;\n @State() private isAppLoaded = false;\n\n /**\n * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.\n */\n @Prop({reflect: true}) density: ItemDisplayDensity = 'normal';\n /**\n * The expected size of the image displayed in the results.\n */\n @Prop({reflect: true}) imageSize: ItemDisplayImageSize = 'icon';\n /**\n * The tabs on which the folded result list can be displayed. This property should not be used at the same time as `tabs-excluded`.\n *\n * Set this property as a stringified JSON array, e.g.,\n * ```html\n * <atomic-folded-result-list tabs-included='[\"tabIDA\", \"tabIDB\"]'></atomic-folded-result-list snippet>\n * ```\n * If you don't set this property, the folded result list can be displayed on any tab. Otherwise, the folded result list can only be displayed on the specified tabs.\n */\n @ArrayProp()\n @Prop({reflect: true, mutable: true})\n public tabsIncluded: string[] | string = '[]';\n\n /**\n * The tabs on which this folded result list must not be displayed. This property should not be used at the same time as `tabs-included`.\n *\n * Set this property as a stringified JSON array, e.g.,\n * ```html\n * <atomic-folded-result-list tabs-excluded='[\"tabIDA\", \"tabIDB\"]'></atomic-folded-result-list>\n * ```\n * If you don't set this property, the folded result list can be displayed on any tab. Otherwise, the folded result list won't be displayed on any of the specified tabs.\n */\n @ArrayProp()\n @Prop({reflect: true, mutable: true})\n public tabsExcluded: string[] | string = '[]';\n /**\n * The name of the field on which to do the folding. The folded result list component will use the values of this field to resolve the collections of result items.\n *\n * @defaultValue `foldingcollection`\n */\n @Prop({reflect: true}) public collectionField?: string;\n /**\n * The name of the field that determines whether a certain result is a top result containing other child results within a collection.\n *\n * @defaultValue `foldingparent`\n */\n @Prop({reflect: true}) public parentField?: string;\n /**\n * The name of the field that uniquely identifies a result within a collection.\n *\n * @defaultValue `foldingchild`\n */\n @Prop({reflect: true}) public childField?: string;\n\n /**\n * The initial number of child results to request for each folded collection, before expansion.\n *\n * @defaultValue `2`\n *\n * @example For an email thread with a total of 20 messages, using the default value of `2` will request the top two child messages, based on the current sort criteria and query, to be returned as children of the parent message.\n * The user can then click to expand the collection and see the remaining messages that match the current query (i.e., not necessarily all remaining 18 messages). Those messages will be sorted based on the current sort criteria (i.e., not necessarily by date).\n * For more info on Result Folding, see [Result Folding](https://docs.coveo.com/en/1884).\n **/\n @Prop({reflect: true}) public numberOfFoldedResults = 2;\n\n /**\n * Sets a rendering function to bypass the standard HTML template mechanism for rendering results.\n * You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue.\n *\n * Do not use this method if you integrate Atomic in a plain HTML deployment.\n */\n @Method() public async setRenderFunction(\n resultRenderingFunction: ItemRenderingFunction\n ) {\n this.resultRenderingFunction = resultRenderingFunction;\n }\n\n @Listen('atomic/resolveFoldedResultList')\n resolveFoldedResultList(event: FoldedItemListStateContextEvent) {\n event.preventDefault();\n event.stopPropagation();\n event.detail(this.foldedResultList);\n }\n\n @Listen('atomic/loadCollection')\n loadCollection(event: CustomEvent<FoldedCollection>) {\n event.preventDefault();\n event.stopPropagation();\n this.foldedResultList.loadCollection(event.detail);\n }\n\n public get focusTarget() {\n if (!this.nextNewResultTarget) {\n this.nextNewResultTarget = new FocusTargetController(this);\n }\n return this.nextNewResultTarget;\n }\n\n public initialize() {\n try {\n this.foldedResultList = this.initFolding();\n this.resultsPerPage = buildResultsPerPage(this.bindings.engine);\n } catch (e) {\n this.error = e as Error;\n }\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: true,\n templateElements: Array.from(\n this.host.querySelectorAll('atomic-result-template')\n ),\n getResultTemplateRegistered: () => this.resultTemplateRegistered,\n getTemplateHasError: () => this.templateHasError,\n setResultTemplateRegistered: (value: boolean) => {\n this.resultTemplateRegistered = value;\n },\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n\n this.itemListCommon = new ItemListCommon({\n engineSubscribe: this.bindings.engine.subscribe,\n getCurrentNumberOfItems: () => this.foldedResultListState.results.length,\n getIsLoading: () => this.foldedResultListState.isLoading,\n host: this.host,\n loadingFlag: this.loadingFlag,\n nextNewItemTarget: this.focusTarget,\n store: this.bindings.store,\n });\n this.tabManager = buildTabManager(this.bindings.engine);\n\n createAppLoadedListener(this.bindings.store, (isAppLoaded) => {\n this.isAppLoaded = isAppLoaded;\n });\n }\n\n private initFolding(\n props: ResultListProps = {options: {}}\n ): FoldedResultList {\n return buildFoldedResultList(this.bindings.engine, {\n options: {\n ...props.options,\n folding: {\n collectionField: this.collectionField,\n parentField: this.parentField,\n childField: this.childField,\n numberOfFoldedResults: this.numberOfFoldedResults,\n },\n },\n });\n }\n\n @Watch('tabManagerState')\n watchTabManagerState(\n newValue: {activeTab: string},\n oldValue: {activeTab: string}\n ) {\n if (newValue?.activeTab !== oldValue?.activeTab) {\n this.bindings.store.unsetLoadingFlag(this.loadingFlag);\n }\n }\n\n public render() {\n if (\n !shouldDisplayOnCurrentTab(\n [...this.tabsIncluded],\n [...this.tabsExcluded],\n this.tabManagerState.activeTab\n )\n ) {\n return <Hidden></Hidden>;\n }\n this.itemListCommon.updateBreakpoints();\n const listClasses = this.computeListDisplayClasses();\n\n return (\n <ItemListGuard\n hasError={this.foldedResultListState.hasError}\n firstRequestExecuted={this.foldedResultListState.firstSearchExecuted}\n hasItems={this.foldedResultListState.hasResults}\n hasTemplate={this.resultTemplateRegistered}\n templateHasError={this.itemTemplateProvider.hasError}\n >\n <DisplayWrapper listClasses={listClasses} display={this.display}>\n <ResultsPlaceholdersGuard\n density={this.density}\n imageSize={this.imageSize}\n display={this.display}\n displayPlaceholders={!this.isAppLoaded}\n numberOfPlaceholders={this.resultsPerPageState.numberOfResults}\n ></ResultsPlaceholdersGuard>\n <ItemDisplayGuard\n firstRequestExecuted={\n this.foldedResultListState.firstSearchExecuted\n }\n hasItems={this.foldedResultListState.hasResults}\n >\n {this.foldedResultListState.results.map((collection, i) => {\n const propsForAtomicResult =\n this.getPropsForAtomicResult(collection);\n return (\n <atomic-result\n {...propsForAtomicResult}\n part=\"outline\"\n ref={(element) =>\n element && this.itemListCommon.setNewResultRef(element, i)\n }\n ></atomic-result>\n );\n })}\n </ItemDisplayGuard>\n </DisplayWrapper>\n </ItemListGuard>\n );\n }\n\n private computeListDisplayClasses() {\n const displayPlaceholders = !this.isAppLoaded;\n\n return getItemListDisplayClasses(\n this.display,\n this.density,\n this.imageSize,\n this.foldedResultListState.firstSearchExecuted &&\n this.foldedResultListState.isLoading,\n displayPlaceholders\n );\n }\n\n private getPropsForAtomicResult(collection: FoldedCollection) {\n const result = extractUnfoldedItem(collection);\n\n return {\n interactiveResult: buildInteractiveResult(this.bindings.engine, {\n options: {result},\n }),\n result: collection,\n renderingFunction: this.resultRenderingFunction,\n loadingFlag: this.loadingFlag,\n key: this.itemListCommon.getResultId(\n result.uniqueId,\n this.foldedResultListState.searchResponseId,\n this.density,\n this.imageSize\n ),\n content: this.itemTemplateProvider.getTemplateContent(result),\n store: this.bindings.store,\n density: this.density,\n imageSize: this.imageSize,\n display: this.display,\n };\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"atomic-folded-result-list.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,M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AC,UAA4B;QAC1D,MAAM,MAAM,GAAGC,gCAAmB,CAAC,UAAU,CAAC,CAAC;QAE/C,OAAO;YACL,iBAAiB,EAAEC,+BAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;gBAC9D,OAAO,EAAE,EAAC,MAAM,EAAC;aAClB,CAAC;YACF,MAAM,EAAE,UAAU;YAClB,iBAAiB,EAAE,IAAI,CAAC,uBAAuB;YAC/C,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAClC,MAAM,CAAC,QAAQ,EACf,IAAI,CAAC,qBAAqB,CAAC,gBAAgB,EAC3C,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,SAAS,CACf;YACD,OAAO,EAAE,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,MAAM,CAAC;YAC7D,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;KACH;;;;;;AAtR4B;IAA5BC,sCAAkB,EAAE;wDAA4B;AAc1C;IAFNC,yCAAqB,CAAC,kBAAkB,CAAC;qEAEW;AAG9C;IAFNA,yCAAqB,CAAC,gBAAgB,CAAC;mEAES;AAI1C;IAFNA,yCAAqB,CAAC,YAAY,CAAC;+DAEK;AAyBlC;IAFNC,oBAAS,EAAE;4DAEkC;AAavC;IAFNA,oBAAS,EAAE;4DAEkC;;;;;","names":["randomID","FocusTargetController","buildResultsPerPage","ItemTemplateProvider","ItemListCommon","buildTabManager","createAppLoadedListener","buildFoldedResultList","shouldDisplayOnCurrentTab","h","Hidden","ItemListGuard","DisplayWrapper","ResultsPlaceholdersGuard","ItemDisplayGuard","getItemListDisplayClasses","extractUnfoldedItem","buildInteractiveResult","InitializeBindings","BindStateToController","ArrayProp"],"sources":["src/components/search/result-lists/atomic-folded-result-list/atomic-folded-result-list.pcss?tag=atomic-folded-result-list&encapsulation=shadow","src/components/search/result-lists/atomic-folded-result-list/atomic-folded-result-list.tsx"],"sourcesContent":["@import '../../../../global/global.pcss';\n@import '../../../common/item-list/styles/placeholders.pcss';\n@import '../../../common/item-list/styles/list-display.pcss';\natomic-result:not(.hydrated) {\n visibility: hidden;\n}\n","import {FoldedItemListStateContextEvent} from '@/src/components/common/item-list/item-list-decorators';\nimport {\n ResultsPerPageState,\n ResultsPerPage,\n buildFoldedResultList,\n FoldedResultList,\n FoldedResultListState,\n buildResultsPerPage,\n ResultListProps,\n FoldedCollection,\n buildInteractiveResult,\n TabManager,\n TabManagerState,\n buildTabManager,\n} from '@coveo/headless';\nimport {\n Component,\n Element,\n State,\n Prop,\n Listen,\n Method,\n h,\n Watch,\n} from '@stencil/core';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {ArrayProp} from '../../../../utils/props-utils';\nimport {FocusTargetController} from '../../../../utils/stencil-accessibility-utils';\nimport {shouldDisplayOnCurrentTab} from '../../../../utils/tab-utils';\nimport {randomID} from '../../../../utils/utils';\nimport {ResultsPlaceholdersGuard} from '../../../common/atomic-result-placeholder/stencil-placeholders';\nimport {extractUnfoldedItem} from '../../../common/item-list/unfolded-item';\nimport {createAppLoadedListener} from '../../../common/interface/store';\nimport {ItemDisplayGuard} from '../../../common/item-list/item-display-guard';\nimport {ItemListGuard} from '../../../common/item-list/item-list-guard';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {DisplayWrapper} from '../../../common/item-list/stencil-display-wrapper';\nimport {\n ItemListCommon,\n ItemRenderingFunction,\n} from '../../../common/item-list/stencil-item-list-common';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n ItemDisplayLayout,\n getItemListDisplayClasses,\n} from '../../../common/layout/display-options';\nimport {Hidden} from '../../../common/stencil-hidden';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-folded-result-list` component is responsible for displaying folded query results, by applying one or more result templates for up to three layers (i.e., to the result, child and grandchild).\n * @slot default - The default slot where the result templates are inserted.\n * @part result-list - The element containing every result of a result list\n * @part outline - The element displaying an outline or a divider around a result\n */\n@Component({\n tag: 'atomic-folded-result-list',\n styleUrl: 'atomic-folded-result-list.pcss',\n shadow: true,\n})\nexport class AtomicFoldedResultList implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n public foldedResultList!: FoldedResultList;\n public resultsPerPage!: ResultsPerPage;\n private resultRenderingFunction: ItemRenderingFunction;\n private loadingFlag = randomID('firstResultLoaded-');\n private itemTemplateProvider!: ItemTemplateProvider;\n private nextNewResultTarget?: FocusTargetController;\n private itemListCommon!: ItemListCommon;\n private display: ItemDisplayLayout = 'list';\n\n @Element() public host!: HTMLDivElement;\n\n @BindStateToController('foldedResultList')\n @State()\n public foldedResultListState!: FoldedResultListState;\n @BindStateToController('resultsPerPage')\n @State()\n public resultsPerPageState!: ResultsPerPageState;\n public tabManager!: TabManager;\n @BindStateToController('tabManager')\n @State()\n public tabManagerState!: TabManagerState;\n @State() private resultTemplateRegistered = false;\n @State() public error!: Error;\n @State() private templateHasError = false;\n @State() private isAppLoaded = false;\n\n /**\n * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.\n */\n @Prop({reflect: true}) density: ItemDisplayDensity = 'normal';\n /**\n * The expected size of the image displayed in the results.\n */\n @Prop({reflect: true}) imageSize: ItemDisplayImageSize = 'icon';\n /**\n * The tabs on which the folded result list can be displayed. This property should not be used at the same time as `tabs-excluded`.\n *\n * Set this property as a stringified JSON array, e.g.,\n * ```html\n * <atomic-folded-result-list tabs-included='[\"tabIDA\", \"tabIDB\"]'></atomic-folded-result-list snippet>\n * ```\n * If you don't set this property, the folded result list can be displayed on any tab. Otherwise, the folded result list can only be displayed on the specified tabs.\n */\n @ArrayProp()\n @Prop({reflect: true, mutable: true})\n public tabsIncluded: string[] | string = '[]';\n\n /**\n * The tabs on which this folded result list must not be displayed. This property should not be used at the same time as `tabs-included`.\n *\n * Set this property as a stringified JSON array, e.g.,\n * ```html\n * <atomic-folded-result-list tabs-excluded='[\"tabIDA\", \"tabIDB\"]'></atomic-folded-result-list>\n * ```\n * If you don't set this property, the folded result list can be displayed on any tab. Otherwise, the folded result list won't be displayed on any of the specified tabs.\n */\n @ArrayProp()\n @Prop({reflect: true, mutable: true})\n public tabsExcluded: string[] | string = '[]';\n /**\n * The name of the field on which to do the folding. The folded result list component will use the values of this field to resolve the collections of result items.\n *\n * @defaultValue `foldingcollection`\n */\n @Prop({reflect: true}) public collectionField?: string;\n /**\n * The name of the field that determines whether a certain result is a top result containing other child results within a collection.\n *\n * @defaultValue `foldingparent`\n */\n @Prop({reflect: true}) public parentField?: string;\n /**\n * The name of the field that uniquely identifies a result within a collection.\n *\n * @defaultValue `foldingchild`\n */\n @Prop({reflect: true}) public childField?: string;\n\n /**\n * The initial number of child results to request for each folded collection, before expansion.\n *\n * @defaultValue `2`\n *\n * @example For an email thread with a total of 20 messages, using the default value of `2` will request the top two child messages, based on the current sort criteria and query, to be returned as children of the parent message.\n * The user can then click to expand the collection and see the remaining messages that match the current query (i.e., not necessarily all remaining 18 messages). Those messages will be sorted based on the current sort criteria (i.e., not necessarily by date).\n * For more info on Result Folding, see [Result Folding](https://docs.coveo.com/en/1884).\n **/\n @Prop({reflect: true}) public numberOfFoldedResults = 2;\n\n /**\n * Sets a rendering function to bypass the standard HTML template mechanism for rendering results.\n * You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue.\n *\n * Do not use this method if you integrate Atomic in a plain HTML deployment.\n */\n @Method() public async setRenderFunction(\n resultRenderingFunction: ItemRenderingFunction\n ) {\n this.resultRenderingFunction = resultRenderingFunction;\n }\n\n @Listen('atomic/resolveFoldedResultList')\n resolveFoldedResultList(event: FoldedItemListStateContextEvent) {\n event.preventDefault();\n event.stopPropagation();\n event.detail(this.foldedResultList);\n }\n\n @Listen('atomic/loadCollection')\n loadCollection(event: CustomEvent<FoldedCollection>) {\n event.preventDefault();\n event.stopPropagation();\n this.foldedResultList.loadCollection(event.detail);\n }\n\n public get focusTarget() {\n if (!this.nextNewResultTarget) {\n this.nextNewResultTarget = new FocusTargetController(this);\n }\n return this.nextNewResultTarget;\n }\n\n public initialize() {\n try {\n this.foldedResultList = this.initFolding();\n this.resultsPerPage = buildResultsPerPage(this.bindings.engine);\n } catch (e) {\n this.error = e as Error;\n }\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: true,\n templateElements: Array.from(\n this.host.querySelectorAll('atomic-result-template')\n ),\n getResultTemplateRegistered: () => this.resultTemplateRegistered,\n getTemplateHasError: () => this.templateHasError,\n setResultTemplateRegistered: (value: boolean) => {\n this.resultTemplateRegistered = value;\n },\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n\n this.itemListCommon = new ItemListCommon({\n engineSubscribe: this.bindings.engine.subscribe,\n getCurrentNumberOfItems: () => this.foldedResultListState.results.length,\n getIsLoading: () => this.foldedResultListState.isLoading,\n host: this.host,\n loadingFlag: this.loadingFlag,\n nextNewItemTarget: this.focusTarget,\n store: this.bindings.store,\n });\n this.tabManager = buildTabManager(this.bindings.engine);\n\n createAppLoadedListener(this.bindings.store, (isAppLoaded) => {\n this.isAppLoaded = isAppLoaded;\n });\n }\n\n private initFolding(\n props: ResultListProps = {options: {}}\n ): FoldedResultList {\n return buildFoldedResultList(this.bindings.engine, {\n options: {\n ...props.options,\n folding: {\n collectionField: this.collectionField,\n parentField: this.parentField,\n childField: this.childField,\n numberOfFoldedResults: this.numberOfFoldedResults,\n },\n },\n });\n }\n\n @Watch('tabManagerState')\n watchTabManagerState(\n newValue: {activeTab: string},\n oldValue: {activeTab: string}\n ) {\n if (newValue?.activeTab !== oldValue?.activeTab) {\n this.bindings.store.unsetLoadingFlag(this.loadingFlag);\n }\n }\n\n public render() {\n if (\n !shouldDisplayOnCurrentTab(\n [...this.tabsIncluded],\n [...this.tabsExcluded],\n this.tabManagerState.activeTab\n )\n ) {\n return <Hidden></Hidden>;\n }\n this.itemListCommon.updateBreakpoints();\n const listClasses = this.computeListDisplayClasses();\n\n return (\n <ItemListGuard\n hasError={this.foldedResultListState.hasError}\n firstRequestExecuted={this.foldedResultListState.firstSearchExecuted}\n hasItems={this.foldedResultListState.hasResults}\n hasTemplate={this.resultTemplateRegistered}\n templateHasError={this.itemTemplateProvider.hasError}\n >\n <DisplayWrapper listClasses={listClasses} display={this.display}>\n <ResultsPlaceholdersGuard\n density={this.density}\n imageSize={this.imageSize}\n display={this.display}\n displayPlaceholders={!this.isAppLoaded}\n numberOfPlaceholders={this.resultsPerPageState.numberOfResults}\n ></ResultsPlaceholdersGuard>\n <ItemDisplayGuard\n firstRequestExecuted={\n this.foldedResultListState.firstSearchExecuted\n }\n hasItems={this.foldedResultListState.hasResults}\n >\n {this.foldedResultListState.results.map((collection, i) => {\n const propsForAtomicResult =\n this.getPropsForAtomicResult(collection);\n return (\n <atomic-result\n {...propsForAtomicResult}\n part=\"outline\"\n ref={(element) =>\n element && this.itemListCommon.setNewResultRef(element, i)\n }\n ></atomic-result>\n );\n })}\n </ItemDisplayGuard>\n </DisplayWrapper>\n </ItemListGuard>\n );\n }\n\n private computeListDisplayClasses() {\n const displayPlaceholders = !this.isAppLoaded;\n\n return getItemListDisplayClasses(\n this.display,\n this.density,\n this.imageSize,\n this.foldedResultListState.firstSearchExecuted &&\n this.foldedResultListState.isLoading,\n displayPlaceholders\n );\n }\n\n private getPropsForAtomicResult(collection: FoldedCollection) {\n const result = extractUnfoldedItem(collection);\n\n return {\n interactiveResult: buildInteractiveResult(this.bindings.engine, {\n options: {result},\n }),\n result: collection,\n renderingFunction: this.resultRenderingFunction,\n loadingFlag: this.loadingFlag,\n key: this.itemListCommon.getResultId(\n result.uniqueId,\n this.foldedResultListState.searchResponseId,\n this.density,\n this.imageSize\n ),\n content: this.itemTemplateProvider.getTemplateContent(result),\n store: this.bindings.store,\n density: this.density,\n imageSize: this.imageSize,\n display: this.display,\n };\n }\n}\n"],"version":3}
|
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
7
|
const debounceUtils = require('./debounce-utils-e014935f.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const tabUtils = require('./tab-utils-d202a0aa.js');
|
|
12
12
|
const generatedAnswerCommon = require('./generated-answer-common-1f7e3c88.js');
|
|
@@ -8,7 +8,7 @@ const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
|
8
8
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
9
9
|
const utils = require('./utils-7153ae6b.js');
|
|
10
10
|
const stencilPlaceholders = require('./stencil-placeholders-b8c896fa.js');
|
|
11
|
-
const
|
|
11
|
+
const unfoldedItem = require('./unfolded-item-148d21d6.js');
|
|
12
12
|
const store = require('./store-82abd941.js');
|
|
13
13
|
const stencilDisplayWrapper = require('./stencil-display-wrapper-498de571.js');
|
|
14
14
|
const itemListGuard = require('./item-list-guard-506b695a.js');
|
|
@@ -140,7 +140,7 @@ const AtomicInsightFoldedResultList = class {
|
|
|
140
140
|
render() {
|
|
141
141
|
this.itemListCommon.updateBreakpoints();
|
|
142
142
|
const listClasses = this.computeListDisplayClasses();
|
|
143
|
-
return (index.h(itemListGuard.ItemListGuard, { key: '
|
|
143
|
+
return (index.h(itemListGuard.ItemListGuard, { key: 'ea7ceba580399e6b24e5d762e73b7e62d9e602b1', firstRequestExecuted: this.foldedResultListState.firstSearchExecuted, hasItems: this.foldedResultListState.hasResults, hasTemplate: this.resultTemplateRegistered, templateHasError: this.itemTemplateProvider.hasError, hasError: this.foldedResultListState.hasError }, index.h(stencilDisplayWrapper.DisplayWrapper, { key: 'e7160b0e0ca8fd43438ceab38c68ec7d5bca4110', listClasses: listClasses, display: this.display }, index.h(stencilPlaceholders.ResultsPlaceholdersGuard, { key: '7a30f3bad0c1c385c51ece26128423bfb02e02f9', displayPlaceholders: !this.isAppLoaded, numberOfPlaceholders: this.resultsPerPageState.numberOfResults, display: this.display, density: this.density, imageSize: this.imageSize }), index.h(stencilDisplayWrapper.ItemDisplayGuard, { key: 'd29341e0ebf7a541059168d247b53e7588418832', firstRequestExecuted: this.foldedResultListState.firstSearchExecuted, hasItems: this.foldedResultListState.hasResults }, this.foldedResultListState.results.map((collection, i) => {
|
|
144
144
|
const atomicInsightResultProps = this.getPropsForAtomicInsightResult(collection);
|
|
145
145
|
return (index.h("atomic-insight-result", { ...atomicInsightResultProps, part: "outline", ref: (element) => element && this.itemListCommon.setNewResultRef(element, i) }));
|
|
146
146
|
})))));
|
|
@@ -151,7 +151,7 @@ const AtomicInsightFoldedResultList = class {
|
|
|
151
151
|
this.foldedResultListState.isLoading, displayPlaceholders);
|
|
152
152
|
}
|
|
153
153
|
getPropsForAtomicInsightResult(collection) {
|
|
154
|
-
const result =
|
|
154
|
+
const result = unfoldedItem.extractUnfoldedItem(collection);
|
|
155
155
|
return {
|
|
156
156
|
interactiveResult: insight.buildInteractiveResult(this.bindings.engine, {
|
|
157
157
|
options: { result },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"atomic-insight-folded-result-list.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gCAAgC,GAAG,8utEAA8utE,CAAC;AACxxtE,4CAAe,gCAAgC;;;;;;;;;;;;MCqDlC,6BAA6B;;;QAOhC,gBAAW,GAAGA,cAAQ,CAAC,oBAAoB,CAAC,CAAC;QAG7C,YAAO,GAAsB,MAAM,CAAC;QAW3B,6BAAw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Common","createAppLoadedListener","FocusTargetController","buildInsightFoldedResultList","h","ItemListGuard","DisplayWrapper","ResultsPlaceholdersGuard","ItemDisplayGuard","getItemListDisplayClasses","extractUnfoldedItem","buildInsightInteractiveResult","InitializeBindings","BindStateToController"],"sources":["src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.pcss?tag=atomic-insight-folded-result-list&encapsulation=shadow","src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.tsx"],"sourcesContent":["@import '../../../common/item-list/styles/placeholders.pcss';\n@import '../styles/list-display.pcss';\natomic-result:not(.hydrated) {\n visibility: hidden;\n}\n","import {\n ResultsPerPageState as InsightResultsPerPageState,\n ResultsPerPage as InsightResultsPerPage,\n buildFoldedResultList as buildInsightFoldedResultList,\n FoldedResultList as InsightFoldedResultList,\n FoldedResultListState as InsightFoldedResultListState,\n buildResultsPerPage as buildInsightResultsPerPage,\n FoldedCollection as InsightFoldedCollection,\n buildInteractiveResult as buildInsightInteractiveResult,\n} from '@coveo/headless/insight';\nimport {\n Component,\n Element,\n State,\n Prop,\n Listen,\n Method,\n h,\n} from '@stencil/core';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {FocusTargetController} from '../../../../utils/stencil-accessibility-utils';\nimport {randomID} from '../../../../utils/utils';\nimport {ResultsPlaceholdersGuard} from '../../../common/atomic-result-placeholder/stencil-placeholders';\nimport {extractUnfoldedItem} from '../../../common/interface/item';\nimport {createAppLoadedListener} from '../../../common/interface/store';\nimport {ItemDisplayGuard} from '../../../common/item-list/item-display-guard';\nimport {FoldedItemListStateContextEvent} from '../../../common/item-list/item-list-decorators';\nimport {ItemListGuard} from '../../../common/item-list/item-list-guard';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {DisplayWrapper} from '../../../common/item-list/stencil-display-wrapper';\nimport {\n ItemListCommon,\n ItemRenderingFunction,\n} from '../../../common/item-list/stencil-item-list-common';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n ItemDisplayLayout,\n getItemListDisplayClasses,\n} from '../../../common/layout/display-options';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-folded-result-list',\n styleUrl: 'atomic-insight-folded-result-list.pcss',\n shadow: true,\n})\nexport class AtomicInsightFoldedResultList\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n public foldedResultList!: InsightFoldedResultList;\n public resultsPerPage!: InsightResultsPerPage;\n private itemRenderingFunction: ItemRenderingFunction;\n private loadingFlag = randomID('firstResultLoaded-');\n private itemTemplateProvider!: ItemTemplateProvider;\n private nextNewResultTarget?: FocusTargetController;\n private display: ItemDisplayLayout = 'list';\n private itemListCommon!: ItemListCommon;\n\n @Element() public host!: HTMLDivElement;\n\n @BindStateToController('foldedResultList')\n @State()\n public foldedResultListState!: InsightFoldedResultListState;\n @BindStateToController('resultsPerPage')\n @State()\n public resultsPerPageState!: InsightResultsPerPageState;\n @State() private resultTemplateRegistered = false;\n @State() public error!: Error;\n @State() private isAppLoaded = false;\n @State() private templateHasError = false;\n\n /**\n * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.\n */\n @Prop({reflect: true}) density: ItemDisplayDensity = 'normal';\n /**\n * The expected size of the image displayed in the results.\n */\n @Prop({reflect: true}) imageSize: ItemDisplayImageSize = 'icon';\n /**\n * The name of the field on which to do the folding. The folded result list component will use the values of this field to resolve the collections of result items.\n *\n * @defaultValue `foldingcollection`\n */\n @Prop({reflect: true}) public collectionField?: string;\n /**\n * The name of the field that determines whether a certain result is a top result containing other child results within a collection.\n *\n * @defaultValue `foldingparent`\n */\n @Prop({reflect: true}) public parentField?: string;\n /**\n * The name of the field that uniquely identifies a result within a collection.\n *\n * @defaultValue `foldingchild`\n */\n @Prop({reflect: true}) public childField?: string;\n\n /**\n * Sets a rendering function to bypass the standard HTML template mechanism for rendering results.\n * You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue.\n *\n * Do not use this method if you integrate Atomic in a plain HTML deployment.\n */\n @Method() public async setRenderFunction(\n resultRenderingFunction: ItemRenderingFunction\n ) {\n this.itemRenderingFunction = resultRenderingFunction;\n }\n\n @Listen('atomic/resolveFoldedResultList')\n resolveFoldedResultList(event: FoldedItemListStateContextEvent) {\n event.preventDefault();\n event.stopPropagation();\n event.detail(this.foldedResultList);\n }\n\n @Listen('atomic/loadCollection')\n loadCollection(event: CustomEvent<InsightFoldedCollection>) {\n event.preventDefault();\n event.stopPropagation();\n this.foldedResultList.loadCollection(event.detail);\n }\n\n public initialize() {\n try {\n this.foldedResultList = this.initFolding();\n this.resultsPerPage = buildInsightResultsPerPage(this.bindings.engine);\n } catch (e) {\n this.error = e as Error;\n }\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: true,\n templateElements: Array.from(\n this.host.querySelectorAll('atomic-insight-result-template')\n ),\n getResultTemplateRegistered: () => this.resultTemplateRegistered,\n getTemplateHasError: () => this.templateHasError,\n setResultTemplateRegistered: (value: boolean) => {\n this.resultTemplateRegistered = value;\n },\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n\n this.itemListCommon = new ItemListCommon({\n engineSubscribe: this.bindings.engine.subscribe,\n getCurrentNumberOfItems: () => this.foldedResultListState.results.length,\n getIsLoading: () => this.foldedResultListState.isLoading,\n host: this.host,\n loadingFlag: this.loadingFlag,\n nextNewItemTarget: this.focusTarget,\n store: this.bindings.store,\n });\n createAppLoadedListener(this.bindings.store, (isAppLoaded) => {\n this.isAppLoaded = isAppLoaded;\n });\n }\n\n private get focusTarget(): FocusTargetController {\n if (!this.nextNewResultTarget) {\n this.nextNewResultTarget = new FocusTargetController(this);\n }\n return this.nextNewResultTarget;\n }\n\n private initFolding(props = {options: {}}): InsightFoldedResultList {\n return buildInsightFoldedResultList(this.bindings.engine, {\n options: {\n ...props.options,\n folding: {\n collectionField: this.collectionField,\n parentField: this.parentField,\n childField: this.childField,\n },\n },\n });\n }\n\n public render() {\n this.itemListCommon.updateBreakpoints();\n const listClasses = this.computeListDisplayClasses();\n\n return (\n <ItemListGuard\n firstRequestExecuted={this.foldedResultListState.firstSearchExecuted}\n hasItems={this.foldedResultListState.hasResults}\n hasTemplate={this.resultTemplateRegistered}\n templateHasError={this.itemTemplateProvider.hasError}\n hasError={this.foldedResultListState.hasError}\n >\n <DisplayWrapper listClasses={listClasses} display={this.display}>\n <ResultsPlaceholdersGuard\n displayPlaceholders={!this.isAppLoaded}\n numberOfPlaceholders={this.resultsPerPageState.numberOfResults}\n display={this.display}\n density={this.density}\n imageSize={this.imageSize}\n ></ResultsPlaceholdersGuard>\n <ItemDisplayGuard\n firstRequestExecuted={\n this.foldedResultListState.firstSearchExecuted\n }\n hasItems={this.foldedResultListState.hasResults}\n >\n {this.foldedResultListState.results.map((collection, i) => {\n const atomicInsightResultProps =\n this.getPropsForAtomicInsightResult(collection);\n return (\n <atomic-insight-result\n {...atomicInsightResultProps}\n part=\"outline\"\n ref={(element) =>\n element && this.itemListCommon.setNewResultRef(element, i)\n }\n ></atomic-insight-result>\n );\n })}\n </ItemDisplayGuard>\n </DisplayWrapper>\n </ItemListGuard>\n );\n }\n\n private computeListDisplayClasses() {\n const displayPlaceholders = !this.isAppLoaded;\n\n return getItemListDisplayClasses(\n this.display,\n this.density,\n this.imageSize,\n this.foldedResultListState.firstSearchExecuted &&\n this.foldedResultListState.isLoading,\n displayPlaceholders\n );\n }\n\n private getPropsForAtomicInsightResult(collection: InsightFoldedCollection) {\n const result = extractUnfoldedItem(collection);\n\n return {\n interactiveResult: buildInsightInteractiveResult(this.bindings.engine, {\n options: {result},\n }),\n result,\n renderingFunction: this.itemRenderingFunction,\n loadingFlag: this.loadingFlag,\n key: this.itemListCommon.getResultId(\n result.uniqueId,\n this.foldedResultListState.searchResponseId,\n this.density,\n this.imageSize\n ),\n content: this.itemTemplateProvider.getTemplateContent(result),\n store: this.bindings.store,\n density: this.density,\n display: this.display,\n imageSize: this.imageSize,\n };\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"atomic-insight-folded-result-list.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gCAAgC,GAAG,8utEAA8utE,CAAC;AACxxtE,4CAAe,gCAAgC;;;;;;;;;;;;MCqDlC,6BAA6B;;;QAOhC,gBAAW,GAAGA,cAAQ,CAAC,oBAAoB,CAAC,CAAC;QAG7C,YAAO,GAAsB,MAAM,CAAC;QAW3B,6BAAwB,GAAG,KAAK,CAAC;QAEjC,gBAAW,GAAG,KAAK,CAAC;QACpB,qBAAgB,GAAG,KAAK,CAAC;;;;QAKnB,YAAO,GAAuB,QAAQ,CAAC;;;;QAIvC,cAAS,GAAyB,MAAM,CAAC;;;wCAZpB,KAAK;;2BAElB,KAAK;gCACA,KAAK;uBAKY,QAAQ;yBAIJ,MAAM;;;;;;;;;;;IA0B9C,MAAM,iBAAiB,CACtC,uBAA8C;QAE9C,IAAI,CAAC,qBAAqB,GAAG,uBAAuB,CAAC;KACtD;IAGD,uBAAuB,CAAC,KAAsC;QAC5D,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KACrC;IAGD,cAAc,CAAC,KAA2C;QACxD,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KACpD;IAEM,UAAU;QACf,IAAI;YACF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,CAAC,cAAc,GAAGC,2BAA0B,CAAC,IAAI,CAAC,QAAQ,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,kBAAkB,CAAC,MAAM,CAAC;YAC7D,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK;YAC1B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;KACH;;;AAtN4B;IAA5BC,sCAAkB,EAAE;+DAAmC;AAcjD;IAFNC,yCAAqB,CAAC,kBAAkB,CAAC;4EAEkB;AAGrD;IAFNA,yCAAqB,CAAC,gBAAgB,CAAC;0EAEgB;;;;;","names":["randomID","buildInsightResultsPerPage","ItemTemplateProvider","ItemListCommon","createAppLoadedListener","FocusTargetController","buildInsightFoldedResultList","h","ItemListGuard","DisplayWrapper","ResultsPlaceholdersGuard","ItemDisplayGuard","getItemListDisplayClasses","extractUnfoldedItem","buildInsightInteractiveResult","InitializeBindings","BindStateToController"],"sources":["src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.pcss?tag=atomic-insight-folded-result-list&encapsulation=shadow","src/components/insight/result-lists/atomic-insight-folded-result-list/atomic-insight-folded-result-list.tsx"],"sourcesContent":["@import '../../../common/item-list/styles/placeholders.pcss';\n@import '../styles/list-display.pcss';\natomic-result:not(.hydrated) {\n visibility: hidden;\n}\n","import {\n ResultsPerPageState as InsightResultsPerPageState,\n ResultsPerPage as InsightResultsPerPage,\n buildFoldedResultList as buildInsightFoldedResultList,\n FoldedResultList as InsightFoldedResultList,\n FoldedResultListState as InsightFoldedResultListState,\n buildResultsPerPage as buildInsightResultsPerPage,\n FoldedCollection as InsightFoldedCollection,\n buildInteractiveResult as buildInsightInteractiveResult,\n} from '@coveo/headless/insight';\nimport {\n Component,\n Element,\n State,\n Prop,\n Listen,\n Method,\n h,\n} from '@stencil/core';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {FocusTargetController} from '../../../../utils/stencil-accessibility-utils';\nimport {randomID} from '../../../../utils/utils';\nimport {ResultsPlaceholdersGuard} from '../../../common/atomic-result-placeholder/stencil-placeholders';\nimport {extractUnfoldedItem} from '../../../common/item-list/unfolded-item';\nimport {createAppLoadedListener} from '../../../common/interface/store';\nimport {ItemDisplayGuard} from '../../../common/item-list/item-display-guard';\nimport {FoldedItemListStateContextEvent} from '../../../common/item-list/item-list-decorators';\nimport {ItemListGuard} from '../../../common/item-list/item-list-guard';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {DisplayWrapper} from '../../../common/item-list/stencil-display-wrapper';\nimport {\n ItemListCommon,\n ItemRenderingFunction,\n} from '../../../common/item-list/stencil-item-list-common';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n ItemDisplayLayout,\n getItemListDisplayClasses,\n} from '../../../common/layout/display-options';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-folded-result-list',\n styleUrl: 'atomic-insight-folded-result-list.pcss',\n shadow: true,\n})\nexport class AtomicInsightFoldedResultList\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n public foldedResultList!: InsightFoldedResultList;\n public resultsPerPage!: InsightResultsPerPage;\n private itemRenderingFunction: ItemRenderingFunction;\n private loadingFlag = randomID('firstResultLoaded-');\n private itemTemplateProvider!: ItemTemplateProvider;\n private nextNewResultTarget?: FocusTargetController;\n private display: ItemDisplayLayout = 'list';\n private itemListCommon!: ItemListCommon;\n\n @Element() public host!: HTMLDivElement;\n\n @BindStateToController('foldedResultList')\n @State()\n public foldedResultListState!: InsightFoldedResultListState;\n @BindStateToController('resultsPerPage')\n @State()\n public resultsPerPageState!: InsightResultsPerPageState;\n @State() private resultTemplateRegistered = false;\n @State() public error!: Error;\n @State() private isAppLoaded = false;\n @State() private templateHasError = false;\n\n /**\n * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.\n */\n @Prop({reflect: true}) density: ItemDisplayDensity = 'normal';\n /**\n * The expected size of the image displayed in the results.\n */\n @Prop({reflect: true}) imageSize: ItemDisplayImageSize = 'icon';\n /**\n * The name of the field on which to do the folding. The folded result list component will use the values of this field to resolve the collections of result items.\n *\n * @defaultValue `foldingcollection`\n */\n @Prop({reflect: true}) public collectionField?: string;\n /**\n * The name of the field that determines whether a certain result is a top result containing other child results within a collection.\n *\n * @defaultValue `foldingparent`\n */\n @Prop({reflect: true}) public parentField?: string;\n /**\n * The name of the field that uniquely identifies a result within a collection.\n *\n * @defaultValue `foldingchild`\n */\n @Prop({reflect: true}) public childField?: string;\n\n /**\n * Sets a rendering function to bypass the standard HTML template mechanism for rendering results.\n * You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue.\n *\n * Do not use this method if you integrate Atomic in a plain HTML deployment.\n */\n @Method() public async setRenderFunction(\n resultRenderingFunction: ItemRenderingFunction\n ) {\n this.itemRenderingFunction = resultRenderingFunction;\n }\n\n @Listen('atomic/resolveFoldedResultList')\n resolveFoldedResultList(event: FoldedItemListStateContextEvent) {\n event.preventDefault();\n event.stopPropagation();\n event.detail(this.foldedResultList);\n }\n\n @Listen('atomic/loadCollection')\n loadCollection(event: CustomEvent<InsightFoldedCollection>) {\n event.preventDefault();\n event.stopPropagation();\n this.foldedResultList.loadCollection(event.detail);\n }\n\n public initialize() {\n try {\n this.foldedResultList = this.initFolding();\n this.resultsPerPage = buildInsightResultsPerPage(this.bindings.engine);\n } catch (e) {\n this.error = e as Error;\n }\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: true,\n templateElements: Array.from(\n this.host.querySelectorAll('atomic-insight-result-template')\n ),\n getResultTemplateRegistered: () => this.resultTemplateRegistered,\n getTemplateHasError: () => this.templateHasError,\n setResultTemplateRegistered: (value: boolean) => {\n this.resultTemplateRegistered = value;\n },\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n\n this.itemListCommon = new ItemListCommon({\n engineSubscribe: this.bindings.engine.subscribe,\n getCurrentNumberOfItems: () => this.foldedResultListState.results.length,\n getIsLoading: () => this.foldedResultListState.isLoading,\n host: this.host,\n loadingFlag: this.loadingFlag,\n nextNewItemTarget: this.focusTarget,\n store: this.bindings.store,\n });\n createAppLoadedListener(this.bindings.store, (isAppLoaded) => {\n this.isAppLoaded = isAppLoaded;\n });\n }\n\n private get focusTarget(): FocusTargetController {\n if (!this.nextNewResultTarget) {\n this.nextNewResultTarget = new FocusTargetController(this);\n }\n return this.nextNewResultTarget;\n }\n\n private initFolding(props = {options: {}}): InsightFoldedResultList {\n return buildInsightFoldedResultList(this.bindings.engine, {\n options: {\n ...props.options,\n folding: {\n collectionField: this.collectionField,\n parentField: this.parentField,\n childField: this.childField,\n },\n },\n });\n }\n\n public render() {\n this.itemListCommon.updateBreakpoints();\n const listClasses = this.computeListDisplayClasses();\n\n return (\n <ItemListGuard\n firstRequestExecuted={this.foldedResultListState.firstSearchExecuted}\n hasItems={this.foldedResultListState.hasResults}\n hasTemplate={this.resultTemplateRegistered}\n templateHasError={this.itemTemplateProvider.hasError}\n hasError={this.foldedResultListState.hasError}\n >\n <DisplayWrapper listClasses={listClasses} display={this.display}>\n <ResultsPlaceholdersGuard\n displayPlaceholders={!this.isAppLoaded}\n numberOfPlaceholders={this.resultsPerPageState.numberOfResults}\n display={this.display}\n density={this.density}\n imageSize={this.imageSize}\n ></ResultsPlaceholdersGuard>\n <ItemDisplayGuard\n firstRequestExecuted={\n this.foldedResultListState.firstSearchExecuted\n }\n hasItems={this.foldedResultListState.hasResults}\n >\n {this.foldedResultListState.results.map((collection, i) => {\n const atomicInsightResultProps =\n this.getPropsForAtomicInsightResult(collection);\n return (\n <atomic-insight-result\n {...atomicInsightResultProps}\n part=\"outline\"\n ref={(element) =>\n element && this.itemListCommon.setNewResultRef(element, i)\n }\n ></atomic-insight-result>\n );\n })}\n </ItemDisplayGuard>\n </DisplayWrapper>\n </ItemListGuard>\n );\n }\n\n private computeListDisplayClasses() {\n const displayPlaceholders = !this.isAppLoaded;\n\n return getItemListDisplayClasses(\n this.display,\n this.density,\n this.imageSize,\n this.foldedResultListState.firstSearchExecuted &&\n this.foldedResultListState.isLoading,\n displayPlaceholders\n );\n }\n\n private getPropsForAtomicInsightResult(collection: InsightFoldedCollection) {\n const result = extractUnfoldedItem(collection);\n\n return {\n interactiveResult: buildInsightInteractiveResult(this.bindings.engine, {\n options: {result},\n }),\n result,\n renderingFunction: this.itemRenderingFunction,\n loadingFlag: this.loadingFlag,\n key: this.itemListCommon.getResultId(\n result.uniqueId,\n this.foldedResultListState.searchResponseId,\n this.density,\n this.imageSize\n ),\n content: this.itemTemplateProvider.getTemplateContent(result),\n store: this.bindings.store,\n density: this.density,\n display: this.display,\n imageSize: this.imageSize,\n };\n }\n}\n"],"version":3}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
6
|
const initQueue = require('./init-queue-a18aa323.js');
|
|
7
7
|
const insight = require('@coveo/headless/insight');
|
|
8
|
-
const analyticsConfig = require('./analytics-config-
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
8
|
+
const analyticsConfig = require('./analytics-config-d10e762b.js');
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const replaceBreakpoint = require('./replace-breakpoint-9e1c0efa.js');
|
|
11
11
|
const store = require('./store-82abd941.js');
|
|
12
12
|
const insightLayout = require('./insight-layout-355a94dd.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const bueno = require('@coveo/bueno');
|
|
7
7
|
const insight = require('@coveo/headless/insight');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const utils = require('./utils-7153ae6b.js');
|
|
12
12
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
|
-
const propsUtils = require('./props-utils-
|
|
6
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
7
7
|
const resultTemplateCommon = require('./result-template-common-88359dad.js');
|
|
8
8
|
require('@coveo/bueno');
|
|
9
9
|
require('./utils-7153ae6b.js');
|
|
@@ -7,7 +7,7 @@ const insight = require('@coveo/headless/insight');
|
|
|
7
7
|
const eventUtils = require('./event-utils-9bfcf3c5.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
9
|
const utils = require('./utils-7153ae6b.js');
|
|
10
|
-
const
|
|
10
|
+
const unfoldedItem = require('./unfolded-item-148d21d6.js');
|
|
11
11
|
const showHideButton = require('./show-hide-button-2fb7407f.js');
|
|
12
12
|
const itemTemplateProvider = require('./item-template-provider-470c1774.js');
|
|
13
13
|
const stencilItemDecorators = require('./stencil-item-decorators-43a96f33.js');
|
|
@@ -101,7 +101,7 @@ const AtomicResultChildren = class {
|
|
|
101
101
|
const key = child.result.uniqueId +
|
|
102
102
|
child.children.map((child) => child.result.uniqueId);
|
|
103
103
|
return (index.h("atomic-insight-result", { key: key, content: content, result: child, interactiveResult: insight.buildInteractiveResult(this.bindings.engine, {
|
|
104
|
-
options: { result:
|
|
104
|
+
options: { result: unfoldedItem.extractUnfoldedItem(child) },
|
|
105
105
|
}), store: this.bindings.store, density: this.displayConfig.density, imageSize: this.imageSize || this.displayConfig.imageSize, classes: `child-result ${isLast ? 'last-child' : ''}`.trim() }));
|
|
106
106
|
}
|
|
107
107
|
componentWillRender() {
|
|
@@ -133,7 +133,7 @@ const AtomicResultChildren = class {
|
|
|
133
133
|
return (index.h(showHideButton.ChildrenWrapper, { hasChildren: children.length > 0 }, children.map((child, i) => this.renderChild(child, i === children.length - 1))));
|
|
134
134
|
}
|
|
135
135
|
render() {
|
|
136
|
-
return (index.h(showHideButton.ResultChildrenGuard, { key: '
|
|
136
|
+
return (index.h(showHideButton.ResultChildrenGuard, { key: '1190e3f9b1165a6e484f862147f328725ada0b8b', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
|
|
137
137
|
}
|
|
138
138
|
get host() { return index.getElement(this); }
|
|
139
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"atomic-insight-result-children.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,+/2DAA+/2D,CAAC;AACvi3D,0CAAe,8BAA8B;;;;;;;;;;;;ACgC7C,MAAM,sBAAsB,GAAG,yCAAyC,CAAC;AACzE,MAAM,YAAY,GAAG,gCAAgC,CAAC;MAUzC,oBAAoB;;;QAgBd,6BAAwB,GAAG,KAAK,CAAC;QACjC,qBAAgB,GAAG,KAAK,CAAC;QAKlC,wBAAmB,GAAG,KAAK,CAAC;;;;QAK5B,qBAAgB,GAAG,KAAK,CAAC;;;;QAQlB,iBAAY,GAAG,sBAAsB,CAAC;QAsF7C,8BAAyB,GAAG;YAClC,IAAI,CAAC,mBAAmB;kBACpB,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;kBAClE,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,EAAE,CAAC;YAErD,IAAI,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC;SACtD,CAAC;;wCA/G0C,KAAK;gCACb,KAAK;;mCAKX,KAAK;gCAKR,KAAK;;4BAQF,sBAAsB;;IAG7C,qBAAqB,CAAC,KAAiC;QAC5D,KAAK,CA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CAAC;QAEtC,QACEN,QAACM,8BAAe,IAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,IAC9C,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KACrB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CACnD,CACe,EAClB;KACH;IAEM,MAAM;QACX,QACEN,QAACO,kCAAmB,qDAClB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IAEtC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAClD,EACtB;KACH;;;AAzL4B;IAA5BC,sCAAkB,EAAE;sDAAmC;AAEjD;IADNC,2CAAqB,EAAE;kEAC2B;AAE3C;IADPC,oCAAqB,EAAE;8DAC2B;AAE3C;IADPC,iCAAW,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,uBAAuB,EAAC,CAAC;oDAC5B;AAE7B;IADPC,8CAAwB,EAAE;2DACW;AAS9B;IAFPC,yCAA0B,EAAE;mEAEgC;;;;;","names":["elementHasAncestorTag","ItemTemplateProvider","h","buildInsightInteractiveResult","extractUnfoldedItem","buildCustomEvent","CollectionGuard","ShowHideButton","ChildrenWrapper","ResultChildrenGuard","InitializeBindings","ChildTemplatesContext","FoldedItemListContext","ItemContext","ItemDisplayConfigContext","FoldedItemListStateContext"],"sources":["src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.pcss?tag=atomic-insight-result-children&encapsulation=shadow","src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.tsx"],"sourcesContent":["@import '../../../../components/common/result-children/result-children.pcss';\n\n[part='children-root'] {\n @apply border-neutral border-l;\n padding-left: 1rem;\n margin-top: 1rem;\n}\n","import {\n buildInteractiveResult as buildInsightInteractiveResult,\n FoldedResultListState as InsightFoldedResultListState,\n FoldedResult as InsightFoldedResult,\n FoldedResultList as InsightFoldedResultList,\n} from '@coveo/headless/insight';\nimport {Component, Element, State, h, Listen, Prop} from '@stencil/core';\nimport {buildCustomEvent} from '../../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {elementHasAncestorTag} from '../../../../utils/utils';\nimport {extractUnfoldedItem} from '../../../common/interface/item';\nimport {\n FoldedItemListContext,\n FoldedItemListStateContext,\n} from '../../../common/item-list/item-list-decorators';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {\n ChildTemplatesContext,\n ChildTemplatesContextEvent,\n DisplayConfig,\n ItemContext,\n ItemDisplayConfigContext,\n} from '../../../common/item-list/stencil-item-decorators';\nimport {ItemDisplayImageSize} from '../../../common/layout/display-options';\nimport {ChildrenWrapper} from '../../../common/result-children/children-wrapper';\nimport {CollectionGuard} from '../../../common/result-children/collection-guard';\nimport {ResultChildrenGuard} from '../../../common/result-children/guard';\nimport {ShowHideButton} from '../../../common/result-children/show-hide-button';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\nconst childTemplateComponent = 'atomic-insight-result-children-template';\nconst componentTag = 'atomic-insight-result-children';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-children',\n styleUrl: 'atomic-insight-result-children.pcss',\n shadow: true,\n})\nexport class AtomicResultChildren\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ChildTemplatesContext()\n public itemTemplateProvider?: ItemTemplateProvider;\n @FoldedItemListContext()\n private foldedResultList!: InsightFoldedResultList;\n @ItemContext({folded: true, parentName: 'atomic-insight-result'})\n private result!: InsightFoldedResult;\n @ItemDisplayConfigContext()\n private displayConfig!: DisplayConfig;\n private initialChildren!: InsightFoldedResult[];\n\n @Element() public host!: HTMLDivElement;\n @State() public error!: Error;\n @State() private resultTemplateRegistered = false;\n @State() private templateHasError = false;\n @FoldedItemListStateContext()\n @State()\n private foldedResultListState!: InsightFoldedResultListState;\n @State()\n private showInitialChildren = false;\n\n /**\n * Whether to inherit templates defined in a parent atomic-result-children. Only works for the second level of child nesting.\n */\n @Prop() inheritTemplates = false;\n /**\n * The expected size of the image displayed in the children results.\n */\n @Prop({reflect: true}) imageSize?: ItemDisplayImageSize;\n /**\n * The non-localized copy for an empty result state. An empty string will result in the component being hidden.\n */\n @Prop() public noResultText = 'no-documents-related';\n\n @Listen('atomic/resolveChildTemplates')\n public resolveChildTemplates(event: ChildTemplatesContextEvent) {\n event.preventDefault();\n event.detail(this.itemTemplateProvider);\n }\n\n public initialize() {\n if (this.inheritTemplates) {\n return;\n }\n\n const childrenTemplates = Array.from(\n this.host.querySelectorAll(childTemplateComponent)\n ).filter(\n (template) => !elementHasAncestorTag(template, childTemplateComponent)\n );\n\n if (!childrenTemplates.length) {\n this.error = new Error(\n `The \"${componentTag}\" component requires at least one \"${childTemplateComponent}\" component.`\n );\n return;\n }\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: false,\n templateElements: childrenTemplates,\n getResultTemplateRegistered: () => this.resultTemplateRegistered,\n getTemplateHasError: () => this.templateHasError,\n setResultTemplateRegistered: (value: boolean) => {\n this.resultTemplateRegistered = value;\n },\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n }\n\n private renderChild(child: InsightFoldedResult, isLast: boolean) {\n const content = this.itemTemplateProvider?.getTemplateContent(child.result);\n\n if (!content) {\n return;\n }\n\n const key =\n child.result.uniqueId +\n child.children.map((child) => child.result.uniqueId);\n return (\n <atomic-insight-result\n key={key}\n content={content}\n result={child}\n interactiveResult={buildInsightInteractiveResult(this.bindings.engine, {\n options: {result: extractUnfoldedItem(child)},\n })}\n store={this.bindings.store}\n density={this.displayConfig.density}\n imageSize={this.imageSize || this.displayConfig.imageSize}\n classes={`child-result ${isLast ? 'last-child' : ''}`.trim()}\n ></atomic-insight-result>\n );\n }\n\n public componentWillRender() {\n if (this.initialChildren || !this.collection) {\n return;\n }\n\n this.initialChildren = this.collection.children;\n }\n\n private get collection() {\n return this.foldedResultListState.results.find((r) => {\n return r.result.uniqueId === this.result.result.uniqueId;\n });\n }\n\n private loadFullCollection() {\n this.host.dispatchEvent(\n buildCustomEvent('atomic/loadCollection', this.collection)\n );\n }\n private toggleShowInitialChildren = () => {\n this.showInitialChildren\n ? this.foldedResultList.logShowMoreFoldedResults(this.result.result)\n : this.foldedResultList.logShowLessFoldedResults();\n\n this.showInitialChildren = !this.showInitialChildren;\n };\n private renderCollection() {\n const collection = this.collection!;\n\n const children = this.showInitialChildren\n ? this.initialChildren\n : collection.children;\n\n return (\n <CollectionGuard\n isLoadingMoreResults={collection.isLoadingMoreResults}\n moreResultsAvailable={collection.moreResultsAvailable}\n hasChildren={collection.children.length > 0}\n numberOfChildren={collection.children.length}\n density={this.displayConfig.density}\n imageSize={this.imageSize || this.displayConfig.imageSize}\n noResultText={this.bindings.i18n.t(this.noResultText)}\n >\n <ShowHideButton\n moreResultsAvailable={collection.moreResultsAvailable}\n loadFullCollection={() => this.loadFullCollection()}\n showInitialChildren={this.showInitialChildren}\n toggleShowInitialChildren={this.toggleShowInitialChildren}\n loadAllResults={this.bindings.i18n.t('load-all-results')}\n collapseResults={this.bindings.i18n.t('collapse-results')}\n ></ShowHideButton>\n <ChildrenWrapper hasChildren={collection.children.length > 0}>\n {children.map((child, i) =>\n this.renderChild(child, i === children.length - 1)\n )}\n </ChildrenWrapper>\n </CollectionGuard>\n );\n }\n\n private renderFoldedResult() {\n if (this.result.children.length === 0) {\n return;\n }\n\n const children = this.result.children;\n\n return (\n <ChildrenWrapper hasChildren={children.length > 0}>\n {children.map((child, i) =>\n this.renderChild(child, i === children.length - 1)\n )}\n </ChildrenWrapper>\n );\n }\n\n public render() {\n return (\n <ResultChildrenGuard\n inheritTemplates={this.inheritTemplates}\n resultTemplateRegistered={this.resultTemplateRegistered}\n templateHasError={this.templateHasError}\n >\n {this.collection ? this.renderCollection() : this.renderFoldedResult()}\n </ResultChildrenGuard>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"atomic-insight-result-children.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,+/2DAA+/2D,CAAC;AACvi3D,0CAAe,8BAA8B;;;;;;;;;;;;ACgC7C,MAAM,sBAAsB,GAAG,yCAAyC,CAAC;AACzE,MAAM,YAAY,GAAG,gCAAgC,CAAC;MAUzC,oBAAoB;;;QAgBd,6BAAwB,GAAG,KAAK,CAAC;QACjC,qBAAgB,GAAG,KAAK,CAAC;QAKlC,wBAAmB,GAAG,KAAK,CAAC;;;;QAK5B,qBAAgB,GAAG,KAAK,CAAC;;;;QAQlB,iBAAY,GAAG,sBAAsB,CAAC;QAsF7C,8BAAyB,GAAG;YAClC,IAAI,CAAC,mBAAmB;kBACpB,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;kBAClE,IAAI,CAAC,gBAAgB,CAAC,wBAAwB,EAAE,CAAC;YAErD,IAAI,CAAC,mBAAmB,GAAG,CAAC,IAAI,CAAC,mBAAmB,CAAC;SACtD,CAAC;;wCA/G0C,KAAK;gCACb,KAAK;;mCAKX,KAAK;gCAKR,KAAK;;4BAQF,sBAAsB;;IAG7C,qBAAqB,CAAC,KAAiC;QAC5D,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;KACzC;IAEM,UAAU;QACf,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,OAAO;SACR;QAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAClC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CACnD,CAAC,MAAM,CAC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,kCAAmB,qDAClB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,IAEtC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAClD,EACtB;KACH;;;AAzL4B;IAA5BC,sCAAkB,EAAE;sDAAmC;AAEjD;IADNC,2CAAqB,EAAE;kEAC2B;AAE3C;IADPC,oCAAqB,EAAE;8DAC2B;AAE3C;IADPC,iCAAW,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,uBAAuB,EAAC,CAAC;oDAC5B;AAE7B;IADPC,8CAAwB,EAAE;2DACW;AAS9B;IAFPC,yCAA0B,EAAE;mEAEgC;;;;;","names":["elementHasAncestorTag","ItemTemplateProvider","h","buildInsightInteractiveResult","extractUnfoldedItem","buildCustomEvent","CollectionGuard","ShowHideButton","ChildrenWrapper","ResultChildrenGuard","InitializeBindings","ChildTemplatesContext","FoldedItemListContext","ItemContext","ItemDisplayConfigContext","FoldedItemListStateContext"],"sources":["src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.pcss?tag=atomic-insight-result-children&encapsulation=shadow","src/components/insight/result-templates/atomic-insight-result-children/atomic-insight-result-children.tsx"],"sourcesContent":["@import '../../../../components/common/result-children/result-children.pcss';\n\n[part='children-root'] {\n @apply border-neutral border-l;\n padding-left: 1rem;\n margin-top: 1rem;\n}\n","import {\n buildInteractiveResult as buildInsightInteractiveResult,\n FoldedResultListState as InsightFoldedResultListState,\n FoldedResult as InsightFoldedResult,\n FoldedResultList as InsightFoldedResultList,\n} from '@coveo/headless/insight';\nimport {Component, Element, State, h, Listen, Prop} from '@stencil/core';\nimport {buildCustomEvent} from '../../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../../utils/initialization-utils';\nimport {elementHasAncestorTag} from '../../../../utils/utils';\nimport {extractUnfoldedItem} from '../../../common/item-list/unfolded-item';\nimport {\n FoldedItemListContext,\n FoldedItemListStateContext,\n} from '../../../common/item-list/item-list-decorators';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {\n ChildTemplatesContext,\n ChildTemplatesContextEvent,\n DisplayConfig,\n ItemContext,\n ItemDisplayConfigContext,\n} from '../../../common/item-list/stencil-item-decorators';\nimport {ItemDisplayImageSize} from '../../../common/layout/display-options';\nimport {ChildrenWrapper} from '../../../common/result-children/children-wrapper';\nimport {CollectionGuard} from '../../../common/result-children/collection-guard';\nimport {ResultChildrenGuard} from '../../../common/result-children/guard';\nimport {ShowHideButton} from '../../../common/result-children/show-hide-button';\nimport {InsightBindings} from '../../atomic-insight-interface/atomic-insight-interface';\n\nconst childTemplateComponent = 'atomic-insight-result-children-template';\nconst componentTag = 'atomic-insight-result-children';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-result-children',\n styleUrl: 'atomic-insight-result-children.pcss',\n shadow: true,\n})\nexport class AtomicResultChildren\n implements InitializableComponent<InsightBindings>\n{\n @InitializeBindings() public bindings!: InsightBindings;\n @ChildTemplatesContext()\n public itemTemplateProvider?: ItemTemplateProvider;\n @FoldedItemListContext()\n private foldedResultList!: InsightFoldedResultList;\n @ItemContext({folded: true, parentName: 'atomic-insight-result'})\n private result!: InsightFoldedResult;\n @ItemDisplayConfigContext()\n private displayConfig!: DisplayConfig;\n private initialChildren!: InsightFoldedResult[];\n\n @Element() public host!: HTMLDivElement;\n @State() public error!: Error;\n @State() private resultTemplateRegistered = false;\n @State() private templateHasError = false;\n @FoldedItemListStateContext()\n @State()\n private foldedResultListState!: InsightFoldedResultListState;\n @State()\n private showInitialChildren = false;\n\n /**\n * Whether to inherit templates defined in a parent atomic-result-children. Only works for the second level of child nesting.\n */\n @Prop() inheritTemplates = false;\n /**\n * The expected size of the image displayed in the children results.\n */\n @Prop({reflect: true}) imageSize?: ItemDisplayImageSize;\n /**\n * The non-localized copy for an empty result state. An empty string will result in the component being hidden.\n */\n @Prop() public noResultText = 'no-documents-related';\n\n @Listen('atomic/resolveChildTemplates')\n public resolveChildTemplates(event: ChildTemplatesContextEvent) {\n event.preventDefault();\n event.detail(this.itemTemplateProvider);\n }\n\n public initialize() {\n if (this.inheritTemplates) {\n return;\n }\n\n const childrenTemplates = Array.from(\n this.host.querySelectorAll(childTemplateComponent)\n ).filter(\n (template) => !elementHasAncestorTag(template, childTemplateComponent)\n );\n\n if (!childrenTemplates.length) {\n this.error = new Error(\n `The \"${componentTag}\" component requires at least one \"${childTemplateComponent}\" component.`\n );\n return;\n }\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: false,\n templateElements: childrenTemplates,\n getResultTemplateRegistered: () => this.resultTemplateRegistered,\n getTemplateHasError: () => this.templateHasError,\n setResultTemplateRegistered: (value: boolean) => {\n this.resultTemplateRegistered = value;\n },\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n }\n\n private renderChild(child: InsightFoldedResult, isLast: boolean) {\n const content = this.itemTemplateProvider?.getTemplateContent(child.result);\n\n if (!content) {\n return;\n }\n\n const key =\n child.result.uniqueId +\n child.children.map((child) => child.result.uniqueId);\n return (\n <atomic-insight-result\n key={key}\n content={content}\n result={child}\n interactiveResult={buildInsightInteractiveResult(this.bindings.engine, {\n options: {result: extractUnfoldedItem(child)},\n })}\n store={this.bindings.store}\n density={this.displayConfig.density}\n imageSize={this.imageSize || this.displayConfig.imageSize}\n classes={`child-result ${isLast ? 'last-child' : ''}`.trim()}\n ></atomic-insight-result>\n );\n }\n\n public componentWillRender() {\n if (this.initialChildren || !this.collection) {\n return;\n }\n\n this.initialChildren = this.collection.children;\n }\n\n private get collection() {\n return this.foldedResultListState.results.find((r) => {\n return r.result.uniqueId === this.result.result.uniqueId;\n });\n }\n\n private loadFullCollection() {\n this.host.dispatchEvent(\n buildCustomEvent('atomic/loadCollection', this.collection)\n );\n }\n private toggleShowInitialChildren = () => {\n this.showInitialChildren\n ? this.foldedResultList.logShowMoreFoldedResults(this.result.result)\n : this.foldedResultList.logShowLessFoldedResults();\n\n this.showInitialChildren = !this.showInitialChildren;\n };\n private renderCollection() {\n const collection = this.collection!;\n\n const children = this.showInitialChildren\n ? this.initialChildren\n : collection.children;\n\n return (\n <CollectionGuard\n isLoadingMoreResults={collection.isLoadingMoreResults}\n moreResultsAvailable={collection.moreResultsAvailable}\n hasChildren={collection.children.length > 0}\n numberOfChildren={collection.children.length}\n density={this.displayConfig.density}\n imageSize={this.imageSize || this.displayConfig.imageSize}\n noResultText={this.bindings.i18n.t(this.noResultText)}\n >\n <ShowHideButton\n moreResultsAvailable={collection.moreResultsAvailable}\n loadFullCollection={() => this.loadFullCollection()}\n showInitialChildren={this.showInitialChildren}\n toggleShowInitialChildren={this.toggleShowInitialChildren}\n loadAllResults={this.bindings.i18n.t('load-all-results')}\n collapseResults={this.bindings.i18n.t('collapse-results')}\n ></ShowHideButton>\n <ChildrenWrapper hasChildren={collection.children.length > 0}>\n {children.map((child, i) =>\n this.renderChild(child, i === children.length - 1)\n )}\n </ChildrenWrapper>\n </CollectionGuard>\n );\n }\n\n private renderFoldedResult() {\n if (this.result.children.length === 0) {\n return;\n }\n\n const children = this.result.children;\n\n return (\n <ChildrenWrapper hasChildren={children.length > 0}>\n {children.map((child, i) =>\n this.renderChild(child, i === children.length - 1)\n )}\n </ChildrenWrapper>\n );\n }\n\n public render() {\n return (\n <ResultChildrenGuard\n inheritTemplates={this.inheritTemplates}\n resultTemplateRegistered={this.resultTemplateRegistered}\n templateHasError={this.templateHasError}\n >\n {this.collection ? this.renderCollection() : this.renderFoldedResult()}\n </ResultChildrenGuard>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
|
-
const propsUtils = require('./props-utils-
|
|
6
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
7
7
|
const resultTemplateCommon = require('./result-template-common-88359dad.js');
|
|
8
8
|
require('@coveo/bueno');
|
|
9
9
|
require('./utils-7153ae6b.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
6
|
const insight = require('@coveo/headless/insight');
|
|
7
7
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
8
|
-
const propsUtils = require('./props-utils-
|
|
8
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
9
9
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
10
10
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
11
11
|
const facetPlaceholder = require('./facet-placeholder-0111f0f1.js');
|
|
@@ -59,7 +59,7 @@ const AtomicIPXResultLink = class {
|
|
|
59
59
|
const href = bueno.isUndefined(this.hrefTemplate)
|
|
60
60
|
? this.result.clickUri
|
|
61
61
|
: resultUtils.buildStringTemplateFromResult(this.hrefTemplate, this.result, this.bindings);
|
|
62
|
-
return (index.h(stencilItemLink.LinkWithItemAnalytics, { key: '
|
|
62
|
+
return (index.h(stencilItemLink.LinkWithItemAnalytics, { key: 'c36a990dd66b1deda2d5c6a5ba5622e487013617', href: href, onSelect: () => this.onSelect(), onBeginDelayedSelect: () => this.interactiveResult.beginDelayedSelect(), onCancelPendingSelect: () => this.interactiveResult.cancelPendingSelect(), attributes: this.linkAttributes, stopPropagation: this.stopPropagation }, this.hasDefaultSlot ? (index.h("slot", null)) : (index.h("atomic-result-text", { field: "title", default: "no-title" }))));
|
|
63
63
|
}
|
|
64
64
|
get host() { return index.getElement(this); }
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"atomic-ipx-result-link.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,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AI,CAAC,QAAQ,EAAE,EAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClBD,qBAAQ,KAERA,gCACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxF4B;IAA5BE,sCAAkB,EAAE;qDAAgC;AAG5B;IAAxBC,sCAAa,EAAE;mDAAkC;AACd;IAAnCC,iDAAwB,EAAE;8DAA+C;;;;;","names":["buildCustomEvent","loadIPXActionsHistoryActions","getDefaultSlotFromHost","getAttributesFromLinkSlot","isUndefined","buildStringTemplateFromResult","h","LinkWithItemAnalytics","InitializeBindings","ResultContext","InteractiveResultContext"],"sources":["src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.pcss?tag=atomic-ipx-result-link","src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@import '../../../utils/tailwind-utilities/link-style.tw.css';\n\natomic-ipx-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {\n IPXActionsHistoryActionCreators,\n InteractiveResult,\n loadIPXActionsHistoryActions,\n} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../common/
|
|
1
|
+
{"file":"atomic-ipx-result-link.entry.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;AAAA,MAA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E,MAAM,IAAI,CAAC,QAAQ,EAAE,EAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,EACvE,qBAAqB,EAAE,MACrB,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,EAE9C,UAAU,EAAE,IAAI,CAAC,cAAc,EAC/B,eAAe,EAAE,IAAI,CAAC,eAAe,IAEpC,IAAI,CAAC,cAAc,IAClBD,qBAAQ,KAERA,gCACE,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,UAAU,GACE,CACvB,CACqB,EACxB;KACH;;;AAxF4B;IAA5BE,sCAAkB,EAAE;qDAAgC;AAG5B;IAAxBC,sCAAa,EAAE;mDAAkC;AACd;IAAnCC,iDAAwB,EAAE;8DAA+C;;;;;","names":["buildCustomEvent","loadIPXActionsHistoryActions","getDefaultSlotFromHost","getAttributesFromLinkSlot","isUndefined","buildStringTemplateFromResult","h","LinkWithItemAnalytics","InitializeBindings","ResultContext","InteractiveResultContext"],"sources":["src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.pcss?tag=atomic-ipx-result-link","src/components/ipx/atomic-ipx-result-link/atomic-ipx-result-link.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@import '../../../utils/tailwind-utilities/link-style.tw.css';\n\natomic-ipx-result-link {\n a {\n @apply link-style;\n }\n}\n","import {isUndefined} from '@coveo/bueno';\nimport {\n IPXActionsHistoryActionCreators,\n InteractiveResult,\n loadIPXActionsHistoryActions,\n} from '@coveo/headless';\nimport {Component, h, Prop, Element} from '@stencil/core';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport {\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {buildStringTemplateFromResult} from '../../../utils/result-utils';\nimport {getDefaultSlotFromHost} from '../../../utils/slot-utils';\nimport {AnyUnfoldedItem} from '../../common/item-list/unfolded-item';\nimport {getAttributesFromLinkSlot} from '../../common/item-link/attributes-slot';\nimport {LinkWithItemAnalytics} from '../../common/item-link/stencil-item-link';\nimport {RecsBindings} from '../../recommendations/atomic-recs-interface/atomic-recs-interface';\nimport {\n ResultContext,\n InteractiveResultContext,\n} from '../../search/result-template-components/result-template-decorators';\n\n/**\n * The `atomic-ipx-result-link` component automatically transforms a search result title into a clickable link that points to the original item. It is an experimental internal component not intended for general use.\n * @slot default - Lets you display alternative content inside the link\n * @slot attributes - Lets you pass [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) down to the link element, overriding other attributes, to be used exclusively with an \"a\" tag such as `<a slot=\"attributes\" target=\"_blank\" download></a>`.\n * @internal\n */\n@Component({\n tag: 'atomic-ipx-result-link',\n styleUrl: 'atomic-ipx-result-link.pcss',\n shadow: false,\n})\nexport class AtomicIPXResultLink\n implements InitializableComponent<RecsBindings>\n{\n @InitializeBindings() public bindings!: RecsBindings;\n public error!: Error;\n\n @ResultContext() private result!: AnyUnfoldedItem;\n @InteractiveResultContext() private interactiveResult!: InteractiveResult;\n\n @Element() private host!: HTMLElement;\n\n /**\n * Specifies a template literal from which to generate the `href` attribute value (see\n * [Template literals](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Template_literals)).\n *\n * The template literal can reference any number of result properties from the parent result. It can also reference the window object.\n *\n * For example, the following markup generates an `href` value such as `http://uri.com?id=itemTitle`, using the result's `clickUri` and `itemtitle` fields.\n * ```html\n * <atomic-ipx-result-link href-template='${clickUri}?id=${raw.itemtitle}'></atomic-ipx-result-link>\n * ```\n */\n @Prop({reflect: true}) hrefTemplate?: string;\n\n private hasDefaultSlot!: boolean;\n private linkAttributes?: Attr[];\n private stopPropagation?: boolean;\n private actionsHistoryActions?: IPXActionsHistoryActionCreators;\n\n public initialize() {\n this.host.dispatchEvent(\n buildCustomEvent(\n 'atomic/resolveStopPropagation',\n (stopPropagation: boolean) => {\n this.stopPropagation = stopPropagation;\n }\n )\n );\n this.actionsHistoryActions = loadIPXActionsHistoryActions(\n this.bindings.engine\n );\n }\n\n public connectedCallback() {\n const slotName = 'attributes';\n this.hasDefaultSlot = !!getDefaultSlotFromHost(this.host);\n this.linkAttributes = getAttributesFromLinkSlot(this.host, slotName);\n }\n\n public async onSelect() {\n const resultPermanentId = this.result.raw.permanentid;\n if (resultPermanentId && this.actionsHistoryActions) {\n const action =\n this.actionsHistoryActions.addPageViewEntryInActionsHistory(\n resultPermanentId\n );\n this.bindings.engine.dispatch(action);\n }\n this.interactiveResult.select();\n }\n\n public render() {\n const href = isUndefined(this.hrefTemplate)\n ? this.result.clickUri\n : buildStringTemplateFromResult(\n this.hrefTemplate,\n this.result,\n this.bindings\n );\n\n return (\n <LinkWithItemAnalytics\n href={href}\n onSelect={() => this.onSelect()}\n onBeginDelayedSelect={() => this.interactiveResult.beginDelayedSelect()}\n onCancelPendingSelect={() =>\n this.interactiveResult.cancelPendingSelect()\n }\n attributes={this.linkAttributes}\n stopPropagation={this.stopPropagation}\n >\n {this.hasDefaultSlot ? (\n <slot />\n ) : (\n <atomic-result-text\n field=\"title\"\n default=\"no-title\"\n ></atomic-result-text>\n )}\n </LinkWithItemAnalytics>\n );\n }\n}\n"],"version":3}
|
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const bueno = require('@coveo/bueno');
|
|
7
7
|
const headless = require('@coveo/headless');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const utils = require('./utils-7153ae6b.js');
|
|
12
12
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
|
-
const propsUtils = require('./props-utils-
|
|
6
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
7
7
|
require('./purify-85b542e2.js');
|
|
8
8
|
const commerce = require('@coveo/headless/commerce');
|
|
9
9
|
const stencilProductTemplateDecorators = require('./stencil-product-template-decorators-1edee0eb.js');
|
|
@@ -7,7 +7,7 @@ const bueno = require('@coveo/bueno');
|
|
|
7
7
|
const headless = require('@coveo/headless');
|
|
8
8
|
const atomicRating = require('./atomic-rating-0457b861.js');
|
|
9
9
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
10
|
-
const propsUtils = require('./props-utils-
|
|
10
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
11
11
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
12
12
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
13
13
|
const stencilFacetHeader = require('./stencil-facet-header-60732c1b.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-757bc886.js');
|
|
|
6
6
|
const headless = require('@coveo/headless');
|
|
7
7
|
const atomicRating = require('./atomic-rating-0457b861.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const stencilAccessibilityUtils = require('./stencil-accessibility-utils-aa4c9f6c.js');
|
|
11
11
|
const dependsOn = require('./depends-on-0d4e4f15.js');
|
|
12
12
|
const stencilFacetHeader = require('./stencil-facet-header-60732c1b.js');
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
6
|
const initQueue = require('./init-queue-a18aa323.js');
|
|
7
7
|
const recommendation = require('@coveo/headless/recommendation');
|
|
8
|
-
const analyticsConfig = require('./analytics-config-
|
|
9
|
-
const propsUtils = require('./props-utils-
|
|
8
|
+
const analyticsConfig = require('./analytics-config-d10e762b.js');
|
|
9
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
10
10
|
const store = require('./store-82abd941.js');
|
|
11
11
|
require('./dayjs.min-8b80e6d1.js');
|
|
12
12
|
require('./_commonjsHelpers-b3309d7b.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
|
-
const propsUtils = require('./props-utils-
|
|
6
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
7
7
|
const resultTemplateCommon = require('./result-template-common-88359dad.js');
|
|
8
8
|
require('@coveo/bueno');
|
|
9
9
|
require('./utils-7153ae6b.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-757bc886.js');
|
|
6
|
-
const propsUtils = require('./props-utils-
|
|
6
|
+
const propsUtils = require('./props-utils-1e4ba1b0.js');
|
|
7
7
|
const resultTemplateCommon = require('./result-template-common-88359dad.js');
|
|
8
8
|
require('@coveo/bueno');
|
|
9
9
|
require('./utils-7153ae6b.js');
|
|
@@ -7,7 +7,7 @@ const headless = require('@coveo/headless');
|
|
|
7
7
|
const eventUtils = require('./event-utils-9bfcf3c5.js');
|
|
8
8
|
const initializationUtils = require('./initialization-utils-62dc9852.js');
|
|
9
9
|
const utils = require('./utils-7153ae6b.js');
|
|
10
|
-
const
|
|
10
|
+
const unfoldedItem = require('./unfolded-item-148d21d6.js');
|
|
11
11
|
const showHideButton = require('./show-hide-button-2fb7407f.js');
|
|
12
12
|
const itemTemplateProvider = require('./item-template-provider-470c1774.js');
|
|
13
13
|
const stencilItemDecorators = require('./stencil-item-decorators-43a96f33.js');
|
|
@@ -106,7 +106,7 @@ const AtomicResultChildren = class {
|
|
|
106
106
|
const key = child.result.uniqueId +
|
|
107
107
|
child.children.map((child) => child.result.uniqueId);
|
|
108
108
|
return (index.h("atomic-result", { key: key, content: content, result: child, interactiveResult: headless.buildInteractiveResult(this.bindings.engine, {
|
|
109
|
-
options: { result:
|
|
109
|
+
options: { result: unfoldedItem.extractUnfoldedItem(child) },
|
|
110
110
|
}), store: this.bindings.store, density: this.displayConfig.density, imageSize: this.imageSize || this.displayConfig.imageSize, classes: `child-result ${isLast ? 'last-child' : ''}`.trim() }));
|
|
111
111
|
}
|
|
112
112
|
componentWillRender() {
|
|
@@ -140,7 +140,7 @@ const AtomicResultChildren = class {
|
|
|
140
140
|
return (index.h(showHideButton.ChildrenWrapper, { hasChildren: children.length > 0 }, children.map((child, i) => this.renderChild(child, i === children.length - 1))));
|
|
141
141
|
}
|
|
142
142
|
render() {
|
|
143
|
-
return (index.h(showHideButton.ResultChildrenGuard, { key: '
|
|
143
|
+
return (index.h(showHideButton.ResultChildrenGuard, { key: '5edced5861dc337703495a9bac6915cae2b4ed3d', inheritTemplates: this.inheritTemplates, resultTemplateRegistered: this.resultTemplateRegistered, templateHasError: this.templateHasError }, this.collection ? this.renderCollection() : this.renderFoldedResult()));
|
|
144
144
|
}
|
|
145
145
|
get host() { return index.getElement(this); }
|
|
146
146
|
};
|