@inploi/plugin-job-search 8.3.0 → 8.4.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/cdn/index.js +93 -93
- package/dist/components/geo-search.d.ts +6 -1
- package/dist/components/geo-search.geocode.d.ts +36 -0
- package/dist/components/geo-search.geocode.test.d.ts +1 -0
- package/dist/components/geo-search.location-input.d.ts +4 -2
- package/dist/components/job-search.alerts.test.d.ts +1 -0
- package/dist/components/job-search.d.ts +8 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +149 -143
- package/dist/job-search.api.d.ts +2 -0
- package/dist/lib/countries.d.ts +8 -0
- package/dist/lib/countries.test.d.ts +1 -0
- package/dist/lib/distance.d.ts +3 -2
- package/dist/{map-5b358f66.cjs → map-4108c113.cjs} +1 -1
- package/dist/{map-e6c052ec.js → map-e0e84eac.js} +1 -1
- package/dist/style/tokens.d.ts +1 -1
- package/dist/utils-1d47427d.cjs +60 -0
- package/dist/{utils-65ec6e7e.js → utils-c371d06a.js} +2869 -2755
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +4 -4
- package/dist/utils-864c9c53.cjs +0 -60
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { l as
|
|
2
|
-
import {
|
|
1
|
+
import { l as u, _ as y, k as U, J as ao, g as xo, c as yo, K as ko, a as _o, i as zo, T as So, b as Yo, I as Do, d as Fo, U as Ao, E as Eo, e as $o } from "./utils-c371d06a.js";
|
|
2
|
+
import { f as rr } from "./utils-c371d06a.js";
|
|
3
3
|
import { createPlugin as Co } from "@inploi/sdk";
|
|
4
|
-
var Lo = "diffed",
|
|
5
|
-
function
|
|
4
|
+
var Lo = "diffed", no = "__c", G = "__s", P = "__c", vo = "__k", V = "__d", C = "__s", so = /[\s\n\\/='"\0<>]/, lo = /^(xlink|xmlns|xml)([A-Z])/, Uo = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/, Po = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/, To = /* @__PURE__ */ new Set(["draggable", "spellcheck"]);
|
|
5
|
+
function fo(o) {
|
|
6
6
|
o.__g !== void 0 ? o.__g |= 8 : o[V] = !0;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Mo(o) {
|
|
9
9
|
o.__g !== void 0 ? o.__g &= -9 : o[V] = !1;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function co(o) {
|
|
12
12
|
return o.__g !== void 0 ? !!(8 & o.__g) : o[V] === !0;
|
|
13
13
|
}
|
|
14
|
-
var
|
|
14
|
+
var Io = /["&<]/;
|
|
15
15
|
function H(o) {
|
|
16
|
-
if (o.length === 0 ||
|
|
16
|
+
if (o.length === 0 || Io.test(o) === !1)
|
|
17
17
|
return o;
|
|
18
18
|
for (var t = 0, e = 0, i = "", l = ""; e < o.length; e++) {
|
|
19
19
|
switch (o.charCodeAt(e)) {
|
|
@@ -33,42 +33,42 @@ function H(o) {
|
|
|
33
33
|
}
|
|
34
34
|
return e !== t && (i += o.slice(t, e)), i;
|
|
35
35
|
}
|
|
36
|
-
var
|
|
36
|
+
var po = {}, Xo = /* @__PURE__ */ new Set(["animation-iteration-count", "border-image-outset", "border-image-slice", "border-image-width", "box-flex", "box-flex-group", "box-ordinal-group", "column-count", "fill-opacity", "flex", "flex-grow", "flex-negative", "flex-order", "flex-positive", "flex-shrink", "flood-opacity", "font-weight", "grid-column", "grid-row", "line-clamp", "line-height", "opacity", "order", "orphans", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-miterlimit", "stroke-opacity", "stroke-width", "tab-size", "widows", "z-index", "zoom"]), Zo = /[A-Z]/g;
|
|
37
37
|
function Ro(o) {
|
|
38
38
|
var t = "";
|
|
39
39
|
for (var e in o) {
|
|
40
40
|
var i = o[e];
|
|
41
41
|
if (i != null && i !== "") {
|
|
42
|
-
var l = e[0] == "-" ? e :
|
|
42
|
+
var l = e[0] == "-" ? e : po[e] || (po[e] = e.replace(Zo, "-$&").toLowerCase()), p = ";";
|
|
43
43
|
typeof i != "number" || l.startsWith("--") || Xo.has(l) || (p = "px;"), t = t + l + ":" + i + p;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
return t || void 0;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function ho() {
|
|
49
49
|
this.__d = !0;
|
|
50
50
|
}
|
|
51
51
|
function Wo(o, t) {
|
|
52
|
-
return { __v: o, context: t, props: o.props, setState:
|
|
52
|
+
return { __v: o, context: t, props: o.props, setState: ho, forceUpdate: ho, __d: !0, __h: new Array(0) };
|
|
53
53
|
}
|
|
54
|
-
var Q,
|
|
54
|
+
var Q, F, X, I, oo = {}, wo = [], L = Array.isArray, K = Object.assign, g = "", q = "<!--$s-->", B = "<!--/$s-->";
|
|
55
55
|
function Ho(o, t, e) {
|
|
56
|
-
var i =
|
|
57
|
-
|
|
58
|
-
var l = y(
|
|
59
|
-
l[
|
|
56
|
+
var i = u[G];
|
|
57
|
+
u[G] = !0, Q = u.__b, F = u[Lo], X = u.__r, I = u.unmount;
|
|
58
|
+
var l = y(U, null);
|
|
59
|
+
l[vo] = [o];
|
|
60
60
|
try {
|
|
61
61
|
var p = k(o, t || oo, !1, void 0, l, !1, e);
|
|
62
|
-
return
|
|
62
|
+
return L(p) ? p.join(g) : p;
|
|
63
63
|
} catch (r) {
|
|
64
64
|
throw r.then ? new Error('Use "renderToStringAsync" for suspenseful rendering.') : r;
|
|
65
65
|
} finally {
|
|
66
|
-
|
|
66
|
+
u[no] && u[no](o, wo), u[G] = i, wo.length = 0;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function bo(o, t) {
|
|
70
70
|
var e, i = o.type, l = !0;
|
|
71
|
-
return o[
|
|
71
|
+
return o[P] ? (l = !1, (e = o[P]).state = e[C]) : e = new i(o.props, t), o[P] = e, e.__v = o, e.props = o.props, e.context = t, fo(e), e.state == null && (e.state = oo), e[C] == null && (e[C] = e.state), i.getDerivedStateFromProps ? e.state = K({}, e.state, i.getDerivedStateFromProps(e.props, e.state)) : l && e.componentWillMount ? (e.componentWillMount(), e.state = e[C] !== e.state ? e[C] : e.state) : !l && e.componentWillUpdate && e.componentWillUpdate(), X && X(o), e.render(e.props, e.state, t);
|
|
72
72
|
}
|
|
73
73
|
function k(o, t, e, i, l, p, r) {
|
|
74
74
|
if (o == null || o === !0 || o === !1 || o === g)
|
|
@@ -76,110 +76,110 @@ function k(o, t, e, i, l, p, r) {
|
|
|
76
76
|
var m = typeof o;
|
|
77
77
|
if (m != "object")
|
|
78
78
|
return m == "function" ? g : m == "string" ? H(o) : o + g;
|
|
79
|
-
if (
|
|
80
|
-
var
|
|
81
|
-
l[
|
|
82
|
-
for (var Y = o.length,
|
|
83
|
-
var
|
|
84
|
-
if (
|
|
85
|
-
var
|
|
86
|
-
typeof j == "string" ?
|
|
79
|
+
if (L(o)) {
|
|
80
|
+
var d, v = g;
|
|
81
|
+
l[vo] = o;
|
|
82
|
+
for (var Y = o.length, _ = 0; _ < Y; _++) {
|
|
83
|
+
var f = o[_];
|
|
84
|
+
if (f != null && typeof f != "boolean") {
|
|
85
|
+
var A, j = k(f, t, e, i, l, p, r);
|
|
86
|
+
typeof j == "string" ? v += j : (d || (d = new Array(Y)), v && d.push(v), v = g, L(j) ? (A = d).push.apply(A, j) : d.push(j));
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
return
|
|
89
|
+
return d ? (v && d.push(v), d) : v;
|
|
90
90
|
}
|
|
91
91
|
if (o.constructor !== void 0)
|
|
92
92
|
return g;
|
|
93
93
|
o.__ = l, Q && Q(o);
|
|
94
|
-
var
|
|
95
|
-
if (typeof
|
|
96
|
-
var
|
|
97
|
-
if (
|
|
98
|
-
if ("tpl" in
|
|
99
|
-
for (var R = g,
|
|
100
|
-
if (R +=
|
|
101
|
-
var
|
|
102
|
-
if (
|
|
94
|
+
var h = o.type, a = o.props;
|
|
95
|
+
if (typeof h == "function") {
|
|
96
|
+
var T, n, w, Z = t;
|
|
97
|
+
if (h === U) {
|
|
98
|
+
if ("tpl" in a) {
|
|
99
|
+
for (var R = g, M = 0; M < a.tpl.length; M++)
|
|
100
|
+
if (R += a.tpl[M], a.exprs && M < a.exprs.length) {
|
|
101
|
+
var E = a.exprs[M];
|
|
102
|
+
if (E == null)
|
|
103
103
|
continue;
|
|
104
|
-
typeof
|
|
104
|
+
typeof E != "object" || E.constructor !== void 0 && !L(E) ? R += E : R += k(E, t, e, i, o, p, r);
|
|
105
105
|
}
|
|
106
106
|
return R;
|
|
107
107
|
}
|
|
108
|
-
if ("UNSTABLE_comment" in
|
|
109
|
-
return "<!--" + H(
|
|
110
|
-
|
|
108
|
+
if ("UNSTABLE_comment" in a)
|
|
109
|
+
return "<!--" + H(a.UNSTABLE_comment) + "-->";
|
|
110
|
+
n = a.children;
|
|
111
111
|
} else {
|
|
112
|
-
if ((
|
|
113
|
-
var ro = t[
|
|
114
|
-
Z = ro ? ro.props.value :
|
|
112
|
+
if ((T = h.contextType) != null) {
|
|
113
|
+
var ro = t[T.__c];
|
|
114
|
+
Z = ro ? ro.props.value : T.__;
|
|
115
115
|
}
|
|
116
|
-
var eo =
|
|
116
|
+
var eo = h.prototype && typeof h.prototype.render == "function";
|
|
117
117
|
if (eo)
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
n = /**#__NOINLINE__**/
|
|
119
|
+
bo(o, Z), w = o[P];
|
|
120
120
|
else {
|
|
121
|
-
o[
|
|
121
|
+
o[P] = w = /**#__NOINLINE__**/
|
|
122
122
|
Wo(o, Z);
|
|
123
|
-
for (var
|
|
124
|
-
|
|
123
|
+
for (var uo = 0; co(w) && uo++ < 25; ) {
|
|
124
|
+
Mo(w), X && X(o);
|
|
125
125
|
try {
|
|
126
|
-
|
|
127
|
-
} catch (
|
|
128
|
-
throw p &&
|
|
126
|
+
n = h.call(w, a, Z);
|
|
127
|
+
} catch (b) {
|
|
128
|
+
throw p && b && typeof b.then == "function" && (o._suspended = !0), b;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
fo(w);
|
|
132
132
|
}
|
|
133
|
-
if (
|
|
134
|
-
|
|
133
|
+
if (w.getChildContext != null && (t = K({}, t, w.getChildContext())), eo && u.errorBoundaries && (h.getDerivedStateFromError || w.componentDidCatch)) {
|
|
134
|
+
n = n != null && n.type === U && n.key == null && n.props.tpl == null ? n.props.children : n;
|
|
135
135
|
try {
|
|
136
|
-
return k(
|
|
137
|
-
} catch (
|
|
138
|
-
return
|
|
136
|
+
return k(n, t, e, i, o, p, !1);
|
|
137
|
+
} catch (b) {
|
|
138
|
+
return h.getDerivedStateFromError && (w[C] = h.getDerivedStateFromError(b)), w.componentDidCatch && w.componentDidCatch(b, oo), co(w) ? (n = bo(o, t), (w = o[P]).getChildContext != null && (t = K({}, t, w.getChildContext())), k(n = n != null && n.type === U && n.key == null && n.props.tpl == null ? n.props.children : n, t, e, i, o, p, r)) : g;
|
|
139
139
|
} finally {
|
|
140
|
-
|
|
140
|
+
F && F(o), I && I(o);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
n = n != null && n.type === U && n.key == null && n.props.tpl == null ? n.props.children : n;
|
|
145
145
|
try {
|
|
146
|
-
var z = k(
|
|
147
|
-
return
|
|
148
|
-
return q +
|
|
146
|
+
var z = k(n, t, e, i, o, p, r);
|
|
147
|
+
return F && F(o), u.unmount && u.unmount(o), o._suspended ? typeof z == "string" ? q + z + B : L(z) ? (z.unshift(q), z.push(B), z) : z.then(function(b) {
|
|
148
|
+
return q + b + B;
|
|
149
149
|
}) : z;
|
|
150
|
-
} catch (
|
|
150
|
+
} catch (b) {
|
|
151
151
|
if (!p && r && r.onError) {
|
|
152
152
|
var to = function O(W) {
|
|
153
|
-
return r.onError(W, o, function(
|
|
153
|
+
return r.onError(W, o, function($, mo) {
|
|
154
154
|
try {
|
|
155
|
-
return k(
|
|
156
|
-
} catch (
|
|
157
|
-
return O(
|
|
155
|
+
return k($, t, e, i, mo, p, r);
|
|
156
|
+
} catch (jo) {
|
|
157
|
+
return O(jo);
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
|
-
}(
|
|
160
|
+
}(b);
|
|
161
161
|
if (to !== void 0)
|
|
162
162
|
return to;
|
|
163
|
-
var io =
|
|
164
|
-
return io && io(
|
|
163
|
+
var io = u.__e;
|
|
164
|
+
return io && io(b, o), g;
|
|
165
165
|
}
|
|
166
|
-
if (!p || !
|
|
167
|
-
throw
|
|
168
|
-
return
|
|
166
|
+
if (!p || !b || typeof b.then != "function")
|
|
167
|
+
throw b;
|
|
168
|
+
return b.then(function O() {
|
|
169
169
|
try {
|
|
170
|
-
var W = k(
|
|
170
|
+
var W = k(n, t, e, i, o, p, r);
|
|
171
171
|
return o._suspended ? q + W + B : W;
|
|
172
|
-
} catch (
|
|
173
|
-
if (
|
|
174
|
-
throw
|
|
175
|
-
return
|
|
172
|
+
} catch ($) {
|
|
173
|
+
if (!$ || typeof $.then != "function")
|
|
174
|
+
throw $;
|
|
175
|
+
return $.then(O);
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
var S,
|
|
181
|
-
for (var s in
|
|
182
|
-
var c =
|
|
180
|
+
var S, D = "<" + h, x = g;
|
|
181
|
+
for (var s in a) {
|
|
182
|
+
var c = a[s];
|
|
183
183
|
if (typeof (c = Bo(c) ? c.value : c) != "function" || s === "class" || s === "className") {
|
|
184
184
|
switch (s) {
|
|
185
185
|
case "children":
|
|
@@ -191,12 +191,12 @@ function k(o, t, e, i, l, p, r) {
|
|
|
191
191
|
case "__source":
|
|
192
192
|
continue;
|
|
193
193
|
case "htmlFor":
|
|
194
|
-
if ("for" in
|
|
194
|
+
if ("for" in a)
|
|
195
195
|
continue;
|
|
196
196
|
s = "for";
|
|
197
197
|
break;
|
|
198
198
|
case "className":
|
|
199
|
-
if ("class" in
|
|
199
|
+
if ("class" in a)
|
|
200
200
|
continue;
|
|
201
201
|
s = "class";
|
|
202
202
|
break;
|
|
@@ -208,7 +208,7 @@ function k(o, t, e, i, l, p, r) {
|
|
|
208
208
|
break;
|
|
209
209
|
case "defaultValue":
|
|
210
210
|
case "value":
|
|
211
|
-
switch (s = "value",
|
|
211
|
+
switch (s = "value", h) {
|
|
212
212
|
case "textarea":
|
|
213
213
|
S = c;
|
|
214
214
|
continue;
|
|
@@ -216,7 +216,7 @@ function k(o, t, e, i, l, p, r) {
|
|
|
216
216
|
i = c;
|
|
217
217
|
continue;
|
|
218
218
|
case "option":
|
|
219
|
-
i != c || "selected" in
|
|
219
|
+
i != c || "selected" in a || (D += " selected");
|
|
220
220
|
}
|
|
221
221
|
break;
|
|
222
222
|
case "dangerouslySetInnerHTML":
|
|
@@ -232,23 +232,23 @@ function k(o, t, e, i, l, p, r) {
|
|
|
232
232
|
s = "http-equiv";
|
|
233
233
|
break;
|
|
234
234
|
default:
|
|
235
|
-
if (
|
|
236
|
-
s = s.replace(
|
|
235
|
+
if (lo.test(s))
|
|
236
|
+
s = s.replace(lo, "$1:$2").toLowerCase();
|
|
237
237
|
else {
|
|
238
|
-
if (
|
|
238
|
+
if (so.test(s))
|
|
239
239
|
continue;
|
|
240
|
-
s[4] !== "-" && !
|
|
240
|
+
s[4] !== "-" && !To.has(s) || c == null ? e ? Po.test(s) && (s = s === "panose1" ? "panose-1" : s.replace(/([A-Z])/g, "-$1").toLowerCase()) : Uo.test(s) && (s = s.toLowerCase()) : c += g;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
c != null && c !== !1 && (
|
|
243
|
+
c != null && c !== !1 && (D = c === !0 || c === g ? D + " " + s : D + " " + s + '="' + (typeof c == "string" ? H(c) : c + g) + '"');
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
if (
|
|
247
|
-
throw new Error(
|
|
248
|
-
if (x || (typeof S == "string" ? x = H(S) : S != null && S !== !1 && S !== !0 && (x = k(S, t,
|
|
249
|
-
return
|
|
250
|
-
var J = "</" +
|
|
251
|
-
return
|
|
246
|
+
if (so.test(h))
|
|
247
|
+
throw new Error(h + " is not a valid HTML tag name in " + D + ">");
|
|
248
|
+
if (x || (typeof S == "string" ? x = H(S) : S != null && S !== !1 && S !== !0 && (x = k(S, t, h === "svg" || h !== "foreignObject" && e, i, o, p, r))), F && F(o), I && I(o), !x && qo.has(h))
|
|
249
|
+
return D + "/>";
|
|
250
|
+
var J = "</" + h + ">", N = D + ">";
|
|
251
|
+
return L(x) ? [N].concat(x, [J]) : typeof x != "string" ? [N, x, J] : N + x + J;
|
|
252
252
|
}
|
|
253
253
|
var qo = /* @__PURE__ */ new Set(["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
254
254
|
function Bo(o) {
|
|
@@ -293,16 +293,16 @@ const Jo = `.inploi-job-search{font-size:16px}.inploi-job-search *,.inploi-job-s
|
|
|
293
293
|
const l = No(e), p = ({
|
|
294
294
|
params: r
|
|
295
295
|
}) => {
|
|
296
|
-
var m,
|
|
297
|
-
return y(
|
|
298
|
-
y(
|
|
296
|
+
var m, d;
|
|
297
|
+
return y(Eo, { Fallback: Ao }, [
|
|
298
|
+
y(So, {
|
|
299
299
|
terms: r.terms,
|
|
300
|
-
locale: ((m = r.i18n) == null ? void 0 : m.locale) ?? ((
|
|
300
|
+
locale: ((m = r.i18n) == null ? void 0 : m.locale) ?? ((d = r.i18n) == null ? void 0 : d.fallbackLocale),
|
|
301
301
|
children: [
|
|
302
302
|
y("style", { id: "inploi-job-search-styles" }, Jo),
|
|
303
|
-
y("style", { id: "inploi-job-search-theme" },
|
|
304
|
-
y(
|
|
305
|
-
y(
|
|
303
|
+
y("style", { id: "inploi-job-search-theme" }, Yo(r)),
|
|
304
|
+
y(Do, { theme: r.theme }),
|
|
305
|
+
y(Fo, {
|
|
306
306
|
properties: r.properties,
|
|
307
307
|
rpcClient: t,
|
|
308
308
|
analytics: i,
|
|
@@ -319,92 +319,98 @@ const Jo = `.inploi-job-search{font-size:16px}.inploi-job-search *,.inploi-job-s
|
|
|
319
319
|
* Useful when server-side rendering to avoid CLS.
|
|
320
320
|
*/
|
|
321
321
|
prerender: async (r) => {
|
|
322
|
-
var
|
|
323
|
-
const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState,
|
|
322
|
+
var v, Y, _, f, A;
|
|
323
|
+
const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState, d = r.withData ? await xo({
|
|
324
324
|
state: m,
|
|
325
325
|
rpcClient: t,
|
|
326
|
-
t:
|
|
326
|
+
t: yo({
|
|
327
327
|
overrides: r.terms ?? {},
|
|
328
|
-
locale: ((
|
|
328
|
+
locale: ((v = r.i18n) == null ? void 0 : v.locale) ?? ((Y = r.i18n) == null ? void 0 : Y.fallbackLocale)
|
|
329
329
|
}),
|
|
330
|
-
prioritySegment: (
|
|
331
|
-
locale: (
|
|
332
|
-
fallbackLocale: (
|
|
330
|
+
prioritySegment: (_ = r.results) == null ? void 0 : _.prioritySegment,
|
|
331
|
+
locale: (f = r.i18n) == null ? void 0 : f.locale,
|
|
332
|
+
fallbackLocale: (A = r.i18n) == null ? void 0 : A.fallbackLocale
|
|
333
333
|
}).then((j) => ({ jobs: j })).catch(() => {
|
|
334
334
|
}) : void 0;
|
|
335
335
|
return {
|
|
336
336
|
html: Ho(
|
|
337
337
|
y(
|
|
338
|
-
|
|
338
|
+
U,
|
|
339
339
|
{},
|
|
340
340
|
y(p, {
|
|
341
341
|
params: {
|
|
342
342
|
...r,
|
|
343
|
-
initialData:
|
|
343
|
+
initialData: d
|
|
344
344
|
}
|
|
345
345
|
})
|
|
346
346
|
)
|
|
347
347
|
),
|
|
348
|
-
data:
|
|
348
|
+
data: d
|
|
349
349
|
};
|
|
350
350
|
},
|
|
351
351
|
/** Renders the Job Search Plugin inside the container element. */
|
|
352
352
|
render: async (r) => {
|
|
353
|
-
var
|
|
353
|
+
var j, h;
|
|
354
354
|
const m = typeof r.initialState == "function" ? r.initialState(r) : r.initialState;
|
|
355
|
-
let
|
|
356
|
-
const
|
|
357
|
-
|
|
355
|
+
let d = { filters: m.filters, geo: m.geo };
|
|
356
|
+
const v = () => {
|
|
357
|
+
var a;
|
|
358
|
+
return $o(d, ((a = r.geolocation) == null ? void 0 : a.distanceUnit) ?? "miles");
|
|
359
|
+
}, Y = r.initialData ? ko : _o, _ = l.getRenderTargetElement(r.widgetId);
|
|
360
|
+
zo(
|
|
358
361
|
typeof window < "u",
|
|
359
362
|
"the `render` method of JobSearch cannot be called in non-browser environments. Use `prerender` instead."
|
|
360
363
|
);
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
363
|
-
r.onStateChange(
|
|
364
|
-
|
|
364
|
+
let f;
|
|
365
|
+
if (Y(y(p, { params: { ...r, onStateChange: (a) => {
|
|
366
|
+
r.onStateChange(a), !(!a.filters && !("geo" in a)) && (d = {
|
|
367
|
+
filters: a.filters ?? d.filters,
|
|
368
|
+
geo: "geo" in a ? a.geo : d.geo
|
|
369
|
+
}, f == null || f.setFilters(v()));
|
|
370
|
+
} } }), _), r.feedback)
|
|
365
371
|
if (r.feedback.plugin instanceof Promise)
|
|
366
|
-
r.feedback.plugin.then(({ feedbackPlugin:
|
|
367
|
-
var
|
|
372
|
+
r.feedback.plugin.then(({ feedbackPlugin: a }) => {
|
|
373
|
+
var n, w;
|
|
368
374
|
if (!r.feedback)
|
|
369
375
|
return;
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
instance:
|
|
376
|
+
const T = a()({ apiClient: o, rpcClient: t, logger: e, analytics: i });
|
|
377
|
+
go({
|
|
378
|
+
instance: T,
|
|
373
379
|
theme: {
|
|
374
380
|
...r.theme,
|
|
375
|
-
...(
|
|
381
|
+
...(n = r.feedback.params) == null ? void 0 : n.theme
|
|
376
382
|
},
|
|
377
|
-
terms: ((
|
|
383
|
+
terms: ((w = r.feedback.params) == null ? void 0 : w.terms) ?? {}
|
|
378
384
|
});
|
|
379
385
|
});
|
|
380
386
|
else {
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
instance:
|
|
387
|
+
const a = r.feedback.plugin({ apiClient: o, rpcClient: t, logger: e, analytics: i });
|
|
388
|
+
go({
|
|
389
|
+
instance: a,
|
|
384
390
|
theme: {
|
|
385
391
|
...r.theme,
|
|
386
|
-
...(
|
|
392
|
+
...(j = r.feedback.params) == null ? void 0 : j.theme
|
|
387
393
|
},
|
|
388
|
-
terms: ((
|
|
394
|
+
terms: ((h = r.feedback.params) == null ? void 0 : h.terms) ?? {}
|
|
389
395
|
});
|
|
390
396
|
}
|
|
391
|
-
r.alerts && (r.alerts.plugin instanceof Promise ? r.alerts.plugin.then(({ jobAlertsPlugin:
|
|
392
|
-
r.alerts && (
|
|
397
|
+
r.alerts && (r.alerts.plugin instanceof Promise ? r.alerts.plugin.then(({ jobAlertsPlugin: a }) => {
|
|
398
|
+
r.alerts && (f = a()({ apiClient: o, rpcClient: t, logger: e, analytics: i }), f.render({
|
|
393
399
|
config: r.alerts.params.config,
|
|
394
400
|
terms: r.alerts.params.terms,
|
|
395
|
-
initialFilters:
|
|
401
|
+
initialFilters: v(),
|
|
396
402
|
theme: r.theme
|
|
397
403
|
}));
|
|
398
|
-
}) : (
|
|
404
|
+
}) : (f = r.alerts.plugin({ apiClient: o, rpcClient: t, logger: e, analytics: i }), f.render({
|
|
399
405
|
config: r.alerts.params.config,
|
|
400
406
|
terms: r.alerts.params.terms,
|
|
401
|
-
initialFilters:
|
|
407
|
+
initialFilters: v(),
|
|
402
408
|
theme: r.theme
|
|
403
409
|
})));
|
|
404
410
|
}
|
|
405
411
|
};
|
|
406
412
|
});
|
|
407
|
-
function
|
|
413
|
+
function go(o) {
|
|
408
414
|
o.instance.render({
|
|
409
415
|
key: "job-search",
|
|
410
416
|
size: "sm",
|
package/dist/job-search.api.d.ts
CHANGED
|
@@ -273,6 +273,8 @@ export declare const getAvailableFilters: ({ rpcClient, state, t, signal, locale
|
|
|
273
273
|
}[];
|
|
274
274
|
}>;
|
|
275
275
|
export type GetAvailableFiltersResponse = Awaited<ReturnType<typeof getAvailableFilters>>;
|
|
276
|
+
/** The countries the company's live jobs give, as their feeds spell them. */
|
|
277
|
+
export declare const getJobCountries: (rpcClient: InploiRpcClient) => Promise<string[]>;
|
|
276
278
|
export declare const getJobSearchResults: ({ rpcClient, signal, state, page, t, prioritySegment, locale, fallbackLocale, }: {
|
|
277
279
|
rpcClient: InploiRpcClient;
|
|
278
280
|
signal?: AbortSignal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Where location search looks when a hub's jobs name no country it can read. */
|
|
2
|
+
export declare const DEFAULT_SEARCH_COUNTRIES: string[];
|
|
3
|
+
/**
|
|
4
|
+
* The countries a hub's location search covers, as the geocoder's ISO codes, read from the free text its live
|
|
5
|
+
* jobs give as their country ("United Kingdom", "England", "GB", "Republic of Ireland"). Values that name no
|
|
6
|
+
* country are left out; when none is left, the search covers the United Kingdom.
|
|
7
|
+
*/
|
|
8
|
+
export declare const searchCountries: (jobCountries: string[]) => string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/lib/distance.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ export type DistanceUnit = 'miles' | 'km';
|
|
|
2
2
|
export declare const milesToMeters: (miles: number) => number;
|
|
3
3
|
export declare const kmToMeters: (km: number) => number;
|
|
4
4
|
/**
|
|
5
|
-
* Formats a distance already expressed in `unit`, e.g. `20 mi`, `2.5 km` or, on a German page, `2,5 km
|
|
5
|
+
* Formats a distance already expressed in `unit`, e.g. `20 mi`, `2.5 km` or, on a German page, `2,5 km`,
|
|
6
|
+
* to at most `maximumFractionDigits` decimals.
|
|
6
7
|
* The page's language wins over `locale`: the widget's `i18n.locale` chooses which jobs are shown, while the
|
|
7
8
|
* number sits in text written in the page's language (PROD-7117).
|
|
8
9
|
*/
|
|
9
|
-
export declare const createDistanceFormatter: (locale: string | undefined, unit: DistanceUnit) => Intl.NumberFormat;
|
|
10
|
+
export declare const createDistanceFormatter: (locale: string | undefined, unit: DistanceUnit, maximumFractionDigits?: number) => Intl.NumberFormat;
|
|
10
11
|
export declare const formatDistanceMeters: (meters: number, unit: DistanceUnit, locale: string | undefined) => string;
|