@salesforcedevs/dx-components 1.3.92 → 1.3.96
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.3.
|
|
3
|
+
"version": "1.3.96",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"eventsourcemock": "^2.0.0",
|
|
41
41
|
"luxon": "^3.1.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "229d103f3f7fdb30c0cd182c048522d1739c7fc3"
|
|
44
44
|
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
SidebarSearchResult
|
|
25
25
|
} from "typings/custom";
|
|
26
26
|
|
|
27
|
+
const RESULT_CLICK_LOCAL_STORAGE_KEY = "dx-sidebar-search-result-click";
|
|
27
28
|
export const SESSION_KEY = "dx-sidebar-search-state";
|
|
28
29
|
|
|
29
30
|
const DEFAULT_RESULT_COUNT = 20;
|
|
@@ -241,6 +242,22 @@ export default class SidebarSearch extends LightningElement {
|
|
|
241
242
|
this.dispatchOnLoading(false);
|
|
242
243
|
}
|
|
243
244
|
}
|
|
245
|
+
|
|
246
|
+
this.syncAnalytics();
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
private syncAnalytics = () => {
|
|
250
|
+
const storedResult = window.localStorage.getItem(
|
|
251
|
+
RESULT_CLICK_LOCAL_STORAGE_KEY
|
|
252
|
+
);
|
|
253
|
+
if (storedResult) {
|
|
254
|
+
const interactiveResult = buildInteractiveResult(this.engine!, {
|
|
255
|
+
options: { result: JSON.parse(storedResult) }
|
|
256
|
+
});
|
|
257
|
+
interactiveResult.cancelPendingSelect();
|
|
258
|
+
interactiveResult.select();
|
|
259
|
+
window.localStorage.removeItem(RESULT_CLICK_LOCAL_STORAGE_KEY);
|
|
260
|
+
}
|
|
244
261
|
};
|
|
245
262
|
|
|
246
263
|
private onResultListChange = () => {
|
|
@@ -298,11 +315,6 @@ export default class SidebarSearch extends LightningElement {
|
|
|
298
315
|
uniqueId
|
|
299
316
|
} = result;
|
|
300
317
|
|
|
301
|
-
const interactiveResult = buildInteractiveResult(this.engine!, {
|
|
302
|
-
options: { result }
|
|
303
|
-
});
|
|
304
|
-
interactiveResult.cancelPendingSelect();
|
|
305
|
-
|
|
306
318
|
// discussion about this normalization here: https://salesforce-internal.slack.com/archives/C020S6784JX/p1639506238376600
|
|
307
319
|
|
|
308
320
|
let pathname, queryParam;
|
|
@@ -354,7 +366,11 @@ export default class SidebarSearch extends LightningElement {
|
|
|
354
366
|
uniqueId,
|
|
355
367
|
href,
|
|
356
368
|
selected: isSelected,
|
|
357
|
-
select:
|
|
369
|
+
select: () =>
|
|
370
|
+
window.localStorage.setItem(
|
|
371
|
+
RESULT_CLICK_LOCAL_STORAGE_KEY,
|
|
372
|
+
JSON.stringify(result)
|
|
373
|
+
)
|
|
358
374
|
};
|
|
359
375
|
};
|
|
360
376
|
|
|
@@ -68,4 +68,10 @@ export default class SidebarSearchResult extends LightningElement {
|
|
|
68
68
|
private get className(): string {
|
|
69
69
|
return cx("sidebar-item", this.selected && "sidebar-item-selected");
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
private onClick(e: PointerEvent) {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
this.select();
|
|
75
|
+
window.location.href = this.href;
|
|
76
|
+
}
|
|
71
77
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
color: var(--dx-g-text-heading-color);
|
|
4
4
|
font-family: var(--dx-g-font-display);
|
|
5
5
|
font-size: var(--dx-g-text-6xl);
|
|
6
|
-
letter-spacing: -1.
|
|
6
|
+
letter-spacing: -1.8px;
|
|
7
7
|
line-height: 88px;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
color: var(--dx-g-text-heading-color);
|
|
22
22
|
font-family: var(--dx-g-font-display);
|
|
23
23
|
font-size: var(--dx-g-text-5xl);
|
|
24
|
-
letter-spacing: -
|
|
24
|
+
letter-spacing: -1.2px;
|
|
25
25
|
line-height: 64px;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
color: var(--dx-g-text-heading-color);
|
|
31
31
|
font-family: var(--dx-g-font-display);
|
|
32
32
|
font-size: var(--dx-g-text-4xl);
|
|
33
|
-
letter-spacing: -
|
|
33
|
+
letter-spacing: -1px;
|
|
34
34
|
line-height: 56px;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
color: var(--dx-g-text-heading-color);
|
|
40
40
|
font-family: var(--dx-g-font-display);
|
|
41
41
|
font-size: var(--dx-g-text-3xl);
|
|
42
|
-
letter-spacing: -0.
|
|
42
|
+
letter-spacing: -0.8px;
|
|
43
43
|
line-height: 48px;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
color: var(--dx-g-text-heading-color);
|
|
49
49
|
font-family: var(--dx-g-font-display);
|
|
50
50
|
font-size: var(--dx-g-text-2xl);
|
|
51
|
-
letter-spacing: -0.
|
|
51
|
+
letter-spacing: -0.4px;
|
|
52
52
|
line-height: 40px;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
color: var(--dx-g-text-heading-color);
|
|
58
58
|
font-family: var(--dx-g-font-display);
|
|
59
59
|
font-size: var(--dx-g-text-xl);
|
|
60
|
-
letter-spacing: -0.
|
|
60
|
+
letter-spacing: -0.4px;
|
|
61
61
|
line-height: 32px;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
color: var(--dx-g-text-heading-color);
|
|
67
67
|
font-family: var(--dx-g-font-display);
|
|
68
68
|
font-size: var(--dx-g-text-lg);
|
|
69
|
-
letter-spacing: -0.
|
|
69
|
+
letter-spacing: -0.4px;
|
|
70
70
|
line-height: 28px;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
color: var(--dx-g-text-heading-color);
|
|
76
76
|
font-family: var(--dx-g-font-display);
|
|
77
77
|
font-size: var(--dx-g-text-base);
|
|
78
|
-
letter-spacing: -0.
|
|
78
|
+
letter-spacing: -0.5px;
|
|
79
79
|
line-height: 24px;
|
|
80
80
|
}
|
|
81
81
|
|