@next-degree/pickle-shared-js 0.10.8 → 0.12.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/{company_service_sanity-Bedw6Mhk.d.cts → company_service_sanity-Br0R7m-A.d.cts} +114 -114
- package/dist/{company_service_sanity-BZtdt7Df.d.ts → company_service_sanity-DF01qvTz.d.ts} +114 -114
- package/dist/components/jobCard/JobLocation.cjs +88 -0
- package/dist/components/jobCard/JobLocation.cjs.map +1 -0
- package/dist/components/jobCard/JobLocation.d.cts +9 -0
- package/dist/components/jobCard/JobLocation.d.ts +9 -0
- package/dist/components/jobCard/JobLocation.js +53 -0
- package/dist/components/jobCard/JobLocation.js.map +1 -0
- package/dist/components/jobPost/JobDescription.cjs +3 -1
- package/dist/components/jobPost/JobDescription.cjs.map +1 -1
- package/dist/components/jobPost/JobDescription.js +3 -1
- package/dist/components/jobPost/JobDescription.js.map +1 -1
- package/dist/components/jobPost/JobPost.cjs +17 -13
- 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 +17 -13
- package/dist/components/jobPost/JobPost.js.map +1 -1
- package/dist/components/ui/Button.d.cts +1 -1
- package/dist/components/ui/Button.d.ts +1 -1
- package/dist/components/ui/Combobox.cjs +28 -19
- package/dist/components/ui/Combobox.cjs.map +1 -1
- package/dist/components/ui/Combobox.js +29 -20
- package/dist/components/ui/Combobox.js.map +1 -1
- package/dist/components/ui/DismissibleBanner.cjs +85 -0
- package/dist/components/ui/DismissibleBanner.cjs.map +1 -0
- package/dist/components/ui/DismissibleBanner.d.cts +11 -0
- package/dist/components/ui/DismissibleBanner.d.ts +11 -0
- package/dist/components/ui/DismissibleBanner.js +60 -0
- package/dist/components/ui/DismissibleBanner.js.map +1 -0
- package/dist/components/ui/ReadMore.cjs +3 -1
- package/dist/components/ui/ReadMore.cjs.map +1 -1
- package/dist/components/ui/ReadMore.js +3 -1
- package/dist/components/ui/ReadMore.js.map +1 -1
- package/dist/components/ui/StepTabs.cjs +32 -4
- package/dist/components/ui/StepTabs.cjs.map +1 -1
- package/dist/components/ui/StepTabs.d.cts +12 -3
- package/dist/components/ui/StepTabs.d.ts +12 -3
- package/dist/components/ui/StepTabs.js +32 -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-CBIWVZVw.d.ts → displayText-C1DIK8hr.d.ts} +1 -1
- package/dist/{displayText-4cJ7-3Mw.d.cts → displayText-DzxDrQAT.d.cts} +1 -1
- package/dist/hooks/useDisplayText.d.cts +2 -2
- package/dist/hooks/useDisplayText.d.ts +2 -2
- package/dist/index.cjs +1240 -1127
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +1375 -1265
- package/dist/index.js.map +1 -1
- package/dist/{job_posting_service_sanity-Kcoloigd.d.cts → job_posting_service_sanity-B7GvIdYQ.d.cts} +173 -173
- package/dist/{job_posting_service_sanity-fAGLW3rj.d.ts → job_posting_service_sanity-CfLaGMVK.d.ts} +173 -173
- package/dist/lib/locations.d.cts +1 -1
- package/dist/lib/locations.d.ts +1 -1
- package/dist/lib/mappings.d.cts +2 -2
- package/dist/lib/mappings.d.ts +2 -2
- package/dist/lib/salaryRange.cjs +14 -12
- package/dist/lib/salaryRange.cjs.map +1 -1
- package/dist/lib/salaryRange.d.cts +1 -1
- package/dist/lib/salaryRange.d.ts +1 -1
- package/dist/lib/salaryRange.js +14 -12
- package/dist/lib/salaryRange.js.map +1 -1
- package/dist/services/displayText.d.cts +2 -2
- package/dist/services/displayText.d.ts +2 -2
- package/dist/styles/globals.css +25 -0
- package/dist/styles/globals.css.map +1 -1
- package/dist/types/data/company_service_latest.d.cts +1 -1
- package/dist/types/data/company_service_latest.d.ts +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/index.d.cts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/dist/types/latest/company_service_latest.d.cts +1 -1
- package/dist/types/latest/company_service_latest.d.ts +1 -1
- 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 +2 -2
- package/dist/types/latest/custom/job_posting_service_sanity.d.ts +2 -2
- 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/package.json +2 -2
- package/dist/{company_service_latest-BmiEQ4dO.d.cts → company_service_latest-C7Moeufo.d.cts} +54 -54
- package/dist/{company_service_latest-BmiEQ4dO.d.ts → company_service_latest-C7Moeufo.d.ts} +54 -54
- package/dist/{company_service_latest-Ba8VhDao.d.cts → company_service_latest-CITz7F53.d.cts} +54 -54
- package/dist/{company_service_latest-Ba8VhDao.d.ts → company_service_latest-CITz7F53.d.ts} +54 -54
- package/dist/{job_posting_service_latest-DdsTbMSJ.d.cts → job_posting_service_latest-DCbi2bXu.d.cts} +85 -85
- package/dist/{job_posting_service_latest-DdsTbMSJ.d.ts → job_posting_service_latest-DCbi2bXu.d.ts} +85 -85
- package/dist/{job_posting_service_latest-DOGQ9tEu.d.cts → job_posting_service_latest-tqnHqjwc.d.cts} +85 -85
- package/dist/{job_posting_service_latest-DOGQ9tEu.d.ts → job_posting_service_latest-tqnHqjwc.d.ts} +85 -85
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { J as JobPostModel } from '../../job_posting_service_latest-
|
|
3
|
+
import { J as JobPostModel } from '../../job_posting_service_latest-tqnHqjwc.cjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
type JobPostProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { J as JobPostModel } from '../../job_posting_service_latest-
|
|
3
|
+
import { J as JobPostModel } from '../../job_posting_service_latest-tqnHqjwc.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
type JobPostProps = {
|
|
@@ -310,6 +310,7 @@ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
|
310
310
|
function ReadMore({ text, ...props }) {
|
|
311
311
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
312
312
|
const [maxWords, setMaxWords] = useState(160);
|
|
313
|
+
const isOverMaxWords = text.split(" ").length > maxWords;
|
|
313
314
|
useEffect(() => {
|
|
314
315
|
const updateMaxWords = () => {
|
|
315
316
|
const windowWidth = window.innerWidth;
|
|
@@ -324,6 +325,7 @@ function ReadMore({ text, ...props }) {
|
|
|
324
325
|
return () => window.removeEventListener("resize", updateMaxWords);
|
|
325
326
|
}, []);
|
|
326
327
|
function createReadMoreText(text2, maxWords2, isExpanded2) {
|
|
328
|
+
if (!isOverMaxWords) return text2;
|
|
327
329
|
const words = text2.split(" ");
|
|
328
330
|
const snippet2 = isExpanded2 ? text2 : words.slice(0, maxWords2).join(" ");
|
|
329
331
|
const readMoreText = isExpanded2 ? "" : "...";
|
|
@@ -333,7 +335,7 @@ function ReadMore({ text, ...props }) {
|
|
|
333
335
|
const snippet = createReadMoreText(text, maxWords, isExpanded);
|
|
334
336
|
return /* @__PURE__ */ jsxs5("div", { ...props, children: [
|
|
335
337
|
/* @__PURE__ */ jsx8("div", { "data-testid": "read-more-text", className: "prose lg:prose-lg", children: /* @__PURE__ */ jsx8(Markdown, { children: snippet }) }),
|
|
336
|
-
/* @__PURE__ */ jsx8(
|
|
338
|
+
isOverMaxWords && /* @__PURE__ */ jsx8(
|
|
337
339
|
Button,
|
|
338
340
|
{
|
|
339
341
|
type: "button",
|
|
@@ -1586,7 +1588,7 @@ var jobPostSchema2 = jobPostSchema.extend({
|
|
|
1586
1588
|
|
|
1587
1589
|
// src/lib/salaryRange.ts
|
|
1588
1590
|
var CurrencyEnum2 = shared_pickle_output_latest_exports.CurrencyEnum;
|
|
1589
|
-
function salaryRange(salary) {
|
|
1591
|
+
function salaryRange(salary, showUnitText = true) {
|
|
1590
1592
|
if (!salary) return null;
|
|
1591
1593
|
let min = salary.minValue;
|
|
1592
1594
|
let max = salary.maxValue;
|
|
@@ -1605,17 +1607,19 @@ function salaryRange(salary) {
|
|
|
1605
1607
|
single = value.value;
|
|
1606
1608
|
unitText = value.unitText;
|
|
1607
1609
|
}
|
|
1608
|
-
if (unitText === "YEAR") unitText = "per year";
|
|
1609
|
-
if (unitText === "MONTH") unitText = "per month";
|
|
1610
|
-
if (unitText === "WEEK") unitText = "per week";
|
|
1611
|
-
if (unitText === "DAY") unitText = "per day";
|
|
1612
|
-
if (unitText === "PER_ACTIVITY") unitText = "per activity";
|
|
1613
|
-
if (unitText === "HOUR") unitText = "per hour";
|
|
1614
|
-
if (
|
|
1615
|
-
|
|
1616
|
-
if (min
|
|
1617
|
-
if (
|
|
1618
|
-
|
|
1610
|
+
if (unitText === "YEAR") unitText = " per year";
|
|
1611
|
+
if (unitText === "MONTH") unitText = " per month";
|
|
1612
|
+
if (unitText === "WEEK") unitText = " per week";
|
|
1613
|
+
if (unitText === "DAY") unitText = " per day";
|
|
1614
|
+
if (unitText === "PER_ACTIVITY") unitText = " per activity";
|
|
1615
|
+
if (unitText === "HOUR") unitText = " per hour";
|
|
1616
|
+
if (showUnitText === false) unitText = "";
|
|
1617
|
+
const isValid = (v) => v != null && v >= 0;
|
|
1618
|
+
if (!isValid(min) && !isValid(max) && !isValid(single)) return null;
|
|
1619
|
+
if (isValid(single)) return sign + single.toLocaleString() + unitText;
|
|
1620
|
+
if (min === max) return sign + min?.toLocaleString() + unitText;
|
|
1621
|
+
if (isValid(min) && isValid(max))
|
|
1622
|
+
return sign + min?.toLocaleString() + " - " + sign + max?.toLocaleString() + unitText;
|
|
1619
1623
|
return null;
|
|
1620
1624
|
}
|
|
1621
1625
|
|