@retinalabsllc/zairusjs 16.1.55 → 16.1.65

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.d.mts CHANGED
@@ -1067,7 +1067,7 @@ declare const UniversalHome2: React.FC<UniversalHome2Props>;
1067
1067
  interface UniversalMember2 {
1068
1068
  id: string;
1069
1069
  userId: string;
1070
- name: string;
1070
+ fullName: string;
1071
1071
  avatarUrl?: string | null;
1072
1072
  status: 'ACTIVE' | 'BUSY' | 'AWAY' | 'OFFLINE' | string;
1073
1073
  role: string;
package/dist/index.d.ts CHANGED
@@ -1067,7 +1067,7 @@ declare const UniversalHome2: React.FC<UniversalHome2Props>;
1067
1067
  interface UniversalMember2 {
1068
1068
  id: string;
1069
1069
  userId: string;
1070
- name: string;
1070
+ fullName: string;
1071
1071
  avatarUrl?: string | null;
1072
1072
  status: 'ACTIVE' | 'BUSY' | 'AWAY' | 'OFFLINE' | string;
1073
1073
  role: string;
package/dist/index.js CHANGED
@@ -4546,17 +4546,17 @@ var UniversalDepartmentsPage = ({
4546
4546
  {
4547
4547
  key: dept.id,
4548
4548
  onClick: () => onDepartmentClick(dept.id),
4549
- className: "flex flex-row items-center gap-4 py-4 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4549
+ className: "flex flex-row items-center gap-4 py-2 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4550
4550
  },
4551
- /* @__PURE__ */ import_react77.default.createElement("div", { className: "w-10 h-10 rounded-xl border border-neutral-200 flex items-center justify-center shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.Folder01Icon, size: 18, className: "text-neutral-500" })),
4552
- /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col min-w-0 gap-1 flex-1" }, /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[14px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ import_react77.default.createElement("div", { key: idx, className: "w-6 h-6 rounded-md border-2 border-white bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(
4551
+ /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ import_react77.default.createElement("p", { className: "text-[13px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ import_react77.default.createElement("div", { key: idx, className: "w-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ import_react77.default.createElement(
4553
4552
  "img",
4554
4553
  {
4555
4554
  src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4556
4555
  alt: "Member",
4557
4556
  className: "w-full h-full object-cover"
4558
4557
  }
4559
- )))), dept.totalMembers > 0 ? /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "Empty")))
4558
+ )))), dept.totalMembers > 0 ? /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "No Members"))),
4559
+ /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowRight01Icon, size: 14, className: "shrink-0 text-neutral-400" })
4560
4560
  ))), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react77.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react77.default.createElement(
4561
4561
  "button",
4562
4562
  {
@@ -4573,7 +4573,7 @@ var UniversalDepartmentsPage = ({
4573
4573
  className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4574
4574
  },
4575
4575
  /* @__PURE__ */ import_react77.default.createElement(import_react78.HugeiconsIcon, { icon: import_core_free_icons27.ArrowRight01Icon, size: 14 })
4576
- )))))), isCreateModalOpen && /* @__PURE__ */ import_react77.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ import_react77.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 border-b border-neutral-100" }, /* @__PURE__ */ import_react77.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ import_react77.default.createElement(
4576
+ )))))), isCreateModalOpen && /* @__PURE__ */ import_react77.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ import_react77.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react77.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react77.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ import_react77.default.createElement(
4577
4577
  "button",
4578
4578
  {
4579
4579
  onClick: () => setIsCreateModalOpen(false),
@@ -5050,7 +5050,7 @@ var UniversalHome2 = ({
5050
5050
  },
5051
5051
  /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Logout01Icon, size: 16 }),
5052
5052
  "Log Out"
5053
- )))), showNotifDialog && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react81.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ import_react81.default.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ import_react81.default.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ import_react81.default.createElement(
5053
+ )))), showNotifDialog && /* @__PURE__ */ import_react81.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ import_react81.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.ArrowLeft01Icon, size: 14 }), " Back") : /* @__PURE__ */ import_react81.default.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ import_react81.default.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react81.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ import_react81.default.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ import_react81.default.createElement(import_react82.HugeiconsIcon, { icon: import_core_free_icons29.Loading03Icon, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ import_react81.default.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ import_react81.default.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ import_react81.default.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ import_react81.default.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ import_react81.default.createElement(
5054
5054
  "button",
5055
5055
  {
5056
5056
  onClick: () => handleResolve("ACCEPTED"),
@@ -5156,6 +5156,7 @@ var UniversalSettings = ({
5156
5156
  onInviteMember,
5157
5157
  initialDisplayName,
5158
5158
  initialSlug,
5159
+ slugPrefixUrl = "https://truhuddle.com/company/",
5159
5160
  onSaveAccount,
5160
5161
  onCheckSlugAvailability,
5161
5162
  aiCredits,
@@ -5180,6 +5181,7 @@ var UniversalSettings = ({
5180
5181
  const [isInviting, setIsInviting] = (0, import_react83.useState)(false);
5181
5182
  const [localSearchQuery, setLocalSearchQuery] = (0, import_react83.useState)(membersSearchQuery);
5182
5183
  const [isTyping, setIsTyping] = (0, import_react83.useState)(false);
5184
+ const isFirstSearchMount = (0, import_react83.useRef)(true);
5183
5185
  const [isStatusModalOpen, setIsStatusModalOpen] = (0, import_react83.useState)(false);
5184
5186
  const [isRoleModalOpen, setIsRoleModalOpen] = (0, import_react83.useState)(false);
5185
5187
  const statusDropdownRef = (0, import_react83.useRef)(null);
@@ -5201,18 +5203,22 @@ var UniversalSettings = ({
5201
5203
  }, []);
5202
5204
  (0, import_react83.useEffect)(() => {
5203
5205
  if (activeTab !== "MEMBERS") return;
5206
+ if (isFirstSearchMount.current) {
5207
+ isFirstSearchMount.current = false;
5208
+ return;
5209
+ }
5204
5210
  setIsTyping(true);
5205
5211
  const handler = setTimeout(() => {
5206
5212
  onMembersSearchChange(localSearchQuery);
5207
5213
  setIsTyping(false);
5208
5214
  }, 600);
5209
5215
  return () => clearTimeout(handler);
5210
- }, [localSearchQuery, onMembersSearchChange, activeTab]);
5216
+ }, [localSearchQuery, activeTab]);
5211
5217
  const handleConfirmRemove = async () => {
5212
5218
  if (!memberToRemove || !onRemoveMember) return;
5213
5219
  setIsRemoving(true);
5214
5220
  try {
5215
- await onRemoveMember(memberToRemove.id);
5221
+ await onRemoveMember(memberToRemove.userId);
5216
5222
  import_react_hot_toast16.default.success("Member removed successfully.");
5217
5223
  setExpandedId(null);
5218
5224
  setMemberToRemove(null);
@@ -5327,7 +5333,7 @@ var UniversalSettings = ({
5327
5333
  {
5328
5334
  isOpen: !!memberToRemove,
5329
5335
  title: "Remove Member",
5330
- message: `Are you sure you want to remove ${memberToRemove?.name}? This action cannot be undone.`,
5336
+ message: `Are you sure you want to remove ${memberToRemove?.fullName}? This action cannot be undone.`,
5331
5337
  confirmText: "Remove",
5332
5338
  cancelText: "Cancel",
5333
5339
  isProcessing: isRemoving,
@@ -5358,7 +5364,7 @@ var UniversalSettings = ({
5358
5364
  className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
5359
5365
  },
5360
5366
  /* @__PURE__ */ import_react83.default.createElement(import_react84.HugeiconsIcon, { icon: import_core_free_icons30.ListSettingIcon, size: 16 })
5361
- ))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ import_react83.default.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.name), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ import_react83.default.createElement("div", { className: "mb-8" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6" }, !isAccountReadOnly && /* @__PURE__ */ import_react83.default.createElement(
5367
+ ))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ import_react83.default.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ import_react83.default.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ import_react83.default.createElement("div", { className: "mb-8" }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6 " }, !isAccountReadOnly && /* @__PURE__ */ import_react83.default.createElement(
5362
5368
  "button",
5363
5369
  {
5364
5370
  onClick: () => setMemberToRemove(activeExpandedMember),
@@ -5420,7 +5426,7 @@ var UniversalSettings = ({
5420
5426
  onClick: () => setExpandedId(member.id),
5421
5427
  className: "flex items-center justify-between py-3 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
5422
5428
  },
5423
- /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react83.default.createElement(MemberAvatar2, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[13px] text-black truncate" }, member.name), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))
5429
+ /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ import_react83.default.createElement(MemberAvatar2, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ import_react83.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[13px] text-black truncate" }, member.fullName), /* @__PURE__ */ import_react83.default.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))
5424
5430
  ))), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react83.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ import_react83.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react83.default.createElement(
5425
5431
  "button",
5426
5432
  {
package/dist/index.mjs CHANGED
@@ -4515,7 +4515,6 @@ import {
4515
4515
  ArrowLeft01Icon as ArrowLeft01Icon13,
4516
4516
  ArrowRight01Icon as ArrowRight01Icon9,
4517
4517
  Loading03Icon as Loading03Icon20,
4518
- Folder01Icon,
4519
4518
  CancelCircleIcon as CancelCircleIcon9
4520
4519
  } from "@hugeicons/core-free-icons";
4521
4520
  var formatMembersCount = (num) => {
@@ -4564,17 +4563,17 @@ var UniversalDepartmentsPage = ({
4564
4563
  {
4565
4564
  key: dept.id,
4566
4565
  onClick: () => onDepartmentClick(dept.id),
4567
- className: "flex flex-row items-center gap-4 py-4 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4566
+ className: "flex flex-row items-center gap-4 py-2 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
4568
4567
  },
4569
- /* @__PURE__ */ React46.createElement("div", { className: "w-10 h-10 rounded-xl border border-neutral-200 flex items-center justify-center shrink-0" }, /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: Folder01Icon, size: 18, className: "text-neutral-500" })),
4570
- /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0 gap-1 flex-1" }, /* @__PURE__ */ React46.createElement("p", { className: "text-[14px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ React46.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ React46.createElement("div", { key: idx, className: "w-6 h-6 rounded-md border-2 border-white bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4568
+ /* @__PURE__ */ React46.createElement("div", { className: "flex flex-col min-w-0 flex-1" }, /* @__PURE__ */ React46.createElement("p", { className: "text-[13px] text-black tracking-tight truncate" }, dept.name), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-3 min-w-0" }, dept.avatars && dept.avatars.length > 0 && /* @__PURE__ */ React46.createElement("div", { className: "flex items-center -space-x-2 shrink-0" }, dept.avatars.slice(0, 4).map((src, idx) => /* @__PURE__ */ React46.createElement("div", { key: idx, className: "w-4 h-4 rounded-md bg-neutral-100 overflow-hidden shrink-0" }, /* @__PURE__ */ React46.createElement(
4571
4569
  "img",
4572
4570
  {
4573
4571
  src: src || "https://storage.googleapis.com/retina-cloud-v2/assets/images/avatar.avif",
4574
4572
  alt: "Member",
4575
4573
  className: "w-full h-full object-cover"
4576
4574
  }
4577
- )))), dept.totalMembers > 0 ? /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "Empty")))
4575
+ )))), dept.totalMembers > 0 ? /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-500 truncate block" }, formatMembersCount(dept.totalMembers), " ", dept.totalMembers > 4 ? "+" : "") : /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 truncate block" }, "No Members"))),
4576
+ /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14, className: "shrink-0 text-neutral-400" })
4578
4577
  ))), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React46.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ React46.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React46.createElement(
4579
4578
  "button",
4580
4579
  {
@@ -4591,7 +4590,7 @@ var UniversalDepartmentsPage = ({
4591
4590
  className: "p-2 bg-white border border-neutral-200 rounded-full text-black hover:bg-neutral-50 disabled:opacity-30 disabled:cursor-not-allowed transition-all outline-none"
4592
4591
  },
4593
4592
  /* @__PURE__ */ React46.createElement(HugeiconsIcon32, { icon: ArrowRight01Icon9, size: 14 })
4594
- )))))), isCreateModalOpen && /* @__PURE__ */ React46.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React46.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ React46.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 border-b border-neutral-100" }, /* @__PURE__ */ React46.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ React46.createElement(
4593
+ )))))), isCreateModalOpen && /* @__PURE__ */ React46.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React46.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isCreating && setIsCreateModalOpen(false) }), /* @__PURE__ */ React46.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React46.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React46.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Create Department"), /* @__PURE__ */ React46.createElement(
4595
4594
  "button",
4596
4595
  {
4597
4596
  onClick: () => setIsCreateModalOpen(false),
@@ -5084,7 +5083,7 @@ var UniversalHome2 = ({
5084
5083
  },
5085
5084
  /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Logout01Icon, size: 16 }),
5086
5085
  "Log Out"
5087
- )))), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications", isNotifsLoading && /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 14, className: "animate-spin text-neutral-400" })), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon10, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2" }, selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ React48.createElement(
5086
+ )))), showNotifDialog && /* @__PURE__ */ React48.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 bg-black/30", onClick: () => setShowNotifDialog(false) }), /* @__PURE__ */ React48.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 h-[80vh]" }, /* @__PURE__ */ React48.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, selectedNotif ? /* @__PURE__ */ React48.createElement("button", { onClick: () => setSelectedNotif(null), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none flex items-center gap-2 text-[11px] tracking-widest disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: ArrowLeft01Icon15, size: 14 }), " Back") : /* @__PURE__ */ React48.createElement("h3", { className: "text-[15px] text-black tracking-tight flex items-center gap-2" }, "Notifications"), /* @__PURE__ */ React48.createElement("button", { onClick: () => setShowNotifDialog(false), disabled: isResolving, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: CancelCircleIcon10, size: 18 }))), /* @__PURE__ */ React48.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-2 relative" }, isNotifsLoading && !selectedNotif && /* @__PURE__ */ React48.createElement("div", { className: "absolute inset-0 z-10 flex items-center justify-center" }, /* @__PURE__ */ React48.createElement(HugeiconsIcon34, { icon: Loading03Icon22, size: 28, className: "animate-spin text-black" })), selectedNotif ? /* @__PURE__ */ React48.createElement("div", { className: "p-4 text-left" }, /* @__PURE__ */ React48.createElement("h4", { className: "text-[14px] text-black mb-1" }, selectedNotif.title), /* @__PURE__ */ React48.createElement("span", { className: "text-[10px] text-neutral-400 tracking-widest mb-4 block" }, formatNotifDate(selectedNotif.createdAt)), /* @__PURE__ */ React48.createElement("p", { className: "text-[12px] text-neutral-600 leading-relaxed whitespace-pre-wrap" }, selectedNotif.message), selectedNotif.type === "HUDDLE_INVITE" && selectedNotif.meta_json?.action === "RESOLVE_INVITE" && /* @__PURE__ */ React48.createElement("div", { className: "mt-8 flex gap-3 pt-6 border-t border-neutral-100" }, /* @__PURE__ */ React48.createElement(
5088
5087
  "button",
5089
5088
  {
5090
5089
  onClick: () => handleResolve("ACCEPTED"),
@@ -5199,6 +5198,7 @@ var UniversalSettings = ({
5199
5198
  onInviteMember,
5200
5199
  initialDisplayName,
5201
5200
  initialSlug,
5201
+ slugPrefixUrl = "https://truhuddle.com/company/",
5202
5202
  onSaveAccount,
5203
5203
  onCheckSlugAvailability,
5204
5204
  aiCredits,
@@ -5223,6 +5223,7 @@ var UniversalSettings = ({
5223
5223
  const [isInviting, setIsInviting] = useState35(false);
5224
5224
  const [localSearchQuery, setLocalSearchQuery] = useState35(membersSearchQuery);
5225
5225
  const [isTyping, setIsTyping] = useState35(false);
5226
+ const isFirstSearchMount = useRef13(true);
5226
5227
  const [isStatusModalOpen, setIsStatusModalOpen] = useState35(false);
5227
5228
  const [isRoleModalOpen, setIsRoleModalOpen] = useState35(false);
5228
5229
  const statusDropdownRef = useRef13(null);
@@ -5244,18 +5245,22 @@ var UniversalSettings = ({
5244
5245
  }, []);
5245
5246
  useEffect19(() => {
5246
5247
  if (activeTab !== "MEMBERS") return;
5248
+ if (isFirstSearchMount.current) {
5249
+ isFirstSearchMount.current = false;
5250
+ return;
5251
+ }
5247
5252
  setIsTyping(true);
5248
5253
  const handler = setTimeout(() => {
5249
5254
  onMembersSearchChange(localSearchQuery);
5250
5255
  setIsTyping(false);
5251
5256
  }, 600);
5252
5257
  return () => clearTimeout(handler);
5253
- }, [localSearchQuery, onMembersSearchChange, activeTab]);
5258
+ }, [localSearchQuery, activeTab]);
5254
5259
  const handleConfirmRemove = async () => {
5255
5260
  if (!memberToRemove || !onRemoveMember) return;
5256
5261
  setIsRemoving(true);
5257
5262
  try {
5258
- await onRemoveMember(memberToRemove.id);
5263
+ await onRemoveMember(memberToRemove.userId);
5259
5264
  toast15.success("Member removed successfully.");
5260
5265
  setExpandedId(null);
5261
5266
  setMemberToRemove(null);
@@ -5370,7 +5375,7 @@ var UniversalSettings = ({
5370
5375
  {
5371
5376
  isOpen: !!memberToRemove,
5372
5377
  title: "Remove Member",
5373
- message: `Are you sure you want to remove ${memberToRemove?.name}? This action cannot be undone.`,
5378
+ message: `Are you sure you want to remove ${memberToRemove?.fullName}? This action cannot be undone.`,
5374
5379
  confirmText: "Remove",
5375
5380
  cancelText: "Cancel",
5376
5381
  isProcessing: isRemoving,
@@ -5401,7 +5406,7 @@ var UniversalSettings = ({
5401
5406
  className: "flex items-center justify-center bg-white w-9 h-9 rounded-full text-neutral-500 hover:text-black transition-colors outline-none"
5402
5407
  },
5403
5408
  /* @__PURE__ */ React49.createElement(HugeiconsIcon35, { icon: ListSettingIcon3, size: 16 })
5404
- ))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React49.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.name), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ React49.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6" }, !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
5409
+ ))), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-2xl bg-white w-full" }, activeExpandedMember ? /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col animate-in fade-in zoom-in-95 duration-300 w-full" }, /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col gap-1 mb-8" }, /* @__PURE__ */ React49.createElement("h2", { className: "text-black text-xl tracking-tight" }, "Member Profile"), /* @__PURE__ */ React49.createElement("p", { className: "text-[12px] text-neutral-500" }, "View and manage this member's access privileges.")), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 mb-8" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: activeExpandedMember.avatarUrl, status: activeExpandedMember.status, sizeClass: "w-14 h-14" }), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React49.createElement("span", { className: "text-sm text-black tracking-tight truncate" }, activeExpandedMember.fullName), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-neutral-500 capitalize" }, activeExpandedMember.role.toLowerCase()))), activeExpandedMember.departmentName && /* @__PURE__ */ React49.createElement("div", { className: "mb-8" }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Assigned Department"), /* @__PURE__ */ React49.createElement("span", { className: "text-[12px] text-black truncate block" }, activeExpandedMember.departmentName)), /* @__PURE__ */ React49.createElement("div", { className: "flex flex-col sm:flex-row gap-3 pt-6 " }, !isAccountReadOnly && /* @__PURE__ */ React49.createElement(
5405
5410
  "button",
5406
5411
  {
5407
5412
  onClick: () => setMemberToRemove(activeExpandedMember),
@@ -5463,7 +5468,7 @@ var UniversalSettings = ({
5463
5468
  onClick: () => setExpandedId(member.id),
5464
5469
  className: "flex items-center justify-between py-3 hover:bg-neutral-50 transition-colors cursor-pointer group min-w-0 px-3 -mx-3 rounded-xl"
5465
5470
  },
5466
- /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React49.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React49.createElement("p", { className: "text-[13px] text-black truncate" }, member.name), /* @__PURE__ */ React49.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))
5471
+ /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-4 min-w-0 flex-1" }, /* @__PURE__ */ React49.createElement(MemberAvatar2, { src: member.avatarUrl, status: member.status }), /* @__PURE__ */ React49.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5" }, /* @__PURE__ */ React49.createElement("p", { className: "text-[13px] text-black truncate" }, member.fullName), /* @__PURE__ */ React49.createElement("p", { className: "text-[11px] text-neutral-500 capitalize truncate" }, member.role.toLowerCase())))
5467
5472
  ))), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ React49.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", membersCurrentPage, " of ", membersTotalPages === 0 ? 1 : membersTotalPages), /* @__PURE__ */ React49.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React49.createElement(
5468
5473
  "button",
5469
5474
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retinalabsllc/zairusjs",
3
- "version": "16.1.55",
3
+ "version": "16.1.65",
4
4
  "description": "A perceptive, Ai data driven Next.js UI component library.",
5
5
  "author": "Retina Labs Company",
6
6
  "license": "MIT",