@salesforcedevs/docs-components 1.3.215 → 1.3.219
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/docs-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.219",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/lodash.orderby": "^4.6.7",
|
|
25
25
|
"@types/lodash.uniqby": "^4.7.7"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "c0f8f19b7bfc14f9a6ca02a2dc328f726d72270a"
|
|
28
28
|
}
|
|
@@ -1343,21 +1343,8 @@ export default class AmfReference extends LightningElement {
|
|
|
1343
1343
|
* New Title: E1 | Ref Spec2 | Project Name | Salesforce Developer
|
|
1344
1344
|
*
|
|
1345
1345
|
*/
|
|
1346
|
-
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
1347
|
-
let coveoTitleMetaTag = document.querySelector(
|
|
1348
|
-
'meta[name="coveo-search-title"]'
|
|
1349
|
-
);
|
|
1350
|
-
if (!coveoTitleMetaTag) {
|
|
1351
|
-
coveoTitleMetaTag = document.createElement("meta");
|
|
1352
|
-
coveoTitleMetaTag.setAttribute("name", "coveo-search-title");
|
|
1353
|
-
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
1354
|
-
document
|
|
1355
|
-
.getElementsByTagName("head")[0]
|
|
1356
|
-
.appendChild(coveoTitleMetaTag);
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
1346
|
if (titleTag) {
|
|
1360
|
-
let titleTagValue = titleTag.textContent
|
|
1347
|
+
let titleTagValue = titleTag.textContent;
|
|
1361
1348
|
const titleTagSectionValues: string[] =
|
|
1362
1349
|
titleTagValue?.split(TITLE_SEPARATOR);
|
|
1363
1350
|
if (titleTagSectionValues) {
|
|
@@ -1369,7 +1356,6 @@ export default class AmfReference extends LightningElement {
|
|
|
1369
1356
|
}
|
|
1370
1357
|
}
|
|
1371
1358
|
titleTag.textContent = titleTagValue;
|
|
1372
|
-
coveoTitleMetaTag.setAttribute("content", titleTagValue);
|
|
1373
1359
|
}
|
|
1374
1360
|
}
|
|
1375
1361
|
|
|
@@ -207,9 +207,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
207
207
|
".sticky-doc-header"
|
|
208
208
|
) as HTMLElement;
|
|
209
209
|
|
|
210
|
-
const docPhaseEl = (
|
|
211
|
-
"[name=doc-phase]"
|
|
212
|
-
)
|
|
210
|
+
const docPhaseEl = (
|
|
211
|
+
this.template.querySelector("[name=doc-phase]")! as any
|
|
212
|
+
).assignedElements()[0] as HTMLSlotElement;
|
|
213
213
|
|
|
214
214
|
if (!sidebarEl || !globalNavEl || !contextNavEl || !docHeaderEl) {
|
|
215
215
|
console.warn("One or more required elements are missing.");
|
|
@@ -259,9 +259,8 @@ export default class ContentLayout extends LightningElement {
|
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
// Adjust right nav bar position when doc phase is present
|
|
262
|
-
const rightNavBarEl =
|
|
263
|
-
".right-nav-bar"
|
|
264
|
-
);
|
|
262
|
+
const rightNavBarEl =
|
|
263
|
+
this.template.querySelector(".right-nav-bar");
|
|
265
264
|
|
|
266
265
|
if (rightNavBarEl) {
|
|
267
266
|
rightNavBarEl.style.top = `${
|
|
@@ -323,14 +322,17 @@ export default class ContentLayout extends LightningElement {
|
|
|
323
322
|
};
|
|
324
323
|
|
|
325
324
|
onSlotChange(event: Event): void {
|
|
326
|
-
const slotElements = (
|
|
325
|
+
const slotElements = (
|
|
326
|
+
event.target as HTMLSlotElement
|
|
327
|
+
).assignedElements();
|
|
327
328
|
|
|
328
329
|
if (slotElements.length) {
|
|
329
330
|
this.contentLoaded = true;
|
|
330
331
|
const slotContentElement = slotElements[0];
|
|
331
|
-
const headingElements =
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
const headingElements =
|
|
333
|
+
slotContentElement.ownerDocument?.getElementsByTagName(
|
|
334
|
+
TOC_HEADER_TAG
|
|
335
|
+
);
|
|
334
336
|
|
|
335
337
|
for (const headingElement of headingElements as any) {
|
|
336
338
|
// Sometimes elements hash is not being set when slot content is wrapped with div
|
|
@@ -390,9 +392,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
390
392
|
globalNavEl?.offsetHeight +
|
|
391
393
|
contextNavEl?.offsetHeight;
|
|
392
394
|
|
|
393
|
-
const docPhaseEl = (
|
|
394
|
-
"[name=doc-phase]"
|
|
395
|
-
)
|
|
395
|
+
const docPhaseEl = (
|
|
396
|
+
this.template.querySelector("[name=doc-phase]")! as any
|
|
397
|
+
).assignedElements()[0] as HTMLSlotElement;
|
|
396
398
|
|
|
397
399
|
const offset = docPhaseEl
|
|
398
400
|
? headerHeight + docPhaseEl.offsetHeight
|