@salesforcedevs/dw-components 1.28.2-action-link → 1.28.2-lwr
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/LICENSE +12 -0
- package/package.json +29 -29
- package/src/modules/dw/docsGrid/docsGrid.ts +2 -12
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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.
|
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
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-lwr",
|
|
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
|
+
"gitHead": "956930d90ebb6b2cc4fcc2c33b11199a28f1407a"
|
|
30
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { api, LightningElement } from "lwc";
|
|
2
2
|
import { normalizeBoolean, toJson } from "dxUtils/normalizers";
|
|
3
|
-
import {
|
|
3
|
+
import { DocsTile, DropdownItem, Language } from "typings/custom";
|
|
4
4
|
import qs from "query-string";
|
|
5
5
|
import uniqBy from "lodash.uniqby";
|
|
6
6
|
import orderBy from "lodash.orderby";
|
|
@@ -16,7 +16,6 @@ const DSC_API_URL = {
|
|
|
16
16
|
const PRODUCT_FILTER_ALL_SERVICES = "all services";
|
|
17
17
|
const LANGUAGE_FILTER_LABEL = "Language";
|
|
18
18
|
const WAIT_TIME = 500;
|
|
19
|
-
const DOCS_CONTENT_TYPE = "docs";
|
|
20
19
|
|
|
21
20
|
type Filter = {
|
|
22
21
|
label: string;
|
|
@@ -30,12 +29,6 @@ type SearchParams = {
|
|
|
30
29
|
page?: any;
|
|
31
30
|
};
|
|
32
31
|
|
|
33
|
-
function isDocsContentType(project: any): boolean {
|
|
34
|
-
return !!project.contentTypes?.some(
|
|
35
|
-
(contentType: DocsLink) => contentType.contentType === DOCS_CONTENT_TYPE
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
32
|
export default class DocsGrid extends LightningElement {
|
|
40
33
|
searchTerm = "";
|
|
41
34
|
selectedProductFilters: string[] | null = null;
|
|
@@ -190,15 +183,12 @@ export default class DocsGrid extends LightningElement {
|
|
|
190
183
|
for (const docs of allDocs) {
|
|
191
184
|
for (const project of docs.projects) {
|
|
192
185
|
const firstLink = project.contentTypes[0].href;
|
|
193
|
-
const links = isDocsContentType(project)
|
|
194
|
-
? []
|
|
195
|
-
: project.contentTypes;
|
|
196
186
|
|
|
197
187
|
transformed.push({
|
|
198
188
|
id: project.id,
|
|
199
189
|
title: project.title,
|
|
200
190
|
description: project.description,
|
|
201
|
-
links,
|
|
191
|
+
links: project.contentTypes,
|
|
202
192
|
service: project.meta.brand,
|
|
203
193
|
guidesHref: firstLink,
|
|
204
194
|
locale: docs.locale || "en-us"
|