@salesforcedevs/docs-components 1.3.194-alpha.0 → 1.3.194-docfooter-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.194-alpha.0",
3
+ "version": "1.3.194-docfooter-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -185,12 +185,10 @@ export default class AmfReference extends LightningElement {
185
185
  constructor() {
186
186
  super();
187
187
 
188
- this._boundOnApiNavigationChanged = this.onApiNavigationChanged.bind(
189
- this
190
- );
191
- this._boundUpdateSelectedItemFromUrlQuery = this.updateSelectedItemFromUrlQuery.bind(
192
- this
193
- );
188
+ this._boundOnApiNavigationChanged =
189
+ this.onApiNavigationChanged.bind(this);
190
+ this._boundUpdateSelectedItemFromUrlQuery =
191
+ this.updateSelectedItemFromUrlQuery.bind(this);
194
192
  }
195
193
 
196
194
  connectedCallback(): void {
@@ -246,9 +244,8 @@ export default class AmfReference extends LightningElement {
246
244
  const updatedReferenceId =
247
245
  oldReferenceIdNewReferenceIdMap[referenceId];
248
246
  const newReferenceId = updatedReferenceId || referenceId;
249
- const referenceItemConfig = this.getAmfConfigWithId(
250
- newReferenceId
251
- );
247
+ const referenceItemConfig =
248
+ this.getAmfConfigWithId(newReferenceId);
252
249
  if (referenceItemConfig) {
253
250
  hashBasedRedirectUrl = `${referenceItemConfig.href}?meta=${encodedMeta}`;
254
251
  }
@@ -328,9 +325,8 @@ export default class AmfReference extends LightningElement {
328
325
  for (let i = 0; i < allVersions.length; i++) {
329
326
  const versionItem = allVersions[i];
330
327
  const referenceLink = versionItem.link.href;
331
- const referenceId = this.getReferenceIdFromUrl(
332
- referenceLink
333
- );
328
+ const referenceId =
329
+ this.getReferenceIdFromUrl(referenceLink);
334
330
  if (this._currentReferenceId === referenceId) {
335
331
  // This is to navigate to respective topic in the changed version
336
332
  versionItem.link.href = `${referenceLink}/${currentRefMeta}`;
@@ -844,9 +840,8 @@ export default class AmfReference extends LightningElement {
844
840
  this._currentReferenceId
845
841
  );
846
842
  if (specBasedReference) {
847
- const currentMeta:
848
- | RouteMeta
849
- | undefined = this.getReferenceMetaInfo(window.location.href);
843
+ const currentMeta: RouteMeta | undefined =
844
+ this.getReferenceMetaInfo(window.location.href);
850
845
  const metadata =
851
846
  currentMeta && this.getMetadataByUrlQuery(currentMeta);
852
847
  if (metadata) {
@@ -1272,12 +1267,10 @@ export default class AmfReference extends LightningElement {
1272
1267
  }
1273
1268
  if (!isRedirecting) {
1274
1269
  const currentReferenceUrl = window.location.href;
1275
- const referenceMeta = this.getMarkdownReferenceMeta(
1276
- currentReferenceUrl
1277
- );
1278
- const selectedItemRefId = this.getReferenceIdFromUrl(
1279
- currentReferenceUrl
1280
- );
1270
+ const referenceMeta =
1271
+ this.getMarkdownReferenceMeta(currentReferenceUrl);
1272
+ const selectedItemRefId =
1273
+ this.getReferenceIdFromUrl(currentReferenceUrl);
1281
1274
  const referenceDetails = this.getRefDetailsForGivenTopicMeta(
1282
1275
  selectedItemRefId,
1283
1276
  referenceMeta
@@ -1324,9 +1317,8 @@ export default class AmfReference extends LightningElement {
1324
1317
  const name = event.detail.name;
1325
1318
  if (name) {
1326
1319
  const urlReferenceId = this.getReferenceIdFromUrl(name);
1327
- const specBasedReference = this.isSpecBasedReference(
1328
- urlReferenceId
1329
- );
1320
+ const specBasedReference =
1321
+ this.isSpecBasedReference(urlReferenceId);
1330
1322
  if (specBasedReference) {
1331
1323
  const metaVal = this.getMetaFromUrl(name);
1332
1324
  const currentSelectedMeta = this.selectedTopic
@@ -1381,9 +1373,8 @@ export default class AmfReference extends LightningElement {
1381
1373
  const currentReferenceId = this.getReferenceIdFromUrl(currentUrl);
1382
1374
  //No need to do anything if user is expanding currently selected reference
1383
1375
  if (referenceId !== currentReferenceId) {
1384
- const isSpecBasedReference = this.isSpecBasedReference(
1385
- referenceId
1386
- );
1376
+ const isSpecBasedReference =
1377
+ this.isSpecBasedReference(referenceId);
1387
1378
  if (isSpecBasedReference) {
1388
1379
  // Perform functionality same as item selection
1389
1380
  this.onNavSelect(event);
@@ -106,7 +106,7 @@ h6 {
106
106
  }
107
107
 
108
108
  img {
109
- image-rendering: optimize-contrast;
109
+ image-rendering: -webkit-optimize-contrast;
110
110
  }
111
111
 
112
112
  p,
@@ -47,6 +47,9 @@
47
47
  value={tocValue}
48
48
  ></dx-toc>
49
49
  </div>
50
+ <div class="footer-container">
51
+ <dx-footer variant="no-signup"></dx-footer>
52
+ </div>
50
53
  </div>
51
54
  </div>
52
55
  </div>
@@ -207,9 +207,9 @@ export default class ContentLayout extends LightningElement {
207
207
  ".sticky-doc-header"
208
208
  ) as HTMLElement;
209
209
 
210
- const docPhaseEl = (this.template.querySelector(
211
- "[name=doc-phase]"
212
- )! as any).assignedElements()[0] as HTMLSlotElement;
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 = this.template.querySelector(
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 = (event.target as HTMLSlotElement).assignedElements();
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 = slotContentElement.ownerDocument?.getElementsByTagName(
332
- TOC_HEADER_TAG
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 = (this.template.querySelector(
394
- "[name=doc-phase]"
395
- )! as any).assignedElements()[0] as HTMLSlotElement;
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
@@ -2,11 +2,14 @@
2
2
 
3
3
  dx-logo {
4
4
  min-width: fit-content;
5
+ min-width: -moz-fit-content;
5
6
  }
6
7
 
7
8
  .header_l2 {
8
9
  justify-content: space-between;
9
10
  height: var(--dx-g-doc-header-main-nav-height);
11
+ padding-bottom: var(--dx-g-spacing-xs);
12
+ background: white;
10
13
  }
11
14
 
12
15
  .nav_menu-button {
@@ -16,16 +19,24 @@ dx-logo {
16
19
  );
17
20
  }
18
21
 
22
+ .has-brand.has-scoped-nav-items {
23
+ border-bottom: 1px solid var(--dx-g-gray-90);
24
+ border-top: 1px solid var(--dx-g-gray-90);
25
+ }
26
+
19
27
  .nav_menu-ctas {
20
28
  margin-right: var(--dx-g-spacing-sm);
21
29
  }
22
30
 
23
31
  header:not(.has-brand) > .header_l1 {
24
- background: var(--dx-g-brand-current-color-background);
32
+ background: white;
33
+ border-bottom: 1px solid var(--dx-g-gray-90);
25
34
  }
26
35
 
27
36
  header:not(.has-brand) > .header_l2 {
28
- background: var(--dx-g-brand-current-color-background-2);
37
+ border-bottom: 1px solid var(--dx-g-gray-90);
38
+ border-top: 1px solid var(--dx-g-gray-90);
39
+ padding-bottom: var(--dx-g-spacing-lg);
29
40
  }
30
41
 
31
42
  .header_l2_group.header_l2_group-right-ctas {
@@ -56,6 +67,10 @@ header:not(.has-brand) > .header_l2 {
56
67
  --border-color: var(--button-primary-color-hover);
57
68
  }
58
69
 
70
+ .has-brand .header_l2_group-title {
71
+ padding-bottom: calc(var(--dx-g-spacing-md) + 2px);
72
+ }
73
+
59
74
  @media (max-width: 768px) {
60
75
  .header_l2 {
61
76
  padding: 0;
@@ -82,6 +97,10 @@ header:not(.has-brand) > .header_l2 {
82
97
  margin-right: var(--dx-g-spacing-sm);
83
98
  }
84
99
 
100
+ .has-brand .header_l2_group-title {
101
+ padding-bottom: var(--dx-g-spacing-smd);
102
+ }
103
+
85
104
  .header_l2_group-title {
86
105
  margin-right: 0;
87
106
  padding: var(--dx-g-spacing-smd)
@@ -102,6 +121,10 @@ header:not(.has-brand) > .header_l2 {
102
121
  }
103
122
 
104
123
  .has-scoped-nav-items .header_l2_group-title {
105
- border-bottom: 1px solid var(--dx-g-brand-current-color-border-2);
124
+ border-bottom: 1px solid var(--dx-g-gray-90);
125
+ }
126
+
127
+ header:not(.has-brand) > .header_l2 {
128
+ padding-bottom: 0;
106
129
  }
107
130
  }
@@ -14,9 +14,9 @@
14
14
  if:true={isValidBrand}
15
15
  sprite="salesforcebrand"
16
16
  symbol={brand}
17
- size="xlarge"
17
+ size="large"
18
18
  ></dx-icon>
19
- <span class="subtitle dx-text-display-6">
19
+ <span class="subtitle dx-text-display-7">
20
20
  {subtitle}
21
21
  </span>
22
22
  </a>
@@ -2,7 +2,7 @@
2
2
 
3
3
  button {
4
4
  opacity: 0;
5
- color: rgb(11 92 171);
5
+ color: rgb(11, 92, 171);
6
6
  }
7
7
 
8
8
  button:hover {
@@ -17,7 +17,7 @@ button:focus {
17
17
 
18
18
  button:focus-visible {
19
19
  border-radius: 4px;
20
- border: 2px solid rgb(11 92 171);
20
+ border: 2px solid rgb(11, 92, 171);
21
21
  }
22
22
 
23
23
  .icon-wrapper {
@@ -23,7 +23,7 @@ button {
23
23
  bottom: var(--doc-c-heading-anchor-button-bottom);
24
24
  left: 0;
25
25
  opacity: 0;
26
- color: rgb(11 92 171);
26
+ color: rgb(11, 92, 171);
27
27
  display: flex;
28
28
  justify-content: center;
29
29
  align-items: center;
@@ -4,7 +4,7 @@
4
4
  width: 100%;
5
5
  display: flex;
6
6
  flex-direction: row;
7
- margin: 20px 0;
7
+ margin: 20px 0 20px 0;
8
8
  }
9
9
 
10
10
  dx-hr:first-of-type::part(hr) {
@@ -252,14 +252,11 @@ export default class DocXmlContent extends LightningElementWithState<{
252
252
  }
253
253
 
254
254
  private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
255
- const config: {
256
- locale?: string;
257
- topicid?: string;
258
- version?: string;
259
- } = {
260
- locale: this.languageId,
261
- topicid: this.deliverable
262
- };
255
+ const config: { locale?: string; topicid?: string; version?: string } =
256
+ {
257
+ locale: this.languageId,
258
+ topicid: this.deliverable
259
+ };
263
260
 
264
261
  if (this.releaseVersionId && this.releaseVersionId !== "noversion") {
265
262
  config.version = this.releaseVersionId;
@@ -414,12 +411,8 @@ export default class DocXmlContent extends LightningElementWithState<{
414
411
  }
415
412
 
416
413
  getReferenceFromUrl(): PageReference {
417
- const [
418
- page,
419
- docId,
420
- deliverable,
421
- contentDocumentId
422
- ] = window.location.pathname.substr(1).split("/");
414
+ const [page, docId, deliverable, contentDocumentId] =
415
+ window.location.pathname.substr(1).split("/");
423
416
 
424
417
  const { origin: domain, hash, search } = window.location;
425
418
 
@@ -581,20 +574,14 @@ export default class DocXmlContent extends LightningElementWithState<{
581
574
  }
582
575
 
583
576
  private updateSearchInput(searchParam: string): void {
584
- (this.template.querySelector(
585
- "doc-content-layout"
586
- ) as any)?.setSidebarInputValue(searchParam);
577
+ (
578
+ this.template.querySelector("doc-content-layout") as any
579
+ )?.setSidebarInputValue(searchParam);
587
580
  }
588
581
 
589
582
  private pageReferenceToString(reference: PageReference): string {
590
- const {
591
- page,
592
- docId,
593
- deliverable,
594
- contentDocumentId,
595
- hash,
596
- search
597
- } = reference;
583
+ const { page, docId, deliverable, contentDocumentId, hash, search } =
584
+ reference;
598
585
  return `/${page}/${docId}/${deliverable}/${contentDocumentId}${this.normalizeSearch(
599
586
  search!
600
587
  )}${this.normalizeHash(hash)}`;
@@ -166,12 +166,12 @@ api-security-documentation {
166
166
  --anypoint-button-emphasis-high-active-background-color: transparent;
167
167
 
168
168
  /* api example */
169
- --api-example-accent-color: rgb(250 250 250);
170
- --api-example-background-color: rgb(250 250 250);
169
+ --api-example-accent-color: rgb(250, 250, 250);
170
+ --api-example-background-color: rgb(250, 250, 250);
171
171
  --api-example-title-background-color: transparent;
172
172
 
173
173
  /* code snippets */
174
- --http-code-snippet-container-background-color: rgb(250 250 250);
174
+ --http-code-snippet-container-background-color: rgb(250, 250, 250);
175
175
  --http-code-snippet-container-padding: var(--dx-g-spacing-md);
176
176
 
177
177
  /* prism */
@@ -208,7 +208,7 @@ api-endpoint-documentation {
208
208
  );
209
209
 
210
210
  /* description */
211
- --api-endpoint-documentation-description-color: rgb(24 24 24);
211
+ --api-endpoint-documentation-description-color: rgb(24, 24, 24);
212
212
  }
213
213
 
214
214
  api-endpoint-documentation,
@@ -271,11 +271,11 @@ api-method-documentation {
271
271
  --api-method-documentation-http-method-label-font-weight: var(
272
272
  --dx-g-font-bold
273
273
  );
274
- --api-method-documentation-description-color: rgb(24 24 24);
274
+ --api-method-documentation-description-color: rgb(24, 24, 24);
275
275
  --api-method-documentation-operation-id-color: var(--dx-g-gray-50);
276
276
 
277
277
  /* body */
278
- --api-body-document-description-color: rgb(24 24 24);
278
+ --api-body-document-description-color: rgb(24, 24, 24);
279
279
  --api-body-document-media-type-selector-color: var(--dx-g-blue-vibrant-20);
280
280
  --api-body-document-media-type-selector-font-size: var(
281
281
  --amf-h8-mod-font-size
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .doc-status-container {
12
- background-color: rgb(254 243 217);
12
+ background-color: rgb(254, 243, 217);
13
13
  border-color: var(--dx-g-yellow-vibrant-80);
14
14
  }
15
15