@salesforcedevs/docs-components 0.56.2-seo-test16 → 0.56.2-seo-test17
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
|
@@ -482,6 +482,7 @@ export default class AmfReference extends LightningElement {
|
|
|
482
482
|
parentReferencePath: string,
|
|
483
483
|
meta: string
|
|
484
484
|
): string {
|
|
485
|
+
// update the encoded url meta param
|
|
485
486
|
const encodedMeta = meta ? this.getUrlEncoded(meta) : "";
|
|
486
487
|
return encodedMeta ? `${parentReferencePath}?meta=${encodedMeta}` : "";
|
|
487
488
|
}
|
|
@@ -733,6 +734,7 @@ export default class AmfReference extends LightningElement {
|
|
|
733
734
|
meta?: string
|
|
734
735
|
): void {
|
|
735
736
|
if (meta) {
|
|
737
|
+
// update the encoded url meta param
|
|
736
738
|
const encodedMeta = this.getUrlEncoded(meta);
|
|
737
739
|
window.history.pushState(
|
|
738
740
|
{},
|
|
@@ -750,6 +752,7 @@ export default class AmfReference extends LightningElement {
|
|
|
750
752
|
meta?: string
|
|
751
753
|
): void {
|
|
752
754
|
if (meta) {
|
|
755
|
+
// update the encoded url meta param
|
|
753
756
|
const encodedMeta = this.getUrlEncoded(meta);
|
|
754
757
|
window.history.replaceState(
|
|
755
758
|
{},
|
|
@@ -878,7 +881,7 @@ export default class AmfReference extends LightningElement {
|
|
|
878
881
|
}
|
|
879
882
|
|
|
880
883
|
/**
|
|
881
|
-
*
|
|
884
|
+
* Returns the decoded meta query param from given Url as it is being used internally.
|
|
882
885
|
*/
|
|
883
886
|
getMetaFromUrl(referenceUrl: string): string {
|
|
884
887
|
const indexOfQueryParam = referenceUrl.indexOf("?");
|
|
@@ -915,6 +918,9 @@ export default class AmfReference extends LightningElement {
|
|
|
915
918
|
|
|
916
919
|
/**
|
|
917
920
|
* Gets the encoded url.
|
|
921
|
+
* This method will return the encoded url for 2 cases,
|
|
922
|
+
* 1. If the url is encoded already
|
|
923
|
+
* 2. If the url is decoded
|
|
918
924
|
*/
|
|
919
925
|
getUrlEncoded(url: string) {
|
|
920
926
|
// if url matches, then return the encoded url.
|