@inploi/plugin-job-search 8.6.1 → 9.0.0
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/README.md +37 -24
- package/cdn/index.js +45 -3105
- package/cdn/mapbox-gl.js +51 -0
- package/dist/common.geo-transport-CJGUJXTA-aba25ae8.cjs +1 -0
- package/dist/common.geo-transport-CJGUJXTA-e1f9b82a.js +37 -0
- package/dist/components/combobox.d.ts +2 -2
- package/dist/components/geo-search.geocode.d.ts +7 -10
- package/dist/components/map.maplibre.d.ts +1 -1
- package/dist/components/map.types.d.ts +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +168 -172
- package/dist/job-search-941c04d7.cjs +60 -0
- package/dist/{map-style-c988f534.js → job-search-eb64050e.js} +2013 -1964
- package/dist/job-search.d.ts +1 -1
- package/dist/lib/i18n.d.ts +7 -0
- package/dist/lib/map-library-cdn.test.d.ts +1 -0
- package/dist/lib/map-style.d.ts +4 -2
- package/dist/map-00ee82df.js +300 -0
- package/dist/map-109de8da.cjs +2 -0
- package/dist/map-attribution-0b24769c.cjs +26 -0
- package/dist/map-attribution-96798686.js +141 -0
- package/dist/{mapbox-gl-92318326.js → mapbox-gl-0f446975.js} +3505 -3489
- package/dist/{mapbox-gl-f5a3f2d4.cjs → mapbox-gl-11152b6e.cjs} +28 -28
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +11 -12
- package/package.json +3 -3
- package/dist/lib/maplibre-cdn.d.ts +0 -10
- package/dist/map-a092b43f.cjs +0 -2
- package/dist/map-attribution-18e2dacf.cjs +0 -26
- package/dist/map-attribution-bc77dbf2.js +0 -115
- package/dist/map-ddfd39ea.js +0 -254
- package/dist/map-style-57bbe0a0.cjs +0 -60
- /package/dist/{lib/maplibre-cdn.test.d.ts → components/geo-search.location-input.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,29 +1,43 @@
|
|
|
1
1
|
# @inploi/plugin-job-search
|
|
2
2
|
|
|
3
|
+
Location suggestions use `https://maps.inploi.com/places`, limited to the hub's countries. A random id persists
|
|
4
|
+
in sessionStorage for the browser tab (or memory when storage is unavailable), so the Worker's rollout keeps
|
|
5
|
+
each visitor on one search arm. Worker errors, invalid responses and a 2.5-second timeout fall back to the
|
|
6
|
+
existing direct Mapbox geocoder. Exact typed postcodes still rank first. Applying a suggestion or searching
|
|
7
|
+
typed text sends a codes-only outcome to the Worker; query text and location details are never included.
|
|
8
|
+
|
|
3
9
|
The SDK job-search widget supports an optional map via `JobSearchPluginParams.map`.
|
|
4
|
-
|
|
10
|
+
It renders with MapLibre from `maps.inploi.com`, so by default a candidate's browser requests map resources
|
|
11
|
+
from no third party:
|
|
5
12
|
|
|
6
13
|
```ts
|
|
7
14
|
map: {
|
|
8
15
|
enabled: true,
|
|
9
|
-
|
|
10
|
-
style: 'default',
|
|
16
|
+
style: 'default', // optional
|
|
11
17
|
}
|
|
12
18
|
```
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
`renderer: 'mapbox'` keeps Mapbox for an embed that sets it explicitly (careers hubs use it for per-company
|
|
21
|
+
rollback); Mapbox code loads only then, with its optional performance telemetry off
|
|
22
|
+
(`performanceMetricsCollection: false`). Its map-load and tile billing events have no opt-out.
|
|
23
|
+
Mapbox's `accessToken` is used only by that renderer, is ignored by MapLibre, and is deprecated for eventual removal.
|
|
24
|
+
|
|
25
|
+
CDN embeds load each map library on demand from a sibling of the plugin's `cdn/index.js`
|
|
26
|
+
(`maplibre-gl.js` or `mapbox-gl.js`), so a page downloads only the renderer it uses. A sibling download that
|
|
27
|
+
fails or takes longer than ten seconds, like a map that fails to start, gets one more attempt before the map shows
|
|
28
|
+
the unavailable notice below. npm builds keep `maplibre-gl` external and load `mapbox-gl` from a lazy chunk.
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
Use a hosted style id only once `maps.inploi.com` serves it and its tile, glyph and sprite resources.
|
|
18
31
|
MapLibre needs no access token. A style id resolves to `https://maps.inploi.com/styles/{id}.json`;
|
|
19
|
-
omitting `style` selects `default`.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
omitting `style` selects `default`. Mapbox styles never reach Mapbox: the light-v10 and light-v11 URLs map to
|
|
33
|
+
`default`, outdoors-v12 and streets-v12 to `outdoors` and `streets`, and each client's custom Mapbox style to its
|
|
34
|
+
hosted id (see `MAPBOX_TO_ID`), in either the `mapbox://styles/…` or `https://api.mapbox.com/styles/v1/…` form;
|
|
35
|
+
other Mapbox URLs select `default` and log a warning. Other HTTPS style URLs are used as given.
|
|
36
|
+
If the style or a basemap tile fails before the map first loads, or it takes longer than ten seconds, MapLibre
|
|
37
|
+
retries the same style once. If that fails too, or an unsupported style format is configured, the map is replaced
|
|
38
|
+
by a static `Map unavailable` notice (`role="status"`, term `map_unavailable`) and the job list and search keep
|
|
39
|
+
working. Styles hosted at `https://maps.inploi.com` show only the linked
|
|
40
|
+
`© OpenStreetMap contributors` credit. Other styles show de-duplicated source credits,
|
|
27
41
|
updated as the style and source metadata load. Source attribution is parsed in an inert document and rebuilt
|
|
28
42
|
as text and HTTP(S) links only; remote elements and attributes are never copied into the page.
|
|
29
43
|
OpenStreetMap credit is added if no source provides it.
|
|
@@ -39,19 +53,18 @@ permit automatic collapse after five seconds with discoverable licence informati
|
|
|
39
53
|
[Protomaps attribution is optional](https://github.com/protomaps/basemaps#licensing-and-attribution-guidelines);
|
|
40
54
|
its OSM tiles require OSM attribution. [MapLibre's BSD-3 licence](https://github.com/maplibre/maplibre-gl-js/blob/main/LICENSE.txt)
|
|
41
55
|
requires distribution notices, not an on-map credit.
|
|
42
|
-
|
|
43
|
-
[
|
|
44
|
-
requires
|
|
56
|
+
Styles built on the OpenMapTiles schema carry the linked OpenMapTiles credit
|
|
57
|
+
[its design licence](https://github.com/openmaptiles/openmaptiles/blob/master/LICENSE.md#design-license-cc-by-40)
|
|
58
|
+
requires in their source attribution.
|
|
45
59
|
|
|
46
|
-
The public `@inploi/plugin-job-search/utils` entry exports `resolveMapStyle
|
|
47
|
-
|
|
60
|
+
The public `@inploi/plugin-job-search/utils` entry exports `resolveMapStyle` and
|
|
61
|
+
`createMapAttribution(styleUrl)`. Add the latter with `map.addControl(control, 'bottom-right')`
|
|
48
62
|
after loading MapLibre's CSS. Call `control.setStyle(styleUrl)` when swapping styles; MapLibre removes
|
|
49
63
|
its observers, event listeners and scoped stylesheet through the control's `onRemove` lifecycle.
|
|
50
|
-
`resolveMapStyle` returns `{ url, unmapped? }
|
|
51
|
-
|
|
64
|
+
`resolveMapStyle` returns `{ url, unmapped? }`, and throws for an unsupported format; callers can use
|
|
65
|
+
`unmapped` to identify a legacy style that needs migrating.
|
|
52
66
|
MapLibre's cooperative-gesture hints use the plugin's `map_gesture_windows`, `map_gesture_mac` and
|
|
53
67
|
`map_gesture_mobile` terms, so embeds can localise them through `terms`.
|
|
54
68
|
|
|
55
|
-
|
|
56
|
-
inploi
|
|
57
|
-
including browser tests that intercept `https://maps.inploi.com/**`.
|
|
69
|
+
The dev harness uses the default renderer and hosted default style; browser tests intercept
|
|
70
|
+
`https://maps.inploi.com/**`. For local manual checks of the Mapbox renderer, use `?test_renderer=mapbox`.
|