sr-npm 1.7.1301 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1301",
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,7 +67,6 @@ 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
71
  handleWindowResize(_$w,true);
72
72
  }
@@ -75,10 +75,6 @@ async function careersMultiBoxesPageOnReady(_$w,urlParams) {
75
75
  }
76
76
  }, 600);
77
77
 
78
- // const formFactor = await window.formFactor();
79
- // if(formFactor === "Mobile" || formFactor === "Tablet") {
80
- // handleFilterButton(_$w);
81
- // }
82
78
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_MULTI_STATE_BOX).changeState("results");
83
79
  }
84
80
 
@@ -199,6 +195,7 @@ async function handleUrlParams(_$w,urlParams,handleBackAndForth=false) {
199
195
 
200
196
  currentJobs = items;
201
197
  keywordAllJobs = items;
198
+ await handleSEOTitle(`${decodeURIComponent(urlParams.keyword)} Search Results | The Warehouse Group`);
202
199
  }
203
200
 
204
201
  for (const url of possibleUrlParams)
@@ -431,20 +428,6 @@ async function loadJobsRepeater(_$w) {
431
428
  _$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = []; // start empty
432
429
  _$w(`#${FiltersIds[field.title]}CheckBox`).onChange(async (ev) => {
433
430
 
434
- window.getBoundingRect().then((windowSizeInfo) => {
435
- let windowHeight = windowSizeInfo.window.height; // 565
436
- let windowWidth = windowSizeInfo.window.width; // 1269
437
- let documentHeight = windowSizeInfo.document.height; // 780
438
- let documentWidth = windowSizeInfo.document.width; // 1269
439
- let scrollX = windowSizeInfo.scroll.x; // 0
440
- let scrollY = windowSizeInfo.scroll.y; // 120
441
- console.log("windowHeight: ", windowHeight);
442
- console.log("windowWidth: ", windowWidth);
443
- console.log("documentHeight: ", documentHeight);
444
- console.log("documentWidth: ", documentWidth);
445
- console.log("scrollX: ", scrollX);
446
- console.log("scrollY: ", scrollY);
447
- });
448
431
  dontUpdateThisCheckBox=field._id;
449
432
  const selected = ev.target.value; // array of selected value IDs
450
433
  let fieldTitle=field.title.toLowerCase().replace(' ', '');
@@ -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
  }