@jrapps/my_tickets_dashboard_ui 0.0.3 → 0.0.5

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.
@@ -0,0 +1,316 @@
1
+ // src/components/Sidebar/Sidebar.tsx
2
+ import { useRef, useState as useState3, forwardRef } from "react";
3
+ import { Avatar as Avatar2, Box as Box3, Text as Text3 } from "@wix/design-system";
4
+ import { ChevronLeft, ChevronRight } from "@wix/wix-ui-icons-common";
5
+
6
+ // src/components/Sidebar/sidebar-menu-item.tsx
7
+ import { useEffect, useState } from "react";
8
+ import { Box, Text, CounterBadge } from "@wix/design-system";
9
+ import { dashboard } from "@wix/dashboard";
10
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ var SidebarMenuItem = ({
12
+ item,
13
+ items,
14
+ expanded,
15
+ expandedClassName,
16
+ selectedId,
17
+ expandedSections,
18
+ teamId,
19
+ totalCount,
20
+ onToggleSection,
21
+ onItemClick,
22
+ onModalClosed,
23
+ onCreateTicketClicked
24
+ }) => {
25
+ const [itemTotalCount, setItemTotalCount] = useState(totalCount);
26
+ const hasChildren = items.some((i) => i.parent === item.stateId);
27
+ const isExpanded = expandedSections.has(item.stateId);
28
+ const isSelected = selectedId === item.stateId;
29
+ useEffect(() => {
30
+ setItemTotalCount(totalCount);
31
+ }, [totalCount]);
32
+ const handleAction = async (actionItem) => {
33
+ if (actionItem.type === "page") {
34
+ onItemClick(actionItem.stateId);
35
+ } else if (actionItem.type === "modal") {
36
+ const { modalClosed } = dashboard.openModal({ modalId: String(actionItem.modalId), params: actionItem.modalParams });
37
+ modalClosed.then((result) => {
38
+ if (result && onModalClosed) {
39
+ onModalClosed(result);
40
+ }
41
+ });
42
+ } else if (actionItem.type === "custom_modal") {
43
+ onCreateTicketClicked == null ? void 0 : onCreateTicketClicked();
44
+ } else if (actionItem.type === "link") {
45
+ const generatedLink = await dashboard.getPageUrl({ pageId: "9f1191cb-46cb-4280-af8d-5c15d89aced8", relativeUrl: actionItem.link || "" });
46
+ window.open(generatedLink, "_blank");
47
+ }
48
+ };
49
+ if (hasChildren) {
50
+ const children = items.filter((i) => i.parent === item.stateId);
51
+ return /* @__PURE__ */ jsxs("div", { className: "sidebar-section", children: [
52
+ /* @__PURE__ */ jsxs(
53
+ "div",
54
+ {
55
+ className: `sidebar-item sidebar-parent-item ${isSelected ? "sidebar-item-selected" : ""}`,
56
+ onClick: () => onToggleSection(item.stateId),
57
+ children: [
58
+ /* @__PURE__ */ jsx(Box, { className: "sidebar-item-icon", children: item.prefixIcon }),
59
+ expanded && /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ /* @__PURE__ */ jsxs(Box, { className: "sidebar-item-content", direction: "vertical", children: [
61
+ /* @__PURE__ */ jsx(Text, { size: "small", className: "sidebar-item-title", children: item.label }),
62
+ item.subtitle && /* @__PURE__ */ jsx(Text, { size: "small", className: "sidebar-item-subtitle", children: item.subtitle })
63
+ ] }),
64
+ /* @__PURE__ */ jsx(Box, { className: `sidebar-item-chevron ${isExpanded ? "expanded" : ""}`, children: "\u25BC" })
65
+ ] })
66
+ ]
67
+ }
68
+ ),
69
+ isExpanded && /* @__PURE__ */ jsx(Box, { className: "sidebar-submenu-container", direction: "vertical", children: children.map((child) => /* @__PURE__ */ jsxs(
70
+ "div",
71
+ {
72
+ className: `sidebar-item sidebar-child-item ${expandedClassName} ${selectedId === child.stateId ? "sidebar-item-selected" : ""}`,
73
+ onClick: () => handleAction(child),
74
+ children: [
75
+ /* @__PURE__ */ jsx(Box, { className: "sidebar-item-icon", children: child.prefixIcon }),
76
+ expanded && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Box, { className: "sidebar-item-content", direction: "vertical", children: [
77
+ /* @__PURE__ */ jsx(Text, { size: "small", className: "sidebar-item-title-submenu", children: child.label }),
78
+ child.subtitle && /* @__PURE__ */ jsx(Text, { size: "small", className: "sidebar-item-subtitle", children: child.subtitle })
79
+ ] }) })
80
+ ]
81
+ },
82
+ child.stateId
83
+ )) })
84
+ ] }, item.stateId);
85
+ }
86
+ return /* @__PURE__ */ jsxs(
87
+ "div",
88
+ {
89
+ className: `sidebar-item ${expandedClassName} ${isSelected ? "sidebar-item-selected" : ""}`,
90
+ onClick: () => handleAction(item),
91
+ children: [
92
+ /* @__PURE__ */ jsx(Box, { className: "sidebar-item-icon", children: item.prefixIcon }),
93
+ expanded && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Box, { className: "sidebar-item-content", children: /* @__PURE__ */ jsxs(Box, { verticalAlign: "middle", gap: 2, children: [
94
+ /* @__PURE__ */ jsxs(Box, { direction: "vertical", children: [
95
+ /* @__PURE__ */ jsx(Text, { size: "small", className: "sidebar-item-title", children: item.label }),
96
+ item.subtitle && /* @__PURE__ */ jsx(Text, { size: "small", className: "sidebar-item-subtitle", children: item.subtitle })
97
+ ] }),
98
+ item.stateId === "chats" && /* @__PURE__ */ jsx(CounterBadge, { size: "medium", skin: "warning", children: String(itemTotalCount) })
99
+ ] }) }) })
100
+ ]
101
+ },
102
+ item.stateId
103
+ );
104
+ };
105
+ var sidebar_menu_item_default = SidebarMenuItem;
106
+
107
+ // src/components/Sidebar/footer/avatar-dropdown.wrapper.tsx
108
+ import { useState as useState2 } from "react";
109
+ import {
110
+ Avatar,
111
+ listItemActionBuilder,
112
+ DropdownBase,
113
+ TextButton,
114
+ listItemSectionBuilder,
115
+ listItemSelectBuilder,
116
+ Box as Box2,
117
+ Text as Text2
118
+ } from "@wix/design-system";
119
+
120
+ // src/components/Sidebar/footer/status-dots.wrapper.tsx
121
+ import { jsx as jsx2 } from "react/jsx-runtime";
122
+ var Online = () => {
123
+ return /* @__PURE__ */ jsx2("div", { style: { width: "8px", height: "8px", borderRadius: "50%", background: "#22c55e", boxShadow: "0 0 0 2px #fff" } });
124
+ };
125
+ var Away = () => {
126
+ return /* @__PURE__ */ jsx2("div", { style: { width: "8px", height: "8px", borderRadius: "50%", background: "#f59e0b", boxShadow: "0 0 0 2px #fff" } });
127
+ };
128
+ var DoNotDisturb = () => {
129
+ return /* @__PURE__ */ jsx2("div", { style: { position: "relative", width: "8px", height: "8px", borderRadius: "50%", background: "#ef4444", boxShadow: "0 0 0 2px #fff" }, children: /* @__PURE__ */ jsx2("div", { style: { position: "absolute", top: "50%", left: "10%", right: "10%", height: "2px", background: "#fff", transform: "translateY(-50%)", borderRadius: "1px" } }) });
130
+ };
131
+ var Offline = () => {
132
+ return /* @__PURE__ */ jsx2("div", { style: { width: "8px", height: "8px", borderRadius: "50%", border: "2px solid #71717a", boxShadow: "0 0 0 2px #fff" } });
133
+ };
134
+ var StatusDots = {
135
+ Online,
136
+ Away,
137
+ DoNotDisturb,
138
+ Offline
139
+ };
140
+ var status_dots_wrapper_default = StatusDots;
141
+
142
+ // src/components/Sidebar/footer/avatar-dropdown.wrapper.tsx
143
+ import { ChevronDown } from "@wix/wix-ui-icons-common";
144
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
145
+ var AvatarDropdown = ({ status = "online", onStatusChange, onLogout, permissions, agentProfilePictureUrl, agentName, agentRole }) => {
146
+ const [selectedStatus, setSelectedStatus] = useState2(status);
147
+ const handleStatusChange = (newStatus) => {
148
+ setSelectedStatus(newStatus);
149
+ if (onStatusChange) {
150
+ onStatusChange(newStatus);
151
+ }
152
+ };
153
+ const handleLogout = () => {
154
+ if (onLogout) {
155
+ onLogout();
156
+ }
157
+ };
158
+ const options = [
159
+ listItemSectionBuilder({
160
+ id: "status-section",
161
+ title: "Online Status"
162
+ }),
163
+ listItemSelectBuilder({
164
+ id: "online",
165
+ checkbox: true,
166
+ prefix: /* @__PURE__ */ jsx3(status_dots_wrapper_default.Online, {}),
167
+ title: "Online",
168
+ disabled: (permissions == null ? void 0 : permissions["my-tickets-change-agent-online-status"]) === true ? false : true
169
+ }),
170
+ listItemSelectBuilder({
171
+ id: "busy",
172
+ checkbox: true,
173
+ prefix: /* @__PURE__ */ jsx3(status_dots_wrapper_default.Away, {}),
174
+ title: "Away",
175
+ disabled: (permissions == null ? void 0 : permissions["my-tickets-change-agent-online-status"]) === true ? false : true
176
+ }),
177
+ listItemSelectBuilder({
178
+ id: "offline",
179
+ checkbox: true,
180
+ prefix: /* @__PURE__ */ jsx3(status_dots_wrapper_default.DoNotDisturb, {}),
181
+ title: "Offline",
182
+ disabled: (permissions == null ? void 0 : permissions["my-tickets-change-agent-online-status"]) === true ? false : true
183
+ }),
184
+ { id: "divider-1", value: "-" },
185
+ listItemActionBuilder({
186
+ id: 0,
187
+ title: "Logout",
188
+ onClick: handleLogout
189
+ })
190
+ ];
191
+ return /* @__PURE__ */ jsx3(DropdownBase, { options, selectedId: selectedStatus, onSelect: (option) => typeof option.id === "string" && handleStatusChange(option.id), className: "sidebar-avatar-dropdown", minWidth: 0, children: ({ toggle }) => /* @__PURE__ */ jsx3(TextButton, { className: "header-account-button", onClick: toggle, children: /* @__PURE__ */ jsxs2(Box2, { verticalAlign: "middle", gap: 2, textAlign: "start", maxWidth: "100%", minWidth: 0, children: [
192
+ /* @__PURE__ */ jsx3(Avatar, { presence: selectedStatus, name: agentName && !agentProfilePictureUrl ? agentName : void 0, size: "size30", imgProps: !agentName && agentProfilePictureUrl || agentName && agentProfilePictureUrl ? { src: agentProfilePictureUrl } : void 0 }),
193
+ /* @__PURE__ */ jsxs2(Box2, { direction: "vertical", gap: 0, verticalAlign: "middle", maxWidth: "100%", minWidth: 0, children: [
194
+ /* @__PURE__ */ jsx3(Text2, { weight: "bold", size: "small", ellipsis: true, maxWidth: "100%", children: agentName ? agentName : "Error getting name" }),
195
+ /* @__PURE__ */ jsx3(Text2, { size: "tiny", secondary: true, ellipsis: true, maxWidth: "100%", children: agentRole ? agentRole : "Error getting role" })
196
+ ] }),
197
+ /* @__PURE__ */ jsx3(ChevronDown, {})
198
+ ] }) }) });
199
+ };
200
+ var avatar_dropdown_wrapper_default = AvatarDropdown;
201
+
202
+ // src/components/Sidebar/Sidebar.css
203
+ if (typeof document !== "undefined" && !document.getElementById("jrapps-style-eea3023c")) {
204
+ const s = document.createElement("style");
205
+ s.id = "jrapps-style-eea3023c";
206
+ s.textContent = ".sidebar-outer-wrapper {\n position: relative;\n display: flex;\n flex-shrink: 0;\n max-height: 100%;\n}\n\n.sidebar-container {\n background: #f8f7f4;\n max-height: 100% !important;\n border-right: 1px solid #e1e4e8;\n border-left: 1px solid #e1e4e8;\n border-top: 1px solid #e1e4e8;\n display: flex;\n flex-direction: column;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);\n box-sizing: border-box;\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n}\n\n.sidebar-container.expanded {\n width: 210px;\n min-width: 210px;\n}\n\n.sidebar-container.closed {\n width: max-content;\n min-width: 0;\n}\n\n.sidebar-header {\n padding: 16px 18px 12px;\n border-bottom: 1px solid #f0f2f5;\n}\n\n.sidebar-header-title {\n margin: 0;\n color: #1a1a1a;\n font-weight: 600;\n font-size: 14px;\n line-height: 1.4;\n text-align: center;\n text-overflow: clip;\n white-space: nowrap;\n overflow: hidden;\n}\n\n.sidebar-items-container.expanded {\n flex: 1;\n width: 100%;\n min-height: 0;\n display: flex;\n column-gap: 15px;\n row-gap: 12px;\n overflow-y: auto;\n padding-top: 8px;\n}\n\n.sidebar-items-container.closed {\n flex: 1;\n width: 100%;\n min-height: 0;\n display: flex;\n column-gap: 15px;\n row-gap: 12px;\n overflow-y: auto;\n padding-top: 8px;\n align-items: center;\n}\n\n.sidebar-items-container::-webkit-scrollbar {\n width: 6px;\n}\n\n.sidebar-items-container::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.sidebar-items-container::-webkit-scrollbar-thumb {\n background: #d0d7de;\n border-radius: 3px;\n}\n\n.sidebar-items-container::-webkit-scrollbar-thumb:hover {\n background: #bec3cc;\n}\n\n.sidebar-section {\n display: flex;\n flex-direction: column;\n}\n\n.sidebar-item,\n.sidebar-item-selected {\n display: flex;\n flex-direction: row;\n column-gap: 12px;\n padding: 8px 8px;\n margin: 0 8px;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.sidebar-item.expanded {\n background-color: transparent;\n align-items: center;\n user-select: none;\n}\n\n.sidebar-item.closed {\n align-items: center;\n justify-content: center;\n background-color: transparent;\n user-select: none;\n width: max-content;\n}\n\n.sidebar-item:hover {\n background: rgba(0, 0, 0, 0.04);\n}\n\n.sidebar-item.sidebar-item-selected {\n background: white;\n border: 0.5px solid rgba(0, 0, 0, 0.15);\n align-items: center;\n}\n\n.sidebar-item-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.sidebar-item-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n}\n\n.sidebar-item-title-submenu {\n color: #1a1a1a;\n font-weight: 600;\n font-size: 13px;\n line-height: 1.4;\n width: 100%;\n}\n\n.sidebar-item-title-submenu {\n color: #1a1a1a;\n font-weight: 600;\n font-size: 13px;\n line-height: 1.4;\n width: max-content;\n text-align: end;\n}\n\n.sidebar-item-subtitle {\n color: #6d7681;\n font-size: 12px;\n line-height: 1.4;\n margin-top: 2px;\n}\n\n.sidebar-parent-item {\n justify-content: space-between;\n border-top: 0.5px solid rgba(0, 0, 0, 0.15);\n border-top-left-radius: 0px;\n border-top-right-radius: 0px;\n}\n\n.sidebar-item-chevron {\n flex-shrink: 0;\n color: #6d7681;\n font-size: 10px;\n transition: transform 0.2s ease;\n display: flex;\n align-items: center;\n}\n\n.sidebar-item-chevron.expanded {\n transform: rotate(-180deg);\n}\n\n.sidebar-submenu-container {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 0;\n}\n\n.sidebar-child-item {\n padding: 8px 0px 8px 12px;\n margin: 0 8px;\n}\n\n.sidebar-child-item .sidebar-item-title {\n font-weight: 500;\n color: #6d7681;\n}\n\n.sidebar-child-item:hover .sidebar-item-title {\n color: #1a1a1a;\n}\n\n@media (max-width: 1200px) {\n .sidebar-container.expanded {\n width: auto;\n min-width: 210px;\n }\n}\n\n@media (max-width: 768px) {\n .sidebar-container.expanded {\n position: absolute;\n left: 0;\n top: 0;\n height: 100vh;\n z-index: 1000;\n box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);\n }\n}\n\n.sidebar-header-box {\n padding: 16px 18px 12px;\n border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);\n}\n\n.sidebar-avatar-dropdown {\n min-width: 0px;\n max-width: 100%;\n}\n\n.header-account-button {\n min-width: 0;\n max-width: 100%;\n height: max-content;\n}\n\n.header-account-button span {\n min-width: 0;\n max-width: 100%;\n}\n\n.sidebar-expand-button-container {\n position: absolute;\n top: 3%;\n background: #f8f7f4;\n border: 1px solid #e1e4e8;\n border-radius: 4px;\n cursor: pointer;\n z-index: 1001;\n right: 0;\n transform: translateX(100%) translateY(-50%);\n border-top: 2px solid #e1e4e8;\n border-right: 2px solid #e1e4e8;\n border-bottom: 2px solid #e1e4e8;\n border-left: 0px;\n align-items: center;\n text-align: center;\n}\n\n.sidebar-expand-button-container div {\n align-items: center;\n text-align: center;\n}\n\n.sidebar-footer.expanded {\n padding: 16px 8px 16px 12px;\n border-top: 0.5px solid rgba(0, 0, 0, 0.15);\n gap: 2px;\n max-width: 100%;\n min-width: 0;\n}\n\n.sidebar-footer.closed {\n padding: 16px 16px 16px 16px;\n border-top: 0.5px solid rgba(0, 0, 0, 0.15);\n gap: 2px;\n max-width: 100%;\n min-width: 0;\n align-items: center;\n justify-content: center;\n}";
207
+ document.head.appendChild(s);
208
+ }
209
+
210
+ // src/components/Sidebar/Sidebar.tsx
211
+ var import_meta = {};
212
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
213
+ var Sidebar = forwardRef(
214
+ ({
215
+ className,
216
+ children,
217
+ items,
218
+ isOpen,
219
+ onItemSelect,
220
+ onModalClosed,
221
+ selectedId = "",
222
+ onCreateTicketClicked,
223
+ agentName,
224
+ agentRole,
225
+ agentProfilePictureUrl,
226
+ status,
227
+ teamId,
228
+ onStatusChange,
229
+ onLogout,
230
+ permissions
231
+ }, ref) => {
232
+ const [expandedSections, setExpandedSections] = useState3(/* @__PURE__ */ new Set());
233
+ const [expanded, setExpanded] = useState3(true);
234
+ const sidebarRef = useRef(null);
235
+ const SIDEBAR_EXPANDED_WIDTH = "210px";
236
+ const toggleSection = (sectionId) => {
237
+ const newExpanded = new Set(expandedSections);
238
+ if (newExpanded.has(sectionId)) {
239
+ newExpanded.delete(sectionId);
240
+ } else {
241
+ newExpanded.add(sectionId);
242
+ }
243
+ setExpandedSections(newExpanded);
244
+ };
245
+ const handleItemClick = (id) => {
246
+ onItemSelect == null ? void 0 : onItemSelect(id);
247
+ };
248
+ const toggleSidebar = () => {
249
+ const el = sidebarRef.current;
250
+ if (!el) {
251
+ setExpanded(!expanded);
252
+ return;
253
+ }
254
+ if (expanded) {
255
+ setExpanded(false);
256
+ } else {
257
+ const currentWidth = el.offsetWidth;
258
+ const clearInlineStyles = () => {
259
+ el.style.width = "";
260
+ el.style.minWidth = "";
261
+ el.style.transition = "";
262
+ el.removeEventListener("transitionend", clearInlineStyles);
263
+ };
264
+ el.style.transition = "none";
265
+ el.style.width = `${currentWidth}px`;
266
+ el.style.minWidth = `${currentWidth}px`;
267
+ void el.offsetHeight;
268
+ el.style.transition = "";
269
+ el.style.width = SIDEBAR_EXPANDED_WIDTH;
270
+ el.style.minWidth = SIDEBAR_EXPANDED_WIDTH;
271
+ el.addEventListener("transitionend", clearInlineStyles, { once: true });
272
+ setExpanded(true);
273
+ }
274
+ };
275
+ const rootItems = items.filter((item) => !item.parent || item.parent === "default");
276
+ const currentUrl = new URL(import_meta.url);
277
+ const expandedClassName = expanded ? "expanded" : "closed";
278
+ return /* @__PURE__ */ jsxs3("div", { className: "sidebar-outer-wrapper", ref, children: [
279
+ /* @__PURE__ */ jsx4("div", { className: "sidebar-expand-button-container", children: /* @__PURE__ */ jsx4("div", { onClick: toggleSidebar, children: expanded ? /* @__PURE__ */ jsx4(ChevronLeft, {}) : /* @__PURE__ */ jsx4(ChevronRight, {}) }) }),
280
+ /* @__PURE__ */ jsx4("div", { ref: sidebarRef, className: `sidebar-container ${expanded ? "expanded" : "closed"}`, children: isOpen && /* @__PURE__ */ jsxs3(Fragment2, { children: [
281
+ /* @__PURE__ */ jsxs3(Box3, { className: "sidebar-header-box", direction: "horizontal", gap: "13px", WebkitAlignItems: "center", children: [
282
+ /* @__PURE__ */ jsx4("img", { width: "37px", height: "37px", src: currentUrl.origin + "/logo.png", alt: "My Tickets Logo", className: "sidebar-logo" }),
283
+ expanded && /* @__PURE__ */ jsx4(Text3, { className: "header-title", children: "My Tickets" })
284
+ ] }),
285
+ /* @__PURE__ */ jsx4(Box3, { className: `sidebar-items-container ${expandedClassName}`, direction: "vertical", children: rootItems.map((item) => /* @__PURE__ */ jsx4(
286
+ sidebar_menu_item_default,
287
+ {
288
+ item,
289
+ items,
290
+ expanded,
291
+ expandedClassName,
292
+ selectedId,
293
+ expandedSections,
294
+ teamId,
295
+ onToggleSection: toggleSection,
296
+ onItemClick: handleItemClick,
297
+ onModalClosed,
298
+ onCreateTicketClicked,
299
+ totalCount: item.totalCount || 0
300
+ },
301
+ item.stateId
302
+ )) }),
303
+ /* @__PURE__ */ jsx4(Box3, { direction: "horizontal", className: `sidebar-footer ${expandedClassName}`, children: /* @__PURE__ */ jsxs3(Box3, { marginTop: "2px", maxWidth: "100%", minWidth: 0, children: [
304
+ expanded && /* @__PURE__ */ jsx4(avatar_dropdown_wrapper_default, { status, onStatusChange, onLogout, permissions, agentProfilePictureUrl, agentName, agentRole }),
305
+ !expanded && /* @__PURE__ */ jsx4(Avatar2, { name: agentName && !agentProfilePictureUrl ? agentName : void 0, size: "size30", imgProps: !agentName && agentProfilePictureUrl || agentName && agentProfilePictureUrl ? { src: agentProfilePictureUrl } : void 0 })
306
+ ] }) })
307
+ ] }) })
308
+ ] });
309
+ }
310
+ );
311
+ Sidebar.displayName = "Sidebar";
312
+
313
+ export {
314
+ Sidebar
315
+ };
316
+ //# sourceMappingURL=chunk-4XEQQFOL.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/Sidebar/Sidebar.tsx", "../../../src/components/Sidebar/sidebar-menu-item.tsx", "../../../src/components/Sidebar/footer/avatar-dropdown.wrapper.tsx", "../../../src/components/Sidebar/footer/status-dots.wrapper.tsx", "../../../src/components/Sidebar/Sidebar.css"],
4
+ "sourcesContent": ["import { useRef, useState, forwardRef } from 'react';\nimport type { SidebarProps } from './Sidebar.types';\nimport { Avatar, Box, Text } from '@wix/design-system';\nimport { ChevronLeft, ChevronRight } from '@wix/wix-ui-icons-common';\nimport SidebarMenuItem from './sidebar-menu-item';\nimport AvatarDropdown from './footer/avatar-dropdown.wrapper';\nimport './Sidebar.css';\n\nexport const Sidebar = forwardRef<HTMLDivElement, SidebarProps>(\n ({ \n className, \n children, \n items,\n isOpen,\n onItemSelect,\n onModalClosed,\n selectedId = '',\n onCreateTicketClicked,\n agentName,\n agentRole,\n agentProfilePictureUrl,\n status,\n teamId,\n onStatusChange,\n onLogout,\n permissions\n }, ref) => {\n const [expandedSections, setExpandedSections] = useState<Set<string>>(new Set());\n const [expanded, setExpanded] = useState(true);\n const sidebarRef = useRef<HTMLDivElement>(null);\n const SIDEBAR_EXPANDED_WIDTH = '210px';\n\n const toggleSection = (sectionId: string) => {\n const newExpanded = new Set(expandedSections);\n if (newExpanded.has(sectionId)) {\n newExpanded.delete(sectionId);\n } else {\n newExpanded.add(sectionId);\n }\n setExpandedSections(newExpanded);\n };\n\n const handleItemClick = (id: string) => {\n onItemSelect?.(id);\n };\n\n const toggleSidebar = () => {\n const el = sidebarRef.current;\n if (!el) { setExpanded(!expanded); return; }\n\n if (expanded) {\n // Collapsing: instant, no animation\n setExpanded(false);\n } else {\n // Expanding: animate from current to 210px\n const currentWidth = el.offsetWidth;\n\n const clearInlineStyles = () => {\n el.style.width = '';\n el.style.minWidth = '';\n el.style.transition = '';\n el.removeEventListener('transitionend', clearInlineStyles);\n };\n\n el.style.transition = 'none';\n el.style.width = `${currentWidth}px`;\n el.style.minWidth = `${currentWidth}px`;\n void el.offsetHeight; // force reflow\n el.style.transition = '';\n el.style.width = SIDEBAR_EXPANDED_WIDTH;\n el.style.minWidth = SIDEBAR_EXPANDED_WIDTH;\n\n el.addEventListener('transitionend', clearInlineStyles, { once: true });\n setExpanded(true);\n }\n }\n\n const rootItems = items.filter(item => !item.parent || item.parent === 'default');\n const currentUrl = new URL(import.meta.url);\n const expandedClassName = expanded ? 'expanded' : 'closed';\n return (\n <div className=\"sidebar-outer-wrapper\" ref={ref}>\n <div className='sidebar-expand-button-container'><div onClick={toggleSidebar}>{expanded ? <ChevronLeft /> : <ChevronRight />}</div></div>\n <div ref={sidebarRef} className={`sidebar-container ${expanded ? 'expanded' : 'closed'}`}>\n {isOpen && (\n <>\n <Box className=\"sidebar-header-box\" direction=\"horizontal\" gap={'13px'} WebkitAlignItems={'center'}>\n <img width={'37px'} height={'37px'} src={currentUrl.origin + '/logo.png'} alt=\"My Tickets Logo\" className='sidebar-logo' />\n {expanded && <Text className=\"header-title\">My Tickets</Text>}\n </Box>\n <Box className={`sidebar-items-container ${expandedClassName}`} direction=\"vertical\">\n {rootItems.map((item) => (\n <SidebarMenuItem\n key={item.stateId}\n item={item}\n items={items}\n expanded={expanded}\n expandedClassName={expandedClassName}\n selectedId={selectedId}\n expandedSections={expandedSections}\n teamId={teamId}\n onToggleSection={toggleSection}\n onItemClick={handleItemClick}\n onModalClosed={onModalClosed}\n onCreateTicketClicked={onCreateTicketClicked}\n totalCount={item.totalCount || 0}\n />\n ))}\n </Box>\n <Box direction='horizontal' className={`sidebar-footer ${expandedClassName}`}>\n <Box marginTop={'2px'} maxWidth={'100%'} minWidth={0}>\n {expanded && <AvatarDropdown status={status} onStatusChange={onStatusChange} onLogout={onLogout} permissions={permissions} agentProfilePictureUrl={agentProfilePictureUrl} agentName={agentName} agentRole={agentRole} />}\n {!expanded && <Avatar name={agentName && !agentProfilePictureUrl ? agentName : undefined} size=\"size30\" imgProps={(!agentName && agentProfilePictureUrl || agentName && agentProfilePictureUrl) ? { src: agentProfilePictureUrl } : undefined} />}\n </Box>\n </Box>\n </>\n )}\n </div>\n </div>\n );\n }\n);\n\nSidebar.displayName = 'Sidebar';\n", "import type { FC } from 'react';\nimport { useEffect, useState } from 'react';\nimport { Box, Text, CounterBadge } from '@wix/design-system';\nimport { dashboard } from '@wix/dashboard';\n\nimport type { SidebarMenuItemProps, SideBarItem } from './Sidebar.types';\n\nconst SidebarMenuItem: FC<SidebarMenuItemProps> = ({\n item,\n items,\n expanded,\n expandedClassName,\n selectedId,\n expandedSections,\n teamId,\n totalCount,\n onToggleSection,\n onItemClick,\n onModalClosed,\n onCreateTicketClicked,\n}) => {\n const [itemTotalCount, setItemTotalCount] = useState<number | string>(totalCount);\n const hasChildren = items.some(i => i.parent === item.stateId);\n const isExpanded = expandedSections.has(item.stateId);\n const isSelected = selectedId === item.stateId;\n\n useEffect(() => {\n setItemTotalCount(totalCount);\n }, [totalCount]);\n\n const handleAction = async (actionItem: SideBarItem) => {\n if (actionItem.type === 'page') {\n onItemClick(actionItem.stateId);\n } else if (actionItem.type === 'modal') {\n const { modalClosed } = dashboard.openModal({ modalId: String(actionItem.modalId), params: actionItem.modalParams });\n modalClosed.then((result: any) => {\n if (result && onModalClosed) {\n onModalClosed(result);\n }\n });\n } else if (actionItem.type === 'custom_modal') {\n onCreateTicketClicked?.();\n } else if (actionItem.type === 'link') {\n const generatedLink = await dashboard.getPageUrl({ pageId: \"9f1191cb-46cb-4280-af8d-5c15d89aced8\", relativeUrl: actionItem.link || '' });\n window.open(generatedLink, '_blank')\n }\n };\n\n if (hasChildren) {\n const children = items.filter(i => i.parent === item.stateId);\n return (\n <div key={item.stateId} className=\"sidebar-section\">\n <div\n className={`sidebar-item sidebar-parent-item ${isSelected ? 'sidebar-item-selected' : ''}`}\n onClick={() => onToggleSection(item.stateId)}\n >\n <Box className=\"sidebar-item-icon\">{item.prefixIcon}</Box>\n {expanded && (\n <>\n <Box className=\"sidebar-item-content\" direction=\"vertical\">\n <Text size='small' className=\"sidebar-item-title\">{item.label}</Text>\n {item.subtitle && <Text size='small' className=\"sidebar-item-subtitle\">{item.subtitle}</Text>}\n </Box>\n <Box className={`sidebar-item-chevron ${isExpanded ? 'expanded' : ''}`}>\n \u25BC\n </Box>\n </>\n )}\n </div>\n {isExpanded && (\n <Box className=\"sidebar-submenu-container\" direction=\"vertical\">\n {children.map((child) => (\n <div\n key={child.stateId}\n className={`sidebar-item sidebar-child-item ${expandedClassName} ${selectedId === child.stateId ? 'sidebar-item-selected' : ''}`}\n onClick={() => handleAction(child)}\n >\n <Box className=\"sidebar-item-icon\">{child.prefixIcon}</Box>\n {expanded && (\n <>\n <Box className=\"sidebar-item-content\" direction=\"vertical\">\n <Text size='small' className=\"sidebar-item-title-submenu\">{child.label}</Text>\n {child.subtitle && <Text size='small' className=\"sidebar-item-subtitle\">{child.subtitle}</Text>}\n </Box>\n </>\n )}\n </div>\n ))}\n </Box>\n )}\n </div>\n );\n }\n\n return (\n <div\n key={item.stateId}\n className={`sidebar-item ${expandedClassName} ${isSelected ? 'sidebar-item-selected' : ''}`}\n onClick={() => handleAction(item)}\n >\n <Box className=\"sidebar-item-icon\">{item.prefixIcon}</Box>\n {expanded && (\n <>\n <Box className=\"sidebar-item-content\">\n <Box verticalAlign='middle' gap={2}>\n <Box direction=\"vertical\">\n <Text size='small' className=\"sidebar-item-title\">{item.label}</Text>\n {item.subtitle && <Text size='small' className=\"sidebar-item-subtitle\">{item.subtitle}</Text>}\n </Box>\n {item.stateId === \"chats\" && <CounterBadge size=\"medium\" skin=\"warning\">{String(itemTotalCount)}</CounterBadge>}\n </Box>\n </Box>\n </>\n )}\n </div>\n );\n};\n\nexport default SidebarMenuItem;\n", "import { useState, type FC } from 'react';\nimport {\n Avatar,\n listItemActionBuilder,\n DropdownBase,\n TextButton,\n listItemSectionBuilder,\n listItemSelectBuilder,\n Box,\n Text\n} from '@wix/design-system';\nimport StatusDots from './status-dots.wrapper';\nimport { ChevronDown } from '@wix/wix-ui-icons-common';\n\nimport type { Status, AvatarDropdownWrapperProps } from '../Sidebar.types';\n\nconst AvatarDropdown: FC<AvatarDropdownWrapperProps> = ({ status = 'online', onStatusChange, onLogout, permissions, agentProfilePictureUrl, agentName, agentRole }) => {\n const [selectedStatus, setSelectedStatus] = useState<Status>(status);\n\n const handleStatusChange = (newStatus: Status) => {\n setSelectedStatus(newStatus);\n if (onStatusChange) {\n onStatusChange(newStatus);\n }\n };\n\n const handleLogout = () => {\n if (onLogout) {\n onLogout();\n }\n };\n\n const options = [\n listItemSectionBuilder({\n id: 'status-section',\n title: 'Online Status',\n }),\n listItemSelectBuilder({\n id: 'online',\n checkbox: true,\n prefix: <StatusDots.Online />,\n title: 'Online',\n disabled: permissions?.['my-tickets-change-agent-online-status'] === true ? false : true,\n }),\n listItemSelectBuilder({\n id: 'busy',\n checkbox: true,\n prefix: <StatusDots.Away />,\n title: 'Away',\n disabled: permissions?.['my-tickets-change-agent-online-status'] === true ? false : true,\n }),\n listItemSelectBuilder({\n id: 'offline',\n checkbox: true,\n prefix: <StatusDots.DoNotDisturb />,\n title: 'Offline',\n disabled: permissions?.['my-tickets-change-agent-online-status'] === true ? false : true,\n }),\n { id: 'divider-1', value: '-' },\n listItemActionBuilder({\n id: 0,\n title: 'Logout',\n onClick: handleLogout,\n }),\n ];\n\n return (\n <DropdownBase options={options} selectedId={selectedStatus} onSelect={(option: any) => typeof option.id === 'string' && handleStatusChange(option.id as Status)} className='sidebar-avatar-dropdown' minWidth={0}>\n {({ toggle }: any) => (\n <TextButton className=\"header-account-button\" onClick={toggle}>\n <Box verticalAlign='middle' gap={2} textAlign='start' maxWidth={'100%'} minWidth={0}>\n <Avatar presence={selectedStatus} name={agentName && !agentProfilePictureUrl ? agentName : undefined} size=\"size30\" imgProps={(!agentName && agentProfilePictureUrl || agentName && agentProfilePictureUrl) ? { src: agentProfilePictureUrl } : undefined} />\n <Box direction='vertical' gap={0} verticalAlign='middle' maxWidth={'100%'} minWidth={0}>\n <Text weight='bold' size='small' ellipsis maxWidth={'100%'}>{agentName ? agentName : 'Error getting name'}</Text>\n <Text size=\"tiny\" secondary ellipsis maxWidth={'100%'}>{agentRole ? agentRole : 'Error getting role'}</Text>\n </Box>\n <ChevronDown />\n </Box>\n </TextButton>\n )}\n </DropdownBase>\n )\n}\n\nexport default AvatarDropdown;", "const Online = () => {\n return <div style={{ width: '8px', height: '8px', borderRadius: '50%', background: '#22c55e', boxShadow: '0 0 0 2px #fff' }}></div>\n}\n\nconst Away = () => {\n return <div style={{ width: '8px', height: '8px', borderRadius: '50%', background: '#f59e0b', boxShadow: '0 0 0 2px #fff' }}></div>\n}\n\nconst DoNotDisturb = () => {\n return <div style={{ position: 'relative', width: '8px', height: '8px', borderRadius: '50%', background: '#ef4444', boxShadow: '0 0 0 2px #fff' }}>\n <div style={{ position: 'absolute', top: '50%', left: '10%', right: '10%', height: '2px', background: '#fff', transform: 'translateY(-50%)', borderRadius: '1px' }}></div>\n </div>\n}\n\nconst Offline = () => {\n return <div style={{ width: '8px', height: '8px', borderRadius: '50%', border: '2px solid #71717a', boxShadow: '0 0 0 2px #fff' }}></div>\n}\n\nconst StatusDots = {\n Online,\n Away,\n DoNotDisturb,\n Offline,\n}\n\nexport default StatusDots;", "if (typeof document !== 'undefined' && !document.getElementById(\"jrapps-style-eea3023c\")) {\n const s = document.createElement('style');\n s.id = \"jrapps-style-eea3023c\";\n s.textContent = \".sidebar-outer-wrapper {\\n position: relative;\\n display: flex;\\n flex-shrink: 0;\\n max-height: 100%;\\n}\\n\\n.sidebar-container {\\n background: #f8f7f4;\\n max-height: 100% !important;\\n border-right: 1px solid #e1e4e8;\\n border-left: 1px solid #e1e4e8;\\n border-top: 1px solid #e1e4e8;\\n display: flex;\\n flex-direction: column;\\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);\\n box-sizing: border-box;\\n transition: width 0.3s ease, min-width 0.3s ease;\\n overflow: hidden;\\n}\\n\\n.sidebar-container.expanded {\\n width: 210px;\\n min-width: 210px;\\n}\\n\\n.sidebar-container.closed {\\n width: max-content;\\n min-width: 0;\\n}\\n\\n.sidebar-header {\\n padding: 16px 18px 12px;\\n border-bottom: 1px solid #f0f2f5;\\n}\\n\\n.sidebar-header-title {\\n margin: 0;\\n color: #1a1a1a;\\n font-weight: 600;\\n font-size: 14px;\\n line-height: 1.4;\\n text-align: center;\\n text-overflow: clip;\\n white-space: nowrap;\\n overflow: hidden;\\n}\\n\\n.sidebar-items-container.expanded {\\n flex: 1;\\n width: 100%;\\n min-height: 0;\\n display: flex;\\n column-gap: 15px;\\n row-gap: 12px;\\n overflow-y: auto;\\n padding-top: 8px;\\n}\\n\\n.sidebar-items-container.closed {\\n flex: 1;\\n width: 100%;\\n min-height: 0;\\n display: flex;\\n column-gap: 15px;\\n row-gap: 12px;\\n overflow-y: auto;\\n padding-top: 8px;\\n align-items: center;\\n}\\n\\n.sidebar-items-container::-webkit-scrollbar {\\n width: 6px;\\n}\\n\\n.sidebar-items-container::-webkit-scrollbar-track {\\n background: transparent;\\n}\\n\\n.sidebar-items-container::-webkit-scrollbar-thumb {\\n background: #d0d7de;\\n border-radius: 3px;\\n}\\n\\n.sidebar-items-container::-webkit-scrollbar-thumb:hover {\\n background: #bec3cc;\\n}\\n\\n.sidebar-section {\\n display: flex;\\n flex-direction: column;\\n}\\n\\n.sidebar-item,\\n.sidebar-item-selected {\\n display: flex;\\n flex-direction: row;\\n column-gap: 12px;\\n padding: 8px 8px;\\n margin: 0 8px;\\n border-radius: 8px;\\n cursor: pointer;\\n transition: all 0.2s ease;\\n}\\n\\n.sidebar-item.expanded {\\n background-color: transparent;\\n align-items: center;\\n user-select: none;\\n}\\n\\n.sidebar-item.closed {\\n align-items: center;\\n justify-content: center;\\n background-color: transparent;\\n user-select: none;\\n width: max-content;\\n}\\n\\n.sidebar-item:hover {\\n background: rgba(0, 0, 0, 0.04);\\n}\\n\\n.sidebar-item.sidebar-item-selected {\\n background: white;\\n border: 0.5px solid rgba(0, 0, 0, 0.15);\\n align-items: center;\\n}\\n\\n.sidebar-item-icon {\\n flex-shrink: 0;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n}\\n\\n.sidebar-item-content {\\n display: flex;\\n flex-direction: column;\\n flex: 1;\\n width: 100%;\\n}\\n\\n.sidebar-item-title-submenu {\\n color: #1a1a1a;\\n font-weight: 600;\\n font-size: 13px;\\n line-height: 1.4;\\n width: 100%;\\n}\\n\\n.sidebar-item-title-submenu {\\n color: #1a1a1a;\\n font-weight: 600;\\n font-size: 13px;\\n line-height: 1.4;\\n width: max-content;\\n text-align: end;\\n}\\n\\n.sidebar-item-subtitle {\\n color: #6d7681;\\n font-size: 12px;\\n line-height: 1.4;\\n margin-top: 2px;\\n}\\n\\n.sidebar-parent-item {\\n justify-content: space-between;\\n border-top: 0.5px solid rgba(0, 0, 0, 0.15);\\n border-top-left-radius: 0px;\\n border-top-right-radius: 0px;\\n}\\n\\n.sidebar-item-chevron {\\n flex-shrink: 0;\\n color: #6d7681;\\n font-size: 10px;\\n transition: transform 0.2s ease;\\n display: flex;\\n align-items: center;\\n}\\n\\n.sidebar-item-chevron.expanded {\\n transform: rotate(-180deg);\\n}\\n\\n.sidebar-submenu-container {\\n display: flex;\\n flex-direction: column;\\n row-gap: 8px;\\n padding: 0;\\n}\\n\\n.sidebar-child-item {\\n padding: 8px 0px 8px 12px;\\n margin: 0 8px;\\n}\\n\\n.sidebar-child-item .sidebar-item-title {\\n font-weight: 500;\\n color: #6d7681;\\n}\\n\\n.sidebar-child-item:hover .sidebar-item-title {\\n color: #1a1a1a;\\n}\\n\\n@media (max-width: 1200px) {\\n .sidebar-container.expanded {\\n width: auto;\\n min-width: 210px;\\n }\\n}\\n\\n@media (max-width: 768px) {\\n .sidebar-container.expanded {\\n position: absolute;\\n left: 0;\\n top: 0;\\n height: 100vh;\\n z-index: 1000;\\n box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);\\n }\\n}\\n\\n.sidebar-header-box {\\n padding: 16px 18px 12px;\\n border-bottom: 0.5px solid rgba(0, 0, 0, 0.15);\\n}\\n\\n.sidebar-avatar-dropdown {\\n min-width: 0px;\\n max-width: 100%;\\n}\\n\\n.header-account-button {\\n min-width: 0;\\n max-width: 100%;\\n height: max-content;\\n}\\n\\n.header-account-button span {\\n min-width: 0;\\n max-width: 100%;\\n}\\n\\n.sidebar-expand-button-container {\\n position: absolute;\\n top: 3%;\\n background: #f8f7f4;\\n border: 1px solid #e1e4e8;\\n border-radius: 4px;\\n cursor: pointer;\\n z-index: 1001;\\n right: 0;\\n transform: translateX(100%) translateY(-50%);\\n border-top: 2px solid #e1e4e8;\\n border-right: 2px solid #e1e4e8;\\n border-bottom: 2px solid #e1e4e8;\\n border-left: 0px;\\n align-items: center;\\n text-align: center;\\n}\\n\\n.sidebar-expand-button-container div {\\n align-items: center;\\n text-align: center;\\n}\\n\\n.sidebar-footer.expanded {\\n padding: 16px 8px 16px 12px;\\n border-top: 0.5px solid rgba(0, 0, 0, 0.15);\\n gap: 2px;\\n max-width: 100%;\\n min-width: 0;\\n}\\n\\n.sidebar-footer.closed {\\n padding: 16px 16px 16px 16px;\\n border-top: 0.5px solid rgba(0, 0, 0, 0.15);\\n gap: 2px;\\n max-width: 100%;\\n min-width: 0;\\n align-items: center;\\n justify-content: center;\\n}\";\n document.head.appendChild(s);\n}"],
5
+ "mappings": ";AAAA,SAAS,QAAQ,YAAAA,WAAU,kBAAkB;AAE7C,SAAS,UAAAC,SAAQ,OAAAC,MAAK,QAAAC,aAAY;AAClC,SAAS,aAAa,oBAAoB;;;ACF1C,SAAS,WAAW,gBAAgB;AACpC,SAAS,KAAK,MAAM,oBAAoB;AACxC,SAAS,iBAAiB;AAqDN,SAEI,UAFJ,KAGQ,YAHR;AAjDpB,IAAM,kBAA4C,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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,OAAO,UAAU,QAAQ,UAAU,GAC9C;AAAA,sBAAY,gBAAAH,KAAC,mCAAe,QAAgB,gBAAgC,UAAoB,aAA0B,wBAAgD,WAAsB,WAAsB;AAAA,UACtN,CAAC,YAAY,gBAAAA,KAACK,SAAA,EAAO,MAAM,aAAa,CAAC,yBAAyB,YAAY,QAAW,MAAK,UAAS,UAAW,CAAC,aAAa,0BAA0B,aAAa,yBAA0B,EAAE,KAAK,uBAAuB,IAAI,QAAW;AAAA,WACnP,GACJ;AAAA,SACJ,GAER;AAAA,OACJ;AAAA,EAEN;AACF;AAEA,QAAQ,cAAc;",
6
+ "names": ["useState", "Avatar", "Box", "Text", "useState", "Box", "Text", "jsx", "jsx", "jsxs", "useState", "Box", "Text", "Fragment", "jsx", "jsxs", "useState", "Box", "Text", "Avatar"]
7
+ }