@coveops/abi 1.0.7 → 1.1.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.
@@ -9,8 +9,8 @@ async function main() {
9
9
  const searchBox = document.querySelector("#searchbox");
10
10
  searchBox && initStandaloneSearchBox(searchBox);
11
11
  // const platformUrl = "https://platform.cloud.coveo.com"!;
12
- // const organizationId = "anheuserbuschinbevprod"!;
13
- // const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90"!;
12
+ // const organizationId = "anheuserbuschinbevkmnonprod"!;
13
+ // const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa"!;
14
14
  // await searchInterface.initialize({
15
15
  // accessToken,
16
16
  // organizationId,
@@ -61,8 +61,8 @@ async function main() {
61
61
  }
62
62
  async function initStandaloneSearchBox(searchBox) {
63
63
  const platformUrl = "https://platform.cloud.coveo.com";
64
- const organizationId = "anheuserbuschinbevprod";
65
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
64
+ const organizationId = "anheuserbuschinbevkmnonprod";
65
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
66
66
  await searchBox.initialize({
67
67
  accessToken,
68
68
  organizationId,
@@ -90,8 +90,8 @@ async function initStandaloneSearchBox(searchBox) {
90
90
  }
91
91
  async function initSearch(searchInterface) {
92
92
  const platformUrl = "https://platform.cloud.coveo.com";
93
- const organizationId = "anheuserbuschinbevprod";
94
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
93
+ const organizationId = "anheuserbuschinbevkmnonprod";
94
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
95
95
  await searchInterface.initialize({
96
96
  accessToken,
97
97
  organizationId,
@@ -111,8 +111,8 @@ async function initSearch(searchInterface) {
111
111
  searchInterface.executeFirstSearch();
112
112
  }
113
113
  async function initRecs() {
114
- const organizationId = "anheuserbuschinbevprod";
115
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
114
+ const organizationId = "anheuserbuschinbevkmnonprod";
115
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
116
116
  const recsInterface = document.querySelector('#recs');
117
117
  await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
118
118
  accessToken: accessToken,
@@ -25,6 +25,8 @@ const DocumentsTemplate = "<style>\n /* .field {\n display: inline-flex;\n
25
25
 
26
26
  const MediaTemplate = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n atomic-result-section-excerpt {\n font-size: 1.3rem !important;\n margin-top: 0.875rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n font-size: 1rem !important;\n color: #A6A6A6 !important;\n }\n\n atomic-result-section-bottom-metadata a {\n color: #A6A6A6 !important;\n }\n\n\n atomic-result-section-title a {\n color: #CAA144 !important;\n font-size: 1.7rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-title a:visited {\n color: black !important;\n }\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n justify-content: center;\n\n }\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n color: #A6A6A6 !important;\n font-size: 1rem !important;\n margin-right: 3px;\n line-height: 18px !important;\n display: grid;\n grid-template-columns: auto auto auto;\n gap: 1rem;\n align-items: center;\n }\n\n atomic-result-date{\n font-size:1.0rem;\n }\n</style>\n\n<atomic-result-section-visual>\n <atomic-field-condition class=\"field\" must-match-filetype=\"mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg\">\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Movies.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <img src=\"https://abiglobal--c.vf.force.com/resource/PP_Coveo/img/Movies.png\" class=\"thumbnail\"> -->\n </atomic-field-condition>\n <atomic-field-condition class=\"field\" must-match-filetype=\"gif,jpeg,jpg,png,bmp,Image\">\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Images.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <img src=\"https://abiglobal--c.vf.force.com/resource/PP_Coveo/img/Images.png\" class=\"thumbnail\"> -->\n </atomic-field-condition>\n \n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <atomic-result-link> <a slot=\"attributes\" target=\"_blank\"></a></atomic-result-link>\n</atomic-result-section-title>\n\n\n<atomic-result-section-bottom-metadata>\n <span>\n <atomic-text value=\"Date: &nbsp;\"></atomic-text>\n <atomic-result-date></atomic-result-date>\n </span><span>\n <atomic-text value=\"Source: &nbsp;\"></atomic-text><atomic-result-text field=\"sourcetype\"></atomic-result-text>\n </span><span> <atomic-text value=\"Sharepoint: &nbsp;\"></atomic-text>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n <atomic-result-text field=\"spsitename\"></atomic-result-text>\n </atomic-result-link>\n </span>\n</atomic-result-section-bottom-metadata>\n";
27
27
 
28
+ const PeopleSnowTemplate = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n line-height: normal !important;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n\n atomic-result-section-bottom-metadata {\n display: grid;\n grid-template-columns: 1fr 1fr;\n font-size: 1.3rem !important;\n width: 100%;\n margin-top: 2px;\n max-height: 25rem !important;\n }\n\n atomic-result-section-title{\n color: #CAA144 !important;\n font-size: 1.7rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n }\n atomic-result-image{\n width: auto !important;\n height: auto !important;\n }\n atomic-result-image img{\n border-radius: 20% !important;\n }\n</style>\n\n<atomic-result-section-visual>\n <atomic-result-image field=\"resultpicture\"></atomic-result-image>\n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <atomic-result-link href-template=\"/cheers?id=cheers_hub_profile&sys_id=${raw.snsysid}\">\n <a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n</atomic-result-section-title>\n\n<atomic-result-section-bottom-metadata>\n\n <atomic-field-condition class=\"field\" if-defined=\"sntitle\">\n <span class=\"field-label\">\n <atomic-text value=\"Title\"></atomic-text>:\n </span>\n <atomic-result-text field=\"sntitle\"></atomic-result-text>\n </atomic-field-condition>\n <br>\n <atomic-field-condition class=\"field\" if-defined=\"snupreferredzone\">\n <span class=\"field-label\">\n <atomic-text value=\"Zone\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snupreferredzone\"></atomic-result-text>\n </atomic-field-condition>\n \n <atomic-field-condition class=\"field\" if-defined=\"snbuilding\">\n <span class=\"field-label\">\n <atomic-text value=\"OfficeLocation\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snbuilding\"></atomic-result-text>\n </atomic-field-condition>\n <atomic-field-condition class=\"field\" if-defined=\"snufunction\">\n <span class=\"field-label\">\n <atomic-text value=\"Function\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snufunction\"></atomic-result-text>\n </atomic-field-condition>\n\n <atomic-field-condition class=\"field\" if-defined=\"snemail\">\n <span class=\"field-label\">\n <atomic-text value=\"Email\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snemail\"></atomic-result-text>\n </atomic-field-condition>\n\n\n\n</atomic-result-section-bottom-metadata>\n";
29
+
28
30
  const ResultsManager = class {
29
31
  constructor(hostRef) {
30
32
  index.registerInstance(this, hostRef);
@@ -33,7 +35,7 @@ const ResultsManager = class {
33
35
  return atomic.waitForAtomic();
34
36
  }
35
37
  render() {
36
- return (index.h("atomic-result-list", null, index.h("atomic-result-template", { "must-match-filetype": 'mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg' }, index.h("template", { innerHTML: MediaTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": "Site Pages" }, index.h("template", { innerHTML: SitePagesTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": "Knowledge Article" }, index.h("template", { innerHTML: KATemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'FAQ' }, index.h("template", { innerHTML: FAQTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Quick Links' }, index.h("template", { innerHTML: QuickLinksTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Application' }, index.h("template", { innerHTML: AppTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' }, index.h("template", { innerHTML: ELearningTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'People' }, index.h("template", { innerHTML: PeopleTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Documents' }, index.h("template", { innerHTML: DocumentsTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Media' }, index.h("template", { innerHTML: MediaTemplate })), index.h("atomic-result-template", null, index.h("template", { innerHTML: template1 }))));
38
+ return (index.h("atomic-result-list", null, index.h("atomic-result-template", { "must-match-filetype": 'mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg' }, index.h("template", { innerHTML: MediaTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": "Site Pages" }, index.h("template", { innerHTML: SitePagesTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": "Knowledge Article" }, index.h("template", { innerHTML: KATemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'FAQ' }, index.h("template", { innerHTML: FAQTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Quick Links' }, index.h("template", { innerHTML: QuickLinksTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Application' }, index.h("template", { innerHTML: AppTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' }, index.h("template", { innerHTML: ELearningTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-objecttype": 'Account' }, index.h("template", { innerHTML: PeopleTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-filetype": 'sys_user' }, index.h("template", { innerHTML: PeopleSnowTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Documents' }, index.h("template", { innerHTML: DocumentsTemplate })), index.h("atomic-result-template", { "must-match-abicontenttype": 'Media' }, index.h("template", { innerHTML: MediaTemplate })), index.h("atomic-result-template", null, index.h("template", { innerHTML: template1 }))));
37
39
  }
38
40
  };
39
41
 
@@ -10,6 +10,7 @@ import ELearningTemplate from "./ELearningTemplate.html";
10
10
  import PeopleTemplate from "./PeopleTemplate.html";
11
11
  import DocumentsTemplate from "./DocumentsTemplate.html";
12
12
  import MediaTemplate from "./MediaTemplate.html";
13
+ import PeopleSnowTemplate from './PeopleSnowTemplate.html';
13
14
  /**
14
15
  * Component used to manage results & result templates.
15
16
  * See https://docs.coveo.com/en/atomic/latest/usage/create-a-result-list/
@@ -34,8 +35,10 @@ export class ResultsManager {
34
35
  h("template", { innerHTML: AppTemplate })),
35
36
  h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' },
36
37
  h("template", { innerHTML: ELearningTemplate })),
37
- h("atomic-result-template", { "must-match-abicontenttype": 'People' },
38
+ h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-objecttype": 'Account' },
38
39
  h("template", { innerHTML: PeopleTemplate })),
40
+ h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-filetype": 'sys_user' },
41
+ h("template", { innerHTML: PeopleSnowTemplate })),
39
42
  h("atomic-result-template", { "must-match-abicontenttype": 'Documents' },
40
43
  h("template", { innerHTML: DocumentsTemplate })),
41
44
  h("atomic-result-template", { "must-match-abicontenttype": 'Media' },
@@ -1052,8 +1052,8 @@ async function main() {
1052
1052
  const searchBox = document.querySelector("#searchbox");
1053
1053
  searchBox && initStandaloneSearchBox(searchBox);
1054
1054
  // const platformUrl = "https://platform.cloud.coveo.com"!;
1055
- // const organizationId = "anheuserbuschinbevprod"!;
1056
- // const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90"!;
1055
+ // const organizationId = "anheuserbuschinbevkmnonprod"!;
1056
+ // const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa"!;
1057
1057
  // await searchInterface.initialize({
1058
1058
  // accessToken,
1059
1059
  // organizationId,
@@ -1104,8 +1104,8 @@ async function main() {
1104
1104
  }
1105
1105
  async function initStandaloneSearchBox(searchBox) {
1106
1106
  const platformUrl = "https://platform.cloud.coveo.com";
1107
- const organizationId = "anheuserbuschinbevprod";
1108
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
1107
+ const organizationId = "anheuserbuschinbevkmnonprod";
1108
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
1109
1109
  await searchBox.initialize({
1110
1110
  accessToken,
1111
1111
  organizationId,
@@ -1133,8 +1133,8 @@ async function initStandaloneSearchBox(searchBox) {
1133
1133
  }
1134
1134
  async function initSearch(searchInterface) {
1135
1135
  const platformUrl = "https://platform.cloud.coveo.com";
1136
- const organizationId = "anheuserbuschinbevprod";
1137
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
1136
+ const organizationId = "anheuserbuschinbevkmnonprod";
1137
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
1138
1138
  await searchInterface.initialize({
1139
1139
  accessToken,
1140
1140
  organizationId,
@@ -1154,8 +1154,8 @@ async function initSearch(searchInterface) {
1154
1154
  searchInterface.executeFirstSearch();
1155
1155
  }
1156
1156
  async function initRecs() {
1157
- const organizationId = "anheuserbuschinbevprod";
1158
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
1157
+ const organizationId = "anheuserbuschinbevkmnonprod";
1158
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
1159
1159
  const recsInterface = document.querySelector('#recs');
1160
1160
  await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
1161
1161
  accessToken: accessToken,
@@ -3189,6 +3189,8 @@ const DocumentsTemplate = "<style>\n /* .field {\n display: inline-flex;\n
3189
3189
 
3190
3190
  const MediaTemplate = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n atomic-result-section-excerpt {\n font-size: 1.3rem !important;\n margin-top: 0.875rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n font-size: 1rem !important;\n color: #A6A6A6 !important;\n }\n\n atomic-result-section-bottom-metadata a {\n color: #A6A6A6 !important;\n }\n\n\n atomic-result-section-title a {\n color: #CAA144 !important;\n font-size: 1.7rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-title a:visited {\n color: black !important;\n }\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n justify-content: center;\n\n }\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n color: #A6A6A6 !important;\n font-size: 1rem !important;\n margin-right: 3px;\n line-height: 18px !important;\n display: grid;\n grid-template-columns: auto auto auto;\n gap: 1rem;\n align-items: center;\n }\n\n atomic-result-date{\n font-size:1.0rem;\n }\n</style>\n\n<atomic-result-section-visual>\n <atomic-field-condition class=\"field\" must-match-filetype=\"mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg\">\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Movies.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <img src=\"https://abiglobal--c.vf.force.com/resource/PP_Coveo/img/Movies.png\" class=\"thumbnail\"> -->\n </atomic-field-condition>\n <atomic-field-condition class=\"field\" must-match-filetype=\"gif,jpeg,jpg,png,bmp,Image\">\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Images.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <img src=\"https://abiglobal--c.vf.force.com/resource/PP_Coveo/img/Images.png\" class=\"thumbnail\"> -->\n </atomic-field-condition>\n \n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <atomic-result-link> <a slot=\"attributes\" target=\"_blank\"></a></atomic-result-link>\n</atomic-result-section-title>\n\n\n<atomic-result-section-bottom-metadata>\n <span>\n <atomic-text value=\"Date: &nbsp;\"></atomic-text>\n <atomic-result-date></atomic-result-date>\n </span><span>\n <atomic-text value=\"Source: &nbsp;\"></atomic-text><atomic-result-text field=\"sourcetype\"></atomic-result-text>\n </span><span> <atomic-text value=\"Sharepoint: &nbsp;\"></atomic-text>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n <atomic-result-text field=\"spsitename\"></atomic-result-text>\n </atomic-result-link>\n </span>\n</atomic-result-section-bottom-metadata>\n";
3191
3191
 
3192
+ const PeopleSnowTemplate = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n line-height: normal !important;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n\n atomic-result-section-bottom-metadata {\n display: grid;\n grid-template-columns: 1fr 1fr;\n font-size: 1.3rem !important;\n width: 100%;\n margin-top: 2px;\n max-height: 25rem !important;\n }\n\n atomic-result-section-title{\n color: #CAA144 !important;\n font-size: 1.7rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n }\n atomic-result-image{\n width: auto !important;\n height: auto !important;\n }\n atomic-result-image img{\n border-radius: 20% !important;\n }\n</style>\n\n<atomic-result-section-visual>\n <atomic-result-image field=\"resultpicture\"></atomic-result-image>\n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <atomic-result-link href-template=\"/cheers?id=cheers_hub_profile&sys_id=${raw.snsysid}\">\n <a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n</atomic-result-section-title>\n\n<atomic-result-section-bottom-metadata>\n\n <atomic-field-condition class=\"field\" if-defined=\"sntitle\">\n <span class=\"field-label\">\n <atomic-text value=\"Title\"></atomic-text>:\n </span>\n <atomic-result-text field=\"sntitle\"></atomic-result-text>\n </atomic-field-condition>\n <br>\n <atomic-field-condition class=\"field\" if-defined=\"snupreferredzone\">\n <span class=\"field-label\">\n <atomic-text value=\"Zone\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snupreferredzone\"></atomic-result-text>\n </atomic-field-condition>\n \n <atomic-field-condition class=\"field\" if-defined=\"snbuilding\">\n <span class=\"field-label\">\n <atomic-text value=\"OfficeLocation\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snbuilding\"></atomic-result-text>\n </atomic-field-condition>\n <atomic-field-condition class=\"field\" if-defined=\"snufunction\">\n <span class=\"field-label\">\n <atomic-text value=\"Function\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snufunction\"></atomic-result-text>\n </atomic-field-condition>\n\n <atomic-field-condition class=\"field\" if-defined=\"snemail\">\n <span class=\"field-label\">\n <atomic-text value=\"Email\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snemail\"></atomic-result-text>\n </atomic-field-condition>\n\n\n\n</atomic-result-section-bottom-metadata>\n";
3193
+
3192
3194
  const ResultsManager$1 = class extends H {
3193
3195
  constructor() {
3194
3196
  super();
@@ -3198,7 +3200,7 @@ const ResultsManager$1 = class extends H {
3198
3200
  return waitForAtomic();
3199
3201
  }
3200
3202
  render() {
3201
- return (h("atomic-result-list", null, h("atomic-result-template", { "must-match-filetype": 'mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Site Pages" }, h("template", { innerHTML: SitePagesTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Knowledge Article" }, h("template", { innerHTML: KATemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'FAQ' }, h("template", { innerHTML: FAQTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Quick Links' }, h("template", { innerHTML: QuickLinksTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Application' }, h("template", { innerHTML: AppTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' }, h("template", { innerHTML: ELearningTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'People' }, h("template", { innerHTML: PeopleTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Documents' }, h("template", { innerHTML: DocumentsTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Media' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", null, h("template", { innerHTML: template1 }))));
3203
+ return (h("atomic-result-list", null, h("atomic-result-template", { "must-match-filetype": 'mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Site Pages" }, h("template", { innerHTML: SitePagesTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Knowledge Article" }, h("template", { innerHTML: KATemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'FAQ' }, h("template", { innerHTML: FAQTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Quick Links' }, h("template", { innerHTML: QuickLinksTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Application' }, h("template", { innerHTML: AppTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' }, h("template", { innerHTML: ELearningTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-objecttype": 'Account' }, h("template", { innerHTML: PeopleTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-filetype": 'sys_user' }, h("template", { innerHTML: PeopleSnowTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Documents' }, h("template", { innerHTML: DocumentsTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Media' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", null, h("template", { innerHTML: template1 }))));
3202
3204
  }
3203
3205
  };
3204
3206
 
package/dist/esm/index.js CHANGED
@@ -7,8 +7,8 @@ async function main() {
7
7
  const searchBox = document.querySelector("#searchbox");
8
8
  searchBox && initStandaloneSearchBox(searchBox);
9
9
  // const platformUrl = "https://platform.cloud.coveo.com"!;
10
- // const organizationId = "anheuserbuschinbevprod"!;
11
- // const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90"!;
10
+ // const organizationId = "anheuserbuschinbevkmnonprod"!;
11
+ // const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa"!;
12
12
  // await searchInterface.initialize({
13
13
  // accessToken,
14
14
  // organizationId,
@@ -59,8 +59,8 @@ async function main() {
59
59
  }
60
60
  async function initStandaloneSearchBox(searchBox) {
61
61
  const platformUrl = "https://platform.cloud.coveo.com";
62
- const organizationId = "anheuserbuschinbevprod";
63
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
62
+ const organizationId = "anheuserbuschinbevkmnonprod";
63
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
64
64
  await searchBox.initialize({
65
65
  accessToken,
66
66
  organizationId,
@@ -88,8 +88,8 @@ async function initStandaloneSearchBox(searchBox) {
88
88
  }
89
89
  async function initSearch(searchInterface) {
90
90
  const platformUrl = "https://platform.cloud.coveo.com";
91
- const organizationId = "anheuserbuschinbevprod";
92
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
91
+ const organizationId = "anheuserbuschinbevkmnonprod";
92
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
93
93
  await searchInterface.initialize({
94
94
  accessToken,
95
95
  organizationId,
@@ -109,8 +109,8 @@ async function initSearch(searchInterface) {
109
109
  searchInterface.executeFirstSearch();
110
110
  }
111
111
  async function initRecs() {
112
- const organizationId = "anheuserbuschinbevprod";
113
- const accessToken = "xa80ebf41-0b5a-4386-a423-d465a2b38f90";
112
+ const organizationId = "anheuserbuschinbevkmnonprod";
113
+ const accessToken = "x2242b5a3-4f36-44f9-99c7-074b09a262fa";
114
114
  const recsInterface = document.querySelector('#recs');
115
115
  await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
116
116
  accessToken: accessToken,
@@ -21,6 +21,8 @@ const DocumentsTemplate = "<style>\n /* .field {\n display: inline-flex;\n
21
21
 
22
22
  const MediaTemplate = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n atomic-result-section-excerpt {\n font-size: 1.3rem !important;\n margin-top: 0.875rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n font-size: 1rem !important;\n color: #A6A6A6 !important;\n }\n\n atomic-result-section-bottom-metadata a {\n color: #A6A6A6 !important;\n }\n\n\n atomic-result-section-title a {\n color: #CAA144 !important;\n font-size: 1.7rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-title a:visited {\n color: black !important;\n }\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n justify-content: center;\n\n }\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n color: #A6A6A6 !important;\n font-size: 1rem !important;\n margin-right: 3px;\n line-height: 18px !important;\n display: grid;\n grid-template-columns: auto auto auto;\n gap: 1rem;\n align-items: center;\n }\n\n atomic-result-date{\n font-size:1.0rem;\n }\n</style>\n\n<atomic-result-section-visual>\n <atomic-field-condition class=\"field\" must-match-filetype=\"mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg\">\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Movies.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <img src=\"https://abiglobal--c.vf.force.com/resource/PP_Coveo/img/Movies.png\" class=\"thumbnail\"> -->\n </atomic-field-condition>\n <atomic-field-condition class=\"field\" must-match-filetype=\"gif,jpeg,jpg,png,bmp,Image\">\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Images.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <img src=\"https://abiglobal--c.vf.force.com/resource/PP_Coveo/img/Images.png\" class=\"thumbnail\"> -->\n </atomic-field-condition>\n \n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <atomic-result-link> <a slot=\"attributes\" target=\"_blank\"></a></atomic-result-link>\n</atomic-result-section-title>\n\n\n<atomic-result-section-bottom-metadata>\n <span>\n <atomic-text value=\"Date: &nbsp;\"></atomic-text>\n <atomic-result-date></atomic-result-date>\n </span><span>\n <atomic-text value=\"Source: &nbsp;\"></atomic-text><atomic-result-text field=\"sourcetype\"></atomic-result-text>\n </span><span> <atomic-text value=\"Sharepoint: &nbsp;\"></atomic-text>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n <atomic-result-text field=\"spsitename\"></atomic-result-text>\n </atomic-result-link>\n </span>\n</atomic-result-section-bottom-metadata>\n";
23
23
 
24
+ const PeopleSnowTemplate = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n line-height: normal !important;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n\n atomic-result-section-bottom-metadata {\n display: grid;\n grid-template-columns: 1fr 1fr;\n font-size: 1.3rem !important;\n width: 100%;\n margin-top: 2px;\n max-height: 25rem !important;\n }\n\n atomic-result-section-title{\n color: #CAA144 !important;\n font-size: 1.7rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n }\n atomic-result-image{\n width: auto !important;\n height: auto !important;\n }\n atomic-result-image img{\n border-radius: 20% !important;\n }\n</style>\n\n<atomic-result-section-visual>\n <atomic-result-image field=\"resultpicture\"></atomic-result-image>\n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <atomic-result-link href-template=\"/cheers?id=cheers_hub_profile&sys_id=${raw.snsysid}\">\n <a slot=\"attributes\" target=\"_blank\"></a>\n </atomic-result-link>\n</atomic-result-section-title>\n\n<atomic-result-section-bottom-metadata>\n\n <atomic-field-condition class=\"field\" if-defined=\"sntitle\">\n <span class=\"field-label\">\n <atomic-text value=\"Title\"></atomic-text>:\n </span>\n <atomic-result-text field=\"sntitle\"></atomic-result-text>\n </atomic-field-condition>\n <br>\n <atomic-field-condition class=\"field\" if-defined=\"snupreferredzone\">\n <span class=\"field-label\">\n <atomic-text value=\"Zone\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snupreferredzone\"></atomic-result-text>\n </atomic-field-condition>\n \n <atomic-field-condition class=\"field\" if-defined=\"snbuilding\">\n <span class=\"field-label\">\n <atomic-text value=\"OfficeLocation\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snbuilding\"></atomic-result-text>\n </atomic-field-condition>\n <atomic-field-condition class=\"field\" if-defined=\"snufunction\">\n <span class=\"field-label\">\n <atomic-text value=\"Function\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snufunction\"></atomic-result-text>\n </atomic-field-condition>\n\n <atomic-field-condition class=\"field\" if-defined=\"snemail\">\n <span class=\"field-label\">\n <atomic-text value=\"Email\"></atomic-text>:\n </span>\n <atomic-result-text field=\"snemail\"></atomic-result-text>\n </atomic-field-condition>\n\n\n\n</atomic-result-section-bottom-metadata>\n";
25
+
24
26
  const ResultsManager = class {
25
27
  constructor(hostRef) {
26
28
  registerInstance(this, hostRef);
@@ -29,7 +31,7 @@ const ResultsManager = class {
29
31
  return waitForAtomic();
30
32
  }
31
33
  render() {
32
- return (h("atomic-result-list", null, h("atomic-result-template", { "must-match-filetype": 'mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Site Pages" }, h("template", { innerHTML: SitePagesTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Knowledge Article" }, h("template", { innerHTML: KATemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'FAQ' }, h("template", { innerHTML: FAQTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Quick Links' }, h("template", { innerHTML: QuickLinksTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Application' }, h("template", { innerHTML: AppTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' }, h("template", { innerHTML: ELearningTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'People' }, h("template", { innerHTML: PeopleTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Documents' }, h("template", { innerHTML: DocumentsTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Media' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", null, h("template", { innerHTML: template1 }))));
34
+ return (h("atomic-result-list", null, h("atomic-result-template", { "must-match-filetype": 'mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Site Pages" }, h("template", { innerHTML: SitePagesTemplate })), h("atomic-result-template", { "must-match-abicontenttype": "Knowledge Article" }, h("template", { innerHTML: KATemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'FAQ' }, h("template", { innerHTML: FAQTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Quick Links' }, h("template", { innerHTML: QuickLinksTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Application' }, h("template", { innerHTML: AppTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'eLearning' }, h("template", { innerHTML: ELearningTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-objecttype": 'Account' }, h("template", { innerHTML: PeopleTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'People', "must-match-filetype": 'sys_user' }, h("template", { innerHTML: PeopleSnowTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Documents' }, h("template", { innerHTML: DocumentsTemplate })), h("atomic-result-template", { "must-match-abicontenttype": 'Media' }, h("template", { innerHTML: MediaTemplate })), h("atomic-result-template", null, h("template", { innerHTML: template1 }))));
33
35
  }
34
36
  };
35
37
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveops/abi",
3
3
  "description": "Abi project",
4
- "version": "1.0.7",
4
+ "version": "1.1.0",
5
5
  "private": false,
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -0,0 +1,91 @@
1
+ <style>
2
+ .field {
3
+ display: inline-flex;
4
+ align-items: center;
5
+ line-height: normal !important;
6
+ }
7
+
8
+ .field-label {
9
+ font-weight: bold;
10
+ margin-right: 0.25rem;
11
+ }
12
+
13
+ atomic-result-section-bottom-metadata {
14
+ display: grid;
15
+ grid-template-columns: 1fr 1fr;
16
+ font-size: 1.3rem !important;
17
+ width: 100%;
18
+ margin-top: 2px;
19
+ max-height: 25rem !important;
20
+ }
21
+
22
+ atomic-result-section-title{
23
+ color: #CAA144 !important;
24
+ font-size: 1.7rem !important;
25
+ max-height: unset !important;
26
+ line-height: normal !important;
27
+ }
28
+ atomic-result-section-visual {
29
+ width: 3rem !important;
30
+ height: 5rem !important;
31
+ display: grid;
32
+ align-items: center;
33
+ }
34
+ atomic-result-image{
35
+ width: auto !important;
36
+ height: auto !important;
37
+ }
38
+ atomic-result-image img{
39
+ border-radius: 20% !important;
40
+ }
41
+ </style>
42
+
43
+ <atomic-result-section-visual>
44
+ <atomic-result-image field="resultpicture"></atomic-result-image>
45
+ </atomic-result-section-visual>
46
+
47
+ <atomic-result-section-title>
48
+ <atomic-result-link href-template='/cheers?id=cheers_hub_profile&sys_id=${raw.snsysid}'>
49
+ <a slot="attributes" target="_blank"></a>
50
+ </atomic-result-link>
51
+ </atomic-result-section-title>
52
+
53
+ <atomic-result-section-bottom-metadata>
54
+
55
+ <atomic-field-condition class="field" if-defined="sntitle">
56
+ <span class="field-label">
57
+ <atomic-text value="Title"></atomic-text>:
58
+ </span>
59
+ <atomic-result-text field="sntitle"></atomic-result-text>
60
+ </atomic-field-condition>
61
+ <br>
62
+ <atomic-field-condition class="field" if-defined="snupreferredzone">
63
+ <span class="field-label">
64
+ <atomic-text value="Zone"></atomic-text>:
65
+ </span>
66
+ <atomic-result-text field="snupreferredzone"></atomic-result-text>
67
+ </atomic-field-condition>
68
+
69
+ <atomic-field-condition class="field" if-defined="snbuilding">
70
+ <span class="field-label">
71
+ <atomic-text value="OfficeLocation"></atomic-text>:
72
+ </span>
73
+ <atomic-result-text field="snbuilding"></atomic-result-text>
74
+ </atomic-field-condition>
75
+ <atomic-field-condition class="field" if-defined="snufunction">
76
+ <span class="field-label">
77
+ <atomic-text value="Function"></atomic-text>:
78
+ </span>
79
+ <atomic-result-text field="snufunction"></atomic-result-text>
80
+ </atomic-field-condition>
81
+
82
+ <atomic-field-condition class="field" if-defined="snemail">
83
+ <span class="field-label">
84
+ <atomic-text value="Email"></atomic-text>:
85
+ </span>
86
+ <atomic-result-text field="snemail"></atomic-result-text>
87
+ </atomic-field-condition>
88
+
89
+
90
+
91
+ </atomic-result-section-bottom-metadata>
@@ -10,6 +10,7 @@ import ELearningTemplate from "./ELearningTemplate.html";
10
10
  import PeopleTemplate from "./PeopleTemplate.html";
11
11
  import DocumentsTemplate from "./DocumentsTemplate.html";
12
12
  import MediaTemplate from "./MediaTemplate.html";
13
+ import PeopleSnowTemplate from './PeopleSnowTemplate.html';
13
14
  /**
14
15
  * Component used to manage results & result templates.
15
16
  * See https://docs.coveo.com/en/atomic/latest/usage/create-a-result-list/
@@ -50,9 +51,12 @@ export class ResultsManager {
50
51
  <atomic-result-template must-match-abicontenttype='eLearning'>
51
52
  <template innerHTML={ELearningTemplate}></template>
52
53
  </atomic-result-template>
53
- <atomic-result-template must-match-abicontenttype='People'>
54
+ <atomic-result-template must-match-abicontenttype='People' must-match-objecttype='Account'>
54
55
  <template innerHTML={PeopleTemplate}></template>
55
56
  </atomic-result-template>
57
+ <atomic-result-template must-match-abicontenttype='People' must-match-filetype='sys_user'>
58
+ <template innerHTML={PeopleSnowTemplate}></template>
59
+ </atomic-result-template>
56
60
  <atomic-result-template must-match-abicontenttype='Documents'>
57
61
  <template innerHTML={DocumentsTemplate}></template>
58
62
  </atomic-result-template>
@@ -55,7 +55,9 @@
55
55
  "moreinformation", "picture", "targettab", "targettemplate", "metatype", "resultimage", "sfppzonec",
56
56
  "sfppemployeeworklocationc", "sfppbusinessfunctionc", "sfpersonemail", "sfpppositontitlec", "istailoredmappingtype",
57
57
  "resultpicture", "abicontenttype", "containsattachment", "spsitename", "spsiteuri", "attachmentfilename", "parents",
58
- "sysparents", "description", "answer","newmoreinfo", "filetype","sfppcustomlinkcppdescriptionc","trainingsource","function","category","sfpersonemail","sfppbusinessfunctionc","sfppemployeeworklocationc","duration"
58
+ "sysparents", "description", "answer","newmoreinfo", "filetype","sfppcustomlinkcppdescriptionc","trainingsource","function",
59
+ "category","sfpersonemail","sfppbusinessfunctionc","sfppemployeeworklocationc","duration",
60
+ "snsysid","sntitle","snupreferredzone","snbuilding","snufunction","snemail"
59
61
  ]'><atomic-modal id="faq-modal" is-open="false">
60
62
  <div slot="header" style="display: grid;grid-template-columns: 5fr 01fr; width:100%;">
61
63
  <div class="header-title" style="padding-top:2%;">This is a title</div>
@@ -37,7 +37,7 @@
37
37
  <style>
38
38
  atomic-result-link a {
39
39
  font-size: 1.3rem;
40
- color: var(--atomic-neutral-dark);
40
+ color: #626971 !important;
41
41
  }
42
42
  </style>
43
43
  <atomic-result-section-title>