@salesforcedevs/dx-components 0.56.2-seo-dx-test1 → 0.56.2-seo-test12

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/dx-components",
3
- "version": "0.56.2-seo-dx-test1",
3
+ "version": "0.56.2-seo-test12",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -6,7 +6,7 @@
6
6
  outline: none;
7
7
  }
8
8
 
9
- .select_container::before {
9
+ .select_container::after {
10
10
  --icon-size: 0.5em;
11
11
 
12
12
  border-style: solid;
@@ -128,16 +128,17 @@ select {
128
128
  width: 100%;
129
129
  border: 1px solid #dddbda;
130
130
  border-radius: 0.25rem;
131
- background-color: white;
131
+ background-color: transparent;
132
132
  -webkit-transition: border 0.1s linear, background-color 0.1s linear;
133
133
  transition: border 0.1s linear, background-color 0.1s linear;
134
+ z-index: 1;
134
135
  }
135
136
 
136
137
  .select-element:focus,
137
138
  .select-element:active {
138
139
  outline: 0;
139
140
  border-color: #1b96ff;
140
- background-color:white;
141
+ background-color: transparent;
141
142
  -webkit-box-shadow: 0 0 3px #0176d3;
142
143
  box-shadow: 0 0 3px #0176d3;
143
144
  }
@@ -153,6 +154,7 @@ select {
153
154
  -ms-user-select: none;
154
155
  user-select: none;
155
156
  opacity: 1;
157
+ z-index: 0;
156
158
  }
157
159
 
158
160
  .select-element[disabled]:focus,
@@ -180,7 +182,9 @@ select {
180
182
  }
181
183
 
182
184
  .select_container {
185
+ display: grid;
183
186
  position: relative;
187
+ background-color: white;
184
188
  }
185
189
 
186
190
  .select_container .select-element {
@@ -307,12 +307,28 @@ export default class SidebarSearch extends LightningElement {
307
307
  }
308
308
 
309
309
  let href;
310
- if (queryParam) {
310
+ let isSelected = false;
311
+ const isReferenceUrl = clickUri.includes("/references/");
312
+ if (isReferenceUrl) {
311
313
  href = `${pathname}${queryParam}&q=${this.value}`;
314
+
315
+ //NOTE: This is specific to references related comparison
316
+ const resultHrefWithMetaQuery = `${pathname}${queryParam}`;
317
+
318
+ const urlParams = new URLSearchParams(window.location.search);
319
+ const metaQueryParam = urlParams.get("meta");
320
+
321
+ let currentUrlPathWithQuery = window.location.pathname;
322
+ if (metaQueryParam) {
323
+ currentUrlPathWithQuery = `${currentUrlPathWithQuery}?meta=${metaQueryParam}`;
324
+ }
325
+
326
+ isSelected = resultHrefWithMetaQuery === currentUrlPathWithQuery;
312
327
  } else {
313
328
  href = `${pathname}?q=${this.value}`;
329
+ isSelected = pathname === window.location.pathname;
314
330
  }
315
- const currentUrlHrefWithQuery = `${window.location.pathname}${window.location.search}`;
331
+
316
332
  return {
317
333
  title,
318
334
  titleHighlights,
@@ -320,7 +336,7 @@ export default class SidebarSearch extends LightningElement {
320
336
  excerptHighlights,
321
337
  uniqueId,
322
338
  href,
323
- selected: href.startsWith(currentUrlHrefWithQuery)
339
+ selected: isSelected
324
340
  };
325
341
  };
326
342
 
@@ -1,14 +1 @@
1
1
  export * from "./breakpoints";
2
-
3
- export const DEFAULT_LANGUAGES = [
4
- {
5
- id: "en-us",
6
- label: "language_english",
7
- displayText: "English"
8
- },
9
- {
10
- id: "ja-jp",
11
- label: "language_japanese",
12
- displayText: "日本語"
13
- }
14
- ];