@hadoku/jobplatform 3.42.66 → 3.42.68

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.
Files changed (38) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/{ApplicationTracking-BhpParbe.js → ApplicationTracking-CoME_aIo.js} +2 -2
  3. package/dist/{ApplicationsList-DDjncd7P.js → ApplicationsList-UHSm2cP2.js} +1 -1
  4. package/dist/ClipboardPalette-COZkKuN-.js +59 -0
  5. package/dist/InsightsPage-DSJBQopJ.js +181 -0
  6. package/dist/{PacketDetail-KOXrbMqc.js → PacketDetail-DUzfgMQa.js} +1 -1
  7. package/dist/{PacketsList-llRBP10u.js → PacketsList-Dv7np_9D.js} +1 -1
  8. package/dist/PipelineBoard-BeQEH8-g.js +306 -0
  9. package/dist/ProfilePage-DFG6yzMx.js +370 -0
  10. package/dist/api/http.d.ts +11 -0
  11. package/dist/api/http.d.ts.map +1 -0
  12. package/dist/api/jobs.d.ts +5 -0
  13. package/dist/api/jobs.d.ts.map +1 -1
  14. package/dist/api/me.d.ts +88 -0
  15. package/dist/api/me.d.ts.map +1 -0
  16. package/dist/api/pipeline.d.ts +22 -2
  17. package/dist/api/pipeline.d.ts.map +1 -1
  18. package/dist/components/ClipboardPalette.d.ts +10 -0
  19. package/dist/components/ClipboardPalette.d.ts.map +1 -0
  20. package/dist/components/ImportPosting.d.ts +13 -0
  21. package/dist/components/ImportPosting.d.ts.map +1 -0
  22. package/dist/components/InsightsPage.d.ts +9 -0
  23. package/dist/components/InsightsPage.d.ts.map +1 -0
  24. package/dist/components/JobDrawer.d.ts +3 -1
  25. package/dist/components/JobDrawer.d.ts.map +1 -1
  26. package/dist/components/JobsList.d.ts.map +1 -1
  27. package/dist/components/NearFilter.d.ts +20 -0
  28. package/dist/components/NearFilter.d.ts.map +1 -0
  29. package/dist/components/PipelineBoard.d.ts.map +1 -1
  30. package/dist/components/ProfilePage.d.ts +9 -0
  31. package/dist/components/ProfilePage.d.ts.map +1 -0
  32. package/dist/{entry-CFBqMGn5.js → entry-D7QDbdxu.js} +1535 -1317
  33. package/dist/index.js +1 -1
  34. package/dist/pipeline-Es-b-u_8.js +40 -0
  35. package/dist/style.css +1 -1
  36. package/package.json +2 -2
  37. package/dist/PipelineBoard-BLmNwNaq.js +0 -208
  38. package/dist/pipeline-C2hWQq1c.js +0 -47
@@ -1,208 +0,0 @@
1
- import { jsx as n, jsxs as l, Fragment as R } from "react/jsx-runtime";
2
- import { useState as f, useEffect as x, useMemo as q } from "react";
3
- import { u as U, i as m, J as w, h as J } from "./entry-CFBqMGn5.js";
4
- import { g as B } from "./pipeline-C2hWQq1c.js";
5
- const F = [
6
- { state: "interested", label: "Interested" },
7
- { state: "saved", label: "Saved" },
8
- { state: "applied", label: "Applied" },
9
- { state: "interviewing", label: "Interviewing" },
10
- { state: "offered", label: "Offered" },
11
- { state: "rejected", label: "Rejected" }
12
- ], Y = { 1: "High", 3: "Low" };
13
- function H() {
14
- const e = /* @__PURE__ */ new Date(), i = (s) => String(s).padStart(2, "0");
15
- return `${e.getFullYear()}-${i(e.getMonth() + 1)}-${i(e.getDate())}`;
16
- }
17
- function j(e) {
18
- const i = /^\d{4}-\d{2}-\d{2}$/.test(e) ? /* @__PURE__ */ new Date(`${e}T00:00:00`) : new Date(e);
19
- return Number.isNaN(i.getTime()) ? e : i.toLocaleDateString(void 0, { month: "short", day: "numeric" });
20
- }
21
- function I(e, i) {
22
- const s = e.tracking.priority ?? 2, d = i.tracking.priority ?? 2;
23
- if (s !== d) return s - d;
24
- const u = e.tracking.follow_up_at ?? "9999", o = i.tracking.follow_up_at ?? "9999";
25
- return u !== o ? u < o ? -1 : 1 : e.updated_at < i.updated_at ? 1 : -1;
26
- }
27
- function O({ date: e, today: i }) {
28
- const s = e < i ? "overdue" : e === i ? "today" : "upcoming", d = s === "overdue" ? `Follow up — was ${j(e)}` : s === "today" ? "Follow up today" : `Follow up ${j(e)}`;
29
- return /* @__PURE__ */ n("span", { className: `jp-pipe-chip jp-pipe-chip--${s}`, "data-testid": "pipe-follow-up", children: d });
30
- }
31
- function Q({
32
- item: e,
33
- today: i,
34
- onSelect: s,
35
- onMove: d,
36
- moving: u
37
- }) {
38
- const o = e.tracking.priority, h = o === 1 || o === 3 ? Y[o] : null;
39
- return /* @__PURE__ */ l(
40
- "li",
41
- {
42
- className: `jp-pipe-card${u ? " jp-pipe-card--moving" : ""}`,
43
- draggable: !u,
44
- onDragStart: (r) => {
45
- r.dataTransfer.setData("text/plain", e.job_id), r.dataTransfer.effectAllowed = "move";
46
- },
47
- "data-testid": "pipe-card",
48
- "data-job-id": e.job_id,
49
- children: [
50
- /* @__PURE__ */ l(
51
- "div",
52
- {
53
- role: "button",
54
- tabIndex: 0,
55
- className: "jp-pipe-card__open",
56
- onClick: () => s(e.job_id),
57
- onKeyDown: (r) => {
58
- r.target === r.currentTarget && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), s(e.job_id));
59
- },
60
- children: [
61
- /* @__PURE__ */ l("div", { className: "jp-pipe-card__head", children: [
62
- /* @__PURE__ */ n("span", { className: "jp-pipe-card__company", children: e.company }),
63
- h && /* @__PURE__ */ n("span", { className: `jp-pipe-chip jp-pipe-chip--priority-${o}`, children: h })
64
- ] }),
65
- /* @__PURE__ */ n("span", { className: "jp-pipe-card__title", children: e.title }),
66
- /* @__PURE__ */ l("span", { className: "jp-pipe-card__meta", children: [
67
- e.applied_at ? `Applied ${j(e.applied_at)}` : `Updated ${j(e.updated_at)}`,
68
- e.location && ` · ${e.location}`
69
- ] }),
70
- (e.tracking.follow_up_at ?? e.application_status ?? e.tracking.contact_name) && /* @__PURE__ */ l("div", { className: "jp-pipe-card__chips", children: [
71
- e.tracking.follow_up_at && /* @__PURE__ */ n(O, { date: e.tracking.follow_up_at, today: i }),
72
- e.application_status && /* @__PURE__ */ l("span", { className: "jp-pipe-chip jp-pipe-chip--neutral", title: "Apply queue status", children: [
73
- "Runner: ",
74
- e.application_status.replace("_", " ")
75
- ] }),
76
- e.tracking.contact_name && /* @__PURE__ */ n("span", { className: "jp-pipe-chip jp-pipe-chip--neutral", children: e.tracking.contact_name })
77
- ] })
78
- ]
79
- }
80
- ),
81
- /* @__PURE__ */ l(
82
- "select",
83
- {
84
- className: "jp-pipe-card__move",
85
- "aria-label": `Move ${e.company} — ${e.title}`,
86
- value: e.state,
87
- disabled: u,
88
- onChange: (r) => d(e.job_id, r.target.value),
89
- children: [
90
- F.map((r) => /* @__PURE__ */ n("option", { value: r.state, children: r.label }, r.state)),
91
- /* @__PURE__ */ n("option", { value: "dismissed", children: "Dismiss" })
92
- ]
93
- }
94
- )
95
- ]
96
- }
97
- );
98
- }
99
- function W({ auth: e, onSelect: i, reloadKey: s }) {
100
- const {
101
- data: d,
102
- loading: u,
103
- error: o,
104
- reload: h
105
- } = U("pipeline", () => B(e)), [r, v] = f({}), [$, k] = f(/* @__PURE__ */ new Set()), [D, T] = f(null), [y, M] = f(""), [L, b] = f(null), C = H();
106
- x(() => {
107
- s !== 0 && (m("pipeline"), h());
108
- }, [s]), x(() => v({}), [d]);
109
- const g = q(() => {
110
- const a = y.trim().toLowerCase();
111
- return (d ?? []).map((t) => r[t.job_id] ? { ...t, state: r[t.job_id] } : t).filter((t) => t.state !== "dismissed").filter((t) => !a || t.company.toLowerCase().includes(a) || t.title.toLowerCase().includes(a));
112
- }, [d, r, y]), N = g.filter((a) => a.tracking.follow_up_at && a.tracking.follow_up_at <= C), E = async (a, t) => {
113
- const p = g.find((c) => c.job_id === a);
114
- if (!(!p || p.state === t || $.has(a))) {
115
- T(null), v((c) => ({ ...c, [a]: t })), k((c) => new Set(c).add(a));
116
- try {
117
- await J(a, t, e), m(`job:${a}:`), m("jobs:"), m("pipeline"), h();
118
- } catch (c) {
119
- v((_) => {
120
- const S = { ..._ };
121
- return delete S[a], S;
122
- }), T(
123
- `Could not move ${p.company}: ${c instanceof w ? c.message : "request failed"}`
124
- );
125
- } finally {
126
- k((c) => {
127
- const _ = new Set(c);
128
- return _.delete(a), _;
129
- });
130
- }
131
- }
132
- }, A = (a) => (t) => {
133
- t.preventDefault(), b(null);
134
- const p = t.dataTransfer.getData("text/plain");
135
- p && E(p, a);
136
- }, P = o instanceof w && o.status === 403;
137
- return u ? /* @__PURE__ */ n("p", { className: "jp-muted", children: "Loading your pipeline…" }) : P ? /* @__PURE__ */ n("p", { className: "jp-muted", children: "The pipeline is per-account — sign in to see yours." }) : o ? /* @__PURE__ */ n("p", { className: "jp-error", children: o instanceof w ? o.message : "Failed to load the pipeline" }) : (d ?? []).length === 0 ? /* @__PURE__ */ n("p", { className: "jp-muted", children: "Nothing in your pipeline yet. Mark a posting interested, save it or apply from the feed, and it lands here." }) : /* @__PURE__ */ l("div", { className: "jp-pipe", children: [
138
- /* @__PURE__ */ l("div", { className: "jp-pipe__toolbar", children: [
139
- /* @__PURE__ */ n(
140
- "input",
141
- {
142
- type: "search",
143
- className: "jp-jobs__search",
144
- placeholder: "Filter by company or title",
145
- value: y,
146
- onChange: (a) => M(a.target.value),
147
- "aria-label": "Filter the pipeline"
148
- }
149
- ),
150
- /* @__PURE__ */ l("span", { className: "jp-pipe__summary", "data-testid": "pipe-summary", children: [
151
- g.length,
152
- " in play",
153
- N.length > 0 && /* @__PURE__ */ l(R, { children: [
154
- " · ",
155
- /* @__PURE__ */ l("strong", { children: [
156
- N.length,
157
- " follow-up",
158
- N.length === 1 ? "" : "s",
159
- " due"
160
- ] })
161
- ] })
162
- ] })
163
- ] }),
164
- D && /* @__PURE__ */ n("p", { className: "jp-error", children: D }),
165
- /* @__PURE__ */ n("div", { className: "jp-pipe__board", children: F.map((a) => {
166
- const t = g.filter((p) => p.state === a.state).sort(I);
167
- return /* @__PURE__ */ l(
168
- "section",
169
- {
170
- className: `jp-pipe__col jp-pipe__col--${a.state}${L === a.state ? " jp-pipe__col--drop" : ""}`,
171
- "aria-label": a.label,
172
- "data-testid": `pipe-col-${a.state}`,
173
- onDragOver: (p) => {
174
- p.preventDefault(), p.dataTransfer.dropEffect = "move", L !== a.state && b(a.state);
175
- },
176
- onDragLeave: (p) => {
177
- p.currentTarget.contains(p.relatedTarget) || b(null);
178
- },
179
- onDrop: A(a.state),
180
- children: [
181
- /* @__PURE__ */ l("h3", { className: "jp-pipe__col-head", children: [
182
- /* @__PURE__ */ n("span", { className: `jp-jobcard__state jp-jobcard__state--${a.state}`, children: a.label }),
183
- /* @__PURE__ */ n("span", { className: "jp-pipe__count", children: t.length })
184
- ] }),
185
- /* @__PURE__ */ n("ul", { className: "jp-pipe__cards", children: t.map((p) => /* @__PURE__ */ n(
186
- Q,
187
- {
188
- item: p,
189
- today: C,
190
- onSelect: i,
191
- onMove: (c, _) => {
192
- E(c, _);
193
- },
194
- moving: $.has(p.job_id)
195
- },
196
- p.job_id
197
- )) })
198
- ]
199
- },
200
- a.state
201
- );
202
- }) })
203
- ] });
204
- }
205
- export {
206
- F as PIPELINE_COLUMNS,
207
- W as PipelineBoard
208
- };
@@ -1,47 +0,0 @@
1
- import { j as c, J as d } from "./entry-CFBqMGn5.js";
2
- const u = "/jobplatform/api";
3
- async function s(t, a, n = {}, r = !1) {
4
- const o = await fetch(`${u}${t}`, {
5
- ...n,
6
- headers: c(a, r),
7
- credentials: "include"
8
- }), e = await o.json();
9
- if (!o.ok || !e.success || !e.data)
10
- throw new d(e.message ?? e.error ?? `HTTP ${o.status}`, o.status);
11
- return e.data;
12
- }
13
- const i = (t) => `/jobs/${encodeURIComponent(t)}`;
14
- async function l(t) {
15
- return (await s("/pipeline", t)).items;
16
- }
17
- async function y(t, a, n) {
18
- return (await s(
19
- `${i(t)}/tracking`,
20
- n,
21
- { method: "PATCH", body: JSON.stringify(a) },
22
- !0
23
- )).tracking;
24
- }
25
- async function b(t, a) {
26
- return (await s(`${i(t)}/events`, a)).events;
27
- }
28
- async function p(t, a, n) {
29
- return (await s(
30
- `${i(t)}/events`,
31
- n,
32
- { method: "POST", body: JSON.stringify(a) },
33
- !0
34
- )).event;
35
- }
36
- async function m(t, a, n) {
37
- await s(`${i(t)}/events/${a}`, n, {
38
- method: "DELETE"
39
- });
40
- }
41
- export {
42
- p as a,
43
- m as d,
44
- l as g,
45
- b as l,
46
- y as s
47
- };