@salesforcedevs/dx-components 1.3.37-alpha02 → 1.3.37-alpha04

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/package.json CHANGED
@@ -1,41 +1,41 @@
1
1
  {
2
- "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.37-alpha02",
4
- "description": "DX Lightning web components",
5
- "license": "MIT",
6
- "engines": {
7
- "node": ">= 14.x"
8
- },
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "dependencies": {
13
- "@coveo/headless": "^1.32.0",
14
- "@floating-ui/dom": "^1.0.4",
15
- "@sfdocs-internal/wires": "^0.6.3",
16
- "@vimeo/player": "^2.16.4",
17
- "classnames": "^2.2.6",
18
- "coveo-search-ui": "^2.10104.0",
19
- "debounce": "^1.2.0",
20
- "js-cookie": "^3.0.1",
21
- "lodash.defaults": "^4.2.0",
22
- "lodash.get": "^4.4.2",
23
- "lodash.kebabcase": "^4.1.1",
24
- "microtip": "0.2.2",
25
- "salesforce-oauth2": "^0.2.0",
26
- "uuid": "^9.0.0"
27
- },
28
- "devDependencies": {
29
- "@types/classnames": "^2.2.10",
30
- "@types/debounce": "^1.2.0",
31
- "@types/js-cookie": "^3.0.2",
32
- "@types/lodash.defaults": "^4.2.7",
33
- "@types/lodash.get": "^4.4.6",
34
- "@types/lodash.kebabcase": "^4.1.7",
35
- "@types/luxon": "^3.1.0",
36
- "@types/uuid": "^8.3.4",
37
- "@types/vimeo__player": "^2.16.2",
38
- "eventsourcemock": "^2.0.0",
39
- "luxon": "^3.1.0"
40
- }
2
+ "name": "@salesforcedevs/dx-components",
3
+ "version": "1.3.37-alpha04",
4
+ "description": "DX Lightning web components",
5
+ "license": "MIT",
6
+ "engines": {
7
+ "node": ">= 14.x"
8
+ },
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "dependencies": {
13
+ "@coveo/headless": "^1.32.0",
14
+ "@floating-ui/dom": "^1.0.4",
15
+ "@sfdocs-internal/wires": "^0.6.3",
16
+ "@vimeo/player": "^2.16.4",
17
+ "classnames": "^2.2.6",
18
+ "coveo-search-ui": "^2.10104.0",
19
+ "debounce": "^1.2.0",
20
+ "js-cookie": "^3.0.1",
21
+ "lodash.defaults": "^4.2.0",
22
+ "lodash.get": "^4.4.2",
23
+ "lodash.kebabcase": "^4.1.1",
24
+ "microtip": "0.2.2",
25
+ "salesforce-oauth2": "^0.2.0",
26
+ "uuid": "^9.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@types/classnames": "^2.2.10",
30
+ "@types/debounce": "^1.2.0",
31
+ "@types/js-cookie": "^3.0.2",
32
+ "@types/lodash.defaults": "^4.2.7",
33
+ "@types/lodash.get": "^4.4.6",
34
+ "@types/lodash.kebabcase": "^4.1.7",
35
+ "@types/luxon": "^3.1.0",
36
+ "@types/uuid": "^8.3.4",
37
+ "@types/vimeo__player": "^2.16.2",
38
+ "eventsourcemock": "^2.0.0",
39
+ "luxon": "^3.1.0"
40
+ }
41
41
  }
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  Code generated by scripts/postinstall.js DO NOT EDIT
3
- *//*
3
+ */
4
+
5
+ /*
4
6
  * @param direction vertical or horizontal
5
7
  * @param position type of positioning to apply (relative/absolute)
6
8
  */
@@ -1376,6 +1378,15 @@ Code generated by scripts/postinstall.js DO NOT EDIT
1376
1378
  .coveo-filetype-salesforce-standard-work-order-item,
1377
1379
  .coveo-filetype-salesforce-standard-work-order,
1378
1380
  .coveo-filetype-salesforce-standard-work-type,
1381
+ .coveo-filetype-slack,
1382
+ .coveo-icon.filetype.Slackmessage,
1383
+ .coveo-icon.filetype.slackmessage,
1384
+ .coveo-icon.filetype.Slackchannel,
1385
+ .coveo-icon.filetype.slackchannel,
1386
+ .coveo-icon.filetype.Slackfile,
1387
+ .coveo-icon.filetype.slackfile,
1388
+ .coveo-icon.filetype.Slackuser,
1389
+ .coveo-icon.filetype.slackuser,
1379
1390
  .coveo-filetype-user,
1380
1391
  .coveo-icon.objecttype.People,
1381
1392
  .coveo-icon.objecttype.people,
@@ -1584,21 +1595,6 @@ Code generated by scripts/postinstall.js DO NOT EDIT
1584
1595
  background-size: 56px 64px;
1585
1596
  }
1586
1597
 
1587
- .coveo-filetype-slack,
1588
- .coveo-icon.filetype.Slackmessage,
1589
- .coveo-icon.filetype.slackmessage,
1590
- .coveo-icon.filetype.Slackchannel,
1591
- .coveo-icon.filetype.slackchannel,
1592
- .coveo-icon.filetype.Slackfile,
1593
- .coveo-icon.filetype.slackfile,
1594
- .coveo-icon.filetype.Slackuser,
1595
- .coveo-icon.filetype.slackuser {
1596
- display: inline-block;
1597
- width: 124px;
1598
- height: 124px;
1599
- background-size: 124px 124px;
1600
- }
1601
-
1602
1598
  .coveo-filetype-attachment-small,
1603
1599
  .coveo-icon.objecttype.coveo-small.Attachment,
1604
1600
  .coveo-icon.objecttype.coveo-small.attachment,
@@ -2124,6 +2120,15 @@ Code generated by scripts/postinstall.js DO NOT EDIT
2124
2120
  .coveo-filetype-salesforce-standard-work-order-item-small,
2125
2121
  .coveo-filetype-salesforce-standard-work-order-small,
2126
2122
  .coveo-filetype-salesforce-standard-work-type-small,
2123
+ .coveo-filetype-slack-small,
2124
+ .coveo-icon.filetype.coveo-small.Slackmessage,
2125
+ .coveo-icon.filetype.coveo-small.slackmessage,
2126
+ .coveo-icon.filetype.coveo-small.Slackchannel,
2127
+ .coveo-icon.filetype.coveo-small.slackchannel,
2128
+ .coveo-icon.filetype.coveo-small.Slackfile,
2129
+ .coveo-icon.filetype.coveo-small.slackfile,
2130
+ .coveo-icon.filetype.coveo-small.Slackuser,
2131
+ .coveo-icon.filetype.coveo-small.slackuser,
2127
2132
  .coveo-filetype-user-small,
2128
2133
  .coveo-icon.objecttype.coveo-small.People,
2129
2134
  .coveo-icon.objecttype.coveo-small.people,
@@ -2332,21 +2337,6 @@ Code generated by scripts/postinstall.js DO NOT EDIT
2332
2337
  background-size: 28px 32px;
2333
2338
  }
2334
2339
 
2335
- .coveo-filetype-slack-small,
2336
- .coveo-icon.filetype.coveo-small.Slackmessage,
2337
- .coveo-icon.filetype.coveo-small.slackmessage,
2338
- .coveo-icon.filetype.coveo-small.Slackchannel,
2339
- .coveo-icon.filetype.coveo-small.slackchannel,
2340
- .coveo-icon.filetype.coveo-small.Slackfile,
2341
- .coveo-icon.filetype.coveo-small.slackfile,
2342
- .coveo-icon.filetype.coveo-small.Slackuser,
2343
- .coveo-icon.filetype.coveo-small.slackuser {
2344
- display: inline-block;
2345
- width: 62px;
2346
- height: 62px;
2347
- background-size: 62px 62px;
2348
- }
2349
-
2350
2340
  .coveo-filetype-attachment,
2351
2341
  .coveo-icon.objecttype.Attachment,
2352
2342
  .coveo-icon.objecttype.attachment,
@@ -8065,6 +8055,13 @@ select.coveo-dropdown::-ms-expand {
8065
8055
  * @param $size size of the icon to use
8066
8056
  */
8067
8057
 
8058
+ @font-face {
8059
+ font-family: 'Lato';
8060
+ src: url('https://static.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff2'), url('https://staticdev.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff2'), url('../fonts/lato.woff2'), url('https://static.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff'), url('https://staticdev.cloud.coveo.com/searchui/v2.10104/0/fonts/lato.woff'), url('../fonts/lato.woff');
8061
+ font-weight: normal;
8062
+ font-style: normal;
8063
+ }
8064
+
8068
8065
  .CoveoSearchInterface {
8069
8066
  min-height: 100%;
8070
8067
  position: relative;
@@ -18738,6 +18735,10 @@ button.coveo-user-feedback-banner-explain-why-active {
18738
18735
  * @param $size size of the icon to use
18739
18736
  */
18740
18737
 
18738
+ .coveo-user-explanation-modal .coveo-small-close {
18739
+ display: none;
18740
+ }
18741
+
18741
18742
  .coveo-user-explanation-modal-explanation-section {
18742
18743
  display: flex;
18743
18744
  flex-wrap: wrap;
@@ -94,7 +94,7 @@
94
94
  <dx-pagination
95
95
  current-page={currentPage}
96
96
  total-pages={totalPages}
97
- onpagechange={goToPage}
97
+ onpagechange={onPageChange}
98
98
  pages-to-show="5"
99
99
  ></dx-pagination>
100
100
  </div>
@@ -110,11 +110,16 @@ export default class SearchResults extends LightningElement {
110
110
  private currentPage: number = 1;
111
111
  private totalPages: number = 1;
112
112
 
113
- private goToPage(e: CustomEvent) {
113
+ private onPageChange(e: CustomEvent) {
114
+ // go to the page
114
115
  const page = e.detail;
115
- const Pager = Coveo.get(this.root!.querySelector(".CoveoPager") as HTMLElement) as any;
116
+ const Pager = Coveo.get(
117
+ this.root!.querySelector(".CoveoPager") as HTMLElement
118
+ ) as any;
116
119
  Pager.setPage(page);
117
120
  this.currentPage = page;
121
+
122
+ setTimeout(this.appendTypeBadges, 0);
118
123
  }
119
124
 
120
125
  private dismissFiltersOverlay = () => {
@@ -125,18 +130,23 @@ export default class SearchResults extends LightningElement {
125
130
  };
126
131
 
127
132
  private attachListeners(root: HTMLElement) {
128
- Coveo.$$(root).on(Coveo.InitializationEvents.afterInitialization, () => {
129
- if (this._query !== "") {
130
- Coveo.state(this.root!, "q", this.searchQuery);
133
+ Coveo.$$(root).on(
134
+ Coveo.InitializationEvents.afterInitialization,
135
+ () => {
136
+ if (this._query !== "") {
137
+ Coveo.state(this.root!, "q", this.searchQuery);
138
+ }
139
+ if (Coveo.state(this.root!, "q") === "") {
140
+ Coveo.state(this.root!, "sort", "date descending");
141
+ }
142
+ this.isInitialized = true;
131
143
  }
132
- if (Coveo.state(this.root!, "q") === "") {
133
- Coveo.state(this.root!, "sort", "date descending");
134
- }
135
- this.isInitialized = true;
136
- });
144
+ );
137
145
 
138
146
  Coveo.$$(root).on(Coveo.QueryEvents.querySuccess, (event: any) => {
139
- const { currentPage, numberOfPages } = getPaginationState(event.detail);
147
+ const { currentPage, numberOfPages } = getPaginationState(
148
+ event.detail
149
+ );
140
150
  this.currentPage = currentPage;
141
151
  this.totalPages = numberOfPages;
142
152
  this.totalResults = event.detail.results.totalCount;
@@ -164,17 +174,27 @@ export default class SearchResults extends LightningElement {
164
174
 
165
175
  this.attachListeners(this.root);
166
176
 
167
- let variantValue = "";
177
+ Coveo.TemplateHelpers.registerTemplateHelper(
178
+ "badge",
179
+ (value: string) => `<div class="type-badge-shell ${value}"></div>`
180
+ );
168
181
 
169
- Coveo.TemplateHelpers.registerTemplateHelper("badge", (value: string) => {
170
- variantValue = value;
171
- });
182
+ Coveo.init(this.root);
183
+ }
172
184
 
173
- const typeBadgeEl = document.createElement("dx-type-badge");
174
- typeBadgeEl.setAttribute("variant", variantValue);
175
- this.template.querySelector(".CoveoFieldValue");
185
+ appendTypeBadges = () => {
186
+ this.template.querySelectorAll(".type-badge-shell")?.forEach((el) => {
187
+ el.classList.remove("type-badge-shell");
188
+ el.classList.forEach((cl) => {
189
+ const typeBadge = document.createElement("dx-type-badge");
190
+ typeBadge.setAttribute("variant", cl);
191
+ el.appendChild(typeBadge);
192
+ });
193
+ });
194
+ };
176
195
 
177
- Coveo.init(this.root);
196
+ connectedCallback(): void {
197
+ setInterval(this.appendTypeBadges, 60);
178
198
  }
179
199
 
180
200
  renderedCallback() {