anarock-widgets 1.0.206 → 1.0.207
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/anarock-widgets.css +1 -1
- package/dist/index.cjs.js +64 -64
- package/dist/index.es.js +115 -63
- package/dist/index.umd.js +63 -63
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -51470,6 +51470,7 @@ function Bfe({ incidentReports: e = {}, incidentReportsDetails: t = [] }) {
|
|
|
51470
51470
|
const cde = [{ total_staff: 42, absent_staff: 6 }], ude = [
|
|
51471
51471
|
{ staff_role_name: "Security Guard", total_staff: 18, present_staff: 16 },
|
|
51472
51472
|
{ staff_role_name: "Supervisor", total_staff: 8, present_staff: 7 },
|
|
51473
|
+
{ staff_role_name: "Technician", total_staff: 10, present_staff: 9 },
|
|
51473
51474
|
{ staff_role_name: "Technician", total_staff: 10, present_staff: 9 }
|
|
51474
51475
|
];
|
|
51475
51476
|
function Wfe({ staffPresentAbsent: e, staffPresentByRole: t }) {
|
|
@@ -51491,12 +51492,12 @@ function Wfe({ staffPresentAbsent: e, staffPresentByRole: t }) {
|
|
|
51491
51492
|
/* @__PURE__ */ v.jsx("div", { className: "text-[12px] text-[#AB0000]", children: "Absent" })
|
|
51492
51493
|
] })
|
|
51493
51494
|
] }),
|
|
51494
|
-
/* @__PURE__ */ v.jsx("div", { className: "mt-
|
|
51495
|
+
/* @__PURE__ */ v.jsx("div", { className: "mt-[24px] space-y-2 overflow-y-auto max-h-[200px]", children: r?.length ? r?.map?.((s, l) => {
|
|
51495
51496
|
const c = Number(s?.total_staff ?? 0), u = Number(s?.present_staff ?? 0);
|
|
51496
51497
|
return /* @__PURE__ */ v.jsxs(
|
|
51497
51498
|
"div",
|
|
51498
51499
|
{
|
|
51499
|
-
className: "flex items-center justify-between p-3 bg-[#
|
|
51500
|
+
className: "flex items-center justify-between p-3 bg-[#F8FAFC] rounded-md",
|
|
51500
51501
|
children: [
|
|
51501
51502
|
/* @__PURE__ */ v.jsx("div", { className: "text-[#121212] text-[14px] leading-[18px] font-medium", children: s?.staff_role_name ?? "-" }),
|
|
51502
51503
|
/* @__PURE__ */ v.jsxs("div", { className: "text-[14px] leading-[20px] text-[#64748B]", children: [
|
|
@@ -51508,7 +51509,7 @@ function Wfe({ staffPresentAbsent: e, staffPresentByRole: t }) {
|
|
|
51508
51509
|
},
|
|
51509
51510
|
l
|
|
51510
51511
|
);
|
|
51511
|
-
}) : /* @__PURE__ */ v.jsx(
|
|
51512
|
+
}) : /* @__PURE__ */ v.jsx(v.Fragment, {}) })
|
|
51512
51513
|
] })
|
|
51513
51514
|
}
|
|
51514
51515
|
);
|
|
@@ -53930,8 +53931,8 @@ const rf = ["#8CB33E", "#F59E0B", "#3B82F6", "#06B6D4", "#CFCFCF"], Gde = [
|
|
|
53930
53931
|
title: "No Assets Found",
|
|
53931
53932
|
description: "Catch up all the data. Change the date range to see the data."
|
|
53932
53933
|
}
|
|
53933
|
-
) }) }) : /* @__PURE__ */ v.jsx(yn, { title: "Assets by Type", titleWeight: "semi-bold", className: "h-full", children: /* @__PURE__ */ v.jsxs("div", { className: "flex items-center justify-between
|
|
53934
|
-
/* @__PURE__ */ v.jsxs("div", { className: "relative w-[
|
|
53934
|
+
) }) }) : /* @__PURE__ */ v.jsx(yn, { title: "Assets by Type", titleWeight: "semi-bold", className: "h-full", children: /* @__PURE__ */ v.jsxs("div", { className: "flex items-center justify-between h-full", children: [
|
|
53935
|
+
/* @__PURE__ */ v.jsxs("div", { className: "relative w-[252px] h-[273px]", children: [
|
|
53935
53936
|
/* @__PURE__ */ v.jsx(zt, { width: "100%", height: "100%", children: /* @__PURE__ */ v.jsx(Mo, { children: /* @__PURE__ */ v.jsx(
|
|
53936
53937
|
Vi,
|
|
53937
53938
|
{
|
|
@@ -53950,8 +53951,8 @@ const rf = ["#8CB33E", "#F59E0B", "#3B82F6", "#06B6D4", "#CFCFCF"], Gde = [
|
|
|
53950
53951
|
}
|
|
53951
53952
|
) }) }),
|
|
53952
53953
|
/* @__PURE__ */ v.jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
53953
|
-
/* @__PURE__ */ v.jsx("div", { className: "text-[24px] text-[#121212]", children: r }),
|
|
53954
|
-
/* @__PURE__ */ v.jsx("div", { className: "text-[12px] text-[#
|
|
53954
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[24px] leading-[33px] font-medium text-[#121212]", children: r }),
|
|
53955
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[12px] leading-[17px] text-[#64748B] mt-[2px]", children: "Total Assets" })
|
|
53955
53956
|
] })
|
|
53956
53957
|
] }),
|
|
53957
53958
|
/* @__PURE__ */ v.jsx("div", { className: "flex-1 max-w-[280px]", children: /* @__PURE__ */ v.jsxs("div", { className: "rounded-[12px] overflow-hidden bg-white", children: [
|
|
@@ -54001,14 +54002,22 @@ const rf = ["#8CB33E", "#F59E0B", "#3B82F6", "#06B6D4", "#CFCFCF"], Gde = [
|
|
|
54001
54002
|
title: "No Maintenance Assets Status Found",
|
|
54002
54003
|
description: "Catch up all the data. Change the date range to see the data."
|
|
54003
54004
|
}
|
|
54004
|
-
) }) }) : /* @__PURE__ */ v.jsx(yn, { title: "Maintenance Status", titleWeight: "semi-bold", className: "h-full", children: /* @__PURE__ */ v.jsx("div", { className: "w-full h-[260px] flex items-center justify-center", children: Array.isArray(e) && e.length === 0 ? /* @__PURE__ */ v.jsx("div", { className: "text-[#94A3B8] text-sm", children: "No Data Found" }) : /* @__PURE__ */ v.jsx(zt, { width: "100%", height: "100%", children: /* @__PURE__ */ v.jsxs(
|
|
54005
|
+
) }) }) : /* @__PURE__ */ v.jsx(yn, { title: "Maintenance Status", titleWeight: "semi-bold", className: "h-full", children: /* @__PURE__ */ v.jsx("div", { className: "w-full h-[260px] flex items-center justify-center", children: Array.isArray(e) && e.length === 0 ? /* @__PURE__ */ v.jsx("div", { className: "text-[#94A3B8] text-sm", children: "No Data Found" }) : /* @__PURE__ */ v.jsx("div", { className: "relative w-full h-[297px] mt-[20px]", children: /* @__PURE__ */ v.jsx(zt, { width: "100%", height: "100%", children: /* @__PURE__ */ v.jsxs(
|
|
54005
54006
|
ga,
|
|
54006
54007
|
{
|
|
54007
54008
|
data: i,
|
|
54008
|
-
barSize:
|
|
54009
|
-
|
|
54009
|
+
barSize: 54,
|
|
54010
|
+
barCategoryGap: "40%",
|
|
54011
|
+
margin: { top: 20, right: 20, left: -20, bottom: 0 },
|
|
54010
54012
|
children: [
|
|
54011
|
-
/* @__PURE__ */ v.jsx(
|
|
54013
|
+
/* @__PURE__ */ v.jsx(
|
|
54014
|
+
Jr,
|
|
54015
|
+
{
|
|
54016
|
+
strokeDasharray: "3 3",
|
|
54017
|
+
vertical: !1,
|
|
54018
|
+
stroke: "#E2E8F0"
|
|
54019
|
+
}
|
|
54020
|
+
),
|
|
54012
54021
|
/* @__PURE__ */ v.jsx(
|
|
54013
54022
|
Pr,
|
|
54014
54023
|
{
|
|
@@ -54043,32 +54052,48 @@ const rf = ["#8CB33E", "#F59E0B", "#3B82F6", "#06B6D4", "#CFCFCF"], Gde = [
|
|
|
54043
54052
|
{
|
|
54044
54053
|
verticalAlign: "bottom",
|
|
54045
54054
|
align: "center",
|
|
54046
|
-
iconType: "square",
|
|
54047
54055
|
onClick: o,
|
|
54048
|
-
|
|
54056
|
+
content: ({ payload: a }) => /* @__PURE__ */ v.jsx("div", { className: "flex items-center justify-center gap-4 pt-4 flex-wrap", children: a.map((s, l) => /* @__PURE__ */ v.jsxs(
|
|
54049
54057
|
"div",
|
|
54050
54058
|
{
|
|
54051
|
-
|
|
54052
|
-
|
|
54053
|
-
|
|
54054
|
-
|
|
54055
|
-
|
|
54056
|
-
|
|
54057
|
-
|
|
54058
|
-
|
|
54059
|
-
|
|
54060
|
-
|
|
54061
|
-
|
|
54059
|
+
onClick: () => o({ dataKey: s.dataKey }),
|
|
54060
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
54061
|
+
children: [
|
|
54062
|
+
/* @__PURE__ */ v.jsx(
|
|
54063
|
+
"div",
|
|
54064
|
+
{
|
|
54065
|
+
style: {
|
|
54066
|
+
width: "16px",
|
|
54067
|
+
height: "8px",
|
|
54068
|
+
backgroundColor: t[s.dataKey] ? "#CBD5E1" : s.color
|
|
54069
|
+
// borderRadius: "2px",
|
|
54070
|
+
}
|
|
54071
|
+
}
|
|
54072
|
+
),
|
|
54073
|
+
/* @__PURE__ */ v.jsx(
|
|
54074
|
+
"span",
|
|
54075
|
+
{
|
|
54076
|
+
style: {
|
|
54077
|
+
fontSize: "12px",
|
|
54078
|
+
color: t[s.dataKey] ? "#CBD5E1" : "#64748B"
|
|
54079
|
+
},
|
|
54080
|
+
children: s.value
|
|
54081
|
+
}
|
|
54082
|
+
)
|
|
54083
|
+
]
|
|
54084
|
+
},
|
|
54085
|
+
l
|
|
54086
|
+
)) })
|
|
54062
54087
|
}
|
|
54063
54088
|
),
|
|
54064
54089
|
/* @__PURE__ */ v.jsx(Wn, { dataKey: "Open", stackId: "a", fill: "#3B82F6", hide: t.Open }),
|
|
54065
54090
|
/* @__PURE__ */ v.jsx(Wn, { dataKey: "Closed", stackId: "a", fill: "#10B981", hide: t.Closed }),
|
|
54066
54091
|
/* @__PURE__ */ v.jsx(Wn, { dataKey: "Cancelled", stackId: "a", fill: "#B91C1C", hide: t.Cancelled }),
|
|
54067
54092
|
/* @__PURE__ */ v.jsx(Wn, { dataKey: "OnHold", stackId: "a", fill: "#64748B", hide: t.OnHold }),
|
|
54068
|
-
/* @__PURE__ */ v.jsx(Wn, { dataKey: "InProgress", stackId: "a", fill: "#F59E0B", hide: t.InProgress })
|
|
54093
|
+
/* @__PURE__ */ v.jsx(Wn, { dataKey: "InProgress", stackId: "a", fill: "#F59E0B", hide: t.InProgress, name: "In Progress" })
|
|
54069
54094
|
]
|
|
54070
54095
|
}
|
|
54071
|
-
) }) }) });
|
|
54096
|
+
) }) }) }) });
|
|
54072
54097
|
};
|
|
54073
54098
|
function vpe({ data: e }) {
|
|
54074
54099
|
const t = [
|
|
@@ -54154,17 +54179,17 @@ function ype({ incidentReports: e, incidentReportsDetails: t }) {
|
|
|
54154
54179
|
titleWeight: "semi-bold",
|
|
54155
54180
|
children: /* @__PURE__ */ v.jsxs("div", { children: [
|
|
54156
54181
|
/* @__PURE__ */ v.jsxs("div", { className: "flex w-full text-center gap-[24px]", children: [
|
|
54157
|
-
/* @__PURE__ */ v.jsxs("div", { className: "flex-1
|
|
54158
|
-
/* @__PURE__ */ v.jsx("div", { className: "
|
|
54159
|
-
/* @__PURE__ */ v.jsx("div", { className: "
|
|
54182
|
+
/* @__PURE__ */ v.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center bg-[#FBF4F4] h-[76px] rounded", children: [
|
|
54183
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[24px] leading-[28px] font-medium text-[#AB0000]", children: n }),
|
|
54184
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[12px] leading-[16px] text-[#AB0000]", children: "Open" })
|
|
54160
54185
|
] }),
|
|
54161
|
-
/* @__PURE__ */ v.jsxs("div", { className: "flex-1
|
|
54162
|
-
/* @__PURE__ */ v.jsx("div", { className: "
|
|
54163
|
-
/* @__PURE__ */ v.jsx("div", { className: "
|
|
54186
|
+
/* @__PURE__ */ v.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center bg-[#FFFBF2] h-[76px] rounded", children: [
|
|
54187
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[24px] leading-[28px] font-medium text-[#F2A815]", children: r }),
|
|
54188
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[12px] leading-[16px] text-[#F2A815]", children: "In-progress" })
|
|
54164
54189
|
] }),
|
|
54165
|
-
/* @__PURE__ */ v.jsxs("div", { className: "flex-1
|
|
54166
|
-
/* @__PURE__ */ v.jsx("div", { className: "
|
|
54167
|
-
/* @__PURE__ */ v.jsx("div", { className: "
|
|
54190
|
+
/* @__PURE__ */ v.jsxs("div", { className: "flex-1 flex flex-col items-center justify-center bg-[#F7FEFA] h-[76px] rounded", children: [
|
|
54191
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[24px] leading-[28px] font-medium text-[#1FA05B]", children: i }),
|
|
54192
|
+
/* @__PURE__ */ v.jsx("div", { className: "text-[12px] leading-[16px] text-[#1FA05B]", children: "Closed" })
|
|
54168
54193
|
] })
|
|
54169
54194
|
] }),
|
|
54170
54195
|
/* @__PURE__ */ v.jsx("div", { className: "mt-4 space-y-2", children: t?.length > 0 ? t.map((o, a) => {
|
|
@@ -54190,7 +54215,7 @@ function ype({ incidentReports: e, incidentReportsDetails: t }) {
|
|
|
54190
54215
|
},
|
|
54191
54216
|
a
|
|
54192
54217
|
);
|
|
54193
|
-
}) : /* @__PURE__ */ v.jsx(
|
|
54218
|
+
}) : /* @__PURE__ */ v.jsx(v.Fragment, {}) })
|
|
54194
54219
|
] })
|
|
54195
54220
|
}
|
|
54196
54221
|
);
|
|
@@ -54232,54 +54257,81 @@ function bpe({
|
|
|
54232
54257
|
totalPages: s = 1,
|
|
54233
54258
|
pageOptions: l = [10, 20, 30, 40, 50]
|
|
54234
54259
|
}) {
|
|
54235
|
-
const c = Array.isArray(t) ? t : [], u = Array.isArray(e) ? e : [], d = n > 0 ? Math.ceil(c.length / n) : 1, f = s || d, p = c;
|
|
54236
|
-
return console.log("safeData:", c), console.log("currentData:",
|
|
54260
|
+
const c = Array.isArray(t) ? t : [], u = Array.isArray(e) ? e : [], d = n > 0 ? Math.ceil(c.length / n) : 1, f = s || d, p = (i - 1) * n, h = p + n, m = c.slice(p, h), g = n - m.length > 0 ? n - m.length : 0;
|
|
54261
|
+
return console.log("safeData:", c), console.log("currentData:", m), /* @__PURE__ */ v.jsxs("div", { className: "w-full bg-white rounded-xl h-[390px] shadow-md overflow-hidden flex flex-col", children: [
|
|
54237
54262
|
/* @__PURE__ */ v.jsx(
|
|
54238
54263
|
"div",
|
|
54239
54264
|
{
|
|
54240
|
-
className: "grid bg-
|
|
54265
|
+
className: "grid bg-[#354A5E] text-white text-[16px] leading-[20px] font-medium",
|
|
54241
54266
|
style: { gridTemplateColumns: `repeat(${u.length}, 1fr)` },
|
|
54242
|
-
children: u.map((
|
|
54267
|
+
children: u.map((b, S) => /* @__PURE__ */ v.jsx("div", { className: "px-6 py-4 text-[16px] leading-[20px]", children: b.label }, S))
|
|
54243
54268
|
}
|
|
54244
54269
|
),
|
|
54245
|
-
/* @__PURE__ */ v.jsx("div", { className: "flex-1 overflow-y-auto", children:
|
|
54246
|
-
|
|
54247
|
-
|
|
54248
|
-
|
|
54249
|
-
|
|
54250
|
-
|
|
54270
|
+
/* @__PURE__ */ v.jsx("div", { className: "flex-1 overflow-y-auto", children: m.length > 0 ? /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
|
|
54271
|
+
m.map((b, S) => /* @__PURE__ */ v.jsx(
|
|
54272
|
+
"div",
|
|
54273
|
+
{
|
|
54274
|
+
className: "grid",
|
|
54275
|
+
style: {
|
|
54276
|
+
gridTemplateColumns: `repeat(${u.length}, 1fr)`
|
|
54277
|
+
},
|
|
54278
|
+
children: u.map((w, x) => {
|
|
54279
|
+
const _ = b[w.key], E = typeof _ == "string" && _.includes("%"), k = _ === "100%" ? "bg-[#F0FEF2] text-[#36AB6C]" : "bg-[#FFF0F0] text-[#AB0000]";
|
|
54280
|
+
return /* @__PURE__ */ v.jsx(
|
|
54281
|
+
"div",
|
|
54282
|
+
{
|
|
54283
|
+
className: `px-6 py-4 ${x === 0 ? "bg-white" : "bg-gray-50"}`,
|
|
54284
|
+
children: E ? /* @__PURE__ */ v.jsx(
|
|
54285
|
+
"div",
|
|
54286
|
+
{
|
|
54287
|
+
className: `inline-block px-3 py-1 rounded-full text-[14px] font-medium ${k}`,
|
|
54288
|
+
children: _
|
|
54289
|
+
}
|
|
54290
|
+
) : /* @__PURE__ */ v.jsx("div", { children: _ ?? "-" })
|
|
54291
|
+
},
|
|
54292
|
+
x
|
|
54293
|
+
);
|
|
54294
|
+
})
|
|
54251
54295
|
},
|
|
54252
|
-
|
|
54253
|
-
|
|
54254
|
-
|
|
54296
|
+
S
|
|
54297
|
+
)),
|
|
54298
|
+
Array.from({ length: g }).map((b, S) => /* @__PURE__ */ v.jsx(
|
|
54299
|
+
"div",
|
|
54300
|
+
{
|
|
54301
|
+
className: "grid",
|
|
54302
|
+
style: {
|
|
54303
|
+
gridTemplateColumns: `repeat(${u.length}, 1fr)`
|
|
54304
|
+
},
|
|
54305
|
+
children: u.map((w, x) => /* @__PURE__ */ v.jsx(
|
|
54255
54306
|
"div",
|
|
54256
54307
|
{
|
|
54257
|
-
className: `
|
|
54258
|
-
children:
|
|
54259
|
-
}
|
|
54260
|
-
|
|
54261
|
-
|
|
54262
|
-
|
|
54263
|
-
|
|
54264
|
-
|
|
54308
|
+
className: `px-6 py-4 ${x === 0 ? "bg-white" : "bg-gray-50"}`,
|
|
54309
|
+
children: " "
|
|
54310
|
+
},
|
|
54311
|
+
x
|
|
54312
|
+
))
|
|
54313
|
+
},
|
|
54314
|
+
`empty-${S}`
|
|
54315
|
+
))
|
|
54316
|
+
] }) : /* @__PURE__ */ v.jsx(
|
|
54265
54317
|
Lo,
|
|
54266
54318
|
{
|
|
54267
54319
|
title: "No Data Found",
|
|
54268
54320
|
description: "Catch up all the data. Change the date range to see the data."
|
|
54269
54321
|
}
|
|
54270
54322
|
) }),
|
|
54271
|
-
/* @__PURE__ */ v.jsxs("div", { className: "flex justify-end items-center px-6 py-4 text-sm bg-white gap-8", children: [
|
|
54323
|
+
/* @__PURE__ */ v.jsxs("div", { className: "flex justify-end items-center px-6 py-4 text-sm bg-white border-t border-[#F0F0F0] gap-8", children: [
|
|
54272
54324
|
/* @__PURE__ */ v.jsxs("div", { className: "flex items-center gap-2 text-gray-600 text-[14px]", children: [
|
|
54273
54325
|
/* @__PURE__ */ v.jsx("div", { children: "Rows per page:" }),
|
|
54274
54326
|
/* @__PURE__ */ v.jsx(
|
|
54275
54327
|
"select",
|
|
54276
54328
|
{
|
|
54277
54329
|
value: n,
|
|
54278
|
-
onChange: (
|
|
54279
|
-
r(Number(
|
|
54330
|
+
onChange: (b) => {
|
|
54331
|
+
r(Number(b.target.value)), o(1);
|
|
54280
54332
|
},
|
|
54281
54333
|
className: "border rounded px-2 py-1",
|
|
54282
|
-
children: l.map((
|
|
54334
|
+
children: l.map((b, S) => /* @__PURE__ */ v.jsx("option", { value: b, children: b }, S))
|
|
54283
54335
|
}
|
|
54284
54336
|
),
|
|
54285
54337
|
/* @__PURE__ */ v.jsxs("div", { className: "ml-4 text-[14px]", children: [
|
|
@@ -54302,7 +54354,7 @@ function bpe({
|
|
|
54302
54354
|
/* @__PURE__ */ v.jsx(
|
|
54303
54355
|
"button",
|
|
54304
54356
|
{
|
|
54305
|
-
onClick: () => o((
|
|
54357
|
+
onClick: () => o((b) => b - 1),
|
|
54306
54358
|
disabled: i === 1,
|
|
54307
54359
|
className: "p-2 rounded hover:bg-gray-100 disabled:opacity-40",
|
|
54308
54360
|
children: /* @__PURE__ */ v.jsx(QR, { size: 18 })
|
|
@@ -54311,7 +54363,7 @@ function bpe({
|
|
|
54311
54363
|
/* @__PURE__ */ v.jsx(
|
|
54312
54364
|
"button",
|
|
54313
54365
|
{
|
|
54314
|
-
onClick: () => o((
|
|
54366
|
+
onClick: () => o((b) => b + 1),
|
|
54315
54367
|
disabled: i === f,
|
|
54316
54368
|
className: "p-2 rounded hover:bg-gray-100 disabled:opacity-40",
|
|
54317
54369
|
children: /* @__PURE__ */ v.jsx(ZR, { size: 18 })
|