@salesforcedevs/docs-components 1.3.209-alpha.10 → 1.3.209-tag-alpha
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
|
@@ -1320,42 +1320,14 @@ export default class AmfReference extends LightningElement {
|
|
|
1320
1320
|
metaNavTitle.setAttribute("content", navTitle);
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
* - Project Name
|
|
1332
|
-
* - Ref Spec1
|
|
1333
|
-
* - Summary
|
|
1334
|
-
* - Endpoints
|
|
1335
|
-
* - E1
|
|
1336
|
-
* - E2
|
|
1337
|
-
* - Ref Spec2
|
|
1338
|
-
* - Summary
|
|
1339
|
-
* - Endpoints
|
|
1340
|
-
* - E1 (Selected)
|
|
1341
|
-
* - E2
|
|
1342
|
-
* Previous Title: Ref Spec2 | Project Name | Salesforce Developer
|
|
1343
|
-
* New Title: E1 | Ref Spec2 | Project Name | Salesforce Developer
|
|
1344
|
-
*
|
|
1345
|
-
*/
|
|
1346
|
-
if (titleTag) {
|
|
1347
|
-
let titleTagValue = titleTag.textContent;
|
|
1348
|
-
const titleTagSectionValues: string[] =
|
|
1349
|
-
titleTagValue?.split(TITLE_SEPARATOR);
|
|
1350
|
-
if (titleTagSectionValues) {
|
|
1351
|
-
if (titleTagSectionValues.length <= 3) {
|
|
1352
|
-
titleTagValue = navTitle + TITLE_SEPARATOR + titleTagValue;
|
|
1353
|
-
} else {
|
|
1354
|
-
titleTagSectionValues[0] = navTitle;
|
|
1355
|
-
titleTagValue = titleTagSectionValues.join(TITLE_SEPARATOR);
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
titleTag.textContent = titleTagValue;
|
|
1323
|
+
// eslint-disable-next-line @lwc/lwc/no-document-query
|
|
1324
|
+
const coveoTitleMetaTag = document.querySelector(
|
|
1325
|
+
'meta[name="coveo-search-title"]'
|
|
1326
|
+
);
|
|
1327
|
+
if (coveoTitleMetaTag && titleTag && navTitle) {
|
|
1328
|
+
const titleTagValue = titleTag.textContent;
|
|
1329
|
+
const coveoSerachTitle = navTitle + TITLE_SEPARATOR + titleTagValue;
|
|
1330
|
+
coveoTitleMetaTag.setAttribute("content", coveoSerachTitle);
|
|
1359
1331
|
}
|
|
1360
1332
|
}
|
|
1361
1333
|
|
|
@@ -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
|
-
|
|
212
|
-
).assignedElements()[0] as HTMLSlotElement;
|
|
210
|
+
const docPhaseEl = (this.template.querySelector(
|
|
211
|
+
"[name=doc-phase]"
|
|
212
|
+
)! as any).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,8 +259,9 @@ 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
|
-
|
|
262
|
+
const rightNavBarEl = this.template.querySelector(
|
|
263
|
+
".right-nav-bar"
|
|
264
|
+
);
|
|
264
265
|
|
|
265
266
|
if (rightNavBarEl) {
|
|
266
267
|
rightNavBarEl.style.top = `${
|
|
@@ -322,17 +323,14 @@ export default class ContentLayout extends LightningElement {
|
|
|
322
323
|
};
|
|
323
324
|
|
|
324
325
|
onSlotChange(event: Event): void {
|
|
325
|
-
const slotElements = (
|
|
326
|
-
event.target as HTMLSlotElement
|
|
327
|
-
).assignedElements();
|
|
326
|
+
const slotElements = (event.target as HTMLSlotElement).assignedElements();
|
|
328
327
|
|
|
329
328
|
if (slotElements.length) {
|
|
330
329
|
this.contentLoaded = true;
|
|
331
330
|
const slotContentElement = slotElements[0];
|
|
332
|
-
const headingElements =
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
);
|
|
331
|
+
const headingElements = slotContentElement.ownerDocument?.getElementsByTagName(
|
|
332
|
+
TOC_HEADER_TAG
|
|
333
|
+
);
|
|
336
334
|
|
|
337
335
|
for (const headingElement of headingElements as any) {
|
|
338
336
|
// Sometimes elements hash is not being set when slot content is wrapped with div
|
|
@@ -392,9 +390,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
392
390
|
globalNavEl?.offsetHeight +
|
|
393
391
|
contextNavEl?.offsetHeight;
|
|
394
392
|
|
|
395
|
-
const docPhaseEl = (
|
|
396
|
-
|
|
397
|
-
).assignedElements()[0] as HTMLSlotElement;
|
|
393
|
+
const docPhaseEl = (this.template.querySelector(
|
|
394
|
+
"[name=doc-phase]"
|
|
395
|
+
)! as any).assignedElements()[0] as HTMLSlotElement;
|
|
398
396
|
|
|
399
397
|
const offset = docPhaseEl
|
|
400
398
|
? headerHeight + docPhaseEl.offsetHeight
|