@burdenoff/website-sdk 2026.813.2 → 2026.817.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.
package/dist/index.mjs CHANGED
@@ -1614,6 +1614,7 @@ async function submitApplication(client, data, productId) {
1614
1614
  ...data.linkedinUrl ? { linkedinUrl: data.linkedinUrl } : {},
1615
1615
  ...data.portfolioUrl ? { portfolioUrl: data.portfolioUrl } : {},
1616
1616
  ...data.coverLetter ? { coverLetter: data.coverLetter } : {},
1617
+ ...data.jobPostingId ? { jobPostingId: data.jobPostingId } : {},
1617
1618
  ...data.recaptchaToken ? { recaptchaToken: data.recaptchaToken } : {}
1618
1619
  }
1619
1620
  });
@@ -1637,6 +1638,7 @@ function CareersApplyForm({
1637
1638
  productName,
1638
1639
  recaptchaSiteKey,
1639
1640
  positions = [],
1641
+ postings = [],
1640
1642
  heroTitle = "Become a part of the team",
1641
1643
  heroDescription = "Tell us about yourself and upload your resume \u2014 we'll be in touch.",
1642
1644
  headingLevel = 1,
@@ -1703,6 +1705,8 @@ function CareersApplyForm({
1703
1705
  try {
1704
1706
  const formData = new FormData(form);
1705
1707
  const resumeBase64 = await fileToBase64(resumeFile);
1708
+ const positionValue = formData.get("position") ?? "";
1709
+ const selectedPosting = postings.length > 0 ? postings.find((p) => p.id === positionValue) : void 0;
1706
1710
  const result = await submitApplication(
1707
1711
  client,
1708
1712
  {
@@ -1710,7 +1714,8 @@ function CareersApplyForm({
1710
1714
  lastName: formData.get("lastName") ?? "",
1711
1715
  email: formData.get("email") ?? "",
1712
1716
  phone: formData.get("phone") || void 0,
1713
- position: formData.get("position") ?? "",
1717
+ position: selectedPosting ? selectedPosting.title : positionValue,
1718
+ jobPostingId: selectedPosting?.id,
1714
1719
  linkedinUrl: formData.get("linkedinUrl") || void 0,
1715
1720
  portfolioUrl: formData.get("portfolioUrl") || void 0,
1716
1721
  coverLetter: formData.get("coverLetter") || void 0,
@@ -1821,7 +1826,20 @@ function CareersApplyForm({
1821
1826
  ] }),
1822
1827
  /* @__PURE__ */ jsxs("div", { children: [
1823
1828
  /* @__PURE__ */ jsx(Label, { htmlFor: "position", children: "Position *" }),
1824
- positions.length > 0 ? /* @__PURE__ */ jsxs(
1829
+ postings.length > 0 ? /* @__PURE__ */ jsxs(
1830
+ "select",
1831
+ {
1832
+ id: "position",
1833
+ name: "position",
1834
+ required: true,
1835
+ defaultValue: "",
1836
+ 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",
1837
+ children: [
1838
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select a role" }),
1839
+ postings.map((p) => /* @__PURE__ */ jsx("option", { value: p.id, children: p.title }, p.id))
1840
+ ]
1841
+ }
1842
+ ) : positions.length > 0 ? /* @__PURE__ */ jsxs(
1825
1843
  "select",
1826
1844
  {
1827
1845
  id: "position",
@@ -4389,6 +4407,138 @@ function RybbitAnalytics({
4389
4407
  }, [siteId, scriptUrl, enabled]);
4390
4408
  return null;
4391
4409
  }
4410
+ var PUBLIC_JOB_POSTING_FIELDS = (
4411
+ /* GraphQL */
4412
+ `
4413
+ id
4414
+ slug
4415
+ title
4416
+ department
4417
+ location
4418
+ employmentType
4419
+ openings
4420
+ description
4421
+ overview
4422
+ responsibilities
4423
+ learnings
4424
+ qualifications
4425
+ rounds {
4426
+ roundNumber
4427
+ name
4428
+ roundType
4429
+ isRequired
4430
+ description
4431
+ }
4432
+ `
4433
+ );
4434
+ var PUBLIC_JOB_POSTINGS_QUERY = (
4435
+ /* GraphQL */
4436
+ `
4437
+ query PublicJobPostings($productId: ID, $limit: Int, $offset: Int) {
4438
+ publicJobPostings(productId: $productId, limit: $limit, offset: $offset) {
4439
+ ${PUBLIC_JOB_POSTING_FIELDS}
4440
+ }
4441
+ }
4442
+ `
4443
+ );
4444
+ var PUBLIC_JOB_POSTING_QUERY = (
4445
+ /* GraphQL */
4446
+ `
4447
+ query PublicJobPosting($slug: String!, $productId: ID) {
4448
+ publicJobPosting(slug: $slug, productId: $productId) {
4449
+ ${PUBLIC_JOB_POSTING_FIELDS}
4450
+ }
4451
+ }
4452
+ `
4453
+ );
4454
+ async function fetchPublicJobPostings(client, options) {
4455
+ const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
4456
+ productId: options?.productId,
4457
+ limit: options?.limit ?? 50,
4458
+ offset: options?.offset ?? 0
4459
+ });
4460
+ if (result.errors?.length) {
4461
+ throw new Error(result.errors[0]?.message ?? "Unknown error");
4462
+ }
4463
+ return result.data?.publicJobPostings ?? [];
4464
+ }
4465
+ async function fetchPublicJobPosting(client, slug, options) {
4466
+ const result = await client.query(PUBLIC_JOB_POSTING_QUERY, {
4467
+ slug,
4468
+ productId: options?.productId
4469
+ });
4470
+ if (result.errors?.length) {
4471
+ throw new Error(result.errors[0]?.message ?? "Unknown error");
4472
+ }
4473
+ return result.data?.publicJobPosting ?? null;
4474
+ }
4475
+ function usePublicJobPostings(options) {
4476
+ const client = useWebSDK();
4477
+ const config = useWebSDKConfig();
4478
+ const { product } = useProduct();
4479
+ const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
4480
+ const [postings, setPostings] = useState([]);
4481
+ const [loading, setLoading] = useState(true);
4482
+ const [error, setError] = useState(null);
4483
+ const fetchPostings = useCallback(async () => {
4484
+ setLoading(true);
4485
+ setError(null);
4486
+ try {
4487
+ const items = await fetchPublicJobPostings(client, {
4488
+ productId: resolvedProductId,
4489
+ limit: options?.limit,
4490
+ offset: options?.offset
4491
+ });
4492
+ setPostings(items);
4493
+ } catch (err) {
4494
+ setError(
4495
+ err instanceof Error ? err.message : "Failed to fetch job postings"
4496
+ );
4497
+ setPostings([]);
4498
+ } finally {
4499
+ setLoading(false);
4500
+ }
4501
+ }, [client, resolvedProductId, options?.limit, options?.offset]);
4502
+ useEffect(() => {
4503
+ fetchPostings();
4504
+ }, [fetchPostings]);
4505
+ return { postings, loading, error, refetch: fetchPostings };
4506
+ }
4507
+ function usePublicJobPosting(slug, options) {
4508
+ const client = useWebSDK();
4509
+ const config = useWebSDKConfig();
4510
+ const { product } = useProduct();
4511
+ const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
4512
+ const [posting, setPosting] = useState(null);
4513
+ const [loading, setLoading] = useState(true);
4514
+ const [error, setError] = useState(null);
4515
+ const fetchPosting = useCallback(async () => {
4516
+ if (!slug) {
4517
+ setPosting(null);
4518
+ setLoading(false);
4519
+ return;
4520
+ }
4521
+ setLoading(true);
4522
+ setError(null);
4523
+ try {
4524
+ const item = await fetchPublicJobPosting(client, slug, {
4525
+ productId: resolvedProductId
4526
+ });
4527
+ setPosting(item);
4528
+ } catch (err) {
4529
+ setError(
4530
+ err instanceof Error ? err.message : "Failed to fetch job posting"
4531
+ );
4532
+ setPosting(null);
4533
+ } finally {
4534
+ setLoading(false);
4535
+ }
4536
+ }, [client, resolvedProductId, slug]);
4537
+ useEffect(() => {
4538
+ fetchPosting();
4539
+ }, [fetchPosting]);
4540
+ return { posting, loading, error, refetch: fetchPosting };
4541
+ }
4392
4542
  var PROSE_CSS = `
4393
4543
  .boff-prose {
4394
4544
  max-width: none;
@@ -9083,6 +9233,6 @@ var ECOSYSTEM_PRODUCTS = [
9083
9233
  }
9084
9234
  ];
9085
9235
 
9086
- export { BlogListPage, BlogPostPage, Button, CareersApplyForm, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContactPage, ContentRenderer, ContractsPage, DEFAULT_CONTACT_CATEGORIES, ECOSYSTEM_PRODUCTS, ElectronDownloadLink, Input, Label, LaunchCountdown, Markdown, NewsletterForm, NewsletterPage, PageHead, PartnersPage, PressKitPage, PricingPage, PricingSection, ProblemsSolvedSection, ProductCard, ProductProvider, ResourceLinks, RybbitAnalytics, Select, SocialLinks, StarRating, StoreBrowsePage, StoreHomePage, StoreProductDetailPage, Textarea, TypeBadge, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, WebsiteSwitcher, buttonVariants, cn, detectElectronPlatform, formatDownloads, formatPrice2 as formatPrice, useContentPage, useContentPages, useProduct, useProductConfig, useWebSDK, useWebSDKConfig };
9236
+ export { BlogListPage, BlogPostPage, Button, CareersApplyForm, CaseStudiesListPage, CaseStudyPage, ChangelogPage, ContactPage, ContentRenderer, ContractsPage, DEFAULT_CONTACT_CATEGORIES, ECOSYSTEM_PRODUCTS, ElectronDownloadLink, Input, Label, LaunchCountdown, Markdown, NewsletterForm, NewsletterPage, PageHead, PartnersPage, PressKitPage, PricingPage, PricingSection, ProblemsSolvedSection, ProductCard, ProductProvider, ResourceLinks, RybbitAnalytics, Select, SocialLinks, StarRating, StoreBrowsePage, StoreHomePage, StoreProductDetailPage, Textarea, TypeBadge, UnsubscribePage, WaitlistForm, WaitlistPage, WebSDKClient, WebSDKProvider, WebsiteSwitcher, buttonVariants, cn, detectElectronPlatform, fetchPublicJobPosting, fetchPublicJobPostings, formatDownloads, formatPrice2 as formatPrice, useContentPage, useContentPages, useProduct, useProductConfig, usePublicJobPosting, usePublicJobPostings, useWebSDK, useWebSDKConfig };
9087
9237
  //# sourceMappingURL=index.mjs.map
9088
9238
  //# sourceMappingURL=index.mjs.map