@salesforcedevs/dw-components 1.28.2-lwr → 1.28.2-new-content-type-alpha
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 +28 -29
- package/src/modules/dw/docsGrid/docsGrid.html +4 -23
- package/src/modules/dw/docsGrid/docsGrid.ts +9 -7
- package/LICENSE +0 -12
package/package.json
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
2
|
+
"name": "@salesforcedevs/dw-components",
|
|
3
|
+
"version": "1.28.2-new-content-type-alpha",
|
|
4
|
+
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "22.x"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@types/youtube-player": "5.5.11",
|
|
14
|
+
"classnames": "2.5.1",
|
|
15
|
+
"lodash.clonedeep": "4.5.0",
|
|
16
|
+
"lodash.orderby": "4.6.0",
|
|
17
|
+
"lodash.uniqby": "4.7.0",
|
|
18
|
+
"query-string": "7.1.3",
|
|
19
|
+
"youtube-player": "5.6.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/classnames": "2.3.1",
|
|
23
|
+
"@types/lodash.clonedeep": "4.5.9",
|
|
24
|
+
"@types/lodash.orderby": "4.6.9",
|
|
25
|
+
"@types/lodash.uniqby": "4.7.9",
|
|
26
|
+
"@types/setimmediate": "1.0.4",
|
|
27
|
+
"setimmediate": "1.0.5"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -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
|
}
|
|
@@ -696,7 +694,11 @@ export default class DocsGrid extends LightningElement {
|
|
|
696
694
|
}
|
|
697
695
|
};
|
|
698
696
|
|
|
699
|
-
|
|
697
|
+
handleDitaCardClick(e: any) {
|
|
698
|
+
if (e?.currentTarget?.dataset?.isDita !== "true") {
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
|
|
700
702
|
this.filteredItemsSelected = true;
|
|
701
703
|
this.selectedProductFilters?.forEach((filter) => {
|
|
702
704
|
track(document, "custEv_filterApplied", {
|
package/LICENSE
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2020, Salesforce.com, Inc.
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
-
|
|
8
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
-
|
|
10
|
-
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
-
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|