@burdenoff/website-sdk 2026.1021.1 → 2026.1021.3
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/README.md +58 -0
- package/dist/components/partners.js.map +1 -1
- package/dist/components/partners.mjs.map +1 -1
- package/dist/content/index.d.mts +1 -1
- package/dist/content/index.d.ts +1 -1
- package/dist/content/index.js +421 -198
- package/dist/content/index.js.map +1 -1
- package/dist/content/index.mjs +414 -199
- package/dist/content/index.mjs.map +1 -1
- package/dist/{index-ySbOLSD5.d.ts → index-CB0Uw1xD.d.ts} +108 -1
- package/dist/{index-gm3pBCJT.d.mts → index-Ctws7kGs.d.mts} +108 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +227 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +220 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/content/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BlogListPage, a as BlogListPageProps, b as BlogPostPage, c as BlogPostPageProps, f as CaseStudiesListPage, g as CaseStudiesListPageProps, h as CaseStudyPage, i as CaseStudyPageProps, j as ChangelogEntry, k as ChangelogPage, l as ChangelogPageProps, m as ContentPageData, n as ContentPageListData, o as ContentPageListItem, p as ContentRenderer, q as ContractAsset, r as ContractsPage, s as ContractsPageProps, M as Markdown,
|
|
1
|
+
export { B as BlogListPage, a as BlogListPageProps, b as BlogPostPage, c as BlogPostPageProps, f as CaseStudiesListPage, g as CaseStudiesListPageProps, h as CaseStudyPage, i as CaseStudyPageProps, j as ChangelogEntry, k as ChangelogPage, l as ChangelogPageProps, m as ContentPageData, n as ContentPageListData, o as ContentPageListItem, p as ContentRenderer, q as ContractAsset, r as ContractsPage, s as ContractsPageProps, F as FetchLegalContentOptions, L as LEGAL_DOCUMENTS, t as LEGAL_DOCUMENT_KEYS, u as LegalContentEntry, v as LegalDocument, w as LegalDocumentKey, x as LegalPage, y as LegalPageProps, M as Markdown, z as MarkdownProps, P as PressKitAsset, A as PressKitAssetCategory, D as PressKitPage, E as PressKitPageProps, G as PublicInterviewRoundConfig, H as PublicJobPosting, _ as UseContentPageOptions, U as UsePublicJobPostingOptions, I as UsePublicJobPostingsOptions, J as fetchLegalContent, K as fetchLegalContentPage, N as fetchPublicJobPosting, O as fetchPublicJobPostings, Q as fetchPublicJobPostingsForSubmission, R as findLegalDocument, S as formatLegalDate, T as splitLeadingHeading, V as useContentPage, W as useContentPages, X as usePublicJobPosting, Y as usePublicJobPostings, Z as usePublicJobPostingsForSubmission } from '../index-Ctws7kGs.mjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-markdown';
|
|
4
4
|
import '../graphql-client-CI9vbgat.mjs';
|
package/dist/content/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BlogListPage, a as BlogListPageProps, b as BlogPostPage, c as BlogPostPageProps, f as CaseStudiesListPage, g as CaseStudiesListPageProps, h as CaseStudyPage, i as CaseStudyPageProps, j as ChangelogEntry, k as ChangelogPage, l as ChangelogPageProps, m as ContentPageData, n as ContentPageListData, o as ContentPageListItem, p as ContentRenderer, q as ContractAsset, r as ContractsPage, s as ContractsPageProps, M as Markdown,
|
|
1
|
+
export { B as BlogListPage, a as BlogListPageProps, b as BlogPostPage, c as BlogPostPageProps, f as CaseStudiesListPage, g as CaseStudiesListPageProps, h as CaseStudyPage, i as CaseStudyPageProps, j as ChangelogEntry, k as ChangelogPage, l as ChangelogPageProps, m as ContentPageData, n as ContentPageListData, o as ContentPageListItem, p as ContentRenderer, q as ContractAsset, r as ContractsPage, s as ContractsPageProps, F as FetchLegalContentOptions, L as LEGAL_DOCUMENTS, t as LEGAL_DOCUMENT_KEYS, u as LegalContentEntry, v as LegalDocument, w as LegalDocumentKey, x as LegalPage, y as LegalPageProps, M as Markdown, z as MarkdownProps, P as PressKitAsset, A as PressKitAssetCategory, D as PressKitPage, E as PressKitPageProps, G as PublicInterviewRoundConfig, H as PublicJobPosting, _ as UseContentPageOptions, U as UsePublicJobPostingOptions, I as UsePublicJobPostingsOptions, J as fetchLegalContent, K as fetchLegalContentPage, N as fetchPublicJobPosting, O as fetchPublicJobPostings, Q as fetchPublicJobPostingsForSubmission, R as findLegalDocument, S as formatLegalDate, T as splitLeadingHeading, V as useContentPage, W as useContentPages, X as usePublicJobPosting, Y as usePublicJobPostings, Z as usePublicJobPostingsForSubmission } from '../index-CB0Uw1xD.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-markdown';
|
|
4
4
|
import '../graphql-client-CI9vbgat.js';
|
package/dist/content/index.js
CHANGED
|
@@ -416,10 +416,15 @@ function useContentPage(slug, options) {
|
|
|
416
416
|
hasProvider,
|
|
417
417
|
productLoading
|
|
418
418
|
);
|
|
419
|
+
const enabled = options?.enabled !== false;
|
|
419
420
|
const [data, setData] = React.useState(null);
|
|
420
|
-
const [loading, setLoading] = React.useState(
|
|
421
|
+
const [loading, setLoading] = React.useState(enabled);
|
|
421
422
|
const [error, setError] = React.useState(null);
|
|
422
423
|
const fetchPage = React.useCallback(async () => {
|
|
424
|
+
if (!enabled) {
|
|
425
|
+
setLoading(false);
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
423
428
|
if (gate === "wait") return;
|
|
424
429
|
if (gate === "unavailable") {
|
|
425
430
|
setData(null);
|
|
@@ -453,7 +458,15 @@ function useContentPage(slug, options) {
|
|
|
453
458
|
} finally {
|
|
454
459
|
setLoading(false);
|
|
455
460
|
}
|
|
456
|
-
}, [
|
|
461
|
+
}, [
|
|
462
|
+
client,
|
|
463
|
+
enabled,
|
|
464
|
+
gate,
|
|
465
|
+
productError,
|
|
466
|
+
resolvedProductId,
|
|
467
|
+
slug,
|
|
468
|
+
options?.resolve
|
|
469
|
+
]);
|
|
457
470
|
React.useEffect(() => {
|
|
458
471
|
fetchPage();
|
|
459
472
|
}, [fetchPage]);
|
|
@@ -514,200 +527,6 @@ function ContentRenderer({
|
|
|
514
527
|
}
|
|
515
528
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx("pre", { style: { whiteSpace: "pre-wrap", fontFamily: "inherit" }, children: content }) });
|
|
516
529
|
}
|
|
517
|
-
var PUBLIC_JOB_POSTING_FIELDS = (
|
|
518
|
-
/* GraphQL */
|
|
519
|
-
`
|
|
520
|
-
id
|
|
521
|
-
slug
|
|
522
|
-
title
|
|
523
|
-
department
|
|
524
|
-
location
|
|
525
|
-
employmentType
|
|
526
|
-
openings
|
|
527
|
-
description
|
|
528
|
-
overview
|
|
529
|
-
responsibilities
|
|
530
|
-
learnings
|
|
531
|
-
qualifications
|
|
532
|
-
rounds {
|
|
533
|
-
roundNumber
|
|
534
|
-
name
|
|
535
|
-
roundType
|
|
536
|
-
isRequired
|
|
537
|
-
description
|
|
538
|
-
}
|
|
539
|
-
`
|
|
540
|
-
);
|
|
541
|
-
var PUBLIC_JOB_POSTINGS_QUERY = (
|
|
542
|
-
/* GraphQL */
|
|
543
|
-
`
|
|
544
|
-
query PublicJobPostings($productId: ID, $limit: Int, $offset: Int) {
|
|
545
|
-
publicJobPostings(productId: $productId, limit: $limit, offset: $offset) {
|
|
546
|
-
${PUBLIC_JOB_POSTING_FIELDS}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
`
|
|
550
|
-
);
|
|
551
|
-
var PUBLIC_JOB_POSTING_QUERY = (
|
|
552
|
-
/* GraphQL */
|
|
553
|
-
`
|
|
554
|
-
query PublicJobPosting($slug: String!, $productId: ID) {
|
|
555
|
-
publicJobPosting(slug: $slug, productId: $productId) {
|
|
556
|
-
${PUBLIC_JOB_POSTING_FIELDS}
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
`
|
|
560
|
-
);
|
|
561
|
-
var PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY = (
|
|
562
|
-
/* GraphQL */
|
|
563
|
-
`
|
|
564
|
-
query PublicJobPostingsForSubmission(
|
|
565
|
-
$productId: ID
|
|
566
|
-
$limit: Int
|
|
567
|
-
$offset: Int
|
|
568
|
-
) {
|
|
569
|
-
publicJobPostingsForSubmission(
|
|
570
|
-
productId: $productId
|
|
571
|
-
limit: $limit
|
|
572
|
-
offset: $offset
|
|
573
|
-
) {
|
|
574
|
-
id
|
|
575
|
-
title
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
`
|
|
579
|
-
);
|
|
580
|
-
async function fetchPublicJobPostings(client, options) {
|
|
581
|
-
const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
|
|
582
|
-
productId: options?.productId,
|
|
583
|
-
limit: options?.limit ?? 50,
|
|
584
|
-
offset: options?.offset ?? 0
|
|
585
|
-
});
|
|
586
|
-
if (result.errors?.length) {
|
|
587
|
-
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
588
|
-
}
|
|
589
|
-
return result.data?.publicJobPostings ?? [];
|
|
590
|
-
}
|
|
591
|
-
async function fetchPublicJobPosting(client, slug, options) {
|
|
592
|
-
const result = await client.query(PUBLIC_JOB_POSTING_QUERY, {
|
|
593
|
-
slug,
|
|
594
|
-
productId: options?.productId
|
|
595
|
-
});
|
|
596
|
-
if (result.errors?.length) {
|
|
597
|
-
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
598
|
-
}
|
|
599
|
-
return result.data?.publicJobPosting ?? null;
|
|
600
|
-
}
|
|
601
|
-
async function fetchPublicJobPostingsForSubmission(client, options) {
|
|
602
|
-
const result = await client.query(PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY, {
|
|
603
|
-
productId: options?.productId,
|
|
604
|
-
limit: options?.limit ?? 50,
|
|
605
|
-
offset: options?.offset ?? 0
|
|
606
|
-
});
|
|
607
|
-
if (result.errors?.length) {
|
|
608
|
-
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
609
|
-
}
|
|
610
|
-
return result.data?.publicJobPostingsForSubmission ?? [];
|
|
611
|
-
}
|
|
612
|
-
function usePublicJobPostings(options) {
|
|
613
|
-
const client = useWebSDK();
|
|
614
|
-
const config = useWebSDKConfig();
|
|
615
|
-
const { product } = useProduct();
|
|
616
|
-
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
617
|
-
const [postings, setPostings] = React.useState([]);
|
|
618
|
-
const [loading, setLoading] = React.useState(true);
|
|
619
|
-
const [error, setError] = React.useState(null);
|
|
620
|
-
const fetchPostings = React.useCallback(async () => {
|
|
621
|
-
setLoading(true);
|
|
622
|
-
setError(null);
|
|
623
|
-
try {
|
|
624
|
-
const items = await fetchPublicJobPostings(client, {
|
|
625
|
-
productId: resolvedProductId,
|
|
626
|
-
limit: options?.limit,
|
|
627
|
-
offset: options?.offset
|
|
628
|
-
});
|
|
629
|
-
setPostings(items);
|
|
630
|
-
} catch (err) {
|
|
631
|
-
setError(
|
|
632
|
-
err instanceof Error ? err.message : "Failed to fetch job postings"
|
|
633
|
-
);
|
|
634
|
-
setPostings([]);
|
|
635
|
-
} finally {
|
|
636
|
-
setLoading(false);
|
|
637
|
-
}
|
|
638
|
-
}, [client, resolvedProductId, options?.limit, options?.offset]);
|
|
639
|
-
React.useEffect(() => {
|
|
640
|
-
fetchPostings();
|
|
641
|
-
}, [fetchPostings]);
|
|
642
|
-
return { postings, loading, error, refetch: fetchPostings };
|
|
643
|
-
}
|
|
644
|
-
function usePublicJobPostingsForSubmission(options) {
|
|
645
|
-
const client = useWebSDK();
|
|
646
|
-
const config = useWebSDKConfig();
|
|
647
|
-
const { product } = useProduct();
|
|
648
|
-
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
649
|
-
const [postings, setPostings] = React.useState([]);
|
|
650
|
-
const [loading, setLoading] = React.useState(true);
|
|
651
|
-
const [error, setError] = React.useState(null);
|
|
652
|
-
const fetchPostings = React.useCallback(async () => {
|
|
653
|
-
setLoading(true);
|
|
654
|
-
setError(null);
|
|
655
|
-
try {
|
|
656
|
-
const items = await fetchPublicJobPostingsForSubmission(client, {
|
|
657
|
-
productId: resolvedProductId,
|
|
658
|
-
limit: options?.limit,
|
|
659
|
-
offset: options?.offset
|
|
660
|
-
});
|
|
661
|
-
setPostings(items);
|
|
662
|
-
} catch (err) {
|
|
663
|
-
setError(
|
|
664
|
-
err instanceof Error ? err.message : "Failed to fetch job postings"
|
|
665
|
-
);
|
|
666
|
-
setPostings([]);
|
|
667
|
-
} finally {
|
|
668
|
-
setLoading(false);
|
|
669
|
-
}
|
|
670
|
-
}, [client, resolvedProductId, options?.limit, options?.offset]);
|
|
671
|
-
React.useEffect(() => {
|
|
672
|
-
fetchPostings();
|
|
673
|
-
}, [fetchPostings]);
|
|
674
|
-
return { postings, loading, error, refetch: fetchPostings };
|
|
675
|
-
}
|
|
676
|
-
function usePublicJobPosting(slug, options) {
|
|
677
|
-
const client = useWebSDK();
|
|
678
|
-
const config = useWebSDKConfig();
|
|
679
|
-
const { product } = useProduct();
|
|
680
|
-
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
681
|
-
const [posting, setPosting] = React.useState(null);
|
|
682
|
-
const [loading, setLoading] = React.useState(true);
|
|
683
|
-
const [error, setError] = React.useState(null);
|
|
684
|
-
const fetchPosting = React.useCallback(async () => {
|
|
685
|
-
if (!slug) {
|
|
686
|
-
setPosting(null);
|
|
687
|
-
setLoading(false);
|
|
688
|
-
return;
|
|
689
|
-
}
|
|
690
|
-
setLoading(true);
|
|
691
|
-
setError(null);
|
|
692
|
-
try {
|
|
693
|
-
const item = await fetchPublicJobPosting(client, slug, {
|
|
694
|
-
productId: resolvedProductId
|
|
695
|
-
});
|
|
696
|
-
setPosting(item);
|
|
697
|
-
} catch (err) {
|
|
698
|
-
setError(
|
|
699
|
-
err instanceof Error ? err.message : "Failed to fetch job posting"
|
|
700
|
-
);
|
|
701
|
-
setPosting(null);
|
|
702
|
-
} finally {
|
|
703
|
-
setLoading(false);
|
|
704
|
-
}
|
|
705
|
-
}, [client, resolvedProductId, slug]);
|
|
706
|
-
React.useEffect(() => {
|
|
707
|
-
fetchPosting();
|
|
708
|
-
}, [fetchPosting]);
|
|
709
|
-
return { posting, loading, error, refetch: fetchPosting };
|
|
710
|
-
}
|
|
711
530
|
var PROSE_CSS = `
|
|
712
531
|
.boff-prose {
|
|
713
532
|
max-width: none;
|
|
@@ -956,6 +775,399 @@ function PageHead({
|
|
|
956
775
|
))
|
|
957
776
|
] });
|
|
958
777
|
}
|
|
778
|
+
var LEGAL_DOCUMENTS = {
|
|
779
|
+
privacy: {
|
|
780
|
+
key: "privacy",
|
|
781
|
+
slug: "privacy-policy",
|
|
782
|
+
title: "Privacy Policy",
|
|
783
|
+
description: "How we collect, use, share and protect your personal information."
|
|
784
|
+
},
|
|
785
|
+
terms: {
|
|
786
|
+
key: "terms",
|
|
787
|
+
slug: "terms-of-service",
|
|
788
|
+
title: "Terms of Service",
|
|
789
|
+
description: "The terms that govern your use of the service."
|
|
790
|
+
},
|
|
791
|
+
cookies: {
|
|
792
|
+
key: "cookies",
|
|
793
|
+
slug: "cookie-policy",
|
|
794
|
+
title: "Cookie Policy",
|
|
795
|
+
description: "The cookies and similar technologies we use, and why."
|
|
796
|
+
},
|
|
797
|
+
refunds: {
|
|
798
|
+
key: "refunds",
|
|
799
|
+
slug: "refund-policy",
|
|
800
|
+
title: "Refund Policy",
|
|
801
|
+
description: "How cancellations and refunds work for paid plans."
|
|
802
|
+
},
|
|
803
|
+
aup: {
|
|
804
|
+
key: "aup",
|
|
805
|
+
slug: "acceptable-use-policy",
|
|
806
|
+
title: "Acceptable Use Policy",
|
|
807
|
+
description: "What you may and may not do with the service."
|
|
808
|
+
},
|
|
809
|
+
dpa: {
|
|
810
|
+
key: "dpa",
|
|
811
|
+
slug: "data-processing-addendum",
|
|
812
|
+
title: "Data Processing Addendum",
|
|
813
|
+
description: "Our obligations as a processor of personal data on your behalf."
|
|
814
|
+
},
|
|
815
|
+
"ai-terms": {
|
|
816
|
+
key: "ai-terms",
|
|
817
|
+
slug: "ai-product-terms",
|
|
818
|
+
title: "AI Product Terms",
|
|
819
|
+
description: "The terms that apply to AI features, including how your data is and is not used."
|
|
820
|
+
},
|
|
821
|
+
subprocessors: {
|
|
822
|
+
key: "subprocessors",
|
|
823
|
+
slug: "subprocessors",
|
|
824
|
+
title: "Subprocessors",
|
|
825
|
+
description: "The third parties that help us host, secure and support the service."
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
var LEGAL_DOCUMENT_KEYS = Object.keys(
|
|
829
|
+
LEGAL_DOCUMENTS
|
|
830
|
+
);
|
|
831
|
+
function findLegalDocument(keyOrSlug) {
|
|
832
|
+
if (Object.prototype.hasOwnProperty.call(LEGAL_DOCUMENTS, keyOrSlug)) {
|
|
833
|
+
return LEGAL_DOCUMENTS[keyOrSlug];
|
|
834
|
+
}
|
|
835
|
+
return Object.values(LEGAL_DOCUMENTS).find((doc) => doc.slug === keyOrSlug) ?? null;
|
|
836
|
+
}
|
|
837
|
+
var LEGAL_CONTENT_QUERY = `
|
|
838
|
+
query PublicLegalContentPage($slug: String!, $productId: String!) {
|
|
839
|
+
publicResolvedContentPage(slug: $slug, productId: $productId) {
|
|
840
|
+
title
|
|
841
|
+
slug
|
|
842
|
+
content
|
|
843
|
+
contentFormat
|
|
844
|
+
seoTitle
|
|
845
|
+
seoDescription
|
|
846
|
+
seoKeywords
|
|
847
|
+
lastUpdated
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
`;
|
|
851
|
+
async function fetchLegalContentPage(client, slug, productId) {
|
|
852
|
+
const result = await client.query(LEGAL_CONTENT_QUERY, { slug, productId }, { cache: false });
|
|
853
|
+
if (result.errors?.length) {
|
|
854
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
855
|
+
}
|
|
856
|
+
return result.data?.publicResolvedContentPage ?? null;
|
|
857
|
+
}
|
|
858
|
+
async function fetchLegalContent(client, options) {
|
|
859
|
+
const docs = (options.documents ?? LEGAL_DOCUMENT_KEYS).map(
|
|
860
|
+
(key) => LEGAL_DOCUMENTS[key]
|
|
861
|
+
);
|
|
862
|
+
const entries = await Promise.all(
|
|
863
|
+
docs.map(
|
|
864
|
+
async (doc) => [
|
|
865
|
+
doc.slug,
|
|
866
|
+
await fetchLegalContentPage(client, doc.slug, options.productId)
|
|
867
|
+
]
|
|
868
|
+
)
|
|
869
|
+
);
|
|
870
|
+
return Object.fromEntries(entries);
|
|
871
|
+
}
|
|
872
|
+
function splitLeadingHeading(content, format) {
|
|
873
|
+
if (format.toLowerCase() !== "markdown")
|
|
874
|
+
return { heading: null, body: content };
|
|
875
|
+
const match = /^\s*#[ \t]+([^\n]+?)[ \t#]*(?:\n|$)/.exec(content);
|
|
876
|
+
if (!match?.[1]) return { heading: null, body: content };
|
|
877
|
+
return {
|
|
878
|
+
heading: match[1].trim(),
|
|
879
|
+
body: content.slice(match[0].length).replace(/^\s+/, "")
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
function formatLegalDate(iso) {
|
|
883
|
+
if (!iso) return null;
|
|
884
|
+
const date = new Date(iso);
|
|
885
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
886
|
+
return date.toLocaleDateString("en-US", {
|
|
887
|
+
year: "numeric",
|
|
888
|
+
month: "long",
|
|
889
|
+
day: "numeric",
|
|
890
|
+
timeZone: "UTC"
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
function LegalPage(props) {
|
|
894
|
+
const {
|
|
895
|
+
document: document2,
|
|
896
|
+
slug: slugProp,
|
|
897
|
+
initialContent,
|
|
898
|
+
fallbackTitle,
|
|
899
|
+
fallbackDescription,
|
|
900
|
+
productName,
|
|
901
|
+
canonicalUrl,
|
|
902
|
+
contactEmail,
|
|
903
|
+
className = ""
|
|
904
|
+
} = props;
|
|
905
|
+
const registered = document2 ? LEGAL_DOCUMENTS[document2] : slugProp ? findLegalDocument(slugProp) : null;
|
|
906
|
+
const slug = registered?.slug ?? slugProp ?? "";
|
|
907
|
+
const prefetched = initialContent !== void 0;
|
|
908
|
+
const { data: fetched, loading } = useContentPage(slug, {
|
|
909
|
+
resolve: true,
|
|
910
|
+
enabled: !prefetched && slug !== ""
|
|
911
|
+
});
|
|
912
|
+
const page = prefetched ? initialContent ?? null : fetched;
|
|
913
|
+
const isLoading = !prefetched && slug !== "" && loading;
|
|
914
|
+
const defaultTitle = fallbackTitle ?? registered?.title ?? "Legal";
|
|
915
|
+
const defaultDescription = fallbackDescription ?? registered?.description ?? "";
|
|
916
|
+
const { heading, body } = page ? splitLeadingHeading(page.content, page.contentFormat) : { heading: null, body: "" };
|
|
917
|
+
const title = page?.title || heading || defaultTitle;
|
|
918
|
+
const updated = formatLegalDate(page?.lastUpdated);
|
|
919
|
+
const unavailable = !isLoading && !page;
|
|
920
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full ${className}`, children: [
|
|
921
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProseStyles, {}),
|
|
922
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
923
|
+
PageHead,
|
|
924
|
+
{
|
|
925
|
+
title: page?.seoTitle || title,
|
|
926
|
+
description: page?.seoDescription?.trim() || defaultDescription,
|
|
927
|
+
keywords: page?.seoKeywords ?? void 0,
|
|
928
|
+
productName,
|
|
929
|
+
url: canonicalUrl,
|
|
930
|
+
robots: unavailable ? "noindex, follow" : void 0
|
|
931
|
+
}
|
|
932
|
+
),
|
|
933
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
934
|
+
"article",
|
|
935
|
+
{
|
|
936
|
+
className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16 sm:py-24",
|
|
937
|
+
"aria-busy": isLoading,
|
|
938
|
+
children: [
|
|
939
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl sm:text-4xl font-bold tracking-tight text-foreground mb-3", children: title }),
|
|
940
|
+
updated && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mb-10", children: [
|
|
941
|
+
"Last updated:",
|
|
942
|
+
" ",
|
|
943
|
+
/* @__PURE__ */ jsxRuntime.jsx("time", { dateTime: page?.lastUpdated ?? void 0, children: updated })
|
|
944
|
+
] }),
|
|
945
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", "data-testid": "legal-page-loading", children: [
|
|
946
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-3/4 rounded bg-muted animate-pulse" }),
|
|
947
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-full rounded bg-muted animate-pulse" }),
|
|
948
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-5/6 rounded bg-muted animate-pulse" })
|
|
949
|
+
] }) : page ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "boff-prose max-w-none", children: /* @__PURE__ */ jsxRuntime.jsx(ContentRenderer, { content: body, format: page.contentFormat }) }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
950
|
+
"div",
|
|
951
|
+
{
|
|
952
|
+
role: "status",
|
|
953
|
+
className: "rounded-xl border border-border bg-muted/30 p-6",
|
|
954
|
+
children: [
|
|
955
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground", children: "This document is not available right now." }),
|
|
956
|
+
contactEmail && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-2 text-sm text-muted-foreground", children: [
|
|
957
|
+
"For a copy, contact",
|
|
958
|
+
" ",
|
|
959
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
960
|
+
"a",
|
|
961
|
+
{
|
|
962
|
+
className: "text-primary underline",
|
|
963
|
+
href: `mailto:${contactEmail}`,
|
|
964
|
+
children: contactEmail
|
|
965
|
+
}
|
|
966
|
+
),
|
|
967
|
+
"."
|
|
968
|
+
] })
|
|
969
|
+
]
|
|
970
|
+
}
|
|
971
|
+
)
|
|
972
|
+
]
|
|
973
|
+
}
|
|
974
|
+
)
|
|
975
|
+
] });
|
|
976
|
+
}
|
|
977
|
+
var PUBLIC_JOB_POSTING_FIELDS = (
|
|
978
|
+
/* GraphQL */
|
|
979
|
+
`
|
|
980
|
+
id
|
|
981
|
+
slug
|
|
982
|
+
title
|
|
983
|
+
department
|
|
984
|
+
location
|
|
985
|
+
employmentType
|
|
986
|
+
openings
|
|
987
|
+
description
|
|
988
|
+
overview
|
|
989
|
+
responsibilities
|
|
990
|
+
learnings
|
|
991
|
+
qualifications
|
|
992
|
+
rounds {
|
|
993
|
+
roundNumber
|
|
994
|
+
name
|
|
995
|
+
roundType
|
|
996
|
+
isRequired
|
|
997
|
+
description
|
|
998
|
+
}
|
|
999
|
+
`
|
|
1000
|
+
);
|
|
1001
|
+
var PUBLIC_JOB_POSTINGS_QUERY = (
|
|
1002
|
+
/* GraphQL */
|
|
1003
|
+
`
|
|
1004
|
+
query PublicJobPostings($productId: ID, $limit: Int, $offset: Int) {
|
|
1005
|
+
publicJobPostings(productId: $productId, limit: $limit, offset: $offset) {
|
|
1006
|
+
${PUBLIC_JOB_POSTING_FIELDS}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
`
|
|
1010
|
+
);
|
|
1011
|
+
var PUBLIC_JOB_POSTING_QUERY = (
|
|
1012
|
+
/* GraphQL */
|
|
1013
|
+
`
|
|
1014
|
+
query PublicJobPosting($slug: String!, $productId: ID) {
|
|
1015
|
+
publicJobPosting(slug: $slug, productId: $productId) {
|
|
1016
|
+
${PUBLIC_JOB_POSTING_FIELDS}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
`
|
|
1020
|
+
);
|
|
1021
|
+
var PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY = (
|
|
1022
|
+
/* GraphQL */
|
|
1023
|
+
`
|
|
1024
|
+
query PublicJobPostingsForSubmission(
|
|
1025
|
+
$productId: ID
|
|
1026
|
+
$limit: Int
|
|
1027
|
+
$offset: Int
|
|
1028
|
+
) {
|
|
1029
|
+
publicJobPostingsForSubmission(
|
|
1030
|
+
productId: $productId
|
|
1031
|
+
limit: $limit
|
|
1032
|
+
offset: $offset
|
|
1033
|
+
) {
|
|
1034
|
+
id
|
|
1035
|
+
title
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
`
|
|
1039
|
+
);
|
|
1040
|
+
async function fetchPublicJobPostings(client, options) {
|
|
1041
|
+
const result = await client.query(PUBLIC_JOB_POSTINGS_QUERY, {
|
|
1042
|
+
productId: options?.productId,
|
|
1043
|
+
limit: options?.limit ?? 50,
|
|
1044
|
+
offset: options?.offset ?? 0
|
|
1045
|
+
});
|
|
1046
|
+
if (result.errors?.length) {
|
|
1047
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
1048
|
+
}
|
|
1049
|
+
return result.data?.publicJobPostings ?? [];
|
|
1050
|
+
}
|
|
1051
|
+
async function fetchPublicJobPosting(client, slug, options) {
|
|
1052
|
+
const result = await client.query(PUBLIC_JOB_POSTING_QUERY, {
|
|
1053
|
+
slug,
|
|
1054
|
+
productId: options?.productId
|
|
1055
|
+
});
|
|
1056
|
+
if (result.errors?.length) {
|
|
1057
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
1058
|
+
}
|
|
1059
|
+
return result.data?.publicJobPosting ?? null;
|
|
1060
|
+
}
|
|
1061
|
+
async function fetchPublicJobPostingsForSubmission(client, options) {
|
|
1062
|
+
const result = await client.query(PUBLIC_JOB_POSTINGS_FOR_SUBMISSION_QUERY, {
|
|
1063
|
+
productId: options?.productId,
|
|
1064
|
+
limit: options?.limit ?? 50,
|
|
1065
|
+
offset: options?.offset ?? 0
|
|
1066
|
+
});
|
|
1067
|
+
if (result.errors?.length) {
|
|
1068
|
+
throw new Error(result.errors[0]?.message ?? "Unknown error");
|
|
1069
|
+
}
|
|
1070
|
+
return result.data?.publicJobPostingsForSubmission ?? [];
|
|
1071
|
+
}
|
|
1072
|
+
function usePublicJobPostings(options) {
|
|
1073
|
+
const client = useWebSDK();
|
|
1074
|
+
const config = useWebSDKConfig();
|
|
1075
|
+
const { product } = useProduct();
|
|
1076
|
+
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
1077
|
+
const [postings, setPostings] = React.useState([]);
|
|
1078
|
+
const [loading, setLoading] = React.useState(true);
|
|
1079
|
+
const [error, setError] = React.useState(null);
|
|
1080
|
+
const fetchPostings = React.useCallback(async () => {
|
|
1081
|
+
setLoading(true);
|
|
1082
|
+
setError(null);
|
|
1083
|
+
try {
|
|
1084
|
+
const items = await fetchPublicJobPostings(client, {
|
|
1085
|
+
productId: resolvedProductId,
|
|
1086
|
+
limit: options?.limit,
|
|
1087
|
+
offset: options?.offset
|
|
1088
|
+
});
|
|
1089
|
+
setPostings(items);
|
|
1090
|
+
} catch (err) {
|
|
1091
|
+
setError(
|
|
1092
|
+
err instanceof Error ? err.message : "Failed to fetch job postings"
|
|
1093
|
+
);
|
|
1094
|
+
setPostings([]);
|
|
1095
|
+
} finally {
|
|
1096
|
+
setLoading(false);
|
|
1097
|
+
}
|
|
1098
|
+
}, [client, resolvedProductId, options?.limit, options?.offset]);
|
|
1099
|
+
React.useEffect(() => {
|
|
1100
|
+
fetchPostings();
|
|
1101
|
+
}, [fetchPostings]);
|
|
1102
|
+
return { postings, loading, error, refetch: fetchPostings };
|
|
1103
|
+
}
|
|
1104
|
+
function usePublicJobPostingsForSubmission(options) {
|
|
1105
|
+
const client = useWebSDK();
|
|
1106
|
+
const config = useWebSDKConfig();
|
|
1107
|
+
const { product } = useProduct();
|
|
1108
|
+
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
1109
|
+
const [postings, setPostings] = React.useState([]);
|
|
1110
|
+
const [loading, setLoading] = React.useState(true);
|
|
1111
|
+
const [error, setError] = React.useState(null);
|
|
1112
|
+
const fetchPostings = React.useCallback(async () => {
|
|
1113
|
+
setLoading(true);
|
|
1114
|
+
setError(null);
|
|
1115
|
+
try {
|
|
1116
|
+
const items = await fetchPublicJobPostingsForSubmission(client, {
|
|
1117
|
+
productId: resolvedProductId,
|
|
1118
|
+
limit: options?.limit,
|
|
1119
|
+
offset: options?.offset
|
|
1120
|
+
});
|
|
1121
|
+
setPostings(items);
|
|
1122
|
+
} catch (err) {
|
|
1123
|
+
setError(
|
|
1124
|
+
err instanceof Error ? err.message : "Failed to fetch job postings"
|
|
1125
|
+
);
|
|
1126
|
+
setPostings([]);
|
|
1127
|
+
} finally {
|
|
1128
|
+
setLoading(false);
|
|
1129
|
+
}
|
|
1130
|
+
}, [client, resolvedProductId, options?.limit, options?.offset]);
|
|
1131
|
+
React.useEffect(() => {
|
|
1132
|
+
fetchPostings();
|
|
1133
|
+
}, [fetchPostings]);
|
|
1134
|
+
return { postings, loading, error, refetch: fetchPostings };
|
|
1135
|
+
}
|
|
1136
|
+
function usePublicJobPosting(slug, options) {
|
|
1137
|
+
const client = useWebSDK();
|
|
1138
|
+
const config = useWebSDKConfig();
|
|
1139
|
+
const { product } = useProduct();
|
|
1140
|
+
const resolvedProductId = options?.productId ?? product?.id ?? config.productId;
|
|
1141
|
+
const [posting, setPosting] = React.useState(null);
|
|
1142
|
+
const [loading, setLoading] = React.useState(true);
|
|
1143
|
+
const [error, setError] = React.useState(null);
|
|
1144
|
+
const fetchPosting = React.useCallback(async () => {
|
|
1145
|
+
if (!slug) {
|
|
1146
|
+
setPosting(null);
|
|
1147
|
+
setLoading(false);
|
|
1148
|
+
return;
|
|
1149
|
+
}
|
|
1150
|
+
setLoading(true);
|
|
1151
|
+
setError(null);
|
|
1152
|
+
try {
|
|
1153
|
+
const item = await fetchPublicJobPosting(client, slug, {
|
|
1154
|
+
productId: resolvedProductId
|
|
1155
|
+
});
|
|
1156
|
+
setPosting(item);
|
|
1157
|
+
} catch (err) {
|
|
1158
|
+
setError(
|
|
1159
|
+
err instanceof Error ? err.message : "Failed to fetch job posting"
|
|
1160
|
+
);
|
|
1161
|
+
setPosting(null);
|
|
1162
|
+
} finally {
|
|
1163
|
+
setLoading(false);
|
|
1164
|
+
}
|
|
1165
|
+
}, [client, resolvedProductId, slug]);
|
|
1166
|
+
React.useEffect(() => {
|
|
1167
|
+
fetchPosting();
|
|
1168
|
+
}, [fetchPosting]);
|
|
1169
|
+
return { posting, loading, error, refetch: fetchPosting };
|
|
1170
|
+
}
|
|
959
1171
|
var BLOG_POSTS_QUERY = `
|
|
960
1172
|
query BlogPosts($productId: String!, $limit: Int, $offset: Int) {
|
|
961
1173
|
publicContentPages(productId: $productId, limit: $limit, offset: $offset) {
|
|
@@ -1322,8 +1534,8 @@ function AnimationStyles() {
|
|
|
1322
1534
|
return /* @__PURE__ */ jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: ANIMATION_STYLES } });
|
|
1323
1535
|
}
|
|
1324
1536
|
var CASE_STUDIES_QUERY = `
|
|
1325
|
-
query CaseStudies($productId: String!, $limit: Int, $offset: Int) {
|
|
1326
|
-
publicContentPages(productId: $productId, limit: $limit, offset: $offset) {
|
|
1537
|
+
query CaseStudies($productId: String!, $tag: String, $limit: Int, $offset: Int) {
|
|
1538
|
+
publicContentPages(productId: $productId, tag: $tag, limit: $limit, offset: $offset) {
|
|
1327
1539
|
items {
|
|
1328
1540
|
id
|
|
1329
1541
|
title
|
|
@@ -1723,6 +1935,9 @@ function CaseStudiesListPage(props) {
|
|
|
1723
1935
|
try {
|
|
1724
1936
|
const result = await client.query(CASE_STUDIES_QUERY, {
|
|
1725
1937
|
productId: resolvedProductId,
|
|
1938
|
+
// Filter server-side: an unfiltered page of `limit` rows is mostly blog/legal pages, so
|
|
1939
|
+
// real case studies past it were never listed and the page fell back to the empty state.
|
|
1940
|
+
tag: CASE_STUDY_TAG,
|
|
1726
1941
|
limit,
|
|
1727
1942
|
offset
|
|
1728
1943
|
});
|
|
@@ -3355,11 +3570,19 @@ exports.CaseStudyPage = CaseStudyPage;
|
|
|
3355
3570
|
exports.ChangelogPage = ChangelogPage;
|
|
3356
3571
|
exports.ContentRenderer = ContentRenderer;
|
|
3357
3572
|
exports.ContractsPage = ContractsPage;
|
|
3573
|
+
exports.LEGAL_DOCUMENTS = LEGAL_DOCUMENTS;
|
|
3574
|
+
exports.LEGAL_DOCUMENT_KEYS = LEGAL_DOCUMENT_KEYS;
|
|
3575
|
+
exports.LegalPage = LegalPage;
|
|
3358
3576
|
exports.Markdown = Markdown;
|
|
3359
3577
|
exports.PressKitPage = PressKitPage;
|
|
3578
|
+
exports.fetchLegalContent = fetchLegalContent;
|
|
3579
|
+
exports.fetchLegalContentPage = fetchLegalContentPage;
|
|
3360
3580
|
exports.fetchPublicJobPosting = fetchPublicJobPosting;
|
|
3361
3581
|
exports.fetchPublicJobPostings = fetchPublicJobPostings;
|
|
3362
3582
|
exports.fetchPublicJobPostingsForSubmission = fetchPublicJobPostingsForSubmission;
|
|
3583
|
+
exports.findLegalDocument = findLegalDocument;
|
|
3584
|
+
exports.formatLegalDate = formatLegalDate;
|
|
3585
|
+
exports.splitLeadingHeading = splitLeadingHeading;
|
|
3363
3586
|
exports.useContentPage = useContentPage;
|
|
3364
3587
|
exports.useContentPages = useContentPages;
|
|
3365
3588
|
exports.usePublicJobPosting = usePublicJobPosting;
|