@next-degree/pickle-shared-js 0.5.31 → 0.6.43
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/dist/company_service_latest-Dwf4Fkjr.d.cts +2641 -0
- package/dist/company_service_latest-Dwf4Fkjr.d.ts +2641 -0
- package/dist/components/buttons/BackButton.cjs +161 -0
- package/dist/components/buttons/BackButton.cjs.map +1 -0
- package/dist/components/buttons/BackButton.d.cts +9 -0
- package/dist/components/buttons/BackButton.d.ts +9 -0
- package/dist/components/buttons/BackButton.js +137 -0
- package/dist/components/buttons/BackButton.js.map +1 -0
- package/dist/components/company/CompanyBenefits.cjs +38 -0
- package/dist/components/company/CompanyBenefits.cjs.map +1 -0
- package/dist/components/company/CompanyBenefits.d.cts +8 -0
- package/dist/components/company/CompanyBenefits.d.ts +8 -0
- package/dist/components/company/CompanyBenefits.js +13 -0
- package/dist/components/company/CompanyBenefits.js.map +1 -0
- package/dist/components/company/CompanyInformation.cjs +112 -0
- package/dist/components/company/CompanyInformation.cjs.map +1 -0
- package/dist/components/company/CompanyInformation.d.cts +12 -0
- package/dist/components/company/CompanyInformation.d.ts +12 -0
- package/dist/components/company/CompanyInformation.js +75 -0
- package/dist/components/company/CompanyInformation.js.map +1 -0
- package/dist/components/company/CompanyTake.cjs +140 -0
- package/dist/components/company/CompanyTake.cjs.map +1 -0
- package/dist/components/company/CompanyTake.d.cts +9 -0
- package/dist/components/company/CompanyTake.d.ts +9 -0
- package/dist/components/company/CompanyTake.js +104 -0
- package/dist/components/company/CompanyTake.js.map +1 -0
- package/dist/components/jobPost/JobDescription.cjs +205 -0
- package/dist/components/jobPost/JobDescription.cjs.map +1 -0
- package/dist/components/jobPost/JobDescription.d.cts +8 -0
- package/dist/components/jobPost/JobDescription.d.ts +8 -0
- package/dist/components/jobPost/JobDescription.js +168 -0
- package/dist/components/jobPost/JobDescription.js.map +1 -0
- package/dist/components/jobPost/JobHeader.cjs +436 -0
- package/dist/components/jobPost/JobHeader.cjs.map +1 -0
- package/dist/components/jobPost/JobHeader.d.cts +26 -0
- package/dist/components/jobPost/JobHeader.d.ts +26 -0
- package/dist/components/jobPost/JobHeader.js +423 -0
- package/dist/components/jobPost/JobHeader.js.map +1 -0
- package/dist/components/jobPost/JobPost.cjs +1349 -0
- package/dist/components/jobPost/JobPost.cjs.map +1 -0
- package/dist/components/jobPost/JobPost.d.cts +16 -0
- package/dist/components/jobPost/JobPost.d.ts +16 -0
- package/dist/components/jobPost/JobPost.js +1336 -0
- package/dist/components/jobPost/JobPost.js.map +1 -0
- package/dist/components/primitives/avatar.cjs +88 -0
- package/dist/components/primitives/avatar.cjs.map +1 -0
- package/dist/components/primitives/avatar.d.cts +13 -0
- package/dist/components/primitives/avatar.d.ts +13 -0
- package/dist/components/primitives/avatar.js +52 -0
- package/dist/components/primitives/avatar.js.map +1 -0
- package/dist/components/primitives/command.d.cts +3 -3
- package/dist/components/primitives/command.d.ts +3 -3
- package/dist/components/ui/Avatar.cjs +117 -0
- package/dist/components/ui/Avatar.cjs.map +1 -0
- package/dist/components/ui/Avatar.d.cts +16 -0
- package/dist/components/ui/Avatar.d.ts +16 -0
- package/dist/components/ui/Avatar.js +79 -0
- package/dist/components/ui/Avatar.js.map +1 -0
- package/dist/components/ui/Icon.cjs +114 -0
- package/dist/components/ui/Icon.cjs.map +1 -0
- package/dist/components/ui/Icon.d.cts +15 -0
- package/dist/components/ui/Icon.d.ts +15 -0
- package/dist/components/ui/Icon.js +89 -0
- package/dist/components/ui/Icon.js.map +1 -0
- package/dist/{app/layout.cjs → components/ui/LinkButton.cjs} +25 -35
- package/dist/components/ui/LinkButton.cjs.map +1 -0
- package/dist/components/ui/LinkButton.d.cts +29 -0
- package/dist/components/ui/LinkButton.d.ts +29 -0
- package/dist/components/ui/LinkButton.js +26 -0
- package/dist/components/ui/LinkButton.js.map +1 -0
- package/dist/components/ui/ReadMore.cjs +194 -0
- package/dist/components/ui/ReadMore.cjs.map +1 -0
- package/dist/components/ui/ReadMore.d.cts +9 -0
- package/dist/components/ui/ReadMore.d.ts +9 -0
- package/dist/components/ui/ReadMore.js +160 -0
- package/dist/components/ui/ReadMore.js.map +1 -0
- package/dist/contexts/WindowHistoryProvider.cjs +48 -0
- package/dist/contexts/WindowHistoryProvider.cjs.map +1 -0
- package/dist/contexts/WindowHistoryProvider.d.cts +11 -0
- package/dist/contexts/WindowHistoryProvider.d.ts +11 -0
- package/dist/contexts/WindowHistoryProvider.js +23 -0
- package/dist/contexts/WindowHistoryProvider.js.map +1 -0
- package/dist/displayText-C1qKqRYc.d.cts +48 -0
- package/dist/displayText-D-OzRlJf.d.ts +48 -0
- package/dist/hooks/useDisplayText.cjs +502 -0
- package/dist/hooks/useDisplayText.cjs.map +1 -0
- package/dist/hooks/useDisplayText.d.cts +8 -0
- package/dist/hooks/useDisplayText.d.ts +8 -0
- package/dist/hooks/useDisplayText.js +477 -0
- package/dist/hooks/useDisplayText.js.map +1 -0
- package/dist/hooks/useWindowHistory.cjs +46 -0
- package/dist/hooks/useWindowHistory.cjs.map +1 -0
- package/dist/hooks/useWindowHistory.d.cts +7 -0
- package/dist/hooks/useWindowHistory.d.ts +7 -0
- package/dist/hooks/useWindowHistory.js +21 -0
- package/dist/hooks/useWindowHistory.js.map +1 -0
- package/dist/index.cjs +1434 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1443 -1
- package/dist/index.js.map +1 -1
- package/dist/job_posting_service_latest-D0AsiA4a.d.cts +2789 -0
- package/dist/job_posting_service_latest-D0AsiA4a.d.ts +2789 -0
- package/dist/lib/icons.cjs +53 -0
- package/dist/lib/icons.cjs.map +1 -0
- package/dist/lib/icons.d.cts +27 -0
- package/dist/lib/icons.d.ts +27 -0
- package/dist/lib/icons.js +49 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/locations.cjs +45 -0
- package/dist/lib/locations.cjs.map +1 -0
- package/dist/lib/locations.d.cts +8 -0
- package/dist/lib/locations.d.ts +8 -0
- package/dist/lib/locations.js +19 -0
- package/dist/lib/locations.js.map +1 -0
- package/dist/lib/mappings.cjs +443 -0
- package/dist/lib/mappings.cjs.map +1 -0
- package/dist/lib/mappings.d.cts +4 -0
- package/dist/lib/mappings.d.ts +4 -0
- package/dist/lib/mappings.js +409 -0
- package/dist/lib/mappings.js.map +1 -0
- package/dist/lib/salaryRange.cjs +90 -0
- package/dist/lib/salaryRange.cjs.map +1 -0
- package/dist/lib/salaryRange.d.cts +6 -0
- package/dist/lib/salaryRange.d.ts +6 -0
- package/dist/lib/salaryRange.js +63 -0
- package/dist/lib/salaryRange.js.map +1 -0
- package/dist/services/displayText.cjs +470 -0
- package/dist/services/displayText.cjs.map +1 -0
- package/dist/services/displayText.d.cts +4 -0
- package/dist/services/displayText.d.ts +4 -0
- package/dist/services/displayText.js +443 -0
- package/dist/services/displayText.js.map +1 -0
- package/dist/shared_pickle_output_latest-DX6GQoVn.d.cts +194 -0
- package/dist/shared_pickle_output_latest-DX6GQoVn.d.ts +194 -0
- package/dist/styles/globals.css +817 -0
- package/dist/styles/globals.css.map +1 -1
- package/dist/types/data/company_service_latest.cjs +228 -0
- package/dist/types/data/company_service_latest.cjs.map +1 -0
- package/dist/types/data/company_service_latest.d.cts +2 -0
- package/dist/types/data/company_service_latest.d.ts +2 -0
- package/dist/types/data/company_service_latest.js +186 -0
- package/dist/types/data/company_service_latest.js.map +1 -0
- package/dist/types/data/job_posting_service_latest.cjs +266 -0
- package/dist/types/data/job_posting_service_latest.cjs.map +1 -0
- package/dist/types/data/job_posting_service_latest.d.cts +2 -0
- package/dist/types/data/job_posting_service_latest.d.ts +2 -0
- package/dist/types/data/job_posting_service_latest.js +230 -0
- package/dist/types/data/job_posting_service_latest.js.map +1 -0
- package/dist/types/data/shared_pickle_output_latest.cjs +82 -0
- package/dist/types/data/shared_pickle_output_latest.cjs.map +1 -0
- package/dist/types/data/shared_pickle_output_latest.d.cts +2 -0
- package/dist/types/data/shared_pickle_output_latest.d.ts +2 -0
- package/dist/types/data/shared_pickle_output_latest.js +50 -0
- package/dist/types/data/shared_pickle_output_latest.js.map +1 -0
- package/dist/types/displayText.errors.cjs +44 -0
- package/dist/types/displayText.errors.cjs.map +1 -0
- package/dist/types/displayText.errors.d.cts +8 -0
- package/dist/types/displayText.errors.d.ts +8 -0
- package/dist/types/displayText.errors.js +18 -0
- package/dist/types/displayText.errors.js.map +1 -0
- package/package.json +19 -7
- package/dist/AmbitBold-3SZZPYLH.otf +0 -0
- package/dist/AmbitBoldItalic-JSHFTN4A.otf +0 -0
- package/dist/AmbitRegular-MB5U7O3L.otf +0 -0
- package/dist/app/layout.cjs.map +0 -1
- package/dist/app/layout.css +0 -1423
- package/dist/app/layout.css.map +0 -1
- package/dist/app/layout.d.cts +0 -11
- package/dist/app/layout.d.ts +0 -11
- package/dist/app/layout.js +0 -36
- package/dist/app/layout.js.map +0 -1
- package/dist/app/page.cjs +0 -1607
- package/dist/app/page.cjs.map +0 -1
- package/dist/app/page.d.cts +0 -5
- package/dist/app/page.d.ts +0 -5
- package/dist/app/page.js +0 -1581
- package/dist/app/page.js.map +0 -1
- package/dist/assets/fonts/AmbitBold.cjs +0 -3
- package/dist/assets/fonts/AmbitBold.cjs.map +0 -1
- package/dist/assets/fonts/AmbitBold.d.cts +0 -2
- package/dist/assets/fonts/AmbitBold.d.ts +0 -2
- package/dist/assets/fonts/AmbitBold.js +0 -6
- package/dist/assets/fonts/AmbitBold.js.map +0 -1
- package/dist/assets/fonts/AmbitBoldItalic.cjs +0 -3
- package/dist/assets/fonts/AmbitBoldItalic.cjs.map +0 -1
- package/dist/assets/fonts/AmbitBoldItalic.d.cts +0 -2
- package/dist/assets/fonts/AmbitBoldItalic.d.ts +0 -2
- package/dist/assets/fonts/AmbitBoldItalic.js +0 -6
- package/dist/assets/fonts/AmbitBoldItalic.js.map +0 -1
- package/dist/assets/fonts/AmbitRegular.cjs +0 -3
- package/dist/assets/fonts/AmbitRegular.cjs.map +0 -1
- package/dist/assets/fonts/AmbitRegular.d.cts +0 -2
- package/dist/assets/fonts/AmbitRegular.d.ts +0 -2
- package/dist/assets/fonts/AmbitRegular.js +0 -6
- package/dist/assets/fonts/AmbitRegular.js.map +0 -1
- package/dist/components/demos/ComboboxDemo.cjs +0 -814
- package/dist/components/demos/ComboboxDemo.cjs.map +0 -1
- package/dist/components/demos/ComboboxDemo.d.cts +0 -5
- package/dist/components/demos/ComboboxDemo.d.ts +0 -5
- package/dist/components/demos/ComboboxDemo.js +0 -786
- package/dist/components/demos/ComboboxDemo.js.map +0 -1
- package/dist/components/demos/CounterDemo.cjs +0 -270
- package/dist/components/demos/CounterDemo.cjs.map +0 -1
- package/dist/components/demos/CounterDemo.d.cts +0 -5
- package/dist/components/demos/CounterDemo.d.ts +0 -5
- package/dist/components/demos/CounterDemo.js +0 -238
- package/dist/components/demos/CounterDemo.js.map +0 -1
- package/dist/components/demos/InputDemo.cjs +0 -225
- package/dist/components/demos/InputDemo.cjs.map +0 -1
- package/dist/components/demos/InputDemo.d.cts +0 -5
- package/dist/components/demos/InputDemo.d.ts +0 -5
- package/dist/components/demos/InputDemo.js +0 -192
- package/dist/components/demos/InputDemo.js.map +0 -1
- package/dist/components/demos/MapComponentDemo.cjs +0 -129
- package/dist/components/demos/MapComponentDemo.cjs.map +0 -1
- package/dist/components/demos/MapComponentDemo.d.cts +0 -5
- package/dist/components/demos/MapComponentDemo.d.ts +0 -5
- package/dist/components/demos/MapComponentDemo.js +0 -107
- package/dist/components/demos/MapComponentDemo.js.map +0 -1
- package/dist/components/demos/PlacesQueryInputDemo.cjs +0 -341
- package/dist/components/demos/PlacesQueryInputDemo.cjs.map +0 -1
- package/dist/components/demos/PlacesQueryInputDemo.d.cts +0 -5
- package/dist/components/demos/PlacesQueryInputDemo.d.ts +0 -5
- package/dist/components/demos/PlacesQueryInputDemo.js +0 -309
- package/dist/components/demos/PlacesQueryInputDemo.js.map +0 -1
- package/dist/components/demos/SelectDemo.cjs +0 -365
- package/dist/components/demos/SelectDemo.cjs.map +0 -1
- package/dist/components/demos/SelectDemo.d.cts +0 -5
- package/dist/components/demos/SelectDemo.d.ts +0 -5
- package/dist/components/demos/SelectDemo.js +0 -337
- package/dist/components/demos/SelectDemo.js.map +0 -1
- package/dist/components/demos/index.cjs +0 -1600
- package/dist/components/demos/index.cjs.map +0 -1
- package/dist/components/demos/index.d.cts +0 -5
- package/dist/components/demos/index.d.ts +0 -5
- package/dist/components/demos/index.js +0 -1574
- package/dist/components/demos/index.js.map +0 -1
|
@@ -0,0 +1,1336 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/jobPost/JobPost.tsx
|
|
4
|
+
import * as DateFns from "date-fns";
|
|
5
|
+
|
|
6
|
+
// src/components/company/CompanyBenefits.tsx
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function CompanyBenefits({ benefits }) {
|
|
9
|
+
if (!benefits) return null;
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", "data-testid": "company-benefits", children: [
|
|
11
|
+
/* @__PURE__ */ jsx("h2", { className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg", children: "Company benefits" }),
|
|
12
|
+
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-3", children: benefits.map((benefit, i) => /* @__PURE__ */ jsx("li", { className: "text-base text-grey-80", children: benefit }, `${benefit}-${i}`)) })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/components/ui/LinkButton.tsx
|
|
17
|
+
import Link from "next/link";
|
|
18
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
19
|
+
var LinkButton = ({
|
|
20
|
+
disabled = false,
|
|
21
|
+
useAnchor = false,
|
|
22
|
+
children,
|
|
23
|
+
href,
|
|
24
|
+
...props
|
|
25
|
+
}) => {
|
|
26
|
+
const Component = useAnchor ? "a" : Link;
|
|
27
|
+
return /* @__PURE__ */ jsx2(
|
|
28
|
+
Component,
|
|
29
|
+
{
|
|
30
|
+
href,
|
|
31
|
+
className: `inline-flex items-center justify-center gap-2 rounded-full text-sm font-bold leading-tight text-black underline outline-dashed outline-2 outline-offset-2 outline-transparent hover:text-purple-100 focus:text-black focus:outline-purple-100 active:text-purple-80 ${disabled ? "pointer-events-none text-grey-40" : ""} `,
|
|
32
|
+
...disabled && { "aria-disabled": true, tabIndex: -1 },
|
|
33
|
+
...props,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/components/company/CompanyInformation.tsx
|
|
40
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
41
|
+
function CompanyInformation({
|
|
42
|
+
name,
|
|
43
|
+
how,
|
|
44
|
+
mission,
|
|
45
|
+
wow,
|
|
46
|
+
website
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2", children: [
|
|
49
|
+
/* @__PURE__ */ jsxs2(
|
|
50
|
+
"h2",
|
|
51
|
+
{
|
|
52
|
+
"data-testid": "company-name",
|
|
53
|
+
className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg",
|
|
54
|
+
children: [
|
|
55
|
+
"About ",
|
|
56
|
+
name
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
how && /* @__PURE__ */ jsx3("p", { "data-testid": "company-information", className: "text-base text-grey-80", children: how }),
|
|
61
|
+
mission && /* @__PURE__ */ jsxs2("div", { className: "flex gap-2", children: [
|
|
62
|
+
/* @__PURE__ */ jsx3("span", { children: "\u{1F680}" }),
|
|
63
|
+
/* @__PURE__ */ jsxs2("p", { className: "text-base text-grey-80", children: [
|
|
64
|
+
/* @__PURE__ */ jsx3("span", { className: "pr-1 font-bold", children: "Mission" }),
|
|
65
|
+
mission
|
|
66
|
+
] })
|
|
67
|
+
] }),
|
|
68
|
+
wow && /* @__PURE__ */ jsxs2("div", { className: "flex gap-2", children: [
|
|
69
|
+
/* @__PURE__ */ jsx3("span", { children: "\u{1F31F}" }),
|
|
70
|
+
/* @__PURE__ */ jsxs2("p", { className: "text-base text-grey-80", children: [
|
|
71
|
+
/* @__PURE__ */ jsx3("span", { className: "pr-1 font-bold", children: "Wow Factor" }),
|
|
72
|
+
wow
|
|
73
|
+
] })
|
|
74
|
+
] }),
|
|
75
|
+
website && /* @__PURE__ */ jsx3("div", { className: "pt-2", children: /* @__PURE__ */ jsx3(
|
|
76
|
+
LinkButton,
|
|
77
|
+
{
|
|
78
|
+
"data-testid": "company-website-link",
|
|
79
|
+
href: website,
|
|
80
|
+
target: "_blank",
|
|
81
|
+
rel: "noopener noreferrer",
|
|
82
|
+
children: "Website"
|
|
83
|
+
}
|
|
84
|
+
) })
|
|
85
|
+
] });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// src/components/primitives/avatar.tsx
|
|
89
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
90
|
+
import * as React from "react";
|
|
91
|
+
|
|
92
|
+
// src/lib/utils.ts
|
|
93
|
+
import { clsx } from "clsx";
|
|
94
|
+
import { twMerge } from "tailwind-merge";
|
|
95
|
+
function cn(...inputs) {
|
|
96
|
+
return twMerge(clsx(inputs));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/components/primitives/avatar.tsx
|
|
100
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
101
|
+
var AvatarBase = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
|
|
102
|
+
AvatarPrimitive.Root,
|
|
103
|
+
{
|
|
104
|
+
ref,
|
|
105
|
+
className: cn("relative flex shrink-0 overflow-hidden rounded-full", className),
|
|
106
|
+
...props
|
|
107
|
+
}
|
|
108
|
+
));
|
|
109
|
+
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
110
|
+
var AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
|
|
111
|
+
AvatarPrimitive.Image,
|
|
112
|
+
{
|
|
113
|
+
ref,
|
|
114
|
+
className: cn("aspect-square h-full w-full", className),
|
|
115
|
+
"data-testid": "job-card-avatar",
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
));
|
|
119
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
120
|
+
var AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(
|
|
121
|
+
AvatarPrimitive.Fallback,
|
|
122
|
+
{
|
|
123
|
+
ref,
|
|
124
|
+
className: cn(
|
|
125
|
+
"flex h-full w-full items-center justify-center rounded-full bg-pumpkin-100 py-2 text-sm font-bold capitalize leading-normal text-white md:text-lg",
|
|
126
|
+
className
|
|
127
|
+
),
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
));
|
|
131
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
132
|
+
|
|
133
|
+
// src/components/ui/Avatar.tsx
|
|
134
|
+
import { cva } from "cva";
|
|
135
|
+
import Link2 from "next/link";
|
|
136
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
137
|
+
function Avatar({ size, src, href, name, ...linkProps }) {
|
|
138
|
+
const fallbackShort = name?.slice(0, 2);
|
|
139
|
+
const fallbackWords = name?.split(" ").map((n) => n[0]).join("").slice(0, 2);
|
|
140
|
+
const fallback = fallbackWords && fallbackWords.length > 1 ? fallbackWords : fallbackShort;
|
|
141
|
+
const renderAvatar = () => /* @__PURE__ */ jsxs3(AvatarBase, { className: avatarVariants({ size }), children: [
|
|
142
|
+
/* @__PURE__ */ jsx5(AvatarImage, { src, alt: name }),
|
|
143
|
+
/* @__PURE__ */ jsx5(AvatarFallback, { children: fallback?.toUpperCase() })
|
|
144
|
+
] });
|
|
145
|
+
if (href) {
|
|
146
|
+
return /* @__PURE__ */ jsx5(Link2, { href, ...linkProps, children: renderAvatar() });
|
|
147
|
+
}
|
|
148
|
+
return renderAvatar();
|
|
149
|
+
}
|
|
150
|
+
var avatarVariants = cva("ring ring-white ring-2", {
|
|
151
|
+
variants: {
|
|
152
|
+
size: {
|
|
153
|
+
large: "h-16 w-16",
|
|
154
|
+
medium: "h-10 w-10",
|
|
155
|
+
small: "h-8 w-8"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
defaultVariants: {
|
|
159
|
+
size: "medium"
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// src/components/company/CompanyTake.tsx
|
|
164
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
165
|
+
function CompanyTake({ content, avatarSrc }) {
|
|
166
|
+
if (!content) return null;
|
|
167
|
+
return /* @__PURE__ */ jsxs4(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
"data-testid": "company-take",
|
|
171
|
+
className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6",
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ jsx6("p", { className: "text-lg font-bold text-white sm:text-xl", children: "The Real Dill \u2618\uFE0F" }),
|
|
174
|
+
/* @__PURE__ */ jsx6("div", { className: "mt-2 flex items-center justify-start", children: /* @__PURE__ */ jsx6("p", { className: "text-sm font-normal text-grey-10", children: content }) }),
|
|
175
|
+
/* @__PURE__ */ jsxs4("div", { className: "mt-8 flex w-full items-center gap-3", children: [
|
|
176
|
+
/* @__PURE__ */ jsx6(Avatar, { name: "Jon Lee", src: avatarSrc }),
|
|
177
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col flex-wrap items-start", children: [
|
|
178
|
+
/* @__PURE__ */ jsx6("p", { className: "text-sm font-bold text-white", children: "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA" }),
|
|
179
|
+
/* @__PURE__ */ jsx6("p", { className: "text-xs font-normal text-grey-30", children: "Pickle co-founder" })
|
|
180
|
+
] })
|
|
181
|
+
] })
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// src/components/ui/ReadMore.tsx
|
|
188
|
+
import { useEffect, useState } from "react";
|
|
189
|
+
import Markdown from "react-markdown";
|
|
190
|
+
|
|
191
|
+
// src/components/ui/Button.tsx
|
|
192
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
193
|
+
import { cva as cva2 } from "cva";
|
|
194
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
195
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
196
|
+
var Button = forwardRef2(
|
|
197
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
198
|
+
const Component = asChild ? Slot : "button";
|
|
199
|
+
return /* @__PURE__ */ jsx7(
|
|
200
|
+
Component,
|
|
201
|
+
{
|
|
202
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
203
|
+
ref,
|
|
204
|
+
...props
|
|
205
|
+
}
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
Button.displayName = "Button";
|
|
210
|
+
var buttonVariants = cva2(
|
|
211
|
+
[
|
|
212
|
+
"flex",
|
|
213
|
+
"items-center",
|
|
214
|
+
"justify-center",
|
|
215
|
+
"gap-2",
|
|
216
|
+
"rounded-full",
|
|
217
|
+
"font-bold",
|
|
218
|
+
"outline-2",
|
|
219
|
+
"outline-offset-2",
|
|
220
|
+
"outline-dashed",
|
|
221
|
+
"outline-transparent"
|
|
222
|
+
],
|
|
223
|
+
{
|
|
224
|
+
variants: {
|
|
225
|
+
variant: {
|
|
226
|
+
neutral: [
|
|
227
|
+
"bg-black",
|
|
228
|
+
"text-white",
|
|
229
|
+
"hover:bg-grey-90",
|
|
230
|
+
"active:bg-grey-80",
|
|
231
|
+
"focus:outline-purple-100",
|
|
232
|
+
"disabled:text-grey-40",
|
|
233
|
+
"disabled:bg-grey-10"
|
|
234
|
+
],
|
|
235
|
+
primary: [
|
|
236
|
+
"bg-pickle-100",
|
|
237
|
+
"text-black",
|
|
238
|
+
"hover:bg-pickle-80",
|
|
239
|
+
"active:bg-pickle-60",
|
|
240
|
+
"focus:outline-purple-100",
|
|
241
|
+
"disabled:text-grey-40",
|
|
242
|
+
"disabled:bg-grey-10"
|
|
243
|
+
],
|
|
244
|
+
secondary: [
|
|
245
|
+
"bg-green-80",
|
|
246
|
+
"text-white",
|
|
247
|
+
"hover:bg-green-90",
|
|
248
|
+
"active:bg-green-100",
|
|
249
|
+
"focus:outline-pickle-100",
|
|
250
|
+
"disabled:text-grey-40",
|
|
251
|
+
"disabled:bg-grey-10"
|
|
252
|
+
],
|
|
253
|
+
transparent: [
|
|
254
|
+
"text-white",
|
|
255
|
+
"hover:bg-green-80",
|
|
256
|
+
"active:bg-green-100",
|
|
257
|
+
"focus:outline-pickle-100",
|
|
258
|
+
"disabled:text-grey-40"
|
|
259
|
+
],
|
|
260
|
+
link: [
|
|
261
|
+
"leading-tight",
|
|
262
|
+
"text-black",
|
|
263
|
+
"underline",
|
|
264
|
+
"hover:text-purple-100",
|
|
265
|
+
"focus:text-black",
|
|
266
|
+
"focus:outline-purple-100",
|
|
267
|
+
"active:text-purple-80"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
size: {
|
|
271
|
+
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
272
|
+
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
273
|
+
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
defaultVariants: {
|
|
277
|
+
variant: "neutral",
|
|
278
|
+
size: "medium"
|
|
279
|
+
},
|
|
280
|
+
compoundVariants: [
|
|
281
|
+
{
|
|
282
|
+
variant: "link",
|
|
283
|
+
size: "small",
|
|
284
|
+
class: ["h-3", "text-xs", "p-0"]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
variant: "link",
|
|
288
|
+
size: "medium",
|
|
289
|
+
class: ["h-4", "text-sm", "p-0"]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
variant: "link",
|
|
293
|
+
size: "large",
|
|
294
|
+
class: ["h-6", "text-base", "p-0"]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
// src/components/ui/ReadMore.tsx
|
|
301
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
302
|
+
function ReadMore({ text, ...props }) {
|
|
303
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
304
|
+
const [maxWords, setMaxWords] = useState(160);
|
|
305
|
+
useEffect(() => {
|
|
306
|
+
const updateMaxWords = () => {
|
|
307
|
+
const windowWidth = window.innerWidth;
|
|
308
|
+
if (windowWidth <= 768) {
|
|
309
|
+
setMaxWords(50);
|
|
310
|
+
} else {
|
|
311
|
+
setMaxWords(160);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
updateMaxWords();
|
|
315
|
+
window.addEventListener("resize", updateMaxWords);
|
|
316
|
+
return () => window.removeEventListener("resize", updateMaxWords);
|
|
317
|
+
}, []);
|
|
318
|
+
function createReadMoreText(text2, maxWords2, isExpanded2) {
|
|
319
|
+
const words = text2.split(" ");
|
|
320
|
+
const snippet2 = isExpanded2 ? text2 : words.slice(0, maxWords2).join(" ");
|
|
321
|
+
const readMoreText = isExpanded2 ? "" : "...";
|
|
322
|
+
return `${snippet2} ${readMoreText}`;
|
|
323
|
+
}
|
|
324
|
+
const toggleText = () => setIsExpanded(!isExpanded);
|
|
325
|
+
const snippet = createReadMoreText(text, maxWords, isExpanded);
|
|
326
|
+
return /* @__PURE__ */ jsxs5("div", { ...props, children: [
|
|
327
|
+
/* @__PURE__ */ jsx8("div", { "data-testid": "read-more-text", className: "prose lg:prose-lg", children: /* @__PURE__ */ jsx8(Markdown, { children: snippet }) }),
|
|
328
|
+
/* @__PURE__ */ jsx8(Button, { className: "mt-2 flex items-center justify-center", variant: "link", onClick: toggleText, children: /* @__PURE__ */ jsxs5("p", { className: "text-sm font-bold underline underline-offset-2", children: [
|
|
329
|
+
"Read ",
|
|
330
|
+
isExpanded ? "less" : "more"
|
|
331
|
+
] }) })
|
|
332
|
+
] });
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// src/components/jobPost/JobDescription.tsx
|
|
336
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
337
|
+
function JobDescription({ description }) {
|
|
338
|
+
if (!description) return null;
|
|
339
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex w-full flex-col gap-2", children: [
|
|
340
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-xl font-bold", children: "Job Description" }),
|
|
341
|
+
/* @__PURE__ */ jsx9(ReadMore, { text: description })
|
|
342
|
+
] });
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// src/components/jobPost/JobHeader.tsx
|
|
346
|
+
import { Dot } from "lucide-react";
|
|
347
|
+
import Image2 from "next/image";
|
|
348
|
+
|
|
349
|
+
// src/components/buttons/BackButton.tsx
|
|
350
|
+
import { X } from "lucide-react";
|
|
351
|
+
import { useRouter } from "next/navigation";
|
|
352
|
+
|
|
353
|
+
// src/components/ui/Icon.tsx
|
|
354
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
355
|
+
import { cva as cva3 } from "cva";
|
|
356
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
357
|
+
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
358
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
359
|
+
var Icon = forwardRef3(
|
|
360
|
+
({ variant, size, active = false, readonly = false, className, ...props }, ref) => {
|
|
361
|
+
const Component = readonly ? Slot2 : "button";
|
|
362
|
+
return /* @__PURE__ */ jsx10(
|
|
363
|
+
Component,
|
|
364
|
+
{
|
|
365
|
+
className: cn(
|
|
366
|
+
twMerge2(iconVariants({ variant: active ? "active" : variant, size })),
|
|
367
|
+
className
|
|
368
|
+
),
|
|
369
|
+
...props,
|
|
370
|
+
ref
|
|
371
|
+
}
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
Icon.displayName = "Icon";
|
|
376
|
+
var iconVariants = cva3(
|
|
377
|
+
[
|
|
378
|
+
"inline-flex",
|
|
379
|
+
"items-center",
|
|
380
|
+
"rounded-full",
|
|
381
|
+
"outline-2",
|
|
382
|
+
"outline-offset-2",
|
|
383
|
+
"outline-dashed",
|
|
384
|
+
"outline-transparent",
|
|
385
|
+
"disabled:text-grey-40",
|
|
386
|
+
"disabled:bg-transparent",
|
|
387
|
+
"disabled:pointer-events-none"
|
|
388
|
+
],
|
|
389
|
+
{
|
|
390
|
+
variants: {
|
|
391
|
+
variant: {
|
|
392
|
+
filled: [
|
|
393
|
+
"border",
|
|
394
|
+
"border-green-80",
|
|
395
|
+
"bg-green-90",
|
|
396
|
+
"text-white",
|
|
397
|
+
"hover:bg-green-80",
|
|
398
|
+
"active:bg-green-80",
|
|
399
|
+
"focus:outline-pickle-100",
|
|
400
|
+
"disabled:bg-green-70"
|
|
401
|
+
],
|
|
402
|
+
transparent: [
|
|
403
|
+
"text-black",
|
|
404
|
+
"hover:bg-grey-5",
|
|
405
|
+
"active:bg-grey-10",
|
|
406
|
+
"focus:outline-purple-100"
|
|
407
|
+
],
|
|
408
|
+
tonal: [
|
|
409
|
+
"border",
|
|
410
|
+
"border-grey-5",
|
|
411
|
+
"hover:border-grey-10",
|
|
412
|
+
"active:border-grey-20",
|
|
413
|
+
"focus:outline-purple-100"
|
|
414
|
+
],
|
|
415
|
+
active: ["text-black", "bg-pickle-100"]
|
|
416
|
+
},
|
|
417
|
+
size: {
|
|
418
|
+
small: ["h-10", "w-10", "p-3"],
|
|
419
|
+
medium: ["h-12", "w-12", "p-4"],
|
|
420
|
+
large: ["h-14", "w-14", "p-4"]
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
defaultVariants: {
|
|
424
|
+
variant: "filled",
|
|
425
|
+
size: "medium"
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
);
|
|
429
|
+
|
|
430
|
+
// src/hooks/useWindowHistory.ts
|
|
431
|
+
import { useContext } from "react";
|
|
432
|
+
|
|
433
|
+
// src/contexts/WindowHistoryProvider.tsx
|
|
434
|
+
import { useSearchParams } from "next/navigation";
|
|
435
|
+
import { createContext, useEffect as useEffect2, useMemo, useState as useState2 } from "react";
|
|
436
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
437
|
+
var WindowHistoryContext = createContext({});
|
|
438
|
+
|
|
439
|
+
// src/hooks/useWindowHistory.ts
|
|
440
|
+
function useWindowHistory() {
|
|
441
|
+
const windowHistoryContext = useContext(WindowHistoryContext);
|
|
442
|
+
if (Object.keys(windowHistoryContext).length === 0) {
|
|
443
|
+
throw new Error("useWindowHistory was used outside of its WindowHistoryContext");
|
|
444
|
+
}
|
|
445
|
+
return windowHistoryContext;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// src/components/buttons/BackButton.tsx
|
|
449
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
450
|
+
function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
|
|
451
|
+
const { history } = useWindowHistory();
|
|
452
|
+
const router = useRouter();
|
|
453
|
+
const isAcceptedRoute = (r) => !!acceptedRoutes?.find((route) => new RegExp("^" + route + "$", "i").test(r));
|
|
454
|
+
const goBack = () => {
|
|
455
|
+
const previous = history[history.length - 2];
|
|
456
|
+
history.length > 1 && isAcceptedRoute(previous) ? router.back() : router.push(fallbackHref ?? "/");
|
|
457
|
+
};
|
|
458
|
+
return /* @__PURE__ */ jsx12(
|
|
459
|
+
Icon,
|
|
460
|
+
{
|
|
461
|
+
"aria-label": "back button",
|
|
462
|
+
variant: "transparent",
|
|
463
|
+
size: "small",
|
|
464
|
+
onClick: goBack,
|
|
465
|
+
className,
|
|
466
|
+
...props,
|
|
467
|
+
children: /* @__PURE__ */ jsx12(X, {})
|
|
468
|
+
}
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// src/components/ui/Chip.tsx
|
|
473
|
+
import { cva as cva4 } from "cva";
|
|
474
|
+
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
475
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
476
|
+
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ jsx13("div", { className: twMerge3(chipVariants({ variant, size, className })), ...props });
|
|
477
|
+
var chipVariants = cva4(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
|
|
478
|
+
variants: {
|
|
479
|
+
variant: {
|
|
480
|
+
neutral: ["text-grey-80", "border-grey-10"],
|
|
481
|
+
primary: ["text-purple-100", "border-purple-20"],
|
|
482
|
+
danger: ["text-pumpkin-100", "border-pumpkin-20"],
|
|
483
|
+
onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
|
|
484
|
+
onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
|
|
485
|
+
},
|
|
486
|
+
size: {
|
|
487
|
+
small: ["text-sm", "leading-5", "px-2", "py-1", "gap-1.5"],
|
|
488
|
+
medium: ["text-base", "leading-6", "px-3", "py-2", "gap-2"]
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
defaultVariants: {
|
|
492
|
+
variant: "neutral",
|
|
493
|
+
size: "medium"
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
var Chip_default = Chip;
|
|
497
|
+
|
|
498
|
+
// src/lib/icons.ts
|
|
499
|
+
import {
|
|
500
|
+
Banknote,
|
|
501
|
+
Bell,
|
|
502
|
+
BriefcaseBusiness,
|
|
503
|
+
Building,
|
|
504
|
+
Building2,
|
|
505
|
+
CircleUser,
|
|
506
|
+
CircleUserRound,
|
|
507
|
+
Clock2,
|
|
508
|
+
Contact,
|
|
509
|
+
GalleryVerticalEnd,
|
|
510
|
+
Home,
|
|
511
|
+
KeyRound,
|
|
512
|
+
Layers,
|
|
513
|
+
LifeBuoy,
|
|
514
|
+
MapPin,
|
|
515
|
+
MessageSquareDot,
|
|
516
|
+
Settings,
|
|
517
|
+
SquareKanban,
|
|
518
|
+
Users,
|
|
519
|
+
Wallet
|
|
520
|
+
} from "lucide-react";
|
|
521
|
+
var iconMap = {
|
|
522
|
+
house: Home,
|
|
523
|
+
layers: Layers,
|
|
524
|
+
users: Users,
|
|
525
|
+
settings: Settings,
|
|
526
|
+
building: Building,
|
|
527
|
+
bell: Bell,
|
|
528
|
+
wallet: Wallet,
|
|
529
|
+
contact: Contact,
|
|
530
|
+
banknote: Banknote,
|
|
531
|
+
"message-square-dot": MessageSquareDot,
|
|
532
|
+
"life-buoy": LifeBuoy,
|
|
533
|
+
"building-2": Building2,
|
|
534
|
+
"gallery-vertical-end": GalleryVerticalEnd,
|
|
535
|
+
"square-kanban": SquareKanban,
|
|
536
|
+
"briefcase-business": BriefcaseBusiness,
|
|
537
|
+
"circle-user": CircleUser,
|
|
538
|
+
"key-round": KeyRound,
|
|
539
|
+
"clock-2": Clock2,
|
|
540
|
+
"circle-user-round": CircleUserRound,
|
|
541
|
+
"map-pin": MapPin
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
// src/components/jobPost/JobHeader.tsx
|
|
545
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
546
|
+
function JobHeader({
|
|
547
|
+
title,
|
|
548
|
+
subtitles,
|
|
549
|
+
standalone,
|
|
550
|
+
bannerSrc,
|
|
551
|
+
avatarSrc,
|
|
552
|
+
avatarName,
|
|
553
|
+
avatarHref,
|
|
554
|
+
backFallbackHref,
|
|
555
|
+
backAcceptedRoutes,
|
|
556
|
+
actions,
|
|
557
|
+
tags
|
|
558
|
+
}) {
|
|
559
|
+
const renderIcon = (icon) => {
|
|
560
|
+
const Icon2 = iconMap[icon];
|
|
561
|
+
return /* @__PURE__ */ jsx14(Icon2, { size: 18 });
|
|
562
|
+
};
|
|
563
|
+
return /* @__PURE__ */ jsxs7(
|
|
564
|
+
"div",
|
|
565
|
+
{
|
|
566
|
+
"data-testid": "job-header-root",
|
|
567
|
+
className: cn(
|
|
568
|
+
"-mt-8 flex w-full flex-col items-center justify-between gap-6 md:-mt-0",
|
|
569
|
+
!standalone && "rounded-3xl"
|
|
570
|
+
),
|
|
571
|
+
children: [
|
|
572
|
+
!standalone && /* @__PURE__ */ jsxs7("div", { className: "relative flex min-h-16 w-full items-center rounded-t-3xl bg-transparent md:min-h-24 md:flex-row lg:min-h-32", children: [
|
|
573
|
+
/* @__PURE__ */ jsx14(
|
|
574
|
+
Image2,
|
|
575
|
+
{
|
|
576
|
+
className: "h-full w-full rounded-t-3xl object-cover",
|
|
577
|
+
src: bannerSrc,
|
|
578
|
+
alt: "job banner",
|
|
579
|
+
fill: true
|
|
580
|
+
}
|
|
581
|
+
),
|
|
582
|
+
/* @__PURE__ */ jsx14(
|
|
583
|
+
BackButton,
|
|
584
|
+
{
|
|
585
|
+
acceptedRoutes: backAcceptedRoutes,
|
|
586
|
+
fallbackHref: backFallbackHref,
|
|
587
|
+
className: "absolute right-2 top-2 flex items-center justify-center text-white sm:hidden",
|
|
588
|
+
"data-testid": "job-header-back-button"
|
|
589
|
+
}
|
|
590
|
+
),
|
|
591
|
+
/* @__PURE__ */ jsx14(
|
|
592
|
+
"div",
|
|
593
|
+
{
|
|
594
|
+
className: "absolute left-4 top-8 md:left-6 md:top-16 lg:top-24",
|
|
595
|
+
"data-testid": "job-header-avatar",
|
|
596
|
+
children: /* @__PURE__ */ jsx14(
|
|
597
|
+
Avatar,
|
|
598
|
+
{
|
|
599
|
+
size: "large",
|
|
600
|
+
target: "_blank",
|
|
601
|
+
href: avatarHref,
|
|
602
|
+
name: avatarName,
|
|
603
|
+
src: avatarSrc,
|
|
604
|
+
rel: "noopener noreferrer"
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
}
|
|
608
|
+
)
|
|
609
|
+
] }),
|
|
610
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6", children: [
|
|
611
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col md:flex-row", children: [
|
|
612
|
+
standalone && /* @__PURE__ */ jsx14("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar", children: /* @__PURE__ */ jsx14(
|
|
613
|
+
Avatar,
|
|
614
|
+
{
|
|
615
|
+
size: "large",
|
|
616
|
+
target: "_blank",
|
|
617
|
+
href: avatarHref,
|
|
618
|
+
name: avatarName,
|
|
619
|
+
src: avatarSrc,
|
|
620
|
+
rel: "noopener noreferrer"
|
|
621
|
+
}
|
|
622
|
+
) }),
|
|
623
|
+
/* @__PURE__ */ jsx14("div", { className: "prose mt-4 flex w-full items-center text-grey-80 lg:prose-lg", children: subtitles?.map((subtitle, i) => /* @__PURE__ */ jsxs7(
|
|
624
|
+
"div",
|
|
625
|
+
{
|
|
626
|
+
"data-testid": `job-header-subtitle-${i}`,
|
|
627
|
+
className: "flex items-center",
|
|
628
|
+
children: [
|
|
629
|
+
subtitle,
|
|
630
|
+
i < subtitles.length - 1 && /* @__PURE__ */ jsx14(Dot, { className: "mx-1 shrink-0", size: 10 })
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
subtitle
|
|
634
|
+
)) })
|
|
635
|
+
] }),
|
|
636
|
+
/* @__PURE__ */ jsxs7(
|
|
637
|
+
"div",
|
|
638
|
+
{
|
|
639
|
+
"data-testid": "job-header-content",
|
|
640
|
+
className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1",
|
|
641
|
+
children: [
|
|
642
|
+
/* @__PURE__ */ jsx14(
|
|
643
|
+
"h2",
|
|
644
|
+
{
|
|
645
|
+
"data-testid": "job-header-title",
|
|
646
|
+
className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg",
|
|
647
|
+
children: title
|
|
648
|
+
}
|
|
649
|
+
),
|
|
650
|
+
!!actions && /* @__PURE__ */ jsx14(
|
|
651
|
+
"div",
|
|
652
|
+
{
|
|
653
|
+
className: "flex w-full justify-end gap-2 md:w-auto",
|
|
654
|
+
"data-testid": "job-header-actions",
|
|
655
|
+
children: actions
|
|
656
|
+
}
|
|
657
|
+
)
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
),
|
|
661
|
+
/* @__PURE__ */ jsx14(
|
|
662
|
+
"div",
|
|
663
|
+
{
|
|
664
|
+
"data-testid": "job-header-tags",
|
|
665
|
+
className: "flex flex-row flex-wrap items-center justify-start gap-2",
|
|
666
|
+
children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ jsxs7(
|
|
667
|
+
Chip_default,
|
|
668
|
+
{
|
|
669
|
+
size: "small",
|
|
670
|
+
variant: "neutral",
|
|
671
|
+
"aria-label": name,
|
|
672
|
+
"data-testid": `job-header-tag-${name}`,
|
|
673
|
+
children: [
|
|
674
|
+
renderIcon(icon),
|
|
675
|
+
/* @__PURE__ */ jsx14("span", { children: label })
|
|
676
|
+
]
|
|
677
|
+
},
|
|
678
|
+
name
|
|
679
|
+
))
|
|
680
|
+
}
|
|
681
|
+
)
|
|
682
|
+
] })
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
// src/types/data/shared_pickle_output_latest.ts
|
|
689
|
+
import { z } from "zod";
|
|
690
|
+
var TypeEnum = z.enum(["MONETARY_AMOUNT"]);
|
|
691
|
+
var DetailLevelEnum = z.enum(["COUNTRY", "GEO", "LOCALITY", "POSTAL_CODE", "REGION"]);
|
|
692
|
+
var UnitTextEnum = z.enum(["DAY", "HOUR", "MONTH", "PER_ACTIVITY", "WEEK", "YEAR"]);
|
|
693
|
+
var CurrencyEnum = z.enum(["EUR", "GBP", "USD"]);
|
|
694
|
+
var postalAddressSchema = z.object({
|
|
695
|
+
version: z.literal("1.0.0").default("1.0.0"),
|
|
696
|
+
type: z.string().describe("Document type used within sanity"),
|
|
697
|
+
addressCountry: z.string().describe("The physical country as defined in ISO 3166 Alpha-2"),
|
|
698
|
+
addressRegion: z.optional(z.string()).describe("The region in which the locality is, and which is in the country."),
|
|
699
|
+
addressLocality: z.optional(z.string()).describe("The locality in which the street address is, and which is in the region. In the US this would be city."),
|
|
700
|
+
streetAddress: z.optional(z.string()).describe("The street address within the locality."),
|
|
701
|
+
postalCode: z.optional(z.string()).describe("The postal code")
|
|
702
|
+
});
|
|
703
|
+
var placeSchema = z.object({
|
|
704
|
+
version: z.literal("1.0.0").default("1.0.0"),
|
|
705
|
+
detailLevel: z.optional(DetailLevelEnum),
|
|
706
|
+
latitude: z.optional(z.number()).describe("The latitude of a location."),
|
|
707
|
+
longitude: z.optional(z.number()).describe("The longitude of a location."),
|
|
708
|
+
address: z.optional(postalAddressSchema).describe("The physical place of the location")
|
|
709
|
+
});
|
|
710
|
+
var quantitativeValueSchema = z.object({
|
|
711
|
+
version: z.literal("1.0.0").default("1.0.0"),
|
|
712
|
+
type: z.string().describe("Document type used within sanity"),
|
|
713
|
+
value: z.optional(z.number()).describe("The single value for some quantity e.g 5000, if a range is needed use minValue and maxValue. Typically used for a single salary."),
|
|
714
|
+
minValue: z.optional(z.number()).describe("The single minium value in a range for a quantitative_value, requires a maximum value."),
|
|
715
|
+
maxValue: z.optional(z.number()).describe("The maximum value in a range for a quantitative_value, requires a minimum value."),
|
|
716
|
+
unitText: UnitTextEnum
|
|
717
|
+
});
|
|
718
|
+
var monetaryAmountSchema = z.object({
|
|
719
|
+
version: z.literal("1.0.0").default("1.0.0"),
|
|
720
|
+
type: z.string().describe("Document type used within sanity"),
|
|
721
|
+
singleValue: z.optional(z.number()).describe("The annualized single value for some quantity e.g 5000, if a range is needed use minValue and maxValue. Deprecated - use value.value instead."),
|
|
722
|
+
minValue: z.optional(z.number()).describe("The annualized single minium value in a range for a quantitative_value. Deprecated use value.minValue"),
|
|
723
|
+
maxValue: z.optional(z.number()).describe("The annualized maximum value in a range for a quantitative_value. Deprecated use value.maxValue"),
|
|
724
|
+
value: z.optional(quantitativeValueSchema).describe("The quantitative_value for a given salary"),
|
|
725
|
+
currency: z.optional(CurrencyEnum)
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
// src/lib/salaryRange.ts
|
|
729
|
+
function salaryRange(salary) {
|
|
730
|
+
if (!salary) return null;
|
|
731
|
+
const min = salary.minValue;
|
|
732
|
+
const max = salary.maxValue;
|
|
733
|
+
const single = salary.singleValue;
|
|
734
|
+
const signs = {
|
|
735
|
+
[CurrencyEnum.Values.USD]: "$",
|
|
736
|
+
[CurrencyEnum.Values.GBP]: "\xA3",
|
|
737
|
+
[CurrencyEnum.Values.EUR]: "\u20AC"
|
|
738
|
+
};
|
|
739
|
+
const sign = signs[salary.currency ?? CurrencyEnum.Values.USD];
|
|
740
|
+
if (min == null && max == null && single == null) return null;
|
|
741
|
+
if (single != null) return sign + single.toLocaleString();
|
|
742
|
+
if (min === max) return sign + min?.toLocaleString();
|
|
743
|
+
if (min != null && max != null)
|
|
744
|
+
return sign + min?.toLocaleString() + " - " + sign + max?.toLocaleString();
|
|
745
|
+
return null;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// src/hooks/useDisplayText.ts
|
|
749
|
+
import { useEffect as useEffect3, useMemo as useMemo2, useState as useState3 } from "react";
|
|
750
|
+
|
|
751
|
+
// src/lib/mappings.ts
|
|
752
|
+
var employmentTypeDisplayText = {
|
|
753
|
+
FULL_TIME: {
|
|
754
|
+
en: "Full Time"
|
|
755
|
+
},
|
|
756
|
+
INTERNSHIP: {
|
|
757
|
+
en: "Internship"
|
|
758
|
+
},
|
|
759
|
+
OTHER: {
|
|
760
|
+
en: "Other"
|
|
761
|
+
},
|
|
762
|
+
PART_TIME: {
|
|
763
|
+
en: "Part Time"
|
|
764
|
+
},
|
|
765
|
+
PER_DIEM: {
|
|
766
|
+
en: "Per-Diem"
|
|
767
|
+
},
|
|
768
|
+
TEMPORARY: {
|
|
769
|
+
en: "Temporary"
|
|
770
|
+
},
|
|
771
|
+
CONTRACT: {
|
|
772
|
+
en: "Contract"
|
|
773
|
+
}
|
|
774
|
+
};
|
|
775
|
+
var unitTextDisplayText = {
|
|
776
|
+
DAY: {
|
|
777
|
+
en: "Day"
|
|
778
|
+
},
|
|
779
|
+
HOUR: {
|
|
780
|
+
en: "Hour"
|
|
781
|
+
},
|
|
782
|
+
MONTH: {
|
|
783
|
+
en: "Month"
|
|
784
|
+
},
|
|
785
|
+
PER_ACTIVITY: {
|
|
786
|
+
en: "Per Activity"
|
|
787
|
+
},
|
|
788
|
+
WEEK: {
|
|
789
|
+
en: "Week"
|
|
790
|
+
},
|
|
791
|
+
YEAR: {
|
|
792
|
+
en: "Year"
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
var currencyDisplayText = {
|
|
796
|
+
EUR: {
|
|
797
|
+
en: "\u20AC"
|
|
798
|
+
},
|
|
799
|
+
GBP: {
|
|
800
|
+
en: "\xA3"
|
|
801
|
+
},
|
|
802
|
+
USD: {
|
|
803
|
+
en: "$"
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
var employmentLevelDisplayText = {
|
|
807
|
+
DIRECTOR: {
|
|
808
|
+
en: "Director"
|
|
809
|
+
},
|
|
810
|
+
ENTRY_LEVEL: {
|
|
811
|
+
en: "Entry Level"
|
|
812
|
+
},
|
|
813
|
+
EXECUTIVE: {
|
|
814
|
+
en: "Executive"
|
|
815
|
+
},
|
|
816
|
+
EXPERIENCED: {
|
|
817
|
+
en: "Experienced"
|
|
818
|
+
},
|
|
819
|
+
INTERN: {
|
|
820
|
+
en: "Intern"
|
|
821
|
+
},
|
|
822
|
+
MANAGER: {
|
|
823
|
+
en: "Manager"
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
var jobFunctionDisplayText = {
|
|
827
|
+
CLINICAL_RESEARCH: {
|
|
828
|
+
en: "Clinical Research"
|
|
829
|
+
},
|
|
830
|
+
CUSTOMER_SUCCESS: {
|
|
831
|
+
en: "Customer Success"
|
|
832
|
+
},
|
|
833
|
+
DATA_ANALYTICS: {
|
|
834
|
+
en: "Data Analytics"
|
|
835
|
+
},
|
|
836
|
+
FINANCE_AND_AUDIT: {
|
|
837
|
+
en: "Finance and Audit"
|
|
838
|
+
},
|
|
839
|
+
MARKETING: {
|
|
840
|
+
en: "Marketing"
|
|
841
|
+
},
|
|
842
|
+
OPERATIONS: {
|
|
843
|
+
en: "Operations"
|
|
844
|
+
},
|
|
845
|
+
PEOPLE_HUMAN_RESOURCES: {
|
|
846
|
+
en: "People Human Resources"
|
|
847
|
+
},
|
|
848
|
+
PRODUCT_AND_TECH: {
|
|
849
|
+
en: "Product and Tech"
|
|
850
|
+
},
|
|
851
|
+
QUALITY_ASSURANCE_AND_OUTCOMES: {
|
|
852
|
+
en: "Quality Assurance and Outcomes"
|
|
853
|
+
},
|
|
854
|
+
SALES_AND_BUSINESS_DEVELOPMENT: {
|
|
855
|
+
en: "Sales and Business Development"
|
|
856
|
+
},
|
|
857
|
+
STRATEGY_AND_CONSULTING: {
|
|
858
|
+
en: "Strategy and Consulting"
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
var bestFitDisplayText = {
|
|
862
|
+
DENTIST: {
|
|
863
|
+
en: "Dentist"
|
|
864
|
+
},
|
|
865
|
+
DIETICIAN: {
|
|
866
|
+
en: "Dietician"
|
|
867
|
+
},
|
|
868
|
+
DOULA: {
|
|
869
|
+
en: "Doula"
|
|
870
|
+
},
|
|
871
|
+
MEDICAL_ASSISTANT: {
|
|
872
|
+
en: "Medical Assistant"
|
|
873
|
+
},
|
|
874
|
+
MIDWIFE: {
|
|
875
|
+
en: "Midwife"
|
|
876
|
+
},
|
|
877
|
+
NURSE: {
|
|
878
|
+
en: "Nurse"
|
|
879
|
+
},
|
|
880
|
+
OCCUPATIONAL_THERAPIST: {
|
|
881
|
+
en: "Occupational Therapist"
|
|
882
|
+
},
|
|
883
|
+
PHARMACIST: {
|
|
884
|
+
en: "Pharmacist"
|
|
885
|
+
},
|
|
886
|
+
PHYSICAL_THERAPIST: {
|
|
887
|
+
en: "Physical Therapist"
|
|
888
|
+
},
|
|
889
|
+
PHYSICIAN: {
|
|
890
|
+
en: "Physician"
|
|
891
|
+
},
|
|
892
|
+
PHYSICIAN_ASSISTANT: {
|
|
893
|
+
en: "Physician Assistant"
|
|
894
|
+
},
|
|
895
|
+
PSYCHOLOGIST: {
|
|
896
|
+
en: "Psychologist"
|
|
897
|
+
},
|
|
898
|
+
RADIOLOGIST: {
|
|
899
|
+
en: "Radiologist"
|
|
900
|
+
},
|
|
901
|
+
SOCIAL_WORKER: {
|
|
902
|
+
en: "Social Worker"
|
|
903
|
+
},
|
|
904
|
+
SPEECH_LANGUAGE_PATHOLOGIST: {
|
|
905
|
+
en: "Speech Language Pathologist"
|
|
906
|
+
},
|
|
907
|
+
SURGEON: {
|
|
908
|
+
en: "Surgeon"
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
var clinicalSpecialtyDisplayText = {
|
|
912
|
+
ANESTHESIOLOGY: {
|
|
913
|
+
en: "Anesthesiology"
|
|
914
|
+
},
|
|
915
|
+
CARDIOLOGY: {
|
|
916
|
+
en: "Cardiology"
|
|
917
|
+
},
|
|
918
|
+
CARDIOVASCULAR_AND_PULMONARY: {
|
|
919
|
+
en: "Cardiovascular and Pulmonary"
|
|
920
|
+
},
|
|
921
|
+
CASE_MANAGEMENT: {
|
|
922
|
+
en: "Case Management"
|
|
923
|
+
},
|
|
924
|
+
CHRONIC_PAIN: {
|
|
925
|
+
en: "Chronic Pain"
|
|
926
|
+
},
|
|
927
|
+
CLINICAL_ELECTROPHYSIOLOGY: {
|
|
928
|
+
en: "Clinical Electrophysiology"
|
|
929
|
+
},
|
|
930
|
+
CRITICAL_AND_ACUTE_CARE: {
|
|
931
|
+
en: "Critical and Acute Care"
|
|
932
|
+
},
|
|
933
|
+
DERMATOLOGY: {
|
|
934
|
+
en: "Dermatology"
|
|
935
|
+
},
|
|
936
|
+
DIALYSIS: {
|
|
937
|
+
en: "Dialysis"
|
|
938
|
+
},
|
|
939
|
+
EMERGENCY_MEDICINE: {
|
|
940
|
+
en: "Emergency Medicine"
|
|
941
|
+
},
|
|
942
|
+
ENDOCRINOLOGY: {
|
|
943
|
+
en: "Endocrinology"
|
|
944
|
+
},
|
|
945
|
+
ERGONOMICS: {
|
|
946
|
+
en: "Ergonomics"
|
|
947
|
+
},
|
|
948
|
+
FEEDING_EATING_AND_SWALLOWING: {
|
|
949
|
+
en: "Feeding, Eating, and Swallowing"
|
|
950
|
+
},
|
|
951
|
+
GASTROENTEROLOGY: {
|
|
952
|
+
en: "Gastroenterology"
|
|
953
|
+
},
|
|
954
|
+
GERIATRICS: {
|
|
955
|
+
en: "Geriatrics"
|
|
956
|
+
},
|
|
957
|
+
HAND_THERAPY: {
|
|
958
|
+
en: "Hand Therapy"
|
|
959
|
+
},
|
|
960
|
+
HEMATOLOGY: {
|
|
961
|
+
en: "Hematology"
|
|
962
|
+
},
|
|
963
|
+
HOLISTIC_MEDICINE: {
|
|
964
|
+
en: "Holistic Medicine"
|
|
965
|
+
},
|
|
966
|
+
INFORMATICS: {
|
|
967
|
+
en: "Informatics"
|
|
968
|
+
},
|
|
969
|
+
INTERNAL_MEDICINE: {
|
|
970
|
+
en: "Internal Medicine"
|
|
971
|
+
},
|
|
972
|
+
LABOR_AND_DELIVERY: {
|
|
973
|
+
en: "Labor and Delivery"
|
|
974
|
+
},
|
|
975
|
+
MANUAL_THERAPY: {
|
|
976
|
+
en: "Manual Therapy"
|
|
977
|
+
},
|
|
978
|
+
MED_SURG: {
|
|
979
|
+
en: "Medical-Surgical"
|
|
980
|
+
},
|
|
981
|
+
MENTAL_HEALTH: {
|
|
982
|
+
en: "Mental Health"
|
|
983
|
+
},
|
|
984
|
+
NEPHROLOGY: {
|
|
985
|
+
en: "Nephrology"
|
|
986
|
+
},
|
|
987
|
+
NEUROLOGY: {
|
|
988
|
+
en: "Neurology"
|
|
989
|
+
},
|
|
990
|
+
ONCOLOGY: {
|
|
991
|
+
en: "Oncology"
|
|
992
|
+
},
|
|
993
|
+
ORTHOPEDICS: {
|
|
994
|
+
en: "Orthopedics"
|
|
995
|
+
},
|
|
996
|
+
OTOLARYNGOLOGY: {
|
|
997
|
+
en: "Otolaryngology"
|
|
998
|
+
},
|
|
999
|
+
PEDIATRICS: {
|
|
1000
|
+
en: "Pediatrics"
|
|
1001
|
+
},
|
|
1002
|
+
PHYSICAL_AND_REHABILITATION_MEDICINE: {
|
|
1003
|
+
en: "Physical and Rehabilitation Medicine"
|
|
1004
|
+
},
|
|
1005
|
+
PLASTIC_SURGERY: {
|
|
1006
|
+
en: "Plastic Surgery"
|
|
1007
|
+
},
|
|
1008
|
+
PRIMARY_CARE: {
|
|
1009
|
+
en: "Primary Care"
|
|
1010
|
+
},
|
|
1011
|
+
PSYCHIATRY: {
|
|
1012
|
+
en: "Psychiatry"
|
|
1013
|
+
},
|
|
1014
|
+
PULMONOLOGY: {
|
|
1015
|
+
en: "Pulmonology"
|
|
1016
|
+
},
|
|
1017
|
+
RADIOLOGY: {
|
|
1018
|
+
en: "Radiology"
|
|
1019
|
+
},
|
|
1020
|
+
SENSORY: {
|
|
1021
|
+
en: "Sensory"
|
|
1022
|
+
},
|
|
1023
|
+
SPORTS: {
|
|
1024
|
+
en: "Sports"
|
|
1025
|
+
},
|
|
1026
|
+
SURGERY: {
|
|
1027
|
+
en: "Surgery"
|
|
1028
|
+
},
|
|
1029
|
+
TRANSPLANT_SURGERY: {
|
|
1030
|
+
en: "Transplant Surgery"
|
|
1031
|
+
},
|
|
1032
|
+
TRAUMA_MEDICINE: {
|
|
1033
|
+
en: "Trauma Medicine"
|
|
1034
|
+
},
|
|
1035
|
+
URGENT_CARE: {
|
|
1036
|
+
en: "Urgent Care"
|
|
1037
|
+
},
|
|
1038
|
+
UROLOGY: {
|
|
1039
|
+
en: "Urology"
|
|
1040
|
+
},
|
|
1041
|
+
VISION: {
|
|
1042
|
+
en: "Vision"
|
|
1043
|
+
},
|
|
1044
|
+
WOMENS_HEALTH: {
|
|
1045
|
+
en: "Women's Health"
|
|
1046
|
+
},
|
|
1047
|
+
WOUND_AND_BURN_CARE: {
|
|
1048
|
+
en: "Wound and Burn Care"
|
|
1049
|
+
},
|
|
1050
|
+
WOUND_MANAGEMENT: {
|
|
1051
|
+
en: "Wound Management"
|
|
1052
|
+
}
|
|
1053
|
+
};
|
|
1054
|
+
var shiftDisplayText = {
|
|
1055
|
+
TEN_HOUR: {
|
|
1056
|
+
en: "10 Hour"
|
|
1057
|
+
},
|
|
1058
|
+
TWELVE_HOUR: {
|
|
1059
|
+
en: "12 Hour"
|
|
1060
|
+
},
|
|
1061
|
+
EIGHT_HOUR: {
|
|
1062
|
+
en: "8 Hour"
|
|
1063
|
+
},
|
|
1064
|
+
DAY: {
|
|
1065
|
+
en: "Day"
|
|
1066
|
+
},
|
|
1067
|
+
EVENING: {
|
|
1068
|
+
en: "Evening"
|
|
1069
|
+
},
|
|
1070
|
+
FLEXIBLE: {
|
|
1071
|
+
en: "Flexible"
|
|
1072
|
+
},
|
|
1073
|
+
MID_SHIFT: {
|
|
1074
|
+
en: "Mid Shift"
|
|
1075
|
+
},
|
|
1076
|
+
MONDAY_TO_FRIDAY: {
|
|
1077
|
+
en: "Monday to Friday"
|
|
1078
|
+
},
|
|
1079
|
+
NIGHT: {
|
|
1080
|
+
en: "Night"
|
|
1081
|
+
},
|
|
1082
|
+
ON_CALL: {
|
|
1083
|
+
en: "On Call"
|
|
1084
|
+
},
|
|
1085
|
+
WEEKENDS: {
|
|
1086
|
+
en: "Weekends"
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
var clinicalSettingDisplayText = {
|
|
1090
|
+
ACUTE_CARE: {
|
|
1091
|
+
en: "Acute Care"
|
|
1092
|
+
},
|
|
1093
|
+
AMBULATORY_SURGERY_CENTER: {
|
|
1094
|
+
en: "Ambulatory Surgery Center"
|
|
1095
|
+
},
|
|
1096
|
+
CLINIC: {
|
|
1097
|
+
en: "Clinic"
|
|
1098
|
+
},
|
|
1099
|
+
HOME_HEALTH: {
|
|
1100
|
+
en: "Home Health"
|
|
1101
|
+
},
|
|
1102
|
+
HOSPITAL: {
|
|
1103
|
+
en: "Hospital"
|
|
1104
|
+
},
|
|
1105
|
+
INPATIENT: {
|
|
1106
|
+
en: "Inpatient"
|
|
1107
|
+
},
|
|
1108
|
+
LONG_TERM_CARE: {
|
|
1109
|
+
en: "Long Term Care"
|
|
1110
|
+
},
|
|
1111
|
+
MED_SPA: {
|
|
1112
|
+
en: "Med Spa"
|
|
1113
|
+
},
|
|
1114
|
+
NURSING_HOME: {
|
|
1115
|
+
en: "Nursing Home"
|
|
1116
|
+
},
|
|
1117
|
+
OFFICE: {
|
|
1118
|
+
en: "Office"
|
|
1119
|
+
},
|
|
1120
|
+
OUTPATIENT: {
|
|
1121
|
+
en: "Outpatient"
|
|
1122
|
+
},
|
|
1123
|
+
PRIVATE_PRACTICE: {
|
|
1124
|
+
en: "Private Practice"
|
|
1125
|
+
},
|
|
1126
|
+
REHAB_CENTER: {
|
|
1127
|
+
en: "Rehab Center"
|
|
1128
|
+
},
|
|
1129
|
+
SCHOOL: {
|
|
1130
|
+
en: "School"
|
|
1131
|
+
},
|
|
1132
|
+
SKILLED_NURSING_FACILITY: {
|
|
1133
|
+
en: "Skilled Nursing Facility"
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
var defaultMappings = {
|
|
1137
|
+
employmentType: employmentTypeDisplayText,
|
|
1138
|
+
unitText: unitTextDisplayText,
|
|
1139
|
+
currency: currencyDisplayText,
|
|
1140
|
+
employmentLevel: employmentLevelDisplayText,
|
|
1141
|
+
jobFunction: jobFunctionDisplayText,
|
|
1142
|
+
bestFit: bestFitDisplayText,
|
|
1143
|
+
clinicalSpecialty: clinicalSpecialtyDisplayText,
|
|
1144
|
+
clinicalSetting: clinicalSettingDisplayText,
|
|
1145
|
+
shift: shiftDisplayText
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
// src/types/displayText.errors.tsx
|
|
1149
|
+
var DisplayTextScopeNotFoundError = class extends Error {
|
|
1150
|
+
constructor(scope) {
|
|
1151
|
+
super(`No display text mapping found for scope: ${scope}`);
|
|
1152
|
+
this.name = "DisplayTextScopeNotFoundError";
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
var DisplayTextValueNotFoundError = class extends Error {
|
|
1156
|
+
constructor(value, scope) {
|
|
1157
|
+
super(`No display text found for value: '${value}' in scope: '${scope}'`);
|
|
1158
|
+
this.name = "DisplayTextValueNotFoundError";
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
// src/services/displayText.tsx
|
|
1163
|
+
var DisplayTextService = class {
|
|
1164
|
+
constructor(customMappings) {
|
|
1165
|
+
this.defaultLanguage = "en";
|
|
1166
|
+
this.mappings = {
|
|
1167
|
+
...defaultMappings,
|
|
1168
|
+
// Use all pre-defined mappings as defaults
|
|
1169
|
+
...customMappings
|
|
1170
|
+
// Override with any custom mappings if provided
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
async getDisplayText(scope, value, language = this.defaultLanguage) {
|
|
1174
|
+
const scopeMapping = this.mappings[scope];
|
|
1175
|
+
if (!scopeMapping) {
|
|
1176
|
+
throw new DisplayTextScopeNotFoundError(scope);
|
|
1177
|
+
}
|
|
1178
|
+
if (Array.isArray(value)) {
|
|
1179
|
+
const displayTextPromises = value.map((v) => this.getDisplayText(scope, v, language));
|
|
1180
|
+
const displayTexts2 = await Promise.all(displayTextPromises);
|
|
1181
|
+
return displayTexts2.filter((v) => !!v).join(", ");
|
|
1182
|
+
}
|
|
1183
|
+
const displayTexts = scopeMapping[value];
|
|
1184
|
+
if (!displayTexts) {
|
|
1185
|
+
throw new DisplayTextValueNotFoundError(value, scope);
|
|
1186
|
+
}
|
|
1187
|
+
return displayTexts[language] || displayTexts[this.defaultLanguage] || value;
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
|
|
1191
|
+
// src/hooks/useDisplayText.ts
|
|
1192
|
+
var useDisplayText = (scope, value) => {
|
|
1193
|
+
const [displayText, setDisplayText] = useState3("");
|
|
1194
|
+
const displayService = useMemo2(() => new DisplayTextService(), []);
|
|
1195
|
+
useEffect3(() => {
|
|
1196
|
+
if (!displayService || !value) {
|
|
1197
|
+
setDisplayText("");
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
void (async () => {
|
|
1201
|
+
try {
|
|
1202
|
+
const result = await displayService.getDisplayText(scope, value);
|
|
1203
|
+
if (typeof result === "string") {
|
|
1204
|
+
setDisplayText(result);
|
|
1205
|
+
} else {
|
|
1206
|
+
console.error("Expected a string result, but got:", result);
|
|
1207
|
+
}
|
|
1208
|
+
} catch (error) {
|
|
1209
|
+
if (error instanceof DisplayTextValueNotFoundError) {
|
|
1210
|
+
console.warn("Display text value not found:", value);
|
|
1211
|
+
setDisplayText(String(value));
|
|
1212
|
+
} else {
|
|
1213
|
+
console.error("Unexpected error formatting text:", error);
|
|
1214
|
+
setDisplayText(String(value));
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
})();
|
|
1218
|
+
}, [scope, value, displayService]);
|
|
1219
|
+
return displayText;
|
|
1220
|
+
};
|
|
1221
|
+
|
|
1222
|
+
// src/lib/locations.ts
|
|
1223
|
+
function formattedAddress(address) {
|
|
1224
|
+
const { addressLocality, addressRegion, addressCountry } = address;
|
|
1225
|
+
if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`;
|
|
1226
|
+
if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`;
|
|
1227
|
+
if (addressRegion) return addressRegion;
|
|
1228
|
+
if (addressCountry) return addressCountry;
|
|
1229
|
+
return null;
|
|
1230
|
+
}
|
|
1231
|
+
function formattedJobLocation(job) {
|
|
1232
|
+
const address = job.jobLocation && formattedAddress(job.jobLocation);
|
|
1233
|
+
const remote = job.isRemote ? "Remote" : "";
|
|
1234
|
+
return [address, remote].filter(Boolean).join(" | ");
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
// src/components/jobPost/JobPost.tsx
|
|
1238
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1239
|
+
function JobPost({
|
|
1240
|
+
job,
|
|
1241
|
+
bannerSrc,
|
|
1242
|
+
avatarSrc,
|
|
1243
|
+
standalone,
|
|
1244
|
+
fallbackHref,
|
|
1245
|
+
actions
|
|
1246
|
+
}) {
|
|
1247
|
+
const formattedEmploymentType = useDisplayText("employmentType", job.employmentType);
|
|
1248
|
+
const formattedEmploymentLevel = useDisplayText("employmentLevel", job.employmentLevel);
|
|
1249
|
+
const formattedJobFunction = useDisplayText("jobFunction", job.jobFunction);
|
|
1250
|
+
const formattedLocation = formattedJobLocation(job);
|
|
1251
|
+
const formattedSalary = salaryRange(job.estimatedSalary);
|
|
1252
|
+
const formattedDate = DateFns.formatDistanceToNow(new Date(job.datePosted), {
|
|
1253
|
+
addSuffix: true
|
|
1254
|
+
});
|
|
1255
|
+
const tags = [
|
|
1256
|
+
!!formattedSalary && {
|
|
1257
|
+
icon: "banknote",
|
|
1258
|
+
name: "salary",
|
|
1259
|
+
label: `${formattedSalary} a year`
|
|
1260
|
+
},
|
|
1261
|
+
!!formattedEmploymentType && {
|
|
1262
|
+
icon: "briefcase-business",
|
|
1263
|
+
name: "employmentType",
|
|
1264
|
+
label: formattedEmploymentType
|
|
1265
|
+
},
|
|
1266
|
+
!!formattedEmploymentLevel && {
|
|
1267
|
+
icon: "circle-user",
|
|
1268
|
+
name: "level",
|
|
1269
|
+
label: formattedEmploymentLevel
|
|
1270
|
+
},
|
|
1271
|
+
!!formattedJobFunction && {
|
|
1272
|
+
icon: "briefcase-business",
|
|
1273
|
+
name: "jobFunction",
|
|
1274
|
+
label: formattedJobFunction
|
|
1275
|
+
},
|
|
1276
|
+
!!formattedLocation && {
|
|
1277
|
+
icon: "map-pin",
|
|
1278
|
+
name: "location",
|
|
1279
|
+
label: formattedLocation
|
|
1280
|
+
}
|
|
1281
|
+
].filter((t) => !!t);
|
|
1282
|
+
return /* @__PURE__ */ jsxs8(
|
|
1283
|
+
"div",
|
|
1284
|
+
{
|
|
1285
|
+
className: cn(
|
|
1286
|
+
"flex flex-col gap-10 pb-4",
|
|
1287
|
+
!standalone && "border-1 rounded-3xl border-grey-5"
|
|
1288
|
+
),
|
|
1289
|
+
children: [
|
|
1290
|
+
/* @__PURE__ */ jsx15(
|
|
1291
|
+
JobHeader,
|
|
1292
|
+
{
|
|
1293
|
+
title: job.title,
|
|
1294
|
+
bannerSrc,
|
|
1295
|
+
avatarName: job.hiringOrganization?.companyName,
|
|
1296
|
+
subtitles: [job.hiringOrganization?.companyName ?? "", `Posted ${formattedDate}`],
|
|
1297
|
+
actions,
|
|
1298
|
+
standalone,
|
|
1299
|
+
backFallbackHref: fallbackHref,
|
|
1300
|
+
tags
|
|
1301
|
+
}
|
|
1302
|
+
),
|
|
1303
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-8 px-6", children: [
|
|
1304
|
+
/* @__PURE__ */ jsx15(JobDescription, { description: job.description }),
|
|
1305
|
+
/* @__PURE__ */ jsx15(
|
|
1306
|
+
CompanyTake,
|
|
1307
|
+
{
|
|
1308
|
+
avatarSrc,
|
|
1309
|
+
content: job.hiringOrganization?.companyNDG?.companyNDGTake
|
|
1310
|
+
}
|
|
1311
|
+
),
|
|
1312
|
+
/* @__PURE__ */ jsx15(
|
|
1313
|
+
CompanyInformation,
|
|
1314
|
+
{
|
|
1315
|
+
name: job.hiringOrganization?.companyName ?? "",
|
|
1316
|
+
how: job.hiringOrganization?.companyPhilosophy?.companyHow,
|
|
1317
|
+
mission: job.hiringOrganization?.companyPhilosophy?.mission,
|
|
1318
|
+
wow: job.hiringOrganization?.companyNDG?.companyWow,
|
|
1319
|
+
website: job.hiringOrganization?.companyWebsite
|
|
1320
|
+
}
|
|
1321
|
+
),
|
|
1322
|
+
/* @__PURE__ */ jsx15(
|
|
1323
|
+
CompanyBenefits,
|
|
1324
|
+
{
|
|
1325
|
+
benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.description).filter((d) => d !== void 0)
|
|
1326
|
+
}
|
|
1327
|
+
)
|
|
1328
|
+
] })
|
|
1329
|
+
]
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
export {
|
|
1334
|
+
JobPost
|
|
1335
|
+
};
|
|
1336
|
+
//# sourceMappingURL=JobPost.js.map
|