@salesforcedevs/docs-components 1.3.296 → 1.3.300-alpha.0
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 +2 -2
- package/src/modules/doc/breadcrumbs/breadcrumbs.ts +17 -10
- package/src/modules/doc/contentCallout/contentCallout.html +1 -1
- package/src/modules/doc/contentCallout/contentCallout.ts +1 -1
- package/src/modules/doc/contentLayout/contentLayout.html +1 -1
- package/src/modules/doc/heading/heading.html +4 -4
- package/src/modules/doc/heading/heading.ts +1 -1
- package/src/modules/doc/headingAnchor/headingAnchor.ts +2 -2
- package/src/modules/doc/headingContent/headingContent.html +2 -2
- package/src/modules/doc/headingContent/headingContent.ts +2 -2
- package/src/modules/doc/overview/overview.html +2 -2
- package/src/modules/doc/overview/overview.ts +1 -1
- package/LICENSE +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.300-alpha.0",
|
|
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": "4629fdd9ca18a13480044ad43515b91945d16aad"
|
|
28
28
|
}
|
|
@@ -112,16 +112,23 @@ export default class Breadcrumbs extends LightningElement {
|
|
|
112
112
|
|
|
113
113
|
renderedCallback(): void {
|
|
114
114
|
if (!this.observer) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
115
|
+
try {
|
|
116
|
+
this.observer = new ResizeObserver((entries) => {
|
|
117
|
+
const [nav] = entries;
|
|
118
|
+
if (this.navWidth === nav.contentRect.width) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
this.navWidth = nav.contentRect.width;
|
|
122
|
+
this.updateDropdownOptionAmount();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
this.observer.observe(this.template.querySelector("nav")!);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error(
|
|
128
|
+
"Error occured while setting up ResizeObserver on breadcrumbs",
|
|
129
|
+
error
|
|
130
|
+
);
|
|
131
|
+
}
|
|
125
132
|
}
|
|
126
133
|
}
|
|
127
134
|
|
|
@@ -3,7 +3,7 @@ import cx from "classnames";
|
|
|
3
3
|
import { CalloutVariant, LightningSlotElement } from "typings/custom";
|
|
4
4
|
|
|
5
5
|
export default class ContentCallout extends LightningElement {
|
|
6
|
-
@api
|
|
6
|
+
@api header!: string;
|
|
7
7
|
@api variant!: CalloutVariant;
|
|
8
8
|
cardVariant?: string;
|
|
9
9
|
iconName?: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<h1 class={className} if:true={isAriaLevelOne}>
|
|
3
|
-
<doc-heading-content
|
|
3
|
+
<doc-heading-content header={header} hash={hash}></doc-heading-content>
|
|
4
4
|
</h1>
|
|
5
5
|
<h2 class={className} if:true={isAriaLevelTwo}>
|
|
6
|
-
<doc-heading-content
|
|
6
|
+
<doc-heading-content header={header} hash={hash}></doc-heading-content>
|
|
7
7
|
</h2>
|
|
8
8
|
<h3 class={className} if:true={isAriaLevelThree}>
|
|
9
|
-
<doc-heading-content
|
|
9
|
+
<doc-heading-content header={header} hash={hash}></doc-heading-content>
|
|
10
10
|
</h3>
|
|
11
11
|
<h4 class={className} if:true={isAriaLevelFour}>
|
|
12
|
-
<doc-heading-content
|
|
12
|
+
<doc-heading-content header={header} hash={hash}></doc-heading-content>
|
|
13
13
|
</h4>
|
|
14
14
|
</template>
|
|
@@ -13,7 +13,7 @@ export const displayLevels = Object.values(ariaDisplayLevels);
|
|
|
13
13
|
|
|
14
14
|
// @ts-ignore: Really Dark Magic (TM) to do with ariaLevel needing explicit getter/setters
|
|
15
15
|
export default class Heading extends LightningElement {
|
|
16
|
-
@api
|
|
16
|
+
@api header: string = "";
|
|
17
17
|
@api hash: string | null = null;
|
|
18
18
|
|
|
19
19
|
@api
|
|
@@ -6,7 +6,7 @@ export default class HeadingAnchor extends LightningElement {
|
|
|
6
6
|
@api iconSize?: IconSize = "override";
|
|
7
7
|
@api iconSprite?: IconSprite = "utility";
|
|
8
8
|
@api iconSymbol?: IconSymbol;
|
|
9
|
-
@api
|
|
9
|
+
@api header: string = "";
|
|
10
10
|
@api urlText: string = "";
|
|
11
11
|
|
|
12
12
|
label: string = "Copy link to clipboard";
|
|
@@ -22,7 +22,7 @@ export default class HeadingAnchor extends LightningElement {
|
|
|
22
22
|
}, 2000);
|
|
23
23
|
|
|
24
24
|
try {
|
|
25
|
-
if (this.
|
|
25
|
+
if (this.header && this.urlText) {
|
|
26
26
|
const [hostUrl] = window.location.href.split("#");
|
|
27
27
|
const url = `${hostUrl}#${this.urlText}`;
|
|
28
28
|
await navigator.clipboard.writeText(url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<template if:false={hash}>{
|
|
2
|
+
<template if:false={hash}>{header}</template>
|
|
3
3
|
<template if:true={hash}>
|
|
4
|
-
<span class="title">{
|
|
4
|
+
<span class="title">{header} </span>
|
|
5
5
|
<dx-tooltip placement="top" label={label}>
|
|
6
6
|
<span class="button-container">
|
|
7
7
|
<button onclick={copy} aria-label="copy">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
|
|
3
3
|
export default class HeadingContent extends LightningElement {
|
|
4
|
-
@api
|
|
4
|
+
@api header: string = "";
|
|
5
5
|
@api hash: string | null = null;
|
|
6
6
|
|
|
7
7
|
label: string = "Copy link to clipboard";
|
|
@@ -18,7 +18,7 @@ export default class HeadingContent extends LightningElement {
|
|
|
18
18
|
}, 2000);
|
|
19
19
|
|
|
20
20
|
try {
|
|
21
|
-
if (this.
|
|
21
|
+
if (this.header && this.hash) {
|
|
22
22
|
const [hostUrl] = window.location.href.split("#");
|
|
23
23
|
const url = `${hostUrl}#${this.hash}`;
|
|
24
24
|
await navigator.clipboard.writeText(url);
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<div class="content">
|
|
11
11
|
<dx-group-text
|
|
12
12
|
class="description"
|
|
13
|
-
|
|
13
|
+
header={header}
|
|
14
14
|
body={description}
|
|
15
15
|
size="large"
|
|
16
16
|
title-aria-level="1"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
<div>
|
|
22
22
|
<dx-group-text
|
|
23
|
-
|
|
23
|
+
header={featuresListTitle}
|
|
24
24
|
size="medium"
|
|
25
25
|
class="features"
|
|
26
26
|
></dx-group-text>
|
|
@@ -3,7 +3,7 @@ import { DocPhaseInfo, FeatureItem, Link } from "typings/custom";
|
|
|
3
3
|
|
|
4
4
|
export default class Overview extends LightningElement {
|
|
5
5
|
@api docPhaseInfo!: DocPhaseInfo;
|
|
6
|
-
@api
|
|
6
|
+
@api header!: string;
|
|
7
7
|
@api description!: string;
|
|
8
8
|
@api primaryLink!: Link;
|
|
9
9
|
@api secondaryLink!: Link;
|
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.
|