@esic-lab/data-core-ui 0.0.86 → 0.0.87
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/index.js +51 -48
- package/dist/index.mjs +51 -48
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4339,6 +4339,11 @@ function ProfileSelect({
|
|
|
4339
4339
|
{}
|
|
4340
4340
|
);
|
|
4341
4341
|
}, [filteredUnassigned]);
|
|
4342
|
+
const groupedEntries = (0, import_react19.useMemo)(() => {
|
|
4343
|
+
return Object.entries(groupedUsers).sort(
|
|
4344
|
+
([a], [b]) => a.localeCompare(b, "th")
|
|
4345
|
+
);
|
|
4346
|
+
}, [groupedUsers]);
|
|
4342
4347
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref: containerRef, className: "relative body-1", children: [
|
|
4343
4348
|
mode === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4344
4349
|
import_icons_react14.IconUsers,
|
|
@@ -4551,54 +4556,52 @@ function ProfileSelect({
|
|
|
4551
4556
|
ghost: true,
|
|
4552
4557
|
size: "small",
|
|
4553
4558
|
className: "[&_.ant-collapse-content-box]:!py-[2px]",
|
|
4554
|
-
items:
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
children:
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
})
|
|
4601
|
-
)
|
|
4559
|
+
items: groupedEntries.map(([company, users]) => ({
|
|
4560
|
+
key: company,
|
|
4561
|
+
label: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4562
|
+
"span",
|
|
4563
|
+
{
|
|
4564
|
+
className: "font-semibold body-3 line-clamp-1",
|
|
4565
|
+
title: `${company} (${users.length})`,
|
|
4566
|
+
children: [
|
|
4567
|
+
company,
|
|
4568
|
+
" (",
|
|
4569
|
+
users.length,
|
|
4570
|
+
")"
|
|
4571
|
+
]
|
|
4572
|
+
}
|
|
4573
|
+
),
|
|
4574
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex flex-col gap-1 pl-2", children: users.map((user) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
4575
|
+
"button",
|
|
4576
|
+
{
|
|
4577
|
+
className: "flex items-center hover:bg-gray-100 cursor-pointer w-full p-1 rounded text-left",
|
|
4578
|
+
onClick: () => onUpdateAssignUser(user, "add"),
|
|
4579
|
+
children: [
|
|
4580
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "relative cursor-pointer flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4581
|
+
"img",
|
|
4582
|
+
{
|
|
4583
|
+
src: user.profile,
|
|
4584
|
+
style: {
|
|
4585
|
+
width: avatarSize,
|
|
4586
|
+
height: avatarSize,
|
|
4587
|
+
borderRadius: "50%"
|
|
4588
|
+
},
|
|
4589
|
+
className: "border object-cover"
|
|
4590
|
+
}
|
|
4591
|
+
) }),
|
|
4592
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4593
|
+
"span",
|
|
4594
|
+
{
|
|
4595
|
+
className: "ml-2 body-3 line-clamp-1",
|
|
4596
|
+
title: user.name,
|
|
4597
|
+
children: user.name
|
|
4598
|
+
}
|
|
4599
|
+
)
|
|
4600
|
+
]
|
|
4601
|
+
},
|
|
4602
|
+
user.id
|
|
4603
|
+
)) })
|
|
4604
|
+
}))
|
|
4602
4605
|
}
|
|
4603
4606
|
)
|
|
4604
4607
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -4273,6 +4273,11 @@ function ProfileSelect({
|
|
|
4273
4273
|
{}
|
|
4274
4274
|
);
|
|
4275
4275
|
}, [filteredUnassigned]);
|
|
4276
|
+
const groupedEntries = useMemo2(() => {
|
|
4277
|
+
return Object.entries(groupedUsers).sort(
|
|
4278
|
+
([a], [b]) => a.localeCompare(b, "th")
|
|
4279
|
+
);
|
|
4280
|
+
}, [groupedUsers]);
|
|
4276
4281
|
return /* @__PURE__ */ jsxs34("div", { ref: containerRef, className: "relative body-1", children: [
|
|
4277
4282
|
mode === "icon" ? /* @__PURE__ */ jsx43("div", { children: /* @__PURE__ */ jsx43(
|
|
4278
4283
|
IconUsers,
|
|
@@ -4485,54 +4490,52 @@ function ProfileSelect({
|
|
|
4485
4490
|
ghost: true,
|
|
4486
4491
|
size: "small",
|
|
4487
4492
|
className: "[&_.ant-collapse-content-box]:!py-[2px]",
|
|
4488
|
-
items:
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
children:
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
})
|
|
4535
|
-
)
|
|
4493
|
+
items: groupedEntries.map(([company, users]) => ({
|
|
4494
|
+
key: company,
|
|
4495
|
+
label: /* @__PURE__ */ jsxs34(
|
|
4496
|
+
"span",
|
|
4497
|
+
{
|
|
4498
|
+
className: "font-semibold body-3 line-clamp-1",
|
|
4499
|
+
title: `${company} (${users.length})`,
|
|
4500
|
+
children: [
|
|
4501
|
+
company,
|
|
4502
|
+
" (",
|
|
4503
|
+
users.length,
|
|
4504
|
+
")"
|
|
4505
|
+
]
|
|
4506
|
+
}
|
|
4507
|
+
),
|
|
4508
|
+
children: /* @__PURE__ */ jsx43("div", { className: "flex flex-col gap-1 pl-2", children: users.map((user) => /* @__PURE__ */ jsxs34(
|
|
4509
|
+
"button",
|
|
4510
|
+
{
|
|
4511
|
+
className: "flex items-center hover:bg-gray-100 cursor-pointer w-full p-1 rounded text-left",
|
|
4512
|
+
onClick: () => onUpdateAssignUser(user, "add"),
|
|
4513
|
+
children: [
|
|
4514
|
+
/* @__PURE__ */ jsx43("div", { className: "relative cursor-pointer flex-shrink-0", children: /* @__PURE__ */ jsx43(
|
|
4515
|
+
"img",
|
|
4516
|
+
{
|
|
4517
|
+
src: user.profile,
|
|
4518
|
+
style: {
|
|
4519
|
+
width: avatarSize,
|
|
4520
|
+
height: avatarSize,
|
|
4521
|
+
borderRadius: "50%"
|
|
4522
|
+
},
|
|
4523
|
+
className: "border object-cover"
|
|
4524
|
+
}
|
|
4525
|
+
) }),
|
|
4526
|
+
/* @__PURE__ */ jsx43(
|
|
4527
|
+
"span",
|
|
4528
|
+
{
|
|
4529
|
+
className: "ml-2 body-3 line-clamp-1",
|
|
4530
|
+
title: user.name,
|
|
4531
|
+
children: user.name
|
|
4532
|
+
}
|
|
4533
|
+
)
|
|
4534
|
+
]
|
|
4535
|
+
},
|
|
4536
|
+
user.id
|
|
4537
|
+
)) })
|
|
4538
|
+
}))
|
|
4536
4539
|
}
|
|
4537
4540
|
)
|
|
4538
4541
|
)
|