@inploi/plugin-job-search 9.0.0 → 9.0.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.
Files changed (98) hide show
  1. package/README.md +5 -0
  2. package/cdn/index.js +16 -18
  3. package/cdn/style.css +1 -1
  4. package/dist/index.cjs +1 -2
  5. package/dist/index.d.cts +977 -0
  6. package/dist/index.d.ts +977 -2
  7. package/dist/index.js +147 -175
  8. package/dist/{job-search-eb64050e.js → job-search-C39oHZb7.js} +1804 -1959
  9. package/dist/job-search-C9kyIrbM.cjs +60 -0
  10. package/dist/map-B3T2x-f7.cjs +1 -0
  11. package/dist/map-DVf9u_B8.js +286 -0
  12. package/dist/{map-attribution-96798686.js → map-attribution-By9wrlPf.js} +7 -14
  13. package/dist/mapbox-gl-BvQCqDX3.cjs +3073 -0
  14. package/dist/{mapbox-gl-0f446975.js → mapbox-gl-D9aqTRUT.js} +13146 -16312
  15. package/dist/style.css +1 -1
  16. package/dist/utils.cjs +1 -1
  17. package/dist/utils.d.cts +622 -0
  18. package/dist/utils.d.ts +622 -3
  19. package/dist/utils.js +11 -12
  20. package/package.json +25 -15
  21. package/dist/components/button.d.ts +0 -60
  22. package/dist/components/combobox.d.ts +0 -27
  23. package/dist/components/error-boundary.d.ts +0 -23
  24. package/dist/components/filter-content.active.d.ts +0 -246
  25. package/dist/components/filter-section.d.ts +0 -18
  26. package/dist/components/filter.d.ts +0 -24
  27. package/dist/components/geo-search.d.ts +0 -37
  28. package/dist/components/geo-search.geocode.d.ts +0 -34
  29. package/dist/components/geo-search.geocode.test.d.ts +0 -1
  30. package/dist/components/geo-search.locate-button.d.ts +0 -8
  31. package/dist/components/geo-search.location-input.d.ts +0 -12
  32. package/dist/components/geo-search.location-input.test.d.ts +0 -1
  33. package/dist/components/geo-search.utils.d.ts +0 -19
  34. package/dist/components/geo-search.utils.test.d.ts +0 -1
  35. package/dist/components/icon.d.ts +0 -33
  36. package/dist/components/job-card.d.ts +0 -17
  37. package/dist/components/job-search.alerts.test.d.ts +0 -1
  38. package/dist/components/job-search.d.ts +0 -56
  39. package/dist/components/keyword-search.d.ts +0 -6
  40. package/dist/components/map.attribution.test.d.ts +0 -1
  41. package/dist/components/map.d.ts +0 -12
  42. package/dist/components/map.imports.test.d.ts +0 -1
  43. package/dist/components/map.mapbox.d.ts +0 -11
  44. package/dist/components/map.maplibre.d.ts +0 -12
  45. package/dist/components/map.test.d.ts +0 -1
  46. package/dist/components/map.types.d.ts +0 -46
  47. package/dist/components/natural-language-section.d.ts +0 -9
  48. package/dist/components/palette-debugger.d.ts +0 -1
  49. package/dist/components/result-order.d.ts +0 -6
  50. package/dist/components/results-list.d.ts +0 -26
  51. package/dist/components/results-map.d.ts +0 -22
  52. package/dist/components/results.d.ts +0 -28
  53. package/dist/components/roving-text.d.ts +0 -6
  54. package/dist/components/skeleton-text.d.ts +0 -3
  55. package/dist/components/tag.d.ts +0 -60
  56. package/dist/components/view-switch.d.ts +0 -64
  57. package/dist/index.cdn.d.ts +0 -9
  58. package/dist/index.dev.d.ts +0 -1
  59. package/dist/job-search-941c04d7.cjs +0 -60
  60. package/dist/job-search.api.d.ts +0 -682
  61. package/dist/job-search.api.test.d.ts +0 -1
  62. package/dist/job-search.api.typetest.d.ts +0 -1
  63. package/dist/job-search.constants.d.ts +0 -7
  64. package/dist/job-search.d.ts +0 -296
  65. package/dist/job-search.schemas.d.ts +0 -183
  66. package/dist/lib/cache-key.d.ts +0 -7
  67. package/dist/lib/cache-key.test.d.ts +0 -1
  68. package/dist/lib/countries.d.ts +0 -4
  69. package/dist/lib/countries.test.d.ts +0 -1
  70. package/dist/lib/currency.test.d.ts +0 -1
  71. package/dist/lib/deep-set.d.ts +0 -8
  72. package/dist/lib/deep-set.test.d.ts +0 -1
  73. package/dist/lib/distance.d.ts +0 -11
  74. package/dist/lib/distance.test.d.ts +0 -1
  75. package/dist/lib/hooks.d.ts +0 -8
  76. package/dist/lib/i18n.d.ts +0 -587
  77. package/dist/lib/map-attribution.d.ts +0 -8
  78. package/dist/lib/map-library-cdn.test.d.ts +0 -1
  79. package/dist/lib/map-style.d.ts +0 -8
  80. package/dist/lib/map-style.test.d.ts +0 -1
  81. package/dist/lib/match.d.ts +0 -35
  82. package/dist/lib/match.test.d.ts +0 -1
  83. package/dist/lib/sort.d.ts +0 -4
  84. package/dist/lib/sort.test.d.ts +0 -1
  85. package/dist/lib/type-utils.d.ts +0 -56
  86. package/dist/lib/utils.d.ts +0 -16
  87. package/dist/lib/utils.test.d.ts +0 -1
  88. package/dist/map-00ee82df.js +0 -300
  89. package/dist/map-109de8da.cjs +0 -2
  90. package/dist/mapbox-gl-11152b6e.cjs +0 -3073
  91. package/dist/mocks/browser.d.ts +0 -1
  92. package/dist/mocks/handlers.d.ts +0 -26
  93. package/dist/style/theme.d.ts +0 -7
  94. package/dist/style/theme.utils.d.ts +0 -6
  95. package/dist/style/tokens.d.ts +0 -148
  96. /package/dist/{common.geo-transport-CJGUJXTA-aba25ae8.cjs → common.geo-transport-CJGUJXTA-BmDm5A18.cjs} +0 -0
  97. /package/dist/{common.geo-transport-CJGUJXTA-e1f9b82a.js → common.geo-transport-CJGUJXTA-H3__EeqQ.js} +0 -0
  98. /package/dist/{map-attribution-0b24769c.cjs → map-attribution-DyuZ3dMC.cjs} +0 -0
@@ -1,7 +0,0 @@
1
- export declare const JOB_SEARCH_WIDGET_ID = "inploi-job-search";
2
- export declare const JOB_SEARCH_ELEMENT_ID = "inploi-job-search";
3
- export declare const EMPLOYMENT_TYPES: readonly ["FULL_TIME", "PART_TIME", "CONTRACT", "TEMPORARY", "INTERN", "VOLUNTEER", "OTHER"];
4
- export type EmploymentType = (typeof EMPLOYMENT_TYPES)[number];
5
- export declare const LOCATION_TYPES: readonly ["LOCATION", "REMOTE", "HYBRID"];
6
- export type LocationType = (typeof LOCATION_TYPES)[number];
7
- export declare const PAGE_SIZE = 10;
@@ -1,296 +0,0 @@
1
- import { FeedbackPlugin, FeedbackPluginParams, feedbackPlugin } from '@inploi/plugin-feedback';
2
- import { JobAlertsPluginParams, jobAlertsPlugin } from '@inploi/plugin-job-alerts';
3
- import { Logger } from '@inploi/sdk';
4
- import { TargetedEvent } from 'preact/compat';
5
- import { getJobSearchResults } from './job-search.api.ts';
6
- import { IconName } from './components/icon.tsx';
7
- import { JobSearchState } from './components/job-search.tsx';
8
- import { JobSearchTranslationTerms } from './lib/i18n.ts';
9
-
10
- type FontSettings = {
11
- fontFamily: string;
12
- weight: 'normal' | 'bold' | 'lighter' | 'bolder' | number;
13
- style: 'normal' | 'italic';
14
- };
15
- declare const textStyles: {
16
- readonly filter: "filter";
17
- readonly tag: "tag";
18
- readonly input: "input";
19
- readonly jobHeading: "jobHeading";
20
- };
21
- type TextStyle = keyof typeof textStyles;
22
- export declare const FILTER_KEYS: readonly ["locale", "company_name", "employment_type", "location_type", "pay_type", "pay_currency", "pay_mask", "pay", "pay_min", "pay_max", "title", "industry", "category", "skills", "town", "city", "country", "contract_type", "pay_display"];
23
- export type FilterKey = (typeof FILTER_KEYS)[number];
24
- export type CustomDataKey = `custom_data.${string}`;
25
- export type FilterProperty = {
26
- key: FilterKey | CustomDataKey;
27
- /** The label to display for the property.
28
- * Represents a human-readable name for the property.
29
- */
30
- label: string;
31
- /** Override the default icon.
32
- * Icons are already suggested for each property, but you can override them.
33
- */
34
- icon?: IconName;
35
- /** Hides the property from the UI
36
- * You can use this property to hard-code searches without allowing the user to modify or view them.
37
- */
38
- hidden?: boolean;
39
- /** The **fixed** value for the filter. Cannot be removed or changed. */
40
- value?: string | string[];
41
- /** The **default** value for the filter. Can be removed or changed, but defaults to it during initial load. */
42
- defaultValue?: string | string[];
43
- /** Whether users can search from the available results.
44
- * @default false
45
- */
46
- searchable?: boolean;
47
- /** Whether users can select one or multiple values.
48
- * @default `'one'`
49
- */
50
- select: 'one' | 'many';
51
- /** How to show results
52
- * @default "all"
53
- * @description
54
- * - "all" will show all results
55
- * - "only-available" (⚠️ leads to layout shifts) will show results that are available for the current filters
56
- */
57
- results?: 'only-available' | 'all';
58
- /** How to sort the suggestions
59
- * @default { by: 'results-count', order: 'ascending' }
60
- * @description
61
- * - 'results-count' will sort the suggestions by the number of results they have
62
- * - 'alphabetically' will sort the suggestions alphabetically
63
- * - 'numerically' will sort the suggestions numerically, coercing any string values to numbers
64
- */
65
- sortSuggestions?: {
66
- by: 'results-count' | 'alphabetically' | 'numerically';
67
- order: 'ascending' | 'descending';
68
- };
69
- };
70
- export type DisplayableFilterProperty = {
71
- key: /** Enter any key or traverse any custom_data object returned by the job with dot-separated keys.
72
- * @example `custom_data.location.city`
73
- */ FilterKey | CustomDataKey;
74
- transform?: (value: unknown) => string | string[] | null;
75
- };
76
- export type JobSearchPluginCardOverrides = {
77
- /** Use only if you want to override the default salary property. */
78
- salary?: DisplayableFilterProperty;
79
- /** Overrides the link to the job. */
80
- baseUrl?: (jobId: string) => string;
81
- /** Overrides the default behavior of the click event. */
82
- onClick?: (e: TargetedEvent<HTMLAnchorElement, MouseEvent>) => void;
83
- /** Overrides the default behavior of the hover event. */
84
- onMouseEnter?: (e: TargetedEvent<HTMLAnchorElement, MouseEvent>) => void;
85
- };
86
- type ColorPaletteConfig = {
87
- /** Number between 0 and 360. Number above or below range will loop. */
88
- hue: number;
89
- /** Float between 0 and 2. Acts as a multiplier to the original generated palette. */
90
- chroma: number;
91
- };
92
- export interface JobSearchPluginI18nParams {
93
- /** Only see jobs in this locale */
94
- locale: string | undefined;
95
- /** Fallback locale to use if jobs in the preferred locale are not available */
96
- fallbackLocale: string | undefined;
97
- }
98
- export interface JobSearchPluginParams {
99
- /** Used to identify the specific widget you want to render, in case there are multiple instances of the widget on the page.*/
100
- widgetId?: string;
101
- theme: {
102
- mode: 'light' | 'dark';
103
- corners: 'rounded' | 'soft' | 'sharp';
104
- highlights: 'stroke' | 'fill';
105
- accent: ColorPaletteConfig;
106
- neutral?: ColorPaletteConfig;
107
- monetary?: ColorPaletteConfig;
108
- typography: Partial<FontSettings> & Partial<Record<TextStyle, Partial<FontSettings>>>;
109
- /** Applies to the filter section on desktop. Override to ensure the filters are stuck to the top of the viewport,
110
- * but not obscured by the header. This is useful when the header is sticky on your website.
111
- * @default 112px
112
- */
113
- filtersOffsetTopPx?: number;
114
- accessibility?: {
115
- highContrast: boolean;
116
- reducedMotion: boolean;
117
- };
118
- };
119
- /** Array of properties because _order matters_ to display them. */
120
- properties: FilterProperty[];
121
- jobCard: {
122
- subheading: DisplayableFilterProperty | null;
123
- infoTags: DisplayableFilterProperty[];
124
- logo?: 'hidden' | '1:1' | '2:1';
125
- /**
126
- * Whether to show the posted date or not.
127
- * @default 'show'
128
- * @description
129
- * - 'show' will show the posted date and the "NEW" badge if the job is new (less than 7 days old).
130
- * - 'hide' will hide the posted date.
131
- * - 'only-new' will only show the "NEW" badge if the job is new.
132
- */
133
- postedDate?: 'hide' | 'show' | 'only-new';
134
- /** Time *in days* for a job to be considered new
135
- * @default 7
136
- */
137
- newUnderDays?: number;
138
- overrides?: JobSearchPluginCardOverrides;
139
- /**
140
- * Specifies how the job link should be opened.
141
- * @default 'redirect'
142
- * @description
143
- * - 'redirect': Navigates to the job's URL in the current tab.
144
- * - 'redirect-new-tab': Opens the job's URL in a new tab.
145
- */
146
- openJob?: 'redirect' | 'redirect-new-tab';
147
- };
148
- initialState: JobSearchState | ((params: Omit<JobSearchPluginParams, 'initialState'>) => JobSearchState);
149
- /** Enables searching for jobs by keyword */
150
- enableKeywordSearch?: boolean;
151
- geolocation?: {
152
- enabled: boolean;
153
- distanceUnit?: 'miles' | 'km';
154
- };
155
- naturalLanguageSearch?: {
156
- /** Enables searching for jobs by natural language */
157
- enabled: boolean;
158
- /** Suggestion searches */
159
- suggestions: string[];
160
- };
161
- /** Override terms used in the plugin */
162
- terms?: JobSearchTranslationTerms;
163
- i18n?: JobSearchPluginI18nParams;
164
- /** Provide a plugin instance to enable job alerts. */
165
- alerts?: {
166
- plugin: ReturnType<typeof jobAlertsPlugin> | Promise<{
167
- jobAlertsPlugin: typeof jobAlertsPlugin;
168
- }>;
169
- params: Pick<JobAlertsPluginParams, 'config' | 'terms'>;
170
- };
171
- /** Provide a plugin instance to enable feedback. */
172
- feedback?: {
173
- plugin: FeedbackPlugin | Promise<{
174
- feedbackPlugin: typeof feedbackPlugin;
175
- }>;
176
- params?: {
177
- terms?: FeedbackPluginParams['terms'];
178
- theme: Partial<FeedbackPluginParams['theme']>;
179
- };
180
- };
181
- map?: {
182
- enabled: boolean;
183
- /** The map rendering library. Mapbox loads only when set explicitly. @default 'maplibre' */
184
- renderer?: 'mapbox' | 'maplibre';
185
- /** @deprecated Used only by Mapbox; will be removed when the Mapbox renderer is retired. */
186
- accessToken?: string;
187
- /** MapLibre: a style id (e.g. `default`) or HTTPS URL. Mapbox: a style URL, including `mapbox://`. */
188
- style?: string;
189
- pinColor?: string;
190
- defaultCenter?: [number, number];
191
- };
192
- results?: {
193
- prioritySegment?: string;
194
- };
195
- }
196
- export interface PrerenderJobSearchPluginParams extends JobSearchPluginParams {
197
- /** If true, the data needed to display the first page of results
198
- * will be fetched from the server. This is recommended if SEO is important
199
- * or you want your page to be progressively enhanced. */
200
- withData: boolean;
201
- }
202
- export interface RenderJobSearchPluginParams extends JobSearchPluginParams {
203
- /** When provided with initial data, the client side bundle will hydrate
204
- * the already present SSR content, avoiding any loading.
205
- */
206
- initialData?: {
207
- jobs: Awaited<ReturnType<typeof getJobSearchResults>>;
208
- };
209
- onStateChange: (partialState: Partial<JobSearchState>) => void;
210
- }
211
- export declare const createJobSearchDomManager: (logger: Logger) => {
212
- getRenderTargetElement: (widgetId: string | undefined) => Element;
213
- };
214
- export type JobSearchDomManager = ReturnType<typeof createJobSearchDomManager>;
215
- /** Visual theme for the Job Search UI. */
216
- export type JobSearchTheme = JobSearchPluginParams['theme'];
217
- export declare const jobSearchPlugin: () => ({ apiClient, rpcClient, logger, analytics }: {
218
- apiClient: import('@inploi/sdk').ApiClient;
219
- rpcClient: import('@inploi/sdk').InploiRpcClient;
220
- logger: Logger;
221
- analytics: import('@inploi/sdk').AnalyticsService;
222
- publishableKey?: string;
223
- env?: import('@inploi/sdk').InploiSdkEnvironment;
224
- }) => {
225
- /** Returns a string with the initial rendering state of the UI.
226
- * Useful when server-side rendering to avoid CLS.
227
- */
228
- prerender: (params: PrerenderJobSearchPluginParams) => Promise<{
229
- html: string;
230
- data: {
231
- jobs: {
232
- pagination: {
233
- total: number;
234
- current_page: number;
235
- per_page: number;
236
- last_page: number;
237
- };
238
- results: {
239
- id: number;
240
- createdAt: string | null;
241
- company: {
242
- name: string;
243
- logo: string | null;
244
- };
245
- pay: string | null;
246
- title: string;
247
- contractType: string | null;
248
- href: string;
249
- relativePostedDate: string;
250
- customData: {
251
- [x: string]: any;
252
- } | null;
253
- raw: {
254
- location_type: string;
255
- employment_type: string;
256
- id: number;
257
- company_name: string;
258
- company_logo: string | null;
259
- pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null;
260
- pay_currency: string;
261
- pay_mask: boolean;
262
- pay_display: boolean;
263
- pay: string | null;
264
- pay_min: string | null;
265
- pay_max: string | null;
266
- title: string;
267
- contract_type: string | null;
268
- created_at: string | null;
269
- custom_data: {
270
- [x: string]: any;
271
- } | null;
272
- href: string;
273
- industry: string | null;
274
- category: string | null;
275
- skills: string | null;
276
- town: string | null;
277
- city: string | null;
278
- country: string | null;
279
- vector_distance: string | null;
280
- coordinates?: {
281
- lat: number;
282
- lng: number;
283
- } | null | undefined;
284
- distance_meters: number | null;
285
- locale?: string | null | undefined;
286
- };
287
- distanceMeters: number | null;
288
- match: string | null;
289
- }[];
290
- };
291
- } | undefined;
292
- }>;
293
- /** Renders the Job Search Plugin inside the container element. */
294
- render: (params: RenderJobSearchPluginParams) => Promise<void>;
295
- };
296
- export { defaultTerms } from './lib/i18n.ts';
@@ -1,183 +0,0 @@
1
- import { InferOutput } from 'valibot';
2
- import { TFunction } from './lib/i18n';
3
-
4
- export declare const getAvailablePropertiesSchema: (t: TFunction) => import('valibot').SchemaWithPipe<readonly [import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').ArraySchema<import('valibot').ObjectSchema<{
5
- readonly label: import('valibot').SchemaWithPipe<readonly [import('valibot').UnknownSchema, import('valibot').TransformAction<any, string>, import('valibot').StringSchema<undefined>]>;
6
- readonly value: import('valibot').SchemaWithPipe<readonly [import('valibot').UnknownSchema, import('valibot').TransformAction<any, string>, import('valibot').StringSchema<undefined>]>;
7
- readonly jobs: import('valibot').NumberSchema<undefined>;
8
- }, undefined>, undefined>, undefined>, import('valibot').TransformAction<{
9
- [x: string]: {
10
- label: string;
11
- value: string;
12
- jobs: number;
13
- }[];
14
- }, {
15
- [x: string]: {
16
- label: string;
17
- value: string;
18
- jobs: number;
19
- }[];
20
- }>]>;
21
- export type AvailablePropertiesSchema = InferOutput<ReturnType<typeof getAvailablePropertiesSchema>>;
22
- export type FilterSuggestion = AvailablePropertiesSchema[keyof AvailablePropertiesSchema][number];
23
- export declare const PaginationSchema: import('valibot').ObjectSchema<{
24
- readonly total: import('valibot').NumberSchema<undefined>;
25
- readonly current_page: import('valibot').NumberSchema<undefined>;
26
- readonly per_page: import('valibot').NumberSchema<undefined>;
27
- readonly last_page: import('valibot').NumberSchema<undefined>;
28
- }, undefined>;
29
- export type PaginationSchema = InferOutput<typeof PaginationSchema>;
30
- export declare const JobPayloadSchema: import('valibot').ObjectSchema<{
31
- readonly id: import('valibot').NumberSchema<undefined>;
32
- readonly company_name: import('valibot').StringSchema<undefined>;
33
- readonly company_logo: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
34
- /** For backwards compat we are not strict about this field, as it used to return arbitrary strings like "Full time" anod not just enum members */
35
- readonly employment_type: import('valibot').StringSchema<undefined>;
36
- readonly location_type: import('valibot').PicklistSchema<readonly ["LOCATION", "REMOTE", "HYBRID"], undefined>;
37
- readonly pay_type: import('valibot').NullableSchema<import('valibot').UnionSchema<[import('valibot').LiteralSchema<"ANNUALLY", undefined>, import('valibot').LiteralSchema<"HOURLY", undefined>, import('valibot').LiteralSchema<"MONTHLY", undefined>, import('valibot').LiteralSchema<"WEEKLY", undefined>, import('valibot').LiteralSchema<"DAILY", undefined>], undefined>, undefined>;
38
- readonly pay_currency: import('valibot').StringSchema<undefined>;
39
- readonly pay_mask: import('valibot').BooleanSchema<undefined>;
40
- readonly pay_display: import('valibot').BooleanSchema<undefined>;
41
- readonly pay: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
42
- readonly pay_min: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
43
- readonly pay_max: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
44
- readonly title: import('valibot').StringSchema<undefined>;
45
- readonly contract_type: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
46
- readonly created_at: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
47
- readonly custom_data: import('valibot').NullableSchema<import('valibot').RecordSchema<import('valibot').AnySchema, import('valibot').AnySchema, undefined>, undefined>;
48
- readonly href: import('valibot').StringSchema<undefined>;
49
- readonly industry: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
50
- readonly category: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
51
- readonly skills: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
52
- readonly town: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
53
- readonly city: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
54
- readonly country: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
55
- readonly vector_distance: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
56
- readonly coordinates: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').ObjectSchema<{
57
- readonly lat: import('valibot').NumberSchema<undefined>;
58
- readonly lng: import('valibot').NumberSchema<undefined>;
59
- }, undefined>, undefined>, undefined>;
60
- /** Metres from the searched point; only present on location searches. A Postgres integer, accepted as a numeric string too in case the driver stringifies it. */
61
- readonly distance_meters: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').UnionSchema<[import('valibot').NumberSchema<undefined>, import('valibot').SchemaWithPipe<readonly [import('valibot').StringSchema<undefined>, import('valibot').DecimalAction<string, undefined>, import('valibot').TransformAction<any, number>]>], undefined>, undefined>, null>;
62
- readonly locale: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, undefined>;
63
- }, undefined>;
64
- export type JobPayloadSchema = InferOutput<typeof JobPayloadSchema>;
65
- export declare const getJobSchema: (t: TFunction, locale?: string | string[] | undefined) => import('valibot').SchemaWithPipe<readonly [import('valibot').ObjectSchema<{
66
- readonly id: import('valibot').NumberSchema<undefined>;
67
- readonly company_name: import('valibot').StringSchema<undefined>;
68
- readonly company_logo: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
69
- /** For backwards compat we are not strict about this field, as it used to return arbitrary strings like "Full time" anod not just enum members */
70
- readonly employment_type: import('valibot').StringSchema<undefined>;
71
- readonly location_type: import('valibot').PicklistSchema<readonly ["LOCATION", "REMOTE", "HYBRID"], undefined>;
72
- readonly pay_type: import('valibot').NullableSchema<import('valibot').UnionSchema<[import('valibot').LiteralSchema<"ANNUALLY", undefined>, import('valibot').LiteralSchema<"HOURLY", undefined>, import('valibot').LiteralSchema<"MONTHLY", undefined>, import('valibot').LiteralSchema<"WEEKLY", undefined>, import('valibot').LiteralSchema<"DAILY", undefined>], undefined>, undefined>;
73
- readonly pay_currency: import('valibot').StringSchema<undefined>;
74
- readonly pay_mask: import('valibot').BooleanSchema<undefined>;
75
- readonly pay_display: import('valibot').BooleanSchema<undefined>;
76
- readonly pay: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
77
- readonly pay_min: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
78
- readonly pay_max: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
79
- readonly title: import('valibot').StringSchema<undefined>;
80
- readonly contract_type: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
81
- readonly created_at: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
82
- readonly custom_data: import('valibot').NullableSchema<import('valibot').RecordSchema<import('valibot').AnySchema, import('valibot').AnySchema, undefined>, undefined>;
83
- readonly href: import('valibot').StringSchema<undefined>;
84
- readonly industry: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
85
- readonly category: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
86
- readonly skills: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
87
- readonly town: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
88
- readonly city: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
89
- readonly country: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
90
- readonly vector_distance: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, null>;
91
- readonly coordinates: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').ObjectSchema<{
92
- readonly lat: import('valibot').NumberSchema<undefined>;
93
- readonly lng: import('valibot').NumberSchema<undefined>;
94
- }, undefined>, undefined>, undefined>;
95
- /** Metres from the searched point; only present on location searches. A Postgres integer, accepted as a numeric string too in case the driver stringifies it. */
96
- readonly distance_meters: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').UnionSchema<[import('valibot').NumberSchema<undefined>, import('valibot').SchemaWithPipe<readonly [import('valibot').StringSchema<undefined>, import('valibot').DecimalAction<string, undefined>, import('valibot').TransformAction<any, number>]>], undefined>, undefined>, null>;
97
- readonly locale: import('valibot').OptionalSchema<import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>, undefined>;
98
- }, undefined>, import('valibot').TransformAction<{
99
- id: number;
100
- company_name: string;
101
- company_logo: string | null;
102
- employment_type: string;
103
- location_type: "LOCATION" | "REMOTE" | "HYBRID";
104
- pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null;
105
- pay_currency: string;
106
- pay_mask: boolean;
107
- pay_display: boolean;
108
- pay: string | null;
109
- pay_min: string | null;
110
- pay_max: string | null;
111
- title: string;
112
- contract_type: string | null;
113
- created_at: string | null;
114
- custom_data: {
115
- [x: string]: any;
116
- } | null;
117
- href: string;
118
- industry: string | null;
119
- category: string | null;
120
- skills: string | null;
121
- town: string | null;
122
- city: string | null;
123
- country: string | null;
124
- vector_distance: string | null;
125
- coordinates?: {
126
- lat: number;
127
- lng: number;
128
- } | null | undefined;
129
- distance_meters: number | null;
130
- locale?: string | null | undefined;
131
- }, {
132
- id: number;
133
- createdAt: string | null;
134
- company: {
135
- name: string;
136
- logo: string | null;
137
- };
138
- pay: string | null;
139
- title: string;
140
- contractType: string | null;
141
- href: string;
142
- relativePostedDate: string;
143
- customData: {
144
- [x: string]: any;
145
- } | null;
146
- raw: {
147
- location_type: string;
148
- employment_type: string;
149
- id: number;
150
- company_name: string;
151
- company_logo: string | null;
152
- pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null;
153
- pay_currency: string;
154
- pay_mask: boolean;
155
- pay_display: boolean;
156
- pay: string | null;
157
- pay_min: string | null;
158
- pay_max: string | null;
159
- title: string;
160
- contract_type: string | null;
161
- created_at: string | null;
162
- custom_data: {
163
- [x: string]: any;
164
- } | null;
165
- href: string;
166
- industry: string | null;
167
- category: string | null;
168
- skills: string | null;
169
- town: string | null;
170
- city: string | null;
171
- country: string | null;
172
- vector_distance: string | null;
173
- coordinates?: {
174
- lat: number;
175
- lng: number;
176
- } | null | undefined;
177
- distance_meters: number | null;
178
- locale?: string | null | undefined;
179
- };
180
- distanceMeters: number | null;
181
- match: string | null;
182
- }>]>;
183
- export type JobSchema = InferOutput<ReturnType<typeof getJobSchema>>;
@@ -1,7 +0,0 @@
1
- import { JobSearchState } from '../components/job-search';
2
-
3
- export declare const cacheKey: (value: {
4
- state: JobSearchState;
5
- baseKey: string;
6
- mode?: JobSearchState["mode"];
7
- }) => string;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
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
- /** Job search retains its UK fallback; address suggestions deliberately have no default country. */
4
- export declare const searchCountries: (jobCountries: string[]) => string[];
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- type NestedObject = {
2
- [key: string]: NestedObject | any;
3
- };
4
- /** Converts an object with dot separated keys to a nested object
5
- * @example {"a.b.c": 1} -> {a: {b: {c: 1}}}
6
- */
7
- export declare function convertObject<T extends Record<string, any>>(input: T, transformValue?: (value: any) => any): NestedObject;
8
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- export type DistanceUnit = 'miles' | 'km';
2
- export declare const milesToMeters: (miles: number) => number;
3
- export declare const kmToMeters: (km: number) => number;
4
- /**
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.
7
- * The page's language wins over `locale`: the widget's `i18n.locale` chooses which jobs are shown, while the
8
- * number sits in text written in the page's language (PROD-7117).
9
- */
10
- export declare const createDistanceFormatter: (locale: string | undefined, unit: DistanceUnit, maximumFractionDigits?: number) => Intl.NumberFormat;
11
- export declare const formatDistanceMeters: (meters: number, unit: DistanceUnit, locale: string | undefined) => string;
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- export declare const useMediaQuery: (query: string) => boolean;
2
- type ViewTrackingOptions = {
3
- minViewTime?: number;
4
- visibilityThreshold?: number | number[];
5
- onView: () => void;
6
- };
7
- export declare const useViewTracking: (elementRef: React.RefObject<HTMLElement>, { minViewTime, visibilityThreshold, onView }: ViewTrackingOptions) => void;
8
- export {};