@next-degree/pickle-shared-js 0.12.1 → 0.12.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/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/StepTabs.cjs +21 -4
- package/dist/components/ui/StepTabs.cjs.map +1 -1
- package/dist/components/ui/StepTabs.d.cts +2 -2
- package/dist/components/ui/StepTabs.d.ts +2 -2
- package/dist/components/ui/StepTabs.js +21 -4
- package/dist/components/ui/StepTabs.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 +80 -19
- 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 +80 -19
- 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 +23 -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
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
|
|
7
7
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & cva_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "link" | "outline" | "secondary" | "destructive" | "ghost" | null | undefined;
|
|
7
7
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & cva_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-
|
|
4
|
-
import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-
|
|
3
|
+
import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-C_TEBzCf.cjs';
|
|
4
|
+
import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-CXBCG04N.cjs';
|
|
5
5
|
|
|
6
6
|
declare const employmentTypeDisplayText: DisplayTextConfig<typeof EmploymentTypeEnum>;
|
|
7
7
|
declare const unitTextDisplayText: DisplayTextConfig<typeof UnitTextEnum>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-
|
|
4
|
-
import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-
|
|
3
|
+
import { E as EmploymentTypeEnum, a as EmploymentLevelEnum, b as JobFunctionEnum, B as BestFitEnum, C as ClinicalSpecialtyEnum, S as ShiftEnum, c as ClinicalSettingEnum } from './job_posting_service_latest-C_TEBzCf.js';
|
|
4
|
+
import { U as UnitTextEnum, C as CurrencyEnum } from './shared_pickle_output_latest-CXBCG04N.js';
|
|
5
5
|
|
|
6
6
|
declare const employmentTypeDisplayText: DisplayTextConfig<typeof EmploymentTypeEnum>;
|
|
7
7
|
declare const unitTextDisplayText: DisplayTextConfig<typeof UnitTextEnum>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as ServiceMappings } from '../displayText-
|
|
1
|
+
import { S as ServiceMappings } from '../displayText-DW0qiJqh.cjs';
|
|
2
2
|
import 'zod';
|
|
3
|
-
import '../job_posting_service_latest-
|
|
4
|
-
import '../shared_pickle_output_latest-
|
|
3
|
+
import '../job_posting_service_latest-C_TEBzCf.cjs';
|
|
4
|
+
import '../shared_pickle_output_latest-CXBCG04N.cjs';
|
|
5
5
|
|
|
6
6
|
declare const useDisplayText: (scope: keyof ServiceMappings, value: string | string[] | undefined | null) => string;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as ServiceMappings } from '../displayText-
|
|
1
|
+
import { S as ServiceMappings } from '../displayText-DahwdHdi.js';
|
|
2
2
|
import 'zod';
|
|
3
|
-
import '../job_posting_service_latest-
|
|
4
|
-
import '../shared_pickle_output_latest-
|
|
3
|
+
import '../job_posting_service_latest-C_TEBzCf.js';
|
|
4
|
+
import '../shared_pickle_output_latest-CXBCG04N.js';
|
|
5
5
|
|
|
6
6
|
declare const useDisplayText: (scope: keyof ServiceMappings, value: string | string[] | undefined | null) => string;
|
|
7
7
|
|
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "
|
|
|
83
83
|
neutral: ["text-grey-80", "border-grey-10"],
|
|
84
84
|
primary: ["text-purple-100", "border-purple-20"],
|
|
85
85
|
danger: ["text-pumpkin-100", "border-pumpkin-20"],
|
|
86
|
+
jobLocation: ["text-grey-80", "border-grey-10", "bg-grey-5"],
|
|
86
87
|
onboarding: ["text-green-100", "bg-green-10", "cursor-pointer"],
|
|
87
88
|
onboardingSelected: ["text-white", "bg-green-90", "cursor-pointer"]
|
|
88
89
|
},
|
|
@@ -2036,7 +2037,20 @@ var tabParentVariants = (0, import_cva10.cva)("flex flex-col", {
|
|
|
2036
2037
|
variants: {
|
|
2037
2038
|
variant: {
|
|
2038
2039
|
primary: "rounded-lg border shadow-sm",
|
|
2039
|
-
neutral: ""
|
|
2040
|
+
neutral: "",
|
|
2041
|
+
minimal: "relative overflow-x-auto"
|
|
2042
|
+
}
|
|
2043
|
+
},
|
|
2044
|
+
defaultVariants: {
|
|
2045
|
+
variant: "primary"
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2048
|
+
var headerVariants = (0, import_cva10.cva)("flex shrink-0 border-b border-grey-20", {
|
|
2049
|
+
variants: {
|
|
2050
|
+
variant: {
|
|
2051
|
+
primary: "",
|
|
2052
|
+
neutral: "",
|
|
2053
|
+
minimal: "w-fit relative border-none"
|
|
2040
2054
|
}
|
|
2041
2055
|
},
|
|
2042
2056
|
defaultVariants: {
|
|
@@ -2049,7 +2063,8 @@ var singleTabVariants = (0, import_cva10.cva)(
|
|
|
2049
2063
|
variants: {
|
|
2050
2064
|
variant: {
|
|
2051
2065
|
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"
|
|
2066
|
+
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",
|
|
2067
|
+
minimal: "whitespace-nowrap flex-none first:rounded-tl-md last:rounded-tr-md hover:text-black data-[state=active]:font-bold data-[state=active]:text-black data-[state=active]:shadow-[inset_0_-2px_0_0] data-[state=active]:shadow-current data-[state=active]:focus:relative"
|
|
2053
2068
|
}
|
|
2054
2069
|
},
|
|
2055
2070
|
defaultVariants: {
|
|
@@ -2077,7 +2092,7 @@ function StepTabs({
|
|
|
2077
2092
|
className: cn(tabParentVariants({ variant }), className),
|
|
2078
2093
|
...props,
|
|
2079
2094
|
children: [
|
|
2080
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tabs.List, { className:
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Tabs.List, { className: cn(headerVariants({ variant })), children: list.length > 1 && list.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2081
2096
|
Tabs.Trigger,
|
|
2082
2097
|
{
|
|
2083
2098
|
className: cn(singleTabVariants({ variant }), classNameTab),
|
|
@@ -2089,7 +2104,10 @@ function StepTabs({
|
|
|
2089
2104
|
children && children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2090
2105
|
Tabs.Content,
|
|
2091
2106
|
{
|
|
2092
|
-
className:
|
|
2107
|
+
className: cn(
|
|
2108
|
+
"grow rounded-b-md bg-white p-5 outline-none",
|
|
2109
|
+
variant === "minimal" && "border-t"
|
|
2110
|
+
),
|
|
2093
2111
|
value: index.toString(),
|
|
2094
2112
|
children: child
|
|
2095
2113
|
},
|
|
@@ -3379,14 +3397,37 @@ var useDisplayText = (scope, value) => {
|
|
|
3379
3397
|
};
|
|
3380
3398
|
|
|
3381
3399
|
// src/lib/locations.ts
|
|
3382
|
-
function formattedAddress(address) {
|
|
3400
|
+
function formattedAddress(address, isRemote = false) {
|
|
3401
|
+
if (!address) return null;
|
|
3383
3402
|
const { addressLocality, addressRegion, addressCountry } = address;
|
|
3384
|
-
|
|
3385
|
-
if (
|
|
3386
|
-
|
|
3387
|
-
if (addressCountry) return addressCountry
|
|
3403
|
+
const remoteMessage = isRemote ? " | Remote" : "";
|
|
3404
|
+
if (addressLocality && addressRegion)
|
|
3405
|
+
return `${addressLocality}, ${addressRegion + remoteMessage}`;
|
|
3406
|
+
if (addressRegion && addressCountry) return `${addressRegion}, ${addressCountry + remoteMessage}`;
|
|
3407
|
+
if (addressRegion) return `${addressRegion + remoteMessage}`;
|
|
3408
|
+
if (addressCountry) return `${addressCountry + remoteMessage}`;
|
|
3388
3409
|
return null;
|
|
3389
3410
|
}
|
|
3411
|
+
function getAddressList(jobPost) {
|
|
3412
|
+
const locations = [];
|
|
3413
|
+
if (jobPost.jobLocation) {
|
|
3414
|
+
const address = formattedAddress(jobPost.jobLocation, jobPost.isRemote);
|
|
3415
|
+
if (address) locations.push(address);
|
|
3416
|
+
}
|
|
3417
|
+
if (jobPost.applicableOffices && jobPost.applicableOffices.length > 0) {
|
|
3418
|
+
jobPost.applicableOffices.map((office) => {
|
|
3419
|
+
const address = formattedAddress(office?.geoLocation?.address, jobPost.isRemote);
|
|
3420
|
+
if (address && !locations.includes(address)) locations.push(address);
|
|
3421
|
+
});
|
|
3422
|
+
}
|
|
3423
|
+
if (jobPost.applicantLocationRequirements && jobPost.applicantLocationRequirements.length > 0) {
|
|
3424
|
+
jobPost.applicantLocationRequirements.map((place) => {
|
|
3425
|
+
const address = formattedAddress(place?.address, jobPost.isRemote);
|
|
3426
|
+
if (address && !locations.includes(address)) locations.push(address);
|
|
3427
|
+
});
|
|
3428
|
+
}
|
|
3429
|
+
return locations;
|
|
3430
|
+
}
|
|
3390
3431
|
function formattedJobLocation(job) {
|
|
3391
3432
|
const address = job.jobLocation && formattedAddress(job.jobLocation);
|
|
3392
3433
|
const remote = job.isRemote ? "Remote" : "";
|
|
@@ -3498,17 +3539,37 @@ function JobPost({
|
|
|
3498
3539
|
// src/components/jobCard/JobLocation.tsx
|
|
3499
3540
|
var import_lucide_react19 = require("lucide-react");
|
|
3500
3541
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3501
|
-
function JobLocation({
|
|
3502
|
-
|
|
3542
|
+
function JobLocation({ jobPost }) {
|
|
3543
|
+
const locations = getAddressList(jobPost);
|
|
3544
|
+
if (!locations || locations.length === 0) return null;
|
|
3545
|
+
const primaryOffice = locations[0];
|
|
3546
|
+
const extendedLocations = locations.slice(1).map((address) => address);
|
|
3547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", "data-testid": "job-location-element", children: [
|
|
3503
3548
|
/* @__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:
|
|
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)(
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3549
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-thin", children: primaryOffice }),
|
|
3550
|
+
extendedLocations.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3552
|
+
Chip_default,
|
|
3553
|
+
{
|
|
3554
|
+
className: "font-bold",
|
|
3555
|
+
size: "small",
|
|
3556
|
+
variant: "jobLocation",
|
|
3557
|
+
"data-testid": "job-location-tooltip",
|
|
3558
|
+
children: [
|
|
3559
|
+
"+ ",
|
|
3560
|
+
extendedLocations.length,
|
|
3561
|
+
" more"
|
|
3562
|
+
]
|
|
3563
|
+
}
|
|
3564
|
+
) }),
|
|
3565
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3566
|
+
TooltipContent,
|
|
3567
|
+
{
|
|
3568
|
+
className: "border-1 rounded-md border border-grey-5 bg-white p-2",
|
|
3569
|
+
"data-testid": "job-location-tooltip-content",
|
|
3570
|
+
children: extendedLocations.map((location) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-nowrap text-sm", children: location }, location))
|
|
3571
|
+
}
|
|
3572
|
+
)
|
|
3512
3573
|
] }) })
|
|
3513
3574
|
] });
|
|
3514
3575
|
}
|