@next-degree/pickle-shared-js 0.11.0 → 0.12.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 (95) hide show
  1. package/dist/{company_service_sanity-CGNCrk8e.d.cts → company_service_sanity-Br0R7m-A.d.cts} +384 -384
  2. package/dist/{company_service_sanity-CAyYirw5.d.ts → company_service_sanity-DF01qvTz.d.ts} +384 -384
  3. package/dist/components/jobCard/JobLocation.cjs +6 -3
  4. package/dist/components/jobCard/JobLocation.cjs.map +1 -1
  5. package/dist/components/jobCard/JobLocation.d.cts +1 -1
  6. package/dist/components/jobCard/JobLocation.d.ts +1 -1
  7. package/dist/components/jobCard/JobLocation.js +2 -3
  8. package/dist/components/jobCard/JobLocation.js.map +1 -1
  9. package/dist/components/jobPost/JobDescription.cjs +3 -1
  10. package/dist/components/jobPost/JobDescription.cjs.map +1 -1
  11. package/dist/components/jobPost/JobDescription.js +3 -1
  12. package/dist/components/jobPost/JobDescription.js.map +1 -1
  13. package/dist/components/jobPost/JobPost.cjs +17 -13
  14. package/dist/components/jobPost/JobPost.cjs.map +1 -1
  15. package/dist/components/jobPost/JobPost.d.cts +1 -1
  16. package/dist/components/jobPost/JobPost.d.ts +1 -1
  17. package/dist/components/jobPost/JobPost.js +17 -13
  18. package/dist/components/jobPost/JobPost.js.map +1 -1
  19. package/dist/components/primitives/command.d.cts +1 -1
  20. package/dist/components/primitives/command.d.ts +1 -1
  21. package/dist/components/ui/Button.d.cts +1 -1
  22. package/dist/components/ui/Button.d.ts +1 -1
  23. package/dist/components/ui/Combobox.cjs +28 -19
  24. package/dist/components/ui/Combobox.cjs.map +1 -1
  25. package/dist/components/ui/Combobox.js +29 -20
  26. package/dist/components/ui/Combobox.js.map +1 -1
  27. package/dist/components/ui/DismissibleBanner.cjs +85 -0
  28. package/dist/components/ui/DismissibleBanner.cjs.map +1 -0
  29. package/dist/components/ui/DismissibleBanner.d.cts +11 -0
  30. package/dist/components/ui/DismissibleBanner.d.ts +11 -0
  31. package/dist/components/ui/DismissibleBanner.js +60 -0
  32. package/dist/components/ui/DismissibleBanner.js.map +1 -0
  33. package/dist/components/ui/ReadMore.cjs +3 -1
  34. package/dist/components/ui/ReadMore.cjs.map +1 -1
  35. package/dist/components/ui/ReadMore.js +3 -1
  36. package/dist/components/ui/ReadMore.js.map +1 -1
  37. package/dist/components/ui/buttonShadcn.d.cts +1 -1
  38. package/dist/components/ui/buttonShadcn.d.ts +1 -1
  39. package/dist/{displayText-D8MYOaYK.d.ts → displayText-C1DIK8hr.d.ts} +2 -2
  40. package/dist/{displayText-DHKm6_JF.d.cts → displayText-DzxDrQAT.d.cts} +2 -2
  41. package/dist/hooks/useDisplayText.d.cts +3 -3
  42. package/dist/hooks/useDisplayText.d.ts +3 -3
  43. package/dist/index.cjs +1224 -1139
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +9 -5
  46. package/dist/index.d.ts +9 -5
  47. package/dist/index.js +1162 -1080
  48. package/dist/index.js.map +1 -1
  49. package/dist/{job_posting_service_latest-C8PT9mxn.d.cts → job_posting_service_latest-DCbi2bXu.d.cts} +261 -261
  50. package/dist/{job_posting_service_latest-C8PT9mxn.d.ts → job_posting_service_latest-DCbi2bXu.d.ts} +261 -261
  51. package/dist/{job_posting_service_latest-DaKYQh30.d.cts → job_posting_service_latest-tqnHqjwc.d.cts} +261 -261
  52. package/dist/{job_posting_service_latest-DaKYQh30.d.ts → job_posting_service_latest-tqnHqjwc.d.ts} +261 -261
  53. package/dist/{job_posting_service_sanity-BK7jdr2W.d.cts → job_posting_service_sanity-B7GvIdYQ.d.cts} +523 -523
  54. package/dist/{job_posting_service_sanity-nyUCPROx.d.ts → job_posting_service_sanity-CfLaGMVK.d.ts} +523 -523
  55. package/dist/lib/locations.d.cts +2 -2
  56. package/dist/lib/locations.d.ts +2 -2
  57. package/dist/lib/mappings.d.cts +3 -3
  58. package/dist/lib/mappings.d.ts +3 -3
  59. package/dist/lib/salaryRange.cjs +14 -12
  60. package/dist/lib/salaryRange.cjs.map +1 -1
  61. package/dist/lib/salaryRange.d.cts +2 -2
  62. package/dist/lib/salaryRange.d.ts +2 -2
  63. package/dist/lib/salaryRange.js +14 -12
  64. package/dist/lib/salaryRange.js.map +1 -1
  65. package/dist/services/displayText.d.cts +3 -3
  66. package/dist/services/displayText.d.ts +3 -3
  67. package/dist/styles/globals.css +3 -0
  68. package/dist/styles/globals.css.map +1 -1
  69. package/dist/types/data/company_service_latest.d.cts +1 -1
  70. package/dist/types/data/company_service_latest.d.ts +1 -1
  71. package/dist/types/data/job_posting_service_latest.d.cts +1 -1
  72. package/dist/types/data/job_posting_service_latest.d.ts +1 -1
  73. package/dist/types/data/shared_pickle_output_latest.d.cts +1 -1
  74. package/dist/types/data/shared_pickle_output_latest.d.ts +1 -1
  75. package/dist/types/index.d.cts +5 -5
  76. package/dist/types/index.d.ts +5 -5
  77. package/dist/types/latest/company_service_latest.d.cts +1 -1
  78. package/dist/types/latest/company_service_latest.d.ts +1 -1
  79. package/dist/types/latest/custom/company_service_sanity.d.cts +3 -3
  80. package/dist/types/latest/custom/company_service_sanity.d.ts +3 -3
  81. package/dist/types/latest/custom/job_posting_service_sanity.d.cts +3 -3
  82. package/dist/types/latest/custom/job_posting_service_sanity.d.ts +3 -3
  83. package/dist/types/latest/job_posting_service_latest.d.cts +1 -1
  84. package/dist/types/latest/job_posting_service_latest.d.ts +1 -1
  85. package/dist/types/latest/shared_pickle_output_latest.d.cts +1 -1
  86. package/dist/types/latest/shared_pickle_output_latest.d.ts +1 -1
  87. package/package.json +2 -2
  88. package/dist/{company_service_latest-o6X0atwz.d.cts → company_service_latest-C7Moeufo.d.cts} +228 -228
  89. package/dist/{company_service_latest-o6X0atwz.d.ts → company_service_latest-C7Moeufo.d.ts} +228 -228
  90. package/dist/{company_service_latest-DpBsftTD.d.cts → company_service_latest-CITz7F53.d.cts} +228 -228
  91. package/dist/{company_service_latest-DpBsftTD.d.ts → company_service_latest-CITz7F53.d.ts} +228 -228
  92. package/dist/{shared_pickle_output_latest-BVF7Zh2H.d.cts → shared_pickle_output_latest--XZhOUyE.d.cts} +11 -11
  93. package/dist/{shared_pickle_output_latest-BVF7Zh2H.d.ts → shared_pickle_output_latest--XZhOUyE.d.ts} +11 -11
  94. package/dist/{shared_pickle_output_latest-BjRRmT8R.d.cts → shared_pickle_output_latest-DKOmTyYk.d.cts} +11 -11
  95. package/dist/{shared_pickle_output_latest-BjRRmT8R.d.ts → shared_pickle_output_latest-DKOmTyYk.d.ts} +11 -11
package/dist/index.js CHANGED
@@ -1081,7 +1081,7 @@ var buttonVariants = cva5(
1081
1081
  // src/components/ui/Combobox.tsx
1082
1082
  import { cva as cva6 } from "cva";
1083
1083
  import { ChevronDownIcon as ChevronDownIcon2, CircleX as CircleX2, icons as icons3 } from "lucide-react";
1084
- import { forwardRef as forwardRef11, useEffect as useEffect3, useState as useState3 } from "react";
1084
+ import { forwardRef as forwardRef11, useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
1085
1085
 
1086
1086
  // src/components/primitives/popover.tsx
1087
1087
  import * as PopoverPrimitive from "@radix-ui/react-popover";
@@ -1128,40 +1128,49 @@ var Combobox = forwardRef11((props, ref) => {
1128
1128
  } = props;
1129
1129
  const [selected, setSelected] = useState3([]);
1130
1130
  const [open, setOpen] = useState3(false);
1131
+ const isUserUpdate = useRef3(false);
1131
1132
  const IconComponent = icon && icons3[icon];
1132
1133
  const hideSearchBox = options?.length <= 5;
1133
1134
  const isDefault = variant === "default";
1134
1135
  const isChip = variant === "chip";
1135
- const isEmpty = selected.length == 0;
1136
+ const isEmpty = selected.length === 0;
1136
1137
  const showChevron = isDefault ? isEmpty : true;
1137
1138
  const close = () => setOpen(false);
1138
1139
  useEffect3(() => {
1139
- const valueArray = multiselect ? value ?? [] : value ? [value] : [];
1140
- setSelected(
1141
- valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== void 0)
1142
- );
1143
- }, [value]);
1140
+ if (!isUserUpdate.current) {
1141
+ const valueArray = multiselect ? value ?? [] : value ? [value] : [];
1142
+ setSelected(
1143
+ valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== void 0)
1144
+ );
1145
+ }
1146
+ }, [value, options, multiselect]);
1147
+ useEffect3(() => {
1148
+ if (isUserUpdate.current) {
1149
+ if (multiselect) {
1150
+ handleChange?.(selected.map((o) => o.value));
1151
+ } else {
1152
+ handleChange?.(selected[0]?.value ?? "");
1153
+ }
1154
+ isUserUpdate.current = false;
1155
+ }
1156
+ }, [selected, multiselect, handleChange]);
1157
+ const updateMultiSelect = (prev, option) => {
1158
+ return prev.some((o) => o.value === option.value) ? prev.filter((v) => v !== option) : [...prev, option];
1159
+ };
1144
1160
  const handleSelect = (value2) => {
1145
1161
  const option = options.find((o) => o.value === value2);
1146
1162
  if (!option) return;
1163
+ isUserUpdate.current = true;
1147
1164
  if (multiselect) {
1148
- return setSelected((prev) => {
1149
- const newSelected = prev.some((o) => o.value === value2) ? prev.filter((v) => v !== option) : [...prev, option];
1150
- handleChange?.(newSelected.map((o) => o.value));
1151
- return newSelected;
1152
- });
1165
+ setSelected((prev) => updateMultiSelect(prev, option));
1166
+ } else {
1167
+ setSelected([option]);
1168
+ close();
1153
1169
  }
1154
- setSelected([option]);
1155
- handleChange?.(option.value);
1156
- close();
1157
1170
  };
1158
1171
  const handleClear = () => {
1172
+ isUserUpdate.current = true;
1159
1173
  setSelected([]);
1160
- if (multiselect) {
1161
- handleChange?.([]);
1162
- } else {
1163
- handleChange?.("");
1164
- }
1165
1174
  };
1166
1175
  const handleDisplayValue = () => {
1167
1176
  const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
@@ -1743,6 +1752,7 @@ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
1743
1752
  function ReadMore({ text, ...props }) {
1744
1753
  const [isExpanded, setIsExpanded] = useState5(false);
1745
1754
  const [maxWords, setMaxWords] = useState5(160);
1755
+ const isOverMaxWords = text.split(" ").length > maxWords;
1746
1756
  useEffect5(() => {
1747
1757
  const updateMaxWords = () => {
1748
1758
  const windowWidth = window.innerWidth;
@@ -1757,6 +1767,7 @@ function ReadMore({ text, ...props }) {
1757
1767
  return () => window.removeEventListener("resize", updateMaxWords);
1758
1768
  }, []);
1759
1769
  function createReadMoreText(text2, maxWords2, isExpanded2) {
1770
+ if (!isOverMaxWords) return text2;
1760
1771
  const words = text2.split(" ");
1761
1772
  const snippet2 = isExpanded2 ? text2 : words.slice(0, maxWords2).join(" ");
1762
1773
  const readMoreText = isExpanded2 ? "" : "...";
@@ -1766,7 +1777,7 @@ function ReadMore({ text, ...props }) {
1766
1777
  const snippet = createReadMoreText(text, maxWords, isExpanded);
1767
1778
  return /* @__PURE__ */ jsxs17("div", { ...props, children: [
1768
1779
  /* @__PURE__ */ jsx28("div", { "data-testid": "read-more-text", className: "prose lg:prose-lg", children: /* @__PURE__ */ jsx28(Markdown, { children: snippet }) }),
1769
- /* @__PURE__ */ jsx28(
1780
+ isOverMaxWords && /* @__PURE__ */ jsx28(
1770
1781
  Button,
1771
1782
  {
1772
1783
  type: "button",
@@ -2030,573 +2041,1050 @@ function StepTabs({
2030
2041
  );
2031
2042
  }
2032
2043
 
2033
- // src/components/company/CompanyBenefits.tsx
2044
+ // src/components/ui/DismissibleBanner.tsx
2045
+ import { X as X4 } from "lucide-react";
2046
+ import { useEffect as useEffect7, useState as useState7 } from "react";
2034
2047
  import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
2035
- function CompanyBenefits({ benefits }) {
2036
- if (!benefits) return null;
2037
- return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-2", "data-testid": "company-benefits", children: [
2038
- /* @__PURE__ */ jsx33("h2", { className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg", children: "Company benefits" }),
2039
- /* @__PURE__ */ jsx33("ul", { className: "flex flex-col gap-3", children: benefits.map((benefit, i) => /* @__PURE__ */ jsx33("li", { className: "text-base text-grey-80", children: benefit }, `${benefit}-${i}`)) })
2040
- ] });
2041
- }
2042
-
2043
- // src/components/company/CompanyInformation.tsx
2044
- import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
2045
- function CompanyInformation({
2046
- name,
2047
- how,
2048
- mission,
2049
- wow,
2050
- website
2048
+ function DismissibleBanner({
2049
+ children,
2050
+ cookieId,
2051
+ className,
2052
+ textClassNames,
2053
+ buttonClassNames
2051
2054
  }) {
2052
- return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-2", children: [
2053
- /* @__PURE__ */ jsxs21(
2054
- "h2",
2055
- {
2056
- "data-testid": "company-name",
2057
- className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg",
2058
- children: [
2059
- "About ",
2060
- name
2061
- ]
2062
- }
2063
- ),
2064
- how && /* @__PURE__ */ jsx34("p", { "data-testid": "company-information", className: "text-base text-grey-80", children: how }),
2065
- mission && /* @__PURE__ */ jsxs21("div", { className: "flex gap-2", children: [
2066
- /* @__PURE__ */ jsx34("span", { children: "\u{1F680}" }),
2067
- /* @__PURE__ */ jsxs21("p", { className: "text-base text-grey-80", children: [
2068
- /* @__PURE__ */ jsx34("span", { className: "pr-1 font-bold", children: "Mission" }),
2069
- mission
2070
- ] })
2071
- ] }),
2072
- wow && /* @__PURE__ */ jsxs21("div", { className: "flex gap-2", children: [
2073
- /* @__PURE__ */ jsx34("span", { children: "\u{1F31F}" }),
2074
- /* @__PURE__ */ jsxs21("p", { className: "text-base text-grey-80", children: [
2075
- /* @__PURE__ */ jsx34("span", { className: "pr-1 font-bold", children: "Wow Factor" }),
2076
- wow
2077
- ] })
2078
- ] }),
2079
- website && /* @__PURE__ */ jsx34("div", { className: "pt-2", children: /* @__PURE__ */ jsx34(
2080
- LinkButton,
2081
- {
2082
- "data-testid": "company-website-link",
2083
- href: website,
2084
- target: "_blank",
2085
- rel: "noopener noreferrer",
2086
- children: "Website"
2087
- }
2088
- ) })
2089
- ] });
2090
- }
2091
-
2092
- // src/components/company/CompanyTake.tsx
2093
- import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
2094
- function CompanyTake({ content, avatarSrc }) {
2095
- if (!content) return null;
2096
- return /* @__PURE__ */ jsxs22(
2097
- "div",
2098
- {
2099
- "data-testid": "company-take",
2100
- className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6",
2101
- children: [
2102
- /* @__PURE__ */ jsx35("p", { className: "text-lg font-bold text-white sm:text-xl", children: "The Real Dill \u2618\uFE0F" }),
2103
- /* @__PURE__ */ jsx35("div", { className: "mt-2 flex items-center justify-start", children: /* @__PURE__ */ jsx35("p", { className: "text-sm font-normal text-grey-10", children: content }) }),
2104
- /* @__PURE__ */ jsxs22("div", { className: "mt-8 flex w-full items-center gap-3", children: [
2105
- /* @__PURE__ */ jsx35(Avatar, { name: "Jon Lee", src: avatarSrc }),
2106
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-col flex-wrap items-start", children: [
2107
- /* @__PURE__ */ jsx35("p", { className: "text-sm font-bold text-white", children: "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA" }),
2108
- /* @__PURE__ */ jsx35("p", { className: "text-xs font-normal text-grey-30", children: "Pickle co-founder" })
2109
- ] })
2110
- ] })
2111
- ]
2112
- }
2113
- );
2114
- }
2115
-
2116
- // src/components/jobPost/JobDescription.tsx
2117
- import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
2118
- function JobDescription({ description }) {
2119
- if (!description) return null;
2120
- return /* @__PURE__ */ jsxs23("div", { className: "flex w-full flex-col gap-2", children: [
2121
- /* @__PURE__ */ jsx36("h3", { className: "text-xl font-bold", children: "Job Description" }),
2122
- /* @__PURE__ */ jsx36(ReadMore, { text: description })
2123
- ] });
2124
- }
2125
-
2126
- // src/components/jobPost/JobHeader.tsx
2127
- import { Dot as Dot2 } from "lucide-react";
2128
- import Image2 from "next/image";
2129
-
2130
- // src/components/buttons/BackButton.tsx
2131
- import { X as X4 } from "lucide-react";
2132
- import { useRouter } from "next/navigation";
2133
-
2134
- // src/hooks/useWindowHistory.ts
2135
- import { useContext as useContext2 } from "react";
2136
-
2137
- // src/contexts/WindowHistoryProvider.tsx
2138
- import { useSearchParams } from "next/navigation";
2139
- import { createContext, useEffect as useEffect7, useMemo, useState as useState7 } from "react";
2140
- import { jsx as jsx37 } from "react/jsx-runtime";
2141
- var WindowHistoryContext = createContext({});
2142
- function WindowHistoryProvider({ children }) {
2143
- const [history, setHistory] = useState7([]);
2144
- const searchParams = useSearchParams();
2055
+ const safeId = encodeURIComponent(cookieId);
2056
+ const [isVisible, setIsVisible] = useState7(false);
2145
2057
  useEffect7(() => {
2146
- setHistory(
2147
- (prev) => prev.at(-1) === window.location.href ? prev : [...prev, window.location.href]
2148
- );
2149
- }, [searchParams]);
2150
- const contextValue = useMemo(() => ({ history }), [history]);
2151
- return /* @__PURE__ */ jsx37(WindowHistoryContext.Provider, { value: contextValue, children });
2152
- }
2153
-
2154
- // src/hooks/useWindowHistory.ts
2155
- function useWindowHistory() {
2156
- const windowHistoryContext = useContext2(WindowHistoryContext);
2157
- return windowHistoryContext;
2158
- }
2159
-
2160
- // src/components/buttons/BackButton.tsx
2161
- import { jsx as jsx38 } from "react/jsx-runtime";
2162
- function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
2163
- const { history } = useWindowHistory();
2164
- const router = useRouter();
2165
- const isAcceptedRoute = (r) => !!acceptedRoutes?.find((route) => new RegExp("^" + route + "$", "i").test(new URL(r).pathname));
2166
- const goBack = () => {
2167
- const previous = history[history.length - 2];
2168
- if (history.length > 1 && isAcceptedRoute(previous)) {
2169
- router.back();
2170
- } else {
2171
- router.push(fallbackHref ?? "/");
2058
+ const cookies = document.cookie.split(";");
2059
+ const isDismissed = cookies.some((cookie) => cookie.trim().startsWith(`${safeId}=true`));
2060
+ if (!isDismissed) {
2061
+ setIsVisible(true);
2172
2062
  }
2063
+ }, [safeId]);
2064
+ const handleDismiss = () => {
2065
+ document.cookie = `${safeId}=true;path=/`;
2066
+ setIsVisible(false);
2173
2067
  };
2174
- return /* @__PURE__ */ jsx38(
2175
- Icon,
2068
+ if (!isVisible) return null;
2069
+ return /* @__PURE__ */ jsxs20(
2070
+ "nav",
2176
2071
  {
2177
- "aria-label": "back button",
2178
- variant: "transparent",
2179
- size: "small",
2180
- onClick: goBack,
2181
- className,
2182
- ...props,
2183
- children: /* @__PURE__ */ jsx38(X4, {})
2072
+ className: cn(
2073
+ "align-center flex w-full items-center justify-between gap-2 bg-blue-100 px-4 py-3",
2074
+ className
2075
+ ),
2076
+ children: [
2077
+ /* @__PURE__ */ jsx33("div", { className: cn("w-full text-center text-sm text-green-100", textClassNames), children }),
2078
+ /* @__PURE__ */ jsx33(
2079
+ "button",
2080
+ {
2081
+ className: cn("text-green-100", buttonClassNames),
2082
+ "aria-label": "Close banner",
2083
+ onClick: handleDismiss,
2084
+ children: /* @__PURE__ */ jsx33(X4, { size: 28 })
2085
+ }
2086
+ )
2087
+ ]
2184
2088
  }
2185
2089
  );
2186
2090
  }
2187
2091
 
2188
- // src/lib/icons.ts
2189
- import {
2190
- Banknote,
2191
- Bell,
2192
- BriefcaseBusiness,
2193
- Building,
2194
- Building2,
2195
- CircleUser,
2196
- CircleUserRound,
2197
- Clock2,
2198
- Contact,
2199
- GalleryVerticalEnd,
2200
- Home,
2201
- KeyRound,
2202
- Layers,
2203
- LifeBuoy,
2204
- MapPin,
2205
- MessageSquareDot,
2206
- Settings,
2207
- SquareKanban,
2208
- Users,
2209
- Wallet
2210
- } from "lucide-react";
2211
- var iconMap = {
2212
- house: Home,
2213
- layers: Layers,
2214
- users: Users,
2215
- settings: Settings,
2216
- building: Building,
2217
- bell: Bell,
2218
- wallet: Wallet,
2219
- contact: Contact,
2220
- banknote: Banknote,
2221
- "message-square-dot": MessageSquareDot,
2222
- "life-buoy": LifeBuoy,
2223
- "building-2": Building2,
2224
- "gallery-vertical-end": GalleryVerticalEnd,
2225
- "square-kanban": SquareKanban,
2226
- "briefcase-business": BriefcaseBusiness,
2227
- "circle-user": CircleUser,
2228
- "key-round": KeyRound,
2229
- "clock-2": Clock2,
2230
- "circle-user-round": CircleUserRound,
2231
- "map-pin": MapPin
2232
- };
2092
+ // src/types/latest/company_service_latest.ts
2093
+ import { z as z2 } from "zod";
2233
2094
 
2234
- // src/components/jobPost/JobHeader.tsx
2235
- import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
2236
- function JobHeader({
2237
- title,
2238
- subtitles,
2239
- standalone,
2240
- bannerSrc,
2241
- avatarSrc,
2242
- avatarName,
2243
- avatarHref,
2244
- backFallbackHref,
2245
- backAcceptedRoutes,
2246
- actions,
2247
- tags
2248
- }) {
2249
- const renderIcon = (icon) => {
2250
- const Icon2 = iconMap[icon];
2251
- return /* @__PURE__ */ jsx39(Icon2, { size: 18 });
2252
- };
2253
- return /* @__PURE__ */ jsxs24(
2254
- "div",
2255
- {
2256
- "data-testid": "job-header-root",
2257
- className: cn(
2258
- "-mt-8 flex w-full flex-col items-center justify-between gap-6 md:-mt-0",
2259
- !standalone && "rounded-3xl"
2260
- ),
2261
- children: [
2262
- !standalone && /* @__PURE__ */ jsxs24("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: [
2263
- /* @__PURE__ */ jsx39(
2264
- Image2,
2265
- {
2266
- className: "h-full w-full rounded-t-3xl object-cover",
2267
- src: bannerSrc,
2268
- alt: "job banner",
2269
- fill: true
2270
- }
2271
- ),
2272
- /* @__PURE__ */ jsx39(
2273
- BackButton,
2274
- {
2275
- acceptedRoutes: backAcceptedRoutes,
2276
- fallbackHref: backFallbackHref,
2277
- className: "absolute right-2 top-2 flex items-center justify-center text-white sm:hidden",
2278
- "data-testid": "job-header-back-button"
2279
- }
2280
- ),
2281
- /* @__PURE__ */ jsx39(
2282
- "div",
2283
- {
2284
- className: "absolute left-4 top-8 md:left-6 md:top-16 lg:top-24",
2285
- "data-testid": "job-header-avatar",
2286
- children: /* @__PURE__ */ jsx39(
2287
- Avatar,
2288
- {
2289
- size: "large",
2290
- target: "_blank",
2291
- href: avatarHref,
2292
- name: avatarName,
2293
- src: avatarSrc,
2294
- rel: "noopener noreferrer"
2295
- }
2296
- )
2297
- }
2298
- )
2299
- ] }),
2300
- /* @__PURE__ */ jsxs24("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6", children: [
2301
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col md:flex-row", children: [
2302
- standalone && /* @__PURE__ */ jsx39("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar", children: /* @__PURE__ */ jsx39(
2303
- Avatar,
2304
- {
2305
- size: "large",
2306
- target: "_blank",
2307
- href: avatarHref,
2308
- name: avatarName,
2309
- src: avatarSrc,
2310
- rel: "noopener noreferrer"
2311
- }
2312
- ) }),
2313
- /* @__PURE__ */ jsx39("div", { className: "prose mt-4 flex w-full items-center text-grey-80 lg:prose-lg", children: subtitles?.map((subtitle, i) => /* @__PURE__ */ jsxs24(
2314
- "div",
2315
- {
2316
- "data-testid": `job-header-subtitle-${i}`,
2317
- className: "flex items-center",
2318
- children: [
2319
- subtitle,
2320
- i < subtitles.length - 1 && /* @__PURE__ */ jsx39(Dot2, { className: "mx-1 shrink-0", size: 10 })
2321
- ]
2322
- },
2323
- subtitle
2324
- )) })
2325
- ] }),
2326
- /* @__PURE__ */ jsxs24(
2327
- "div",
2328
- {
2329
- "data-testid": "job-header-content",
2330
- className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1",
2331
- children: [
2332
- /* @__PURE__ */ jsx39(
2333
- "h2",
2334
- {
2335
- "data-testid": "job-header-title",
2336
- className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg",
2337
- children: title
2338
- }
2339
- ),
2340
- !!actions && /* @__PURE__ */ jsx39(
2341
- "div",
2342
- {
2343
- className: "flex w-full justify-end gap-2 md:w-auto",
2344
- "data-testid": "job-header-actions",
2345
- children: actions
2346
- }
2347
- )
2348
- ]
2349
- }
2350
- ),
2351
- /* @__PURE__ */ jsx39(
2352
- "div",
2353
- {
2354
- "data-testid": "job-header-tags",
2355
- className: "flex flex-row flex-wrap items-center justify-start gap-2",
2356
- children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ jsxs24(
2357
- Chip_default,
2358
- {
2359
- size: "small",
2360
- variant: "neutral",
2361
- "aria-label": name,
2362
- "data-testid": `job-header-tag-${name}`,
2363
- children: [
2364
- renderIcon(icon),
2365
- /* @__PURE__ */ jsx39("span", { children: label })
2366
- ]
2367
- },
2368
- name
2369
- ))
2370
- }
2371
- )
2372
- ] })
2373
- ]
2374
- }
2375
- );
2376
- }
2377
-
2378
- // src/components/jobPost/JobPost.tsx
2379
- import * as DateFns from "date-fns";
2095
+ // src/types/latest/shared_pickle_output_latest.ts
2096
+ var shared_pickle_output_latest_exports = {};
2097
+ __export(shared_pickle_output_latest_exports, {
2098
+ CurrencyEnum: () => CurrencyEnum,
2099
+ DetailLevelEnum: () => DetailLevelEnum,
2100
+ TypeEnum: () => TypeEnum,
2101
+ UnitTextEnum: () => UnitTextEnum,
2102
+ imageAssetSchema: () => imageAssetSchema,
2103
+ imageSchema: () => imageSchema,
2104
+ monetaryAmountSchema: () => monetaryAmountSchema,
2105
+ placeSchema: () => placeSchema,
2106
+ postalAddressSchema: () => postalAddressSchema,
2107
+ quantitativeValueSchema: () => quantitativeValueSchema
2108
+ });
2109
+ import { z } from "zod";
2110
+ var TypeEnum = z.enum(["IMAGE"]);
2111
+ var DetailLevelEnum = z.enum(["COUNTRY", "GEO", "LOCALITY", "POSTAL_CODE", "REGION"]);
2112
+ var UnitTextEnum = z.enum(["DAY", "HOUR", "MONTH", "PER_ACTIVITY", "WEEK", "YEAR"]);
2113
+ var CurrencyEnum = z.enum(["EUR", "GBP", "USD"]);
2114
+ var postalAddressSchema = z.object({
2115
+ version: z.literal("1.0.0").default("1.0.0"),
2116
+ type: z.string().describe("Document type used for schema"),
2117
+ addressCountry: z.string().describe("The physical country as defined in ISO 3166 Alpha-2"),
2118
+ addressRegion: z.optional(z.string()).describe("The region in which the locality is, and which is in the country."),
2119
+ 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."),
2120
+ streetAddress: z.optional(z.string()).describe("The street name of the address within the locality."),
2121
+ streetNumber: z.optional(z.string()).describe("The house of building number within the street."),
2122
+ postalCode: z.optional(z.string()).describe("The postal code"),
2123
+ description: z.optional(z.string()).describe("A descriptive string containing the full address.")
2124
+ });
2125
+ var placeSchema = z.object({
2126
+ version: z.literal("1.0.0").default("1.0.0"),
2127
+ detailLevel: z.optional(DetailLevelEnum),
2128
+ latitude: z.optional(z.number()).describe("The latitude of a location."),
2129
+ longitude: z.optional(z.number()).describe("The longitude of a location."),
2130
+ address: z.optional(postalAddressSchema).describe("The physical place of the location")
2131
+ });
2132
+ var quantitativeValueSchema = z.object({
2133
+ version: z.literal("1.0.0").default("1.0.0"),
2134
+ type: z.string().describe("Document type used for schema"),
2135
+ 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."),
2136
+ minValue: z.optional(z.number()).describe("The single minium value in a range for a quantitative_value, requires a maximum value."),
2137
+ maxValue: z.optional(z.number()).describe("The maximum value in a range for a quantitative_value, requires a minimum value."),
2138
+ unitText: UnitTextEnum
2139
+ });
2140
+ var monetaryAmountSchema = z.object({
2141
+ version: z.literal("1.0.0").default("1.0.0"),
2142
+ type: z.string().describe("Document type used for schema"),
2143
+ 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."),
2144
+ minValue: z.optional(z.number()).describe("The annualized single minium value in a range for a quantitative_value. Deprecated use value.minValue"),
2145
+ maxValue: z.optional(z.number()).describe("The annualized maximum value in a range for a quantitative_value. Deprecated use value.maxValue"),
2146
+ value: z.optional(quantitativeValueSchema).describe("The quantitative_value for a given salary"),
2147
+ currency: z.optional(CurrencyEnum)
2148
+ });
2149
+ var imageAssetSchema = z.object({
2150
+ version: z.literal("1.0.0").default("1.0.0"),
2151
+ altText: z.optional(z.string()).describe("The alt text for the image"),
2152
+ assetId: z.optional(z.string()).describe("The asset ID for the image"),
2153
+ description: z.optional(z.string()).describe("The description for the image"),
2154
+ extension: z.optional(z.string()).describe("The extension for the image"),
2155
+ label: z.optional(z.string()).describe("The label for the image"),
2156
+ mimeType: z.optional(z.string()).describe("The mime type for the image"),
2157
+ originalFilename: z.optional(z.string()).describe("The original filename for the image"),
2158
+ path: z.optional(z.string()).describe("The path for the image"),
2159
+ sha1Hash: z.optional(z.string()).describe("The SHA1 hash for the image"),
2160
+ size: z.optional(z.number()).describe("The size for the image"),
2161
+ title: z.optional(z.string()).describe("The title for the image"),
2162
+ uploadId: z.optional(z.string()).describe("The upload ID for the image"),
2163
+ url: z.optional(z.string()).describe("The URL for the image")
2164
+ });
2165
+ var imageSchema = z.object({
2166
+ version: z.literal("1.0.0").default("1.0.0"),
2167
+ type: z.string().describe("Document type used for schema"),
2168
+ asset: z.optional(imageAssetSchema).describe("The asset for the image")
2169
+ });
2380
2170
 
2381
- // src/hooks/useDisplayText.ts
2382
- import { useEffect as useEffect8, useMemo as useMemo2, useState as useState8 } from "react";
2171
+ // src/types/latest/company_service_latest.ts
2172
+ var TypeEnum2 = z2.enum(["OFFICE"]);
2173
+ var CategoryEnum = z2.enum(["FINANCIAL", "HEALTH", "PROFESSIONAL_DEVELOPMENT", "WORK_LIFE_BALANCE"]);
2174
+ var TitleEnum = z2.enum(["DMD", "JD", "MBA", "MD", "MHA", "MPH", "PT", "PH_D", "RN"]);
2175
+ var PublishStatusEnum = z2.enum(["DRAFT", "IN_REVIEW", "PUBLISHED", "REMOVED"]);
2176
+ var OfficeTypeEnum = z2.enum(["BRANCH", "HEADQUARTERS", "SATELLITE"]);
2177
+ var socialMediaSchema = z2.object({
2178
+ version: z2.literal("1.0.0").default("1.0.0"),
2179
+ url: z2.string().describe("The link to the social media platform"),
2180
+ type: z2.string().describe("The type of social media link")
2181
+ });
2182
+ var companyBenefitsSchema = z2.object({
2183
+ version: z2.literal("1.0.0").default("1.0.0"),
2184
+ type: z2.string().describe("Document type used for schema"),
2185
+ title: z2.string(),
2186
+ description: z2.optional(z2.string()),
2187
+ category: CategoryEnum
2188
+ });
2189
+ var industrySchema = z2.lazy(() => z2.object({
2190
+ version: z2.literal("1.0.0").default("1.0.0"),
2191
+ type: z2.string().describe("Document type used for schema"),
2192
+ name: z2.string(),
2193
+ description: z2.optional(z2.string()).describe("A brief description of the industry"),
2194
+ onetIndustryId: z2.optional(z2.string()).describe("ONET industry ID"),
2195
+ parent: z2.optional(industrySchema)
2196
+ }));
2197
+ var jobBoardSchema = z2.object({
2198
+ version: z2.literal("1.0.0").default("1.0.0"),
2199
+ type: z2.string().describe("Document type used for schema"),
2200
+ name: z2.string().describe("The name of the job board"),
2201
+ description: z2.string().describe("A brief description of the job board"),
2202
+ logo: z2.optional(imageSchema).describe("The logo of the job board"),
2203
+ baseUrl: z2.optional(z2.string()).describe("The base URL of the job board")
2204
+ });
2205
+ var personSchema = z2.object({
2206
+ version: z2.literal("1.0.0").default("1.0.0"),
2207
+ type: z2.string().describe("Document type used for schema"),
2208
+ firstName: z2.string().describe("The first name of the person"),
2209
+ lastName: z2.string().describe("The last name of the person"),
2210
+ title: z2.optional(z2.array(z2.string())).describe("The titles of the degree of the person"),
2211
+ slug: z2.string().describe("person slug - should be familyname-givenname-title(s)"),
2212
+ jobTitle: z2.optional(z2.string()).describe("The job title of the person"),
2213
+ isDoctor: z2.optional(z2.boolean()).describe("Is the person a doctor"),
2214
+ isMedical: z2.optional(z2.boolean()).describe("Are they of a medical background?"),
2215
+ isScientist: z2.optional(z2.boolean()).describe("Are they a scientist?"),
2216
+ image: z2.optional(imageSchema).describe("The image of the person"),
2217
+ email: z2.optional(z2.string()).describe("The email of the person"),
2218
+ socialMedia: z2.optional(z2.array(socialMediaSchema)).describe("The social media links of the person"),
2219
+ telephone: z2.optional(z2.string()).describe("The telephone number of the person"),
2220
+ url: z2.optional(z2.string()).describe("The URL of the person"),
2221
+ address: z2.optional(placeSchema).describe("The address of the person")
2222
+ });
2223
+ var companyCareersSchema = z2.object({
2224
+ version: z2.literal("1.0.0").default("1.0.0"),
2225
+ type: z2.string().describe("Document type used for schema"),
2226
+ careersUrl: z2.string().describe("The URL of the company careers page"),
2227
+ jobBoard: z2.optional(jobBoardSchema),
2228
+ jobBoardSlug: z2.optional(z2.array(z2.string())),
2229
+ companyBenefits: z2.optional(z2.array(companyBenefitsSchema)).describe("What are the specific benefits of that company. The benefit is generic.")
2230
+ });
2231
+ var companyPhilosophySchema = z2.object({
2232
+ version: z2.literal("1.0.0").default("1.0.0"),
2233
+ type: z2.string().describe("Document type used for schema"),
2234
+ companyMission: z2.optional(z2.string()).describe("The mission statement of the company."),
2235
+ companyHow: z2.optional(z2.string()).describe("How does the company achieve its mission"),
2236
+ companyCulture: z2.optional(z2.array(z2.string())).describe("What are some of the culture aspects of this company?")
2237
+ });
2238
+ var companyNdgSchema = z2.object({
2239
+ version: z2.literal("1.0.0").default("1.0.0"),
2240
+ type: z2.string().describe("Document type used for schema"),
2241
+ companyWow: z2.optional(z2.string()).describe("What is the wow of this company?"),
2242
+ companyNdgTake: z2.optional(z2.string()).describe("What is the NDG POV on this company?"),
2243
+ companyBestFit: z2.optional(z2.array(z2.string())),
2244
+ companyInterests: z2.optional(z2.array(z2.string()))
2245
+ });
2246
+ var foundingInformationSchema = z2.object({
2247
+ version: z2.literal("1.0.0").default("1.0.0"),
2248
+ type: z2.string().describe("Document type used for schema"),
2249
+ foundedDate: z2.optional(z2.string()),
2250
+ foundedCountry: z2.optional(z2.string()),
2251
+ foundedCity: z2.optional(z2.string()),
2252
+ founders: z2.optional(z2.array(personSchema))
2253
+ });
2254
+ var ngdMetadataSchema = z2.object({
2255
+ version: z2.literal("1.0.0").default("1.0.0"),
2256
+ type: z2.string().describe("Document type used for schema"),
2257
+ lastScraped: z2.optional(z2.string()).describe("Date the last entity was scraped, if applicable"),
2258
+ scraperVersion: z2.optional(z2.string()),
2259
+ postProcessorVersion: z2.optional(z2.string()),
2260
+ uniqueRunId: z2.optional(z2.string()),
2261
+ postProcessorUniqueRunId: z2.optional(z2.string()),
2262
+ isScrapeManaged: z2.optional(z2.boolean()).default(true)
2263
+ });
2264
+ var companySchema = z2.object({
2265
+ version: z2.literal("1.0.0").default("1.0.0"),
2266
+ id: z2.string().describe("The NDG specific id for a company. Cannot be changed."),
2267
+ createdAt: z2.string().datetime().describe("Time document was created. Autoset by Sanity"),
2268
+ updatedAt: z2.string().datetime().describe("Time document was created. Autoset by Sanity"),
2269
+ companyName: z2.string().describe("The name of the company"),
2270
+ slug: z2.string().describe("The NDG specific slug for a company."),
2271
+ type: z2.string().describe("Document type used for schema"),
2272
+ logo: z2.optional(imageSchema).describe("The logo of the company"),
2273
+ companyWebsite: z2.optional(z2.string()).describe("The website of the company"),
2274
+ socialMedia: z2.optional(z2.array(socialMediaSchema)).describe("The social media links of the company"),
2275
+ brandColor: z2.optional(z2.string()).describe("The brand color of the company"),
2276
+ companyCareers: z2.optional(companyCareersSchema).describe("Career Specific Information for the company."),
2277
+ companyPhilosophy: z2.optional(companyPhilosophySchema).describe("Company mission,values and how the company achieves its mission."),
2278
+ companyNdg: z2.optional(companyNdgSchema).describe("Next Degree specific information for the company."),
2279
+ foundingInfo: z2.optional(foundingInformationSchema),
2280
+ headquartersLocation: z2.optional(placeSchema),
2281
+ employeeEstimate: z2.optional(z2.string()),
2282
+ publishStatus: z2.optional(z2.string()),
2283
+ ngdMetadata: z2.optional(ngdMetadataSchema)
2284
+ });
2285
+ var officeSchema = z2.object({
2286
+ version: z2.literal("1.0.0").default("1.0.0"),
2287
+ type: z2.string().describe("Document type used for schema"),
2288
+ name: z2.string().describe("Name or nickname for the office (e.g., 'NYC HQ', 'West Coast Branch')"),
2289
+ officeType: OfficeTypeEnum,
2290
+ companyId: z2.optional(companySchema),
2291
+ geoLocation: z2.optional(placeSchema).describe("Geographical location details: coordinates + postal address"),
2292
+ createdAt: z2.optional(z2.string()),
2293
+ updatedAt: z2.optional(z2.string())
2294
+ });
2383
2295
 
2384
- // src/lib/mappings.ts
2385
- var employmentTypeDisplayText = {
2386
- FULL_TIME: {
2387
- en: "Full Time"
2388
- },
2389
- INTERNSHIP: {
2390
- en: "Internship"
2391
- },
2392
- OTHER: {
2393
- en: "Other"
2394
- },
2395
- PART_TIME: {
2396
- en: "Part Time"
2397
- },
2398
- PER_DIEM: {
2399
- en: "Per-Diem"
2400
- },
2401
- TEMPORARY: {
2402
- en: "Temporary"
2403
- },
2404
- CONTRACT: {
2405
- en: "Contract"
2406
- }
2407
- };
2408
- var unitTextDisplayText = {
2409
- DAY: {
2410
- en: "Day"
2411
- },
2412
- HOUR: {
2413
- en: "Hour"
2414
- },
2415
- MONTH: {
2416
- en: "Month"
2417
- },
2418
- PER_ACTIVITY: {
2419
- en: "Per Activity"
2420
- },
2421
- WEEK: {
2422
- en: "Week"
2423
- },
2424
- YEAR: {
2425
- en: "Year"
2426
- }
2427
- };
2428
- var currencyDisplayText = {
2429
- EUR: {
2430
- en: "\u20AC"
2431
- },
2432
- GBP: {
2433
- en: "\xA3"
2434
- },
2435
- USD: {
2436
- en: "$"
2437
- }
2438
- };
2439
- var employmentLevelDisplayText = {
2440
- DIRECTOR: {
2441
- en: "Director"
2442
- },
2443
- ENTRY_LEVEL: {
2444
- en: "Entry Level"
2445
- },
2446
- EXECUTIVE: {
2447
- en: "Executive"
2448
- },
2449
- EXPERIENCED: {
2450
- en: "Experienced"
2451
- },
2452
- INTERN: {
2453
- en: "Intern"
2454
- },
2455
- MANAGER: {
2456
- en: "Manager"
2457
- }
2458
- };
2459
- var jobFunctionDisplayText = {
2460
- CLINICAL_RESEARCH: {
2461
- en: "Clinical Research"
2462
- },
2463
- CUSTOMER_SUCCESS: {
2464
- en: "Customer Success"
2465
- },
2466
- DATA_ANALYTICS: {
2467
- en: "Data Analytics"
2468
- },
2469
- FINANCE_AND_AUDIT: {
2470
- en: "Finance and Audit"
2471
- },
2472
- MARKETING: {
2473
- en: "Marketing"
2474
- },
2475
- OPERATIONS: {
2476
- en: "Operations"
2477
- },
2478
- PEOPLE_HUMAN_RESOURCES: {
2479
- en: "People Human Resources"
2480
- },
2481
- PRODUCT_AND_TECH: {
2482
- en: "Product and Tech"
2483
- },
2484
- QUALITY_ASSURANCE_AND_OUTCOMES: {
2485
- en: "Quality Assurance and Outcomes"
2486
- },
2487
- SALES_AND_BUSINESS_DEVELOPMENT: {
2488
- en: "Sales and Business Development"
2489
- },
2490
- STRATEGY_AND_CONSULTING: {
2491
- en: "Strategy and Consulting"
2296
+ // src/types/latest/job_posting_service_latest.ts
2297
+ import { z as z3 } from "zod";
2298
+ var TypeEnum3 = z3.enum(["JOB_POST"]);
2299
+ var JobLocationTypeEnum = z3.enum(["FLOAT", "HYBRID", "ONSITE", "REMOTE"]);
2300
+ var EmploymentTypeEnum = z3.enum(["CONTRACT", "FULL_TIME", "INTERNSHIP", "OTHER", "PART_TIME", "PER_DIEM", "TEMPORARY"]);
2301
+ var EmploymentLevelEnum = z3.enum(["DIRECTOR", "ENTRY_LEVEL", "EXECUTIVE", "EXPERIENCED", "INTERN", "MANAGER"]);
2302
+ var JobFunctionEnum = z3.enum(["CLINICAL_RESEARCH", "CUSTOMER_SUCCESS", "DATA_ANALYTICS", "FINANCE_AND_AUDIT", "MARKETING", "OPERATIONS", "PEOPLE_HUMAN_RESOURCES", "PRODUCT_AND_TECH", "QUALITY_ASSURANCE_AND_OUTCOMES", "SALES_AND_BUSINESS_DEVELOPMENT", "STRATEGY_AND_CONSULTING"]);
2303
+ var PublishStatusEnum2 = z3.enum(["DRAFT", "IN_REVIEW", "PUBLISHED", "REMOVED"]);
2304
+ var BestFitEnum = z3.enum(["DENTIST", "DIETICIAN", "DOULA", "MEDICAL_ASSISTANT", "MIDWIFE", "NURSE", "OCCUPATIONAL_THERAPIST", "PHARMACIST", "PHYSICAL_THERAPIST", "PHYSICIAN", "PHYSICIAN_ASSISTANT", "PSYCHOLOGIST", "RADIOLOGIST", "SOCIAL_WORKER", "SPEECH_LANGUAGE_PATHOLOGIST", "SURGEON"]);
2305
+ var ClinicalLicenseEnum = z3.enum(["CNA", "CNM", "CNS", "COTA", "CRNA", "LPN", "LVN", "NP", "OT", "PT", "PTA", "RN"]);
2306
+ var ShiftEnum = z3.enum(["DAY", "EIGHT_HOUR", "EVENING", "FLEXIBLE", "MID_SHIFT", "MONDAY_TO_FRIDAY", "NIGHT", "ON_CALL", "TEN_HOUR", "TWELVE_HOUR", "WEEKENDS"]);
2307
+ var ClinicalSettingEnum = z3.enum(["ACUTE_CARE", "AMBULATORY_SURGERY_CENTER", "CLINIC", "HOME_HEALTH", "HOSPITAL", "INPATIENT", "LONG_TERM_CARE", "MED_SPA", "NURSING_HOME", "OFFICE", "OUTPATIENT", "PRIVATE_PRACTICE", "REHAB_CENTER", "SCHOOL", "SKILLED_NURSING_FACILITY"]);
2308
+ var ClinicalSpecialtyEnum = z3.enum(["ANESTHESIOLOGY", "CARDIOLOGY", "CASE_MANAGEMENT", "CHRONIC_PAIN", "CLINICAL_ELECTROPHYSIOLOGY", "CRITICAL_AND_ACUTE_CARE", "DERMATOLOGY", "DIALYSIS", "EMERGENCY_MEDICINE", "ENDOCRINOLOGY", "ERGONOMICS", "FEEDING_EATING_AND_SWALLOWING", "GASTROENTEROLOGY", "GERIATRICS", "HAND_THERAPY", "HEMATOLOGY", "HOLISTIC_MEDICINE", "INFORMATICS", "INTERNAL_MEDICINE", "LABOR_AND_DELIVERY", "MANUAL_THERAPY", "MED_SURG", "MENTAL_HEALTH", "NEPHROLOGY", "NEUROLOGY", "ONCOLOGY", "ORTHOPEDICS", "OTOLARYNGOLOGY", "PEDIATRICS", "PHYSICAL_AND_REHABILITATION_MEDICINE", "PLASTIC_SURGERY", "PRIMARY_CARE", "PSYCHIATRY", "PULMONOLOGY", "RADIOLOGY", "SENSORY", "SPORTS", "SURGERY", "TRAUMA_MEDICINE", "URGENT_CARE", "UROLOGY", "VISION", "WOMENS_HEALTH", "WOUND_AND_BURN_CARE"]);
2309
+ var jobPostSchema = z3.object({
2310
+ version: z3.literal("1.0.0").default("1.0.0"),
2311
+ id: z3.string().describe("The NDG specific id for a job posting in form of ndg-<company_slug>-<unique-job-id>. Serves as unique identifier. Cannot be changed."),
2312
+ type: z3.string().describe("Document type used for schema"),
2313
+ createdAt: z3.string().datetime().describe("Time document was created. Autoset by Sanity"),
2314
+ updatedAt: z3.string().datetime().describe("Time document was created. Autoset by Sanity"),
2315
+ dateAdded: z3.optional(z3.string().datetime()).describe("The date the job was added to the platform"),
2316
+ datePosted: z3.optional(z3.string().datetime()).describe("The date the job was published for public viewing"),
2317
+ dateRemoved: z3.optional(z3.string().datetime()).describe("The date the job was removed from public viewing"),
2318
+ validThrough: z3.optional(z3.string().datetime()).describe("The date the job posting is valid through. After this date it will be removed from public viewing"),
2319
+ vacancyCount: z3.optional(z3.number().int()).describe("The number of vacancies for a given job posting"),
2320
+ clientId: z3.string().describe("The ID assigned by the client to a job - normally the same as the GH / Lever / Ashby ID or internal ID"),
2321
+ url: z3.string().describe("The URL of the job to be displayed for users to apply with. Direct job link."),
2322
+ title: z3.string().describe("The title of the job post"),
2323
+ description: z3.string().describe("The description of the job post saved as markdown. Used for rendering the job description."),
2324
+ richTextDescription: z3.optional(z3.string()).describe("The description of the job post saved as rich text"),
2325
+ isClinical: z3.boolean().default(false).describe("Denotes if a job posting is clinical in nature or not. A role is clinical if it requires direct clinical patient care."),
2326
+ isRemote: z3.boolean().default(false).describe("Denotes if a job posting is remote in nature. For a posting to be 'remote' it must be 100% remote (e.g hybrid roles would denote this to false)."),
2327
+ isVerified: z3.boolean().default(false).describe("Denotes if a job posting has been manually verified - and thus ALL fields can be considered accurate. Can be used for DS training."),
2328
+ isDirectApply: z3.boolean().default(false).describe("Denotes if a job posting url is direct apply. To be direct apply a user must be able to apply to the role without logging in and under 2 clicks."),
2329
+ jobLocationType: z3.optional(z3.array(JobLocationTypeEnum)),
2330
+ employmentType: z3.optional(z3.array(EmploymentTypeEnum)),
2331
+ employmentLevel: z3.optional(EmploymentLevelEnum),
2332
+ jobFunction: z3.optional(JobFunctionEnum),
2333
+ publishStatus: PublishStatusEnum2,
2334
+ bestFit: z3.optional(z3.array(BestFitEnum)),
2335
+ clinicalLicense: z3.optional(z3.array(ClinicalLicenseEnum)),
2336
+ shift: z3.optional(z3.array(ShiftEnum)),
2337
+ clinicalSetting: z3.optional(z3.array(ClinicalSettingEnum)),
2338
+ clinicalSpecialty: z3.optional(z3.array(ClinicalSpecialtyEnum)),
2339
+ estimatedSalary: z3.optional(monetaryAmountSchema).describe("Determines the estimated salary for a given job posting"),
2340
+ jobLocation: z3.optional(postalAddressSchema).describe("Determines the primary physical location where the job is to be performed. For remote roles, use applicantLocationRequirements"),
2341
+ applicableOffices: z3.optional(z3.array(officeSchema)).describe("The physical location(s) in which employees may be located for to be eligible for the job. Used in conjunction with job_location_type."),
2342
+ applicantLocationRequirements: z3.optional(z3.array(placeSchema)).describe("The geographic location(s) in which employees may be located for to be eligible for the job. The job description must clearly state that the applicant may be located in certain geographical location(s). This property is required if applicants may be located in one or more geographic locations and the job is 100% remote."),
2343
+ hiringOrganization: z3.optional(companySchema).describe("The organization that is hiring for the role")
2344
+ });
2345
+
2346
+ // src/types/latest/custom/company_service_sanity.ts
2347
+ import { z as z5 } from "zod";
2348
+
2349
+ // src/types/latest/custom/custom_sanity_models.ts
2350
+ import { z as z4 } from "zod";
2351
+ var sanityReferenceSchema = z4.object({
2352
+ _ref: z4.string(),
2353
+ _type: z4.string(),
2354
+ _key: z4.optional(z4.string())
2355
+ });
2356
+ var sanitySlugSchema = z4.object({
2357
+ current: z4.string(),
2358
+ _type: z4.string(),
2359
+ _key: z4.optional(z4.string())
2360
+ });
2361
+
2362
+ // src/types/latest/custom/company_service_sanity.ts
2363
+ var foundingInformationSchema2 = foundingInformationSchema.extend({
2364
+ _type: z5.string().describe("Document type used within sanity").default("companyFounding"),
2365
+ founders: z5.optional(z5.union([z5.array(personSchema), z5.array(sanityReferenceSchema)])).nullable(),
2366
+ founderList: z5.optional(z5.union([z5.array(personSchema), z5.array(sanityReferenceSchema)])).nullable()
2367
+ }).omit({ type: true }).strict().transform((data) => ({
2368
+ ...data,
2369
+ type: data._type,
2370
+ founders: data.founders || data.founderList || void 0
2371
+ })).transform(({ _type, founderList, ...rest }) => rest);
2372
+ var companyNdgSchema2 = companyNdgSchema.extend({
2373
+ _type: z5.string().describe("Document type used within sanity").default("companyNDG"),
2374
+ companyNDGTake: z5.string().nullable().describe("What is the NDG POV on this company?")
2375
+ }).omit({ type: true }).strict().transform((data) => ({
2376
+ ...data,
2377
+ type: data._type,
2378
+ companyNdgTake: data.companyNDGTake
2379
+ })).transform(({ _type, companyNDGTake, ...rest }) => rest);
2380
+ var ngdMetadataSchema2 = ngdMetadataSchema.extend({
2381
+ _type: z5.string().describe("Document type used within sanity").default("ndgMetadata")
2382
+ }).omit({ type: true }).transform((data) => ({
2383
+ ...data,
2384
+ type: data._type
2385
+ })).transform(({ _type, ...rest }) => rest);
2386
+ var companyPhilosophySchema2 = companyPhilosophySchema.extend({
2387
+ _type: z5.string().describe("Document type used within sanity").default("companyPhilosophy")
2388
+ }).omit({ type: true }).strict().transform((data) => ({
2389
+ ...data,
2390
+ type: data._type
2391
+ })).transform(({ _type, ...rest }) => rest);
2392
+ var companyCareersSchema2 = companyCareersSchema.extend({
2393
+ _type: z5.string().describe("Document type used within sanity").default("companyCareers"),
2394
+ companyBenefits: z5.optional(z5.array(
2395
+ z5.union([companyBenefitsSchema, sanityReferenceSchema])
2396
+ )).nullable().describe("What are the specific benefits of that company. The benefit is generic."),
2397
+ jobBoard: z5.union([jobBoardSchema, sanityReferenceSchema]).nullable(),
2398
+ jobBoardSlug: z5.optional(z5.union([z5.array(z5.string()), z5.array(sanitySlugSchema)]))
2399
+ }).omit({ type: true }).strict().transform((data) => ({
2400
+ ...data,
2401
+ type: data._type
2402
+ })).transform(({ _type, ...rest }) => rest);
2403
+ var companySchema2 = companySchema.extend({
2404
+ _id: z5.string().describe("The NDG specific id for a job posting in form of ndg-<company_slug>-<unique-job-id>. Serves as unique identifier. Cannot be changed."),
2405
+ _rev: z5.string().nullable().describe("Revision number"),
2406
+ _type: z5.string().describe("Document type used within sanity").default("company"),
2407
+ _createdAt: z5.string().datetime().describe("Time document was created. Autoset by Sanity"),
2408
+ _updatedAt: z5.string().datetime().describe("Time document was created. Autoset by Sanity"),
2409
+ companyCareers: companyCareersSchema2.nullable().describe("Career Specific Information for the company."),
2410
+ companyPhilosophy: companyPhilosophySchema2.nullable().describe("Company mission,values and how the company achieves its mission."),
2411
+ companyNDG: companyNdgSchema2.nullable().describe("Next Degree specific information for the company."),
2412
+ foundingInfo: foundingInformationSchema2.nullable(),
2413
+ slug: z5.union([z5.string(), sanitySlugSchema]).describe("The NDG specific slug for a company."),
2414
+ ndgMetadata: ngdMetadataSchema2.nullable(),
2415
+ logo: z5.union([imageSchema, z5.record(z5.any())]).nullable().describe("The logo of the company"),
2416
+ //Deprecated Models
2417
+ logoImageURL: z5.optional(z5.string()).describe("The logo of the company"),
2418
+ industryList: z5.optional(z5.array(sanityReferenceSchema)).describe("The industry of the company")
2419
+ }).omit({ type: true, id: true, createdAt: true, updatedAt: true }).strict().transform((data) => ({
2420
+ ...data,
2421
+ type: data._type,
2422
+ id: data._id,
2423
+ createdAt: data._createdAt,
2424
+ updatedAt: data._updatedAt,
2425
+ rev: data._rev
2426
+ })).transform(({ _type, _id, _rev, _createdAt, _updatedAt, ...rest }) => rest);
2427
+
2428
+ // src/types/latest/custom/job_posting_service_sanity.ts
2429
+ import { z as z6 } from "zod";
2430
+ var JobPostTypeEnum = z6.enum(["jobPost"]);
2431
+ var MonetaryAmountTypeEnum = z6.enum(["monetaryAmount"]);
2432
+ var postalAddressSchema2 = postalAddressSchema.extend({
2433
+ _type: z6.string().describe("Document type used within sanity").default("address")
2434
+ }).omit({ type: true }).strict().transform((data) => ({
2435
+ ...data,
2436
+ type: data._type
2437
+ })).transform(({ _type, ...rest }) => rest);
2438
+ var quantitativeValueSchema2 = quantitativeValueSchema.extend({
2439
+ _type: z6.string().describe("Document type used within sanity").default("quantitativeValue")
2440
+ }).omit({ type: true }).strict().transform((data) => ({
2441
+ ...data,
2442
+ type: data._type
2443
+ })).transform(({ _type, ...rest }) => rest);
2444
+ var monetaryAmountSchema2 = monetaryAmountSchema.extend({
2445
+ _type: z6.string().describe("Document type used within sanity").default("monetaryAmount"),
2446
+ value: quantitativeValueSchema2.optional().describe("The quantitative_value for a given salary")
2447
+ }).omit({ type: true }).strict().transform((data) => ({
2448
+ ...data,
2449
+ type: data._type
2450
+ })).transform(({ _type, ...rest }) => rest);
2451
+ var jobPostSchema2 = jobPostSchema.extend({
2452
+ // Override base fields with Sanity-specific fields
2453
+ _id: z6.string().describe("The NDG specific id for a job posting in form of ndg-<company_slug>-<unique-job-id>. Serves as unique identifier. Cannot be changed.").regex(/^ndg-.*-.*$/),
2454
+ _rev: z6.string().optional().describe("Revision number"),
2455
+ _type: z6.string().describe("Document type used within sanity").default("jobPost"),
2456
+ _createdAt: z6.string().datetime().describe("Time document was created. Autoset by Sanity"),
2457
+ _updatedAt: z6.string().datetime().describe("Time document was created. Autoset by Sanity"),
2458
+ // Override fields with new schemas
2459
+ estimatedSalary: monetaryAmountSchema2.optional().describe("Determines the estimated salary for a given job posting"),
2460
+ jobLocation: postalAddressSchema2.optional().describe("Determines the primary physical location where the job is to be performed. For remote roles, use applicantLocationRequirements"),
2461
+ // Add Sanity-specific fields
2462
+ ndgMetadata: z6.record(z6.any()).optional(),
2463
+ ndgID: z6.string().optional(),
2464
+ hiringOrganization: z6.optional(z6.union([sanityReferenceSchema, companySchema])),
2465
+ raw: z6.record(z6.any()).optional(),
2466
+ isLoaded: z6.boolean().default(false),
2467
+ isVerified: z6.boolean().default(false),
2468
+ needsReview: z6.boolean().default(false),
2469
+ schema_version: z6.string().optional(),
2470
+ origin: z6.string().optional(),
2471
+ temp: z6.record(z6.any()).optional(),
2472
+ applicationType: z6.string().optional(),
2473
+ // Override clientId to use Sanity naming convention
2474
+ clientID: z6.string()
2475
+ }).omit({ type: true, id: true, createdAt: true, updatedAt: true, clientId: true }).transform((data) => ({
2476
+ ...data,
2477
+ type: data._type,
2478
+ id: data._id,
2479
+ createdAt: data._createdAt,
2480
+ updatedAt: data._updatedAt,
2481
+ rev: data._rev
2482
+ })).transform(({ _type, _id, _rev, _createdAt, _updatedAt, ...rest }) => rest);
2483
+
2484
+ // src/lib/salaryRange.ts
2485
+ var CurrencyEnum2 = shared_pickle_output_latest_exports.CurrencyEnum;
2486
+ function salaryRange(salary, showUnitText = true) {
2487
+ if (!salary) return null;
2488
+ let min = salary.minValue;
2489
+ let max = salary.maxValue;
2490
+ let single = salary.singleValue;
2491
+ let value = salary.value;
2492
+ let unitText = "YEAR";
2493
+ const signs = {
2494
+ [CurrencyEnum2.Values.USD]: "$",
2495
+ [CurrencyEnum2.Values.GBP]: "\xA3",
2496
+ [CurrencyEnum2.Values.EUR]: "\u20AC"
2497
+ };
2498
+ const sign = signs[salary.currency ?? CurrencyEnum2.Values.USD];
2499
+ if (value != null && typeof value === "object") {
2500
+ min = value.minValue;
2501
+ max = value.maxValue;
2502
+ single = value.value;
2503
+ unitText = value.unitText;
2492
2504
  }
2505
+ if (unitText === "YEAR") unitText = " per year";
2506
+ if (unitText === "MONTH") unitText = " per month";
2507
+ if (unitText === "WEEK") unitText = " per week";
2508
+ if (unitText === "DAY") unitText = " per day";
2509
+ if (unitText === "PER_ACTIVITY") unitText = " per activity";
2510
+ if (unitText === "HOUR") unitText = " per hour";
2511
+ if (showUnitText === false) unitText = "";
2512
+ const isValid = (v) => v != null && v >= 0;
2513
+ if (!isValid(min) && !isValid(max) && !isValid(single)) return null;
2514
+ if (isValid(single)) return sign + single.toLocaleString() + unitText;
2515
+ if (min === max) return sign + min?.toLocaleString() + unitText;
2516
+ if (isValid(min) && isValid(max))
2517
+ return sign + min?.toLocaleString() + " - " + sign + max?.toLocaleString() + unitText;
2518
+ return null;
2519
+ }
2520
+
2521
+ // src/components/company/CompanyBenefits.tsx
2522
+ import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
2523
+ function CompanyBenefits({ benefits }) {
2524
+ if (!benefits) return null;
2525
+ return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-2", "data-testid": "company-benefits", children: [
2526
+ /* @__PURE__ */ jsx34("h2", { className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg", children: "Company benefits" }),
2527
+ /* @__PURE__ */ jsx34("ul", { className: "flex flex-col gap-3", children: benefits.map((benefit, i) => /* @__PURE__ */ jsx34("li", { className: "text-base text-grey-80", children: benefit }, `${benefit}-${i}`)) })
2528
+ ] });
2529
+ }
2530
+
2531
+ // src/components/company/CompanyInformation.tsx
2532
+ import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
2533
+ function CompanyInformation({
2534
+ name,
2535
+ how,
2536
+ mission,
2537
+ wow,
2538
+ website
2539
+ }) {
2540
+ return /* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-2", children: [
2541
+ /* @__PURE__ */ jsxs22(
2542
+ "h2",
2543
+ {
2544
+ "data-testid": "company-name",
2545
+ className: "break-word max-w-full text-xl font-bold text-black sm:max-w-2xl md:max-w-lg",
2546
+ children: [
2547
+ "About ",
2548
+ name
2549
+ ]
2550
+ }
2551
+ ),
2552
+ how && /* @__PURE__ */ jsx35("p", { "data-testid": "company-information", className: "text-base text-grey-80", children: how }),
2553
+ mission && /* @__PURE__ */ jsxs22("div", { className: "flex gap-2", children: [
2554
+ /* @__PURE__ */ jsx35("span", { children: "\u{1F680}" }),
2555
+ /* @__PURE__ */ jsxs22("p", { className: "text-base text-grey-80", children: [
2556
+ /* @__PURE__ */ jsx35("span", { className: "pr-1 font-bold", children: "Mission" }),
2557
+ mission
2558
+ ] })
2559
+ ] }),
2560
+ wow && /* @__PURE__ */ jsxs22("div", { className: "flex gap-2", children: [
2561
+ /* @__PURE__ */ jsx35("span", { children: "\u{1F31F}" }),
2562
+ /* @__PURE__ */ jsxs22("p", { className: "text-base text-grey-80", children: [
2563
+ /* @__PURE__ */ jsx35("span", { className: "pr-1 font-bold", children: "Wow Factor" }),
2564
+ wow
2565
+ ] })
2566
+ ] }),
2567
+ website && /* @__PURE__ */ jsx35("div", { className: "pt-2", children: /* @__PURE__ */ jsx35(
2568
+ LinkButton,
2569
+ {
2570
+ "data-testid": "company-website-link",
2571
+ href: website,
2572
+ target: "_blank",
2573
+ rel: "noopener noreferrer",
2574
+ children: "Website"
2575
+ }
2576
+ ) })
2577
+ ] });
2578
+ }
2579
+
2580
+ // src/components/company/CompanyTake.tsx
2581
+ import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
2582
+ function CompanyTake({ content, avatarSrc }) {
2583
+ if (!content) return null;
2584
+ return /* @__PURE__ */ jsxs23(
2585
+ "div",
2586
+ {
2587
+ "data-testid": "company-take",
2588
+ className: "align-center w-full justify-start rounded-2xl bg-green-90 p-6",
2589
+ children: [
2590
+ /* @__PURE__ */ jsx36("p", { className: "text-lg font-bold text-white sm:text-xl", children: "The Real Dill \u2618\uFE0F" }),
2591
+ /* @__PURE__ */ jsx36("div", { className: "mt-2 flex items-center justify-start", children: /* @__PURE__ */ jsx36("p", { className: "text-sm font-normal text-grey-10", children: content }) }),
2592
+ /* @__PURE__ */ jsxs23("div", { className: "mt-8 flex w-full items-center gap-3", children: [
2593
+ /* @__PURE__ */ jsx36(Avatar, { name: "Jon Lee", src: avatarSrc }),
2594
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-col flex-wrap items-start", children: [
2595
+ /* @__PURE__ */ jsx36("p", { className: "text-sm font-bold text-white", children: "Jon Lee, PT, DPT, OCS, FAAOMPT, MBA" }),
2596
+ /* @__PURE__ */ jsx36("p", { className: "text-xs font-normal text-grey-30", children: "Pickle co-founder" })
2597
+ ] })
2598
+ ] })
2599
+ ]
2600
+ }
2601
+ );
2602
+ }
2603
+
2604
+ // src/components/jobPost/JobDescription.tsx
2605
+ import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
2606
+ function JobDescription({ description }) {
2607
+ if (!description) return null;
2608
+ return /* @__PURE__ */ jsxs24("div", { className: "flex w-full flex-col gap-2", children: [
2609
+ /* @__PURE__ */ jsx37("h3", { className: "text-xl font-bold", children: "Job Description" }),
2610
+ /* @__PURE__ */ jsx37(ReadMore, { text: description })
2611
+ ] });
2612
+ }
2613
+
2614
+ // src/components/jobPost/JobHeader.tsx
2615
+ import { Dot as Dot2 } from "lucide-react";
2616
+ import Image2 from "next/image";
2617
+
2618
+ // src/components/buttons/BackButton.tsx
2619
+ import { X as X5 } from "lucide-react";
2620
+ import { useRouter } from "next/navigation";
2621
+
2622
+ // src/hooks/useWindowHistory.ts
2623
+ import { useContext as useContext2 } from "react";
2624
+
2625
+ // src/contexts/WindowHistoryProvider.tsx
2626
+ import { useSearchParams } from "next/navigation";
2627
+ import { createContext, useEffect as useEffect8, useMemo, useState as useState8 } from "react";
2628
+ import { jsx as jsx38 } from "react/jsx-runtime";
2629
+ var WindowHistoryContext = createContext({});
2630
+ function WindowHistoryProvider({ children }) {
2631
+ const [history, setHistory] = useState8([]);
2632
+ const searchParams = useSearchParams();
2633
+ useEffect8(() => {
2634
+ setHistory(
2635
+ (prev) => prev.at(-1) === window.location.href ? prev : [...prev, window.location.href]
2636
+ );
2637
+ }, [searchParams]);
2638
+ const contextValue = useMemo(() => ({ history }), [history]);
2639
+ return /* @__PURE__ */ jsx38(WindowHistoryContext.Provider, { value: contextValue, children });
2640
+ }
2641
+
2642
+ // src/hooks/useWindowHistory.ts
2643
+ function useWindowHistory() {
2644
+ const windowHistoryContext = useContext2(WindowHistoryContext);
2645
+ return windowHistoryContext;
2646
+ }
2647
+
2648
+ // src/components/buttons/BackButton.tsx
2649
+ import { jsx as jsx39 } from "react/jsx-runtime";
2650
+ function BackButton({ acceptedRoutes, fallbackHref, className, ...props }) {
2651
+ const { history } = useWindowHistory();
2652
+ const router = useRouter();
2653
+ const isAcceptedRoute = (r) => !!acceptedRoutes?.find((route) => new RegExp("^" + route + "$", "i").test(new URL(r).pathname));
2654
+ const goBack = () => {
2655
+ const previous = history[history.length - 2];
2656
+ if (history.length > 1 && isAcceptedRoute(previous)) {
2657
+ router.back();
2658
+ } else {
2659
+ router.push(fallbackHref ?? "/");
2660
+ }
2661
+ };
2662
+ return /* @__PURE__ */ jsx39(
2663
+ Icon,
2664
+ {
2665
+ "aria-label": "back button",
2666
+ variant: "transparent",
2667
+ size: "small",
2668
+ onClick: goBack,
2669
+ className,
2670
+ ...props,
2671
+ children: /* @__PURE__ */ jsx39(X5, {})
2672
+ }
2673
+ );
2674
+ }
2675
+
2676
+ // src/lib/icons.ts
2677
+ import {
2678
+ Banknote,
2679
+ Bell,
2680
+ BriefcaseBusiness,
2681
+ Building,
2682
+ Building2,
2683
+ CircleUser,
2684
+ CircleUserRound,
2685
+ Clock2,
2686
+ Contact,
2687
+ GalleryVerticalEnd,
2688
+ Home,
2689
+ KeyRound,
2690
+ Layers,
2691
+ LifeBuoy,
2692
+ MapPin,
2693
+ MessageSquareDot,
2694
+ Settings,
2695
+ SquareKanban,
2696
+ Users,
2697
+ Wallet
2698
+ } from "lucide-react";
2699
+ var iconMap = {
2700
+ house: Home,
2701
+ layers: Layers,
2702
+ users: Users,
2703
+ settings: Settings,
2704
+ building: Building,
2705
+ bell: Bell,
2706
+ wallet: Wallet,
2707
+ contact: Contact,
2708
+ banknote: Banknote,
2709
+ "message-square-dot": MessageSquareDot,
2710
+ "life-buoy": LifeBuoy,
2711
+ "building-2": Building2,
2712
+ "gallery-vertical-end": GalleryVerticalEnd,
2713
+ "square-kanban": SquareKanban,
2714
+ "briefcase-business": BriefcaseBusiness,
2715
+ "circle-user": CircleUser,
2716
+ "key-round": KeyRound,
2717
+ "clock-2": Clock2,
2718
+ "circle-user-round": CircleUserRound,
2719
+ "map-pin": MapPin
2493
2720
  };
2494
- var bestFitDisplayText = {
2495
- DENTIST: {
2496
- en: "Dentist"
2497
- },
2498
- DIETICIAN: {
2499
- en: "Dietician"
2500
- },
2501
- DOULA: {
2502
- en: "Doula"
2503
- },
2504
- MEDICAL_ASSISTANT: {
2505
- en: "Medical Assistant"
2506
- },
2507
- MIDWIFE: {
2508
- en: "Midwife"
2509
- },
2510
- NURSE: {
2511
- en: "Nurse"
2512
- },
2513
- OCCUPATIONAL_THERAPIST: {
2514
- en: "Occupational Therapist"
2515
- },
2516
- PHARMACIST: {
2517
- en: "Pharmacist"
2518
- },
2519
- PHYSICAL_THERAPIST: {
2520
- en: "Physical Therapist"
2521
- },
2522
- PHYSICIAN: {
2523
- en: "Physician"
2524
- },
2525
- PHYSICIAN_ASSISTANT: {
2526
- en: "Physician Assistant"
2721
+
2722
+ // src/components/jobPost/JobHeader.tsx
2723
+ import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
2724
+ function JobHeader({
2725
+ title,
2726
+ subtitles,
2727
+ standalone,
2728
+ bannerSrc,
2729
+ avatarSrc,
2730
+ avatarName,
2731
+ avatarHref,
2732
+ backFallbackHref,
2733
+ backAcceptedRoutes,
2734
+ actions,
2735
+ tags
2736
+ }) {
2737
+ const renderIcon = (icon) => {
2738
+ const Icon2 = iconMap[icon];
2739
+ return /* @__PURE__ */ jsx40(Icon2, { size: 18 });
2740
+ };
2741
+ return /* @__PURE__ */ jsxs25(
2742
+ "div",
2743
+ {
2744
+ "data-testid": "job-header-root",
2745
+ className: cn(
2746
+ "-mt-8 flex w-full flex-col items-center justify-between gap-6 md:-mt-0",
2747
+ !standalone && "rounded-3xl"
2748
+ ),
2749
+ children: [
2750
+ !standalone && /* @__PURE__ */ jsxs25("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: [
2751
+ /* @__PURE__ */ jsx40(
2752
+ Image2,
2753
+ {
2754
+ className: "h-full w-full rounded-t-3xl object-cover",
2755
+ src: bannerSrc,
2756
+ alt: "job banner",
2757
+ fill: true
2758
+ }
2759
+ ),
2760
+ /* @__PURE__ */ jsx40(
2761
+ BackButton,
2762
+ {
2763
+ acceptedRoutes: backAcceptedRoutes,
2764
+ fallbackHref: backFallbackHref,
2765
+ className: "absolute right-2 top-2 flex items-center justify-center text-white sm:hidden",
2766
+ "data-testid": "job-header-back-button"
2767
+ }
2768
+ ),
2769
+ /* @__PURE__ */ jsx40(
2770
+ "div",
2771
+ {
2772
+ className: "absolute left-4 top-8 md:left-6 md:top-16 lg:top-24",
2773
+ "data-testid": "job-header-avatar",
2774
+ children: /* @__PURE__ */ jsx40(
2775
+ Avatar,
2776
+ {
2777
+ size: "large",
2778
+ target: "_blank",
2779
+ href: avatarHref,
2780
+ name: avatarName,
2781
+ src: avatarSrc,
2782
+ rel: "noopener noreferrer"
2783
+ }
2784
+ )
2785
+ }
2786
+ )
2787
+ ] }),
2788
+ /* @__PURE__ */ jsxs25("div", { className: "flex w-full flex-col items-start justify-start gap-4 px-6", children: [
2789
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col md:flex-row", children: [
2790
+ standalone && /* @__PURE__ */ jsx40("div", { className: "-mt-4 mr-4 md:mt-0", "data-testid": "job-header-avatar", children: /* @__PURE__ */ jsx40(
2791
+ Avatar,
2792
+ {
2793
+ size: "large",
2794
+ target: "_blank",
2795
+ href: avatarHref,
2796
+ name: avatarName,
2797
+ src: avatarSrc,
2798
+ rel: "noopener noreferrer"
2799
+ }
2800
+ ) }),
2801
+ /* @__PURE__ */ jsx40("div", { className: "prose mt-4 flex w-full items-center text-grey-80 lg:prose-lg", children: subtitles?.map((subtitle, i) => /* @__PURE__ */ jsxs25(
2802
+ "div",
2803
+ {
2804
+ "data-testid": `job-header-subtitle-${i}`,
2805
+ className: "flex items-center",
2806
+ children: [
2807
+ subtitle,
2808
+ i < subtitles.length - 1 && /* @__PURE__ */ jsx40(Dot2, { className: "mx-1 shrink-0", size: 10 })
2809
+ ]
2810
+ },
2811
+ subtitle
2812
+ )) })
2813
+ ] }),
2814
+ /* @__PURE__ */ jsxs25(
2815
+ "div",
2816
+ {
2817
+ "data-testid": "job-header-content",
2818
+ className: "mt-2 flex w-full flex-row flex-wrap items-center justify-between gap-1",
2819
+ children: [
2820
+ /* @__PURE__ */ jsx40(
2821
+ "h2",
2822
+ {
2823
+ "data-testid": "job-header-title",
2824
+ className: "break-word max-w-full text-2xl font-bold text-black sm:max-w-2xl md:max-w-lg",
2825
+ children: title
2826
+ }
2827
+ ),
2828
+ !!actions && /* @__PURE__ */ jsx40(
2829
+ "div",
2830
+ {
2831
+ className: "flex w-full justify-end gap-2 md:w-auto",
2832
+ "data-testid": "job-header-actions",
2833
+ children: actions
2834
+ }
2835
+ )
2836
+ ]
2837
+ }
2838
+ ),
2839
+ /* @__PURE__ */ jsx40(
2840
+ "div",
2841
+ {
2842
+ "data-testid": "job-header-tags",
2843
+ className: "flex flex-row flex-wrap items-center justify-start gap-2",
2844
+ children: tags?.map(({ name, label, icon }) => /* @__PURE__ */ jsxs25(
2845
+ Chip_default,
2846
+ {
2847
+ size: "small",
2848
+ variant: "neutral",
2849
+ "aria-label": name,
2850
+ "data-testid": `job-header-tag-${name}`,
2851
+ children: [
2852
+ renderIcon(icon),
2853
+ /* @__PURE__ */ jsx40("span", { children: label })
2854
+ ]
2855
+ },
2856
+ name
2857
+ ))
2858
+ }
2859
+ )
2860
+ ] })
2861
+ ]
2862
+ }
2863
+ );
2864
+ }
2865
+
2866
+ // src/components/jobPost/JobPost.tsx
2867
+ import * as DateFns from "date-fns";
2868
+
2869
+ // src/hooks/useDisplayText.ts
2870
+ import { useEffect as useEffect9, useMemo as useMemo2, useState as useState9 } from "react";
2871
+
2872
+ // src/lib/mappings.ts
2873
+ var employmentTypeDisplayText = {
2874
+ FULL_TIME: {
2875
+ en: "Full Time"
2527
2876
  },
2528
- PSYCHOLOGIST: {
2529
- en: "Psychologist"
2877
+ INTERNSHIP: {
2878
+ en: "Internship"
2530
2879
  },
2531
- RADIOLOGIST: {
2532
- en: "Radiologist"
2880
+ OTHER: {
2881
+ en: "Other"
2533
2882
  },
2534
- SOCIAL_WORKER: {
2535
- en: "Social Worker"
2883
+ PART_TIME: {
2884
+ en: "Part Time"
2536
2885
  },
2537
- SPEECH_LANGUAGE_PATHOLOGIST: {
2538
- en: "Speech Language Pathologist"
2886
+ PER_DIEM: {
2887
+ en: "Per-Diem"
2539
2888
  },
2540
- SURGEON: {
2541
- en: "Surgeon"
2889
+ TEMPORARY: {
2890
+ en: "Temporary"
2891
+ },
2892
+ CONTRACT: {
2893
+ en: "Contract"
2542
2894
  }
2543
2895
  };
2544
- var clinicalSpecialtyDisplayText = {
2545
- ANESTHESIOLOGY: {
2546
- en: "Anesthesiology"
2896
+ var unitTextDisplayText = {
2897
+ DAY: {
2898
+ en: "Day"
2547
2899
  },
2548
- CARDIOLOGY: {
2549
- en: "Cardiology"
2900
+ HOUR: {
2901
+ en: "Hour"
2550
2902
  },
2551
- CARDIOVASCULAR_AND_PULMONARY: {
2552
- en: "Cardiovascular and Pulmonary"
2903
+ MONTH: {
2904
+ en: "Month"
2553
2905
  },
2554
- CASE_MANAGEMENT: {
2555
- en: "Case Management"
2906
+ PER_ACTIVITY: {
2907
+ en: "Per Activity"
2556
2908
  },
2557
- CHRONIC_PAIN: {
2558
- en: "Chronic Pain"
2909
+ WEEK: {
2910
+ en: "Week"
2559
2911
  },
2560
- CLINICAL_ELECTROPHYSIOLOGY: {
2561
- en: "Clinical Electrophysiology"
2912
+ YEAR: {
2913
+ en: "Year"
2914
+ }
2915
+ };
2916
+ var currencyDisplayText = {
2917
+ EUR: {
2918
+ en: "\u20AC"
2562
2919
  },
2563
- CRITICAL_AND_ACUTE_CARE: {
2564
- en: "Critical and Acute Care"
2920
+ GBP: {
2921
+ en: "\xA3"
2565
2922
  },
2566
- DERMATOLOGY: {
2567
- en: "Dermatology"
2923
+ USD: {
2924
+ en: "$"
2925
+ }
2926
+ };
2927
+ var employmentLevelDisplayText = {
2928
+ DIRECTOR: {
2929
+ en: "Director"
2568
2930
  },
2569
- DIALYSIS: {
2570
- en: "Dialysis"
2931
+ ENTRY_LEVEL: {
2932
+ en: "Entry Level"
2571
2933
  },
2572
- EMERGENCY_MEDICINE: {
2573
- en: "Emergency Medicine"
2934
+ EXECUTIVE: {
2935
+ en: "Executive"
2574
2936
  },
2575
- ENDOCRINOLOGY: {
2576
- en: "Endocrinology"
2937
+ EXPERIENCED: {
2938
+ en: "Experienced"
2577
2939
  },
2578
- ERGONOMICS: {
2579
- en: "Ergonomics"
2940
+ INTERN: {
2941
+ en: "Intern"
2580
2942
  },
2581
- FEEDING_EATING_AND_SWALLOWING: {
2582
- en: "Feeding, Eating, and Swallowing"
2943
+ MANAGER: {
2944
+ en: "Manager"
2945
+ }
2946
+ };
2947
+ var jobFunctionDisplayText = {
2948
+ CLINICAL_RESEARCH: {
2949
+ en: "Clinical Research"
2583
2950
  },
2584
- GASTROENTEROLOGY: {
2585
- en: "Gastroenterology"
2951
+ CUSTOMER_SUCCESS: {
2952
+ en: "Customer Success"
2586
2953
  },
2587
- GERIATRICS: {
2588
- en: "Geriatrics"
2954
+ DATA_ANALYTICS: {
2955
+ en: "Data Analytics"
2589
2956
  },
2590
- HAND_THERAPY: {
2591
- en: "Hand Therapy"
2957
+ FINANCE_AND_AUDIT: {
2958
+ en: "Finance and Audit"
2592
2959
  },
2593
- HEMATOLOGY: {
2594
- en: "Hematology"
2960
+ MARKETING: {
2961
+ en: "Marketing"
2595
2962
  },
2596
- HOLISTIC_MEDICINE: {
2597
- en: "Holistic Medicine"
2963
+ OPERATIONS: {
2964
+ en: "Operations"
2598
2965
  },
2599
- INFORMATICS: {
2966
+ PEOPLE_HUMAN_RESOURCES: {
2967
+ en: "People Human Resources"
2968
+ },
2969
+ PRODUCT_AND_TECH: {
2970
+ en: "Product and Tech"
2971
+ },
2972
+ QUALITY_ASSURANCE_AND_OUTCOMES: {
2973
+ en: "Quality Assurance and Outcomes"
2974
+ },
2975
+ SALES_AND_BUSINESS_DEVELOPMENT: {
2976
+ en: "Sales and Business Development"
2977
+ },
2978
+ STRATEGY_AND_CONSULTING: {
2979
+ en: "Strategy and Consulting"
2980
+ }
2981
+ };
2982
+ var bestFitDisplayText = {
2983
+ DENTIST: {
2984
+ en: "Dentist"
2985
+ },
2986
+ DIETICIAN: {
2987
+ en: "Dietician"
2988
+ },
2989
+ DOULA: {
2990
+ en: "Doula"
2991
+ },
2992
+ MEDICAL_ASSISTANT: {
2993
+ en: "Medical Assistant"
2994
+ },
2995
+ MIDWIFE: {
2996
+ en: "Midwife"
2997
+ },
2998
+ NURSE: {
2999
+ en: "Nurse"
3000
+ },
3001
+ OCCUPATIONAL_THERAPIST: {
3002
+ en: "Occupational Therapist"
3003
+ },
3004
+ PHARMACIST: {
3005
+ en: "Pharmacist"
3006
+ },
3007
+ PHYSICAL_THERAPIST: {
3008
+ en: "Physical Therapist"
3009
+ },
3010
+ PHYSICIAN: {
3011
+ en: "Physician"
3012
+ },
3013
+ PHYSICIAN_ASSISTANT: {
3014
+ en: "Physician Assistant"
3015
+ },
3016
+ PSYCHOLOGIST: {
3017
+ en: "Psychologist"
3018
+ },
3019
+ RADIOLOGIST: {
3020
+ en: "Radiologist"
3021
+ },
3022
+ SOCIAL_WORKER: {
3023
+ en: "Social Worker"
3024
+ },
3025
+ SPEECH_LANGUAGE_PATHOLOGIST: {
3026
+ en: "Speech Language Pathologist"
3027
+ },
3028
+ SURGEON: {
3029
+ en: "Surgeon"
3030
+ }
3031
+ };
3032
+ var clinicalSpecialtyDisplayText = {
3033
+ ANESTHESIOLOGY: {
3034
+ en: "Anesthesiology"
3035
+ },
3036
+ CARDIOLOGY: {
3037
+ en: "Cardiology"
3038
+ },
3039
+ CARDIOVASCULAR_AND_PULMONARY: {
3040
+ en: "Cardiovascular and Pulmonary"
3041
+ },
3042
+ CASE_MANAGEMENT: {
3043
+ en: "Case Management"
3044
+ },
3045
+ CHRONIC_PAIN: {
3046
+ en: "Chronic Pain"
3047
+ },
3048
+ CLINICAL_ELECTROPHYSIOLOGY: {
3049
+ en: "Clinical Electrophysiology"
3050
+ },
3051
+ CRITICAL_AND_ACUTE_CARE: {
3052
+ en: "Critical and Acute Care"
3053
+ },
3054
+ DERMATOLOGY: {
3055
+ en: "Dermatology"
3056
+ },
3057
+ DIALYSIS: {
3058
+ en: "Dialysis"
3059
+ },
3060
+ EMERGENCY_MEDICINE: {
3061
+ en: "Emergency Medicine"
3062
+ },
3063
+ ENDOCRINOLOGY: {
3064
+ en: "Endocrinology"
3065
+ },
3066
+ ERGONOMICS: {
3067
+ en: "Ergonomics"
3068
+ },
3069
+ FEEDING_EATING_AND_SWALLOWING: {
3070
+ en: "Feeding, Eating, and Swallowing"
3071
+ },
3072
+ GASTROENTEROLOGY: {
3073
+ en: "Gastroenterology"
3074
+ },
3075
+ GERIATRICS: {
3076
+ en: "Geriatrics"
3077
+ },
3078
+ HAND_THERAPY: {
3079
+ en: "Hand Therapy"
3080
+ },
3081
+ HEMATOLOGY: {
3082
+ en: "Hematology"
3083
+ },
3084
+ HOLISTIC_MEDICINE: {
3085
+ en: "Holistic Medicine"
3086
+ },
3087
+ INFORMATICS: {
2600
3088
  en: "Informatics"
2601
3089
  },
2602
3090
  INTERNAL_MEDICINE: {
@@ -2763,539 +3251,112 @@ var clinicalSettingDisplayText = {
2763
3251
  en: "School"
2764
3252
  },
2765
3253
  SKILLED_NURSING_FACILITY: {
2766
- en: "Skilled Nursing Facility"
2767
- }
2768
- };
2769
- var defaultMappings = {
2770
- employmentType: employmentTypeDisplayText,
2771
- unitText: unitTextDisplayText,
2772
- currency: currencyDisplayText,
2773
- employmentLevel: employmentLevelDisplayText,
2774
- jobFunction: jobFunctionDisplayText,
2775
- bestFit: bestFitDisplayText,
2776
- clinicalSpecialty: clinicalSpecialtyDisplayText,
2777
- clinicalSetting: clinicalSettingDisplayText,
2778
- shift: shiftDisplayText
2779
- };
2780
-
2781
- // src/types/displayText.errors.tsx
2782
- var DisplayTextScopeNotFoundError = class extends Error {
2783
- constructor(scope) {
2784
- super(`No display text mapping found for scope: ${scope}`);
2785
- this.name = "DisplayTextScopeNotFoundError";
2786
- }
2787
- };
2788
- var DisplayTextValueNotFoundError = class extends Error {
2789
- constructor(value, scope) {
2790
- super(`No display text found for value: '${value}' in scope: '${scope}'`);
2791
- this.name = "DisplayTextValueNotFoundError";
2792
- }
2793
- };
2794
-
2795
- // src/services/displayText.tsx
2796
- var DisplayTextService = class {
2797
- constructor(customMappings) {
2798
- this.defaultLanguage = "en";
2799
- this.mappings = {
2800
- ...defaultMappings,
2801
- // Use all pre-defined mappings as defaults
2802
- ...customMappings
2803
- // Override with any custom mappings if provided
2804
- };
2805
- }
2806
- async getDisplayText(scope, value, language = this.defaultLanguage) {
2807
- const scopeMapping = this.mappings[scope];
2808
- if (!scopeMapping) {
2809
- throw new DisplayTextScopeNotFoundError(scope);
2810
- }
2811
- if (Array.isArray(value)) {
2812
- const displayTextPromises = value.map((v) => this.getDisplayText(scope, v, language));
2813
- const displayTexts2 = await Promise.all(displayTextPromises);
2814
- return displayTexts2.filter((v) => !!v).join(", ");
2815
- }
2816
- const displayTexts = scopeMapping[value];
2817
- if (!displayTexts) {
2818
- throw new DisplayTextValueNotFoundError(value, scope);
2819
- }
2820
- return displayTexts[language] || displayTexts[this.defaultLanguage] || value;
2821
- }
2822
- };
2823
-
2824
- // src/hooks/useDisplayText.ts
2825
- var useDisplayText = (scope, value) => {
2826
- const [displayText, setDisplayText] = useState8("");
2827
- const displayService = useMemo2(() => new DisplayTextService(), []);
2828
- useEffect8(() => {
2829
- if (!displayService || !value) {
2830
- setDisplayText("");
2831
- return;
2832
- }
2833
- void (async () => {
2834
- try {
2835
- const result = await displayService.getDisplayText(scope, value);
2836
- if (typeof result === "string") {
2837
- setDisplayText(result);
2838
- } else {
2839
- console.error("Expected a string result, but got:", result);
2840
- }
2841
- } catch (error) {
2842
- if (error instanceof DisplayTextValueNotFoundError) {
2843
- console.warn("Display text value not found:", value);
2844
- setDisplayText(String(value));
2845
- } else {
2846
- console.error("Unexpected error formatting text:", error);
2847
- setDisplayText(String(value));
2848
- }
2849
- }
2850
- })();
2851
- }, [scope, value, displayService]);
2852
- return displayText;
2853
- };
2854
-
2855
- // src/lib/locations.ts
2856
- function formattedAddress(address) {
2857
- const { addressLocality, addressRegion, addressCountry } = address;
2858
- if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`;
2859
- if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`;
2860
- if (addressRegion) return addressRegion;
2861
- if (addressCountry) return addressCountry;
2862
- return null;
2863
- }
2864
- function formattedJobLocation(job) {
2865
- const address = job.jobLocation && formattedAddress(job.jobLocation);
2866
- const remote = job.isRemote ? "Remote" : "";
2867
- return [address, remote].filter(Boolean).join(" | ");
2868
- }
2869
-
2870
- // src/types/latest/company_service_latest.ts
2871
- import { z as z2 } from "zod";
2872
-
2873
- // src/types/latest/shared_pickle_output_latest.ts
2874
- var shared_pickle_output_latest_exports = {};
2875
- __export(shared_pickle_output_latest_exports, {
2876
- CurrencyEnum: () => CurrencyEnum,
2877
- DetailLevelEnum: () => DetailLevelEnum,
2878
- TypeEnum: () => TypeEnum,
2879
- UnitTextEnum: () => UnitTextEnum,
2880
- imageAssetSchema: () => imageAssetSchema,
2881
- imageSchema: () => imageSchema,
2882
- monetaryAmountSchema: () => monetaryAmountSchema,
2883
- placeSchema: () => placeSchema,
2884
- postalAddressSchema: () => postalAddressSchema,
2885
- quantitativeValueSchema: () => quantitativeValueSchema
2886
- });
2887
- import { z } from "zod";
2888
- var TypeEnum = z.enum(["IMAGE"]);
2889
- var DetailLevelEnum = z.enum(["COUNTRY", "GEO", "LOCALITY", "POSTAL_CODE", "REGION"]);
2890
- var UnitTextEnum = z.enum(["DAY", "HOUR", "MONTH", "PER_ACTIVITY", "WEEK", "YEAR"]);
2891
- var CurrencyEnum = z.enum(["EUR", "GBP", "USD"]);
2892
- var postalAddressSchema = z.object({
2893
- version: z.literal("1.0.0").default("1.0.0"),
2894
- type: z.string().describe("Document type used for schema"),
2895
- addressCountry: z.string().describe("The physical country as defined in ISO 3166 Alpha-2"),
2896
- addressRegion: z.optional(z.string()).describe("The region in which the locality is, and which is in the country."),
2897
- 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."),
2898
- streetAddress: z.optional(z.string()).describe("The street name of the address within the locality."),
2899
- streetNumber: z.optional(z.string()).describe("The house of building number within the street."),
2900
- postalCode: z.optional(z.string()).describe("The postal code"),
2901
- description: z.optional(z.string()).describe("A descriptive string containing the full address.")
2902
- });
2903
- var placeSchema = z.object({
2904
- version: z.literal("1.0.0").default("1.0.0"),
2905
- detailLevel: z.optional(DetailLevelEnum),
2906
- latitude: z.optional(z.number()).describe("The latitude of a location."),
2907
- longitude: z.optional(z.number()).describe("The longitude of a location."),
2908
- address: z.optional(postalAddressSchema).describe("The physical place of the location")
2909
- });
2910
- var quantitativeValueSchema = z.object({
2911
- version: z.literal("1.0.0").default("1.0.0"),
2912
- type: z.string().describe("Document type used for schema"),
2913
- 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."),
2914
- minValue: z.optional(z.number()).describe("The single minium value in a range for a quantitative_value, requires a maximum value."),
2915
- maxValue: z.optional(z.number()).describe("The maximum value in a range for a quantitative_value, requires a minimum value."),
2916
- unitText: UnitTextEnum
2917
- });
2918
- var monetaryAmountSchema = z.object({
2919
- version: z.literal("1.0.0").default("1.0.0"),
2920
- type: z.string().describe("Document type used for schema"),
2921
- 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."),
2922
- minValue: z.optional(z.number()).describe("The annualized single minium value in a range for a quantitative_value. Deprecated use value.minValue"),
2923
- maxValue: z.optional(z.number()).describe("The annualized maximum value in a range for a quantitative_value. Deprecated use value.maxValue"),
2924
- value: z.optional(quantitativeValueSchema).describe("The quantitative_value for a given salary"),
2925
- currency: z.optional(CurrencyEnum)
2926
- });
2927
- var imageAssetSchema = z.object({
2928
- version: z.literal("1.0.0").default("1.0.0"),
2929
- altText: z.optional(z.string()).describe("The alt text for the image"),
2930
- assetId: z.optional(z.string()).describe("The asset ID for the image"),
2931
- description: z.optional(z.string()).describe("The description for the image"),
2932
- extension: z.optional(z.string()).describe("The extension for the image"),
2933
- label: z.optional(z.string()).describe("The label for the image"),
2934
- mimeType: z.optional(z.string()).describe("The mime type for the image"),
2935
- originalFilename: z.optional(z.string()).describe("The original filename for the image"),
2936
- path: z.optional(z.string()).describe("The path for the image"),
2937
- sha1Hash: z.optional(z.string()).describe("The SHA1 hash for the image"),
2938
- size: z.optional(z.number()).describe("The size for the image"),
2939
- title: z.optional(z.string()).describe("The title for the image"),
2940
- uploadId: z.optional(z.string()).describe("The upload ID for the image"),
2941
- url: z.optional(z.string()).describe("The URL for the image")
2942
- });
2943
- var imageSchema = z.object({
2944
- version: z.literal("1.0.0").default("1.0.0"),
2945
- type: z.string().describe("Document type used for schema"),
2946
- asset: z.optional(imageAssetSchema).describe("The asset for the image")
2947
- });
2948
-
2949
- // src/types/latest/company_service_latest.ts
2950
- var TypeEnum2 = z2.enum(["OFFICE"]);
2951
- var CategoryEnum = z2.enum(["FINANCIAL", "HEALTH", "PROFESSIONAL_DEVELOPMENT", "WORK_LIFE_BALANCE"]);
2952
- var TitleEnum = z2.enum(["DMD", "JD", "MBA", "MD", "MHA", "MPH", "PT", "PH_D", "RN"]);
2953
- var PublishStatusEnum = z2.enum(["DRAFT", "IN_REVIEW", "PUBLISHED", "REMOVED"]);
2954
- var OfficeTypeEnum = z2.enum(["BRANCH", "HEADQUARTERS", "SATELLITE"]);
2955
- var socialMediaSchema = z2.object({
2956
- version: z2.literal("1.0.0").default("1.0.0"),
2957
- url: z2.string().describe("The link to the social media platform"),
2958
- type: z2.string().describe("The type of social media link")
2959
- });
2960
- var companyBenefitsSchema = z2.object({
2961
- version: z2.literal("1.0.0").default("1.0.0"),
2962
- type: z2.string().describe("Document type used for schema"),
2963
- title: z2.string(),
2964
- description: z2.optional(z2.string()),
2965
- category: CategoryEnum
2966
- });
2967
- var industrySchema = z2.lazy(() => z2.object({
2968
- version: z2.literal("1.0.0").default("1.0.0"),
2969
- type: z2.string().describe("Document type used for schema"),
2970
- name: z2.string(),
2971
- description: z2.optional(z2.string()).describe("A brief description of the industry"),
2972
- onetIndustryId: z2.optional(z2.string()).describe("ONET industry ID"),
2973
- parent: z2.optional(industrySchema)
2974
- }));
2975
- var jobBoardSchema = z2.object({
2976
- version: z2.literal("1.0.0").default("1.0.0"),
2977
- type: z2.string().describe("Document type used for schema"),
2978
- name: z2.string().describe("The name of the job board"),
2979
- description: z2.string().describe("A brief description of the job board"),
2980
- logo: z2.optional(imageSchema).describe("The logo of the job board"),
2981
- baseUrl: z2.optional(z2.string()).describe("The base URL of the job board")
2982
- });
2983
- var personSchema = z2.object({
2984
- version: z2.literal("1.0.0").default("1.0.0"),
2985
- type: z2.string().describe("Document type used for schema"),
2986
- firstName: z2.string().describe("The first name of the person"),
2987
- lastName: z2.string().describe("The last name of the person"),
2988
- title: z2.optional(z2.array(z2.string())).describe("The titles of the degree of the person"),
2989
- slug: z2.string().describe("person slug - should be familyname-givenname-title(s)"),
2990
- jobTitle: z2.optional(z2.string()).describe("The job title of the person"),
2991
- isDoctor: z2.optional(z2.boolean()).describe("Is the person a doctor"),
2992
- isMedical: z2.optional(z2.boolean()).describe("Are they of a medical background?"),
2993
- isScientist: z2.optional(z2.boolean()).describe("Are they a scientist?"),
2994
- image: z2.optional(imageSchema).describe("The image of the person"),
2995
- email: z2.optional(z2.string()).describe("The email of the person"),
2996
- socialMedia: z2.optional(z2.array(socialMediaSchema)).describe("The social media links of the person"),
2997
- telephone: z2.optional(z2.string()).describe("The telephone number of the person"),
2998
- url: z2.optional(z2.string()).describe("The URL of the person"),
2999
- address: z2.optional(placeSchema).describe("The address of the person")
3000
- });
3001
- var companyCareersSchema = z2.object({
3002
- version: z2.literal("1.0.0").default("1.0.0"),
3003
- type: z2.string().describe("Document type used for schema"),
3004
- careersUrl: z2.string().describe("The URL of the company careers page"),
3005
- jobBoard: z2.optional(jobBoardSchema),
3006
- jobBoardSlug: z2.optional(z2.array(z2.string())),
3007
- companyBenefits: z2.optional(z2.array(companyBenefitsSchema)).describe("What are the specific benefits of that company. The benefit is generic.")
3008
- });
3009
- var companyPhilosophySchema = z2.object({
3010
- version: z2.literal("1.0.0").default("1.0.0"),
3011
- type: z2.string().describe("Document type used for schema"),
3012
- companyMission: z2.optional(z2.string()).describe("The mission statement of the company."),
3013
- companyHow: z2.optional(z2.string()).describe("How does the company achieve its mission"),
3014
- companyCulture: z2.optional(z2.array(z2.string())).describe("What are some of the culture aspects of this company?")
3015
- });
3016
- var companyNdgSchema = z2.object({
3017
- version: z2.literal("1.0.0").default("1.0.0"),
3018
- type: z2.string().describe("Document type used for schema"),
3019
- companyWow: z2.optional(z2.string()).describe("What is the wow of this company?"),
3020
- companyNdgTake: z2.optional(z2.string()).describe("What is the NDG POV on this company?"),
3021
- companyBestFit: z2.optional(z2.array(z2.string())),
3022
- companyInterests: z2.optional(z2.array(z2.string()))
3023
- });
3024
- var foundingInformationSchema = z2.object({
3025
- version: z2.literal("1.0.0").default("1.0.0"),
3026
- type: z2.string().describe("Document type used for schema"),
3027
- foundedDate: z2.optional(z2.string()),
3028
- foundedCountry: z2.optional(z2.string()),
3029
- foundedCity: z2.optional(z2.string()),
3030
- founders: z2.optional(z2.array(personSchema))
3031
- });
3032
- var ngdMetadataSchema = z2.object({
3033
- version: z2.literal("1.0.0").default("1.0.0"),
3034
- type: z2.string().describe("Document type used for schema"),
3035
- lastScraped: z2.optional(z2.string()).describe("Date the last entity was scraped, if applicable"),
3036
- scraperVersion: z2.optional(z2.string()),
3037
- postProcessorVersion: z2.optional(z2.string()),
3038
- uniqueRunId: z2.optional(z2.string()),
3039
- postProcessorUniqueRunId: z2.optional(z2.string()),
3040
- isScrapeManaged: z2.optional(z2.boolean()).default(true)
3041
- });
3042
- var companySchema = z2.object({
3043
- version: z2.literal("1.0.0").default("1.0.0"),
3044
- id: z2.string().describe("The NDG specific id for a company. Cannot be changed."),
3045
- createdAt: z2.string().datetime().describe("Time document was created. Autoset by Sanity"),
3046
- updatedAt: z2.string().datetime().describe("Time document was created. Autoset by Sanity"),
3047
- companyName: z2.string().describe("The name of the company"),
3048
- slug: z2.string().describe("The NDG specific slug for a company."),
3049
- type: z2.string().describe("Document type used for schema"),
3050
- logo: z2.optional(imageSchema).describe("The logo of the company"),
3051
- companyWebsite: z2.optional(z2.string()).describe("The website of the company"),
3052
- socialMedia: z2.optional(z2.array(socialMediaSchema)).describe("The social media links of the company"),
3053
- brandColor: z2.optional(z2.string()).describe("The brand color of the company"),
3054
- companyCareers: z2.optional(companyCareersSchema).describe("Career Specific Information for the company."),
3055
- companyPhilosophy: z2.optional(companyPhilosophySchema).describe("Company mission,values and how the company achieves its mission."),
3056
- companyNdg: z2.optional(companyNdgSchema).describe("Next Degree specific information for the company."),
3057
- foundingInfo: z2.optional(foundingInformationSchema),
3058
- headquartersLocation: z2.optional(placeSchema),
3059
- employeeEstimate: z2.optional(z2.string()),
3060
- publishStatus: z2.optional(z2.string()),
3061
- ngdMetadata: z2.optional(ngdMetadataSchema)
3062
- });
3063
- var officeSchema = z2.object({
3064
- version: z2.literal("1.0.0").default("1.0.0"),
3065
- type: z2.string().describe("Document type used for schema"),
3066
- name: z2.string().describe("Name or nickname for the office (e.g., 'NYC HQ', 'West Coast Branch')"),
3067
- officeType: OfficeTypeEnum,
3068
- companyId: z2.optional(companySchema),
3069
- geoLocation: z2.optional(placeSchema).describe("Geographical location details: coordinates + postal address"),
3070
- createdAt: z2.optional(z2.string()),
3071
- updatedAt: z2.optional(z2.string())
3072
- });
3073
-
3074
- // src/types/latest/job_posting_service_latest.ts
3075
- import { z as z3 } from "zod";
3076
- var TypeEnum3 = z3.enum(["JOB_POST"]);
3077
- var JobLocationTypeEnum = z3.enum(["FLOAT", "HYBRID", "ONSITE", "REMOTE"]);
3078
- var EmploymentTypeEnum = z3.enum(["CONTRACT", "FULL_TIME", "INTERNSHIP", "OTHER", "PART_TIME", "PER_DIEM", "TEMPORARY"]);
3079
- var EmploymentLevelEnum = z3.enum(["DIRECTOR", "ENTRY_LEVEL", "EXECUTIVE", "EXPERIENCED", "INTERN", "MANAGER"]);
3080
- var JobFunctionEnum = z3.enum(["CLINICAL_RESEARCH", "CUSTOMER_SUCCESS", "DATA_ANALYTICS", "FINANCE_AND_AUDIT", "MARKETING", "OPERATIONS", "PEOPLE_HUMAN_RESOURCES", "PRODUCT_AND_TECH", "QUALITY_ASSURANCE_AND_OUTCOMES", "SALES_AND_BUSINESS_DEVELOPMENT", "STRATEGY_AND_CONSULTING"]);
3081
- var PublishStatusEnum2 = z3.enum(["DRAFT", "IN_REVIEW", "PUBLISHED", "REMOVED"]);
3082
- var BestFitEnum = z3.enum(["DENTIST", "DIETICIAN", "DOULA", "MEDICAL_ASSISTANT", "MIDWIFE", "NURSE", "OCCUPATIONAL_THERAPIST", "PHARMACIST", "PHYSICAL_THERAPIST", "PHYSICIAN", "PHYSICIAN_ASSISTANT", "PSYCHOLOGIST", "RADIOLOGIST", "SOCIAL_WORKER", "SPEECH_LANGUAGE_PATHOLOGIST", "SURGEON"]);
3083
- var ClinicalLicenseEnum = z3.enum(["CNA", "CNM", "CNS", "COTA", "CRNA", "LPN", "LVN", "NP", "OT", "PT", "PTA", "RN"]);
3084
- var ShiftEnum = z3.enum(["DAY", "EIGHT_HOUR", "EVENING", "FLEXIBLE", "MID_SHIFT", "MONDAY_TO_FRIDAY", "NIGHT", "ON_CALL", "TEN_HOUR", "TWELVE_HOUR", "WEEKENDS"]);
3085
- var ClinicalSettingEnum = z3.enum(["ACUTE_CARE", "AMBULATORY_SURGERY_CENTER", "CLINIC", "HOME_HEALTH", "HOSPITAL", "INPATIENT", "LONG_TERM_CARE", "MED_SPA", "NURSING_HOME", "OFFICE", "OUTPATIENT", "PRIVATE_PRACTICE", "REHAB_CENTER", "SCHOOL", "SKILLED_NURSING_FACILITY"]);
3086
- var ClinicalSpecialtyEnum = z3.enum(["ANESTHESIOLOGY", "CARDIOLOGY", "CASE_MANAGEMENT", "CHRONIC_PAIN", "CLINICAL_ELECTROPHYSIOLOGY", "CRITICAL_AND_ACUTE_CARE", "DERMATOLOGY", "DIALYSIS", "EMERGENCY_MEDICINE", "ENDOCRINOLOGY", "ERGONOMICS", "FEEDING_EATING_AND_SWALLOWING", "GASTROENTEROLOGY", "GERIATRICS", "HAND_THERAPY", "HEMATOLOGY", "HOLISTIC_MEDICINE", "INFORMATICS", "INTERNAL_MEDICINE", "LABOR_AND_DELIVERY", "MANUAL_THERAPY", "MED_SURG", "MENTAL_HEALTH", "NEPHROLOGY", "NEUROLOGY", "ONCOLOGY", "ORTHOPEDICS", "OTOLARYNGOLOGY", "PEDIATRICS", "PHYSICAL_AND_REHABILITATION_MEDICINE", "PLASTIC_SURGERY", "PRIMARY_CARE", "PSYCHIATRY", "PULMONOLOGY", "RADIOLOGY", "SENSORY", "SPORTS", "SURGERY", "TRAUMA_MEDICINE", "URGENT_CARE", "UROLOGY", "VISION", "WOMENS_HEALTH", "WOUND_AND_BURN_CARE"]);
3087
- var jobPostSchema = z3.object({
3088
- version: z3.literal("1.0.0").default("1.0.0"),
3089
- id: z3.string().describe("The NDG specific id for a job posting in form of ndg-<company_slug>-<unique-job-id>. Serves as unique identifier. Cannot be changed."),
3090
- type: z3.string().describe("Document type used for schema"),
3091
- createdAt: z3.string().datetime().describe("Time document was created. Autoset by Sanity"),
3092
- updatedAt: z3.string().datetime().describe("Time document was created. Autoset by Sanity"),
3093
- dateAdded: z3.optional(z3.string().datetime()).describe("The date the job was added to the platform"),
3094
- datePosted: z3.optional(z3.string().datetime()).describe("The date the job was published for public viewing"),
3095
- dateRemoved: z3.optional(z3.string().datetime()).describe("The date the job was removed from public viewing"),
3096
- validThrough: z3.optional(z3.string().datetime()).describe("The date the job posting is valid through. After this date it will be removed from public viewing"),
3097
- vacancyCount: z3.optional(z3.number().int()).describe("The number of vacancies for a given job posting"),
3098
- clientId: z3.string().describe("The ID assigned by the client to a job - normally the same as the GH / Lever / Ashby ID or internal ID"),
3099
- url: z3.string().describe("The URL of the job to be displayed for users to apply with. Direct job link."),
3100
- title: z3.string().describe("The title of the job post"),
3101
- description: z3.string().describe("The description of the job post saved as markdown. Used for rendering the job description."),
3102
- richTextDescription: z3.optional(z3.string()).describe("The description of the job post saved as rich text"),
3103
- isClinical: z3.boolean().default(false).describe("Denotes if a job posting is clinical in nature or not. A role is clinical if it requires direct clinical patient care."),
3104
- isRemote: z3.boolean().default(false).describe("Denotes if a job posting is remote in nature. For a posting to be 'remote' it must be 100% remote (e.g hybrid roles would denote this to false)."),
3105
- isVerified: z3.boolean().default(false).describe("Denotes if a job posting has been manually verified - and thus ALL fields can be considered accurate. Can be used for DS training."),
3106
- isDirectApply: z3.boolean().default(false).describe("Denotes if a job posting url is direct apply. To be direct apply a user must be able to apply to the role without logging in and under 2 clicks."),
3107
- jobLocationType: z3.optional(z3.array(JobLocationTypeEnum)),
3108
- employmentType: z3.optional(z3.array(EmploymentTypeEnum)),
3109
- employmentLevel: z3.optional(EmploymentLevelEnum),
3110
- jobFunction: z3.optional(JobFunctionEnum),
3111
- publishStatus: PublishStatusEnum2,
3112
- bestFit: z3.optional(z3.array(BestFitEnum)),
3113
- clinicalLicense: z3.optional(z3.array(ClinicalLicenseEnum)),
3114
- shift: z3.optional(z3.array(ShiftEnum)),
3115
- clinicalSetting: z3.optional(z3.array(ClinicalSettingEnum)),
3116
- clinicalSpecialty: z3.optional(z3.array(ClinicalSpecialtyEnum)),
3117
- estimatedSalary: z3.optional(monetaryAmountSchema).describe("Determines the estimated salary for a given job posting"),
3118
- jobLocation: z3.optional(postalAddressSchema).describe("Determines the primary physical location where the job is to be performed. For remote roles, use applicantLocationRequirements"),
3119
- applicableOffices: z3.optional(z3.array(officeSchema)).describe("The physical location(s) in which employees may be located for to be eligible for the job. Used in conjunction with job_location_type."),
3120
- applicantLocationRequirements: z3.optional(z3.array(placeSchema)).describe("The geographic location(s) in which employees may be located for to be eligible for the job. The job description must clearly state that the applicant may be located in certain geographical location(s). This property is required if applicants may be located in one or more geographic locations and the job is 100% remote."),
3121
- hiringOrganization: z3.optional(companySchema).describe("The organization that is hiring for the role")
3122
- });
3123
-
3124
- // src/types/latest/custom/company_service_sanity.ts
3125
- import { z as z5 } from "zod";
3254
+ en: "Skilled Nursing Facility"
3255
+ }
3256
+ };
3257
+ var defaultMappings = {
3258
+ employmentType: employmentTypeDisplayText,
3259
+ unitText: unitTextDisplayText,
3260
+ currency: currencyDisplayText,
3261
+ employmentLevel: employmentLevelDisplayText,
3262
+ jobFunction: jobFunctionDisplayText,
3263
+ bestFit: bestFitDisplayText,
3264
+ clinicalSpecialty: clinicalSpecialtyDisplayText,
3265
+ clinicalSetting: clinicalSettingDisplayText,
3266
+ shift: shiftDisplayText
3267
+ };
3126
3268
 
3127
- // src/types/latest/custom/custom_sanity_models.ts
3128
- import { z as z4 } from "zod";
3129
- var sanityReferenceSchema = z4.object({
3130
- _ref: z4.string(),
3131
- _type: z4.string(),
3132
- _key: z4.optional(z4.string())
3133
- });
3134
- var sanitySlugSchema = z4.object({
3135
- current: z4.string(),
3136
- _type: z4.string(),
3137
- _key: z4.optional(z4.string())
3138
- });
3269
+ // src/types/displayText.errors.tsx
3270
+ var DisplayTextScopeNotFoundError = class extends Error {
3271
+ constructor(scope) {
3272
+ super(`No display text mapping found for scope: ${scope}`);
3273
+ this.name = "DisplayTextScopeNotFoundError";
3274
+ }
3275
+ };
3276
+ var DisplayTextValueNotFoundError = class extends Error {
3277
+ constructor(value, scope) {
3278
+ super(`No display text found for value: '${value}' in scope: '${scope}'`);
3279
+ this.name = "DisplayTextValueNotFoundError";
3280
+ }
3281
+ };
3139
3282
 
3140
- // src/types/latest/custom/company_service_sanity.ts
3141
- var foundingInformationSchema2 = foundingInformationSchema.extend({
3142
- _type: z5.string().describe("Document type used within sanity").default("companyFounding"),
3143
- founders: z5.optional(z5.union([z5.array(personSchema), z5.array(sanityReferenceSchema)])).nullable(),
3144
- founderList: z5.optional(z5.union([z5.array(personSchema), z5.array(sanityReferenceSchema)])).nullable()
3145
- }).omit({ type: true }).strict().transform((data) => ({
3146
- ...data,
3147
- type: data._type,
3148
- founders: data.founders || data.founderList || void 0
3149
- })).transform(({ _type, founderList, ...rest }) => rest);
3150
- var companyNdgSchema2 = companyNdgSchema.extend({
3151
- _type: z5.string().describe("Document type used within sanity").default("companyNDG"),
3152
- companyNDGTake: z5.string().nullable().describe("What is the NDG POV on this company?")
3153
- }).omit({ type: true }).strict().transform((data) => ({
3154
- ...data,
3155
- type: data._type,
3156
- companyNdgTake: data.companyNDGTake
3157
- })).transform(({ _type, companyNDGTake, ...rest }) => rest);
3158
- var ngdMetadataSchema2 = ngdMetadataSchema.extend({
3159
- _type: z5.string().describe("Document type used within sanity").default("ndgMetadata")
3160
- }).omit({ type: true }).transform((data) => ({
3161
- ...data,
3162
- type: data._type
3163
- })).transform(({ _type, ...rest }) => rest);
3164
- var companyPhilosophySchema2 = companyPhilosophySchema.extend({
3165
- _type: z5.string().describe("Document type used within sanity").default("companyPhilosophy")
3166
- }).omit({ type: true }).strict().transform((data) => ({
3167
- ...data,
3168
- type: data._type
3169
- })).transform(({ _type, ...rest }) => rest);
3170
- var companyCareersSchema2 = companyCareersSchema.extend({
3171
- _type: z5.string().describe("Document type used within sanity").default("companyCareers"),
3172
- companyBenefits: z5.optional(z5.array(
3173
- z5.union([companyBenefitsSchema, sanityReferenceSchema])
3174
- )).nullable().describe("What are the specific benefits of that company. The benefit is generic."),
3175
- jobBoard: z5.union([jobBoardSchema, sanityReferenceSchema]).nullable(),
3176
- jobBoardSlug: z5.optional(z5.union([z5.array(z5.string()), z5.array(sanitySlugSchema)]))
3177
- }).omit({ type: true }).strict().transform((data) => ({
3178
- ...data,
3179
- type: data._type
3180
- })).transform(({ _type, ...rest }) => rest);
3181
- var companySchema2 = companySchema.extend({
3182
- _id: z5.string().describe("The NDG specific id for a job posting in form of ndg-<company_slug>-<unique-job-id>. Serves as unique identifier. Cannot be changed."),
3183
- _rev: z5.string().nullable().describe("Revision number"),
3184
- _type: z5.string().describe("Document type used within sanity").default("company"),
3185
- _createdAt: z5.string().datetime().describe("Time document was created. Autoset by Sanity"),
3186
- _updatedAt: z5.string().datetime().describe("Time document was created. Autoset by Sanity"),
3187
- companyCareers: companyCareersSchema2.nullable().describe("Career Specific Information for the company."),
3188
- companyPhilosophy: companyPhilosophySchema2.nullable().describe("Company mission,values and how the company achieves its mission."),
3189
- companyNDG: companyNdgSchema2.nullable().describe("Next Degree specific information for the company."),
3190
- foundingInfo: foundingInformationSchema2.nullable(),
3191
- slug: z5.union([z5.string(), sanitySlugSchema]).describe("The NDG specific slug for a company."),
3192
- ndgMetadata: ngdMetadataSchema2.nullable(),
3193
- logo: z5.union([imageSchema, z5.record(z5.any())]).nullable().describe("The logo of the company"),
3194
- //Deprecated Models
3195
- logoImageURL: z5.optional(z5.string()).describe("The logo of the company"),
3196
- industryList: z5.optional(z5.array(sanityReferenceSchema)).describe("The industry of the company")
3197
- }).omit({ type: true, id: true, createdAt: true, updatedAt: true }).strict().transform((data) => ({
3198
- ...data,
3199
- type: data._type,
3200
- id: data._id,
3201
- createdAt: data._createdAt,
3202
- updatedAt: data._updatedAt,
3203
- rev: data._rev
3204
- })).transform(({ _type, _id, _rev, _createdAt, _updatedAt, ...rest }) => rest);
3283
+ // src/services/displayText.tsx
3284
+ var DisplayTextService = class {
3285
+ constructor(customMappings) {
3286
+ this.defaultLanguage = "en";
3287
+ this.mappings = {
3288
+ ...defaultMappings,
3289
+ // Use all pre-defined mappings as defaults
3290
+ ...customMappings
3291
+ // Override with any custom mappings if provided
3292
+ };
3293
+ }
3294
+ async getDisplayText(scope, value, language = this.defaultLanguage) {
3295
+ const scopeMapping = this.mappings[scope];
3296
+ if (!scopeMapping) {
3297
+ throw new DisplayTextScopeNotFoundError(scope);
3298
+ }
3299
+ if (Array.isArray(value)) {
3300
+ const displayTextPromises = value.map((v) => this.getDisplayText(scope, v, language));
3301
+ const displayTexts2 = await Promise.all(displayTextPromises);
3302
+ return displayTexts2.filter((v) => !!v).join(", ");
3303
+ }
3304
+ const displayTexts = scopeMapping[value];
3305
+ if (!displayTexts) {
3306
+ throw new DisplayTextValueNotFoundError(value, scope);
3307
+ }
3308
+ return displayTexts[language] || displayTexts[this.defaultLanguage] || value;
3309
+ }
3310
+ };
3205
3311
 
3206
- // src/types/latest/custom/job_posting_service_sanity.ts
3207
- import { z as z6 } from "zod";
3208
- var JobPostTypeEnum = z6.enum(["jobPost"]);
3209
- var MonetaryAmountTypeEnum = z6.enum(["monetaryAmount"]);
3210
- var postalAddressSchema2 = postalAddressSchema.extend({
3211
- _type: z6.string().describe("Document type used within sanity").default("address")
3212
- }).omit({ type: true }).strict().transform((data) => ({
3213
- ...data,
3214
- type: data._type
3215
- })).transform(({ _type, ...rest }) => rest);
3216
- var quantitativeValueSchema2 = quantitativeValueSchema.extend({
3217
- _type: z6.string().describe("Document type used within sanity").default("quantitativeValue")
3218
- }).omit({ type: true }).strict().transform((data) => ({
3219
- ...data,
3220
- type: data._type
3221
- })).transform(({ _type, ...rest }) => rest);
3222
- var monetaryAmountSchema2 = monetaryAmountSchema.extend({
3223
- _type: z6.string().describe("Document type used within sanity").default("monetaryAmount"),
3224
- value: quantitativeValueSchema2.optional().describe("The quantitative_value for a given salary")
3225
- }).omit({ type: true }).strict().transform((data) => ({
3226
- ...data,
3227
- type: data._type
3228
- })).transform(({ _type, ...rest }) => rest);
3229
- var jobPostSchema2 = jobPostSchema.extend({
3230
- // Override base fields with Sanity-specific fields
3231
- _id: z6.string().describe("The NDG specific id for a job posting in form of ndg-<company_slug>-<unique-job-id>. Serves as unique identifier. Cannot be changed.").regex(/^ndg-.*-.*$/),
3232
- _rev: z6.string().optional().describe("Revision number"),
3233
- _type: z6.string().describe("Document type used within sanity").default("jobPost"),
3234
- _createdAt: z6.string().datetime().describe("Time document was created. Autoset by Sanity"),
3235
- _updatedAt: z6.string().datetime().describe("Time document was created. Autoset by Sanity"),
3236
- // Override fields with new schemas
3237
- estimatedSalary: monetaryAmountSchema2.optional().describe("Determines the estimated salary for a given job posting"),
3238
- jobLocation: postalAddressSchema2.optional().describe("Determines the primary physical location where the job is to be performed. For remote roles, use applicantLocationRequirements"),
3239
- // Add Sanity-specific fields
3240
- ndgMetadata: z6.record(z6.any()).optional(),
3241
- ndgID: z6.string().optional(),
3242
- hiringOrganization: z6.optional(z6.union([sanityReferenceSchema, companySchema])),
3243
- raw: z6.record(z6.any()).optional(),
3244
- isLoaded: z6.boolean().default(false),
3245
- isVerified: z6.boolean().default(false),
3246
- needsReview: z6.boolean().default(false),
3247
- schema_version: z6.string().optional(),
3248
- origin: z6.string().optional(),
3249
- temp: z6.record(z6.any()).optional(),
3250
- applicationType: z6.string().optional(),
3251
- // Override clientId to use Sanity naming convention
3252
- clientID: z6.string()
3253
- }).omit({ type: true, id: true, createdAt: true, updatedAt: true, clientId: true }).transform((data) => ({
3254
- ...data,
3255
- type: data._type,
3256
- id: data._id,
3257
- createdAt: data._createdAt,
3258
- updatedAt: data._updatedAt,
3259
- rev: data._rev
3260
- })).transform(({ _type, _id, _rev, _createdAt, _updatedAt, ...rest }) => rest);
3312
+ // src/hooks/useDisplayText.ts
3313
+ var useDisplayText = (scope, value) => {
3314
+ const [displayText, setDisplayText] = useState9("");
3315
+ const displayService = useMemo2(() => new DisplayTextService(), []);
3316
+ useEffect9(() => {
3317
+ if (!displayService || !value) {
3318
+ setDisplayText("");
3319
+ return;
3320
+ }
3321
+ void (async () => {
3322
+ try {
3323
+ const result = await displayService.getDisplayText(scope, value);
3324
+ if (typeof result === "string") {
3325
+ setDisplayText(result);
3326
+ } else {
3327
+ console.error("Expected a string result, but got:", result);
3328
+ }
3329
+ } catch (error) {
3330
+ if (error instanceof DisplayTextValueNotFoundError) {
3331
+ console.warn("Display text value not found:", value);
3332
+ setDisplayText(String(value));
3333
+ } else {
3334
+ console.error("Unexpected error formatting text:", error);
3335
+ setDisplayText(String(value));
3336
+ }
3337
+ }
3338
+ })();
3339
+ }, [scope, value, displayService]);
3340
+ return displayText;
3341
+ };
3261
3342
 
3262
- // src/lib/salaryRange.ts
3263
- var CurrencyEnum2 = shared_pickle_output_latest_exports.CurrencyEnum;
3264
- function salaryRange(salary) {
3265
- if (!salary) return null;
3266
- let min = salary.minValue;
3267
- let max = salary.maxValue;
3268
- let single = salary.singleValue;
3269
- let value = salary.value;
3270
- let unitText = "YEAR";
3271
- const signs = {
3272
- [CurrencyEnum2.Values.USD]: "$",
3273
- [CurrencyEnum2.Values.GBP]: "\xA3",
3274
- [CurrencyEnum2.Values.EUR]: "\u20AC"
3275
- };
3276
- const sign = signs[salary.currency ?? CurrencyEnum2.Values.USD];
3277
- if (value != null && typeof value === "object") {
3278
- min = value.minValue;
3279
- max = value.maxValue;
3280
- single = value.value;
3281
- unitText = value.unitText;
3282
- }
3283
- if (unitText === "YEAR") unitText = "per year";
3284
- if (unitText === "MONTH") unitText = "per month";
3285
- if (unitText === "WEEK") unitText = "per week";
3286
- if (unitText === "DAY") unitText = "per day";
3287
- if (unitText === "PER_ACTIVITY") unitText = "per activity";
3288
- if (unitText === "HOUR") unitText = "per hour";
3289
- if (min == null && max == null && single == null) return null;
3290
- if (single != null) return sign + single.toLocaleString() + " " + unitText;
3291
- if (min === max) return sign + min?.toLocaleString() + " " + unitText;
3292
- if (min != null && max != null)
3293
- return sign + min?.toLocaleString() + " - " + sign + max?.toLocaleString() + " " + unitText;
3343
+ // src/lib/locations.ts
3344
+ function formattedAddress(address) {
3345
+ const { addressLocality, addressRegion, addressCountry } = address;
3346
+ if (addressLocality && addressRegion) return `${addressLocality}, ${addressRegion}`;
3347
+ if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry}`;
3348
+ if (addressRegion) return addressRegion;
3349
+ if (addressCountry) return addressCountry;
3294
3350
  return null;
3295
3351
  }
3352
+ function formattedJobLocation(job) {
3353
+ const address = job.jobLocation && formattedAddress(job.jobLocation);
3354
+ const remote = job.isRemote ? "Remote" : "";
3355
+ return [address, remote].filter(Boolean).join(" | ");
3356
+ }
3296
3357
 
3297
3358
  // src/components/jobPost/JobPost.tsx
3298
- import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
3359
+ import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
3299
3360
  function JobPost({
3300
3361
  job,
3301
3362
  bannerSrc,
@@ -3341,7 +3402,7 @@ function JobPost({
3341
3402
  label: formattedLocation
3342
3403
  }
3343
3404
  ].filter((t) => !!t);
3344
- return /* @__PURE__ */ jsxs25(
3405
+ return /* @__PURE__ */ jsxs26(
3345
3406
  "div",
3346
3407
  {
3347
3408
  className: cn(
@@ -3349,7 +3410,7 @@ function JobPost({
3349
3410
  !standalone && "border-1 rounded-3xl border-grey-5"
3350
3411
  ),
3351
3412
  children: [
3352
- /* @__PURE__ */ jsx40(
3413
+ /* @__PURE__ */ jsx41(
3353
3414
  JobHeader,
3354
3415
  {
3355
3416
  title: job.title,
@@ -3365,16 +3426,16 @@ function JobPost({
3365
3426
  tags
3366
3427
  }
3367
3428
  ),
3368
- /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-8 px-6", children: [
3369
- /* @__PURE__ */ jsx40(JobDescription, { description: job.description }),
3370
- /* @__PURE__ */ jsx40(
3429
+ /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-8 px-6", children: [
3430
+ /* @__PURE__ */ jsx41(JobDescription, { description: job.description }),
3431
+ /* @__PURE__ */ jsx41(
3371
3432
  CompanyTake,
3372
3433
  {
3373
3434
  avatarSrc,
3374
3435
  content: job.hiringOrganization?.companyNDG?.companyNDGTake
3375
3436
  }
3376
3437
  ),
3377
- /* @__PURE__ */ jsx40(
3438
+ /* @__PURE__ */ jsx41(
3378
3439
  CompanyInformation,
3379
3440
  {
3380
3441
  name: job.hiringOrganization?.companyName ?? "",
@@ -3384,7 +3445,7 @@ function JobPost({
3384
3445
  website: job.hiringOrganization?.companyWebsite
3385
3446
  }
3386
3447
  ),
3387
- /* @__PURE__ */ jsx40(
3448
+ /* @__PURE__ */ jsx41(
3388
3449
  CompanyBenefits,
3389
3450
  {
3390
3451
  benefits: job.hiringOrganization?.companyCareers?.companyBenefits?.map((b) => b.title).filter((d) => d !== void 0)
@@ -3396,6 +3457,24 @@ function JobPost({
3396
3457
  );
3397
3458
  }
3398
3459
 
3460
+ // src/components/jobCard/JobLocation.tsx
3461
+ import { MapPin as MapPin2 } from "lucide-react";
3462
+ import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
3463
+ function JobLocation({ mainLocation, extendedLocations }) {
3464
+ return /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", "data-testid": "job-card-location", children: [
3465
+ /* @__PURE__ */ jsx42(MapPin2, { size: 16 }),
3466
+ /* @__PURE__ */ jsx42("span", { className: "text-sm font-thin", children: mainLocation }),
3467
+ extendedLocations && /* @__PURE__ */ jsx42(TooltipProvider, { children: /* @__PURE__ */ jsxs27(Tooltip, { children: [
3468
+ /* @__PURE__ */ jsx42(TooltipTrigger, { children: /* @__PURE__ */ jsxs27("div", { className: "length-text group text-nowrap rounded-full bg-grey-5 px-2 py-1 text-sm font-bold text-gray-700 group-hover:cursor-pointer", children: [
3469
+ "+ ",
3470
+ extendedLocations.length,
3471
+ " more"
3472
+ ] }) }),
3473
+ /* @__PURE__ */ jsx42(TooltipContent, { className: "border-1 rounded-md border border-grey-5 bg-white p-2", children: extendedLocations.map((location) => /* @__PURE__ */ jsx42("div", { className: "text-nowrap text-sm", children: location }, location)) })
3474
+ ] }) })
3475
+ ] });
3476
+ }
3477
+
3399
3478
  // src/types/data/company_service_latest.ts
3400
3479
  var company_service_latest_exports2 = {};
3401
3480
  __export(company_service_latest_exports2, {
@@ -3698,11 +3777,13 @@ export {
3698
3777
  CompanyTake,
3699
3778
  Counter,
3700
3779
  DatePicker,
3780
+ DismissibleBanner,
3701
3781
  Icon,
3702
3782
  Input_default as Input,
3703
3783
  InputOtp,
3704
3784
  JobDescription,
3705
3785
  JobHeader,
3786
+ JobLocation,
3706
3787
  JobPost,
3707
3788
  job_posting_service_latest_exports2 as JobPostService,
3708
3789
  Label_default as Label,
@@ -3719,6 +3800,7 @@ export {
3719
3800
  WindowHistoryProvider,
3720
3801
  cn,
3721
3802
  fetchLocation,
3803
+ salaryRange,
3722
3804
  useDisplayText,
3723
3805
  useWindowHistory
3724
3806
  };