@carlonicora/nextjs-jsonapi 3.9.0 → 3.10.0

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.
Files changed (100) hide show
  1. package/dist/{BlockNoteEditor-WY4LFMXQ.js → BlockNoteEditor-4UAIVF3G.js} +19 -19
  2. package/dist/{BlockNoteEditor-WY4LFMXQ.js.map → BlockNoteEditor-4UAIVF3G.js.map} +1 -1
  3. package/dist/BlockNoteEditor-K55A4FS2.css +30 -0
  4. package/dist/BlockNoteEditor-K55A4FS2.css.map +1 -0
  5. package/dist/{BlockNoteEditor-RGMU2O24.mjs → BlockNoteEditor-PFCHUFTD.mjs} +4 -4
  6. package/dist/{BlockNoteViewer-6N2GQWTI.js → BlockNoteViewer-C2UUOBAF.js} +17 -3
  7. package/dist/BlockNoteViewer-C2UUOBAF.js.map +1 -0
  8. package/dist/{BlockNoteViewer-IBQRJ3WM.mjs → BlockNoteViewer-TYLVTIUD.mjs} +17 -3
  9. package/dist/BlockNoteViewer-TYLVTIUD.mjs.map +1 -0
  10. package/dist/billing/index.css +22 -21
  11. package/dist/billing/index.css.map +1 -1
  12. package/dist/billing/index.js +398 -398
  13. package/dist/billing/index.mjs +3 -3
  14. package/dist/{chunk-DOLEXUO3.js → chunk-46CQ3RRQ.js} +1271 -1049
  15. package/dist/chunk-46CQ3RRQ.js.map +1 -0
  16. package/dist/{chunk-UYLS3LJW.js → chunk-6J2SQZ3G.js} +11 -1
  17. package/dist/chunk-6J2SQZ3G.js.map +1 -0
  18. package/dist/{chunk-2D4MFVDV.mjs → chunk-IMSIVIIC.mjs} +2 -2
  19. package/dist/{chunk-HDZ2BL6D.mjs → chunk-M5QAHSCY.mjs} +11 -1
  20. package/dist/{chunk-HDZ2BL6D.mjs.map → chunk-M5QAHSCY.mjs.map} +1 -1
  21. package/dist/{chunk-TULJCLZA.js → chunk-V6CGCARD.js} +7 -7
  22. package/dist/{chunk-TULJCLZA.js.map → chunk-V6CGCARD.js.map} +1 -1
  23. package/dist/{chunk-7PNGCZES.mjs → chunk-XZJJ4SZW.mjs} +382 -160
  24. package/dist/chunk-XZJJ4SZW.mjs.map +1 -0
  25. package/dist/client/index.css +22 -21
  26. package/dist/client/index.css.map +1 -1
  27. package/dist/client/index.js +4 -4
  28. package/dist/client/index.mjs +3 -3
  29. package/dist/components/index.css +22 -21
  30. package/dist/components/index.css.map +1 -1
  31. package/dist/components/index.d.mts +44 -13
  32. package/dist/components/index.d.ts +44 -13
  33. package/dist/components/index.js +8 -4
  34. package/dist/components/index.js.map +1 -1
  35. package/dist/components/index.mjs +7 -3
  36. package/dist/contexts/index.css +22 -21
  37. package/dist/contexts/index.css.map +1 -1
  38. package/dist/contexts/index.d.mts +11 -4
  39. package/dist/contexts/index.d.ts +11 -4
  40. package/dist/contexts/index.js +6 -4
  41. package/dist/contexts/index.js.map +1 -1
  42. package/dist/contexts/index.mjs +5 -3
  43. package/dist/core/index.d.mts +13 -0
  44. package/dist/core/index.d.ts +13 -0
  45. package/dist/core/index.js +2 -2
  46. package/dist/core/index.mjs +1 -1
  47. package/dist/features/help/index.css +22 -21
  48. package/dist/features/help/index.css.map +1 -1
  49. package/dist/features/help/index.d.mts +6 -1
  50. package/dist/features/help/index.d.ts +6 -1
  51. package/dist/features/help/index.js +39 -38
  52. package/dist/features/help/index.js.map +1 -1
  53. package/dist/features/help/index.mjs +4 -3
  54. package/dist/features/tokenusage/index.css +22 -21
  55. package/dist/features/tokenusage/index.css.map +1 -1
  56. package/dist/features/tokenusage/index.js +102 -102
  57. package/dist/features/tokenusage/index.js.map +1 -1
  58. package/dist/features/tokenusage/index.mjs +4 -4
  59. package/dist/features/tokenusage/index.mjs.map +1 -1
  60. package/dist/index.js +3 -3
  61. package/dist/index.mjs +2 -2
  62. package/dist/{onboarding.interface-Djyl9qYu.d.mts → onboarding.interface-DVUOUC4y.d.mts} +4 -1
  63. package/dist/{onboarding.interface-Djyl9qYu.d.ts → onboarding.interface-DVUOUC4y.d.ts} +4 -1
  64. package/dist/server/index.js +3 -3
  65. package/dist/server/index.mjs +1 -1
  66. package/package.json +2 -2
  67. package/src/components/containers/RoundPageContainer.tsx +2 -1
  68. package/src/components/containers/RoundPageContainerTitle.tsx +6 -1
  69. package/src/components/containers/TabsContainer.tsx +1 -0
  70. package/src/components/forms/EditorSheet.tsx +2 -1
  71. package/src/components/grids/ContentListGrid.tsx +1 -1
  72. package/src/components/navigations/MobileNavigationBar.tsx +1 -0
  73. package/src/components/tables/ContentListTable.tsx +1 -1
  74. package/src/components/tables/ContentTableSearch.tsx +1 -0
  75. package/src/components/viewers/BlockNoteViewer.tsx +13 -2
  76. package/src/components/viewers/BlockNoteViewerContainer.tsx +4 -1
  77. package/src/features/assistant/components/index.ts +2 -0
  78. package/src/features/assistant/components/parts/AssistantComposer.tsx +1 -1
  79. package/src/features/assistant/components/parts/__tests__/AssistantComposer.spec.tsx +2 -2
  80. package/src/features/assistant-action/components/ApprovalActionCard.tsx +325 -4
  81. package/src/features/assistant-action/components/__tests__/ApprovalActionCard.spec.tsx +268 -0
  82. package/src/features/assistant-action/data/AssistantAction.ts +12 -0
  83. package/src/features/assistant-action/data/AssistantActionInterface.ts +9 -0
  84. package/src/features/assistant-action/data/__tests__/AssistantAction.spec.ts +11 -0
  85. package/src/features/help/index.ts +1 -0
  86. package/src/features/onboarding/components/OnboardingCard.tsx +1 -2
  87. package/src/features/onboarding/contexts/OnboardingContext.spec.tsx +191 -0
  88. package/src/features/onboarding/contexts/OnboardingContext.tsx +176 -125
  89. package/src/features/onboarding/interfaces/onboarding.interface.ts +4 -0
  90. package/src/features/onboarding/styles/onboarding.css +25 -30
  91. package/src/features/tokenusage/components/TokenUsageReportFilterBar.tsx +1 -1
  92. package/dist/BlockNoteEditor-YOAJRPWU.css +0 -29
  93. package/dist/BlockNoteEditor-YOAJRPWU.css.map +0 -1
  94. package/dist/BlockNoteViewer-6N2GQWTI.js.map +0 -1
  95. package/dist/BlockNoteViewer-IBQRJ3WM.mjs.map +0 -1
  96. package/dist/chunk-7PNGCZES.mjs.map +0 -1
  97. package/dist/chunk-DOLEXUO3.js.map +0 -1
  98. package/dist/chunk-UYLS3LJW.js.map +0 -1
  99. /package/dist/{BlockNoteEditor-RGMU2O24.mjs.map → BlockNoteEditor-PFCHUFTD.mjs.map} +0 -0
  100. /package/dist/{chunk-2D4MFVDV.mjs.map → chunk-IMSIVIIC.mjs.map} +0 -0
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-2D4MFVDV.mjs";
23
+ } from "./chunk-IMSIVIIC.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AiConnectionService,
@@ -71,7 +71,7 @@ import {
71
71
  useIsMobile,
72
72
  validateItalianTaxCode,
73
73
  validatePartitaIva
74
- } from "./chunk-HDZ2BL6D.mjs";
74
+ } from "./chunk-M5QAHSCY.mjs";
75
75
  import {
76
76
  ENV
77
77
  } from "./chunk-BMVA2IM5.mjs";
@@ -9786,6 +9786,7 @@ function EditorSheet({
9786
9786
  render: isEdit ? /* @__PURE__ */ jsxs48(
9787
9787
  Button,
9788
9788
  {
9789
+ "data-help": "editor.edit",
9789
9790
  render: /* @__PURE__ */ jsx87("div", {}),
9790
9791
  nativeButton: false,
9791
9792
  size: "sm",
@@ -9796,7 +9797,7 @@ function EditorSheet({
9796
9797
  isLabelled && t("ui.buttons.edit")
9797
9798
  ]
9798
9799
  }
9799
- ) : /* @__PURE__ */ jsx87(Button, { render: /* @__PURE__ */ jsx87("div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("ui.buttons.create") })
9800
+ ) : /* @__PURE__ */ jsx87(Button, { "data-help": "editor.create", render: /* @__PURE__ */ jsx87("div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("ui.buttons.create") })
9800
9801
  }
9801
9802
  )
9802
9803
  )),
@@ -10370,7 +10371,7 @@ import { useRef as useRef17 } from "react";
10370
10371
  import dynamic from "next/dynamic";
10371
10372
  import React18 from "react";
10372
10373
  import { jsx as jsx90 } from "react/jsx-runtime";
10373
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-RGMU2O24.mjs"), {
10374
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-PFCHUFTD.mjs"), {
10374
10375
  ssr: false
10375
10376
  });
10376
10377
  var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -13360,9 +13361,10 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
13360
13361
 
13361
13362
  // src/features/onboarding/contexts/OnboardingContext.tsx
13362
13363
  import { createContext as createContext19, useCallback as useCallback23, useContext as useContext20, useEffect as useEffect29, useRef as useRef23, useState as useState39 } from "react";
13364
+ import { flushSync } from "react-dom";
13363
13365
  import { createRoot } from "react-dom/client";
13364
- import Shepherd from "shepherd.js";
13365
- import "shepherd.js/dist/css/shepherd.css";
13366
+ import { driver } from "driver.js";
13367
+ import "driver.js/dist/driver.css";
13366
13368
 
13367
13369
  // src/features/onboarding/components/OnboardingCard.tsx
13368
13370
  import { X as X2 } from "lucide-react";
@@ -13378,7 +13380,7 @@ function OnboardingCard({
13378
13380
  isFirst,
13379
13381
  isLast
13380
13382
  }) {
13381
- return /* @__PURE__ */ jsxs82(Card, { className: "w-[320px] relative", "data-shepherd-card": true, children: [
13383
+ return /* @__PURE__ */ jsxs82(Card, { className: "w-[320px] relative", "data-onboarding-card": true, children: [
13382
13384
  /* @__PURE__ */ jsx145(Button, { variant: "ghost", size: "icon", className: "absolute end-2 top-2", onClick: onClose, "aria-label": labels.close, children: /* @__PURE__ */ jsx145(X2, { className: "h-4 w-4" }) }),
13383
13385
  /* @__PURE__ */ jsxs82(CardHeader, { children: [
13384
13386
  /* @__PURE__ */ jsx145(CardTitle, { className: "flex items-center gap-2", children: step.title }),
@@ -13408,150 +13410,168 @@ var DEFAULT_ONBOARDING_LABELS = {
13408
13410
  // src/features/onboarding/contexts/OnboardingContext.tsx
13409
13411
  import { jsx as jsx146 } from "react/jsx-runtime";
13410
13412
  var OnboardingContext = createContext19(null);
13413
+ function mapOnboardingSide(side) {
13414
+ if (!side) return { side: "bottom", align: "center" };
13415
+ const [s, a] = side.split("-");
13416
+ return { side: s, align: a ?? "center" };
13417
+ }
13418
+ __name(mapOnboardingSide, "mapOnboardingSide");
13419
+ function resolveVisibleElement(selector) {
13420
+ return (() => {
13421
+ const element = document.querySelector(selector);
13422
+ if (!element) return void 0;
13423
+ if (element.getClientRects().length === 0) return void 0;
13424
+ return element;
13425
+ });
13426
+ }
13427
+ __name(resolveVisibleElement, "resolveVisibleElement");
13411
13428
  function OnboardingProvider({
13412
13429
  children,
13413
13430
  tours = [],
13414
13431
  tourPaths: _tourPaths = {},
13415
13432
  labels = DEFAULT_ONBOARDING_LABELS,
13416
13433
  renderCard,
13417
- zIndex: _zIndex = 9999
13434
+ zIndex: _zIndex = 9999,
13435
+ onTourEnd
13418
13436
  }) {
13419
13437
  const [isTourActive, setIsTourActive] = useState39(false);
13420
13438
  const [activeTourId, setActiveTourId] = useState39(null);
13421
13439
  const [currentStepIndex, setCurrentStepIndex] = useState39(0);
13422
13440
  const [totalSteps, setTotalSteps] = useState39(0);
13423
- const tourRef = useRef23(null);
13441
+ const driverRef = useRef23(null);
13424
13442
  const rootsRef = useRef23(/* @__PURE__ */ new Map());
13443
+ const endReasonRef = useRef23("dismissed");
13444
+ const activeTourIdRef = useRef23(null);
13445
+ const unmountRoot = /* @__PURE__ */ __name((root) => setTimeout(() => root.unmount(), 0), "unmountRoot");
13425
13446
  const cleanupRoots = useCallback23(() => {
13426
- rootsRef.current.forEach((root) => {
13427
- try {
13428
- root.unmount();
13429
- } catch (_e) {
13430
- }
13431
- });
13447
+ rootsRef.current.forEach((root) => unmountRoot(root));
13432
13448
  rootsRef.current.clear();
13433
13449
  }, []);
13434
- const closeTour = useCallback23(() => {
13435
- if (tourRef.current) {
13436
- tourRef.current.cancel();
13437
- tourRef.current = null;
13438
- }
13439
- cleanupRoots();
13450
+ const resetState = useCallback23(() => {
13440
13451
  setIsTourActive(false);
13441
13452
  setActiveTourId(null);
13442
13453
  setCurrentStepIndex(0);
13443
13454
  setTotalSteps(0);
13444
- }, [cleanupRoots]);
13445
- const nextStep = useCallback23(() => {
13446
- if (tourRef.current) {
13447
- tourRef.current.next();
13448
- }
13449
- }, []);
13450
- const previousStep = useCallback23(() => {
13451
- if (tourRef.current) {
13452
- tourRef.current.back();
13453
- }
13455
+ driverRef.current = null;
13456
+ activeTourIdRef.current = null;
13454
13457
  }, []);
13455
- const goToStep = useCallback23((index) => {
13456
- if (tourRef.current) {
13457
- tourRef.current.show(index);
13458
+ const teardown = useCallback23(
13459
+ (reason) => {
13460
+ if (!driverRef.current) return;
13461
+ const id = activeTourIdRef.current;
13462
+ cleanupRoots();
13463
+ resetState();
13464
+ if (id) onTourEnd?.(id, reason);
13465
+ },
13466
+ [cleanupRoots, resetState, onTourEnd]
13467
+ );
13468
+ const closeTour = useCallback23(() => {
13469
+ if (driverRef.current) {
13470
+ driverRef.current.destroy();
13471
+ teardown("dismissed");
13472
+ return;
13458
13473
  }
13459
- }, []);
13474
+ cleanupRoots();
13475
+ resetState();
13476
+ }, [cleanupRoots, resetState, teardown]);
13477
+ const nextStep = useCallback23(() => driverRef.current?.moveNext(), []);
13478
+ const previousStep = useCallback23(() => driverRef.current?.movePrevious(), []);
13479
+ const goToStep = useCallback23((index) => driverRef.current?.moveTo(index), []);
13460
13480
  const startTour = useCallback23(
13461
13481
  (tourId, steps) => {
13462
13482
  if (typeof window === "undefined") return;
13463
- if (tourRef.current) {
13464
- closeTour();
13465
- }
13466
- let tourSteps = steps;
13467
- if (!tourSteps) {
13468
- const tour2 = tours.find((t) => t.id === tourId);
13469
- tourSteps = tour2?.steps;
13470
- }
13483
+ if (driverRef.current) closeTour();
13484
+ const tourSteps = steps ?? tours.find((t) => t.id === tourId)?.steps;
13471
13485
  if (!tourSteps || tourSteps.length === 0) {
13472
13486
  console.warn(`No steps found for tour: ${tourId}`);
13473
13487
  return;
13474
13488
  }
13475
13489
  setTotalSteps(tourSteps.length);
13476
13490
  setActiveTourId(tourId);
13477
- const tour = new Shepherd.Tour({
13478
- useModalOverlay: true,
13479
- defaultStepOptions: {
13480
- classes: "shepherd-theme-custom",
13481
- scrollTo: { behavior: "smooth", block: "center" },
13482
- cancelIcon: { enabled: false }
13483
- }
13484
- });
13485
- tour.on("show", () => setIsTourActive(true));
13486
- tour.on("cancel", () => {
13487
- cleanupRoots();
13488
- setIsTourActive(false);
13489
- setActiveTourId(null);
13490
- setCurrentStepIndex(0);
13491
- setTotalSteps(0);
13492
- tourRef.current = null;
13493
- });
13494
- tour.on("complete", () => {
13495
- cleanupRoots();
13496
- setIsTourActive(false);
13497
- setActiveTourId(null);
13498
- setCurrentStepIndex(0);
13499
- setTotalSteps(0);
13500
- tourRef.current = null;
13491
+ activeTourIdRef.current = tourId;
13492
+ endReasonRef.current = "dismissed";
13493
+ const move = /* @__PURE__ */ __name((direction, from) => {
13494
+ const target = tourSteps[direction === "next" ? from + 1 : from - 1];
13495
+ const go = /* @__PURE__ */ __name(() => direction === "next" ? driverRef.current?.moveNext() : driverRef.current?.movePrevious(), "go");
13496
+ if (target?.showDelay) setTimeout(go, target.showDelay);
13497
+ else go();
13498
+ }, "move");
13499
+ const end = /* @__PURE__ */ __name((reason) => {
13500
+ endReasonRef.current = reason;
13501
+ driverRef.current?.destroy();
13502
+ teardown(reason);
13503
+ }, "end");
13504
+ const driveSteps = tourSteps.map((stepConfig, index) => {
13505
+ const { side, align } = mapOnboardingSide(stepConfig.side);
13506
+ return {
13507
+ element: stepConfig.selector ? resolveVisibleElement(stepConfig.selector) : void 0,
13508
+ disableActiveInteraction: !(stepConfig.canClickTarget ?? false),
13509
+ popover: {
13510
+ side,
13511
+ align,
13512
+ showButtons: [],
13513
+ popoverClass: ["onboarding-popover", stepConfig.className].filter(Boolean).join(" "),
13514
+ onPopoverRender: /* @__PURE__ */ __name((popover) => {
13515
+ popover.wrapper.querySelectorAll("[data-onboarding-root]").forEach((n) => n.remove());
13516
+ const container = document.createElement("div");
13517
+ container.setAttribute("data-onboarding-root", "");
13518
+ const root = createRoot(container);
13519
+ const prev = rootsRef.current.get(index);
13520
+ if (prev) unmountRoot(prev);
13521
+ rootsRef.current.set(index, root);
13522
+ const cardProps = {
13523
+ step: stepConfig,
13524
+ currentIndex: index,
13525
+ totalSteps: tourSteps.length,
13526
+ labels,
13527
+ onNext: /* @__PURE__ */ __name(() => move("next", index), "onNext"),
13528
+ onPrevious: /* @__PURE__ */ __name(() => move("previous", index), "onPrevious"),
13529
+ onClose: /* @__PURE__ */ __name(() => end(index === tourSteps.length - 1 ? "finished" : "skipped"), "onClose"),
13530
+ onSkip: /* @__PURE__ */ __name(() => end("skipped"), "onSkip"),
13531
+ isFirst: index === 0,
13532
+ isLast: index === tourSteps.length - 1
13533
+ };
13534
+ flushSync(() => {
13535
+ root.render(renderCard ? renderCard(cardProps) : /* @__PURE__ */ jsx146(OnboardingCard, { ...cardProps }));
13536
+ });
13537
+ popover.wrapper.appendChild(container);
13538
+ }, "onPopoverRender")
13539
+ },
13540
+ onHighlightStarted: /* @__PURE__ */ __name(() => {
13541
+ setIsTourActive(true);
13542
+ setCurrentStepIndex(index);
13543
+ stepConfig.onShow?.();
13544
+ }, "onHighlightStarted"),
13545
+ onDeselected: /* @__PURE__ */ __name(() => {
13546
+ stepConfig.onHide?.();
13547
+ const root = rootsRef.current.get(index);
13548
+ if (root) {
13549
+ rootsRef.current.delete(index);
13550
+ unmountRoot(root);
13551
+ }
13552
+ }, "onDeselected")
13553
+ };
13501
13554
  });
13502
- tourSteps.forEach((stepConfig, index) => {
13503
- const stepId = stepConfig.id || `step-${index}`;
13504
- tour.addStep({
13505
- id: stepId,
13506
- attachTo: stepConfig.selector ? { element: stepConfig.selector, on: stepConfig.side || "bottom" } : void 0,
13507
- arrow: true,
13508
- // Use text callback to return DOM element with React content
13509
- text: /* @__PURE__ */ __name(() => {
13510
- const container = document.createElement("div");
13511
- const root = createRoot(container);
13512
- rootsRef.current.set(stepId, root);
13513
- const cardProps = {
13514
- step: stepConfig,
13515
- currentIndex: index,
13516
- totalSteps: tourSteps.length,
13517
- labels,
13518
- onNext: /* @__PURE__ */ __name(() => tour.next(), "onNext"),
13519
- onPrevious: /* @__PURE__ */ __name(() => tour.back(), "onPrevious"),
13520
- onClose: /* @__PURE__ */ __name(() => tour.cancel(), "onClose"),
13521
- onSkip: /* @__PURE__ */ __name(() => tour.cancel(), "onSkip"),
13522
- isFirst: index === 0,
13523
- isLast: index === tourSteps.length - 1
13524
- };
13525
- root.render(renderCard ? renderCard(cardProps) : /* @__PURE__ */ jsx146(OnboardingCard, { ...cardProps }));
13526
- return container;
13527
- }, "text"),
13528
- buttons: [],
13529
- // Empty - our card handles navigation
13530
- beforeShowPromise: stepConfig.showDelay ? () => new Promise((resolve) => setTimeout(resolve, stepConfig.showDelay)) : void 0,
13531
- canClickTarget: stepConfig.canClickTarget ?? false,
13532
- modalOverlayOpeningPadding: 8,
13533
- modalOverlayOpeningRadius: 8,
13534
- when: {
13535
- show: /* @__PURE__ */ __name(() => {
13536
- setCurrentStepIndex(index);
13537
- stepConfig.onShow?.();
13538
- }, "show"),
13539
- hide: /* @__PURE__ */ __name(() => {
13540
- stepConfig.onHide?.();
13541
- }, "hide")
13542
- }
13543
- });
13555
+ const instance = driver({
13556
+ steps: driveSteps,
13557
+ animate: true,
13558
+ allowClose: true,
13559
+ overlayOpacity: 0.75,
13560
+ stagePadding: 8,
13561
+ stageRadius: 8,
13562
+ smoothScroll: true,
13563
+ skipMissingElement: true,
13564
+ showButtons: [],
13565
+ onDestroyed: /* @__PURE__ */ __name(() => teardown(endReasonRef.current), "onDestroyed")
13544
13566
  });
13545
- tourRef.current = tour;
13546
- tour.start();
13567
+ driverRef.current = instance;
13568
+ instance.drive();
13547
13569
  },
13548
- [tours, labels, renderCard, closeTour, cleanupRoots]
13570
+ [tours, labels, renderCard, closeTour, teardown]
13549
13571
  );
13550
13572
  useEffect29(() => {
13551
13573
  return () => {
13552
- if (tourRef.current) {
13553
- tourRef.current.cancel();
13554
- }
13574
+ driverRef.current?.destroy();
13555
13575
  cleanupRoots();
13556
13576
  };
13557
13577
  }, [cleanupRoots]);
@@ -13571,9 +13591,7 @@ function OnboardingProvider({
13571
13591
  __name(OnboardingProvider, "OnboardingProvider");
13572
13592
  function useOnboarding() {
13573
13593
  const context = useContext20(OnboardingContext);
13574
- if (!context) {
13575
- throw new Error("useOnboarding must be used within an OnboardingProvider");
13576
- }
13594
+ if (!context) throw new Error("useOnboarding must be used within an OnboardingProvider");
13577
13595
  return context;
13578
13596
  }
13579
13597
  __name(useOnboarding, "useOnboarding");
@@ -15008,6 +15026,7 @@ function MobileNavigationBar({ className } = {}) {
15008
15026
  {
15009
15027
  "aria-label": "Primary",
15010
15028
  "data-testid": "mobile-navigation-bar",
15029
+ "data-help": "shell.mobile-nav",
15011
15030
  className: cn("bg-sidebar flex w-full shrink-0 flex-row items-stretch rounded-lg border", className),
15012
15031
  children: items.map((item) => {
15013
15032
  const active = item.href ? isActiveHref(pathname, item.href) : false;
@@ -15318,6 +15337,7 @@ function RoundPageContainerTitle({
15318
15337
  /* @__PURE__ */ jsx166(TooltipTrigger, { children: /* @__PURE__ */ jsx166(
15319
15338
  Button,
15320
15339
  {
15340
+ "data-help": "page.details",
15321
15341
  render: /* @__PURE__ */ jsx166("div", {}),
15322
15342
  nativeButton: false,
15323
15343
  variant: showDetails ? `ghost` : `default`,
@@ -15334,7 +15354,15 @@ function RoundPageContainerTitle({
15334
15354
  ] })
15335
15355
  ] })
15336
15356
  ] }),
15337
- title.actionBar && /* @__PURE__ */ jsx166("div", { "data-testid": "round-page-action-bar", className: "flex w-full items-center gap-x-2 border-t px-4 py-2", children: /* @__PURE__ */ jsx166(ActionBarProvider, { value: true, children: title.actionBar }) })
15357
+ title.actionBar && /* @__PURE__ */ jsx166(
15358
+ "div",
15359
+ {
15360
+ "data-testid": "round-page-action-bar",
15361
+ "data-help": "page.action-bar",
15362
+ className: "flex w-full items-center gap-x-2 border-t px-4 py-2",
15363
+ children: /* @__PURE__ */ jsx166(ActionBarProvider, { value: true, children: title.actionBar })
15364
+ }
15365
+ )
15338
15366
  ] });
15339
15367
  }
15340
15368
  __name(RoundPageContainerTitle, "RoundPageContainerTitle");
@@ -15538,6 +15566,7 @@ function RoundPageContainer({
15538
15566
  "aside",
15539
15567
  {
15540
15568
  "data-testid": "round-page-rail",
15569
+ "data-help": "page.rail",
15541
15570
  className: cn(
15542
15571
  `hidden shrink-0 border-e p-4 md:flex md:w-56 md:flex-col`,
15543
15572
  isFixed && `md:overflow-y-auto`
@@ -15644,7 +15673,7 @@ function RoundPageContainer({
15644
15673
  /* @__PURE__ */ jsx167(SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ jsx167(SelectItem, { value: tabValue(tab), children: tab.contentLabel ?? tab.label }, tab.label)) })
15645
15674
  ]
15646
15675
  }
15647
- ) }) : /* @__PURE__ */ jsx167("div", { className: "p-4", children: /* @__PURE__ */ jsx167(TabsList, { children: tabs.map((tab) => /* @__PURE__ */ jsx167(TabsTrigger, { value: tabValue(tab), className: "px-4", children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
15676
+ ) }) : /* @__PURE__ */ jsx167("div", { className: "p-4", children: /* @__PURE__ */ jsx167(TabsList, { "data-help": "page.tabs", children: tabs.map((tab) => /* @__PURE__ */ jsx167(TabsTrigger, { value: tabValue(tab), className: "px-4", children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
15648
15677
  /* @__PURE__ */ jsx167(
15649
15678
  "div",
15650
15679
  {
@@ -15745,6 +15774,7 @@ function TabsContainer({
15745
15774
  /* @__PURE__ */ jsx168(
15746
15775
  TabsList,
15747
15776
  {
15777
+ "data-help": "page.tabs",
15748
15778
  className: cn(
15749
15779
  `${style ? `my-4 flex w-full justify-start rounded-none border-b bg-transparent pb-0` : ``}`,
15750
15780
  tabsListClassName
@@ -16045,7 +16075,7 @@ __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMe
16045
16075
  import dynamic2 from "next/dynamic";
16046
16076
  import React29 from "react";
16047
16077
  import { jsx as jsx173 } from "react/jsx-runtime";
16048
- var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-IBQRJ3WM.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
16078
+ var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-TYLVTIUD.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
16049
16079
  var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
16050
16080
  return /* @__PURE__ */ jsx173(BlockNoteViewer, { ...props });
16051
16081
  }, "ViewerContainer"));
@@ -17304,6 +17334,7 @@ function ContentTableSearch({ data }) {
17304
17334
  Button,
17305
17335
  {
17306
17336
  "data-testid": "content-table-search-trigger",
17337
+ "data-help": "list.search",
17307
17338
  variant: "ghost",
17308
17339
  size: "icon-sm",
17309
17340
  className: "text-muted-foreground hover:text-foreground absolute top-0 start-0",
@@ -17443,7 +17474,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
17443
17474
  }, [props.groupBy, props.groupOrder, rowModel]);
17444
17475
  const showFooter = !props.hidePagination && !!(data.next || data.previous);
17445
17476
  const titleIsLarge = (props.titleSize ?? (fullWidth ? `lg` : `sm`)) === `lg`;
17446
- return /* @__PURE__ */ jsx188("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx188("div", { className: cn(`overflow-clip`, fullWidth ? `` : `rounded-md border`), children: /* @__PURE__ */ jsxs103(Table, { children: [
17477
+ return /* @__PURE__ */ jsx188("div", { "data-help": "list.table", className: "flex w-full flex-col", children: /* @__PURE__ */ jsx188("div", { className: cn(`overflow-clip`, fullWidth ? `` : `rounded-md border`), children: /* @__PURE__ */ jsxs103(Table, { children: [
17447
17478
  /* @__PURE__ */ jsxs103(TableHeader, { className: "bg-muted font-semibold", children: [
17448
17479
  props.title && /* @__PURE__ */ jsx188(TableRow, { children: /* @__PURE__ */ jsx188(
17449
17480
  TableHead,
@@ -17561,7 +17592,7 @@ function ContentListGrid(props) {
17561
17592
  observer.observe(sentinelRef.current);
17562
17593
  return () => observer.disconnect();
17563
17594
  }, [data.next]);
17564
- return /* @__PURE__ */ jsx189("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsxs104("div", { className: cn("overflow-clip", fullWidth ? "" : "rounded-md border"), children: [
17595
+ return /* @__PURE__ */ jsx189("div", { "data-help": "list.grid", className: "flex w-full flex-col", children: /* @__PURE__ */ jsxs104("div", { className: cn("overflow-clip", fullWidth ? "" : "rounded-md border"), children: [
17565
17596
  props.title !== void 0 && /* @__PURE__ */ jsxs104("div", { className: "bg-card text-primary flex items-center justify-between gap-x-2 rounded-t-lg border-b p-4 font-bold", children: [
17566
17597
  /* @__PURE__ */ jsx189("div", { className: "w-full", children: /* @__PURE__ */ jsxs104(
17567
17598
  "div",
@@ -21207,7 +21238,7 @@ function AssistantComposer({ onSend, disabled, value: controlled, onValueChange
21207
21238
  /* @__PURE__ */ jsxs138(Button, { onClick: submit, disabled: !canSend, size: "sm", className: "h-8", children: [
21208
21239
  /* @__PURE__ */ jsx238(ArrowUp, { className: "me-1 h-4 w-4" }),
21209
21240
  " ",
21210
- t("ui.buttons.save")
21241
+ t("features.assistant.send")
21211
21242
  ] })
21212
21243
  ] }),
21213
21244
  /* @__PURE__ */ jsx238("div", { className: "text-muted-foreground text-end text-xs", children: t("features.assistant.keyboard_hint") })
@@ -22212,7 +22243,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
22212
22243
  // src/features/assistant-action/components/ApprovalActionCard.tsx
22213
22244
  import { ShieldAlert as ShieldAlert2 } from "lucide-react";
22214
22245
  import { useTranslations as useTranslations109 } from "next-intl";
22215
- import { useEffect as useEffect69, useState as useState92 } from "react";
22246
+ import { Fragment as Fragment52, useEffect as useEffect69, useMemo as useMemo44, useState as useState92 } from "react";
22216
22247
  import { jsx as jsx256, jsxs as jsxs153 } from "react/jsx-runtime";
22217
22248
  var STATUS_VARIANT = {
22218
22249
  pending: "softBlue",
@@ -22230,10 +22261,148 @@ var STATUS_LABEL_KEY = {
22230
22261
  failed: "features.assistant.approval.status.failed",
22231
22262
  expired: "features.assistant.approval.status.expired"
22232
22263
  };
22233
- function ApprovalActionCard({ actionId, summary, onResolved }) {
22264
+ function humaniseType(type) {
22265
+ const singular = type.endsWith("s") ? type.slice(0, -1) : type;
22266
+ if (singular.length <= 3) return singular.toUpperCase();
22267
+ return singular.charAt(0).toUpperCase() + singular.slice(1);
22268
+ }
22269
+ __name(humaniseType, "humaniseType");
22270
+ function humaniseKey(key) {
22271
+ const words = key.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
22272
+ return words.charAt(0).toUpperCase() + words.slice(1);
22273
+ }
22274
+ __name(humaniseKey, "humaniseKey");
22275
+ function blockNoteText(blocks) {
22276
+ const lines = [];
22277
+ const walk = /* @__PURE__ */ __name((nodes) => {
22278
+ for (const node of nodes) {
22279
+ if (!node || typeof node !== "object") continue;
22280
+ const block = node;
22281
+ const runs = Array.isArray(block.content) ? block.content.map(
22282
+ (run) => run && typeof run === "object" && typeof run.text === "string" ? run.text : ""
22283
+ ).join("") : "";
22284
+ if (runs.trim()) lines.push(runs);
22285
+ if (Array.isArray(block.children)) walk(block.children);
22286
+ }
22287
+ }, "walk");
22288
+ walk(blocks);
22289
+ return lines.join("\n");
22290
+ }
22291
+ __name(blockNoteText, "blockNoteText");
22292
+ function asBlockNoteDocument(value) {
22293
+ if (!value.trimStart().startsWith("[")) return void 0;
22294
+ try {
22295
+ const parsed = JSON.parse(value);
22296
+ if (!Array.isArray(parsed) || parsed.length === 0) return void 0;
22297
+ const everyBlock = parsed.every(
22298
+ (block) => !!block && typeof block === "object" && typeof block.type === "string"
22299
+ );
22300
+ return everyBlock ? parsed : void 0;
22301
+ } catch {
22302
+ return void 0;
22303
+ }
22304
+ }
22305
+ __name(asBlockNoteDocument, "asBlockNoteDocument");
22306
+ function formatAttribute(value, yes, no) {
22307
+ if (value === null || value === void 0) return void 0;
22308
+ if (typeof value === "boolean") return value ? yes : no;
22309
+ if (typeof value === "number") return Number.isFinite(value) ? String(value) : void 0;
22310
+ if (Array.isArray(value)) {
22311
+ const joined = value.map(
22312
+ (entry) => entry === null || entry === void 0 ? "" : typeof entry === "object" ? JSON.stringify(entry) : String(entry)
22313
+ ).filter((entry) => entry !== "").join(", ");
22314
+ return joined === "" ? void 0 : joined;
22315
+ }
22316
+ if (typeof value === "string") {
22317
+ if (value.trim() === "") return void 0;
22318
+ const document2 = asBlockNoteDocument(value);
22319
+ if (!document2) return value;
22320
+ const text = blockNoteText(document2);
22321
+ return text.trim() === "" ? void 0 : text;
22322
+ }
22323
+ if (typeof value === "object") {
22324
+ const serialised = JSON.stringify(value);
22325
+ return serialised === "{}" ? void 0 : serialised;
22326
+ }
22327
+ return void 0;
22328
+ }
22329
+ __name(formatAttribute, "formatAttribute");
22330
+ function formatRefs(refs) {
22331
+ const labels = refs.map((ref) => ref.label).filter((label) => label.trim() !== "");
22332
+ return labels.length ? labels.join(", ") : void 0;
22333
+ }
22334
+ __name(formatRefs, "formatRefs");
22335
+ function asRef(value) {
22336
+ if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
22337
+ const { id, type, label } = value;
22338
+ if (typeof label !== "string") return void 0;
22339
+ return {
22340
+ id: typeof id === "string" ? id : "",
22341
+ type: typeof type === "string" ? type : "",
22342
+ label
22343
+ };
22344
+ }
22345
+ __name(asRef, "asRef");
22346
+ function asRefs(value) {
22347
+ if (!Array.isArray(value)) return [];
22348
+ return value.flatMap((entry) => {
22349
+ const ref = asRef(entry);
22350
+ return ref ? [ref] : [];
22351
+ });
22352
+ }
22353
+ __name(asRefs, "asRefs");
22354
+ function parseOperatorProposal(proposal) {
22355
+ if (!proposal) return void 0;
22356
+ let parsed;
22357
+ try {
22358
+ parsed = JSON.parse(proposal);
22359
+ } catch {
22360
+ return void 0;
22361
+ }
22362
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
22363
+ const payload = parsed;
22364
+ const attributes = payload.attributes && typeof payload.attributes === "object" && !Array.isArray(payload.attributes) ? payload.attributes : void 0;
22365
+ const relationships = {};
22366
+ if (payload.relationships && typeof payload.relationships === "object" && !Array.isArray(payload.relationships)) {
22367
+ for (const [key, value] of Object.entries(payload.relationships)) {
22368
+ relationships[key] = asRefs(value);
22369
+ }
22370
+ }
22371
+ return {
22372
+ type: typeof payload.type === "string" ? payload.type : "",
22373
+ target: asRef(payload.target),
22374
+ attributes,
22375
+ relationships,
22376
+ relationship: typeof payload.relationship === "string" ? payload.relationship : void 0,
22377
+ targets: asRefs(payload.targets)
22378
+ };
22379
+ }
22380
+ __name(parseOperatorProposal, "parseOperatorProposal");
22381
+ function parseLegacyProposal(toolArgs) {
22382
+ if (!toolArgs) return void 0;
22383
+ let parsed;
22384
+ try {
22385
+ parsed = JSON.parse(toolArgs);
22386
+ } catch {
22387
+ return void 0;
22388
+ }
22389
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
22390
+ const payload = parsed;
22391
+ const attributes = payload.attributes ?? payload.fields;
22392
+ if (!attributes || typeof attributes !== "object" || Array.isArray(attributes)) return void 0;
22393
+ return {
22394
+ type: typeof payload.type === "string" ? payload.type : "",
22395
+ attributes
22396
+ };
22397
+ }
22398
+ __name(parseLegacyProposal, "parseLegacyProposal");
22399
+ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipKeys }) {
22234
22400
  const t = useTranslations109();
22235
22401
  const [status, setStatus] = useState92(void 0);
22236
22402
  const [actionSummary, setActionSummary] = useState92(void 0);
22403
+ const [toolName, setToolName] = useState92(void 0);
22404
+ const [toolArgs, setToolArgs] = useState92(void 0);
22405
+ const [actionProposal, setActionProposal] = useState92(void 0);
22237
22406
  const [busy, setBusy] = useState92(false);
22238
22407
  const [failed, setFailed] = useState92(false);
22239
22408
  useEffect69(() => {
@@ -22244,6 +22413,9 @@ function ApprovalActionCard({ actionId, summary, onResolved }) {
22244
22413
  if (cancelled || !action) return;
22245
22414
  setStatus(action.status);
22246
22415
  setActionSummary(action.summary);
22416
+ setToolName(action.toolName);
22417
+ setToolArgs(action.toolArgs);
22418
+ setActionProposal(action.proposal);
22247
22419
  } catch (error) {
22248
22420
  console.error(`ApprovalActionCard: failed to fetch assistant action ${actionId}`, error);
22249
22421
  if (!cancelled) setFailed(true);
@@ -22253,6 +22425,45 @@ function ApprovalActionCard({ actionId, summary, onResolved }) {
22253
22425
  cancelled = true;
22254
22426
  };
22255
22427
  }, [actionId]);
22428
+ const presented = useMemo44(() => parseOperatorProposal(actionProposal), [actionProposal]);
22429
+ const legacy = useMemo44(() => presented ? void 0 : parseLegacyProposal(toolArgs), [presented, toolArgs]);
22430
+ const isUpdate = toolName === "update_entity";
22431
+ const entityLabel = humaniseType(presented?.type ?? legacy?.type ?? "");
22432
+ const targetLabel = presented?.target?.label ?? "";
22433
+ const rows = useMemo44(() => {
22434
+ const yes = t("features.assistant.approval.proposal.yes");
22435
+ const no = t("features.assistant.approval.proposal.no");
22436
+ const attributes = presented?.attributes ?? legacy?.attributes;
22437
+ const attributeRows = Object.entries(attributes ?? {}).flatMap(([key, value]) => {
22438
+ const text = formatAttribute(value, yes, no);
22439
+ return text === void 0 ? [] : [{ key: `attribute:${key}`, label: humaniseKey(key), value: text }];
22440
+ });
22441
+ if (!presented) return attributeRows;
22442
+ const hidden = new Set(hiddenRelationshipKeys ?? []);
22443
+ const relationshipRows = Object.entries(presented.relationships ?? {}).flatMap(([key, refs]) => {
22444
+ if (hidden.has(key)) return [];
22445
+ const text = formatRefs(refs);
22446
+ return text === void 0 ? [] : [{ key: `relationship:${key}`, label: humaniseKey(key), value: text }];
22447
+ });
22448
+ const linkRows = [];
22449
+ if (presented.relationship) {
22450
+ linkRows.push({
22451
+ key: "link:relationship",
22452
+ label: t("features.assistant.approval.proposal.relationship"),
22453
+ value: humaniseKey(presented.relationship)
22454
+ });
22455
+ }
22456
+ const targetsText = formatRefs(presented.targets ?? []);
22457
+ if (targetsText !== void 0) {
22458
+ linkRows.push({
22459
+ key: "link:records",
22460
+ label: t("features.assistant.approval.proposal.records"),
22461
+ value: targetsText
22462
+ });
22463
+ }
22464
+ return [...attributeRows, ...relationshipRows, ...linkRows];
22465
+ }, [presented, legacy, t, hiddenRelationshipKeys]);
22466
+ const hasProposal = rows.length > 0;
22256
22467
  const actionable = status === "pending" && !busy && !failed;
22257
22468
  const resolve = /* @__PURE__ */ __name(async (kind) => {
22258
22469
  if (!actionable) return;
@@ -22275,6 +22486,16 @@ function ApprovalActionCard({ actionId, summary, onResolved }) {
22275
22486
  status && status !== "pending" && /* @__PURE__ */ jsx256(Badge, { variant: STATUS_VARIANT[status], className: "ms-auto tracking-normal normal-case", children: t(STATUS_LABEL_KEY[status]) })
22276
22487
  ] }),
22277
22488
  /* @__PURE__ */ jsx256("div", { className: "text-foreground text-sm leading-relaxed", children: actionSummary ?? summary }),
22489
+ hasProposal && /* @__PURE__ */ jsxs153("div", { className: "border-border/60 flex flex-col gap-2 rounded-lg border border-dashed p-3", children: [
22490
+ /* @__PURE__ */ jsxs153(MicroLabel, { className: "text-muted-foreground flex flex-wrap items-baseline gap-x-2", children: [
22491
+ /* @__PURE__ */ jsx256("span", { children: isUpdate ? t("features.assistant.approval.proposal.updateHeading", { entity: entityLabel }) : t("features.assistant.approval.proposal.heading", { entity: entityLabel }) }),
22492
+ targetLabel !== "" && /* @__PURE__ */ jsx256("span", { className: "text-foreground tracking-normal normal-case", children: targetLabel })
22493
+ ] }),
22494
+ /* @__PURE__ */ jsx256("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-1.5 sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)]", children: rows.map((row) => /* @__PURE__ */ jsxs153(Fragment52, { children: [
22495
+ /* @__PURE__ */ jsx256("dt", { className: "text-muted-foreground text-xs leading-relaxed break-words sm:text-sm", children: row.label }),
22496
+ /* @__PURE__ */ jsx256("dd", { className: "text-foreground text-sm leading-relaxed break-words whitespace-pre-wrap", children: row.value })
22497
+ ] }, row.key)) })
22498
+ ] }),
22278
22499
  failed && /* @__PURE__ */ jsx256("div", { role: "alert", className: "text-destructive text-xs/relaxed", children: t("features.assistant.approval.error") }),
22279
22500
  /* @__PURE__ */ jsxs153("div", { className: "flex items-center gap-2 pt-1", children: [
22280
22501
  /* @__PURE__ */ jsx256(Button, { size: "sm", disabled: !actionable, onClick: () => void resolve("approve"), children: t("features.assistant.approval.approve") }),
@@ -22338,7 +22559,7 @@ import { useTranslations as useTranslations111 } from "next-intl";
22338
22559
  // src/features/notification/components/lists/NotificationsList.tsx
22339
22560
  import { ArchiveIcon } from "lucide-react";
22340
22561
  import { useTranslations as useTranslations110 } from "next-intl";
22341
- import { Fragment as Fragment52, jsx as jsx259, jsxs as jsxs155 } from "react/jsx-runtime";
22562
+ import { Fragment as Fragment53, jsx as jsx259, jsxs as jsxs155 } from "react/jsx-runtime";
22342
22563
  function NotificationsList({ archived }) {
22343
22564
  const t = useTranslations110();
22344
22565
  const generateUrl = usePageUrlGenerator();
@@ -22372,7 +22593,7 @@ function NotificationsList({ archived }) {
22372
22593
  /* @__PURE__ */ jsx259("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
22373
22594
  ] }),
22374
22595
  /* @__PURE__ */ jsxs155("div", { className: "flex flex-row items-center", children: [
22375
- notificationData.url ? /* @__PURE__ */ jsx259(Link, { href: notificationData.url, children: /* @__PURE__ */ jsx259(Button, { variant: `outline`, size: `sm`, onClick: (e) => e.stopPropagation(), children: t(`notification.${notification.notificationType}.buttons.action`) }) }) : /* @__PURE__ */ jsx259(Fragment52, {}),
22596
+ notificationData.url ? /* @__PURE__ */ jsx259(Link, { href: notificationData.url, children: /* @__PURE__ */ jsx259(Button, { variant: `outline`, size: `sm`, onClick: (e) => e.stopPropagation(), children: t(`notification.${notification.notificationType}.buttons.action`) }) }) : /* @__PURE__ */ jsx259(Fragment53, {}),
22376
22597
  !archived && /* @__PURE__ */ jsxs155(Tooltip2, { children: [
22377
22598
  /* @__PURE__ */ jsx259(TooltipTrigger, { children: /* @__PURE__ */ jsx259(
22378
22599
  Button,
@@ -22430,7 +22651,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
22430
22651
  // src/features/notification/components/modals/NotificationModal.tsx
22431
22652
  import { BellIcon } from "lucide-react";
22432
22653
  import { useTranslations as useTranslations112 } from "next-intl";
22433
- import { Fragment as Fragment53, useCallback as useCallback44, useEffect as useEffect70, useMemo as useMemo44, useRef as useRef38, useState as useState93 } from "react";
22654
+ import { Fragment as Fragment54, useCallback as useCallback44, useEffect as useEffect70, useMemo as useMemo45, useRef as useRef38, useState as useState93 } from "react";
22434
22655
  import { jsx as jsx261, jsxs as jsxs157 } from "react/jsx-runtime";
22435
22656
  function NotificationModalContent({ isOpen, setIsOpen }) {
22436
22657
  const _instanceId = useRef38(Math.random().toString(36).substr(2, 9));
@@ -22474,7 +22695,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
22474
22695
  }
22475
22696
  return !breaker.isOpen;
22476
22697
  }, []);
22477
- const { unreadCount, unreadIds } = useMemo44(() => {
22698
+ const { unreadCount, unreadIds } = useMemo45(() => {
22478
22699
  const unreadNotifications2 = notifications.filter((notif) => !notif.isRead);
22479
22700
  return {
22480
22701
  unreadCount: unreadNotifications2.length,
@@ -22581,7 +22802,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
22581
22802
  ] })
22582
22803
  ] }),
22583
22804
  /* @__PURE__ */ jsx261(Separator, {}),
22584
- /* @__PURE__ */ jsx261(ScrollArea, { className: "h-96", children: notifications.length > 0 ? notifications.map((notification) => /* @__PURE__ */ jsx261(Fragment53, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) : /* @__PURE__ */ jsx261("div", { className: "text-muted-foreground p-4 text-center text-sm", children: t(`notification.empty`) }) })
22805
+ /* @__PURE__ */ jsx261(ScrollArea, { className: "h-96", children: notifications.length > 0 ? notifications.map((notification) => /* @__PURE__ */ jsx261(Fragment54, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) : /* @__PURE__ */ jsx261("div", { className: "text-muted-foreground p-4 text-center text-sm", children: t(`notification.empty`) }) })
22585
22806
  ] }) })
22586
22807
  ] });
22587
22808
  }
@@ -22592,10 +22813,10 @@ function NotificationModal(props) {
22592
22813
  __name(NotificationModal, "NotificationModal");
22593
22814
 
22594
22815
  // src/features/notification/components/notifications/PushNotificationProvider.tsx
22595
- import { Fragment as Fragment54, jsx as jsx262 } from "react/jsx-runtime";
22816
+ import { Fragment as Fragment55, jsx as jsx262 } from "react/jsx-runtime";
22596
22817
  function PushNotificationProvider({ children }) {
22597
22818
  usePushNotifications();
22598
- return /* @__PURE__ */ jsx262(Fragment54, { children });
22819
+ return /* @__PURE__ */ jsx262(Fragment55, { children });
22599
22820
  }
22600
22821
  __name(PushNotificationProvider, "PushNotificationProvider");
22601
22822
 
@@ -22915,11 +23136,11 @@ function RoleDetails() {
22915
23136
  __name(RoleDetails, "RoleDetails");
22916
23137
 
22917
23138
  // src/features/role/components/containers/RoleContainer.tsx
22918
- import { Fragment as Fragment55, jsx as jsx266, jsxs as jsxs160 } from "react/jsx-runtime";
23139
+ import { Fragment as Fragment56, jsx as jsx266, jsxs as jsxs160 } from "react/jsx-runtime";
22919
23140
  function RoleContainer() {
22920
23141
  const { role } = useRoleContext();
22921
23142
  if (!role) return null;
22922
- return /* @__PURE__ */ jsxs160(Fragment55, { children: [
23143
+ return /* @__PURE__ */ jsxs160(Fragment56, { children: [
22923
23144
  /* @__PURE__ */ jsx266(RoleDetails, {}),
22924
23145
  /* @__PURE__ */ jsx266(RoleUsersList, { role })
22925
23146
  ] });
@@ -22964,7 +23185,7 @@ __name(FormRoles, "FormRoles");
22964
23185
  // src/features/role/components/forms/RemoveUserFromRole.tsx
22965
23186
  import { useTranslations as useTranslations115 } from "next-intl";
22966
23187
  import { useEffect as useEffect73, useState as useState97 } from "react";
22967
- import { Fragment as Fragment56, jsx as jsx268, jsxs as jsxs162 } from "react/jsx-runtime";
23188
+ import { Fragment as Fragment57, jsx as jsx268, jsxs as jsxs162 } from "react/jsx-runtime";
22968
23189
  function RemoveUserFromRole({ role, user, refresh }) {
22969
23190
  const [open, setOpen] = useState97(false);
22970
23191
  const [canRemove, setCanRemove] = useState97(false);
@@ -23013,7 +23234,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
23013
23234
  /* @__PURE__ */ jsx268(DialogTitle, { children: t(`role.remove_user.title`) }),
23014
23235
  /* @__PURE__ */ jsx268(DialogDescription, { children: canRemove ? t(`role.remove_user.subtitle_allowed`) : t(`role.remove_user.subtitle_not_allowed`) })
23015
23236
  ] }),
23016
- canRemove ? /* @__PURE__ */ jsxs162(Fragment56, { children: [
23237
+ canRemove ? /* @__PURE__ */ jsxs162(Fragment57, { children: [
23017
23238
  t(`role.remove_user.description_allowed`, { role: roleName, user: user.name }),
23018
23239
  /* @__PURE__ */ jsxs162("div", { className: "flex justify-end", children: [
23019
23240
  /* @__PURE__ */ jsx268(Button, { className: "me-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
@@ -23030,7 +23251,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
23030
23251
  }
23031
23252
  )
23032
23253
  ] })
23033
- ] }) : /* @__PURE__ */ jsx268(Fragment56, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
23254
+ ] }) : /* @__PURE__ */ jsx268(Fragment57, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
23034
23255
  ] })
23035
23256
  ] });
23036
23257
  }
@@ -23040,7 +23261,7 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
23040
23261
  import { PlusCircle as PlusCircle2 } from "lucide-react";
23041
23262
  import { useTranslations as useTranslations116 } from "next-intl";
23042
23263
  import { useCallback as useCallback46, useEffect as useEffect74, useRef as useRef40, useState as useState98 } from "react";
23043
- import { Fragment as Fragment57, jsx as jsx269, jsxs as jsxs163 } from "react/jsx-runtime";
23264
+ import { Fragment as Fragment58, jsx as jsx269, jsxs as jsxs163 } from "react/jsx-runtime";
23044
23265
  function UserRoleAdd({ user, refresh }) {
23045
23266
  const [open, setOpen] = useState98(false);
23046
23267
  const inputRef = useRef40(null);
@@ -23087,7 +23308,7 @@ function UserRoleAdd({ user, refresh }) {
23087
23308
  useEffect74(() => {
23088
23309
  if (open) searchRoles("");
23089
23310
  }, [open]);
23090
- return /* @__PURE__ */ jsxs163(Fragment57, { children: [
23311
+ return /* @__PURE__ */ jsxs163(Fragment58, { children: [
23091
23312
  /* @__PURE__ */ jsxs163(Button, { size: "sm", onClick: () => setOpen(true), children: [
23092
23313
  /* @__PURE__ */ jsx269(PlusCircle2, { className: "me-3 h-3.5 w-3.5" }),
23093
23314
  t(`common.association.label`, {
@@ -23685,7 +23906,7 @@ __name(OAuthClientForm, "OAuthClientForm");
23685
23906
  import { useState as useState101, useCallback as useCallback51 } from "react";
23686
23907
  import { format as format2 } from "date-fns";
23687
23908
  import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
23688
- import { Fragment as Fragment58, jsx as jsx278, jsxs as jsxs170 } from "react/jsx-runtime";
23909
+ import { Fragment as Fragment59, jsx as jsx278, jsxs as jsxs170 } from "react/jsx-runtime";
23689
23910
  function OAuthClientDetail({
23690
23911
  client,
23691
23912
  isLoading = false,
@@ -23728,7 +23949,7 @@ function OAuthClientDetail({
23728
23949
  }
23729
23950
  }, [onRegenerateSecret]);
23730
23951
  const createdDate = client.createdAt ? format2(new Date(client.createdAt), "MMMM d, yyyy") : "Unknown";
23731
- return /* @__PURE__ */ jsxs170(Fragment58, { children: [
23952
+ return /* @__PURE__ */ jsxs170(Fragment59, { children: [
23732
23953
  /* @__PURE__ */ jsxs170(Card, { children: [
23733
23954
  /* @__PURE__ */ jsx278(CardHeader, { children: /* @__PURE__ */ jsxs170("div", { className: "flex items-start justify-between", children: [
23734
23955
  /* @__PURE__ */ jsxs170("div", { children: [
@@ -24064,7 +24285,7 @@ function WaitlistQuestionnaireRenderer({
24064
24285
  __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
24065
24286
 
24066
24287
  // src/features/waitlist/components/forms/WaitlistForm.tsx
24067
- import { Fragment as Fragment59, jsx as jsx284, jsxs as jsxs176 } from "react/jsx-runtime";
24288
+ import { Fragment as Fragment60, jsx as jsx284, jsxs as jsxs176 } from "react/jsx-runtime";
24068
24289
  function WaitlistForm({ onSuccess }) {
24069
24290
  const t = useTranslations119();
24070
24291
  const [isSubmitting, setIsSubmitting] = useState102(false);
@@ -24183,7 +24404,7 @@ function WaitlistForm({ onSuccess }) {
24183
24404
  {
24184
24405
  form,
24185
24406
  id: "gdprConsent",
24186
- label: /* @__PURE__ */ jsxs176(Fragment59, { children: [
24407
+ label: /* @__PURE__ */ jsxs176(Fragment60, { children: [
24187
24408
  t("auth.gdpr.terms_prefix"),
24188
24409
  /* @__PURE__ */ jsx284(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("auth.gdpr.terms_of_service") }),
24189
24410
  t("auth.gdpr.and"),
@@ -24293,7 +24514,7 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
24293
24514
  import { flexRender as flexRender2, getCoreRowModel as getCoreRowModel2, useReactTable as useReactTable2 } from "@tanstack/react-table";
24294
24515
  import { RefreshCw as RefreshCw4, Users as Users2 } from "lucide-react";
24295
24516
  import { useTranslations as useTranslations123 } from "next-intl";
24296
- import { useCallback as useCallback52, useEffect as useEffect76, useMemo as useMemo45, useState as useState104 } from "react";
24517
+ import { useCallback as useCallback52, useEffect as useEffect76, useMemo as useMemo46, useState as useState104 } from "react";
24297
24518
 
24298
24519
  // src/features/waitlist/hooks/useWaitlistTableStructure.tsx
24299
24520
  import { Send } from "lucide-react";
@@ -24422,7 +24643,7 @@ function WaitlistList() {
24422
24643
  }
24423
24644
  }, "handleInvite");
24424
24645
  const columns = useWaitlistTableStructure({ onInvite: handleInvite });
24425
- const statusItems = useMemo45(
24646
+ const statusItems = useMemo46(
24426
24647
  () => ({
24427
24648
  all: t("waitlist.admin.all_statuses"),
24428
24649
  pending: t("waitlist.admin.status.pending"),
@@ -24473,7 +24694,7 @@ __name(WaitlistList, "WaitlistList");
24473
24694
  // src/features/rbac/components/RbacContainer.tsx
24474
24695
  import { Loader2Icon as Loader2Icon4 } from "lucide-react";
24475
24696
  import { useTranslations as useTranslations125 } from "next-intl";
24476
- import { memo as memo2, useCallback as useCallback54, useEffect as useEffect78, useMemo as useMemo46, useRef as useRef41, useState as useState106 } from "react";
24697
+ import { memo as memo2, useCallback as useCallback54, useEffect as useEffect78, useMemo as useMemo47, useRef as useRef41, useState as useState106 } from "react";
24477
24698
 
24478
24699
  // src/features/rbac/components/RbacPermissionCell.tsx
24479
24700
  import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon12 } from "lucide-react";
@@ -24555,7 +24776,7 @@ import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
24555
24776
  import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon13 } from "lucide-react";
24556
24777
  import { useTranslations as useTranslations124 } from "next-intl";
24557
24778
  import { useCallback as useCallback53, useEffect as useEffect77, useState as useState105 } from "react";
24558
- import { Fragment as Fragment60, jsx as jsx291, jsxs as jsxs183 } from "react/jsx-runtime";
24779
+ import { Fragment as Fragment61, jsx as jsx291, jsxs as jsxs183 } from "react/jsx-runtime";
24559
24780
  function RbacPermissionPicker({
24560
24781
  open,
24561
24782
  anchor,
@@ -24641,7 +24862,7 @@ function RbacPermissionPicker({
24641
24862
  )
24642
24863
  ] })
24643
24864
  ] }),
24644
- isRoleColumn && onClear && /* @__PURE__ */ jsxs183(Fragment60, { children: [
24865
+ isRoleColumn && onClear && /* @__PURE__ */ jsxs183(Fragment61, { children: [
24645
24866
  /* @__PURE__ */ jsx291(Separator, {}),
24646
24867
  /* @__PURE__ */ jsxs183(
24647
24868
  Button,
@@ -24828,11 +25049,11 @@ function RbacContainer() {
24828
25049
  setSelectedModuleId(id);
24829
25050
  setActivePicker(null);
24830
25051
  }, []);
24831
- const sortedModuleIds = useMemo46(() => {
25052
+ const sortedModuleIds = useMemo47(() => {
24832
25053
  if (!matrix) return [];
24833
25054
  return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
24834
25055
  }, [matrix, moduleNames]);
24835
- const roleIds = useMemo46(() => {
25056
+ const roleIds = useMemo47(() => {
24836
25057
  if (roleNames) {
24837
25058
  return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
24838
25059
  }
@@ -24850,14 +25071,14 @@ function RbacContainer() {
24850
25071
  setSelectedModuleId(sortedModuleIds[0]);
24851
25072
  }
24852
25073
  }, [selectedModuleId, sortedModuleIds]);
24853
- const activeValue = useMemo46(() => {
25074
+ const activeValue = useMemo47(() => {
24854
25075
  if (!activePicker || !matrix) return void 0;
24855
25076
  const block = matrix[activePicker.moduleId];
24856
25077
  if (!block) return void 0;
24857
25078
  const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
24858
25079
  return cellValue(tokens, activePicker.action);
24859
25080
  }, [activePicker, matrix]);
24860
- const activeSegments = useMemo46(() => {
25081
+ const activeSegments = useMemo47(() => {
24861
25082
  if (!activePicker) return [];
24862
25083
  return modulePaths[activePicker.moduleId] ?? [];
24863
25084
  }, [activePicker, modulePaths]);
@@ -24928,7 +25149,7 @@ __name(RbacContainer, "RbacContainer");
24928
25149
  // src/features/rbac/components/RbacByRoleContainer.tsx
24929
25150
  import { Loader2Icon as Loader2Icon5 } from "lucide-react";
24930
25151
  import { useTranslations as useTranslations126 } from "next-intl";
24931
- import { Fragment as Fragment61, memo as memo3, useCallback as useCallback55, useEffect as useEffect79, useMemo as useMemo47, useRef as useRef42, useState as useState107 } from "react";
25152
+ import { Fragment as Fragment62, memo as memo3, useCallback as useCallback55, useEffect as useEffect79, useMemo as useMemo48, useRef as useRef42, useState as useState107 } from "react";
24932
25153
  import { jsx as jsx293, jsxs as jsxs185 } from "react/jsx-runtime";
24933
25154
  function findToken2(tokens, action) {
24934
25155
  if (!tokens) return void 0;
@@ -24978,11 +25199,11 @@ function RbacByRoleContainer() {
24978
25199
  setSelectedRoleId(id);
24979
25200
  setActivePicker(null);
24980
25201
  }, []);
24981
- const sortedRoleIds = useMemo47(() => {
25202
+ const sortedRoleIds = useMemo48(() => {
24982
25203
  if (!roleNames) return [];
24983
25204
  return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
24984
25205
  }, [roleNames]);
24985
- const sortedModuleIds = useMemo47(() => {
25206
+ const sortedModuleIds = useMemo48(() => {
24986
25207
  if (!matrix) return [];
24987
25208
  return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
24988
25209
  }, [matrix, moduleNames]);
@@ -24991,14 +25212,14 @@ function RbacByRoleContainer() {
24991
25212
  setSelectedRoleId(sortedRoleIds[0]);
24992
25213
  }
24993
25214
  }, [selectedRoleId, sortedRoleIds]);
24994
- const activeValue = useMemo47(() => {
25215
+ const activeValue = useMemo48(() => {
24995
25216
  if (!activePicker || !matrix) return void 0;
24996
25217
  const block = matrix[activePicker.moduleId];
24997
25218
  if (!block) return void 0;
24998
25219
  const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
24999
25220
  return cellValue2(tokens, activePicker.action);
25000
25221
  }, [activePicker, matrix]);
25001
- const activeSegments = useMemo47(() => {
25222
+ const activeSegments = useMemo48(() => {
25002
25223
  if (!activePicker) return [];
25003
25224
  return modulePaths[activePicker.moduleId] ?? [];
25004
25225
  }, [activePicker, modulePaths]);
@@ -25054,7 +25275,7 @@ function RbacByRoleContainer() {
25054
25275
  const defaultTokens = block.default ?? [];
25055
25276
  const roleTokens = block[selectedRoleId];
25056
25277
  const moduleLabel = moduleNames?.[moduleId] ?? moduleId;
25057
- return /* @__PURE__ */ jsxs185(Fragment61, { children: [
25278
+ return /* @__PURE__ */ jsxs185(Fragment62, { children: [
25058
25279
  /* @__PURE__ */ jsx293("tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ jsx293(
25059
25280
  "td",
25060
25281
  {
@@ -25665,6 +25886,7 @@ export {
25665
25886
  CompanyProvider,
25666
25887
  useCompanyContext,
25667
25888
  DEFAULT_ONBOARDING_LABELS,
25889
+ mapOnboardingSide,
25668
25890
  OnboardingProvider,
25669
25891
  useOnboarding,
25670
25892
  CommonProvider,
@@ -25680,4 +25902,4 @@ export {
25680
25902
  useOAuthClients,
25681
25903
  useOAuthClient
25682
25904
  };
25683
- //# sourceMappingURL=chunk-7PNGCZES.mjs.map
25905
+ //# sourceMappingURL=chunk-XZJJ4SZW.mjs.map