@salesforcedevs/dx-components 1.36.3 → 1.37.1
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
|
+
"version": "1.37.1",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"luxon": "3.4.4",
|
|
45
45
|
"msw": "^2.12.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "0425dec453ebb79ed0041e1c8ea18fccf893d425"
|
|
48
48
|
}
|
|
@@ -1056,4 +1056,43 @@
|
|
|
1056
1056
|
</clipPath>
|
|
1057
1057
|
</defs>
|
|
1058
1058
|
</symbol>
|
|
1059
|
+
<symbol id="insurance" viewBox="0 0 64 64">
|
|
1060
|
+
<style type="text/css">
|
|
1061
|
+
.cls-1-insurance{fill:#481a54;}
|
|
1062
|
+
</style>
|
|
1063
|
+
<path class="cls-1-insurance" d="M40.604,50.536h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1064
|
+
<path class="cls-1-insurance" d="M40.604,41.364h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1065
|
+
<path class="cls-1-insurance" d="M48.575,10.676l1.065.392c-.333-.174-.685-.317-1.065-.392Z"/>
|
|
1066
|
+
<path class="cls-1-insurance" d="M47.789,32.825v23.155H12.955V14.616h15.09v-2.067l5.299-1.952H12.955c-2.22,0-4.02,1.8-4.02,4.02v41.365c0,2.22,1.8,4.02,4.02,4.02h34.833c2.22,0,4.019-1.8,4.019-4.02v-27.184c-.963,1.549-2.307,2.783-4.019,4.029Z"/>
|
|
1067
|
+
<path class="cls-1-insurance" d="M41.365,8.02l12.294,4.529v6.862c0,8.595-3.282,10.693-9.821,14.874l-2.472,1.581-2.472-1.581c-6.539-4.181-9.822-6.279-9.822-14.874v-6.862l12.294-4.529M41.365,4c-.471,0-.941.083-1.39.248l-12.294,4.529c-1.58.582-2.63,2.088-2.63,3.772v6.862c0,10.795,4.897,13.927,11.676,18.26l2.473,1.581c.66.422,1.413.633,2.165.633s1.505-.211,2.165-.633l2.472-1.581c6.778-4.333,11.676-7.465,11.676-18.26v-6.862c0-1.684-1.05-3.19-2.63-3.772l-12.294-4.529c-.448-.165-.919-.248-1.39-.248h0Z"/>
|
|
1068
|
+
<path class="cls-1-insurance" d="M40.203,22.874l-2.463-1.97c-.928-.743-2.288-.595-3.033.337-.745.931-.594,2.289.337,3.033l4.341,3.473c.385.309.861.473,1.348.473.118,0,.236-.009.354-.03.605-.1,1.138-.453,1.467-.971l6.077-9.551c.64-1.005.344-2.34-.663-2.979-1.004-.64-2.34-.344-2.979.663l-4.786,7.521Z"/>
|
|
1069
|
+
<path class="cls-1-insurance" d="M29.781,28.1h-9.64c-1.13,0-2.046.916-2.046,2.046s.916,2.046,2.046,2.046h14.093c-1.89-1.305-3.371-2.55-4.453-4.093Z"/>
|
|
1070
|
+
</symbol>
|
|
1071
|
+
<symbol id="insurance-full" viewBox="0 0 64 64">
|
|
1072
|
+
<style type="text/css">
|
|
1073
|
+
.cls-1-insurance-full{fill:#fff;}
|
|
1074
|
+
.cls-2-insurance-full{fill:#d17dfe;}
|
|
1075
|
+
.cls-3-insurance-full{fill:#481a54;}
|
|
1076
|
+
</style>
|
|
1077
|
+
<path class="cls-2-insurance-full" d="M12.955,14.616v41.365h34.833V14.616H12.955Z"/>
|
|
1078
|
+
<path class="cls-3-insurance-full" d="M47.789,14.616v41.365H12.955V14.616h34.833M47.789,10.596H12.955c-2.22,0-4.02,1.8-4.02,4.02v41.365c0,2.22,1.8,4.02,4.02,4.02h34.833c2.22,0,4.02-1.8,4.02-4.02V14.616c0-2.22-1.8-4.02-4.02-4.02h0Z"/>
|
|
1079
|
+
<path class="cls-1-insurance-full" d="M40.604,50.536h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1080
|
+
<path class="cls-1-insurance-full" d="M40.604,41.364h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1081
|
+
<path class="cls-1-insurance-full" d="M40.604,32.192h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1082
|
+
<path class="cls-2-insurance-full" d="M53.659,19.411c0,8.595-3.282,10.693-9.821,14.874l-2.472,1.581-2.472-1.581c-6.539-4.181-9.822-6.279-9.822-14.874v-6.862l12.294-4.529,12.294,4.529v6.862Z"/>
|
|
1083
|
+
<path class="cls-3-insurance-full" d="M41.365,8.02l12.294,4.529v6.862c0,8.595-3.282,10.693-9.821,14.874l-2.472,1.581-2.472-1.581c-6.539-4.181-9.822-6.279-9.822-14.874v-6.862l12.294-4.529M41.365,4c-.471,0-.941.083-1.39.248l-12.294,4.529c-1.58.582-2.63,2.088-2.63,3.772v6.862c0,10.795,4.897,13.927,11.676,18.26l2.473,1.581c.66.422,1.413.633,2.165.633s1.505-.211,2.165-.633l2.472-1.581c6.778-4.333,11.676-7.465,11.676-18.26v-6.862c0-1.684-1.05-3.19-2.63-3.772l-12.294-4.529c-.448-.165-.919-.248-1.39-.248h0Z"/>
|
|
1084
|
+
<path class="cls-1-insurance-full" d="M40.203,22.874l-2.463-1.97c-.928-.743-2.288-.595-3.033.337-.745.931-.594,2.289.337,3.033l4.341,3.473c.385.309.861.473,1.348.473.118,0,.236-.009.354-.03.605-.1,1.138-.453,1.467-.971l6.077-9.551c.64-1.005.344-2.34-.663-2.979-1.004-.64-2.34-.344-2.979.663l-4.786,7.521Z"/>
|
|
1085
|
+
</symbol>
|
|
1086
|
+
<symbol id="insurance-white" viewBox="0 0 64 64">
|
|
1087
|
+
<style type="text/css">
|
|
1088
|
+
.cls-1-insurance-white{fill:#fff;}
|
|
1089
|
+
</style>
|
|
1090
|
+
<path class="cls-1-insurance-white" d="M40.604,50.536h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1091
|
+
<path class="cls-1-insurance-white" d="M40.604,41.364h-20.463c-1.13,0-2.046-.916-2.046-2.046s.916-2.046,2.046-2.046h20.463c1.13,0,2.046.916,2.046,2.046s-.916,2.046-2.046,2.046Z"/>
|
|
1092
|
+
<path class="cls-1-insurance-white" d="M48.575,10.676l1.065.392c-.333-.174-.685-.317-1.065-.392Z"/>
|
|
1093
|
+
<path class="cls-1-insurance-white" d="M47.789,32.825v23.155H12.955V14.616h15.09v-2.067l5.299-1.952H12.955c-2.22,0-4.02,1.8-4.02,4.02v41.365c0,2.22,1.8,4.02,4.02,4.02h34.833c2.22,0,4.019-1.8,4.019-4.02v-27.184c-.963,1.549-2.307,2.783-4.019,4.029Z"/>
|
|
1094
|
+
<path class="cls-1-insurance-white" d="M41.365,8.02l12.294,4.529v6.862c0,8.595-3.282,10.693-9.821,14.874l-2.472,1.581-2.472-1.581c-6.539-4.181-9.822-6.279-9.822-14.874v-6.862l12.294-4.529M41.365,4c-.471,0-.941.083-1.39.248l-12.294,4.529c-1.58.582-2.63,2.088-2.63,3.772v6.862c0,10.795,4.897,13.927,11.676,18.26l2.473,1.581c.66.422,1.413.633,2.165.633s1.505-.211,2.165-.633l2.472-1.581c6.778-4.333,11.676-7.465,11.676-18.26v-6.862c0-1.684-1.05-3.19-2.63-3.772l-12.294-4.529c-.448-.165-.919-.248-1.39-.248h0Z"/>
|
|
1095
|
+
<path class="cls-1-insurance-white" d="M40.203,22.874l-2.463-1.97c-.928-.743-2.288-.595-3.033.337-.745.931-.594,2.289.337,3.033l4.341,3.473c.385.309.861.473,1.348.473.118,0,.236-.009.354-.03.605-.1,1.138-.453,1.467-.971l6.077-9.551c.64-1.005.344-2.34-.663-2.979-1.004-.64-2.34-.344-2.979.663l-4.786,7.521Z"/>
|
|
1096
|
+
<path class="cls-1-insurance-white" d="M29.781,28.1h-9.64c-1.13,0-2.046.916-2.046,2.046s.916,2.046,2.046,2.046h14.093c-1.89-1.305-3.371-2.55-4.453-4.093Z"/>
|
|
1097
|
+
</symbol>
|
|
1059
1098
|
</svg>
|
|
@@ -5,6 +5,7 @@ import { track } from "dxUtils/analytics";
|
|
|
5
5
|
const RESTORE_SCROLL_EVENT_NAME = "restore-scroll";
|
|
6
6
|
const SCROLL_EVENT_NAME = "scroll";
|
|
7
7
|
const GLOBAL_NAV_TOGGLE_EVENT_NAME = "toggle_global_nav";
|
|
8
|
+
const FULLSCREEN_CHANGE_EVENT_NAME = "fullscreenchange";
|
|
8
9
|
|
|
9
10
|
const LOAD_TIME_SCROLL_RESTORE_DELAY = 750;
|
|
10
11
|
const REDUNDANT_INSTANCE_ERROR_MESSAGE =
|
|
@@ -55,6 +56,7 @@ export default class ScrollManager extends LightningElement {
|
|
|
55
56
|
private scrolledSevenFivePercent = false;
|
|
56
57
|
private scrolledOneHundredPercent = false;
|
|
57
58
|
private scrollUnlocked = false;
|
|
59
|
+
private lastKnownScrollTop = 0;
|
|
58
60
|
|
|
59
61
|
renderedCallback() {
|
|
60
62
|
scrollUnlocked = window.location.hash !== ""; // if we have anchor links, skip the entire scroll restore
|
|
@@ -105,15 +107,39 @@ export default class ScrollManager extends LightningElement {
|
|
|
105
107
|
GLOBAL_NAV_TOGGLE_EVENT_NAME,
|
|
106
108
|
this.onGlobalNavToggle
|
|
107
109
|
);
|
|
110
|
+
document.addEventListener(
|
|
111
|
+
FULLSCREEN_CHANGE_EVENT_NAME,
|
|
112
|
+
this.onFullscreenChange
|
|
113
|
+
);
|
|
108
114
|
} else {
|
|
109
115
|
console.error(REDUNDANT_INSTANCE_ERROR_MESSAGE);
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
|
|
113
119
|
onWindowScroll = () => {
|
|
120
|
+
if (!document.fullscreenElement) {
|
|
121
|
+
this.lastKnownScrollTop = (
|
|
122
|
+
document.scrollingElement || document.body
|
|
123
|
+
).scrollTop;
|
|
124
|
+
}
|
|
114
125
|
this.updateScrollState();
|
|
115
126
|
};
|
|
116
127
|
|
|
128
|
+
/*
|
|
129
|
+
Preserve the last valid scroll position, as fullscreen temporarily resets it to 0.
|
|
130
|
+
Used to restore the original position on exit.
|
|
131
|
+
*/
|
|
132
|
+
onFullscreenChange = () => {
|
|
133
|
+
const isExitingFullscreen = !document.fullscreenElement;
|
|
134
|
+
if (isExitingFullscreen && this.lastKnownScrollTop > 0) {
|
|
135
|
+
const target = this.lastKnownScrollTop;
|
|
136
|
+
requestAnimationFrame(() => {
|
|
137
|
+
document.body.scrollTop = document.documentElement.scrollTop =
|
|
138
|
+
target;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
117
143
|
onGlobalNavToggle = (event: Event) => {
|
|
118
144
|
const isGlobalNavShowing: boolean = (event as CustomEvent).detail;
|
|
119
145
|
HTML_ELEMENT?.setAttribute(
|
|
@@ -208,5 +234,9 @@ export default class ScrollManager extends LightningElement {
|
|
|
208
234
|
GLOBAL_NAV_TOGGLE_EVENT_NAME,
|
|
209
235
|
this.onGlobalNavToggle
|
|
210
236
|
);
|
|
237
|
+
document.removeEventListener(
|
|
238
|
+
FULLSCREEN_CHANGE_EVENT_NAME,
|
|
239
|
+
this.onFullscreenChange
|
|
240
|
+
);
|
|
211
241
|
}
|
|
212
242
|
}
|