@salesforcedevs/docs-components 1.3.396 → 1.3.400-amf-alpha1
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.400-amf-alpha1",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@api-components/amf-helper-mixin": "4.5.
|
|
14
|
+
"@api-components/amf-helper-mixin": "4.5.29",
|
|
15
15
|
"classnames": "2.5.1",
|
|
16
16
|
"kagekiri": "1.4.2",
|
|
17
17
|
"lodash.orderby": "4.6.0",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/lodash.orderby": "4.6.9",
|
|
25
25
|
"@types/lodash.uniqby": "4.7.9"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
|
|
28
28
|
}
|
|
@@ -28,8 +28,8 @@ export default class Breadcrumbs extends LightningElement {
|
|
|
28
28
|
set breadcrumbs(value) {
|
|
29
29
|
this.normalizeAndAssignBreadcrumbs(value);
|
|
30
30
|
this.calculateBreadcrumbsConfigs();
|
|
31
|
-
if (this.
|
|
32
|
-
this.
|
|
31
|
+
if (this.isRendered) {
|
|
32
|
+
this.onWidthOrContentChange();
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -45,9 +45,9 @@ export default class Breadcrumbs extends LightningElement {
|
|
|
45
45
|
private _breadcrumbs: Breadcrumb[] = [];
|
|
46
46
|
private _pixelPerCharacter = CONSTANTS.pixelPerCharacter;
|
|
47
47
|
private navWidth = 0;
|
|
48
|
-
private observer: ResizeObserver | null = null;
|
|
49
48
|
private breadcrumbConfigs: BreadcrumbConfig[] = [];
|
|
50
49
|
private dropdownOptionAmount? = 0;
|
|
50
|
+
private isRendered = false;
|
|
51
51
|
|
|
52
52
|
private get renderSmallVariant(): boolean {
|
|
53
53
|
return (
|
|
@@ -110,30 +110,21 @@ export default class Breadcrumbs extends LightningElement {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
private onWidthOrContentChange = () => {
|
|
114
|
+
this.navWidth = this.template
|
|
115
|
+
.querySelector("nav")!
|
|
116
|
+
.getBoundingClientRect().width;
|
|
117
|
+
this.updateDropdownOptionAmount();
|
|
118
|
+
};
|
|
119
|
+
|
|
113
120
|
renderedCallback(): void {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
}
|
|
132
|
-
}
|
|
121
|
+
this.isRendered = true;
|
|
122
|
+
this.onWidthOrContentChange();
|
|
123
|
+
window.addEventListener("resize", this.onWidthOrContentChange);
|
|
133
124
|
}
|
|
134
125
|
|
|
135
126
|
disconnectedCallback(): void {
|
|
136
|
-
this.
|
|
127
|
+
window.removeEventListener("resize", this.onWidthOrContentChange);
|
|
137
128
|
}
|
|
138
129
|
|
|
139
130
|
private normalizeAndAssignBreadcrumbs(breadcrumbs?: Breadcrumb[] | string) {
|
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.
|