@salesforcedevs/dx-components 1.18.9-add-scroll → 1.18.9-rnb-scroll1
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
|
@@ -5,13 +5,10 @@ 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 { handleScroll } from 'dxUtils/handleScroll';
|
|
9
8
|
|
|
10
9
|
const MOBILE_SIZE_MATCH = "768px";
|
|
11
10
|
|
|
12
11
|
export default class Sidebar extends SidebarBase {
|
|
13
|
-
handleScroll: (e: any) => void = () => {};
|
|
14
|
-
|
|
15
12
|
@api coveoOrganizationId!: string;
|
|
16
13
|
@api coveoPublicAccessToken!: string;
|
|
17
14
|
@api coveoSearchHub!: string;
|
|
@@ -145,8 +142,6 @@ export default class Sidebar extends SidebarBase {
|
|
|
145
142
|
}
|
|
146
143
|
|
|
147
144
|
connectedCallback() {
|
|
148
|
-
this.handleScroll = handleScroll.bind(this);
|
|
149
|
-
|
|
150
145
|
this.matchMedia = window.matchMedia(
|
|
151
146
|
`(max-width: ${MOBILE_SIZE_MATCH})`
|
|
152
147
|
);
|
|
@@ -7,8 +7,7 @@ import { handleScroll } from 'dxUtils/handleScroll';
|
|
|
7
7
|
|
|
8
8
|
export default class Toc extends LightningElement {
|
|
9
9
|
showBoxShadow: boolean = false;
|
|
10
|
-
|
|
11
|
-
handleScroll: (e: any) => void = () => {};
|
|
10
|
+
handleScroll = handleScroll.bind(this);
|
|
12
11
|
|
|
13
12
|
@api header!: string;
|
|
14
13
|
|
|
@@ -43,10 +42,6 @@ export default class Toc extends LightningElement {
|
|
|
43
42
|
|
|
44
43
|
@track _options!: Array<ContentElement>;
|
|
45
44
|
|
|
46
|
-
connectedCallback() {
|
|
47
|
-
this.handleScroll = handleScroll.bind(this);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
45
|
private onClick(e: Event) {
|
|
51
46
|
const target = e.currentTarget as HTMLElement;
|
|
52
47
|
const id = target.getAttribute("contentid");
|
|
@@ -2,12 +2,14 @@ import { LightningElement, api } from "lwc";
|
|
|
2
2
|
import type { OptionWithLink } from "typings/custom";
|
|
3
3
|
import { toJson } from "dxUtils/normalizers";
|
|
4
4
|
import { Brand, DevCenterConfig } from "typings/custom";
|
|
5
|
+
import { handleScroll } from 'dxUtils/handleScroll';
|
|
5
6
|
|
|
6
7
|
export const HEIGHT_OF_SIDEBAR_ITEM = 32;
|
|
7
8
|
export const WAIT_TIME_BEFORE_SCROLL_IN_MS = 500;
|
|
8
9
|
|
|
9
10
|
export class SidebarBase extends LightningElement {
|
|
10
11
|
_sidebarContent: HTMLElement | null = null;
|
|
12
|
+
handleScroll = handleScroll.bind(this);
|
|
11
13
|
|
|
12
14
|
selectedElement: HTMLElement | null = null;
|
|
13
15
|
timerId: ReturnType<typeof setTimeout> | null = null;
|
|
@@ -16,7 +18,6 @@ export class SidebarBase extends LightningElement {
|
|
|
16
18
|
expanded: boolean = true;
|
|
17
19
|
_value?: string = undefined;
|
|
18
20
|
showBoxShadow: boolean = false;
|
|
19
|
-
private scrolling: boolean = false;
|
|
20
21
|
_devCenter!: DevCenterConfig;
|
|
21
22
|
|
|
22
23
|
@api langValuePath: string = "id";
|