@salesforcedevs/dw-components 1.28.5-node22-1 → 1.29.1-new-brand
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.29.1-new-brand",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -25,5 +25,6 @@
|
|
|
25
25
|
"@types/lodash.uniqby": "4.7.9",
|
|
26
26
|
"@types/setimmediate": "1.0.4",
|
|
27
27
|
"setimmediate": "1.0.5"
|
|
28
|
-
}
|
|
28
|
+
},
|
|
29
|
+
"stableVersion": "1.29.1"
|
|
29
30
|
}
|
|
@@ -43,34 +43,15 @@
|
|
|
43
43
|
<dx-card-docs
|
|
44
44
|
for:each={currentPageDocs}
|
|
45
45
|
for:item="item"
|
|
46
|
-
for:index="i"
|
|
47
46
|
key={item.id}
|
|
48
47
|
header={item.title}
|
|
49
48
|
body={item.description}
|
|
50
|
-
href={item.
|
|
49
|
+
href={item.projectHref}
|
|
51
50
|
class="docs-card"
|
|
52
51
|
target={item.target}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
href={item.guidesHref}
|
|
57
|
-
onclick={handleReadItClick}
|
|
58
|
-
if:false={item.links}
|
|
59
|
-
>
|
|
60
|
-
Read It
|
|
61
|
-
</dx-button>
|
|
62
|
-
<template if:true={item.links}>
|
|
63
|
-
<dx-button
|
|
64
|
-
for:each={item.links}
|
|
65
|
-
for:item="link"
|
|
66
|
-
key={link.id}
|
|
67
|
-
href={link.href}
|
|
68
|
-
variant="inline"
|
|
69
|
-
>
|
|
70
|
-
{ link.title }
|
|
71
|
-
</dx-button>
|
|
72
|
-
</template>
|
|
73
|
-
</dx-card-docs>
|
|
52
|
+
data-is-dita={item.isDita}
|
|
53
|
+
onclick={handleDitaCardClick}
|
|
54
|
+
></dx-card-docs>
|
|
74
55
|
</dx-grid>
|
|
75
56
|
<div class="pagination-container" if:false={showEmptyState}>
|
|
76
57
|
<dx-pagination
|
|
@@ -182,15 +182,12 @@ export default class DocsGrid extends LightningElement {
|
|
|
182
182
|
|
|
183
183
|
for (const docs of allDocs) {
|
|
184
184
|
for (const project of docs.projects) {
|
|
185
|
-
const firstLink = project.contentTypes[0].href;
|
|
186
|
-
|
|
187
185
|
transformed.push({
|
|
188
186
|
id: project.id,
|
|
189
187
|
title: project.title,
|
|
190
188
|
description: project.description,
|
|
191
|
-
links: project.contentTypes,
|
|
192
189
|
service: project.meta.brand,
|
|
193
|
-
|
|
190
|
+
projectHref: project.contentTypes[0].href,
|
|
194
191
|
locale: docs.locale || "en-us"
|
|
195
192
|
});
|
|
196
193
|
}
|
|
@@ -463,13 +460,14 @@ export default class DocsGrid extends LightningElement {
|
|
|
463
460
|
id: content.id,
|
|
464
461
|
title: content.value.title,
|
|
465
462
|
description: content.value.shortdesc,
|
|
466
|
-
|
|
463
|
+
projectHref: content
|
|
467
464
|
? "/docs/" +
|
|
468
465
|
content.value._id +
|
|
469
466
|
"/" +
|
|
470
467
|
content.value.default_topic
|
|
471
468
|
: "",
|
|
472
|
-
service: content.value.service
|
|
469
|
+
service: content.value.service,
|
|
470
|
+
isDita: true
|
|
473
471
|
});
|
|
474
472
|
}
|
|
475
473
|
}
|
|
@@ -484,7 +482,12 @@ export default class DocsGrid extends LightningElement {
|
|
|
484
482
|
|
|
485
483
|
normalizeProductFilter(val: string): Filter {
|
|
486
484
|
return {
|
|
487
|
-
label:
|
|
485
|
+
label:
|
|
486
|
+
val === "ai"
|
|
487
|
+
? "AI"
|
|
488
|
+
: (val || "")
|
|
489
|
+
.replace(/[-_]/g, " ")
|
|
490
|
+
.replace(/\b\w/g, (c) => c.toUpperCase()),
|
|
488
491
|
value: val && val.toLowerCase()
|
|
489
492
|
};
|
|
490
493
|
}
|
|
@@ -696,7 +699,11 @@ export default class DocsGrid extends LightningElement {
|
|
|
696
699
|
}
|
|
697
700
|
};
|
|
698
701
|
|
|
699
|
-
|
|
702
|
+
handleDitaCardClick(e: any) {
|
|
703
|
+
if (e?.currentTarget?.dataset?.isDita !== "true") {
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
|
|
700
707
|
this.filteredItemsSelected = true;
|
|
701
708
|
this.selectedProductFilters?.forEach((filter) => {
|
|
702
709
|
track(document, "custEv_filterApplied", {
|