@beweco/aurora-ui 0.6.66 → 0.6.68
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/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +208 -8
- package/dist/index.esm.js +208 -9
- package/dist/types/components/menu/Menu.d.ts.map +1 -1
- package/dist/types/components/menu/Menu.types.d.ts +7 -0
- package/dist/types/components/menu/Menu.types.d.ts.map +1 -1
- package/dist/types/components/menu/get-user-initials.d.ts +15 -0
- package/dist/types/components/menu/get-user-initials.d.ts.map +1 -0
- package/dist/types/components/menu-claw/MenuClaw.d.ts +26 -0
- package/dist/types/components/menu-claw/MenuClaw.d.ts.map +1 -0
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts +113 -0
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts.map +1 -0
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.d.ts +15 -0
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.d.ts.map +1 -0
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.d.ts +25 -0
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.d.ts.map +1 -0
- package/dist/types/components/menu-claw/_internal/menu-claw-history/index.d.ts +3 -0
- package/dist/types/components/menu-claw/_internal/menu-claw-history/index.d.ts.map +1 -0
- package/dist/types/components/menu-claw/index.d.ts +3 -0
- package/dist/types/components/menu-claw/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3012,12 +3012,12 @@ var NotificationButton = function (_a) {
|
|
|
3012
3012
|
};
|
|
3013
3013
|
NotificationButton.displayName = "NotificationButton";
|
|
3014
3014
|
|
|
3015
|
-
var DEFAULT_TRANSLATIONS$
|
|
3015
|
+
var DEFAULT_TRANSLATIONS$8 = {
|
|
3016
3016
|
logout: "Cerrar sesión",
|
|
3017
3017
|
};
|
|
3018
3018
|
var HeaderComponent = function (_a) {
|
|
3019
3019
|
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, _b = _a.translations, translations = _b === void 0 ? {} : _b, breadcrumbs = _a.breadcrumbs, extraContent = _a.extraContent, _c = _a.showMenuButton, showMenuButton = _c === void 0 ? true : _c, onNotificationClick = _a.onNotificationClick, onOptionSelect = _a.onOptionSelect, onBreadcrumbClick = _a.onBreadcrumbClick;
|
|
3020
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3020
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$8), translations);
|
|
3021
3021
|
return (jsx("header", { className: "header__container", children: jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxs("div", { className: "flex items-center gap-4", children: [showMenuButton && (jsx(Button$1, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick })), breadcrumbs && breadcrumbs.length > 0 && (jsx(BreadcrumbsComponent, { items: breadcrumbs, onItemClick: onBreadcrumbClick }))] }), jsxs("div", { className: "flex items-center gap-4", children: [extraContent, jsx(NotificationButton, { notificationCount: notificationCount, onPress: onNotificationClick }), jsx(ConfigMenu, { options: options, onLogout: onLogout, onOptionSelect: onOptionSelect, translations: t })] })] }) }));
|
|
3022
3022
|
};
|
|
3023
3023
|
HeaderComponent.displayName = "Header";
|
|
@@ -3141,7 +3141,7 @@ KanbanColumn.displayName = "KanbanColumn";
|
|
|
3141
3141
|
* Traducciones por defecto en español.
|
|
3142
3142
|
* Se mezclan con las traducciones proporcionadas por el usuario.
|
|
3143
3143
|
*/
|
|
3144
|
-
var DEFAULT_TRANSLATIONS$
|
|
3144
|
+
var DEFAULT_TRANSLATIONS$7 = {
|
|
3145
3145
|
dropHere: "Soltar aquí",
|
|
3146
3146
|
emptyMessage: "No hay elementos",
|
|
3147
3147
|
};
|
|
@@ -3175,7 +3175,7 @@ var columnGapClasses = {
|
|
|
3175
3175
|
var KanbanComponent = function (_a) {
|
|
3176
3176
|
var columns = _a.columns, renderItem = _a.renderItem, onCardClick = _a.onCardClick, onItemMove = _a.onItemMove, isDraggable = _a.isDraggable, cardClassName = _a.cardClassName, isCardClickable = _a.isCardClickable, className = _a.className, _b = _a.columnWidth, columnWidth = _b === void 0 ? "280px" : _b, _c = _a.columnGap, columnGap = _c === void 0 ? "md" : _c, _d = _a.horizontalScroll, horizontalScroll = _d === void 0 ? true : _d, columnMaxHeight = _a.columnMaxHeight, renderColumnHeader = _a.renderColumnHeader, renderEmptyState = _a.renderEmptyState, _e = _a.translations, translations = _e === void 0 ? {} : _e, onLoadMore = _a.onLoadMore;
|
|
3177
3177
|
// Mezclar traducciones del usuario con las por defecto
|
|
3178
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3178
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$7), translations);
|
|
3179
3179
|
// Determinar si drag está habilitado
|
|
3180
3180
|
var dragEnabled = isDraggable !== null && isDraggable !== void 0 ? isDraggable : !!onItemMove;
|
|
3181
3181
|
// Estado del drag actual
|
|
@@ -3333,6 +3333,32 @@ function getSelectedKeyFromPath(pathname, items) {
|
|
|
3333
3333
|
return undefined;
|
|
3334
3334
|
}
|
|
3335
3335
|
|
|
3336
|
+
/**
|
|
3337
|
+
* Deriva las iniciales para el avatar del usuario a partir de su nombre completo.
|
|
3338
|
+
*
|
|
3339
|
+
* Muestra la inicial del nombre + la inicial del primer apellido (2 letras en
|
|
3340
|
+
* mayúsculas), p. ej. "Roser Ruiz" -> "RR". Si el usuario solo tiene un token
|
|
3341
|
+
* (nombre sin apellido) devuelve una sola inicial. Si no hay texto, devuelve "".
|
|
3342
|
+
*
|
|
3343
|
+
* TECH-1727: reemplaza el comportamiento por defecto de HeroUI (`safeText`), que
|
|
3344
|
+
* muestra las 3 primeras letras del nombre ("Roser Ruiz" -> "Ros").
|
|
3345
|
+
*
|
|
3346
|
+
* @param fullName Nombre completo del usuario (se usa el mismo valor que el label).
|
|
3347
|
+
* @returns Iniciales en mayúsculas (0, 1 o 2 letras).
|
|
3348
|
+
*/
|
|
3349
|
+
var getUserInitials = function (fullName) {
|
|
3350
|
+
var tokens = fullName.trim().split(/\s+/).filter(Boolean);
|
|
3351
|
+
if (tokens.length === 0) {
|
|
3352
|
+
return "";
|
|
3353
|
+
}
|
|
3354
|
+
var firstInitial = tokens[0].charAt(0).toUpperCase();
|
|
3355
|
+
if (tokens.length === 1) {
|
|
3356
|
+
return firstInitial;
|
|
3357
|
+
}
|
|
3358
|
+
var secondInitial = tokens[1].charAt(0).toUpperCase();
|
|
3359
|
+
return "".concat(firstInitial).concat(secondInitial);
|
|
3360
|
+
};
|
|
3361
|
+
|
|
3336
3362
|
var EnumMenuNavListItem;
|
|
3337
3363
|
(function (EnumMenuNavListItem) {
|
|
3338
3364
|
EnumMenuNavListItem["Nest"] = "nest";
|
|
@@ -3493,7 +3519,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
|
|
|
3493
3519
|
});
|
|
3494
3520
|
MenuNavList.displayName = "MenuNavList";
|
|
3495
3521
|
|
|
3496
|
-
var DEFAULT_TRANSLATIONS$
|
|
3522
|
+
var DEFAULT_TRANSLATIONS$6 = {
|
|
3497
3523
|
menuLabel: "Menú",
|
|
3498
3524
|
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
3499
3525
|
mobileNavAriaLabel: "Navegación móvil",
|
|
@@ -3508,10 +3534,10 @@ var DEFAULT_TRANSLATIONS$5 = {
|
|
|
3508
3534
|
*/
|
|
3509
3535
|
var MenuComponent = React.memo(function Menu(_a) {
|
|
3510
3536
|
var _b, _c;
|
|
3511
|
-
var commerceInfo = _a.commerceInfo, userInfo = _a.userInfo, helpButton = _a.helpButton, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, menuItems = _a.menuItems, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
3537
|
+
var commerceInfo = _a.commerceInfo, userInfo = _a.userInfo, helpButton = _a.helpButton, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, menuItems = _a.menuItems, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, onUserInfoClick = _a.onUserInfoClick, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
3512
3538
|
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
3513
3539
|
var _g = React.useState(false), logoError = _g[0], setLogoError = _g[1];
|
|
3514
|
-
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$
|
|
3540
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$6), translations);
|
|
3515
3541
|
var selectedKey = React.useMemo(function () {
|
|
3516
3542
|
var _a, _b, _c;
|
|
3517
3543
|
if (menuItems.selectedPath) {
|
|
@@ -3548,6 +3574,18 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
3548
3574
|
var handleSidebarClose = useCallback(function () {
|
|
3549
3575
|
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
3550
3576
|
}, [onOpenSidebarChange]);
|
|
3577
|
+
// TECH-1784: clic en el bloque de usuario -> acción del consumidor (ej.
|
|
3578
|
+
// navegar a /profile) y cierre del sidebar en móvil, igual que los ítems.
|
|
3579
|
+
var handleUserInfoClick = useCallback(function () {
|
|
3580
|
+
onUserInfoClick === null || onUserInfoClick === void 0 ? void 0 : onUserInfoClick();
|
|
3581
|
+
handleSidebarClose();
|
|
3582
|
+
}, [onUserInfoClick, handleSidebarClose]);
|
|
3583
|
+
// Contenido del bloque de usuario (avatar + nombre + rol), reutilizado
|
|
3584
|
+
// tanto en la variante estática como en la interactiva (TECH-1784).
|
|
3585
|
+
var userInfoContent = (jsxs(Fragment, { children: [jsx(Avatar, { size: "md", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName,
|
|
3586
|
+
// TECH-1727: inicial de nombre + inicial de primer apellido
|
|
3587
|
+
// (p. ej. "Roser Ruiz" -> "RR") en vez de las 3 primeras letras.
|
|
3588
|
+
getInitials: getUserInitials, className: "shrink-0" }), jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }));
|
|
3551
3589
|
var handleSidebarOpen = useCallback(function () {
|
|
3552
3590
|
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(true);
|
|
3553
3591
|
}, [onOpenSidebarChange]);
|
|
@@ -3687,7 +3725,168 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
3687
3725
|
flexDirection: isCollapsed ? "column-reverse" : "row",
|
|
3688
3726
|
}, children: [jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-foreground text-background", children: hasValidLogo ? (jsx("img", { src: commerceInfo.logo, alt: "".concat(t.logoAlt, " ").concat(commerceName), className: "h-full w-full object-cover", onError: function () { return setLogoError(true); } })) : (jsx(IconComponent, { icon: "solar:buildings-2-outline", size: "sm", className: "shrink-0", "aria-hidden": true })) }), jsx("span", { className: "collapsible-item text-small font-bold truncate min-w-0", children: commerceName })] }), jsxs("div", { className: "flex items-center", children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsx(IconComponent, { icon: isCollapsed
|
|
3689
3727
|
? "solar:alt-arrow-right-outline"
|
|
3690
|
-
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }),
|
|
3728
|
+
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), onUserInfoClick ? (jsx("button", { type: "button", onClick: handleUserInfoClick, className: "content__menu--user w-full text-left cursor-pointer rounded-large border-none bg-transparent transition-colors hover:bg-default/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus ".concat(isCollapsed ? "gap-0" : "gap-3"), children: userInfoContent })) : (jsx("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: userInfoContent })), jsxs("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6 relative"), children: [!isCollapsed && showScrollArrows && (jsxs(Fragment, { children: [scrollState.canScrollUp && (jsxs(Fragment, { children: [jsx("div", { className: "menu-scroll-fade menu-scroll-fade--up", "aria-hidden": "true" }), jsx("button", { type: "button", "aria-label": t.scrollUpAriaLabel, className: "menu-scroll-chevron menu-scroll-chevron--up", onClick: handleScrollUp, children: jsx(IconComponent, { icon: "solar:alt-arrow-up-outline", size: "md", "aria-hidden": true }) })] })), scrollState.canScrollDown && (jsxs(Fragment, { children: [jsx("div", { className: "menu-scroll-fade menu-scroll-fade--down", "aria-hidden": "true" }), jsx("button", { type: "button", "aria-label": t.scrollDownAriaLabel, className: "menu-scroll-chevron menu-scroll-chevron--down", onClick: handleScrollDown, children: jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", size: "md", "aria-hidden": true }) })] }))] })), jsx("div", { ref: scrollContainerRef, className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] select-none ".concat(isDraggingScroll ? "cursor-grabbing" : ""), onMouseDown: handleScrollAreaMouseDown, children: jsx(MenuNavList, { defaultSelectedKey: selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, selectedKey) })] }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsx(Button$1, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsx("span", { className: "collapsible-item truncate", children: helpSection.title })) }) })) : null] }) })] }));
|
|
3729
|
+
});
|
|
3730
|
+
|
|
3731
|
+
/**
|
|
3732
|
+
* Sección de historial de conversaciones: botón de nueva conversación + lista de
|
|
3733
|
+
* entradas recientes con "ver más".
|
|
3734
|
+
*
|
|
3735
|
+
* La lista tiene **scroll interno propio** (`flex-1 min-h-0 overflow-y-auto`) y
|
|
3736
|
+
* la sección está acotada en altura, para que crecer el historial no arrastre ni
|
|
3737
|
+
* recorte el área de navegación.
|
|
3738
|
+
*
|
|
3739
|
+
* Densidad de MenuClaw: fila de 36px, `px-2`, `text-small`/`text-tiny` y radios
|
|
3740
|
+
* `rounded-lg`/`rounded-xl` — que es justo lo que difiere del menú compartido.
|
|
3741
|
+
*/
|
|
3742
|
+
var MenuClawHistoryPanel = React.memo(function MenuClawHistoryPanel(_a) {
|
|
3743
|
+
var items = _a.items, initialVisibleCount = _a.initialVisibleCount, onNewConversation = _a.onNewConversation, isCollapsed = _a.isCollapsed, title = _a.title, newLabel = _a.newLabel, showMoreLabel = _a.showMoreLabel, showLessLabel = _a.showLessLabel, onBeforeSelect = _a.onBeforeSelect;
|
|
3744
|
+
var _b = React.useState(false), isExpanded = _b[0], setIsExpanded = _b[1];
|
|
3745
|
+
var visibleItems = useMemo(function () { return (isExpanded ? items : items.slice(0, initialVisibleCount)); }, [isExpanded, items, initialVisibleCount]);
|
|
3746
|
+
var hasHiddenItems = items.length > initialVisibleCount;
|
|
3747
|
+
var handleToggleExpand = useCallback(function () {
|
|
3748
|
+
setIsExpanded(function (prev) { return !prev; });
|
|
3749
|
+
}, []);
|
|
3750
|
+
var handleItemPress = useCallback(function (item) {
|
|
3751
|
+
var _a;
|
|
3752
|
+
// `disabled` ya bloquea el botón; este guard cubre además el caso de
|
|
3753
|
+
// activación programática.
|
|
3754
|
+
if (item.disabled) {
|
|
3755
|
+
return;
|
|
3756
|
+
}
|
|
3757
|
+
onBeforeSelect === null || onBeforeSelect === void 0 ? void 0 : onBeforeSelect();
|
|
3758
|
+
(_a = item.onSelect) === null || _a === void 0 ? void 0 : _a.call(item);
|
|
3759
|
+
}, [onBeforeSelect]);
|
|
3760
|
+
// Comprimido no hay ancho para texto: solo el botón de nueva conversación,
|
|
3761
|
+
// en modo icono. Sin `onNewConversation` no hay nada que mostrar.
|
|
3762
|
+
if (isCollapsed && !onNewConversation) {
|
|
3763
|
+
return null;
|
|
3764
|
+
}
|
|
3765
|
+
return (jsxs("div", { className: "flex max-h-[40%] min-h-0 flex-col gap-2 pb-3", children: [onNewConversation ? (jsxs("button", { type: "button", title: newLabel, onClick: onNewConversation, className: cn("flex h-9 shrink-0 items-center gap-3 rounded-xl bg-foreground px-2 text-small font-medium text-background transition-opacity hover:opacity-90", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", isCollapsed && "justify-center"), children: [jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center", children: jsx(IconComponent, { icon: "solar:pen-new-square-linear", size: "md", "aria-hidden": true }) }), !isCollapsed ? (jsx("span", { className: "menu-claw-collapsible truncate", children: newLabel })) : null] })) : null, !isCollapsed && items.length > 0 ? (jsxs(Fragment, { children: [jsx("p", { className: "shrink-0 px-2 pb-1 pt-2 text-tiny font-medium uppercase tracking-wide text-default-400", children: title }), jsx("ul", { "aria-label": title, className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: visibleItems.map(function (item) { return (jsx("li", { children: jsxs("button", { type: "button", disabled: item.disabled, "aria-disabled": item.disabled, title: item.title, onClick: function () { return handleItemPress(item); }, className: cn("flex min-h-9 w-full items-center gap-3 rounded-lg px-2 py-1.5 text-left text-small text-default-600 transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", item.disabled
|
|
3766
|
+
? "cursor-not-allowed opacity-50"
|
|
3767
|
+
: "hover:bg-default-100"), children: [jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-default-400", children: jsx(IconComponent, { icon: "solar:chat-round-dots-linear", size: "md", "aria-hidden": true }) }), jsxs("span", { className: "flex min-w-0 flex-col", children: [jsx("span", { className: "truncate", children: item.title }), item.meta ? (jsx("span", { className: "truncate text-tiny text-default-400", children: item.meta })) : null] })] }) }, item.id)); }) }), hasHiddenItems ? (jsxs("button", { type: "button", onClick: handleToggleExpand, "aria-expanded": isExpanded, className: "flex w-full shrink-0 items-center gap-1.5 rounded-lg px-2 py-2 text-tiny font-medium text-default-500 transition-colors hover:bg-default-100 hover:text-default-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", children: [jsx(IconComponent, { icon: isExpanded
|
|
3768
|
+
? "solar:alt-arrow-up-linear"
|
|
3769
|
+
: "solar:alt-arrow-down-linear", size: "sm", "aria-hidden": true }), isExpanded ? showLessLabel : showMoreLabel] })) : null] })) : null] }));
|
|
3770
|
+
});
|
|
3771
|
+
|
|
3772
|
+
var DEFAULT_TRANSLATIONS$5 = {
|
|
3773
|
+
menuLabel: "Menú",
|
|
3774
|
+
closeSidebarAriaLabel: "Cerrar menú lateral",
|
|
3775
|
+
mobileNavAriaLabel: "Navegación móvil",
|
|
3776
|
+
notDefinedLabel: "no definido",
|
|
3777
|
+
toggleSidebarAriaLabel: "Comprimir o expandir el menú",
|
|
3778
|
+
historyTitle: "Historial",
|
|
3779
|
+
historyNewLabel: "Nueva conversación",
|
|
3780
|
+
historyShowMoreLabel: "Ver más",
|
|
3781
|
+
historyShowLessLabel: "Ver menos",
|
|
3782
|
+
};
|
|
3783
|
+
/** Ítems del historial visibles antes de pulsar "ver más". */
|
|
3784
|
+
var DEFAULT_HISTORY_VISIBLE_COUNT = 5;
|
|
3785
|
+
/**
|
|
3786
|
+
* Menú lateral con historial de conversaciones integrado.
|
|
3787
|
+
*
|
|
3788
|
+
* Es un componente **aparte de `MenuComponent`**, no una extensión suya, y esa
|
|
3789
|
+
* es toda su razón de ser: el diseño no solo añade historial, cambia la
|
|
3790
|
+
* DENSIDAD del menú (fila de 36px en vez de 44, `px-2` en vez de `px-3`, dos
|
|
3791
|
+
* escalas tipográficas en vez de una, radios `lg`/`xl` en vez de `large`).
|
|
3792
|
+
* `MenuComponent` lo consumen varias plataformas —solo en beweossmbs hay 446
|
|
3793
|
+
* ficheros que importan el paquete— y no se puede cambiar su densidad base sin
|
|
3794
|
+
* regresionar a todas. Por eso aquí hay render propio y libertad visual, y por
|
|
3795
|
+
* eso **no** se reutiliza `MenuNavList`: heredaría los 44px que el diseño
|
|
3796
|
+
* cambia.
|
|
3797
|
+
*
|
|
3798
|
+
* Lo que sí se reutiliza es el **contrato de datos** (`MenuNavListItem`), para
|
|
3799
|
+
* que un consumidor pueda pasar exactamente la misma estructura de menú que ya
|
|
3800
|
+
* le da a `MenuComponent`. Mismo dato, render distinto.
|
|
3801
|
+
*
|
|
3802
|
+
* Preserva `helpButton` y la barra inferior móvil, que el menú hecho a mano del
|
|
3803
|
+
* diseño dejó caer. No pinta cabecera de comercio: en este diseño la identidad
|
|
3804
|
+
* del comercio vive fuera del lateral.
|
|
3805
|
+
*/
|
|
3806
|
+
var MenuClaw = React.memo(function MenuClaw(_a) {
|
|
3807
|
+
var _b, _c;
|
|
3808
|
+
var userInfo = _a.userInfo, helpButton = _a.helpButton, menuItems = _a.menuItems, history = _a.history, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, mobileBottomBarGroupKey = _a.mobileBottomBarGroupKey, _d = _a.showNativeMenu, showNativeMenu = _d === void 0 ? true : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e;
|
|
3809
|
+
var _f = React.useState(false), isCollapsed = _f[0], setIsCollapsed = _f[1];
|
|
3810
|
+
var t = __assign(__assign({}, DEFAULT_TRANSLATIONS$5), translations);
|
|
3811
|
+
var selectedKey = useMemo(function () {
|
|
3812
|
+
var _a, _b, _c;
|
|
3813
|
+
if (menuItems.selectedPath) {
|
|
3814
|
+
return ((_b = (_a = getSelectedKeyFromPath(menuItems.selectedPath, menuItems.items)) !== null && _a !== void 0 ? _a : menuItems.selectedKey) !== null && _b !== void 0 ? _b : "");
|
|
3815
|
+
}
|
|
3816
|
+
return (_c = menuItems.selectedKey) !== null && _c !== void 0 ? _c : "";
|
|
3817
|
+
}, [menuItems.selectedPath, menuItems.selectedKey, menuItems.items]);
|
|
3818
|
+
var userName = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) === "string" && userInfo.name.trim()) ||
|
|
3819
|
+
t.notDefinedLabel;
|
|
3820
|
+
var userRole = (typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.role) === "string" && userInfo.role.trim()) ||
|
|
3821
|
+
t.notDefinedLabel;
|
|
3822
|
+
var helpSection = useMemo(function () {
|
|
3823
|
+
if (helpButton == null) {
|
|
3824
|
+
return null;
|
|
3825
|
+
}
|
|
3826
|
+
var title = typeof helpButton.title === "string" ? helpButton.title.trim() : "";
|
|
3827
|
+
var redirect = typeof helpButton.redirect === "string" ? helpButton.redirect.trim() : "";
|
|
3828
|
+
if (!(title && redirect)) {
|
|
3829
|
+
return null;
|
|
3830
|
+
}
|
|
3831
|
+
return { title: title, redirect: redirect };
|
|
3832
|
+
}, [helpButton]);
|
|
3833
|
+
var historyConfig = useMemo(function () {
|
|
3834
|
+
var items = Array.isArray(history === null || history === void 0 ? void 0 : history.items) ? history.items : [];
|
|
3835
|
+
var rawCount = history === null || history === void 0 ? void 0 : history.initialVisibleCount;
|
|
3836
|
+
var initialVisibleCount = typeof rawCount === "number" && Number.isFinite(rawCount) && rawCount > 0
|
|
3837
|
+
? Math.floor(rawCount)
|
|
3838
|
+
: DEFAULT_HISTORY_VISIBLE_COUNT;
|
|
3839
|
+
return { items: items, initialVisibleCount: initialVisibleCount };
|
|
3840
|
+
}, [history]);
|
|
3841
|
+
var bottomBarItems = useMemo(function () {
|
|
3842
|
+
if (!mobileBottomBarGroupKey) {
|
|
3843
|
+
return [];
|
|
3844
|
+
}
|
|
3845
|
+
var group = menuItems.items.find(function (item) { return item.key === mobileBottomBarGroupKey; });
|
|
3846
|
+
if (!(group === null || group === void 0 ? void 0 : group.items)) {
|
|
3847
|
+
return [];
|
|
3848
|
+
}
|
|
3849
|
+
return group.items.filter(function (item) { return item.icon; });
|
|
3850
|
+
}, [mobileBottomBarGroupKey, menuItems.items]);
|
|
3851
|
+
var handleSidebarClose = useCallback(function () {
|
|
3852
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
3853
|
+
}, [onOpenSidebarChange]);
|
|
3854
|
+
var handleSidebarOpen = useCallback(function () {
|
|
3855
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(true);
|
|
3856
|
+
}, [onOpenSidebarChange]);
|
|
3857
|
+
var handleCollapseToggle = useCallback(function () {
|
|
3858
|
+
setIsCollapsed(function (prev) { return !prev; });
|
|
3859
|
+
}, []);
|
|
3860
|
+
var handleHelpClick = useCallback(function () {
|
|
3861
|
+
if (helpSection) {
|
|
3862
|
+
window.open(helpSection.redirect, "_blank");
|
|
3863
|
+
}
|
|
3864
|
+
}, [helpSection]);
|
|
3865
|
+
var handleMenuSelect = useCallback(function (key, href) {
|
|
3866
|
+
var _a;
|
|
3867
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
3868
|
+
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "sidebar");
|
|
3869
|
+
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
3870
|
+
// Barra inferior: cerrar el lateral y avisar con source 'bottomBar' para que
|
|
3871
|
+
// la app no lo reabra al navegar.
|
|
3872
|
+
var handleBottomBarSelect = useCallback(function (key, href) {
|
|
3873
|
+
var _a;
|
|
3874
|
+
onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
|
|
3875
|
+
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
3876
|
+
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
3877
|
+
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
3878
|
+
return (jsxs(Fragment, { children: [showBottomBar ? (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })) : null, jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-claw-overlay ".concat(isOpenSidebar ? "menu-claw-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: cn("menu-claw", isCollapsed ? "menu-claw--collapsed" : "menu-claw--expanded", isOpenSidebar && "menu-claw--mobile-open"), "aria-hidden": !isOpenSidebar, children: jsxs("div", { className: "menu-claw__content", children: [jsxs("div", { className: cn("flex items-center", isCollapsed ? "justify-center" : "justify-end"), children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "block cursor-pointer sm:hidden", onClick: handleSidebarClose }), jsx("button", { type: "button", "aria-label": t.toggleSidebarAriaLabel, onClick: handleCollapseToggle, className: "hidden h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-lg text-default-500 transition-colors hover:bg-default-100 sm:flex", children: jsx(IconComponent, { icon: isCollapsed
|
|
3879
|
+
? "solar:alt-arrow-right-linear"
|
|
3880
|
+
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxs("div", { className: cn("flex items-center py-3", isCollapsed ? "justify-center gap-0" : "gap-3"), children: [jsx(Avatar, { size: "sm", src: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), !isCollapsed ? (jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "truncate text-small font-semibold text-foreground", children: userName }), jsx("p", { className: "truncate text-tiny text-default-400", children: userRole })] })) : null] }), jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history === null || history === void 0 ? void 0 : history.onNewConversation, isCollapsed: isCollapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, onBeforeSelect: handleSidebarClose }), jsx("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: menuItems.items.map(function (group) {
|
|
3881
|
+
var _a;
|
|
3882
|
+
return (jsxs("div", { className: "mb-2", children: [group.title && !isCollapsed ? (jsx("p", { className: "px-2 pb-1 pt-2 text-tiny font-medium uppercase tracking-wide text-default-400", children: group.title })) : null, jsx("ul", { className: "flex flex-col gap-0.5", children: ((_a = group.items) !== null && _a !== void 0 ? _a : []).map(function (item) {
|
|
3883
|
+
var _a;
|
|
3884
|
+
var isActive = !!item.key && item.key === selectedKey;
|
|
3885
|
+
return (jsx("li", { children: jsxs("button", { type: "button", title: isCollapsed ? item.title : undefined, onClick: function () { return handleMenuSelect(item.key, item.href); }, className: cn("flex min-h-9 w-full items-center rounded-lg px-2 py-1.5 text-left text-small transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", isCollapsed ? "justify-center" : "gap-3", isActive
|
|
3886
|
+
? "bg-default-100 font-medium text-foreground"
|
|
3887
|
+
: "text-default-600 hover:bg-default-100", item.className), children: [item.icon || item.startContent ? (jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-default-500 [&_svg]:h-5 [&_svg]:w-5", children: item.icon ? (jsx(IconComponent, { icon: item.icon, size: "md", "aria-hidden": true })) : (item.startContent) })) : null, !isCollapsed ? (jsxs(Fragment, { children: [jsx("span", { className: "menu-claw-collapsible flex-1 truncate", children: item.title }), (_a = item.endContent) !== null && _a !== void 0 ? _a : null] })) : null] }) }, item.key));
|
|
3888
|
+
}) })] }, group.key));
|
|
3889
|
+
}) }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsx(Button$1, { fullWidth: true, className: "text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed ? (jsx("span", { className: "menu-claw-collapsible truncate", children: helpSection.title })) : null }) })) : null] }) })] }));
|
|
3691
3890
|
});
|
|
3692
3891
|
|
|
3693
3892
|
var StepIndicator = function (_a) {
|
|
@@ -9267,4 +9466,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
9267
9466
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
9268
9467
|
};
|
|
9269
9468
|
|
|
9270
|
-
export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, ViolinPlot, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isExactThemeColor, isGroupState, isHexColor, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
9469
|
+
export { ALL_THEMES, AURORA_THEME_FAMILIES, AURORA_THEME_REGISTRY, AccordionList, AddHolidayForm, AnalyticsCard, AreaLineChart, AuraAutocomplete, AuraTable, AuraToastProvider, BEWEOS_THEME_MODE_COOKIE_NAME, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, Currency, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EmailPreview, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuClaw, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, REGISTERED_THEME_COLORS, RangeFilter, RowSteps, DEFAULT_TRANSLATIONS$1 as SEGMENTATION_DEFAULT_TRANSLATIONS, ScheduleRow, SearchInput, SegmentationBuilder, Select, SimpleLineChart, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, Tooltip, TwoColumnLayoutAgent, UploadFile, VerticalSteps, ViolinPlot, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, createCurrencyFormatter, uniqueCountries as defaultCountries, defaultCurrencyOptions, defaultTranslations$5 as defaultTranslations, forceLightOnlyThemeBeforeReact, formatAuroraThemeTooltip, generateThemeColorScale, getContrastForeground, getRegisteredThemeColorBases, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isAuroraFullThemeId, isExactThemeColor, isGroupState, isHexColor, isSegmentationGroup, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useCloseOnAncestorScroll, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,cAAc,CAAC;AAgBtB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2btD,CAAC"}
|
|
@@ -66,6 +66,13 @@ export interface MenuComponentProps {
|
|
|
66
66
|
* @default true
|
|
67
67
|
*/
|
|
68
68
|
showNativeMenu?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Se invoca al hacer clic (o Enter/Espacio) sobre el bloque de usuario
|
|
71
|
+
* (avatar + nombre + rol) del sidebar. Si se proporciona, el bloque se vuelve
|
|
72
|
+
* interactivo (cursor pointer + hover) — típicamente para navegar al perfil.
|
|
73
|
+
* Si se omite, el bloque se muestra como texto estático (sin acción).
|
|
74
|
+
*/
|
|
75
|
+
onUserInfoClick?: () => void;
|
|
69
76
|
/**
|
|
70
77
|
* Traducciones i18n del componente.
|
|
71
78
|
* Si no se proporciona, usa traducciones por defecto en español.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;I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AI,CAAC;IAC9C;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;OAGG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deriva las iniciales para el avatar del usuario a partir de su nombre completo.
|
|
3
|
+
*
|
|
4
|
+
* Muestra la inicial del nombre + la inicial del primer apellido (2 letras en
|
|
5
|
+
* mayúsculas), p. ej. "Roser Ruiz" -> "RR". Si el usuario solo tiene un token
|
|
6
|
+
* (nombre sin apellido) devuelve una sola inicial. Si no hay texto, devuelve "".
|
|
7
|
+
*
|
|
8
|
+
* TECH-1727: reemplaza el comportamiento por defecto de HeroUI (`safeText`), que
|
|
9
|
+
* muestra las 3 primeras letras del nombre ("Roser Ruiz" -> "Ros").
|
|
10
|
+
*
|
|
11
|
+
* @param fullName Nombre completo del usuario (se usa el mismo valor que el label).
|
|
12
|
+
* @returns Iniciales en mayúsculas (0, 1 o 2 letras).
|
|
13
|
+
*/
|
|
14
|
+
export declare const getUserInitials: (fullName: string) => string;
|
|
15
|
+
//# sourceMappingURL=get-user-initials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-initials.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/get-user-initials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,KAAG,MAWlD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./MenuClaw.scss";
|
|
3
|
+
import type { MenuClawProps } from "./MenuClaw.types";
|
|
4
|
+
/**
|
|
5
|
+
* Menú lateral con historial de conversaciones integrado.
|
|
6
|
+
*
|
|
7
|
+
* Es un componente **aparte de `MenuComponent`**, no una extensión suya, y esa
|
|
8
|
+
* es toda su razón de ser: el diseño no solo añade historial, cambia la
|
|
9
|
+
* DENSIDAD del menú (fila de 36px en vez de 44, `px-2` en vez de `px-3`, dos
|
|
10
|
+
* escalas tipográficas en vez de una, radios `lg`/`xl` en vez de `large`).
|
|
11
|
+
* `MenuComponent` lo consumen varias plataformas —solo en beweossmbs hay 446
|
|
12
|
+
* ficheros que importan el paquete— y no se puede cambiar su densidad base sin
|
|
13
|
+
* regresionar a todas. Por eso aquí hay render propio y libertad visual, y por
|
|
14
|
+
* eso **no** se reutiliza `MenuNavList`: heredaría los 44px que el diseño
|
|
15
|
+
* cambia.
|
|
16
|
+
*
|
|
17
|
+
* Lo que sí se reutiliza es el **contrato de datos** (`MenuNavListItem`), para
|
|
18
|
+
* que un consumidor pueda pasar exactamente la misma estructura de menú que ya
|
|
19
|
+
* le da a `MenuComponent`. Mismo dato, render distinto.
|
|
20
|
+
*
|
|
21
|
+
* Preserva `helpButton` y la barra inferior móvil, que el menú hecho a mano del
|
|
22
|
+
* diseño dejó caer. No pinta cabecera de comercio: en este diseño la identidad
|
|
23
|
+
* del comercio vive fuera del lateral.
|
|
24
|
+
*/
|
|
25
|
+
export declare const MenuClaw: React.FC<MenuClawProps>;
|
|
26
|
+
//# sourceMappingURL=MenuClaw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AAkB5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4S3C,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { MenuNavListItem } from "../menu/_internal/menu-nav-list/MenuNavList.types";
|
|
2
|
+
export type { MenuNavListItem };
|
|
3
|
+
/**
|
|
4
|
+
* Ítem del historial de conversaciones. Forma genérica: el componente no sabe
|
|
5
|
+
* qué representa cada entrada.
|
|
6
|
+
*/
|
|
7
|
+
export interface MenuClawHistoryItem {
|
|
8
|
+
/** Identificador único dentro de la lista. Se usa como key de React. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Texto principal del ítem. Se trunca a una línea. */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Texto secundario opcional (fecha, contador…). Se trunca a una línea. */
|
|
13
|
+
meta?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Si es `true`, el ítem se renderiza deshabilitado y `onSelect` NO se invoca.
|
|
16
|
+
* Es contrato, no cosmética: hay sesiones que existen pero no son reanudables
|
|
17
|
+
* porque les falta el identificador necesario para abrirlas.
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Se invoca al activar el ítem. No se llama si `disabled` es `true`. */
|
|
21
|
+
onSelect?: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Sección de historial. Va integrada de serie en `MenuClaw` (no es opt-in),
|
|
25
|
+
* porque es la razón de existir del componente.
|
|
26
|
+
*/
|
|
27
|
+
export interface MenuClawHistory {
|
|
28
|
+
/** Entradas a listar, ya ordenadas por el consumidor. */
|
|
29
|
+
items: MenuClawHistoryItem[];
|
|
30
|
+
/**
|
|
31
|
+
* Nº de ítems visibles antes de pulsar "ver más". Valores <= 0 o no
|
|
32
|
+
* numéricos se ignoran y se usa el default.
|
|
33
|
+
* @default 5
|
|
34
|
+
*/
|
|
35
|
+
initialVisibleCount?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Si se proporciona, se muestra el botón de nueva conversación sobre la lista.
|
|
38
|
+
*/
|
|
39
|
+
onNewConversation?: () => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Traducciones de MenuClaw. Todas opcionales para permitir traducciones
|
|
43
|
+
* parciales.
|
|
44
|
+
*/
|
|
45
|
+
export type MenuClawTranslations = {
|
|
46
|
+
/** Etiqueta del botón hamburguesa de la barra inferior móvil */
|
|
47
|
+
menuLabel?: string;
|
|
48
|
+
/** Aria-label del botón/overlay para cerrar el lateral en móvil */
|
|
49
|
+
closeSidebarAriaLabel?: string;
|
|
50
|
+
/** Aria-label de la barra de navegación inferior en móvil */
|
|
51
|
+
mobileNavAriaLabel?: string;
|
|
52
|
+
/** Texto cuando el nombre o el rol del usuario no llegan */
|
|
53
|
+
notDefinedLabel?: string;
|
|
54
|
+
/** Aria-label del botón que comprime/expande el lateral en desktop */
|
|
55
|
+
toggleSidebarAriaLabel?: string;
|
|
56
|
+
/** Título de la sección de historial */
|
|
57
|
+
historyTitle?: string;
|
|
58
|
+
/** Etiqueta del botón de nueva conversación */
|
|
59
|
+
historyNewLabel?: string;
|
|
60
|
+
/** Etiqueta del botón que despliega el resto de ítems del historial */
|
|
61
|
+
historyShowMoreLabel?: string;
|
|
62
|
+
/** Etiqueta del botón que vuelve a plegar el historial */
|
|
63
|
+
historyShowLessLabel?: string;
|
|
64
|
+
};
|
|
65
|
+
export interface MenuClawProps {
|
|
66
|
+
userInfo: {
|
|
67
|
+
avatar: string;
|
|
68
|
+
name: string;
|
|
69
|
+
role: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Botón de ayuda al pie del lateral. Si se omite, o si `title` / `redirect`
|
|
73
|
+
* quedan vacíos tras quitar espacios, no se renderiza la sección.
|
|
74
|
+
*/
|
|
75
|
+
helpButton?: {
|
|
76
|
+
title: string;
|
|
77
|
+
redirect: string;
|
|
78
|
+
};
|
|
79
|
+
menuItems: {
|
|
80
|
+
items: MenuNavListItem[];
|
|
81
|
+
/**
|
|
82
|
+
* Ruta actual (p. ej. `location.pathname`). El componente calcula la key
|
|
83
|
+
* seleccionada comparando con los `href` de los ítems. Preferido frente a
|
|
84
|
+
* `selectedKey`.
|
|
85
|
+
*/
|
|
86
|
+
selectedPath?: string;
|
|
87
|
+
/** Key del ítem seleccionado. Se ignora si se pasa `selectedPath`. */
|
|
88
|
+
selectedKey?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Se invoca al seleccionar un ítem. En móvil, si `source === 'bottomBar'`
|
|
91
|
+
* la app no debe reabrir el lateral (evita parpadeos).
|
|
92
|
+
*/
|
|
93
|
+
onSelect?: (key: string, href?: string, source?: "sidebar" | "bottomBar") => void;
|
|
94
|
+
};
|
|
95
|
+
/** Historial de conversaciones, integrado de serie. */
|
|
96
|
+
history: MenuClawHistory;
|
|
97
|
+
isOpenSidebar?: boolean;
|
|
98
|
+
onOpenSidebarChange?: (open: boolean) => void;
|
|
99
|
+
/**
|
|
100
|
+
* Key del grupo cuyos ítems se muestran en la barra inferior móvil (hasta 4
|
|
101
|
+
* + hamburguesa). Sin este valor no se muestra la barra inferior.
|
|
102
|
+
*/
|
|
103
|
+
mobileBottomBarGroupKey?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Si es `true`, muestra siempre el botón que abre el lateral en la barra
|
|
106
|
+
* inferior móvil, aunque no haya ítems en el grupo.
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
showNativeMenu?: boolean;
|
|
110
|
+
/** Traducciones i18n. Sin valor, usa los defaults en español. */
|
|
111
|
+
translations?: MenuClawTranslations;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=MenuClaw.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuClaw.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEzF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,wEAAwE;IACxE,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AS,EAAE;QACV,KAAK,EAAE,eAAe,EAAE,CAAC;QACzB;;;;WAIG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,sEAAsE;QACtE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB;;;WAGG;QACH,QAAQ,CAAC,EAAE,CACV,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,KAC5B,IAAI,CAAC;KACV,CAAC;IACF,uDAAuD;IACvD,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iEAAiE;IACjE,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { MenuClawHistoryPanelProps } from "./MenuClawHistoryPanel.types";
|
|
3
|
+
/**
|
|
4
|
+
* Sección de historial de conversaciones: botón de nueva conversación + lista de
|
|
5
|
+
* entradas recientes con "ver más".
|
|
6
|
+
*
|
|
7
|
+
* La lista tiene **scroll interno propio** (`flex-1 min-h-0 overflow-y-auto`) y
|
|
8
|
+
* la sección está acotada en altura, para que crecer el historial no arrastre ni
|
|
9
|
+
* recorte el área de navegación.
|
|
10
|
+
*
|
|
11
|
+
* Densidad de MenuClaw: fila de 36px, `px-2`, `text-small`/`text-tiny` y radios
|
|
12
|
+
* `rounded-lg`/`rounded-xl` — que es justo lo que difiere del menú compartido.
|
|
13
|
+
*/
|
|
14
|
+
export declare const MenuClawHistoryPanel: React.FC<MenuClawHistoryPanelProps>;
|
|
15
|
+
//# sourceMappingURL=MenuClawHistoryPanel.d.ts.map
|
package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuClawHistoryPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAGpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAyIlE,CAAC"}
|
package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MenuClawHistoryItem } from "../../MenuClaw.types";
|
|
2
|
+
export type MenuClawHistoryPanelProps = {
|
|
3
|
+
/** Entradas a listar, ya ordenadas por el consumidor. */
|
|
4
|
+
items: MenuClawHistoryItem[];
|
|
5
|
+
/** Nº de ítems visibles antes de pulsar "ver más". */
|
|
6
|
+
initialVisibleCount: number;
|
|
7
|
+
/** Si se proporciona, se muestra el botón de nueva conversación sobre la lista. */
|
|
8
|
+
onNewConversation?: () => void;
|
|
9
|
+
/** Lateral comprimido: solo el botón de nueva conversación, en modo icono. */
|
|
10
|
+
isCollapsed: boolean;
|
|
11
|
+
/** Título de la sección. */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Etiqueta del botón de nueva conversación. */
|
|
14
|
+
newLabel: string;
|
|
15
|
+
/** Etiqueta del botón que despliega el resto de ítems. */
|
|
16
|
+
showMoreLabel: string;
|
|
17
|
+
/** Etiqueta del botón que vuelve a plegar la lista. */
|
|
18
|
+
showLessLabel: string;
|
|
19
|
+
/**
|
|
20
|
+
* Se invoca antes del `onSelect` del ítem, para que el menú cierre el lateral
|
|
21
|
+
* en móvil igual que hace con los ítems de navegación.
|
|
22
|
+
*/
|
|
23
|
+
onBeforeSelect?: () => void;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=MenuClawHistoryPanel.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuClawHistoryPanel.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG;IACvC,yDAAyD;IACzD,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACX,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,oBAAoB,GACpB,MAAM,kBAAkB,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./components/icon";
|
|
|
23
23
|
export * from "./components/kanban";
|
|
24
24
|
export * from "./components/image-preview";
|
|
25
25
|
export * from "./components/menu";
|
|
26
|
+
export * from "./components/menu-claw";
|
|
26
27
|
export * from "./components/multi-step-wizard";
|
|
27
28
|
export * from "./components/p";
|
|
28
29
|
export * from "./components/pagination";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAU9B,cAAc,eAAe,CAAC;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,i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