@inploi/plugin-job-search 0.9.0 → 0.11.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 +8 -8
- package/dist/job-search.api.d.ts +1 -1
- package/dist/job-search.d.ts +12 -3
- package/dist/job-search.schemas.d.ts +2 -2
- package/dist/plugin-job-search.cjs +22 -4
- package/dist/plugin-job-search.js +22 -4
- package/package.json +2 -2
package/dist/job-search.api.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const JobSearchResponseSchema: import('valibot').SchemaWithTransform<imp
|
|
|
7
7
|
data: import('valibot').ArraySchema<import('valibot').SchemaWithTransform<import('valibot').ObjectSchema<{
|
|
8
8
|
id: import('valibot').NumberSchema<number>;
|
|
9
9
|
company_name: import('valibot').StringSchema<string>;
|
|
10
|
-
company_logo: import('valibot').OptionalSchema<import('valibot').StringSchema<string>, undefined, string | undefined>;
|
|
10
|
+
company_logo: import('valibot').NullableSchema<import('valibot').OptionalSchema<import('valibot').StringSchema<string>, undefined, string | undefined>, undefined, string | undefined>;
|
|
11
11
|
employment_type: import('valibot').StringSchema<string>;
|
|
12
12
|
location_type: import('valibot').UnionSchema<[import('valibot').LiteralSchema<"LOCATION", "LOCATION">, import('valibot').LiteralSchema<"REMOTE", "REMOTE">, import('valibot').LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
|
|
13
13
|
pay_type: import('valibot').NullableSchema<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">, undefined, "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null>;
|
package/dist/job-search.d.ts
CHANGED
|
@@ -87,7 +87,8 @@ export type JobSearchPluginParams = {
|
|
|
87
87
|
subheading: DisplayableFilterProperty | null;
|
|
88
88
|
infoTags: DisplayableFilterProperty[];
|
|
89
89
|
logo?: 'hidden' | '1:1' | '2:1';
|
|
90
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Whether to show the posted date or not.
|
|
91
92
|
* @default 'show'
|
|
92
93
|
* @description
|
|
93
94
|
* - 'show' will show the posted date and the "NEW" badge if the job is new (less than 7 days old).
|
|
@@ -96,6 +97,14 @@ export type JobSearchPluginParams = {
|
|
|
96
97
|
*/
|
|
97
98
|
postedDate?: 'hide' | 'show' | 'only-new';
|
|
98
99
|
overrides?: JobSearchPluginCardOverrides;
|
|
100
|
+
/**
|
|
101
|
+
* Specifies how the job link should be opened.
|
|
102
|
+
* @default 'redirect'
|
|
103
|
+
* @description
|
|
104
|
+
* - 'redirect': Navigates to the job's URL in the current tab.
|
|
105
|
+
* - 'redirect-new-tab': Opens the job's URL in a new tab.
|
|
106
|
+
*/
|
|
107
|
+
openJob?: 'redirect' | 'redirect-new-tab';
|
|
99
108
|
};
|
|
100
109
|
/** Enables the job alerts button */
|
|
101
110
|
enableJobAlerts?: boolean;
|
|
@@ -166,10 +175,10 @@ export declare const jobSearchPlugin: () => ({ apiClient, logger, analytics }: {
|
|
|
166
175
|
city?: string | undefined;
|
|
167
176
|
country?: string | undefined;
|
|
168
177
|
};
|
|
169
|
-
id: number;
|
|
170
|
-
isNew: boolean; /** Whether users can select one or multiple values.
|
|
178
|
+
id: number; /** Whether users can select one or multiple values.
|
|
171
179
|
* @default `'one'`
|
|
172
180
|
*/
|
|
181
|
+
isNew: boolean;
|
|
173
182
|
company: {
|
|
174
183
|
name: string;
|
|
175
184
|
logo: string | undefined;
|
|
@@ -32,7 +32,7 @@ export type PaginationSchema = Output<typeof PaginationSchema>;
|
|
|
32
32
|
export declare const JobPayloadSchema: import('valibot').ObjectSchema<{
|
|
33
33
|
id: import('valibot').NumberSchema<number>;
|
|
34
34
|
company_name: import('valibot').StringSchema<string>;
|
|
35
|
-
company_logo: import('valibot').OptionalSchema<import('valibot').StringSchema<string>, undefined, string | undefined>;
|
|
35
|
+
company_logo: import('valibot').NullableSchema<import('valibot').OptionalSchema<import('valibot').StringSchema<string>, undefined, string | undefined>, undefined, string | undefined>;
|
|
36
36
|
employment_type: import('valibot').StringSchema<string>;
|
|
37
37
|
location_type: import('valibot').UnionSchema<[import('valibot').LiteralSchema<"LOCATION", "LOCATION">, import('valibot').LiteralSchema<"REMOTE", "REMOTE">, import('valibot').LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
|
|
38
38
|
pay_type: import('valibot').NullableSchema<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">, undefined, "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null>;
|
|
@@ -90,7 +90,7 @@ export type JobPayloadSchema = Output<typeof JobPayloadSchema>;
|
|
|
90
90
|
export declare const JobSchema: import('valibot').SchemaWithTransform<import('valibot').ObjectSchema<{
|
|
91
91
|
id: import('valibot').NumberSchema<number>;
|
|
92
92
|
company_name: import('valibot').StringSchema<string>;
|
|
93
|
-
company_logo: import('valibot').OptionalSchema<import('valibot').StringSchema<string>, undefined, string | undefined>;
|
|
93
|
+
company_logo: import('valibot').NullableSchema<import('valibot').OptionalSchema<import('valibot').StringSchema<string>, undefined, string | undefined>, undefined, string | undefined>;
|
|
94
94
|
employment_type: import('valibot').StringSchema<string>;
|
|
95
95
|
location_type: import('valibot').UnionSchema<[import('valibot').LiteralSchema<"LOCATION", "LOCATION">, import('valibot').LiteralSchema<"REMOTE", "REMOTE">, import('valibot').LiteralSchema<"HYBRID", "HYBRID">], "LOCATION" | "REMOTE" | "HYBRID">;
|
|
96
96
|
pay_type: import('valibot').NullableSchema<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">, undefined, "ANNUALLY" | "HOURLY" | "MONTHLY" | "WEEKLY" | "DAILY" | null>;
|
|
@@ -1173,7 +1173,7 @@ const PaginationSchema = object({
|
|
|
1173
1173
|
const JobPayloadSchema = object({
|
|
1174
1174
|
id: number(),
|
|
1175
1175
|
company_name: string(),
|
|
1176
|
-
company_logo: optional(string()),
|
|
1176
|
+
company_logo: nullable(optional(string())),
|
|
1177
1177
|
employment_type: string(),
|
|
1178
1178
|
location_type: union([literal("LOCATION"), literal("REMOTE"), literal("HYBRID")]),
|
|
1179
1179
|
pay_type: nullable(
|
|
@@ -1583,6 +1583,10 @@ const icons = {
|
|
|
1583
1583
|
/* @__PURE__ */ u$1("path", { d: "M16.2426 16.8358C17.0818 17.1155 17.6532 17.4719 17.8847 17.8598C18.1162 18.2478 17.9974 18.6499 17.5433 19.0154C17.0892 19.3808 16.3201 19.6932 15.3334 19.9129C14.3467 20.1327 13.1867 20.25 12 20.25C10.8133 20.25 9.65327 20.1327 8.66658 19.9129C7.67988 19.6932 6.91085 19.3808 6.45672 19.0154C6.0026 18.6499 5.88378 18.2478 6.11529 17.8598C6.3468 17.4719 6.91825 17.1155 7.75736 16.8358" }),
|
|
1584
1584
|
/* @__PURE__ */ u$1("path", { d: "M17.25 9C17.25 13.3995 12 16.75 12 16.75C12 16.75 6.75 13.3995 6.75 9C6.75 6.10051 9.10051 3.75 12 3.75C14.8995 3.75 17.25 6.10051 17.25 9Z" })
|
|
1585
1585
|
] }) }),
|
|
1586
|
+
pay: /* @__PURE__ */ u$1(k$3, { children: [
|
|
1587
|
+
/* @__PURE__ */ u$1("path", { d: "M16.8 16.8a6.78 6.78 0 1 1 0-9.6M12 16v-1M12 9V8" }),
|
|
1588
|
+
/* @__PURE__ */ u$1("path", { d: "M10 14c.3.7 1 1 2 1 2.6 0 2.7-3 0-3s-2.7-3 0-3c1 0 1.7.4 2 1" })
|
|
1589
|
+
] }),
|
|
1586
1590
|
sunset: /* @__PURE__ */ u$1(k$3, { children: [
|
|
1587
1591
|
/* @__PURE__ */ u$1("path", { d: "M18.5 8.5L17.5 9.5" }),
|
|
1588
1592
|
/* @__PURE__ */ u$1("path", { d: "M5.5 8.5L6.5 9.5" }),
|
|
@@ -1817,7 +1821,14 @@ const AlertsButton = ({
|
|
|
1817
1821
|
Promise.resolve().then(() => require("./plugin-job-alerts-ee47a7fb.cjs")).then((m2) => setPlugin(m2.jobAlertsPlugin()({ analytics, apiClient, logger })));
|
|
1818
1822
|
}, [analytics, apiClient, logger]);
|
|
1819
1823
|
y(() => {
|
|
1820
|
-
plugin == null ? void 0 : plugin.render({
|
|
1824
|
+
plugin == null ? void 0 : plugin.render({
|
|
1825
|
+
config: {
|
|
1826
|
+
label: "Create alert",
|
|
1827
|
+
headerText: "You will be alerted for new jobs matching the filters currently set"
|
|
1828
|
+
},
|
|
1829
|
+
initialFilters: {},
|
|
1830
|
+
theme
|
|
1831
|
+
});
|
|
1821
1832
|
});
|
|
1822
1833
|
y(() => {
|
|
1823
1834
|
plugin == null ? void 0 : plugin.setFilters(getFilterValues(appliedFilters));
|
|
@@ -3571,7 +3582,14 @@ const filterIcons = {
|
|
|
3571
3582
|
town: "mapPin",
|
|
3572
3583
|
country: "mapPin",
|
|
3573
3584
|
company_name: "briefcase",
|
|
3574
|
-
category: "briefcase"
|
|
3585
|
+
category: "briefcase",
|
|
3586
|
+
pay: "pay",
|
|
3587
|
+
pay_currency: "pay",
|
|
3588
|
+
pay_mask: "pay",
|
|
3589
|
+
pay_display: "pay",
|
|
3590
|
+
pay_max: "pay",
|
|
3591
|
+
pay_min: "pay",
|
|
3592
|
+
pay_type: "pay"
|
|
3575
3593
|
};
|
|
3576
3594
|
const wrapperClass$1 = cva({
|
|
3577
3595
|
base: "group ijs-filter flex min-w-0 fr overflow-hidden rounded-section text-copy-neutral-lowcontrast ring-width-section transition-all duration-medium ease-expo-out fr-parent [&:has(.fr-child:active)]:scale-[0.975] origin-[50%_1.75rem]",
|
|
@@ -4319,7 +4337,7 @@ const JobCard = ({ job, config }) => {
|
|
|
4319
4337
|
((_a = config.overrides) == null ? void 0 : _a.salary) ? getDisplayableProperty({ job, property: config.overrides.salary }) : job.pay
|
|
4320
4338
|
).filter(Boolean);
|
|
4321
4339
|
const postedDateConfig = config.postedDate ?? "show";
|
|
4322
|
-
return /* @__PURE__ */ u$1("a", { href: job.href, class: wrapperClass(), children: [
|
|
4340
|
+
return /* @__PURE__ */ u$1("a", { href: job.href, target: config.openJob === "redirect-new-tab" ? "_blank" : void 0, class: wrapperClass(), children: [
|
|
4323
4341
|
/* @__PURE__ */ u$1("div", { class: "flex min-w-0 flex-1 flex-col gap-4", children: [
|
|
4324
4342
|
/* @__PURE__ */ u$1("div", { class: "gap-logo flex items-center", children: [
|
|
4325
4343
|
/* @__PURE__ */ u$1(JobCardLogo, { job, config: config.logo }),
|
|
@@ -1171,7 +1171,7 @@ const PaginationSchema = object({
|
|
|
1171
1171
|
const JobPayloadSchema = object({
|
|
1172
1172
|
id: number(),
|
|
1173
1173
|
company_name: string(),
|
|
1174
|
-
company_logo: optional(string()),
|
|
1174
|
+
company_logo: nullable(optional(string())),
|
|
1175
1175
|
employment_type: string(),
|
|
1176
1176
|
location_type: union([literal("LOCATION"), literal("REMOTE"), literal("HYBRID")]),
|
|
1177
1177
|
pay_type: nullable(
|
|
@@ -1581,6 +1581,10 @@ const icons = {
|
|
|
1581
1581
|
/* @__PURE__ */ u$1("path", { d: "M16.2426 16.8358C17.0818 17.1155 17.6532 17.4719 17.8847 17.8598C18.1162 18.2478 17.9974 18.6499 17.5433 19.0154C17.0892 19.3808 16.3201 19.6932 15.3334 19.9129C14.3467 20.1327 13.1867 20.25 12 20.25C10.8133 20.25 9.65327 20.1327 8.66658 19.9129C7.67988 19.6932 6.91085 19.3808 6.45672 19.0154C6.0026 18.6499 5.88378 18.2478 6.11529 17.8598C6.3468 17.4719 6.91825 17.1155 7.75736 16.8358" }),
|
|
1582
1582
|
/* @__PURE__ */ u$1("path", { d: "M17.25 9C17.25 13.3995 12 16.75 12 16.75C12 16.75 6.75 13.3995 6.75 9C6.75 6.10051 9.10051 3.75 12 3.75C14.8995 3.75 17.25 6.10051 17.25 9Z" })
|
|
1583
1583
|
] }) }),
|
|
1584
|
+
pay: /* @__PURE__ */ u$1(k$3, { children: [
|
|
1585
|
+
/* @__PURE__ */ u$1("path", { d: "M16.8 16.8a6.78 6.78 0 1 1 0-9.6M12 16v-1M12 9V8" }),
|
|
1586
|
+
/* @__PURE__ */ u$1("path", { d: "M10 14c.3.7 1 1 2 1 2.6 0 2.7-3 0-3s-2.7-3 0-3c1 0 1.7.4 2 1" })
|
|
1587
|
+
] }),
|
|
1584
1588
|
sunset: /* @__PURE__ */ u$1(k$3, { children: [
|
|
1585
1589
|
/* @__PURE__ */ u$1("path", { d: "M18.5 8.5L17.5 9.5" }),
|
|
1586
1590
|
/* @__PURE__ */ u$1("path", { d: "M5.5 8.5L6.5 9.5" }),
|
|
@@ -1815,7 +1819,14 @@ const AlertsButton = ({
|
|
|
1815
1819
|
import("./plugin-job-alerts-ddf07a02.js").then((m2) => setPlugin(m2.jobAlertsPlugin()({ analytics, apiClient, logger })));
|
|
1816
1820
|
}, [analytics, apiClient, logger]);
|
|
1817
1821
|
y(() => {
|
|
1818
|
-
plugin == null ? void 0 : plugin.render({
|
|
1822
|
+
plugin == null ? void 0 : plugin.render({
|
|
1823
|
+
config: {
|
|
1824
|
+
label: "Create alert",
|
|
1825
|
+
headerText: "You will be alerted for new jobs matching the filters currently set"
|
|
1826
|
+
},
|
|
1827
|
+
initialFilters: {},
|
|
1828
|
+
theme
|
|
1829
|
+
});
|
|
1819
1830
|
});
|
|
1820
1831
|
y(() => {
|
|
1821
1832
|
plugin == null ? void 0 : plugin.setFilters(getFilterValues(appliedFilters));
|
|
@@ -3569,7 +3580,14 @@ const filterIcons = {
|
|
|
3569
3580
|
town: "mapPin",
|
|
3570
3581
|
country: "mapPin",
|
|
3571
3582
|
company_name: "briefcase",
|
|
3572
|
-
category: "briefcase"
|
|
3583
|
+
category: "briefcase",
|
|
3584
|
+
pay: "pay",
|
|
3585
|
+
pay_currency: "pay",
|
|
3586
|
+
pay_mask: "pay",
|
|
3587
|
+
pay_display: "pay",
|
|
3588
|
+
pay_max: "pay",
|
|
3589
|
+
pay_min: "pay",
|
|
3590
|
+
pay_type: "pay"
|
|
3573
3591
|
};
|
|
3574
3592
|
const wrapperClass$1 = cva({
|
|
3575
3593
|
base: "group ijs-filter flex min-w-0 fr overflow-hidden rounded-section text-copy-neutral-lowcontrast ring-width-section transition-all duration-medium ease-expo-out fr-parent [&:has(.fr-child:active)]:scale-[0.975] origin-[50%_1.75rem]",
|
|
@@ -4317,7 +4335,7 @@ const JobCard = ({ job, config }) => {
|
|
|
4317
4335
|
((_a = config.overrides) == null ? void 0 : _a.salary) ? getDisplayableProperty({ job, property: config.overrides.salary }) : job.pay
|
|
4318
4336
|
).filter(Boolean);
|
|
4319
4337
|
const postedDateConfig = config.postedDate ?? "show";
|
|
4320
|
-
return /* @__PURE__ */ u$1("a", { href: job.href, class: wrapperClass(), children: [
|
|
4338
|
+
return /* @__PURE__ */ u$1("a", { href: job.href, target: config.openJob === "redirect-new-tab" ? "_blank" : void 0, class: wrapperClass(), children: [
|
|
4321
4339
|
/* @__PURE__ */ u$1("div", { class: "flex min-w-0 flex-1 flex-col gap-4", children: [
|
|
4322
4340
|
/* @__PURE__ */ u$1("div", { class: "gap-logo flex items-center", children: [
|
|
4323
4341
|
/* @__PURE__ */ u$1(JobCardLogo, { job, config: config.logo }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-job-search",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-job-search.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@inploi/core": "1.14.0",
|
|
49
49
|
"@inploi/design-tokens": "0.2.1",
|
|
50
50
|
"@inploi/plugin-job-alerts": "0.2.0",
|
|
51
|
-
"@inploi/sdk": "1.13.
|
|
51
|
+
"@inploi/sdk": "1.13.2",
|
|
52
52
|
"eslint-config-custom": "0.1.0"
|
|
53
53
|
},
|
|
54
54
|
"msw": {
|