@salesforcedevs/dx-components 1.28.3 → 1.28.5
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/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.5",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"luxon": "3.4.4",
|
|
45
45
|
"msw": "^2.12.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "2fa9927fc99914ec55e4f8322cec0b8b95d31a68"
|
|
48
48
|
}
|
|
@@ -34,6 +34,7 @@ export default class CodeBlock extends LightningElement {
|
|
|
34
34
|
private _codeBlockRendered: boolean = false;
|
|
35
35
|
private _showLoadingIndicator: boolean = false;
|
|
36
36
|
private _isCbHeightCalculated: boolean = false;
|
|
37
|
+
private _plainCodeForCopy: string = "";
|
|
37
38
|
private markupLangs = ["visualforce", "html", "xml"];
|
|
38
39
|
private componentLoaded: boolean = false;
|
|
39
40
|
private showLanguageDropdown: boolean = false;
|
|
@@ -290,6 +291,9 @@ export default class CodeBlock extends LightningElement {
|
|
|
290
291
|
);
|
|
291
292
|
}
|
|
292
293
|
}
|
|
294
|
+
// Get the plain code for copy functionality
|
|
295
|
+
const codeElement = this.template.querySelector("code");
|
|
296
|
+
this._plainCodeForCopy = codeElement?.textContent?.trim() ?? "";
|
|
293
297
|
// Add line numbers to each line
|
|
294
298
|
this.addLineNumbers();
|
|
295
299
|
}
|
|
@@ -328,12 +332,8 @@ export default class CodeBlock extends LightningElement {
|
|
|
328
332
|
});
|
|
329
333
|
|
|
330
334
|
try {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (snippetContainer && snippetContainer.textContent) {
|
|
334
|
-
await navigator.clipboard.writeText(
|
|
335
|
-
snippetContainer.textContent
|
|
336
|
-
);
|
|
335
|
+
if (this._plainCodeForCopy) {
|
|
336
|
+
await navigator.clipboard.writeText(this._plainCodeForCopy);
|
|
337
337
|
this.copyBtnText = "Copied!";
|
|
338
338
|
setTimeout(() => {
|
|
339
339
|
this.copyBtnText = "Click to copy";
|
|
@@ -10,6 +10,9 @@ export default class Footer extends LightningElement {
|
|
|
10
10
|
private signupUrl =
|
|
11
11
|
"https://www.salesforce.com/form/other/role-based-newsletter/?Developer=true";
|
|
12
12
|
|
|
13
|
+
@api
|
|
14
|
+
mfeHomeHref: string = `/${window.location.host}`; // ugly hack: ideally this wouldn't be necessary, but the only way to remove the "See all ways to contact us" link from the footer MFE is to set this to a non-empty value other than "us"; and given the way that the footer works, the non-empty value needs to be something that can be appended to `/` and work correctly
|
|
15
|
+
|
|
13
16
|
@api
|
|
14
17
|
mfeConfigOrigin: string = `${window.location.origin}/developer/en-us/wp-json`;
|
|
15
18
|
|
|
@@ -4,6 +4,7 @@ export default class FooterMfe extends LightningElement {
|
|
|
4
4
|
private footerElement: HTMLElement | null = null;
|
|
5
5
|
|
|
6
6
|
@api legalOnly = false;
|
|
7
|
+
@api homeHref: string = `/${window.location.host}`; // ugly hack by default: ideally this wouldn't be necessary, but the only way to remove the "See all ways to contact us" link from the footer MFE is to set this to a non-empty value other than "us"; and given the way that the footer works, the non-empty value needs to be something that can be appended to `/` and work correctly
|
|
7
8
|
@api origin: string = `${window.location.origin}/developer/en-us/wp-json`;
|
|
8
9
|
|
|
9
10
|
renderedCallback() {
|