@inploi/plugin-job-search 0.3.0 → 0.5.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/cdn/index.js +5 -5
- package/dist/job-search.api.d.ts +16 -0
- package/dist/job-search.d.ts +9 -1
- package/dist/job-search.schemas.d.ts +62 -0
- package/dist/plugin-job-search.cjs +258 -100
- package/dist/plugin-job-search.js +258 -100
- package/package.json +10 -6
package/dist/job-search.api.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
6
6
|
data: import("valibot").ArraySchema<import("valibot").SchemaWithTransform<import("valibot").ObjectSchema<{
|
|
7
7
|
id: import("valibot").NumberSchema<number>;
|
|
8
8
|
company_name: import("valibot").StringSchema<string>;
|
|
9
|
+
company_logo: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
9
10
|
employment_type: import("valibot").StringSchema<string>;
|
|
10
11
|
location_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"LOCATION", "LOCATION">, import("valibot").LiteralSchema<"REMOTE", "REMOTE">, import("valibot").LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
|
|
11
12
|
pay_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ANNUALLY", "ANNUALLY">, import("valibot").LiteralSchema<"HOURLY", "HOURLY">, import("valibot").LiteralSchema<"MONTHLY", "MONTHLY">, import("valibot").LiteralSchema<"WEEKLY", "WEEKLY">, import("valibot").LiteralSchema<"DAILY", "DAILY">], "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY">;
|
|
@@ -51,6 +52,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
51
52
|
[x: string]: any;
|
|
52
53
|
} | null;
|
|
53
54
|
href: string;
|
|
55
|
+
company_logo?: string | undefined;
|
|
54
56
|
industry?: string | undefined;
|
|
55
57
|
category?: string | undefined;
|
|
56
58
|
skills?: string | undefined;
|
|
@@ -78,6 +80,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
78
80
|
[x: string]: any;
|
|
79
81
|
} | null;
|
|
80
82
|
href: string;
|
|
83
|
+
company_logo?: string | undefined;
|
|
81
84
|
industry?: string | undefined;
|
|
82
85
|
category?: string | undefined;
|
|
83
86
|
skills?: string | undefined;
|
|
@@ -89,6 +92,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
89
92
|
isNew: boolean;
|
|
90
93
|
company: {
|
|
91
94
|
name: string;
|
|
95
|
+
logo: string | undefined;
|
|
92
96
|
};
|
|
93
97
|
employmentType: string;
|
|
94
98
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|
|
@@ -122,6 +126,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
122
126
|
[x: string]: any;
|
|
123
127
|
} | null;
|
|
124
128
|
href: string;
|
|
129
|
+
company_logo?: string | undefined;
|
|
125
130
|
industry?: string | undefined;
|
|
126
131
|
category?: string | undefined;
|
|
127
132
|
skills?: string | undefined;
|
|
@@ -133,6 +138,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
133
138
|
isNew: boolean;
|
|
134
139
|
company: {
|
|
135
140
|
name: string;
|
|
141
|
+
logo: string | undefined;
|
|
136
142
|
};
|
|
137
143
|
employmentType: string;
|
|
138
144
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|
|
@@ -179,6 +185,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
179
185
|
[x: string]: any;
|
|
180
186
|
} | null;
|
|
181
187
|
href: string;
|
|
188
|
+
company_logo?: string | undefined;
|
|
182
189
|
industry?: string | undefined;
|
|
183
190
|
category?: string | undefined;
|
|
184
191
|
skills?: string | undefined;
|
|
@@ -190,6 +197,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
190
197
|
isNew: boolean;
|
|
191
198
|
company: {
|
|
192
199
|
name: string;
|
|
200
|
+
logo: string | undefined;
|
|
193
201
|
};
|
|
194
202
|
employmentType: string;
|
|
195
203
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|
|
@@ -237,6 +245,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
237
245
|
[x: string]: any;
|
|
238
246
|
} | null;
|
|
239
247
|
href: string;
|
|
248
|
+
company_logo?: string | undefined;
|
|
240
249
|
industry?: string | undefined;
|
|
241
250
|
category?: string | undefined;
|
|
242
251
|
skills?: string | undefined;
|
|
@@ -248,6 +257,7 @@ declare const JobSearchResponseSchema: import("valibot").SchemaWithTransform<imp
|
|
|
248
257
|
isNew: boolean;
|
|
249
258
|
company: {
|
|
250
259
|
name: string;
|
|
260
|
+
logo: string | undefined;
|
|
251
261
|
};
|
|
252
262
|
employmentType: string;
|
|
253
263
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|
|
@@ -309,6 +319,7 @@ export declare const getJobSearchResults: ({ apiClient, logger, signal, filters,
|
|
|
309
319
|
[x: string]: any;
|
|
310
320
|
} | null;
|
|
311
321
|
href: string;
|
|
322
|
+
company_logo?: string | undefined;
|
|
312
323
|
industry?: string | undefined;
|
|
313
324
|
category?: string | undefined;
|
|
314
325
|
skills?: string | undefined;
|
|
@@ -320,6 +331,7 @@ export declare const getJobSearchResults: ({ apiClient, logger, signal, filters,
|
|
|
320
331
|
isNew: boolean;
|
|
321
332
|
company: {
|
|
322
333
|
name: string;
|
|
334
|
+
logo: string | undefined;
|
|
323
335
|
};
|
|
324
336
|
employmentType: string;
|
|
325
337
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|
|
@@ -339,18 +351,22 @@ export type QueryState<T> = {
|
|
|
339
351
|
state: 'error';
|
|
340
352
|
data?: never;
|
|
341
353
|
error: unknown;
|
|
354
|
+
swr: SWRResponse<T>;
|
|
342
355
|
} | {
|
|
343
356
|
state: 'loading';
|
|
344
357
|
data?: never;
|
|
345
358
|
error?: never;
|
|
359
|
+
swr: SWRResponse<T>;
|
|
346
360
|
} | {
|
|
347
361
|
state: 'revalidating';
|
|
348
362
|
data: T;
|
|
349
363
|
error?: never;
|
|
364
|
+
swr: SWRResponse<T>;
|
|
350
365
|
} | {
|
|
351
366
|
state: 'loaded';
|
|
352
367
|
data: T;
|
|
353
368
|
error?: never;
|
|
369
|
+
swr: SWRResponse<T>;
|
|
354
370
|
};
|
|
355
371
|
/** Binds together state to data, fixing useSWR’s type-safety */
|
|
356
372
|
export declare const getQueryState: <T>(swr: SWRResponse<T, any, any>) => QueryState<T>;
|
package/dist/job-search.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getJobSearchResults } from './job-search.api.ts';
|
|
2
|
+
import { FilterValue } from './components/filter.tsx';
|
|
2
3
|
import { IconName } from './components/icon.tsx';
|
|
3
4
|
import { HintedString } from './lib/type-utils.ts';
|
|
4
5
|
type FontSettings = {
|
|
@@ -69,8 +70,9 @@ export type JobSearchPluginParams = {
|
|
|
69
70
|
/** Array of properties because _order matters_ to display them. */
|
|
70
71
|
properties: FilterProperty[];
|
|
71
72
|
jobCard: {
|
|
72
|
-
subheading: DisplayableFilterProperty;
|
|
73
|
+
subheading: DisplayableFilterProperty | null;
|
|
73
74
|
infoTags: DisplayableFilterProperty[];
|
|
75
|
+
showLogo?: boolean;
|
|
74
76
|
};
|
|
75
77
|
};
|
|
76
78
|
export interface SSRJobSearchPluginParams extends JobSearchPluginParams {
|
|
@@ -86,6 +88,7 @@ export interface CSRJobSearchPluginParams extends JobSearchPluginParams {
|
|
|
86
88
|
initialData?: {
|
|
87
89
|
jobs: Awaited<ReturnType<typeof getJobSearchResults>>;
|
|
88
90
|
};
|
|
91
|
+
onFilterChange: (params: Record<string, FilterValue | undefined>) => void;
|
|
89
92
|
}
|
|
90
93
|
export declare const createJobSearchDomManager: () => {
|
|
91
94
|
getRenderTargetElement: () => Element;
|
|
@@ -130,6 +133,7 @@ export declare const jobSearchPlugin: () => ({ apiClient, logger, analytics }: {
|
|
|
130
133
|
[x: string]: any;
|
|
131
134
|
} | null;
|
|
132
135
|
href: string;
|
|
136
|
+
company_logo?: string | undefined;
|
|
133
137
|
industry?: string | undefined;
|
|
134
138
|
category?: string | undefined;
|
|
135
139
|
skills?: string | undefined;
|
|
@@ -140,7 +144,11 @@ export declare const jobSearchPlugin: () => ({ apiClient, logger, analytics }: {
|
|
|
140
144
|
id: number;
|
|
141
145
|
isNew: boolean;
|
|
142
146
|
company: {
|
|
147
|
+
/** Whether users can select one or multiple values.
|
|
148
|
+
* @default `'one'`
|
|
149
|
+
*/
|
|
143
150
|
name: string;
|
|
151
|
+
logo: string | undefined;
|
|
144
152
|
};
|
|
145
153
|
employmentType: string;
|
|
146
154
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|
|
@@ -28,9 +28,68 @@ export declare const PaginationSchema: import("valibot").ObjectSchema<{
|
|
|
28
28
|
last_page: number;
|
|
29
29
|
}>;
|
|
30
30
|
export type PaginationSchema = Output<typeof PaginationSchema>;
|
|
31
|
+
export declare const JobPayloadSchema: import("valibot").ObjectSchema<{
|
|
32
|
+
id: import("valibot").NumberSchema<number>;
|
|
33
|
+
company_name: import("valibot").StringSchema<string>;
|
|
34
|
+
company_logo: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
35
|
+
employment_type: import("valibot").StringSchema<string>;
|
|
36
|
+
location_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"LOCATION", "LOCATION">, import("valibot").LiteralSchema<"REMOTE", "REMOTE">, import("valibot").LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
|
|
37
|
+
pay_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ANNUALLY", "ANNUALLY">, import("valibot").LiteralSchema<"HOURLY", "HOURLY">, import("valibot").LiteralSchema<"MONTHLY", "MONTHLY">, import("valibot").LiteralSchema<"WEEKLY", "WEEKLY">, import("valibot").LiteralSchema<"DAILY", "DAILY">], "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY">;
|
|
38
|
+
pay_currency: import("valibot").StringSchema<string>;
|
|
39
|
+
pay_mask: import("valibot").BooleanSchema<boolean>;
|
|
40
|
+
pay_display: import("valibot").BooleanSchema<boolean>;
|
|
41
|
+
pay: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
|
|
42
|
+
pay_min: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
|
|
43
|
+
pay_max: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
|
|
44
|
+
description: import("valibot").StringSchema<string>;
|
|
45
|
+
title: import("valibot").StringSchema<string>;
|
|
46
|
+
contract_type: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
|
|
47
|
+
created_at: import("valibot").NullableSchema<import("valibot").StringSchema<string>, undefined, string | null>;
|
|
48
|
+
custom_data: import("valibot").NullableSchema<import("valibot").RecordSchema<import("valibot").StringSchema<string>, import("valibot").AnySchema<any>, {
|
|
49
|
+
[x: string]: any;
|
|
50
|
+
}>, undefined, {
|
|
51
|
+
[x: string]: any;
|
|
52
|
+
} | null>;
|
|
53
|
+
href: import("valibot").StringSchema<string>;
|
|
54
|
+
industry: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
55
|
+
category: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
56
|
+
skills: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
57
|
+
town: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
58
|
+
city: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
59
|
+
country: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
60
|
+
}, undefined, {
|
|
61
|
+
id: number;
|
|
62
|
+
company_name: string;
|
|
63
|
+
employment_type: string;
|
|
64
|
+
location_type: "LOCATION" | "REMOTE" | "HYBRID";
|
|
65
|
+
pay_type: "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY";
|
|
66
|
+
pay_currency: string;
|
|
67
|
+
pay_mask: boolean;
|
|
68
|
+
pay_display: boolean;
|
|
69
|
+
pay: string | null;
|
|
70
|
+
pay_min: string | null;
|
|
71
|
+
pay_max: string | null;
|
|
72
|
+
description: string;
|
|
73
|
+
title: string;
|
|
74
|
+
contract_type: string | null;
|
|
75
|
+
created_at: string | null;
|
|
76
|
+
custom_data: {
|
|
77
|
+
[x: string]: any;
|
|
78
|
+
} | null;
|
|
79
|
+
href: string;
|
|
80
|
+
company_logo?: string | undefined;
|
|
81
|
+
industry?: string | undefined;
|
|
82
|
+
category?: string | undefined;
|
|
83
|
+
skills?: string | undefined;
|
|
84
|
+
town?: string | undefined;
|
|
85
|
+
city?: string | undefined;
|
|
86
|
+
country?: string | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
export type JobPayloadSchema = Output<typeof JobPayloadSchema>;
|
|
31
89
|
export declare const JobSchema: import("valibot").SchemaWithTransform<import("valibot").ObjectSchema<{
|
|
32
90
|
id: import("valibot").NumberSchema<number>;
|
|
33
91
|
company_name: import("valibot").StringSchema<string>;
|
|
92
|
+
company_logo: import("valibot").OptionalSchema<import("valibot").StringSchema<string>, undefined, string | undefined>;
|
|
34
93
|
employment_type: import("valibot").StringSchema<string>;
|
|
35
94
|
location_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"LOCATION", "LOCATION">, import("valibot").LiteralSchema<"REMOTE", "REMOTE">, import("valibot").LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
|
|
36
95
|
pay_type: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"ANNUALLY", "ANNUALLY">, import("valibot").LiteralSchema<"HOURLY", "HOURLY">, import("valibot").LiteralSchema<"MONTHLY", "MONTHLY">, import("valibot").LiteralSchema<"WEEKLY", "WEEKLY">, import("valibot").LiteralSchema<"DAILY", "DAILY">], "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY">;
|
|
@@ -76,6 +135,7 @@ export declare const JobSchema: import("valibot").SchemaWithTransform<import("va
|
|
|
76
135
|
[x: string]: any;
|
|
77
136
|
} | null;
|
|
78
137
|
href: string;
|
|
138
|
+
company_logo?: string | undefined;
|
|
79
139
|
industry?: string | undefined;
|
|
80
140
|
category?: string | undefined;
|
|
81
141
|
skills?: string | undefined;
|
|
@@ -103,6 +163,7 @@ export declare const JobSchema: import("valibot").SchemaWithTransform<import("va
|
|
|
103
163
|
[x: string]: any;
|
|
104
164
|
} | null;
|
|
105
165
|
href: string;
|
|
166
|
+
company_logo?: string | undefined;
|
|
106
167
|
industry?: string | undefined;
|
|
107
168
|
category?: string | undefined;
|
|
108
169
|
skills?: string | undefined;
|
|
@@ -114,6 +175,7 @@ export declare const JobSchema: import("valibot").SchemaWithTransform<import("va
|
|
|
114
175
|
isNew: boolean;
|
|
115
176
|
company: {
|
|
116
177
|
name: string;
|
|
178
|
+
logo: string | undefined;
|
|
117
179
|
};
|
|
118
180
|
employmentType: string;
|
|
119
181
|
locationType: "LOCATION" | "REMOTE" | "HYBRID";
|