New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@salesforcedevs/docs-components

Package Overview
Dependencies
Maintainers
0
Versions
673
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforcedevs/docs-components - npm Package Compare versions

Comparing version

to
1.3.325-rnbtab-alpha2

src/modules/doc/doDont/doDont.css

1

lwc.config.json

@@ -12,2 +12,3 @@ {

"doc/contentCallout",
"doc/doDont",
"doc/contentLayout",

@@ -14,0 +15,0 @@ "doc/contentMedia",

2

package.json
{
"name": "@salesforcedevs/docs-components",
"version": "1.3.325-rnbtab-alpha1",
"version": "1.3.325-rnbtab-alpha2",
"description": "Docs Lightning web components for DSC",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -137,3 +137,3 @@ /* eslint-disable @lwc/lwc/no-inner-html */

theme: this.codeBlockTheme,
title: "", // Default no title.
header: "", // Default no title.
variant: this.codeBlockType,

@@ -177,3 +177,3 @@ isEncoded: true

Object.assign(calloutCompEl, {
title: type,
header: type,
variant: typeLower

@@ -180,0 +180,0 @@ });

@@ -107,3 +107,3 @@ /* eslint-disable @lwc/lwc/no-document-query */

get showTabBasedRNB() {
const tabPanelListItem: any = this.selectTabElement();
const tabPanelListItem: any = this.getTabPanelItems();
return tabPanelListItem?.id === RNB_BY_TAB ? true : false;

@@ -116,3 +116,3 @@ }

private selectTabElement() {
private getTabPanelItems() {
return document.querySelector("dx-tab-panel-list");

@@ -132,3 +132,3 @@ }

if (this.showTabBasedRNB) {
const tabPanelListItem: any = this.selectTabElement();
const tabPanelListItem: any = this.getTabPanelItems();
const tabPanels =

@@ -148,22 +148,15 @@ tabPanelListItem?.querySelectorAll("dx-tab-panel");

private updateURL() {
const tabPanelListItem: any = this.selectTabElement();
if (tabPanelListItem?.shadowRoot) {
const tabPanelItems =
tabPanelListItem.shadowRoot.querySelectorAll(
"dx-tab-panel-item"
);
if (tabPanelItems) {
tabPanelItems.forEach((tabPanelItem: any) => {
const tab = tabPanelItem.shadowRoot.querySelector("button");
if (tab?.getAttribute("aria-selected") === "true") {
const tabID = tab?.getAttribute("aria-label");
const url = new URL(window.location.href);
if (url.searchParams.get("type") !== tabID) {
url.searchParams.set("type", tabID);
url.hash = "";
window.history.pushState({}, "", url.toString());
}
const tabs = this.getAllTabs();
if (tabs.length > 0) {
tabs.forEach((tab: any) => {
if (tab?.getAttribute("aria-selected") === "true") {
const tabID = tab?.getAttribute("aria-label");
const url = new URL(window.location.href);
if (url.searchParams.get("type") !== tabID) {
url.searchParams.set("type", tabID);
url.hash = "";
window.history.pushState({}, "", url.toString());
}
});
}
}
});
}

@@ -235,19 +228,25 @@ }

private getAllTabs(): any[] {
const tabPanelListItem: any = this.getTabPanelItems();
if (tabPanelListItem?.shadowRoot) {
return Array.from(
tabPanelListItem.shadowRoot.querySelectorAll(
"dx-tab-panel-item"
)
).map((tabPanelItem: any) =>
tabPanelItem.shadowRoot.querySelector("button")
);
}
return [];
}
private selectTabById(tabId: string) {
requestAnimationFrame(() => {
const tabPanelListItem: any = this.selectTabElement();
if (tabPanelListItem?.shadowRoot) {
const tabPanelItems =
tabPanelListItem.shadowRoot.querySelectorAll(
"dx-tab-panel-item"
);
if (tabPanelItems) {
tabPanelItems.forEach((tabPanelItem: any) => {
const tab =
tabPanelItem.shadowRoot.querySelector("button");
if (tab?.getAttribute("aria-label") === tabId) {
tab?.click();
}
});
}
const tabs = this.getAllTabs();
if (tabs.length > 0) {
tabs.forEach((tab: any) => {
if (tab?.getAttribute("aria-label") === tabId) {
tab?.click();
}
});
}

@@ -254,0 +253,0 @@ });