sr-npm 1.7.232 → 1.7.234

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": "sr-npm",
3
- "version": "1.7.232",
3
+ "version": "1.7.234",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,6 @@ const {
17
17
  let queryKeyWordVar;
18
18
  let queryDepartmentVar;
19
19
  let queryLocationVar;
20
- let searchInputFocused = false;
21
20
  async function careersPageOnReady(_$w,thisObject,queryParams) {
22
21
  console.log("queryParams: ", queryParams);
23
22
  const { page, keyWord, department, location } = queryParams;
@@ -159,12 +158,10 @@ async function bind(_$w) {
159
158
  });
160
159
  }
161
160
 
162
- function init(_$w) {
161
+ async function init(_$w) {
163
162
  const debouncedSearch = debounce(()=>applyFilters(_$w), 400,thisObjectVar);
164
163
 
165
164
  _$w('#searchInput').onInput(debouncedSearch);
166
- _$w('#searchInput').onFocus(() => { searchInputFocused = true; });
167
- _$w('#searchInput').onBlur(() => { searchInputFocused = false; });
168
165
  _$w('#dropdownDepartment, #dropdownLocation, #dropdownJobType').onChange(()=>applyFilters(_$w));
169
166
  _$w('#resetFiltersButton, #clearSearch').onClick(()=>resetFilters(_$w));
170
167
 
@@ -175,10 +172,13 @@ function init(_$w) {
175
172
  _$w('#closeFiltersButton').onClick(()=>{
176
173
  _$w('#dropdownsContainer, #closeFiltersButton').collapse();
177
174
  });
175
+
176
+ if (await window.formFactor === "Mobile") {
177
+ _$w('#closeFiltersButton').expand();
178
+ }
178
179
  }
179
180
 
180
181
  async function applyFilters(_$w, skipUrlUpdate = false) {
181
-
182
182
  const dropdownFiltersMapping = [
183
183
  { elementId: '#dropdownDepartment', field: 'department', value: _$w('#dropdownDepartment').value },
184
184
  { elementId: '#dropdownLocation', field: 'cityText', value: _$w('#dropdownLocation').value },
@@ -240,13 +240,6 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
240
240
  await _$w('#jobsDataset').setFilter(filter);
241
241
  await _$w('#jobsDataset').refresh();
242
242
 
243
-
244
- if (searchInputFocused) {
245
- console.log("focusing search input");
246
- _$w('#searchInput').focus();
247
-
248
- }
249
-
250
243
  const count = await updateCount(_$w);
251
244
  console.log("updating map markers");
252
245
  await updateMapMarkers(_$w,count);
@@ -356,7 +349,6 @@ async function updateMapMarkers(_$w,count){
356
349
  const markers = items.items.map(item => {
357
350
  const location = item.locationAddress.location;
358
351
  return {
359
-
360
352
  location: {
361
353
  latitude: location.latitude,
362
354
  longitude: location.longitude