@salesforcedevs/docs-components 1.3.84 → 1.3.86-version-picker-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.84",
3
+ "version": "1.3.86-version-picker-alpha",
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": "09b7aafdaf3a75bf49ecf7691fb51378e6a9c332"
27
+ "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
28
28
  }
@@ -7,3 +7,7 @@
7
7
  .version-picker {
8
8
  margin-left: auto;
9
9
  }
10
+
11
+ .version-picker-text {
12
+ border-bottom: 1px dashed #0176D3 !important;
13
+ }
@@ -28,7 +28,7 @@
28
28
  value={selectedVersion.id}
29
29
  width="290px"
30
30
  >
31
- <dx-button variant="inline">{selectedVersion.id}</dx-button>
31
+ <dx-button variant="inline" class="version-picker-text">{selectedVersion.id}</dx-button>
32
32
  </dx-dropdown>
33
33
  </template>
34
34
  </div>
@@ -111,13 +111,6 @@ h6 {
111
111
  margin: var(--dx-g-spacing-sm) 0 var(--dx-g-spacing-sm) 0;
112
112
  }
113
113
 
114
- .dx-text-heading-alt-1 {
115
- color: var(--dx-g-gray-30);
116
- font-family: var(--dx-g-font-sans);
117
- font-size: var(--slds-text-lg);
118
- line-height: 25px;
119
- }
120
-
121
114
  p,
122
115
  .p {
123
116
  font-family: var(--dx-g-font-sans);
@@ -87,7 +87,7 @@
87
87
  symbol={brand}
88
88
  size="xlarge"
89
89
  ></dx-icon>
90
- <span class="subtitle dx-text-heading-4">
90
+ <span class="subtitle dx-text-display-6">
91
91
  {subtitle}
92
92
  </span>
93
93
  </a>
@@ -1,54 +1,33 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5,
6
- h6 {
7
- color: var(--dx-g-blue-vibrant-20);
8
- font-family: var(--dx-g-font-display);
9
- font-weight: var(--dx-g-font-demi);
10
- }
11
-
12
- .display-3 {
13
- font-size: var(--dx-g-text-3xl);
14
- letter-spacing: -0.85px;
15
- line-height: var(--dx-g-spacing-3xl);
1
+ @import "dxHelpers/text";
2
+
3
+ h1 {
16
4
  margin: var(--dx-g-spacing-2xl) 0 var(--dx-g-spacing-md) 0;
17
5
  }
18
6
 
19
- .display-3 doc-heading-content {
7
+ h1 doc-heading-content {
20
8
  --doc-c-heading-anchor-button-bottom: 9.5px;
21
9
  }
22
10
 
23
- .display-4 {
24
- font-size: var(--dx-g-text-2xl);
25
- letter-spacing: -0.6px;
26
- line-height: var(--dx-g-spacing-2xl);
11
+ h2 {
27
12
  margin: var(--dx-g-spacing-2xl) 0 var(--dx-g-spacing-md) 0;
28
13
  }
29
14
 
30
- .display-4 doc-heading-content {
15
+ h2 doc-heading-content {
31
16
  --doc-c-heading-anchor-button-bottom: 3px;
32
17
  }
33
18
 
34
- .display-5 {
35
- font-size: var(--dx-g-text-xl);
36
- letter-spacing: -0.5px;
37
- line-height: var(--dx-g-spacing-xl);
19
+ h3 {
38
20
  margin: var(--dx-g-spacing-xl) 0 var(--dx-g-spacing-md) 0;
39
21
  }
40
22
 
41
- .display-5 doc-heading-content {
23
+ h3 doc-heading-content {
42
24
  --doc-c-heading-anchor-button-bottom: -0.5px;
43
25
  }
44
26
 
45
- .display-6 {
46
- font-size: var(--dx-g-text-base);
47
- letter-spacing: -0.5px;
48
- line-height: var(--dx-g-spacing-lg);
27
+ h4 {
49
28
  margin: var(--dx-g-spacing-lg) 0 var(--dx-g-spacing-sm) 0;
50
29
  }
51
30
 
52
- .display-6 doc-heading-content {
31
+ h4 doc-heading-content {
53
32
  --doc-c-heading-anchor-button-bottom: -6px;
54
33
  }
@@ -5,10 +5,10 @@ export const displayLevels = ["3", "4", "5", "6"];
5
5
  export const ariaLevels = ["1", "2", "3", "4"];
6
6
 
7
7
  export const ariaDisplayLevels: { [key: string]: string } = {
8
- "1": "3",
9
- "2": "4",
10
- "3": "5",
11
- "4": "6"
8
+ "1": "4",
9
+ "2": "5",
10
+ "3": "6",
11
+ "4": "8"
12
12
  };
13
13
 
14
14
  export default class Heading extends LightningElement {
@@ -60,6 +60,6 @@ export default class Heading extends LightningElement {
60
60
  }
61
61
 
62
62
  private get className(): string {
63
- return `display-${this.displayLevel}`;
63
+ return `dx-text-display-${this.displayLevel}`;
64
64
  }
65
65
  }
@@ -287,8 +287,8 @@ export default class DocXmlContent extends LightningElementWithState<{
287
287
  };
288
288
  }
289
289
 
290
- private handlePopState = (): void =>
291
- this.updatePageReference(this.getReferenceFromUrl());
290
+ private handlePopState = (event: PopStateEvent): void =>
291
+ this.updatePageReference(this.getReferenceFromUrl(), event);
292
292
 
293
293
  handleSelect(event: CustomEvent<{ name: string }>): void {
294
294
  event.stopPropagation();
@@ -333,7 +333,10 @@ export default class DocXmlContent extends LightningElementWithState<{
333
333
  this.fetchDocument();
334
334
  };
335
335
 
336
- updatePageReference(newPageReference: PageReference): void {
336
+ updatePageReference(
337
+ newPageReference: PageReference,
338
+ event: PopStateEvent | undefined = undefined
339
+ ): void {
337
340
  this.pageReference.hash = newPageReference.hash;
338
341
  this.pageReference.search = newPageReference.search;
339
342
 
@@ -350,17 +353,16 @@ export default class DocXmlContent extends LightningElementWithState<{
350
353
  }
351
354
 
352
355
  this.fetchContent()
353
- .then(() => this.buildBreadcrumbs())
356
+ .then(() => {
357
+ this.buildBreadcrumbs();
358
+ document.body.scrollTop = event?.state?.scroll?.value || 0;
359
+ })
354
360
  .catch(handleContentError);
355
361
  }
356
362
 
357
363
  getReferenceFromUrl(): PageReference {
358
- const [
359
- page,
360
- docId,
361
- deliverable,
362
- contentDocumentId
363
- ] = window.location.pathname.substr(1).split("/");
364
+ const [page, docId, deliverable, contentDocumentId] =
365
+ window.location.pathname.substr(1).split("/");
364
366
 
365
367
  const { origin: domain, hash, search } = window.location;
366
368
 
@@ -527,14 +529,8 @@ export default class DocXmlContent extends LightningElementWithState<{
527
529
  }
528
530
 
529
531
  private pageReferenceToString(reference: PageReference): string {
530
- const {
531
- page,
532
- docId,
533
- deliverable,
534
- contentDocumentId,
535
- hash,
536
- search
537
- } = reference;
532
+ const { page, docId, deliverable, contentDocumentId, hash, search } =
533
+ reference;
538
534
  return `/${page}/${docId}/${deliverable}/${contentDocumentId}${this.normalizeSearch(
539
535
  search
540
536
  )}${this.normalizeHash(hash)}`;
package/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright (c) 2020, Salesforce.com, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
-
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
-
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
-
10
- * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.