sr-npm 1.7.1300 → 1.7.1302
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 +2 -1
- package/pages/careersMultiBoxesPage.js +14 -21
- package/pages/pagesUtils.js +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sr-npm",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1302",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@wix/essentials": "^0.1.24",
|
|
23
23
|
"@wix/secrets": "1.0.53",
|
|
24
24
|
"@wix/site-location": "^1.0.0",
|
|
25
|
+
"@wix/site-seo": "^1.21.0",
|
|
25
26
|
"@wix/site-window": "^1.0.0",
|
|
26
27
|
"axios": "^1.11.0",
|
|
27
28
|
"jest": "^30.0.5",
|
|
@@ -18,7 +18,8 @@ const { groupValuesByField,
|
|
|
18
18
|
getFieldByTitle,
|
|
19
19
|
getCorrectOption,
|
|
20
20
|
getOptionIndexFromCheckBox,
|
|
21
|
-
getAllDatasetItems
|
|
21
|
+
getAllDatasetItems,
|
|
22
|
+
handleSEOTitle
|
|
22
23
|
} = require('./pagesUtils');
|
|
23
24
|
const { handlePrimarySearch, queryPrimarySearchResults } = require('../public/primarySearchUtils');
|
|
24
25
|
|
|
@@ -66,20 +67,19 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
|
|
|
66
67
|
|
|
67
68
|
setInterval(async () => {
|
|
68
69
|
const windowinfo=await window.getBoundingRect();
|
|
69
|
-
console.log("windowinfo: ", windowinfo.window.width);
|
|
70
70
|
if(windowinfo.window.width>1000){
|
|
71
|
+
handleWindowResize(_$w,true);
|
|
72
|
+
}
|
|
73
|
+
else{
|
|
71
74
|
handleWindowResize(_$w);
|
|
72
75
|
}
|
|
73
76
|
}, 600);
|
|
74
77
|
|
|
75
|
-
// const formFactor = await window.formFactor();
|
|
76
|
-
// if(formFactor === "Mobile" || formFactor === "Tablet") {
|
|
77
|
-
// handleFilterButton(_$w);
|
|
78
|
-
// }
|
|
79
78
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_MULTI_STATE_BOX).changeState("results");
|
|
80
79
|
}
|
|
81
80
|
|
|
82
|
-
async function handleWindowResize(_$w) {
|
|
81
|
+
async function handleWindowResize(_$w,desktop=false) {
|
|
82
|
+
if(desktop){
|
|
83
83
|
MOBILE_FILTER_BOX_SELECTORS.forEach(selector => {
|
|
84
84
|
_$w(selector).expand();
|
|
85
85
|
});
|
|
@@ -89,6 +89,12 @@ async function handleWindowResize(_$w) {
|
|
|
89
89
|
_$w(CAREERS_PAGE_SELECTORS.FILTER_ICON).collapse();
|
|
90
90
|
_$w(CAREERS_PAGE_SELECTORS.EXIT_BUTTON).collapse();
|
|
91
91
|
_$w(CAREERS_PAGE_SELECTORS.REFINE_SEARCH_BUTTON).collapse();
|
|
92
|
+
}
|
|
93
|
+
else{
|
|
94
|
+
if(_$w(CAREERS_PAGE_SELECTORS.FILTER_ICON).collapsed && _$w(CAREERS_PAGE_SELECTORS.EXIT_BUTTON).collapsed && _$w(CAREERS_PAGE_SELECTORS.REFINE_SEARCH_BUTTON).collapsed){
|
|
95
|
+
_$w(CAREERS_PAGE_SELECTORS.FILTER_ICON).expand();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
92
98
|
|
|
93
99
|
}
|
|
94
100
|
async function handleBackAndForth(_$w){
|
|
@@ -189,6 +195,7 @@ async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
|
|
|
189
195
|
|
|
190
196
|
currentJobs = items;
|
|
191
197
|
keywordAllJobs = items;
|
|
198
|
+
await handleSEOTitle(`${decodeURIComponent(urlParams.keyword)} Search Results | The Warehouse Group`);
|
|
192
199
|
}
|
|
193
200
|
|
|
194
201
|
for (const url of possibleUrlParams)
|
|
@@ -421,20 +428,6 @@ async function loadJobsRepeater(_$w) {
|
|
|
421
428
|
_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = []; // start empty
|
|
422
429
|
_$w(`#${FiltersIds[field.title]}CheckBox`).onChange(async (ev) => {
|
|
423
430
|
|
|
424
|
-
window.getBoundingRect().then((windowSizeInfo) => {
|
|
425
|
-
let windowHeight = windowSizeInfo.window.height; // 565
|
|
426
|
-
let windowWidth = windowSizeInfo.window.width; // 1269
|
|
427
|
-
let documentHeight = windowSizeInfo.document.height; // 780
|
|
428
|
-
let documentWidth = windowSizeInfo.document.width; // 1269
|
|
429
|
-
let scrollX = windowSizeInfo.scroll.x; // 0
|
|
430
|
-
let scrollY = windowSizeInfo.scroll.y; // 120
|
|
431
|
-
console.log("windowHeight: ", windowHeight);
|
|
432
|
-
console.log("windowWidth: ", windowWidth);
|
|
433
|
-
console.log("documentHeight: ", documentHeight);
|
|
434
|
-
console.log("documentWidth: ", documentWidth);
|
|
435
|
-
console.log("scrollX: ", scrollX);
|
|
436
|
-
console.log("scrollY: ", scrollY);
|
|
437
|
-
});
|
|
438
431
|
dontUpdateThisCheckBox=field._id;
|
|
439
432
|
const selected = ev.target.value; // array of selected value IDs
|
|
440
433
|
let fieldTitle=field.title.toLowerCase().replace(' ', '');
|
package/pages/pagesUtils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { items: wixData } = require('@wix/data');
|
|
2
2
|
const { JOBS_COLLECTION_FIELDS,COLLECTIONS } = require('../backend/collectionConsts');
|
|
3
3
|
const { normalizeString } = require('../backend/utils');
|
|
4
|
-
|
|
4
|
+
const { seo } = require('@wix/site-seo');
|
|
5
5
|
function groupValuesByField(values, refKey) {
|
|
6
6
|
const map = new Map();
|
|
7
7
|
for (const v of values) {
|
|
@@ -106,6 +106,11 @@ async function getLatestJobsByValue(Value) {
|
|
|
106
106
|
return latestJobs;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
async function handleSEOTitle(title) {
|
|
110
|
+
await seo.setTitle(title);
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
module.exports = {
|
|
110
115
|
groupValuesByField,
|
|
111
116
|
debounce,
|
|
@@ -117,5 +122,6 @@ module.exports = {
|
|
|
117
122
|
getLatestJobsByValue,
|
|
118
123
|
getValueFromValueId,
|
|
119
124
|
getAllRecordsWithoutMultiRef,
|
|
120
|
-
getAllDatasetItems
|
|
125
|
+
getAllDatasetItems,
|
|
126
|
+
handleSEOTitle
|
|
121
127
|
}
|