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