@salesforcedevs/dw-components 1.28.1 → 1.28.2-action-link-1

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,30 +1,30 @@
1
1
  {
2
- "name": "@salesforcedevs/dw-components",
3
- "version": "1.28.1",
4
- "description": "Lightning web components for https://developer.salesforce.com",
5
- "license": "MIT",
6
- "engines": {
7
- "node": "20.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": "60c3cfd51619d2134999702fc11d291030e15acd"
30
- }
2
+ "name": "@salesforcedevs/dw-components",
3
+ "version": "1.28.2-action-link-1",
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
+ "stableVersion": "1.28.2"
30
+ }
@@ -1,6 +1,6 @@
1
1
  import { api, LightningElement } from "lwc";
2
2
  import { normalizeBoolean, toJson } from "dxUtils/normalizers";
3
- import { DocsTile, DropdownItem, Language } from "typings/custom";
3
+ import { DocsLink, 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,6 +16,7 @@ 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";
19
20
 
20
21
  type Filter = {
21
22
  label: string;
@@ -183,12 +184,15 @@ export default class DocsGrid extends LightningElement {
183
184
  for (const docs of allDocs) {
184
185
  for (const project of docs.projects) {
185
186
  const firstLink = project.contentTypes[0].href;
187
+ const links = this.isDocsContentType(project)
188
+ ? []
189
+ : project.contentTypes;
186
190
 
187
191
  transformed.push({
188
192
  id: project.id,
189
193
  title: project.title,
190
194
  description: project.description,
191
- links: project.contentTypes,
195
+ links,
192
196
  service: project.meta.brand,
193
197
  guidesHref: firstLink,
194
198
  locale: docs.locale || "en-us"
@@ -199,6 +203,13 @@ export default class DocsGrid extends LightningElement {
199
203
  return transformed;
200
204
  }
201
205
 
206
+ private isDocsContentType(project: any): boolean {
207
+ return !!project.contentTypes?.some(
208
+ (contentType: DocsLink) =>
209
+ contentType.contentType === DOCS_CONTENT_TYPE
210
+ );
211
+ }
212
+
202
213
  async fetchOtherDocsFromSitemetadata(): Promise<void> {
203
214
  if (this._isFetchingOtherDocs) {
204
215
  return;
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.