@salesforcedevs/dw-components 1.28.2-action-link → 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.28.2-action-link",
3
+ "version": "1.28.2-action-link-1",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -30,12 +30,6 @@ type SearchParams = {
30
30
  page?: any;
31
31
  };
32
32
 
33
- function isDocsContentType(project: any): boolean {
34
- return !!project.contentTypes?.some(
35
- (contentType: DocsLink) => contentType.contentType === DOCS_CONTENT_TYPE
36
- );
37
- }
38
-
39
33
  export default class DocsGrid extends LightningElement {
40
34
  searchTerm = "";
41
35
  selectedProductFilters: string[] | null = null;
@@ -190,7 +184,7 @@ export default class DocsGrid extends LightningElement {
190
184
  for (const docs of allDocs) {
191
185
  for (const project of docs.projects) {
192
186
  const firstLink = project.contentTypes[0].href;
193
- const links = isDocsContentType(project)
187
+ const links = this.isDocsContentType(project)
194
188
  ? []
195
189
  : project.contentTypes;
196
190
 
@@ -209,6 +203,13 @@ export default class DocsGrid extends LightningElement {
209
203
  return transformed;
210
204
  }
211
205
 
206
+ private isDocsContentType(project: any): boolean {
207
+ return !!project.contentTypes?.some(
208
+ (contentType: DocsLink) =>
209
+ contentType.contentType === DOCS_CONTENT_TYPE
210
+ );
211
+ }
212
+
212
213
  async fetchOtherDocsFromSitemetadata(): Promise<void> {
213
214
  if (this._isFetchingOtherDocs) {
214
215
  return;