@next-degree/pickle-shared-js 0.12.1 → 0.12.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/{company_service_sanity-Br0R7m-A.d.cts → company_service_sanity-2J1ZuUnu.d.cts} +1 -1
- package/dist/{company_service_sanity-DF01qvTz.d.ts → company_service_sanity-KaAGfnNV.d.ts} +1 -1
- package/dist/components/jobCard/JobLocation.cjs +92 -12
- package/dist/components/jobCard/JobLocation.cjs.map +1 -1
- package/dist/components/jobCard/JobLocation.d.cts +7 -5
- package/dist/components/jobCard/JobLocation.d.ts +7 -5
- package/dist/components/jobCard/JobLocation.js +92 -12
- package/dist/components/jobCard/JobLocation.js.map +1 -1
- package/dist/components/jobPost/JobHeader.cjs +1 -0
- package/dist/components/jobPost/JobHeader.cjs.map +1 -1
- package/dist/components/jobPost/JobHeader.js +1 -0
- package/dist/components/jobPost/JobHeader.js.map +1 -1
- package/dist/components/jobPost/JobPost.cjs +9 -5
- package/dist/components/jobPost/JobPost.cjs.map +1 -1
- package/dist/components/jobPost/JobPost.d.cts +1 -1
- package/dist/components/jobPost/JobPost.d.ts +1 -1
- package/dist/components/jobPost/JobPost.js +9 -5
- package/dist/components/jobPost/JobPost.js.map +1 -1
- package/dist/components/primitives/command.d.cts +3 -3
- package/dist/components/primitives/command.d.ts +3 -3
- package/dist/components/primitives/input-otp.d.cts +2 -2
- package/dist/components/primitives/input-otp.d.ts +2 -2
- package/dist/components/ui/Button.d.cts +1 -1
- package/dist/components/ui/Button.d.ts +1 -1
- package/dist/components/ui/Chip.cjs +1 -0
- package/dist/components/ui/Chip.cjs.map +1 -1
- package/dist/components/ui/Chip.d.cts +1 -1
- package/dist/components/ui/Chip.d.ts +1 -1
- package/dist/components/ui/Chip.js +1 -0
- package/dist/components/ui/Chip.js.map +1 -1
- package/dist/components/ui/Select.cjs +1 -0
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.js +1 -0
- package/dist/components/ui/Select.js.map +1 -1
- package/dist/components/ui/buttonShadcn.d.cts +1 -1
- package/dist/components/ui/buttonShadcn.d.ts +1 -1
- package/dist/{displayText-DzxDrQAT.d.cts → displayText-DW0qiJqh.d.cts} +2 -2
- package/dist/{displayText-C1DIK8hr.d.ts → displayText-DahwdHdi.d.ts} +2 -2
- package/dist/hooks/useDisplayText.d.cts +3 -3
- package/dist/hooks/useDisplayText.d.ts +3 -3
- package/dist/index.cjs +59 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +59 -15
- package/dist/index.js.map +1 -1
- package/dist/{job_posting_service_latest-DCbi2bXu.d.cts → job_posting_service_latest-DdgK8Nnz.d.cts} +29 -29
- package/dist/{job_posting_service_latest-DCbi2bXu.d.ts → job_posting_service_latest-DdgK8Nnz.d.ts} +29 -29
- package/dist/{job_posting_service_sanity-CfLaGMVK.d.ts → job_posting_service_sanity-BKo9TBDT.d.ts} +106 -106
- package/dist/{job_posting_service_sanity-B7GvIdYQ.d.cts → job_posting_service_sanity-BNq-Am9N.d.cts} +106 -106
- package/dist/lib/locations.cjs +32 -7
- package/dist/lib/locations.cjs.map +1 -1
- package/dist/lib/locations.d.cts +8 -5
- package/dist/lib/locations.d.ts +8 -5
- package/dist/lib/locations.js +30 -6
- package/dist/lib/locations.js.map +1 -1
- package/dist/lib/mappings.d.cts +3 -3
- package/dist/lib/mappings.d.ts +3 -3
- package/dist/lib/salaryRange.d.cts +1 -1
- package/dist/lib/salaryRange.d.ts +1 -1
- package/dist/services/displayText.d.cts +3 -3
- package/dist/services/displayText.d.ts +3 -3
- package/dist/styles/globals.css +0 -7
- package/dist/styles/globals.css.map +1 -1
- package/dist/types/data/job_posting_service_latest.d.cts +1 -1
- package/dist/types/data/job_posting_service_latest.d.ts +1 -1
- package/dist/types/data/shared_pickle_output_latest.d.cts +1 -1
- package/dist/types/data/shared_pickle_output_latest.d.ts +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/latest/custom/company_service_sanity.d.cts +2 -2
- package/dist/types/latest/custom/company_service_sanity.d.ts +2 -2
- package/dist/types/latest/custom/job_posting_service_sanity.d.cts +3 -3
- package/dist/types/latest/custom/job_posting_service_sanity.d.ts +3 -3
- package/dist/types/latest/job_posting_service_latest.d.cts +1 -1
- package/dist/types/latest/job_posting_service_latest.d.ts +1 -1
- package/dist/types/latest/shared_pickle_output_latest.d.cts +1 -1
- package/dist/types/latest/shared_pickle_output_latest.d.ts +1 -1
- package/package.json +3 -2
- package/dist/{job_posting_service_latest-tqnHqjwc.d.cts → job_posting_service_latest-C_TEBzCf.d.cts} +28 -28
- package/dist/{job_posting_service_latest-tqnHqjwc.d.ts → job_posting_service_latest-C_TEBzCf.d.ts} +28 -28
- package/dist/{shared_pickle_output_latest-DKOmTyYk.d.cts → shared_pickle_output_latest-CXBCG04N.d.cts} +4 -4
- package/dist/{shared_pickle_output_latest-DKOmTyYk.d.ts → shared_pickle_output_latest-CXBCG04N.d.ts} +4 -4
- package/dist/{shared_pickle_output_latest--XZhOUyE.d.cts → shared_pickle_output_latest-CtvHTPeX.d.cts} +4 -4
- package/dist/{shared_pickle_output_latest--XZhOUyE.d.ts → shared_pickle_output_latest-CtvHTPeX.d.ts} +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -35,8 +35,8 @@ export { WindowHistoryProvider } from './contexts/WindowHistoryProvider.cjs';
|
|
|
35
35
|
export { useDisplayText } from './hooks/useDisplayText.cjs';
|
|
36
36
|
export { useWindowHistory } from './hooks/useWindowHistory.cjs';
|
|
37
37
|
export { c as CompanyService } from './company_service_latest-CITz7F53.cjs';
|
|
38
|
-
export { j as JobPostService } from './job_posting_service_latest-
|
|
39
|
-
export { s as SharedService } from './shared_pickle_output_latest-
|
|
38
|
+
export { j as JobPostService } from './job_posting_service_latest-C_TEBzCf.cjs';
|
|
39
|
+
export { s as SharedService } from './shared_pickle_output_latest-CXBCG04N.cjs';
|
|
40
40
|
import 'cva/types';
|
|
41
41
|
import 'react/jsx-runtime';
|
|
42
42
|
import 'cva';
|
|
@@ -49,8 +49,9 @@ import './components/primitives/radio-group.cjs';
|
|
|
49
49
|
import '@radix-ui/react-radio-group';
|
|
50
50
|
import 'next/link';
|
|
51
51
|
import '@radix-ui/react-tabs';
|
|
52
|
-
import './shared_pickle_output_latest
|
|
52
|
+
import './shared_pickle_output_latest-CtvHTPeX.cjs';
|
|
53
53
|
import 'zod';
|
|
54
54
|
import 'clsx';
|
|
55
55
|
import './lib/icons.cjs';
|
|
56
|
-
import './
|
|
56
|
+
import './job_posting_service_latest-DdgK8Nnz.cjs';
|
|
57
|
+
import './displayText-DW0qiJqh.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -35,8 +35,8 @@ export { WindowHistoryProvider } from './contexts/WindowHistoryProvider.js';
|
|
|
35
35
|
export { useDisplayText } from './hooks/useDisplayText.js';
|
|
36
36
|
export { useWindowHistory } from './hooks/useWindowHistory.js';
|
|
37
37
|
export { c as CompanyService } from './company_service_latest-CITz7F53.js';
|
|
38
|
-
export { j as JobPostService } from './job_posting_service_latest-
|
|
39
|
-
export { s as SharedService } from './shared_pickle_output_latest-
|
|
38
|
+
export { j as JobPostService } from './job_posting_service_latest-C_TEBzCf.js';
|
|
39
|
+
export { s as SharedService } from './shared_pickle_output_latest-CXBCG04N.js';
|
|
40
40
|
import 'cva/types';
|
|
41
41
|
import 'react/jsx-runtime';
|
|
42
42
|
import 'cva';
|
|
@@ -49,8 +49,9 @@ import './components/primitives/radio-group.js';
|
|
|
49
49
|
import '@radix-ui/react-radio-group';
|
|
50
50
|
import 'next/link';
|
|
51
51
|
import '@radix-ui/react-tabs';
|
|
52
|
-
import './shared_pickle_output_latest
|
|
52
|
+
import './shared_pickle_output_latest-CtvHTPeX.js';
|
|
53
53
|
import 'zod';
|
|
54
54
|
import 'clsx';
|
|
55
55
|
import './lib/icons.js';
|
|
56
|
-
import './
|
|
56
|
+
import './job_posting_service_latest-DdgK8Nnz.js';
|
|
57
|
+
import './displayText-DahwdHdi.js';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var chipVariants = cva(["flex", "items-center", "rounded-3xl", "border", "w-fit"
|
|
|
15
15
|
neutral: ["text-grey-80", "border-grey-10"],
|
|
16
16
|
primary: ["text-purple-100", "border-purple-20"],
|
|
17
17
|
danger: ["text-pumpkin-100", "border-pumpkin-20"],
|
|
18
|
+
jobLocation: ["text-grey-80", "border-grey-10", "bg-grey-5"],
|
|
18
19
|
onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
|
|
19
20
|
onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
|
|
20
21
|
},
|
|
@@ -3341,14 +3342,37 @@ var useDisplayText = (scope, value) => {
|
|
|
3341
3342
|
};
|
|
3342
3343
|
|
|
3343
3344
|
// src/lib/locations.ts
|
|
3344
|
-
function formattedAddress(address) {
|
|
3345
|
+
function formattedAddress(address, isRemote = false) {
|
|
3346
|
+
if (!address) return null;
|
|
3345
3347
|
const { addressLocality, addressRegion, addressCountry } = address;
|
|
3346
|
-
|
|
3347
|
-
if (
|
|
3348
|
-
|
|
3349
|
-
if (addressCountry) return addressCountry
|
|
3348
|
+
const remoteMessage = isRemote ? " | Remote" : "";
|
|
3349
|
+
if (addressLocality && addressRegion)
|
|
3350
|
+
return `${addressLocality}, ${addressRegion + remoteMessage}`;
|
|
3351
|
+
if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry + remoteMessage}`;
|
|
3352
|
+
if (addressRegion) return `${addressRegion + remoteMessage}`;
|
|
3353
|
+
if (addressCountry) return `${addressCountry + remoteMessage}`;
|
|
3350
3354
|
return null;
|
|
3351
3355
|
}
|
|
3356
|
+
function getAddressList(jobPost) {
|
|
3357
|
+
const locations = [];
|
|
3358
|
+
if (jobPost.jobLocation) {
|
|
3359
|
+
const address = formattedAddress(jobPost.jobLocation, jobPost.isRemote);
|
|
3360
|
+
if (address) locations.push(address);
|
|
3361
|
+
}
|
|
3362
|
+
if (jobPost.applicableOffices && jobPost.applicableOffices.length > 0) {
|
|
3363
|
+
jobPost.applicableOffices.map((office) => {
|
|
3364
|
+
const address = formattedAddress(office?.geoLocation?.address, jobPost.isRemote);
|
|
3365
|
+
if (address && !locations.includes(address)) locations.push(address);
|
|
3366
|
+
});
|
|
3367
|
+
}
|
|
3368
|
+
if (jobPost.applicantLocationRequirements && jobPost.applicantLocationRequirements.length > 0) {
|
|
3369
|
+
jobPost.applicantLocationRequirements.map((place) => {
|
|
3370
|
+
const address = formattedAddress(place?.address, jobPost.isRemote);
|
|
3371
|
+
if (address && !locations.includes(address)) locations.push(address);
|
|
3372
|
+
});
|
|
3373
|
+
}
|
|
3374
|
+
return locations;
|
|
3375
|
+
}
|
|
3352
3376
|
function formattedJobLocation(job) {
|
|
3353
3377
|
const address = job.jobLocation && formattedAddress(job.jobLocation);
|
|
3354
3378
|
const remote = job.isRemote ? "Remote" : "";
|
|
@@ -3460,17 +3484,37 @@ function JobPost({
|
|
|
3460
3484
|
// src/components/jobCard/JobLocation.tsx
|
|
3461
3485
|
import { MapPin as MapPin2 } from "lucide-react";
|
|
3462
3486
|
import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3463
|
-
function JobLocation({
|
|
3464
|
-
|
|
3487
|
+
function JobLocation({ jobPost }) {
|
|
3488
|
+
const locations = getAddressList(jobPost);
|
|
3489
|
+
if (!locations || locations.length === 0) return null;
|
|
3490
|
+
const primaryOffice = locations[0];
|
|
3491
|
+
const extendedLocations = locations.slice(1).map((address) => address);
|
|
3492
|
+
return /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", "data-testid": "job-location-element", children: [
|
|
3465
3493
|
/* @__PURE__ */ jsx42(MapPin2, { size: 16 }),
|
|
3466
|
-
/* @__PURE__ */ jsx42("span", { className: "text-sm font-thin", children:
|
|
3467
|
-
extendedLocations && /* @__PURE__ */ jsx42(TooltipProvider, { children: /* @__PURE__ */ jsxs27(Tooltip, { children: [
|
|
3468
|
-
/* @__PURE__ */ jsx42(TooltipTrigger, { children: /* @__PURE__ */ jsxs27(
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3494
|
+
/* @__PURE__ */ jsx42("span", { className: "text-sm font-thin", children: primaryOffice }),
|
|
3495
|
+
extendedLocations.length > 0 && /* @__PURE__ */ jsx42(TooltipProvider, { children: /* @__PURE__ */ jsxs27(Tooltip, { children: [
|
|
3496
|
+
/* @__PURE__ */ jsx42(TooltipTrigger, { children: /* @__PURE__ */ jsxs27(
|
|
3497
|
+
Chip_default,
|
|
3498
|
+
{
|
|
3499
|
+
className: "font-bold",
|
|
3500
|
+
size: "small",
|
|
3501
|
+
variant: "jobLocation",
|
|
3502
|
+
"data-testid": "job-location-tooltip",
|
|
3503
|
+
children: [
|
|
3504
|
+
"+ ",
|
|
3505
|
+
extendedLocations.length,
|
|
3506
|
+
" more"
|
|
3507
|
+
]
|
|
3508
|
+
}
|
|
3509
|
+
) }),
|
|
3510
|
+
/* @__PURE__ */ jsx42(
|
|
3511
|
+
TooltipContent,
|
|
3512
|
+
{
|
|
3513
|
+
className: "border-1 rounded-md border border-grey-5 bg-white p-2",
|
|
3514
|
+
"data-testid": "job-location-tooltip-content",
|
|
3515
|
+
children: extendedLocations.map((location) => /* @__PURE__ */ jsx42("div", { className: "text-nowrap text-sm", children: location }, location))
|
|
3516
|
+
}
|
|
3517
|
+
)
|
|
3474
3518
|
] }) })
|
|
3475
3519
|
] });
|
|
3476
3520
|
}
|