@burdenoff/website-sdk 2026.813.3 → 2026.817.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.d.mts +2 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/content/index.d.mts +74 -1
- package/dist/content/index.d.ts +74 -1
- package/dist/content/index.js +136 -0
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +133 -1
- package/dist/content/index.mjs.map +1 -1
- package/dist/{provider-DBAnqeTv.d.mts → graphql-client-Cv6TO6hn.d.mts} +1 -36
- package/dist/{provider-DBAnqeTv.d.ts → graphql-client-Cv6TO6hn.d.ts} +1 -36
- package/dist/index.d.mts +49 -4
- package/dist/index.d.ts +49 -4
- package/dist/index.js +443 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +437 -9
- package/dist/index.mjs.map +1 -1
- package/dist/provider-BhsbxVPo.d.mts +37 -0
- package/dist/provider-D-Do5PmD.d.ts +37 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var lucideReact = require('lucide-react');
|
|
6
|
-
var
|
|
6
|
+
var ReCAPTCHA4 = require('react-google-recaptcha');
|
|
7
7
|
var sonner = require('sonner');
|
|
8
8
|
var reactHelmetAsync = require('react-helmet-async');
|
|
9
9
|
var reactSlot = require('@radix-ui/react-slot');
|
|
@@ -41,7 +41,7 @@ function _interopNamespace(e) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
44
|
-
var
|
|
44
|
+
var ReCAPTCHA4__default = /*#__PURE__*/_interopDefault(ReCAPTCHA4);
|
|
45
45
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
46
46
|
var DOMPurify__default = /*#__PURE__*/_interopDefault(DOMPurify);
|
|
47
47
|
var ReactMarkdown__default = /*#__PURE__*/_interopDefault(ReactMarkdown);
|
|
@@ -1011,7 +1011,7 @@ function ContactPage({
|
|
|
1011
1011
|
] }),
|
|
1012
1012
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
1013
1013
|
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center sm:justify-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1014
|
-
|
|
1014
|
+
ReCAPTCHA4__default.default,
|
|
1015
1015
|
{
|
|
1016
1016
|
ref: recaptchaRef,
|
|
1017
1017
|
sitekey: effectiveRecaptchaSiteKey
|
|
@@ -1644,6 +1644,7 @@ async function submitApplication(client, data, productId) {
|
|
|
1644
1644
|
...data.linkedinUrl ? { linkedinUrl: data.linkedinUrl } : {},
|
|
1645
1645
|
...data.portfolioUrl ? { portfolioUrl: data.portfolioUrl } : {},
|
|
1646
1646
|
...data.coverLetter ? { coverLetter: data.coverLetter } : {},
|
|
1647
|
+
...data.jobPostingId ? { jobPostingId: data.jobPostingId } : {},
|
|
1647
1648
|
...data.recaptchaToken ? { recaptchaToken: data.recaptchaToken } : {}
|
|
1648
1649
|
}
|
|
1649
1650
|
});
|
|
@@ -1667,6 +1668,7 @@ function CareersApplyForm({
|
|
|
1667
1668
|
productName,
|
|
1668
1669
|
recaptchaSiteKey,
|
|
1669
1670
|
positions = [],
|
|
1671
|
+
postings = [],
|
|
1670
1672
|
heroTitle = "Become a part of the team",
|
|
1671
1673
|
heroDescription = "Tell us about yourself and upload your resume \u2014 we'll be in touch.",
|
|
1672
1674
|
headingLevel = 1,
|
|
@@ -1733,6 +1735,8 @@ function CareersApplyForm({
|
|
|
1733
1735
|
try {
|
|
1734
1736
|
const formData = new FormData(form);
|
|
1735
1737
|
const resumeBase64 = await fileToBase64(resumeFile);
|
|
1738
|
+
const positionValue = formData.get("position") ?? "";
|
|
1739
|
+
const selectedPosting = postings.length > 0 ? postings.find((p) => p.id === positionValue) : void 0;
|
|
1736
1740
|
const result = await submitApplication(
|
|
1737
1741
|
client,
|
|
1738
1742
|
{
|
|
@@ -1740,7 +1744,8 @@ function CareersApplyForm({
|
|
|
1740
1744
|
lastName: formData.get("lastName") ?? "",
|
|
1741
1745
|
email: formData.get("email") ?? "",
|
|
1742
1746
|
phone: formData.get("phone") || void 0,
|
|
1743
|
-
position:
|
|
1747
|
+
position: selectedPosting ? selectedPosting.title : positionValue,
|
|
1748
|
+
jobPostingId: selectedPosting?.id,
|
|
1744
1749
|
linkedinUrl: formData.get("linkedinUrl") || void 0,
|
|
1745
1750
|
portfolioUrl: formData.get("portfolioUrl") || void 0,
|
|
1746
1751
|
coverLetter: formData.get("coverLetter") || void 0,
|
|
@@ -1851,7 +1856,20 @@ function CareersApplyForm({
|
|
|
1851
1856
|
] }),
|
|
1852
1857
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1853
1858
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "position", children: "Position *" }),
|
|
1854
|
-
|
|
1859
|
+
postings.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1860
|
+
"select",
|
|
1861
|
+
{
|
|
1862
|
+
id: "position",
|
|
1863
|
+
name: "position",
|
|
1864
|
+
required: true,
|
|
1865
|
+
defaultValue: "",
|
|
1866
|
+
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
|
|
1867
|
+
children: [
|
|
1868
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: "Select a role" }),
|
|
1869
|
+
postings.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.id, children: p.title }, p.id))
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
) : positions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1855
1873
|
"select",
|
|
1856
1874
|
{
|
|
1857
1875
|
id: "position",
|
|
@@ -1959,7 +1977,7 @@ function CareersApplyForm({
|
|
|
1959
1977
|
)
|
|
1960
1978
|
] }),
|
|
1961
1979
|
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1962
|
-
|
|
1980
|
+
ReCAPTCHA4__default.default,
|
|
1963
1981
|
{
|
|
1964
1982
|
ref: recaptchaRef,
|
|
1965
1983
|
sitekey: effectiveRecaptchaSiteKey
|
|
@@ -1984,6 +2002,284 @@ function CareersApplyForm({
|
|
|
1984
2002
|
)
|
|
1985
2003
|
] });
|
|
1986
2004
|
}
|
|
2005
|
+
var SUBMIT_ASSIGNMENT_RESPONSE_MUTATION = (
|
|
2006
|
+
/* GraphQL */
|
|
2007
|
+
`
|
|
2008
|
+
mutation SubmitAssignmentResponse($input: SubmitAssignmentResponseInput!) {
|
|
2009
|
+
submitAssignmentResponse(input: $input) {
|
|
2010
|
+
success
|
|
2011
|
+
message
|
|
2012
|
+
applicationId
|
|
2013
|
+
roundId
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
`
|
|
2017
|
+
);
|
|
2018
|
+
function isValidUrl(value) {
|
|
2019
|
+
try {
|
|
2020
|
+
const url = new URL(value);
|
|
2021
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
2022
|
+
} catch {
|
|
2023
|
+
return false;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
async function submitAssignmentResponse(client, data) {
|
|
2027
|
+
try {
|
|
2028
|
+
const result = await client.mutate(SUBMIT_ASSIGNMENT_RESPONSE_MUTATION, {
|
|
2029
|
+
input: {
|
|
2030
|
+
email: data.email.trim().toLowerCase(),
|
|
2031
|
+
repoUrl: data.repoUrl.trim(),
|
|
2032
|
+
videoUrl: data.videoUrl.trim(),
|
|
2033
|
+
recaptchaToken: data.recaptchaToken ?? "",
|
|
2034
|
+
...data.name ? { name: data.name } : {},
|
|
2035
|
+
...data.position ? { position: data.position } : {},
|
|
2036
|
+
...data.jobPostingId ? { jobPostingId: data.jobPostingId } : {},
|
|
2037
|
+
...data.notes ? { notes: data.notes } : {}
|
|
2038
|
+
}
|
|
2039
|
+
});
|
|
2040
|
+
if (result.errors?.length) {
|
|
2041
|
+
return {
|
|
2042
|
+
success: false,
|
|
2043
|
+
message: result.errors[0]?.message ?? "Failed to submit assignment"
|
|
2044
|
+
};
|
|
2045
|
+
}
|
|
2046
|
+
const response = result.data?.submitAssignmentResponse;
|
|
2047
|
+
return response?.success ? { success: true, message: response.message || "Assignment submitted!" } : {
|
|
2048
|
+
success: false,
|
|
2049
|
+
message: response?.message || "Failed to submit assignment"
|
|
2050
|
+
};
|
|
2051
|
+
} catch (error) {
|
|
2052
|
+
console.error("Assignment submission error:", error);
|
|
2053
|
+
return { success: false, message: "Network error. Please try again." };
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
var NO_APPLICATION_HINT = "Please use the same email address you applied with \u2014 or submit an application first.";
|
|
2057
|
+
function isNoApplicationError(message) {
|
|
2058
|
+
return /no application|not found/i.test(message);
|
|
2059
|
+
}
|
|
2060
|
+
function CareersSubmissionForm({
|
|
2061
|
+
productName,
|
|
2062
|
+
recaptchaSiteKey,
|
|
2063
|
+
postings = [],
|
|
2064
|
+
heroTitle = "Submit your assignment",
|
|
2065
|
+
heroDescription = "Share your GitHub repo and a short video walkthrough \u2014 make sure to use the same email you applied with.",
|
|
2066
|
+
headingLevel = 1,
|
|
2067
|
+
className,
|
|
2068
|
+
seo
|
|
2069
|
+
}) {
|
|
2070
|
+
const client = useWebSDK();
|
|
2071
|
+
const config = useWebSDKConfig();
|
|
2072
|
+
const { product } = useProduct();
|
|
2073
|
+
const displayName = productName ?? product?.name ?? config.productId;
|
|
2074
|
+
const effectiveRecaptchaSiteKey = recaptchaSiteKey ?? product?.recaptchaSiteKey ?? config.recaptchaSiteKey ?? "";
|
|
2075
|
+
const recaptchaRef = React.useRef(null);
|
|
2076
|
+
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
2077
|
+
const [submittedMessage, setSubmittedMessage] = React.useState(null);
|
|
2078
|
+
const [formError, setFormError] = React.useState(null);
|
|
2079
|
+
const handleSubmit = async (e) => {
|
|
2080
|
+
e.preventDefault();
|
|
2081
|
+
setFormError(null);
|
|
2082
|
+
const recaptchaToken = recaptchaRef.current?.getValue() ?? "";
|
|
2083
|
+
if (effectiveRecaptchaSiteKey && !recaptchaToken) {
|
|
2084
|
+
sonner.toast.error("Please complete the reCAPTCHA verification");
|
|
2085
|
+
return;
|
|
2086
|
+
}
|
|
2087
|
+
const form = e.currentTarget;
|
|
2088
|
+
const formData = new FormData(form);
|
|
2089
|
+
const name = (formData.get("name") ?? "").trim();
|
|
2090
|
+
const email = (formData.get("email") ?? "").trim();
|
|
2091
|
+
const positionValue = (formData.get("position") ?? "").trim();
|
|
2092
|
+
const repoUrl = (formData.get("repoUrl") ?? "").trim();
|
|
2093
|
+
const videoUrl = (formData.get("videoUrl") ?? "").trim();
|
|
2094
|
+
const notes = (formData.get("notes") ?? "").trim();
|
|
2095
|
+
const selectedPosting = postings.length > 0 ? postings.find((p) => p.id === positionValue) : void 0;
|
|
2096
|
+
const position = selectedPosting ? selectedPosting.title : positionValue;
|
|
2097
|
+
if (!email) {
|
|
2098
|
+
setFormError("Please enter the email address you applied with.");
|
|
2099
|
+
return;
|
|
2100
|
+
}
|
|
2101
|
+
if (!position) {
|
|
2102
|
+
setFormError("Please select or enter the position you applied for.");
|
|
2103
|
+
return;
|
|
2104
|
+
}
|
|
2105
|
+
if (!repoUrl || !isValidUrl(repoUrl)) {
|
|
2106
|
+
setFormError(
|
|
2107
|
+
"Please enter a valid GitHub repository URL (e.g. https://github.com/you/project)."
|
|
2108
|
+
);
|
|
2109
|
+
return;
|
|
2110
|
+
}
|
|
2111
|
+
if (!videoUrl || !isValidUrl(videoUrl)) {
|
|
2112
|
+
setFormError(
|
|
2113
|
+
"Please enter a valid video URL (e.g. a Jam or Loom link starting with https://)."
|
|
2114
|
+
);
|
|
2115
|
+
return;
|
|
2116
|
+
}
|
|
2117
|
+
setIsSubmitting(true);
|
|
2118
|
+
try {
|
|
2119
|
+
const result = await submitAssignmentResponse(client, {
|
|
2120
|
+
name: name || void 0,
|
|
2121
|
+
email,
|
|
2122
|
+
position,
|
|
2123
|
+
jobPostingId: selectedPosting?.id,
|
|
2124
|
+
repoUrl,
|
|
2125
|
+
videoUrl,
|
|
2126
|
+
notes: notes || void 0,
|
|
2127
|
+
recaptchaToken
|
|
2128
|
+
});
|
|
2129
|
+
if (result.success) {
|
|
2130
|
+
setSubmittedMessage(result.message ?? "Assignment submitted!");
|
|
2131
|
+
sonner.toast.success(result.message ?? "Assignment submitted!");
|
|
2132
|
+
} else {
|
|
2133
|
+
const message = result.message ?? "Failed to submit assignment";
|
|
2134
|
+
setFormError(
|
|
2135
|
+
isNoApplicationError(message) ? `${message} ${NO_APPLICATION_HINT}` : message
|
|
2136
|
+
);
|
|
2137
|
+
sonner.toast.error(message);
|
|
2138
|
+
recaptchaRef.current?.reset();
|
|
2139
|
+
}
|
|
2140
|
+
} catch (err) {
|
|
2141
|
+
console.error("Careers submission form error:", err);
|
|
2142
|
+
setFormError("Something went wrong. Please try again.");
|
|
2143
|
+
sonner.toast.error("Something went wrong. Please try again.");
|
|
2144
|
+
recaptchaRef.current?.reset();
|
|
2145
|
+
} finally {
|
|
2146
|
+
setIsSubmitting(false);
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2149
|
+
const Heading = headingLevel === 2 ? "h2" : "h1";
|
|
2150
|
+
const headingClass = headingLevel === 2 ? "text-2xl md:text-3xl font-bold mb-3" : "text-3xl sm:text-4xl md:text-5xl font-bold mb-4 sm:mb-6";
|
|
2151
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
2152
|
+
seo && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2153
|
+
PageHead,
|
|
2154
|
+
{
|
|
2155
|
+
title: seo.title ?? `Submit your assignment \u2014 ${displayName}`,
|
|
2156
|
+
description: seo.description ?? heroDescription,
|
|
2157
|
+
keywords: seo.keywords
|
|
2158
|
+
}
|
|
2159
|
+
),
|
|
2160
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2161
|
+
"section",
|
|
2162
|
+
{
|
|
2163
|
+
className: headingLevel === 2 ? "py-12 md:py-16" : "bg-gradient-to-b from-background to-muted/20 py-12 sm:py-16 md:py-20 lg:py-24",
|
|
2164
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-3xl mx-auto px-4 sm:px-6 lg:px-8", children: [
|
|
2165
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-8 sm:mb-10", children: [
|
|
2166
|
+
/* @__PURE__ */ jsxRuntime.jsx(Heading, { className: headingClass, children: heroTitle }),
|
|
2167
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-muted-foreground leading-relaxed", children: heroDescription })
|
|
2168
|
+
] }),
|
|
2169
|
+
submittedMessage ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center rounded-xl border border-border bg-card p-10", children: [
|
|
2170
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "mx-auto mb-4 h-12 w-12 text-accent" }),
|
|
2171
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: "Assignment received" }),
|
|
2172
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: submittedMessage })
|
|
2173
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-5", children: [
|
|
2174
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-5", children: [
|
|
2175
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2176
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "name", children: "Name" }),
|
|
2177
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { id: "name", name: "name", placeholder: "Ada Lovelace" })
|
|
2178
|
+
] }),
|
|
2179
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2180
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "email", children: "Email *" }),
|
|
2181
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2182
|
+
Input,
|
|
2183
|
+
{
|
|
2184
|
+
id: "email",
|
|
2185
|
+
name: "email",
|
|
2186
|
+
type: "email",
|
|
2187
|
+
required: true,
|
|
2188
|
+
placeholder: "ada@example.com"
|
|
2189
|
+
}
|
|
2190
|
+
)
|
|
2191
|
+
] })
|
|
2192
|
+
] }),
|
|
2193
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2194
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "position", children: "Position *" }),
|
|
2195
|
+
postings.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2196
|
+
"select",
|
|
2197
|
+
{
|
|
2198
|
+
id: "position",
|
|
2199
|
+
name: "position",
|
|
2200
|
+
required: true,
|
|
2201
|
+
defaultValue: "",
|
|
2202
|
+
className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
|
|
2203
|
+
children: [
|
|
2204
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: "Select a role" }),
|
|
2205
|
+
postings.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.id, children: p.title }, p.id))
|
|
2206
|
+
]
|
|
2207
|
+
}
|
|
2208
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2209
|
+
Input,
|
|
2210
|
+
{
|
|
2211
|
+
id: "position",
|
|
2212
|
+
name: "position",
|
|
2213
|
+
required: true,
|
|
2214
|
+
placeholder: "Role you applied for"
|
|
2215
|
+
}
|
|
2216
|
+
)
|
|
2217
|
+
] }),
|
|
2218
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2219
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "repoUrl", children: "GitHub repository URL *" }),
|
|
2220
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2221
|
+
Input,
|
|
2222
|
+
{
|
|
2223
|
+
id: "repoUrl",
|
|
2224
|
+
name: "repoUrl",
|
|
2225
|
+
type: "url",
|
|
2226
|
+
required: true,
|
|
2227
|
+
placeholder: "https://github.com/you/assignment"
|
|
2228
|
+
}
|
|
2229
|
+
)
|
|
2230
|
+
] }),
|
|
2231
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2232
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "videoUrl", children: "Video walkthrough URL (Jam, Loom, \u2026) *" }),
|
|
2233
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2234
|
+
Input,
|
|
2235
|
+
{
|
|
2236
|
+
id: "videoUrl",
|
|
2237
|
+
name: "videoUrl",
|
|
2238
|
+
type: "url",
|
|
2239
|
+
required: true,
|
|
2240
|
+
placeholder: "https://jam.dev/c/\u2026"
|
|
2241
|
+
}
|
|
2242
|
+
)
|
|
2243
|
+
] }),
|
|
2244
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2245
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "notes", children: "Notes" }),
|
|
2246
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2247
|
+
Textarea,
|
|
2248
|
+
{
|
|
2249
|
+
id: "notes",
|
|
2250
|
+
name: "notes",
|
|
2251
|
+
rows: 4,
|
|
2252
|
+
placeholder: "Anything we should know before reviewing\u2026"
|
|
2253
|
+
}
|
|
2254
|
+
)
|
|
2255
|
+
] }),
|
|
2256
|
+
formError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: formError }),
|
|
2257
|
+
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2258
|
+
ReCAPTCHA4__default.default,
|
|
2259
|
+
{
|
|
2260
|
+
ref: recaptchaRef,
|
|
2261
|
+
sitekey: effectiveRecaptchaSiteKey
|
|
2262
|
+
}
|
|
2263
|
+
),
|
|
2264
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2265
|
+
Button,
|
|
2266
|
+
{
|
|
2267
|
+
type: "submit",
|
|
2268
|
+
size: "lg",
|
|
2269
|
+
disabled: isSubmitting,
|
|
2270
|
+
className: "w-full sm:w-auto",
|
|
2271
|
+
children: isSubmitting ? "Submitting\u2026" : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2272
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { className: "mr-2 h-4 w-4" }),
|
|
2273
|
+
" Submit assignment"
|
|
2274
|
+
] })
|
|
2275
|
+
}
|
|
2276
|
+
)
|
|
2277
|
+
] })
|
|
2278
|
+
] })
|
|
2279
|
+
}
|
|
2280
|
+
)
|
|
2281
|
+
] });
|
|
2282
|
+
}
|
|
1987
2283
|
var newsletterSchema = zod.z.object({
|
|
1988
2284
|
email: zod.z.string().email("Please enter a valid email address")
|
|
1989
2285
|
});
|
|
@@ -2273,7 +2569,7 @@ function NewsletterPage({
|
|
|
2273
2569
|
errors.email && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: errors.email.message })
|
|
2274
2570
|
] }),
|
|
2275
2571
|
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2276
|
-
|
|
2572
|
+
ReCAPTCHA4__default.default,
|
|
2277
2573
|
{
|
|
2278
2574
|
ref: recaptchaRef,
|
|
2279
2575
|
sitekey: effectiveRecaptchaSiteKey
|
|
@@ -2325,7 +2621,7 @@ function NewsletterPage({
|
|
|
2325
2621
|
errors.email && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: errors.email.message })
|
|
2326
2622
|
] }),
|
|
2327
2623
|
effectiveRecaptchaSiteKey && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center sm:justify-start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2328
|
-
|
|
2624
|
+
ReCAPTCHA4__default.default,
|
|
2329
2625
|
{
|
|
2330
2626
|
ref: recaptchaRef,
|
|
2331
2627
|
sitekey: effectiveRecaptchaSiteKey
|
|
@@ -2503,7 +2799,7 @@ function NewsletterForm({
|
|
|
2503
2799
|
justifyContent: "flex-start"
|
|
2504
2800
|
},
|
|
2505
2801
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2506
|
-
|
|
2802
|
+
ReCAPTCHA4__default.default,
|
|
2507
2803
|
{
|
|
2508
2804
|
ref: recaptchaRef,
|
|
2509
2805
|
sitekey: effectiveRecaptchaSiteKey,
|
|
@@ -4419,6 +4715,138 @@ function RybbitAnalytics({
|
|
|
4419
4715
|
}, [siteId, scriptUrl, enabled]);
|
|
4420
4716
|
return null;
|
|
4421
4717
|
}
|
|
4718
|
+
var PUBLIC_JOB_POSTING_FIELDS = (
|
|
4719
|
+
/* GraphQL */
|
|
4720
|
+
`
|
|
4721
|
+
id
|
|
4722
|
+
slug
|
|
4723
|
+
title
|
|
4724
|
+
department
|
|
4725
|
+
location
|
|
4726
|
+
employmentType
|
|
4727
|
+
openings
|
|
4728
|
+
description
|
|
4729
|
+
overview
|
|
4730
|
+
responsibilities
|
|
4731
|
+
learnings
|
|
4732
|
+
qualifications
|
|
4733
|
+
rounds {
|
|
4734
|
+
roundNumber
|
|
4735
|
+
name
|
|
4736
|
+
roundType
|
|
4737
|
+
isRequired
|
|
4738
|
+
description
|
|
4739
|
+
}
|
|
4740
|
+
`
|
|
4741
|
+
);
|
|
4742
|
+
var PUBLIC_JOB_POSTINGS_QUERY = (
|
|
4743
|
+
/* GraphQL */
|
|
4744
|
+
`
|
|
4745
|
+
query PublicJobPostings($productId: ID, $limit: Int, $offset: Int) {
|
|
4746
|
+
publicJobPostings(productId: $productId, limit: $limit, offset: $offset) {
|
|
4747
|
+
${PUBLIC_JOB_POSTING_FIELDS}
|
|
4748
|
+
}
|
|
4749
|
+
}
|
|
4750
|
+
`
|
|
4751
|
+
);
|
|
4752
|
+
var PUBLIC_JOB_POSTING_QUERY = (
|
|
4753
|
+
/* GraphQL */
|
|
4754
|
+
`
|
|
4755
|
+
query PublicJobPosting($slug: String!, $productId: ID) {
|
|
4756
|
+
publicJobPosting(slug: $slug, productId: $productId) {
|
|
4757
|
+
${PUBLIC_JOB_POSTING_FIELDS}
|
|
4758
|
+
}
|
|
4759
|
+
}
|
|
4760
|
+
`
|
|
4761
|
+
);
|
|
4762
|
+
async function fetchPublicJobPostings(client, options) {
|
|
4763
|
+
const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
|
|
4764
|
+
productId: options?.productId,
|
|
4765
|
+
limit: options?.limit ?? 50,
|
|
4766
|
+
offset: options?.offset ?? 0
|
|
4767
|
+
});
|
|
4768
|
+
if (result.errors?.length) {
|
|
4769
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
4770
|
+
}
|
|
4771
|
+
return result.data?.publicJobPostings ?? [];
|
|
4772
|
+
}
|
|
4773
|
+
async function fetchPublicJobPosting(client, slug, options) {
|
|
4774
|
+
const result = await client.query(PUBLIC_JOB_POSTING_QUERY, {
|
|
4775
|
+
slug,
|
|
4776
|
+
productId: options?.productId
|
|
4777
|
+
});
|
|
4778
|
+
if (result.errors?.length) {
|
|
4779
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
4780
|
+
}
|
|
4781
|
+
return result.data?.publicJobPosting ?? null;
|
|
4782
|
+
}
|
|
4783
|
+
function usePublicJobPostings(options) {
|
|
4784
|
+
const client = useWebSDK();
|
|
4785
|
+
const config = useWebSDKConfig();
|
|
4786
|
+
const { product } = useProduct();
|
|
4787
|
+
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
4788
|
+
const [postings, setPostings] = React.useState([]);
|
|
4789
|
+
const [loading, setLoading] = React.useState(true);
|
|
4790
|
+
const [error, setError] = React.useState(null);
|
|
4791
|
+
const fetchPostings = React.useCallback(async () => {
|
|
4792
|
+
setLoading(true);
|
|
4793
|
+
setError(null);
|
|
4794
|
+
try {
|
|
4795
|
+
const items = await fetchPublicJobPostings(client, {
|
|
4796
|
+
productId: resolvedProductId,
|
|
4797
|
+
limit: options?.limit,
|
|
4798
|
+
offset: options?.offset
|
|
4799
|
+
});
|
|
4800
|
+
setPostings(items);
|
|
4801
|
+
} catch (err) {
|
|
4802
|
+
setError(
|
|
4803
|
+
err instanceof Error ? err.message : "Failed to fetch job postings"
|
|
4804
|
+
);
|
|
4805
|
+
setPostings([]);
|
|
4806
|
+
} finally {
|
|
4807
|
+
setLoading(false);
|
|
4808
|
+
}
|
|
4809
|
+
}, [client, resolvedProductId, options?.limit, options?.offset]);
|
|
4810
|
+
React.useEffect(() => {
|
|
4811
|
+
fetchPostings();
|
|
4812
|
+
}, [fetchPostings]);
|
|
4813
|
+
return { postings, loading, error, refetch: fetchPostings };
|
|
4814
|
+
}
|
|
4815
|
+
function usePublicJobPosting(slug, options) {
|
|
4816
|
+
const client = useWebSDK();
|
|
4817
|
+
const config = useWebSDKConfig();
|
|
4818
|
+
const { product } = useProduct();
|
|
4819
|
+
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
4820
|
+
const [posting, setPosting] = React.useState(null);
|
|
4821
|
+
const [loading, setLoading] = React.useState(true);
|
|
4822
|
+
const [error, setError] = React.useState(null);
|
|
4823
|
+
const fetchPosting = React.useCallback(async () => {
|
|
4824
|
+
if (!slug) {
|
|
4825
|
+
setPosting(null);
|
|
4826
|
+
setLoading(false);
|
|
4827
|
+
return;
|
|
4828
|
+
}
|
|
4829
|
+
setLoading(true);
|
|
4830
|
+
setError(null);
|
|
4831
|
+
try {
|
|
4832
|
+
const item = await fetchPublicJobPosting(client, slug, {
|
|
4833
|
+
productId: resolvedProductId
|
|
4834
|
+
});
|
|
4835
|
+
setPosting(item);
|
|
4836
|
+
} catch (err) {
|
|
4837
|
+
setError(
|
|
4838
|
+
err instanceof Error ? err.message : "Failed to fetch job posting"
|
|
4839
|
+
);
|
|
4840
|
+
setPosting(null);
|
|
4841
|
+
} finally {
|
|
4842
|
+
setLoading(false);
|
|
4843
|
+
}
|
|
4844
|
+
}, [client, resolvedProductId, slug]);
|
|
4845
|
+
React.useEffect(() => {
|
|
4846
|
+
fetchPosting();
|
|
4847
|
+
}, [fetchPosting]);
|
|
4848
|
+
return { posting, loading, error, refetch: fetchPosting };
|
|
4849
|
+
}
|
|
4422
4850
|
var PROSE_CSS = `
|
|
4423
4851
|
.boff-prose {
|
|
4424
4852
|
max-width: none;
|
|
@@ -9117,6 +9545,7 @@ exports.BlogListPage = BlogListPage;
|
|
|
9117
9545
|
exports.BlogPostPage = BlogPostPage;
|
|
9118
9546
|
exports.Button = Button;
|
|
9119
9547
|
exports.CareersApplyForm = CareersApplyForm;
|
|
9548
|
+
exports.CareersSubmissionForm = CareersSubmissionForm;
|
|
9120
9549
|
exports.CaseStudiesListPage = CaseStudiesListPage;
|
|
9121
9550
|
exports.CaseStudyPage = CaseStudyPage;
|
|
9122
9551
|
exports.ChangelogPage = ChangelogPage;
|
|
@@ -9159,12 +9588,17 @@ exports.WebsiteSwitcher = WebsiteSwitcher;
|
|
|
9159
9588
|
exports.buttonVariants = buttonVariants;
|
|
9160
9589
|
exports.cn = cn;
|
|
9161
9590
|
exports.detectElectronPlatform = detectElectronPlatform;
|
|
9591
|
+
exports.fetchPublicJobPosting = fetchPublicJobPosting;
|
|
9592
|
+
exports.fetchPublicJobPostings = fetchPublicJobPostings;
|
|
9162
9593
|
exports.formatDownloads = formatDownloads;
|
|
9163
9594
|
exports.formatPrice = formatPrice2;
|
|
9595
|
+
exports.isValidUrl = isValidUrl;
|
|
9164
9596
|
exports.useContentPage = useContentPage;
|
|
9165
9597
|
exports.useContentPages = useContentPages;
|
|
9166
9598
|
exports.useProduct = useProduct;
|
|
9167
9599
|
exports.useProductConfig = useProductConfig;
|
|
9600
|
+
exports.usePublicJobPosting = usePublicJobPosting;
|
|
9601
|
+
exports.usePublicJobPostings = usePublicJobPostings;
|
|
9168
9602
|
exports.useWebSDK = useWebSDK;
|
|
9169
9603
|
exports.useWebSDKConfig = useWebSDKConfig;
|
|
9170
9604
|
//# sourceMappingURL=index.js.map
|