@inploi/plugin-job-search 0.24.0 → 0.25.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 (46) hide show
  1. package/cdn/index.js +17 -17
  2. package/cdn/style.css +1 -1
  3. package/dist/components/button.d.ts +1 -1
  4. package/dist/components/combobox.d.ts +25 -0
  5. package/dist/components/filter-content.active.d.ts +174 -1
  6. package/dist/components/filter-section.d.ts +3 -2
  7. package/dist/components/filter.d.ts +57 -0
  8. package/dist/components/geo-search.d.ts +22 -0
  9. package/dist/components/geo-search.locate-button.d.ts +8 -0
  10. package/dist/components/geo-search.location-input.d.ts +10 -0
  11. package/dist/components/geo-search.utils.d.ts +7 -0
  12. package/dist/components/icon.d.ts +2 -0
  13. package/dist/components/job-search.d.ts +21 -1
  14. package/dist/components/keyword-search.d.ts +3 -2
  15. package/dist/components/mode-switch.d.ts +3 -3
  16. package/dist/components/natural-language-section.d.ts +3 -2
  17. package/dist/components/results-section.d.ts +3 -3
  18. package/dist/components/tag.d.ts +1 -1
  19. package/dist/index.cjs +4 -20
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1170 -4735
  22. package/dist/job-search.api-1670984d.cjs +17 -0
  23. package/dist/job-search.api-c4af53ba.js +3871 -0
  24. package/dist/job-search.api.d.ts +83 -27
  25. package/dist/job-search.d.ts +10 -3
  26. package/dist/job-search.schemas.d.ts +55 -8
  27. package/dist/lib/cache-key.d.ts +2 -3
  28. package/dist/lib/currency.d.ts +1 -1
  29. package/dist/lib/datetime.d.ts +1 -1
  30. package/dist/lib/{translation.terms.d.ts → i18n.d.ts} +118 -63
  31. package/dist/lib/type-utils.d.ts +1 -0
  32. package/dist/lib/utils.d.ts +3 -0
  33. package/dist/plugin-job-alerts-7fc7b0f9.cjs +1050 -0
  34. package/dist/{plugin-job-alerts-6f8dbd69.js → plugin-job-alerts-a5cbb5be.js} +1777 -1812
  35. package/dist/style/tokens.d.ts +3 -3
  36. package/dist/style.css +1 -1
  37. package/dist/utils.cjs +1 -1
  38. package/dist/utils.d.ts +1 -1
  39. package/dist/utils.js +5 -15
  40. package/package.json +11 -10
  41. package/dist/datetime-3eccae90.cjs +0 -1
  42. package/dist/datetime-796d4b37.js +0 -32
  43. package/dist/job-search.state.d.ts +0 -4
  44. package/dist/lib/translation.d.ts +0 -44
  45. package/dist/lib/translation.test.d.ts +0 -1
  46. package/dist/plugin-job-alerts-4b46b097.cjs +0 -1050
@@ -1,5 +1,5 @@
1
- export declare const TranslationProvider: ({ terms, children, }: {
2
- terms?: Partial<import('./translation').TranslationDict<{
1
+ export declare const TranslationProvider: (props: {
2
+ terms?: Partial<import('@inploi/i18n/translation').TranslationDict<{
3
3
  readonly type_to_search_jobs: "Type to search jobs";
4
4
  readonly type_to_search: "Type to search";
5
5
  readonly jobs_found: {
@@ -35,8 +35,21 @@ export declare const TranslationProvider: ({ terms, children, }: {
35
35
  readonly advanced_mode: "Filters";
36
36
  readonly simple_mode: "Hide filters";
37
37
  readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
38
+ readonly geo_error_timeout: "Timed out. Please type your location manually.";
39
+ readonly geo_error_permission_denied: "Please allow location access to use this feature.";
40
+ readonly geo_error_position_unavailable: "Could not locate you. Please type your location manually.";
41
+ readonly geo_my_location: "My location";
42
+ readonly geo_locating: "Locating you...";
43
+ readonly geo_search_placeholder: "Search for a location";
44
+ readonly geo_clear_search: "Clear location search";
45
+ readonly location_provided: "Provided location";
46
+ readonly search_label: "What";
47
+ readonly geo_label: "Where";
48
+ readonly geo_range_label: "Within";
49
+ readonly geo_suggestions_error: "Could not get the suggested locations.";
38
50
  }>> | undefined;
39
- children: import('preact').ComponentChildren;
51
+ locale: string | undefined;
52
+ children?: import('preact').ComponentChildren;
40
53
  }) => import("preact").JSX.Element, useTranslation: <T extends {
41
54
  readonly type_to_search_jobs: "Type to search jobs";
42
55
  readonly type_to_search: "Type to search";
@@ -73,6 +86,18 @@ export declare const TranslationProvider: ({ terms, children, }: {
73
86
  readonly advanced_mode: "Filters";
74
87
  readonly simple_mode: "Hide filters";
75
88
  readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
89
+ readonly geo_error_timeout: "Timed out. Please type your location manually.";
90
+ readonly geo_error_permission_denied: "Please allow location access to use this feature.";
91
+ readonly geo_error_position_unavailable: "Could not locate you. Please type your location manually.";
92
+ readonly geo_my_location: "My location";
93
+ readonly geo_locating: "Locating you...";
94
+ readonly geo_search_placeholder: "Search for a location";
95
+ readonly geo_clear_search: "Clear location search";
96
+ readonly location_provided: "Provided location";
97
+ readonly search_label: "What";
98
+ readonly geo_label: "Where";
99
+ readonly geo_range_label: "Within";
100
+ readonly geo_suggestions_error: "Could not get the suggested locations.";
76
101
  } = {
77
102
  readonly type_to_search_jobs: "Type to search jobs";
78
103
  readonly type_to_search: "Type to search";
@@ -109,19 +134,21 @@ export declare const TranslationProvider: ({ terms, children, }: {
109
134
  readonly advanced_mode: "Filters";
110
135
  readonly simple_mode: "Hide filters";
111
136
  readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
137
+ readonly geo_error_timeout: "Timed out. Please type your location manually.";
138
+ readonly geo_error_permission_denied: "Please allow location access to use this feature.";
139
+ readonly geo_error_position_unavailable: "Could not locate you. Please type your location manually.";
140
+ readonly geo_my_location: "My location";
141
+ readonly geo_locating: "Locating you...";
142
+ readonly geo_search_placeholder: "Search for a location";
143
+ readonly geo_clear_search: "Clear location search";
144
+ readonly location_provided: "Provided location";
145
+ readonly search_label: "What";
146
+ readonly geo_label: "Where";
147
+ readonly geo_range_label: "Within";
148
+ readonly geo_suggestions_error: "Could not get the suggested locations.";
112
149
  }>() => {
113
- t: {
114
- <T_2 extends { [K in keyof T]: T[K] extends {
115
- one: string;
116
- other: string;
117
- } ? K : (T[K] & string extends infer T_1 ? T_1 extends T[K] & string ? T_1 extends `${string}{{count}}${string}` ? true : false : never : never) extends true ? K : never; }[keyof T]>(key: T_2, options: {
118
- count: number;
119
- }): string;
120
- <T_3 extends Exclude<keyof T, { [K in keyof T]: T[K] extends {
121
- one: string;
122
- other: string;
123
- } ? K : (T[K] & string extends infer T_1 ? T_1 extends T[K] & string ? T_1 extends `${string}{{count}}${string}` ? true : false : never : never) extends true ? K : never; }[keyof T]>>(key: T_3): string;
124
- };
150
+ t: import('@inploi/i18n/translation').TFn<T>;
151
+ locale: string | undefined;
125
152
  }, createTFunction: <T extends {
126
153
  readonly type_to_search_jobs: "Type to search jobs";
127
154
  readonly type_to_search: "Type to search";
@@ -158,6 +185,18 @@ export declare const TranslationProvider: ({ terms, children, }: {
158
185
  readonly advanced_mode: "Filters";
159
186
  readonly simple_mode: "Hide filters";
160
187
  readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
188
+ readonly geo_error_timeout: "Timed out. Please type your location manually.";
189
+ readonly geo_error_permission_denied: "Please allow location access to use this feature.";
190
+ readonly geo_error_position_unavailable: "Could not locate you. Please type your location manually.";
191
+ readonly geo_my_location: "My location";
192
+ readonly geo_locating: "Locating you...";
193
+ readonly geo_search_placeholder: "Search for a location";
194
+ readonly geo_clear_search: "Clear location search";
195
+ readonly location_provided: "Provided location";
196
+ readonly search_label: "What";
197
+ readonly geo_label: "Where";
198
+ readonly geo_range_label: "Within";
199
+ readonly geo_suggestions_error: "Could not get the suggested locations.";
161
200
  } = {
162
201
  readonly type_to_search_jobs: "Type to search jobs";
163
202
  readonly type_to_search: "Type to search";
@@ -194,53 +233,69 @@ export declare const TranslationProvider: ({ terms, children, }: {
194
233
  readonly advanced_mode: "Filters";
195
234
  readonly simple_mode: "Hide filters";
196
235
  readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
197
- }>(overrides: Partial<import('./translation').TranslationDict<{
198
- readonly type_to_search_jobs: "Type to search jobs";
199
- readonly type_to_search: "Type to search";
200
- readonly jobs_found: {
201
- readonly one: "{{count}} job found";
202
- readonly other: "{{count}} jobs found";
203
- };
204
- readonly no_jobs_found: "No jobs found";
205
- readonly no_jobs_found_description: "We could not find any jobs matching your filtering criteria.";
206
- readonly jobs_loading_error: "We’re having trouble loading available jobs.";
207
- readonly filters_loading_error: "We’re having trouble loading available filters.";
208
- readonly no_filter_options_available: "No filter options available.";
209
- readonly clear: "Clear";
210
- readonly selected: "selected";
211
- readonly done: "Done";
212
- readonly skip: "Skip";
213
- readonly new: "NEW";
214
- readonly posted: "Posted";
215
- readonly retry: "Retry";
216
- readonly widget_unavailable: "Sorry, this widget is unavailable at the moment.";
217
- readonly load_more_count: "Load {{count}} more";
218
- readonly of_remaining_count: "of {{count}} remaining";
219
- readonly create_alert: "Create alert";
220
- readonly alert_header_text: "You will be alerted for new jobs matching the filters currently set";
221
- readonly today: "today";
222
- readonly over_30_days_ago: "over 30 days ago";
223
- readonly in_over_30_days: "in over 30 days";
224
- readonly up_to: "Up to";
225
- readonly from: "From";
226
- readonly invalid_salary: "Invalid salary";
227
- readonly competitive: "Competitive";
228
- readonly natural_language_input: "Type anything";
229
- readonly great_match: "Great match";
230
- readonly advanced_mode: "Filters";
231
- readonly simple_mode: "Hide filters";
232
- readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
233
- }>>) => {
234
- <T_2 extends { [K in keyof T]: T[K] extends {
235
- one: string;
236
- other: string;
237
- } ? K : (T[K] & string extends infer T_1 ? T_1 extends T[K] & string ? T_1 extends `${string}{{count}}${string}` ? true : false : never : never) extends true ? K : never; }[keyof T]>(key: T_2, options: {
238
- count: number;
239
- }): string;
240
- <T_4 extends Exclude<keyof T, { [K in keyof T]: T[K] extends {
241
- one: string;
242
- other: string;
243
- } ? K : (T[K] & string extends infer T_3 ? T_3 extends T[K] & string ? T_3 extends `${string}{{count}}${string}` ? true : false : never : never) extends true ? K : never; }[keyof T]>>(key: T_4): string;
244
- };
236
+ readonly geo_error_timeout: "Timed out. Please type your location manually.";
237
+ readonly geo_error_permission_denied: "Please allow location access to use this feature.";
238
+ readonly geo_error_position_unavailable: "Could not locate you. Please type your location manually.";
239
+ readonly geo_my_location: "My location";
240
+ readonly geo_locating: "Locating you...";
241
+ readonly geo_search_placeholder: "Search for a location";
242
+ readonly geo_clear_search: "Clear location search";
243
+ readonly location_provided: "Provided location";
244
+ readonly search_label: "What";
245
+ readonly geo_label: "Where";
246
+ readonly geo_range_label: "Within";
247
+ readonly geo_suggestions_error: "Could not get the suggested locations.";
248
+ }>(options: {
249
+ overrides: Partial<import('@inploi/i18n/translation').TranslationDict<{
250
+ readonly type_to_search_jobs: "Type to search jobs";
251
+ readonly type_to_search: "Type to search";
252
+ readonly jobs_found: {
253
+ readonly one: "{{count}} job found";
254
+ readonly other: "{{count}} jobs found";
255
+ };
256
+ readonly no_jobs_found: "No jobs found";
257
+ readonly no_jobs_found_description: "We could not find any jobs matching your filtering criteria.";
258
+ readonly jobs_loading_error: "We’re having trouble loading available jobs.";
259
+ readonly filters_loading_error: "We’re having trouble loading available filters.";
260
+ readonly no_filter_options_available: "No filter options available.";
261
+ readonly clear: "Clear";
262
+ readonly selected: "selected";
263
+ readonly done: "Done";
264
+ readonly skip: "Skip";
265
+ readonly new: "NEW";
266
+ readonly posted: "Posted";
267
+ readonly retry: "Retry";
268
+ readonly widget_unavailable: "Sorry, this widget is unavailable at the moment.";
269
+ readonly load_more_count: "Load {{count}} more";
270
+ readonly of_remaining_count: "of {{count}} remaining";
271
+ readonly create_alert: "Create alert";
272
+ readonly alert_header_text: "You will be alerted for new jobs matching the filters currently set";
273
+ readonly today: "today";
274
+ readonly over_30_days_ago: "over 30 days ago";
275
+ readonly in_over_30_days: "in over 30 days";
276
+ readonly up_to: "Up to";
277
+ readonly from: "From";
278
+ readonly invalid_salary: "Invalid salary";
279
+ readonly competitive: "Competitive";
280
+ readonly natural_language_input: "Type anything";
281
+ readonly great_match: "Great match";
282
+ readonly advanced_mode: "Filters";
283
+ readonly simple_mode: "Hide filters";
284
+ readonly ai_disclaimer: "Results may not be perfect. AI-powered search can occasionally suggest unrelated content.";
285
+ readonly geo_error_timeout: "Timed out. Please type your location manually.";
286
+ readonly geo_error_permission_denied: "Please allow location access to use this feature.";
287
+ readonly geo_error_position_unavailable: "Could not locate you. Please type your location manually.";
288
+ readonly geo_my_location: "My location";
289
+ readonly geo_locating: "Locating you...";
290
+ readonly geo_search_placeholder: "Search for a location";
291
+ readonly geo_clear_search: "Clear location search";
292
+ readonly location_provided: "Provided location";
293
+ readonly search_label: "What";
294
+ readonly geo_label: "Where";
295
+ readonly geo_range_label: "Within";
296
+ readonly geo_suggestions_error: "Could not get the suggested locations.";
297
+ }>>;
298
+ locale: string | undefined;
299
+ }) => import('@inploi/i18n/translation').TFn<T>;
245
300
  export type TFunction = ReturnType<typeof useTranslation>['t'];
246
301
  export type JobSearchTranslationTerms = Parameters<typeof TranslationProvider>[0]['terms'];
@@ -20,6 +20,7 @@ export type Select<T, U extends T> = U;
20
20
  export type Maybe<T> = T | null | undefined;
21
21
  export type PartialReadonly<T> = T | Readonly<T>;
22
22
  export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
23
+ export type DistributiveOmit<T, U> = T extends any ? Pick<T, Exclude<keyof T, U>> : never;
23
24
  export type Jsonify<T> = IsAny<T> extends true ? any : T extends ({
24
25
  toJSON(): infer U;
25
26
  }) ? U extends JsonValue ? U : unknown : T extends JsonPrimitive ? T : T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends Promise<unknown> ? EmptyObject : T extends Map<unknown, unknown> ? EmptyObject : T extends Set<unknown> ? EmptyObject : T extends TypedArray ? Record<string, number> : T extends NotJson ? never : T extends [] ? [] : T extends readonly [infer F, ...infer R] ? [NeverToNull<Jsonify<F>>, ...Jsonify<R>] : T extends readonly unknown[] ? NeverToNull<Jsonify<T[number]>>[] : T extends Record<keyof unknown, unknown> ? JsonifyObject<T> : unknown extends T ? unknown : never;
@@ -1,4 +1,7 @@
1
+ import { GeoSearchFilter } from '../components/geo-search';
1
2
  import { FilterProperty } from '..';
2
3
 
3
4
  /** Reads from search params provided and adds to list of filters. */
4
5
  export declare const getStatefulPropertiesFromSearchParams: (properties: FilterProperty[], searchParams: URLSearchParams) => FilterProperty[];
6
+ export declare const getGeolocationFromSearchParams: (searchParams: URLSearchParams) => GeoSearchFilter;
7
+ export declare const useDebouncedValue: <T>(value: T, timeout?: number) => T;