@salesforcedevs/dx-components 1.15.3 → 1.15.4-ldh-alpha

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": "1.15.3",
3
+ "version": "1.15.4-ldh-alpha",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -45,6 +45,5 @@
45
45
  },
46
46
  "volta": {
47
47
  "node": "20.19.0"
48
- },
49
- "gitHead": "f8d314c2694651bca752ec3a45bd0673c4a4ada4"
48
+ }
50
49
  }
@@ -1,9 +1,9 @@
1
1
  // urlWatcherComponent.ts
2
2
  import { LightningElement } from "lwc";
3
- import UrlWatcher from "dxUtils/urlWatcher";
3
+ import { UrlWatcher } from "dxUtils/urlWatcher";
4
4
 
5
5
  export default class UrlWatcherComponent extends LightningElement {
6
- watcher = UrlWatcher;
6
+ watcher = UrlWatcher.getInstance();
7
7
  connectedCallback() {
8
8
  // Just ensure the singleton initializes
9
9
  }
@@ -24,6 +24,21 @@
24
24
  </div>
25
25
  <div class="sidebar-header" show-shadow={showBoxShadow}>
26
26
  <div class="header padding-horizontal" lwc:if={isDesktop}>
27
+ <div lwc:if={devCenter} class="dev-center-link">
28
+ <a href={devCenter.link} class="dev-center-content">
29
+ <dx-icon symbol="back"></dx-icon>
30
+ <dx-icon
31
+ class="brand-icon"
32
+ lwc:if={devCenter.icon}
33
+ sprite="salesforcebrand"
34
+ symbol={brand}
35
+ size="large"
36
+ ></dx-icon>
37
+ <h2 class="dx-text-display-6 header-title">
38
+ {devCenter.title}
39
+ </h2>
40
+ </a>
41
+ </div>
27
42
  <h2 class="dx-text-display-6 header-title">{header}</h2>
28
43
  </div>
29
44
  <div class="search padding-horizontal">
@@ -5,6 +5,7 @@ import { getSidebarSearchParams } from "dxUtils/coveo";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
  import SidebarSearch from "dx/sidebarSearch";
7
7
  import { SidebarBase } from "dxBaseElements/sidebarBase";
8
+ import { Brand } from "typings/custom";
8
9
 
9
10
  const MOBILE_SIZE_MATCH = "768px";
10
11
 
@@ -14,6 +15,16 @@ export default class Sidebar extends SidebarBase {
14
15
  @api coveoSearchHub!: string;
15
16
  @api coveoAdvancedQueryConfig!: string;
16
17
  @api header: string = "";
18
+ @api brand: Brand | null = null;
19
+
20
+ @api
21
+ get devCenter() {
22
+ return this._devCenter;
23
+ }
24
+
25
+ set devCenter(value) {
26
+ this._devCenter = toJson(value);
27
+ }
17
28
 
18
29
  @api
19
30
  get trees() {
@@ -53,6 +64,7 @@ export default class Sidebar extends SidebarBase {
53
64
  private scrollToSelectedSearchResult: boolean = false;
54
65
  private selectedSearchResultIndex: number = -1;
55
66
  private requestedFetchMoreResults: boolean = false;
67
+ private _devCenter: any;
56
68
 
57
69
  private get areResultsEmpty(): boolean {
58
70
  return (
@@ -1,7 +1,7 @@
1
1
  // utils/urlWatcher.ts
2
2
  // there's a _lot_ of typescript fuckery happening here, because this whole class violates the laws of nature
3
3
  // please do not be alarmed.
4
- class UrlWatcher {
4
+ export class UrlWatcher {
5
5
  // eslint-disable-next-line no-use-before-define
6
6
  private static instance: UrlWatcher;
7
7
  private lastUrl: string = window.location.href;
@@ -77,5 +77,3 @@ class UrlWatcher {
77
77
  }
78
78
  }
79
79
  }
80
-
81
- export default UrlWatcher.getInstance();
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.
@@ -1 +0,0 @@
1
- <template></template>