@devalok/shilp-sutra-karm 0.8.1 → 0.9.0
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/_chunks/chat-panel.js +376 -0
- package/dist/_chunks/daily-brief.js +177 -0
- package/dist/_chunks/kanban-board.js +597 -0
- package/dist/_chunks/project-card.js +121 -0
- package/dist/_chunks/render-adjustment-type.js +3596 -0
- package/dist/{tasks → _chunks}/task-constants.js +3 -3
- package/dist/_chunks/task-detail-panel.js +1305 -0
- package/dist/_chunks/use-composed-ref.js +12 -0
- package/dist/_chunks/vendor.js +11491 -0
- package/dist/admin/index.js +37 -60
- package/dist/board/index.js +3 -5
- package/dist/chat/index.js +6 -10
- package/dist/client/index.js +4 -6
- package/dist/dashboard/index.js +3 -4
- package/dist/index.js +189 -103
- package/dist/tasks/index.js +8 -14
- package/package.json +9 -4
- package/dist/admin/adjustments/approved-adjustments.js +0 -43
- package/dist/admin/break/break-admin-skeleton.js +0 -59
- package/dist/admin/break/break-admin.js +0 -373
- package/dist/admin/break/break-balance.js +0 -42
- package/dist/admin/break/breaks.js +0 -91
- package/dist/admin/break/delete-break.js +0 -55
- package/dist/admin/break/edit-break-balance.js +0 -113
- package/dist/admin/break/edit-break.js +0 -453
- package/dist/admin/break/header.js +0 -231
- package/dist/admin/break/leave-request.js +0 -162
- package/dist/admin/break/use-break-date-picker.js +0 -43
- package/dist/admin/dashboard/admin-dashboard.js +0 -337
- package/dist/admin/dashboard/associate-detail.js +0 -259
- package/dist/admin/dashboard/attendance-overview.js +0 -136
- package/dist/admin/dashboard/break-request.js +0 -176
- package/dist/admin/dashboard/calendar.js +0 -141
- package/dist/admin/dashboard/correction-list.js +0 -102
- package/dist/admin/dashboard/dashboard-header.js +0 -155
- package/dist/admin/dashboard/dashboard-skeleton.js +0 -109
- package/dist/admin/dashboard/leave-requests.js +0 -201
- package/dist/admin/dashboard/render-date.js +0 -144
- package/dist/admin/dashboard/use-calendar-navigation.js +0 -169
- package/dist/admin/dashboard/use-leave-request-interaction.js +0 -34
- package/dist/admin/utils/date-range-utils.js +0 -37
- package/dist/admin/utils/date-utils.js +0 -119
- package/dist/admin/utils/emoji-utils.js +0 -17
- package/dist/admin/utils/render-adjustment-type.js +0 -20
- package/dist/admin/utils/render-status.js +0 -22
- package/dist/board/board-column.js +0 -236
- package/dist/board/kanban-board.js +0 -218
- package/dist/board/task-card.js +0 -168
- package/dist/chat/chat-input.js +0 -54
- package/dist/chat/chat-panel.js +0 -151
- package/dist/chat/conversation-list.js +0 -99
- package/dist/chat/markdown-components.js +0 -35
- package/dist/chat/message-list.js +0 -59
- package/dist/chat/streaming-text.js +0 -17
- package/dist/client/accent-provider.js +0 -22
- package/dist/client/client-portal-header.js +0 -48
- package/dist/client/project-card.js +0 -60
- package/dist/dashboard/attendance-cta.js +0 -115
- package/dist/dashboard/daily-brief.js +0 -68
- package/dist/page-skeletons.js +0 -130
- package/dist/tasks/activity-tab.js +0 -185
- package/dist/tasks/conversation-tab.js +0 -138
- package/dist/tasks/files-tab.js +0 -186
- package/dist/tasks/review-tab.js +0 -170
- package/dist/tasks/subtasks-tab.js +0 -154
- package/dist/tasks/task-detail-panel.js +0 -210
- package/dist/tasks/task-properties.js +0 -324
- package/dist/utils/use-composed-ref.js +0 -12
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useReducer as v, useCallback as D } from "react";
|
|
3
|
-
import { format as f } from "date-fns";
|
|
4
|
-
import { isSameDay as T, getStartOfDay as M, getWeekDays as p, getMonthDays as _ } from "../utils/date-utils.js";
|
|
5
|
-
const y = (e) => f(e, "yyyy-MM-dd'T'HH:mm:ssxxx"), l = (e, a, s) => e === "weekly" ? p(a, s) : _(a, s), i = (e) => `${f(e, "MMMM")} ${f(e, "yyyy")}`;
|
|
6
|
-
function I(e, a) {
|
|
7
|
-
const s = /* @__PURE__ */ new Date();
|
|
8
|
-
switch (a.type) {
|
|
9
|
-
case "SET_TIME_FRAME": {
|
|
10
|
-
const t = l(
|
|
11
|
-
a.payload,
|
|
12
|
-
e.currentDate,
|
|
13
|
-
e.selectedDate
|
|
14
|
-
);
|
|
15
|
-
return {
|
|
16
|
-
...e,
|
|
17
|
-
activeTimeFrame: a.payload,
|
|
18
|
-
days: t
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
case "SELECT_DATE": {
|
|
22
|
-
const { index: t, date: n } = a.payload, o = y(n), c = M(n) > M(s), r = i(n);
|
|
23
|
-
return {
|
|
24
|
-
...e,
|
|
25
|
-
activeIndex: t,
|
|
26
|
-
selectedDate: o,
|
|
27
|
-
isFutureDate: c,
|
|
28
|
-
selectedMonth: r
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
case "SELECT_DAY_MONTHLY": {
|
|
32
|
-
const { date: t } = a.payload, n = y(t), o = M(t) > M(s), c = i(t), r = l(
|
|
33
|
-
e.activeTimeFrame,
|
|
34
|
-
e.currentDate,
|
|
35
|
-
n
|
|
36
|
-
);
|
|
37
|
-
return {
|
|
38
|
-
...e,
|
|
39
|
-
selectedDate: n,
|
|
40
|
-
isFutureDate: o,
|
|
41
|
-
selectedMonth: c,
|
|
42
|
-
days: r
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
case "NAVIGATE_DATE": {
|
|
46
|
-
const t = new Date(e.currentDate);
|
|
47
|
-
if (e.activeTimeFrame === "weekly") {
|
|
48
|
-
const r = a.payload === "prev" ? -7 : 7;
|
|
49
|
-
t.setDate(t.getDate() + r);
|
|
50
|
-
} else {
|
|
51
|
-
const r = a.payload === "prev" ? -1 : 1;
|
|
52
|
-
t.setMonth(t.getMonth() + r), t.setDate(1);
|
|
53
|
-
}
|
|
54
|
-
const n = y(t), o = i(t), c = l(e.activeTimeFrame, n, n);
|
|
55
|
-
return {
|
|
56
|
-
...e,
|
|
57
|
-
currentDate: n,
|
|
58
|
-
selectedDate: n,
|
|
59
|
-
dateOffset: e.dateOffset + (a.payload === "prev" ? -1 : 1),
|
|
60
|
-
selectedMonth: o,
|
|
61
|
-
days: c
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
case "SELECT_MONTH": {
|
|
65
|
-
const [t, n] = a.payload.split(" "), o = new Date(e.selectedDate);
|
|
66
|
-
o.setMonth((/* @__PURE__ */ new Date(`${t} 1, 2024`)).getMonth()), o.setFullYear(parseInt(n));
|
|
67
|
-
const c = y(o), r = Math.floor(
|
|
68
|
-
(o.getTime() - s.getTime()) / (7 * 24 * 60 * 60 * 1e3)
|
|
69
|
-
), u = l(e.activeTimeFrame, c, c);
|
|
70
|
-
return {
|
|
71
|
-
...e,
|
|
72
|
-
currentDate: c,
|
|
73
|
-
selectedDate: c,
|
|
74
|
-
selectedMonth: a.payload,
|
|
75
|
-
dateOffset: r,
|
|
76
|
-
days: u
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
case "GO_TODAY": {
|
|
80
|
-
const t = y(s), n = i(s), o = Math.floor(
|
|
81
|
-
(s.getTime() - (/* @__PURE__ */ new Date()).getTime()) / (7 * 24 * 60 * 60 * 1e3)
|
|
82
|
-
), c = l(e.activeTimeFrame, t, t), r = c.findIndex(
|
|
83
|
-
(u) => T(u.fullDate, s)
|
|
84
|
-
);
|
|
85
|
-
return {
|
|
86
|
-
...e,
|
|
87
|
-
currentDate: t,
|
|
88
|
-
selectedDate: t,
|
|
89
|
-
selectedMonth: n,
|
|
90
|
-
dateOffset: o,
|
|
91
|
-
isFutureDate: !1,
|
|
92
|
-
days: c,
|
|
93
|
-
activeIndex: r !== -1 ? r : e.activeIndex
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
case "UPDATE_DAYS": {
|
|
97
|
-
const t = l(
|
|
98
|
-
e.activeTimeFrame,
|
|
99
|
-
e.currentDate,
|
|
100
|
-
e.selectedDate
|
|
101
|
-
);
|
|
102
|
-
return { ...e, days: t };
|
|
103
|
-
}
|
|
104
|
-
default:
|
|
105
|
-
return e;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
function O() {
|
|
109
|
-
const e = /* @__PURE__ */ new Date(), a = y(e), s = p(a, a), t = s.findIndex(
|
|
110
|
-
(n) => T(n.fullDate, e)
|
|
111
|
-
);
|
|
112
|
-
return {
|
|
113
|
-
currentDate: a,
|
|
114
|
-
selectedDate: a,
|
|
115
|
-
isFutureDate: !1,
|
|
116
|
-
activeTimeFrame: "weekly",
|
|
117
|
-
days: s,
|
|
118
|
-
selectedMonth: i(e),
|
|
119
|
-
activeIndex: t !== -1 ? t : 0,
|
|
120
|
-
dateOffset: 0
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function C() {
|
|
124
|
-
const [e, a] = v(I, null, O), s = D((d) => {
|
|
125
|
-
a({ type: "SET_TIME_FRAME", payload: d });
|
|
126
|
-
}, []), t = D((d, m) => {
|
|
127
|
-
a({ type: "SELECT_DATE", payload: { index: d, date: m } });
|
|
128
|
-
}, []), n = D((d) => {
|
|
129
|
-
a({ type: "SELECT_DAY_MONTHLY", payload: { date: d } });
|
|
130
|
-
}, []), o = D((d) => {
|
|
131
|
-
a({ type: "NAVIGATE_DATE", payload: d });
|
|
132
|
-
}, []), c = D((d) => {
|
|
133
|
-
a({ type: "SELECT_MONTH", payload: d });
|
|
134
|
-
}, []), r = D(() => {
|
|
135
|
-
a({ type: "GO_TODAY" });
|
|
136
|
-
}, []), u = D(() => {
|
|
137
|
-
a({ type: "UPDATE_DAYS" });
|
|
138
|
-
}, []), h = D(() => T(new Date(e.selectedDate), /* @__PURE__ */ new Date()), [e.selectedDate]), E = D(() => {
|
|
139
|
-
const d = [], m = (/* @__PURE__ */ new Date()).getFullYear(), F = f(new Date(e.selectedDate), "MMMM");
|
|
140
|
-
for (let w = -2; w < 1; w++) {
|
|
141
|
-
const g = new Date(m + w, 0);
|
|
142
|
-
d.push(`${F} ${g.getFullYear()}`);
|
|
143
|
-
}
|
|
144
|
-
return d;
|
|
145
|
-
}, [e.selectedDate]), S = D(() => e.days.length > 0 && !!e.days[0].fullDate && T(e.days[0].fullDate, new Date(e.selectedDate)), [e.days, e.selectedDate]), A = D(() => e.days.length > 0 && !!e.days[e.days.length - 1].fullDate && T(
|
|
146
|
-
e.days[e.days.length - 1].fullDate,
|
|
147
|
-
new Date(e.selectedDate)
|
|
148
|
-
), [e.days, e.selectedDate]);
|
|
149
|
-
return {
|
|
150
|
-
...e,
|
|
151
|
-
dispatch: a,
|
|
152
|
-
// Action creators
|
|
153
|
-
setActiveTimeFrame: s,
|
|
154
|
-
selectDate: t,
|
|
155
|
-
selectDayMonthly: n,
|
|
156
|
-
navigateDate: o,
|
|
157
|
-
selectMonth: c,
|
|
158
|
-
goToday: r,
|
|
159
|
-
updateDays: u,
|
|
160
|
-
// Computed
|
|
161
|
-
isTodaySelected: h,
|
|
162
|
-
getYearsList: E,
|
|
163
|
-
isFirstDate: S,
|
|
164
|
-
isLastDate: A
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
export {
|
|
168
|
-
C as useCalendarNavigation
|
|
169
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useState as e, useCallback as R } from "react";
|
|
3
|
-
function g() {
|
|
4
|
-
const [a, s] = e(!1), [i, t] = e(null), [m, n] = e(null), [v, o] = e(""), [f, l] = e(!1), [p, c] = e(
|
|
5
|
-
null
|
|
6
|
-
), [A, u] = e(!1), [q, r] = e(null), C = R(() => {
|
|
7
|
-
s(!1), t(null), n(null), o(""), l(!1), c(null), u(!1), r(null);
|
|
8
|
-
}, []);
|
|
9
|
-
return {
|
|
10
|
-
// State
|
|
11
|
-
isProcessing: a,
|
|
12
|
-
activeRequest: i,
|
|
13
|
-
activeAction: m,
|
|
14
|
-
message: v,
|
|
15
|
-
openComment: f,
|
|
16
|
-
hoveredRequest: p,
|
|
17
|
-
isCtrlPressed: A,
|
|
18
|
-
hoverActionTemp: q,
|
|
19
|
-
// Setters
|
|
20
|
-
setIsProcessing: s,
|
|
21
|
-
setActiveRequest: t,
|
|
22
|
-
setActiveAction: n,
|
|
23
|
-
setMessage: o,
|
|
24
|
-
setOpenComment: l,
|
|
25
|
-
setHoveredRequest: c,
|
|
26
|
-
setIsCtrlPressed: u,
|
|
27
|
-
setHoverActionTemp: r,
|
|
28
|
-
// Helpers
|
|
29
|
-
reset: C
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
g as useLeaveRequestInteraction
|
|
34
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { format as c, parseISO as s, isWithinInterval as l, isAfter as y, isEqual as u, isBefore as m } from "date-fns";
|
|
3
|
-
function d(e, n, r) {
|
|
4
|
-
const t = s(e), o = s(n), a = s(r);
|
|
5
|
-
return l(t, { start: o, end: a });
|
|
6
|
-
}
|
|
7
|
-
function p(e, n) {
|
|
8
|
-
const r = s(e), t = s(n);
|
|
9
|
-
return m(r, t) || u(r, t);
|
|
10
|
-
}
|
|
11
|
-
function O(e, n) {
|
|
12
|
-
const r = s(e), t = s(n);
|
|
13
|
-
return y(r, t) || u(r, t);
|
|
14
|
-
}
|
|
15
|
-
function b(e, n) {
|
|
16
|
-
return y(s(e), s(n));
|
|
17
|
-
}
|
|
18
|
-
function S(e, n, r, t) {
|
|
19
|
-
return r.some((o) => {
|
|
20
|
-
const a = c(new Date(o.startDate), "yyyy-MM-dd"), i = c(new Date(o.endDate), "yyyy-MM-dd"), f = d(e, a, i), D = d(n, a, i), M = p(e, a) && O(n, i);
|
|
21
|
-
return o.id !== t && (f || D || M);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function A(e, n, r) {
|
|
25
|
-
return n.some((t) => {
|
|
26
|
-
const o = c(new Date(t.startDate), "yyyy-MM-dd"), a = c(new Date(t.endDate), "yyyy-MM-dd");
|
|
27
|
-
return t.id !== r && d(e, o, a);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
S as checkDateOverlap,
|
|
32
|
-
A as isBreakDay,
|
|
33
|
-
b as isDateAfter,
|
|
34
|
-
d as isDateInRange,
|
|
35
|
-
O as isDateSameOrAfter,
|
|
36
|
-
p as isDateSameOrBefore
|
|
37
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { endOfDay as S, startOfMonth as T, getDaysInMonth as p, subMonths as O, isSameDay as o, format as l, addMonths as $, startOfDay as A, startOfWeek as L, addDays as k } from "date-fns";
|
|
3
|
-
const d = "Asia/Kolkata", g = "en-IN";
|
|
4
|
-
function I(t, e) {
|
|
5
|
-
return new Date(t).toLocaleDateString(g, {
|
|
6
|
-
timeZone: d,
|
|
7
|
-
...e
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function U(t, e) {
|
|
11
|
-
return new Date(t).toLocaleTimeString(g, {
|
|
12
|
-
timeZone: d,
|
|
13
|
-
...e
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function w(t) {
|
|
17
|
-
return (t instanceof Date ? t : new Date(t)).toLocaleDateString(g, {
|
|
18
|
-
day: "2-digit",
|
|
19
|
-
month: "short",
|
|
20
|
-
year: "2-digit",
|
|
21
|
-
timeZone: d
|
|
22
|
-
}).replace(",", "").replace(/(\d{2})$/, "’$1");
|
|
23
|
-
}
|
|
24
|
-
function F(t) {
|
|
25
|
-
return t === "-" ? "-" : w(t);
|
|
26
|
-
}
|
|
27
|
-
function P(t) {
|
|
28
|
-
const e = t.toLocaleString(g, {
|
|
29
|
-
weekday: "long",
|
|
30
|
-
timeZone: d
|
|
31
|
-
});
|
|
32
|
-
return `${w(t)}, ${e}`;
|
|
33
|
-
}
|
|
34
|
-
function Z(t) {
|
|
35
|
-
if (t >= 11 && t <= 13) return `${t}th`;
|
|
36
|
-
switch (t % 10) {
|
|
37
|
-
case 1:
|
|
38
|
-
return `${t}st`;
|
|
39
|
-
case 2:
|
|
40
|
-
return `${t}nd`;
|
|
41
|
-
case 3:
|
|
42
|
-
return `${t}rd`;
|
|
43
|
-
default:
|
|
44
|
-
return `${t}th`;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function W(t, e) {
|
|
48
|
-
return !(t instanceof Date) || !(e instanceof Date) ? !1 : o(t, e);
|
|
49
|
-
}
|
|
50
|
-
function x(t, e) {
|
|
51
|
-
const r = L(new Date(t), { weekStartsOn: 0 }), i = /* @__PURE__ */ new Date(), c = new Date(e);
|
|
52
|
-
return Array.from({ length: 7 }, (u, y) => {
|
|
53
|
-
const s = k(r, y);
|
|
54
|
-
return {
|
|
55
|
-
day: l(s, "EEE").toUpperCase(),
|
|
56
|
-
date: s.getDate(),
|
|
57
|
-
fullDate: s,
|
|
58
|
-
isToday: o(s, i),
|
|
59
|
-
isActive: o(s, c)
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function Y(t, e) {
|
|
64
|
-
const r = new Date(t), i = new Date(e), c = /* @__PURE__ */ new Date(), u = T(r), y = u.getDay(), s = p(r), f = [], h = O(u, 1), E = p(h);
|
|
65
|
-
for (let n = y - 1; n >= 0; n--) {
|
|
66
|
-
const a = E - n, D = new Date(h.getFullYear(), h.getMonth(), a);
|
|
67
|
-
f.push({
|
|
68
|
-
day: l(D, "EEE").toUpperCase(),
|
|
69
|
-
date: D.getDate(),
|
|
70
|
-
fullDate: D,
|
|
71
|
-
isToday: o(D, c),
|
|
72
|
-
isActive: o(D, i),
|
|
73
|
-
isPadding: !0
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
for (let n = 1; n <= s; n++) {
|
|
77
|
-
const a = new Date(r.getFullYear(), r.getMonth(), n);
|
|
78
|
-
f.push({
|
|
79
|
-
day: l(a, "EEE").toUpperCase(),
|
|
80
|
-
date: n,
|
|
81
|
-
fullDate: a,
|
|
82
|
-
isToday: o(a, c),
|
|
83
|
-
isActive: o(a, i),
|
|
84
|
-
isPadding: !1
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
const M = (7 - f.length % 7) % 7, m = $(u, 1);
|
|
88
|
-
for (let n = 1; n <= M; n++) {
|
|
89
|
-
const a = new Date(m.getFullYear(), m.getMonth(), n);
|
|
90
|
-
f.push({
|
|
91
|
-
day: l(a, "EEE").toUpperCase(),
|
|
92
|
-
date: n,
|
|
93
|
-
fullDate: a,
|
|
94
|
-
isToday: o(a, c),
|
|
95
|
-
isActive: o(a, i),
|
|
96
|
-
isPadding: !0
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
return f;
|
|
100
|
-
}
|
|
101
|
-
function _(t = /* @__PURE__ */ new Date()) {
|
|
102
|
-
return A(t);
|
|
103
|
-
}
|
|
104
|
-
function N(t = /* @__PURE__ */ new Date()) {
|
|
105
|
-
return S(t);
|
|
106
|
-
}
|
|
107
|
-
export {
|
|
108
|
-
w as formatDate,
|
|
109
|
-
I as formatDateIST,
|
|
110
|
-
P as formatDateWithWeekday,
|
|
111
|
-
F as formatOptionalDate,
|
|
112
|
-
U as formatTimeIST,
|
|
113
|
-
Z as getDaySuffix,
|
|
114
|
-
N as getEndOfDay,
|
|
115
|
-
Y as getMonthDays,
|
|
116
|
-
_ as getStartOfDay,
|
|
117
|
-
x as getWeekDays,
|
|
118
|
-
W as isSameDay
|
|
119
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function r(e) {
|
|
3
|
-
return e.replace(
|
|
4
|
-
/^[\p{Emoji_Presentation}\p{Extended_Pictographic}\u200B-\u200D]+/gu,
|
|
5
|
-
""
|
|
6
|
-
);
|
|
7
|
-
}
|
|
8
|
-
function o(e) {
|
|
9
|
-
return (e == null ? void 0 : e.replace(
|
|
10
|
-
/[\p{Emoji_Presentation}\p{Extended_Pictographic}\u200B-\u200D]+/gu,
|
|
11
|
-
""
|
|
12
|
-
)) ?? "";
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
o as removeAllEmojis,
|
|
16
|
-
r as removeEmojiAtStart
|
|
17
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as R } from "react/jsx-runtime";
|
|
3
|
-
const t = {
|
|
4
|
-
YEARLY_BALANCE: "YEARLY_BALANCE",
|
|
5
|
-
CARRY_FORWARD: "CARRY_FORWARD",
|
|
6
|
-
CASHOUT: "CASHOUT",
|
|
7
|
-
OTHER: "OTHER"
|
|
8
|
-
}, r = {
|
|
9
|
-
YEARLY_BALANCE: "Yearly Balance",
|
|
10
|
-
CARRY_FORWARD: "Carry Forward",
|
|
11
|
-
CASHOUT: "Cashout",
|
|
12
|
-
OTHER: "Other"
|
|
13
|
-
};
|
|
14
|
-
function E(A) {
|
|
15
|
-
return /* @__PURE__ */ R("div", { children: r[A] });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
t as AdjustmentType,
|
|
19
|
-
E as renderAdjustmentType
|
|
20
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
-
import { Badge as l } from "@devalok/shilp-sutra/ui";
|
|
4
|
-
const e = {
|
|
5
|
-
APPROVED: { text: "Corrected", color: "accent" },
|
|
6
|
-
PENDING: { text: "Pending", color: "warning" },
|
|
7
|
-
REJECTED: { text: "Denied", color: "error" },
|
|
8
|
-
MISSING: { text: "Missed", color: "error" }
|
|
9
|
-
}, o = {
|
|
10
|
-
APPROVED: { text: "Approved", color: "success" },
|
|
11
|
-
PENDING: { text: "Pending", color: "warning" },
|
|
12
|
-
REJECTED: { text: "Denied", color: "error" },
|
|
13
|
-
CANCELLED: { text: "Redacted", color: "error" },
|
|
14
|
-
MISSING: { text: "Missed", color: "error" }
|
|
15
|
-
};
|
|
16
|
-
function D(t, r) {
|
|
17
|
-
const c = r ? e : o, n = r ? e.REJECTED : o.REJECTED, { text: E, color: s } = c[t] || n;
|
|
18
|
-
return /* @__PURE__ */ d(l, { color: s, size: "sm", children: E });
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
D as renderStatus
|
|
22
|
-
};
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as r, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
3
|
-
import * as P from "react";
|
|
4
|
-
import { useState as n, useRef as v } from "react";
|
|
5
|
-
import { useDroppable as H } from "@dnd-kit/core";
|
|
6
|
-
import { SortableContext as U, verticalListSortingStrategy as _ } from "@dnd-kit/sortable";
|
|
7
|
-
import { cn as w } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
8
|
-
import { Button as m } from "@devalok/shilp-sutra/ui/button";
|
|
9
|
-
import { Input as k } from "@devalok/shilp-sutra/ui/input";
|
|
10
|
-
import { DropdownMenu as $, DropdownMenuTrigger as q, DropdownMenuContent as G, DropdownMenuItem as u, DropdownMenuSeparator as J } from "@devalok/shilp-sutra/ui/dropdown-menu";
|
|
11
|
-
import { IconEye as C, IconPlus as I, IconDots as Q, IconPencil as V, IconEyeOff as W, IconTrash as X } from "@tabler/icons-react";
|
|
12
|
-
import { TaskCard as Y } from "./task-card.js";
|
|
13
|
-
const E = [
|
|
14
|
-
"border-l-category-cyan",
|
|
15
|
-
"border-l-category-amber",
|
|
16
|
-
"border-l-category-teal",
|
|
17
|
-
"border-l-category-indigo",
|
|
18
|
-
"border-l-category-orange",
|
|
19
|
-
"border-l-category-emerald",
|
|
20
|
-
"border-l-category-slate",
|
|
21
|
-
"border-l-accent"
|
|
22
|
-
], Z = P.forwardRef(
|
|
23
|
-
function({
|
|
24
|
-
column: s,
|
|
25
|
-
index: D,
|
|
26
|
-
isOverlay: A,
|
|
27
|
-
onAddTask: S,
|
|
28
|
-
onClickTask: B,
|
|
29
|
-
onRenameColumn: h,
|
|
30
|
-
onDeleteColumn: f,
|
|
31
|
-
onToggleVisibility: p
|
|
32
|
-
}, M) {
|
|
33
|
-
const [b, a] = n(!1), [i, o] = n(""), [T, d] = n(!1), [c, l] = n(s.name), x = v(null), R = v(null), { setNodeRef: j, isOver: z } = H({
|
|
34
|
-
id: `column-${s.id}`,
|
|
35
|
-
data: {
|
|
36
|
-
type: "column",
|
|
37
|
-
column: s
|
|
38
|
-
}
|
|
39
|
-
}), K = s.tasks.map((t) => t.id), F = E[D % E.length], y = () => {
|
|
40
|
-
i.trim() && (S(s.id, i.trim()), o(""), a(!1));
|
|
41
|
-
}, O = (t) => {
|
|
42
|
-
t.key === "Enter" && y(), t.key === "Escape" && (o(""), a(!1));
|
|
43
|
-
}, g = () => {
|
|
44
|
-
c.trim() && c.trim() !== s.name && (h == null || h(s.id, c.trim())), d(!1);
|
|
45
|
-
}, L = (t) => {
|
|
46
|
-
t.key === "Enter" && g(), t.key === "Escape" && (l(s.name), d(!1));
|
|
47
|
-
};
|
|
48
|
-
return /* @__PURE__ */ r(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
ref: M,
|
|
52
|
-
className: w(
|
|
53
|
-
/* intentional: board column fixed width — matches add-column button */
|
|
54
|
-
"flex h-full w-[300px] flex-shrink-0 flex-col rounded-ds-xl border-l-[3px] bg-layer-01 shadow-01",
|
|
55
|
-
F,
|
|
56
|
-
A && "shadow-04"
|
|
57
|
-
),
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-ds-03 px-ds-04 py-ds-04", children: [
|
|
60
|
-
T ? /* @__PURE__ */ e(
|
|
61
|
-
k,
|
|
62
|
-
{
|
|
63
|
-
ref: R,
|
|
64
|
-
value: c,
|
|
65
|
-
onChange: (t) => l(t.target.value),
|
|
66
|
-
onBlur: g,
|
|
67
|
-
onKeyDown: L,
|
|
68
|
-
className: "h-ds-xs-plus text-ds-md font-semibold",
|
|
69
|
-
autoFocus: !0
|
|
70
|
-
}
|
|
71
|
-
) : /* @__PURE__ */ e(
|
|
72
|
-
"h3",
|
|
73
|
-
{
|
|
74
|
-
className: "text-ds-md font-semibold text-text-primary truncate",
|
|
75
|
-
onDoubleClick: () => {
|
|
76
|
-
l(s.name), d(!0);
|
|
77
|
-
},
|
|
78
|
-
children: s.name
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
/* @__PURE__ */ e("span", { className: "flex h-5 min-w-[20px] items-center justify-center rounded-ds-full bg-field px-ds-02b text-ds-sm font-medium text-text-tertiary", children: s.tasks.length }),
|
|
82
|
-
s.isClientVisible && /* @__PURE__ */ e(
|
|
83
|
-
C,
|
|
84
|
-
{
|
|
85
|
-
className: "h-3 w-3 text-text-tertiary",
|
|
86
|
-
"aria-label": "Visible to client"
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ e("div", { className: "flex-1" }),
|
|
90
|
-
/* @__PURE__ */ e(
|
|
91
|
-
m,
|
|
92
|
-
{
|
|
93
|
-
variant: "ghost",
|
|
94
|
-
size: "icon-md",
|
|
95
|
-
className: "h-ds-xs w-ds-xs opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 hover:bg-interactive-subtle hover:text-interactive transition-opacity",
|
|
96
|
-
"aria-label": "Add task",
|
|
97
|
-
onClick: () => {
|
|
98
|
-
a(!0), setTimeout(() => {
|
|
99
|
-
var t;
|
|
100
|
-
return (t = x.current) == null ? void 0 : t.focus();
|
|
101
|
-
}, 50);
|
|
102
|
-
},
|
|
103
|
-
children: /* @__PURE__ */ e(I, { className: "h-ico-sm w-ico-sm" })
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ r($, { children: [
|
|
107
|
-
/* @__PURE__ */ e(q, { asChild: !0, children: /* @__PURE__ */ e(
|
|
108
|
-
m,
|
|
109
|
-
{
|
|
110
|
-
variant: "ghost",
|
|
111
|
-
size: "icon-md",
|
|
112
|
-
className: "h-ds-xs w-ds-xs opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100 transition-opacity",
|
|
113
|
-
"aria-label": "Column options",
|
|
114
|
-
children: /* @__PURE__ */ e(Q, { className: "h-ico-sm w-ico-sm" })
|
|
115
|
-
}
|
|
116
|
-
) }),
|
|
117
|
-
/* @__PURE__ */ r(G, { align: "end", className: "w-44", children: [
|
|
118
|
-
/* @__PURE__ */ r(
|
|
119
|
-
u,
|
|
120
|
-
{
|
|
121
|
-
onClick: () => {
|
|
122
|
-
l(s.name), d(!0);
|
|
123
|
-
},
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ e(V, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
126
|
-
"Rename"
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
),
|
|
130
|
-
/* @__PURE__ */ e(
|
|
131
|
-
u,
|
|
132
|
-
{
|
|
133
|
-
onClick: () => p == null ? void 0 : p(s.id, !s.isClientVisible),
|
|
134
|
-
children: s.isClientVisible ? /* @__PURE__ */ r(N, { children: [
|
|
135
|
-
/* @__PURE__ */ e(W, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
136
|
-
"Hide from client"
|
|
137
|
-
] }) : /* @__PURE__ */ r(N, { children: [
|
|
138
|
-
/* @__PURE__ */ e(C, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
139
|
-
"Show to client"
|
|
140
|
-
] })
|
|
141
|
-
}
|
|
142
|
-
),
|
|
143
|
-
/* @__PURE__ */ e(J, {}),
|
|
144
|
-
/* @__PURE__ */ r(
|
|
145
|
-
u,
|
|
146
|
-
{
|
|
147
|
-
className: "text-error focus:text-error",
|
|
148
|
-
onClick: () => f == null ? void 0 : f(s.id),
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ e(X, { className: "mr-ds-03 h-ico-sm w-ico-sm" }),
|
|
151
|
-
"Delete column"
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
] })
|
|
156
|
-
] })
|
|
157
|
-
] }),
|
|
158
|
-
/* @__PURE__ */ r(
|
|
159
|
-
"div",
|
|
160
|
-
{
|
|
161
|
-
ref: j,
|
|
162
|
-
className: w(
|
|
163
|
-
"no-scrollbar flex flex-1 flex-col gap-ds-03 overflow-y-auto px-ds-03 pb-ds-03 transition-colors duration-fast-02 ease-productive-standard",
|
|
164
|
-
z && "bg-interactive-subtle/50"
|
|
165
|
-
),
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ e(U, { items: K, strategy: _, children: s.tasks.map((t) => /* @__PURE__ */ e(Y, { task: t, onClickTask: B }, t.id)) }),
|
|
168
|
-
s.tasks.length === 0 && !b && /* @__PURE__ */ e("div", { className: "flex flex-1 items-center justify-center py-ds-07", children: /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-placeholder", children: "No tasks" }) })
|
|
169
|
-
]
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
b ? /* @__PURE__ */ r("div", { className: "border-t border-border-subtle p-ds-03", children: [
|
|
173
|
-
/* @__PURE__ */ e(
|
|
174
|
-
k,
|
|
175
|
-
{
|
|
176
|
-
ref: x,
|
|
177
|
-
value: i,
|
|
178
|
-
onChange: (t) => o(t.target.value),
|
|
179
|
-
onKeyDown: O,
|
|
180
|
-
onBlur: () => {
|
|
181
|
-
i.trim() || a(!1);
|
|
182
|
-
},
|
|
183
|
-
placeholder: "Task title...",
|
|
184
|
-
className: "h-ds-sm text-ds-md",
|
|
185
|
-
autoFocus: !0
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
/* @__PURE__ */ r("div", { className: "mt-ds-02b flex items-center gap-ds-02", children: [
|
|
189
|
-
/* @__PURE__ */ e(
|
|
190
|
-
m,
|
|
191
|
-
{
|
|
192
|
-
size: "sm",
|
|
193
|
-
className: "h-ds-xs-plus bg-interactive hover:bg-interactive-hover text-text-on-color text-ds-sm",
|
|
194
|
-
onClick: y,
|
|
195
|
-
disabled: !i.trim(),
|
|
196
|
-
children: "Add"
|
|
197
|
-
}
|
|
198
|
-
),
|
|
199
|
-
/* @__PURE__ */ e(
|
|
200
|
-
m,
|
|
201
|
-
{
|
|
202
|
-
variant: "ghost",
|
|
203
|
-
size: "sm",
|
|
204
|
-
className: "h-ds-xs-plus text-ds-sm",
|
|
205
|
-
onClick: () => {
|
|
206
|
-
o(""), a(!1);
|
|
207
|
-
},
|
|
208
|
-
children: "Cancel"
|
|
209
|
-
}
|
|
210
|
-
)
|
|
211
|
-
] })
|
|
212
|
-
] }) : /* @__PURE__ */ r(
|
|
213
|
-
"button",
|
|
214
|
-
{
|
|
215
|
-
onClick: () => {
|
|
216
|
-
a(!0), setTimeout(() => {
|
|
217
|
-
var t;
|
|
218
|
-
return (t = x.current) == null ? void 0 : t.focus();
|
|
219
|
-
}, 50);
|
|
220
|
-
},
|
|
221
|
-
className: "flex items-center gap-ds-02b border-t border-border-subtle px-ds-04 py-ds-03 text-ds-sm text-text-placeholder transition-colors hover:bg-field hover:text-text-tertiary",
|
|
222
|
-
children: [
|
|
223
|
-
/* @__PURE__ */ e(I, { className: "h-3 w-3" }),
|
|
224
|
-
"Add task"
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
Z.displayName = "BoardColumn";
|
|
234
|
-
export {
|
|
235
|
-
Z as BoardColumn
|
|
236
|
-
};
|