@salesforcedevs/docs-components 1.21.1-redocly3 → 1.23.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/LICENSE ADDED
@@ -0,0 +1,12 @@
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.21.1-redocly3",
3
+ "version": "1.23.0",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -25,7 +25,7 @@
25
25
  "@types/lodash.orderby": "4.6.9",
26
26
  "@types/lodash.uniqby": "4.7.9"
27
27
  },
28
- "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad",
28
+ "gitHead": "307353d10848546abcb801cbb4bc30c323e3e929",
29
29
  "volta": {
30
30
  "node": "20.19.0",
31
31
  "yarn": "1.22.19"
@@ -75,6 +75,7 @@ export default class RedocReference extends LightningElement {
75
75
 
76
76
  renderedCallback(): void {
77
77
  if (!this.redocInitialized) {
78
+ this.redocInitialized = true;
78
79
  this.initializeRedoc();
79
80
  }
80
81
  }
@@ -83,6 +84,8 @@ export default class RedocReference extends LightningElement {
83
84
  window.removeEventListener("scroll", this.handleScrollAndResize);
84
85
  window.removeEventListener("resize", this.handleScrollAndResize);
85
86
 
87
+ this.handleScrollAndResize?.cancel?.();
88
+
86
89
  // Clean up cached DOM element references to prevent memory leaks
87
90
  this.docHeaderElement = null;
88
91
  this.docPhaseWrapperElement = null;
@@ -215,7 +218,6 @@ export default class RedocReference extends LightningElement {
215
218
  // Initializes Redoc library with selected reference configuration
216
219
  private async initializeRedoc(): Promise<void> {
217
220
  try {
218
- this.redocInitialized = true;
219
221
  await this.waitForRedoc();
220
222
 
221
223
  const redocContainer = this.getRedocContainer();
@@ -230,9 +232,7 @@ export default class RedocReference extends LightningElement {
230
232
 
231
233
  const specUrl = selectedRef.source;
232
234
  if (!specUrl) {
233
- this.showErrorUI(
234
- "Spec URL or Redoc container is not found."
235
- );
235
+ this.showErrorUI("Spec URL not found.");
236
236
  return;
237
237
  }
238
238