@salesforcedevs/dw-components 1.3.206 → 1.3.211
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 +2 -2
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.html +3 -0
- package/src/modules/dw/codeSamplesGrid/codeSamplesGrid.ts +14 -3
- package/src/modules/dw/contentArchive/contentArchive.html +8 -6
- package/src/modules/dw/contentArchive/contentArchive.ts +15 -4
- package/src/modules/dw/docsGrid/docsGrid.html +3 -0
- package/src/modules/dw/docsGrid/docsGrid.ts +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.211",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/setimmediate": "^1.0.2",
|
|
25
25
|
"setimmediate": "^1.0.5"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "868580e697a07798c02537d4bd3cab7530127812"
|
|
28
28
|
}
|
|
@@ -131,8 +131,11 @@
|
|
|
131
131
|
></dx-pagination>
|
|
132
132
|
</div>
|
|
133
133
|
<dx-empty-state
|
|
134
|
+
variant="alt"
|
|
134
135
|
title="Beep boop. That did not compute."
|
|
135
136
|
subtitle={emptyStateSubtitle}
|
|
137
|
+
body={emptyStateBody}
|
|
138
|
+
suggestions={emptyStateSuggestions}
|
|
136
139
|
if:true={showEmptyState}
|
|
137
140
|
></dx-empty-state>
|
|
138
141
|
</dx-section>
|
|
@@ -261,13 +261,24 @@ export default class CodeSamplesGrid extends LightningElement {
|
|
|
261
261
|
return this.totalPages < 2;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
get emptyStateSubtitle()
|
|
264
|
+
get emptyStateSubtitle() {
|
|
265
265
|
return (
|
|
266
|
-
"
|
|
267
|
-
(this.searchTerm !== "" ? `
|
|
266
|
+
"Sorry, no results were found for your search" +
|
|
267
|
+
(this.searchTerm !== "" ? ` "${this.searchTerm}"` : "")
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
get emptyStateBody() {
|
|
272
|
+
return "Search Tips:";
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
get emptyStateSuggestions() {
|
|
276
|
+
return JSON.stringify([
|
|
277
|
+
"Please consider misspellings",
|
|
278
|
+
"Try different search keywords"
|
|
279
|
+
]);
|
|
280
|
+
}
|
|
281
|
+
|
|
271
282
|
handleView = (e: MediaQueryListEvent | MediaQueryList): void => {
|
|
272
283
|
if (e.media === this.isDesktop && e.matches) {
|
|
273
284
|
this.deviceType = "desktop";
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
</template>
|
|
246
246
|
</div>
|
|
247
247
|
<h3 class="results-heading" if:false={loading}>{resultsHeading}</h3>
|
|
248
|
-
<hr />
|
|
248
|
+
<hr if:false={isEmptyState} />
|
|
249
249
|
<template if:true={loading}>
|
|
250
250
|
<template if:false={modalOpen}>
|
|
251
251
|
<div class="spinner-container">
|
|
@@ -328,11 +328,13 @@
|
|
|
328
328
|
</template>
|
|
329
329
|
</template>
|
|
330
330
|
<template if:true={isEmptyState}>
|
|
331
|
-
<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
331
|
+
<dx-empty-state
|
|
332
|
+
variant="alt"
|
|
333
|
+
title="Beep boop. That did not compute."
|
|
334
|
+
subtitle={emptyStateSubtitle}
|
|
335
|
+
body={emptyStateBody}
|
|
336
|
+
suggestions={emptyStateSuggestions}
|
|
337
|
+
></dx-empty-state>
|
|
336
338
|
</template>
|
|
337
339
|
</div>
|
|
338
340
|
</div>
|
|
@@ -56,6 +56,18 @@ export default class ContentArchive extends LightningElement {
|
|
|
56
56
|
return this.totalResults === 0 && !this.loading;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
get emptyStateSubtitle() {
|
|
60
|
+
return "Sorry, no results were found for your search";
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
get emptyStateBody() {
|
|
64
|
+
return "Search Tips:";
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get emptyStateSuggestions() {
|
|
68
|
+
return JSON.stringify(["Try a different filter selection"]);
|
|
69
|
+
}
|
|
70
|
+
|
|
59
71
|
get currentPageLength() {
|
|
60
72
|
if (this.loading) {
|
|
61
73
|
return "Loading Results...";
|
|
@@ -78,7 +90,7 @@ export default class ContentArchive extends LightningElement {
|
|
|
78
90
|
if (this.currentPage !== 1) {
|
|
79
91
|
pageInfo = `- Page ${this.currentPage}`;
|
|
80
92
|
}
|
|
81
|
-
return this.totalResults ? `Archive Results ${pageInfo}` : "
|
|
93
|
+
return this.totalResults ? `Archive Results ${pageInfo}` : "";
|
|
82
94
|
}
|
|
83
95
|
|
|
84
96
|
get spinnerSize() {
|
|
@@ -258,9 +270,8 @@ export default class ContentArchive extends LightningElement {
|
|
|
258
270
|
}
|
|
259
271
|
|
|
260
272
|
private async updateCheckedStatus() {
|
|
261
|
-
const filterMenuElements =
|
|
262
|
-
"dx-filter-menu"
|
|
263
|
-
);
|
|
273
|
+
const filterMenuElements =
|
|
274
|
+
this.template.querySelectorAll("dx-filter-menu");
|
|
264
275
|
|
|
265
276
|
filterMenuElements.forEach((filterMenuElement: any) =>
|
|
266
277
|
filterMenuElement.updateCheckedStatus(this.selectedFilterMenuData)
|
|
@@ -83,8 +83,11 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
85
85
|
<dx-empty-state
|
|
86
|
+
variant="alt"
|
|
86
87
|
title="Beep boop. That did not compute."
|
|
87
88
|
subtitle={emptyStateSubtitle}
|
|
89
|
+
body={emptyStateBody}
|
|
90
|
+
suggestions={emptyStateSuggestions}
|
|
88
91
|
if:true={showEmptyState}
|
|
89
92
|
></dx-empty-state>
|
|
90
93
|
</template>
|
|
@@ -11,6 +11,7 @@ const DSC_API_URL = {
|
|
|
11
11
|
"en-us": "/docs/get_index/en-us/000.0/false/All%20Services/all",
|
|
12
12
|
"ja-jp": "/docs/get_index/ja-jp/000.0/false/All%20Services/all"
|
|
13
13
|
};
|
|
14
|
+
|
|
14
15
|
const PRODUCT_FILTER_ALL_SERVICES = "all services";
|
|
15
16
|
const LANGUAGE_FILTER_LABEL = "Language";
|
|
16
17
|
const WAIT_TIME = 500;
|
|
@@ -259,11 +260,22 @@ export default class DocsGrid extends LightningElement {
|
|
|
259
260
|
|
|
260
261
|
get emptyStateSubtitle() {
|
|
261
262
|
return (
|
|
262
|
-
"
|
|
263
|
-
(this.searchTerm !== "" ? `
|
|
263
|
+
"Sorry, no results were found for your search" +
|
|
264
|
+
(this.searchTerm !== "" ? ` "${this.searchTerm}"` : "")
|
|
264
265
|
);
|
|
265
266
|
}
|
|
266
267
|
|
|
268
|
+
get emptyStateBody() {
|
|
269
|
+
return "Search Tips:";
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
get emptyStateSuggestions() {
|
|
273
|
+
return JSON.stringify([
|
|
274
|
+
"Please consider misspellings",
|
|
275
|
+
"Try different search keywords"
|
|
276
|
+
]);
|
|
277
|
+
}
|
|
278
|
+
|
|
267
279
|
getOtherDocsForSelectedLocale() {
|
|
268
280
|
const docsForLocale = this._otherDocs!.filter(
|
|
269
281
|
(doc) => doc.locale === this.selectedLanguageFilter
|