analytica-frontend-lib 1.1.46 → 1.1.48

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.mjs CHANGED
@@ -6367,6 +6367,7 @@ var useMenuStore = (externalStore) => {
6367
6367
  var VARIANT_CLASSES5 = {
6368
6368
  menu: "bg-background shadow-soft-shadow-1 px-6",
6369
6369
  menu2: "",
6370
+ "menu-overflow": "",
6370
6371
  breadcrumb: "bg-transparent shadow-none !px-0"
6371
6372
  };
6372
6373
  var Menu = forwardRef17(
@@ -6386,7 +6387,7 @@ var Menu = forwardRef17(
6386
6387
  useEffect11(() => {
6387
6388
  setValue(propValue ?? defaultValue);
6388
6389
  }, [defaultValue, propValue, setValue]);
6389
- const baseClasses = "w-full py-2 flex flex-row items-center justify-center";
6390
+ const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
6390
6391
  const variantClasses = VARIANT_CLASSES5[variant];
6391
6392
  return /* @__PURE__ */ jsx33(
6392
6393
  "div",
@@ -6407,7 +6408,7 @@ Menu.displayName = "Menu";
6407
6408
  var MenuContent = forwardRef17(
6408
6409
  ({ className, children, variant = "menu", ...props }, ref) => {
6409
6410
  const baseClasses = "w-full flex flex-row items-center gap-2";
6410
- const variantClasses = variant === "menu2" ? "overflow-x-auto scroll-smooth" : "";
6411
+ const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
6411
6412
  return /* @__PURE__ */ jsx33(
6412
6413
  "ul",
6413
6414
  {
@@ -6418,7 +6419,7 @@ var MenuContent = forwardRef17(
6418
6419
  ${variant == "breadcrumb" ? "flex-wrap" : ""}
6419
6420
  ${className ?? ""}
6420
6421
  `,
6421
- style: variant === "menu2" ? { scrollbarWidth: "none", msOverflowStyle: "none" } : void 0,
6422
+ style: variant === "menu2" || variant === "menu-overflow" ? { scrollbarWidth: "none", msOverflowStyle: "none" } : void 0,
6422
6423
  ...props,
6423
6424
  children
6424
6425
  }
@@ -6500,6 +6501,31 @@ var MenuItem = forwardRef17(
6500
6501
  ]
6501
6502
  }
6502
6503
  ),
6504
+ "menu-overflow": /* @__PURE__ */ jsxs27(
6505
+ "li",
6506
+ {
6507
+ "data-variant": "menu-overflow",
6508
+ className: `
6509
+ w-fit flex flex-col items-center px-2 pt-4 gap-3 cursor-pointer focus:rounded-sm justify-center hover:bg-background-100 rounded-lg
6510
+ focus:outline-none focus:border-indicator-info focus:border-2
6511
+ ${selectedValue === value ? "" : "pb-4"}
6512
+ `,
6513
+ ...commonProps,
6514
+ children: [
6515
+ /* @__PURE__ */ jsx33(
6516
+ "span",
6517
+ {
6518
+ className: cn(
6519
+ "flex flex-row items-center gap-2 px-4 text-text-950 text-xs font-bold",
6520
+ className
6521
+ ),
6522
+ children
6523
+ }
6524
+ ),
6525
+ selectedValue === value && /* @__PURE__ */ jsx33("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
6526
+ ]
6527
+ }
6528
+ ),
6503
6529
  breadcrumb: /* @__PURE__ */ jsxs27(
6504
6530
  "li",
6505
6531
  {
@@ -10870,7 +10896,7 @@ var createUseNotifications = (apiClient) => {
10870
10896
  getGroupedNotifications
10871
10897
  } = useNotificationStore();
10872
10898
  const handleNavigate = useCallback5(
10873
- (entityType, entityId) => {
10899
+ (entityType, entityId, onAfterNavigate) => {
10874
10900
  if (entityType && entityId) {
10875
10901
  switch (entityType.toUpperCase()) {
10876
10902
  case "ACTIVITY" /* ACTIVITY */:
@@ -10882,6 +10908,7 @@ var createUseNotifications = (apiClient) => {
10882
10908
  default:
10883
10909
  break;
10884
10910
  }
10911
+ onAfterNavigate?.();
10885
10912
  }
10886
10913
  },
10887
10914
  []
@@ -10901,10 +10928,10 @@ var createUseNotifications = (apiClient) => {
10901
10928
  []
10902
10929
  );
10903
10930
  const markAsReadAndNavigate = useCallback5(
10904
- async (id, entityType, entityId) => {
10931
+ async (id, entityType, entityId, onAfterNavigate) => {
10905
10932
  await markAsRead(id);
10906
10933
  if (entityType && entityId) {
10907
- handleNavigate(entityType, entityId);
10934
+ handleNavigate(entityType, entityId, onAfterNavigate);
10908
10935
  }
10909
10936
  },
10910
10937
  [markAsRead, handleNavigate]