@carlonicora/nextjs-jsonapi 1.131.2 → 1.133.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 (78) hide show
  1. package/dist/{BlockNoteEditor-5RUXGWLR.js → BlockNoteEditor-H626BS5Y.js} +19 -19
  2. package/dist/{BlockNoteEditor-5RUXGWLR.js.map → BlockNoteEditor-H626BS5Y.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-F4AKH532.mjs → BlockNoteEditor-VXK7INMR.mjs} +4 -4
  4. package/dist/billing/index.js +357 -357
  5. package/dist/billing/index.mjs +3 -3
  6. package/dist/{chunk-LBMNRFCY.js → chunk-5IE6DZ2D.js} +153 -77
  7. package/dist/chunk-5IE6DZ2D.js.map +1 -0
  8. package/dist/{chunk-5MNE72ZE.mjs → chunk-DZL2G7NB.mjs} +77 -1
  9. package/dist/chunk-DZL2G7NB.mjs.map +1 -0
  10. package/dist/{chunk-XTLTQQ7X.js → chunk-F6KBHC2X.js} +7 -7
  11. package/dist/{chunk-XTLTQQ7X.js.map → chunk-F6KBHC2X.js.map} +1 -1
  12. package/dist/{chunk-T7F2EVPR.js → chunk-TVJFCWST.js} +908 -929
  13. package/dist/chunk-TVJFCWST.js.map +1 -0
  14. package/dist/{chunk-NATPK5ME.mjs → chunk-VSAAVVHY.mjs} +2 -2
  15. package/dist/{chunk-BBBQGJEG.mjs → chunk-WEDLGKSS.mjs} +104 -125
  16. package/dist/chunk-WEDLGKSS.mjs.map +1 -0
  17. package/dist/client/index.js +4 -4
  18. package/dist/client/index.mjs +3 -3
  19. package/dist/components/index.d.mts +6 -2
  20. package/dist/components/index.d.ts +6 -2
  21. package/dist/components/index.js +4 -4
  22. package/dist/components/index.mjs +3 -3
  23. package/dist/contexts/index.d.mts +9 -2
  24. package/dist/contexts/index.d.ts +9 -2
  25. package/dist/contexts/index.js +6 -4
  26. package/dist/contexts/index.js.map +1 -1
  27. package/dist/contexts/index.mjs +5 -3
  28. package/dist/core/index.d.mts +11 -1
  29. package/dist/core/index.d.ts +11 -1
  30. package/dist/core/index.js +12 -2
  31. package/dist/core/index.js.map +1 -1
  32. package/dist/core/index.mjs +13 -3
  33. package/dist/features/help/index.js +39 -39
  34. package/dist/features/help/index.js.map +1 -1
  35. package/dist/features/help/index.mjs +5 -5
  36. package/dist/features/help/index.mjs.map +1 -1
  37. package/dist/index.d.mts +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.js +13 -3
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +14 -4
  42. package/dist/server/index.js +3 -3
  43. package/dist/server/index.mjs +1 -1
  44. package/package.json +1 -1
  45. package/src/components/containers/ReactMarkdownContainer.tsx +1 -1
  46. package/src/components/containers/RoundPageContainer.tsx +7 -0
  47. package/src/components/forms/EditorSheet.tsx +24 -1
  48. package/src/components/forms/FormDateTime.tsx +5 -0
  49. package/src/components/navigations/Breadcrumb.tsx +13 -11
  50. package/src/components/navigations/Header.tsx +3 -1
  51. package/src/components/tables/ContentListTable.tsx +33 -19
  52. package/src/components/tables/__tests__/ContentListTable.test.tsx +77 -0
  53. package/src/contexts/HeaderChildrenContext.tsx +17 -2
  54. package/src/features/assistant-message/components/MessageItem.tsx +1 -1
  55. package/src/features/auth/components/GdprConsentSection.tsx +2 -2
  56. package/src/features/auth/components/forms/Register.tsx +2 -2
  57. package/src/features/help/components/HelpArticleBody.tsx +2 -2
  58. package/src/features/notification/components/common/NotificationErrorBoundary.tsx +1 -4
  59. package/src/features/oauth/components/consent/OAuthConsentScreen.tsx +2 -2
  60. package/src/features/waitlist/components/forms/WaitlistForm.tsx +2 -2
  61. package/src/features/waitlist/components/lists/WaitlistList.tsx +13 -2
  62. package/src/shadcnui/custom/link.tsx +1 -1
  63. package/src/shadcnui/ui/accordion.tsx +1 -1
  64. package/src/shadcnui/ui/alert-dialog.tsx +1 -1
  65. package/src/shadcnui/ui/alert.tsx +2 -5
  66. package/src/shadcnui/ui/badge.tsx +1 -1
  67. package/src/shadcnui/ui/button.tsx +1 -1
  68. package/src/shadcnui/ui/dialog.tsx +1 -4
  69. package/src/shadcnui/ui/field.tsx +1 -1
  70. package/src/utils/__tests__/italian-validators.test.ts +63 -0
  71. package/src/utils/index.ts +8 -0
  72. package/src/utils/italian-validators.ts +18 -5
  73. package/dist/chunk-5MNE72ZE.mjs.map +0 -1
  74. package/dist/chunk-BBBQGJEG.mjs.map +0 -1
  75. package/dist/chunk-LBMNRFCY.js.map +0 -1
  76. package/dist/chunk-T7F2EVPR.js.map +0 -1
  77. /package/dist/{BlockNoteEditor-F4AKH532.mjs.map → BlockNoteEditor-VXK7INMR.mjs.map} +0 -0
  78. /package/dist/{chunk-NATPK5ME.mjs.map → chunk-VSAAVVHY.mjs.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  AbstractService,
3
3
  EndpointCreator,
4
4
  Modules
5
- } from "./chunk-5MNE72ZE.mjs";
5
+ } from "./chunk-DZL2G7NB.mjs";
6
6
  import {
7
7
  setBootstrapper
8
8
  } from "./chunk-Z2CB63VG.mjs";
@@ -296,4 +296,4 @@ export {
296
296
  ACTION_TYPES,
297
297
  RbacService
298
298
  };
299
- //# sourceMappingURL=chunk-NATPK5ME.mjs.map
299
+ //# sourceMappingURL=chunk-VSAAVVHY.mjs.map
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-NATPK5ME.mjs";
23
+ } from "./chunk-VSAAVVHY.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AssistantMessage,
@@ -59,8 +59,10 @@ import {
59
59
  showError,
60
60
  showToast,
61
61
  useComposedRefs,
62
- useIsMobile
63
- } from "./chunk-5MNE72ZE.mjs";
62
+ useIsMobile,
63
+ validateItalianTaxCode,
64
+ validatePartitaIva
65
+ } from "./chunk-DZL2G7NB.mjs";
64
66
  import {
65
67
  JsonApiContext
66
68
  } from "./chunk-VOXD3ZLY.mjs";
@@ -136,7 +138,7 @@ function AccordionContent({ className, children, ...props }) {
136
138
  "div",
137
139
  {
138
140
  className: cn(
139
- "pt-0 pb-4 [&_a]:hover:text-foreground h-(--accordion-panel-height) data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",
141
+ "pt-0 pb-4 [&_a]:hover:text-foreground h-(--accordion-panel-height) data-ending-style:h-0 data-starting-style:h-0 [&_p:not(:last-child)]:mb-4",
140
142
  className
141
143
  ),
142
144
  children
@@ -173,10 +175,7 @@ function AlertTitle({ className, ...props }) {
173
175
  "div",
174
176
  {
175
177
  "data-slot": "alert-title",
176
- className: cn(
177
- "text-sm font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
178
- className
179
- ),
178
+ className: cn("text-sm font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground", className),
180
179
  ...props
181
180
  }
182
181
  );
@@ -188,7 +187,7 @@ function AlertDescription({ className, ...props }) {
188
187
  {
189
188
  "data-slot": "alert-description",
190
189
  className: cn(
191
- "text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
190
+ "text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-4 [&_a]:hover:text-foreground",
192
191
  className
193
192
  ),
194
193
  ...props
@@ -218,7 +217,7 @@ var buttonVariants = cva2(
218
217
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
219
218
  ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
220
219
  destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
221
- link: "text-primary underline-offset-4 hover:underline"
220
+ link: "text-primary"
222
221
  },
223
222
  size: {
224
223
  default: "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
@@ -362,7 +361,7 @@ function AlertDialogDescription({
362
361
  {
363
362
  "data-slot": "alert-dialog-description",
364
363
  className: cn(
365
- "text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",
364
+ "text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty",
366
365
  className
367
366
  ),
368
367
  ...props
@@ -499,7 +498,7 @@ var badgeVariants = cva3(
499
498
  destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
500
499
  outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",
501
500
  ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
502
- link: "text-primary underline-offset-4 hover:underline",
501
+ link: "text-primary",
503
502
  warning: "bg-warning text-warning-foreground [a]:hover:bg-warning/80",
504
503
  softGreen: "bg-green-500/10 text-green-700 dark:bg-green-500/15 dark:text-green-400",
505
504
  softRed: "bg-red-500/10 text-red-700 dark:bg-red-500/15 dark:text-red-400",
@@ -1807,10 +1806,7 @@ function DialogDescription({ className, ...props }) {
1807
1806
  DialogPrimitive.Description,
1808
1807
  {
1809
1808
  "data-slot": "dialog-description",
1810
- className: cn(
1811
- "text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed *:[a]:underline *:[a]:underline-offset-3",
1812
- className
1813
- ),
1809
+ className: cn("text-muted-foreground *:[a]:hover:text-foreground text-xs/relaxed", className),
1814
1810
  ...props
1815
1811
  }
1816
1812
  );
@@ -2689,7 +2685,7 @@ function FieldDescription({ className, ...props }) {
2689
2685
  className: cn(
2690
2686
  "text-muted-foreground text-left text-xs/relaxed [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
2691
2687
  "last:mt-0 nth-last-2:-mt-1",
2692
- "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
2688
+ "[&>a:hover]:text-primary",
2693
2689
  className
2694
2690
  ),
2695
2691
  ...props
@@ -5309,7 +5305,7 @@ var Link = React10.forwardRef(({ className, href, children, ...props }, ref) =>
5309
5305
  prefetch: false,
5310
5306
  ref,
5311
5307
  href,
5312
- className: cn("text-primary font-medium hover:underline", className),
5308
+ className: cn("text-primary font-medium", className),
5313
5309
  ...props,
5314
5310
  children
5315
5311
  }
@@ -6356,10 +6352,11 @@ __name(TableCellAvatar, "TableCellAvatar");
6356
6352
  import { createContext as createContext6, useContext as useContext7 } from "react";
6357
6353
  import { jsx as jsx54 } from "react/jsx-runtime";
6358
6354
  var HeaderChildrenContext = createContext6({
6359
- headerChildren: null
6355
+ headerChildren: null,
6356
+ headerRootLabel: null
6360
6357
  });
6361
- function HeaderChildrenProvider({ children, content }) {
6362
- return /* @__PURE__ */ jsx54(HeaderChildrenContext.Provider, { value: { headerChildren: content }, children });
6358
+ function HeaderChildrenProvider({ children, content, rootLabel }) {
6359
+ return /* @__PURE__ */ jsx54(HeaderChildrenContext.Provider, { value: { headerChildren: content, headerRootLabel: rootLabel ?? null }, children });
6363
6360
  }
6364
6361
  __name(HeaderChildrenProvider, "HeaderChildrenProvider");
6365
6362
  function useHeaderChildren() {
@@ -6367,6 +6364,11 @@ function useHeaderChildren() {
6367
6364
  return context.headerChildren;
6368
6365
  }
6369
6366
  __name(useHeaderChildren, "useHeaderChildren");
6367
+ function useHeaderRootLabel() {
6368
+ const context = useContext7(HeaderChildrenContext);
6369
+ return context.headerRootLabel;
6370
+ }
6371
+ __name(useHeaderRootLabel, "useHeaderRootLabel");
6370
6372
 
6371
6373
  // src/contexts/HeaderLeftContentContext.tsx
6372
6374
  import { createContext as createContext7, useContext as useContext8 } from "react";
@@ -9479,11 +9481,19 @@ function EditorSheet({
9479
9481
  { dialogOpen, onDialogOpenChange, forceShow }
9480
9482
  );
9481
9483
  const hasBeenOpen = useRef14(false);
9484
+ const seeded = useRef14(void 0);
9482
9485
  useEffect17(() => {
9483
9486
  if (open) {
9484
9487
  hasBeenOpen.current = true;
9488
+ if (!isEdit) return;
9489
+ const next = onReset();
9490
+ const fingerprint = JSON.stringify(next);
9491
+ if (seeded.current !== void 0 && seeded.current !== fingerprint) form.reset(next);
9492
+ seeded.current = fingerprint;
9485
9493
  } else if (hasBeenOpen.current) {
9486
- form.reset(onReset());
9494
+ const next = onReset();
9495
+ form.reset(next);
9496
+ if (isEdit) seeded.current = JSON.stringify(next);
9487
9497
  onClose?.();
9488
9498
  }
9489
9499
  }, [open]);
@@ -10070,7 +10080,7 @@ import { useRef as useRef17 } from "react";
10070
10080
  import dynamic from "next/dynamic";
10071
10081
  import React17 from "react";
10072
10082
  import { jsx as jsx85 } from "react/jsx-runtime";
10073
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-F4AKH532.mjs"), {
10083
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-VXK7INMR.mjs"), {
10074
10084
  ssr: false
10075
10085
  });
10076
10086
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -10379,6 +10389,8 @@ function FormDateTime({
10379
10389
  label: minute.toString().padStart(2, "0")
10380
10390
  };
10381
10391
  });
10392
+ const hoursItems = Object.fromEntries(hoursOptions.map((option) => [String(option.value), option.label]));
10393
+ const minutesItems = Object.fromEntries(minutesOptions.map((option) => [String(option.value), option.label]));
10382
10394
  function roundToNearestFiveMinutes(minutes) {
10383
10395
  return Math.round(minutes / 5) * 5 % 60;
10384
10396
  }
@@ -10460,6 +10472,7 @@ function FormDateTime({
10460
10472
  /* @__PURE__ */ jsxs53(
10461
10473
  Select,
10462
10474
  {
10475
+ items: hoursItems,
10463
10476
  value: String(field.value ? new Date(field.value).getHours() : selectedHours),
10464
10477
  onValueChange: (value) => {
10465
10478
  if (!value) return;
@@ -10483,6 +10496,7 @@ function FormDateTime({
10483
10496
  /* @__PURE__ */ jsxs53(
10484
10497
  Select,
10485
10498
  {
10499
+ items: minutesItems,
10486
10500
  value: String(
10487
10501
  field.value ? roundToNearestFiveMinutes(new Date(field.value).getMinutes()) : selectedMinutes
10488
10502
  ),
@@ -14345,11 +14359,11 @@ var ITEMS_TO_DISPLAY = 4;
14345
14359
  function BreadcrumbDesktop({
14346
14360
  items,
14347
14361
  generateUrl,
14348
- t
14362
+ rootLabel
14349
14363
  }) {
14350
14364
  const [open, setOpen] = useState46(false);
14351
14365
  return /* @__PURE__ */ jsx148(Breadcrumb, { children: /* @__PURE__ */ jsxs85(BreadcrumbList, { children: [
14352
- /* @__PURE__ */ jsx148(BreadcrumbItem, { children: /* @__PURE__ */ jsx148(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }),
14366
+ /* @__PURE__ */ jsx148(BreadcrumbItem, { children: /* @__PURE__ */ jsx148(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }),
14353
14367
  items.length > 0 && /* @__PURE__ */ jsx148(BreadcrumbSeparator, {}),
14354
14368
  items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs85(Fragment21, { children: [
14355
14369
  /* @__PURE__ */ jsx148(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx148(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx148(Fragment21, { children: items[0].name }) }),
@@ -14373,13 +14387,13 @@ __name(BreadcrumbDesktop, "BreadcrumbDesktop");
14373
14387
  function BreadcrumbMobile({
14374
14388
  items,
14375
14389
  generateUrl,
14376
- t
14390
+ rootLabel
14377
14391
  }) {
14378
14392
  const [open, setOpen] = useState46(false);
14379
14393
  const lastItem = items[items.length - 1];
14380
- const allItems = [{ name: t(`common.home`), href: generateUrl({ page: `/` }) }, ...items];
14394
+ const allItems = [{ name: rootLabel, href: generateUrl({ page: `/` }) }, ...items];
14381
14395
  if (!lastItem && items.length === 0) {
14382
- return /* @__PURE__ */ jsx148(Breadcrumb, { children: /* @__PURE__ */ jsx148(BreadcrumbList, { children: /* @__PURE__ */ jsx148(BreadcrumbItem, { children: /* @__PURE__ */ jsx148(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }) }) });
14396
+ return /* @__PURE__ */ jsx148(Breadcrumb, { children: /* @__PURE__ */ jsx148(BreadcrumbList, { children: /* @__PURE__ */ jsx148(BreadcrumbItem, { children: /* @__PURE__ */ jsx148(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }) }) });
14383
14397
  }
14384
14398
  return /* @__PURE__ */ jsxs85(DropdownMenu, { open, onOpenChange: setOpen, children: [
14385
14399
  /* @__PURE__ */ jsxs85(DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
@@ -14390,14 +14404,15 @@ function BreadcrumbMobile({
14390
14404
  ] });
14391
14405
  }
14392
14406
  __name(BreadcrumbMobile, "BreadcrumbMobile");
14393
- function BreadcrumbNavigation({ items }) {
14407
+ function BreadcrumbNavigation({ items, rootLabel }) {
14394
14408
  const generateUrl = usePageUrlGenerator();
14395
14409
  const t = useTranslations50();
14396
14410
  const isMobile = useIsMobile();
14411
+ const root = rootLabel?.trim() ? rootLabel : t(`common.home`);
14397
14412
  if (isMobile) {
14398
- return /* @__PURE__ */ jsx148(BreadcrumbMobile, { items, generateUrl, t });
14413
+ return /* @__PURE__ */ jsx148(BreadcrumbMobile, { items, generateUrl, rootLabel: root });
14399
14414
  }
14400
- return /* @__PURE__ */ jsx148(BreadcrumbDesktop, { items, generateUrl, t });
14415
+ return /* @__PURE__ */ jsx148(BreadcrumbDesktop, { items, generateUrl, rootLabel: root });
14401
14416
  }
14402
14417
  __name(BreadcrumbNavigation, "BreadcrumbNavigation");
14403
14418
 
@@ -14438,11 +14453,12 @@ __name(ContentTitle, "ContentTitle");
14438
14453
  import { jsx as jsx150, jsxs as jsxs87 } from "react/jsx-runtime";
14439
14454
  function Header({ children, leftContent, className }) {
14440
14455
  const { breadcrumbs } = useSharedContext();
14456
+ const rootLabel = useHeaderRootLabel();
14441
14457
  const isMobile = useIsMobile();
14442
14458
  return /* @__PURE__ */ jsx150("header", { className: `sticky top-0 z-10 flex h-12 flex-col items-center justify-start gap-x-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxs87("div", { className: "bg-sidebar flex h-12 w-full flex-row items-center justify-between pl-2 pr-4", children: [
14443
14459
  /* @__PURE__ */ jsx150(SidebarTrigger, { "aria-label": "Toggle sidebar", id: "sidebar-trigger" }),
14444
14460
  leftContent,
14445
- /* @__PURE__ */ jsx150("div", { className: "flex w-full flex-row items-center justify-start", children: /* @__PURE__ */ jsx150(BreadcrumbNavigation, { items: breadcrumbs }) }),
14461
+ /* @__PURE__ */ jsx150("div", { className: "flex w-full flex-row items-center justify-start", children: /* @__PURE__ */ jsx150(BreadcrumbNavigation, { items: breadcrumbs, rootLabel: rootLabel ?? void 0 }) }),
14446
14462
  !isMobile && children && /* @__PURE__ */ jsx150("div", { className: "flex w-64 flex-row items-center justify-end gap-x-4 whitespace-nowrap", children: /* @__PURE__ */ jsx150("div", { className: "flex flex-row items-center justify-end gap-x-4 whitespace-nowrap", children }) })
14447
14463
  ] }) });
14448
14464
  }
@@ -14640,7 +14656,7 @@ function ReactMarkdownContainer({
14640
14656
  "button",
14641
14657
  {
14642
14658
  onClick: handleToggle,
14643
- className: "text-primary flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors hover:bg-gray-100 hover:underline",
14659
+ className: "text-primary flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors hover:bg-gray-100",
14644
14660
  "aria-label": isExpanded ? t("show_less") : t("show_more"),
14645
14661
  children: [
14646
14662
  /* @__PURE__ */ jsx155("span", { children: isExpanded ? t("show_less") : t("show_more") }),
@@ -14769,6 +14785,10 @@ function RoundPageContainer({
14769
14785
  );
14770
14786
  const activeFillHeight = tabs?.find((t) => tabValue(t) === activeTab)?.fillHeight === true;
14771
14787
  const { ungrouped, groups } = useMemo21(() => partitionTabs(tabs ?? []), [tabs]);
14788
+ const tabItems = useMemo21(
14789
+ () => Object.fromEntries((tabs ?? []).map((tab) => [tabValue(tab), tab.contentLabel ?? tab.label])),
14790
+ [tabs]
14791
+ );
14772
14792
  const isReady = mounted && isMobile !== void 0;
14773
14793
  if (!isReady) {
14774
14794
  return /* @__PURE__ */ jsxs93(Fragment23, { children: [
@@ -14827,6 +14847,7 @@ function RoundPageContainer({
14827
14847
  /* @__PURE__ */ jsx157("div", { "data-testid": "round-page-rail-select", className: "p-2 md:hidden", children: /* @__PURE__ */ jsxs93(
14828
14848
  Select,
14829
14849
  {
14850
+ items: tabItems,
14830
14851
  value: activeTab,
14831
14852
  onValueChange: (value) => {
14832
14853
  if (value) handleTabChange(value);
@@ -14907,6 +14928,7 @@ function RoundPageContainer({
14907
14928
  isMobile ? /* @__PURE__ */ jsx157("div", { className: "p-0", children: /* @__PURE__ */ jsxs93(
14908
14929
  Select,
14909
14930
  {
14931
+ items: tabItems,
14910
14932
  value: activeTab,
14911
14933
  onValueChange: (value) => {
14912
14934
  if (value) handleTabChange(value);
@@ -16470,12 +16492,23 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16470
16492
  list.push(row);
16471
16493
  }
16472
16494
  }
16473
- const sortedKeys = [...groupMap.keys()].sort((a, b) => a.localeCompare(b));
16495
+ const order = props.groupOrder;
16496
+ const sortedKeys = [...groupMap.keys()].sort((a, b) => {
16497
+ if (order) {
16498
+ const ia = order.indexOf(a);
16499
+ const ib = order.indexOf(b);
16500
+ if (ia === -1 && ib === -1) return a.localeCompare(b);
16501
+ if (ia === -1) return 1;
16502
+ if (ib === -1) return -1;
16503
+ return ia - ib;
16504
+ }
16505
+ return a.localeCompare(b);
16506
+ });
16474
16507
  return sortedKeys.map((groupKey) => ({
16475
16508
  groupKey,
16476
16509
  rows: groupMap.get(groupKey)
16477
16510
  }));
16478
- }, [props.groupBy, rowModel]);
16511
+ }, [props.groupBy, props.groupOrder, rowModel]);
16479
16512
  const showFooter = !!(data.next || data.previous);
16480
16513
  return /* @__PURE__ */ jsx176("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx176("div", { className: cn(`overflow-clip`, fullWidth ? `` : `rounded-md border`), children: /* @__PURE__ */ jsxs101(Table, { children: [
16481
16514
  /* @__PURE__ */ jsxs101(TableHeader, { className: "bg-muted font-semibold", children: [
@@ -16512,20 +16545,13 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16512
16545
  ] })
16513
16546
  }
16514
16547
  ) }),
16515
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx176(TableRow, { children: headerGroup.headers.map((header) => {
16548
+ !props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx176(TableRow, { children: headerGroup.headers.map((header) => {
16516
16549
  const meta = header.column.columnDef.meta;
16517
16550
  return /* @__PURE__ */ jsx176(TableHead, { className: meta?.className, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
16518
16551
  }) }, headerGroup.id))
16519
16552
  ] }),
16520
16553
  /* @__PURE__ */ jsx176(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs101(React28.Fragment, { children: [
16521
- /* @__PURE__ */ jsx176(TableRow, { children: /* @__PURE__ */ jsx176(
16522
- TableCell,
16523
- {
16524
- colSpan: tableColumns.length,
16525
- className: "bg-muted text-muted-foreground px-4 py-2 text-sm font-semibold",
16526
- children: group.groupKey
16527
- }
16528
- ) }),
16554
+ /* @__PURE__ */ jsx176(TableRow, { children: /* @__PURE__ */ jsx176(TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ jsx176(MicroLabel, { children: props.groupLabel?.(group.groupKey) ?? group.groupKey }) }) }),
16529
16555
  group.rows.map((row) => /* @__PURE__ */ jsx176(
16530
16556
  TableRow,
16531
16557
  {
@@ -16630,57 +16656,6 @@ function ContentListGrid(props) {
16630
16656
  }
16631
16657
  __name(ContentListGrid, "ContentListGrid");
16632
16658
 
16633
- // src/utils/italian-validators.ts
16634
- import CodiceFiscale from "codice-fiscale-js";
16635
- function validatePartitaIva(partitaIva) {
16636
- if (!partitaIva || typeof partitaIva !== "string") {
16637
- return false;
16638
- }
16639
- const cleaned = partitaIva.replace(/\s/g, "");
16640
- if (!/^\d{11}$/.test(cleaned)) {
16641
- return false;
16642
- }
16643
- const digits = cleaned.split("").map(Number);
16644
- const oddSum = digits[0] + digits[2] + digits[4] + digits[6] + digits[8] + digits[10];
16645
- let evenSum = 0;
16646
- for (let i = 1; i < 10; i += 2) {
16647
- let doubled = digits[i] * 2;
16648
- if (doubled > 9) {
16649
- doubled -= 9;
16650
- }
16651
- evenSum += doubled;
16652
- }
16653
- const totalSum = oddSum + evenSum;
16654
- return totalSum % 10 === 0;
16655
- }
16656
- __name(validatePartitaIva, "validatePartitaIva");
16657
- function validateCodiceFiscale(codiceFiscale) {
16658
- if (!codiceFiscale || typeof codiceFiscale !== "string") {
16659
- return false;
16660
- }
16661
- const cleaned = codiceFiscale.replace(/\s/g, "").toUpperCase();
16662
- try {
16663
- return CodiceFiscale.check(cleaned);
16664
- } catch (error) {
16665
- return false;
16666
- }
16667
- }
16668
- __name(validateCodiceFiscale, "validateCodiceFiscale");
16669
- function validateItalianTaxCode(value, type) {
16670
- if (!value || typeof value !== "string") {
16671
- return false;
16672
- }
16673
- switch (type) {
16674
- case "partitaIva":
16675
- return validatePartitaIva(value);
16676
- case "codiceFiscale":
16677
- return validateCodiceFiscale(value);
16678
- default:
16679
- return false;
16680
- }
16681
- }
16682
- __name(validateItalianTaxCode, "validateItalianTaxCode");
16683
-
16684
16659
  // src/components/fiscal/ItalianFiscalData.tsx
16685
16660
  import { useTranslations as useTranslations59 } from "next-intl";
16686
16661
  import { forwardRef as forwardRef8, useCallback as useCallback36, useImperativeHandle as useImperativeHandle2, useRef as useRef32, useState as useState60 } from "react";
@@ -16909,11 +16884,11 @@ function GdprConsentSection({
16909
16884
  const termsLabel = /* @__PURE__ */ jsxs107(Fragment29, { children: [
16910
16885
  t("terms_prefix"),
16911
16886
  " ",
16912
- /* @__PURE__ */ jsx184(Link, { href: "/terms", target: "_blank", rel: "noopener", className: "underline", children: t("terms_of_service") }),
16887
+ /* @__PURE__ */ jsx184(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("terms_of_service") }),
16913
16888
  " ",
16914
16889
  t("and"),
16915
16890
  " ",
16916
- /* @__PURE__ */ jsx184(Link, { href: "/privacy", target: "_blank", rel: "noopener", className: "underline", children: t("privacy_policy") })
16891
+ /* @__PURE__ */ jsx184(Link, { href: "/privacy", target: "_blank", rel: "noopener", children: t("privacy_policy") })
16917
16892
  ] });
16918
16893
  return /* @__PURE__ */ jsxs107("div", { className: "space-y-4 py-4", children: [
16919
16894
  /* @__PURE__ */ jsx184(GdprConsentCheckbox, { form, id: termsCheckboxId, label: termsLabel, required: true }),
@@ -17069,7 +17044,7 @@ function Register() {
17069
17044
  /* @__PURE__ */ jsxs108(CardContent, { className: "text-center", children: [
17070
17045
  /* @__PURE__ */ jsx185("p", { className: "text-destructive mb-4", children: inviteError }),
17071
17046
  /* @__PURE__ */ jsx185("p", { className: "mb-4", children: t("waitlist.invite.join_prompt") }),
17072
- /* @__PURE__ */ jsx185(Link, { href: "/waitlist", className: "text-primary underline", children: t("waitlist.invite.join_link") })
17047
+ /* @__PURE__ */ jsx185(Link, { href: "/waitlist", className: "text-primary", children: t("waitlist.invite.join_link") })
17073
17048
  ] })
17074
17049
  ] });
17075
17050
  }
@@ -17082,7 +17057,7 @@ function Register() {
17082
17057
  /* @__PURE__ */ jsxs108(CardContent, { className: "text-center", children: [
17083
17058
  /* @__PURE__ */ jsx185("p", { className: "mb-4", children: t("waitlist.invite.registration_description") }),
17084
17059
  /* @__PURE__ */ jsx185("p", { className: "mb-4", children: t("waitlist.invite.registration_hint") }),
17085
- /* @__PURE__ */ jsx185(Link, { href: "/waitlist", className: "text-primary underline", children: t("waitlist.invite.join_link") })
17060
+ /* @__PURE__ */ jsx185(Link, { href: "/waitlist", className: "text-primary", children: t("waitlist.invite.join_link") })
17086
17061
  ] }),
17087
17062
  /* @__PURE__ */ jsx185(CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ jsx185(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(0 /* Login */), children: t("auth.buttons.login") }) })
17088
17063
  ] });
@@ -20167,7 +20142,7 @@ function MessageItem({
20167
20142
  isFailed && /* @__PURE__ */ jsxs140("div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
20168
20143
  /* @__PURE__ */ jsx231(AlertCircle, { className: "h-3.5 w-3.5" }),
20169
20144
  /* @__PURE__ */ jsx231("span", { children: t("features.assistant.send_failed") }),
20170
- /* @__PURE__ */ jsx231("button", { type: "button", className: "underline", onClick: () => onRetry?.(message.id), children: t("features.assistant.retry") })
20145
+ /* @__PURE__ */ jsx231("button", { type: "button", onClick: () => onRetry?.(message.id), children: t("features.assistant.retry") })
20171
20146
  ] })
20172
20147
  ] });
20173
20148
  }
@@ -20332,14 +20307,7 @@ var NotificationErrorBoundary = class extends Component {
20332
20307
  if (this.state.hasError) {
20333
20308
  return this.props.fallback || /* @__PURE__ */ jsx236("div", { className: "flex items-center justify-center p-4 text-center", children: /* @__PURE__ */ jsxs144("div", { className: "text-muted-foreground text-sm", children: [
20334
20309
  /* @__PURE__ */ jsx236("p", { children: "Something went wrong with notifications." }),
20335
- /* @__PURE__ */ jsx236(
20336
- "button",
20337
- {
20338
- onClick: () => this.setState({ hasError: false }),
20339
- className: "text-primary mt-2 underline hover:no-underline",
20340
- children: "Try again"
20341
- }
20342
- )
20310
+ /* @__PURE__ */ jsx236("button", { onClick: () => this.setState({ hasError: false }), className: "text-primary mt-2", children: "Try again" })
20343
20311
  ] }) });
20344
20312
  }
20345
20313
  return this.props.children;
@@ -21965,11 +21933,11 @@ function OAuthConsentScreen({
21965
21933
  /* @__PURE__ */ jsx260(CardFooter, { className: "justify-center", children: /* @__PURE__ */ jsxs164("p", { className: "text-xs text-center text-muted-foreground", children: [
21966
21934
  "By authorizing, you agree to the app's",
21967
21935
  " ",
21968
- /* @__PURE__ */ jsx260("a", { href: termsUrl, className: "underline hover:text-foreground", target: "_blank", rel: "noopener", children: "Terms of Service" }),
21936
+ /* @__PURE__ */ jsx260("a", { href: termsUrl, className: "hover:text-foreground", target: "_blank", rel: "noopener", children: "Terms of Service" }),
21969
21937
  " ",
21970
21938
  "and",
21971
21939
  " ",
21972
- /* @__PURE__ */ jsx260("a", { href: privacyUrl, className: "underline hover:text-foreground", target: "_blank", rel: "noopener", children: "Privacy Policy" }),
21940
+ /* @__PURE__ */ jsx260("a", { href: privacyUrl, className: "hover:text-foreground", target: "_blank", rel: "noopener", children: "Privacy Policy" }),
21973
21941
  "."
21974
21942
  ] }) })
21975
21943
  ] }) });
@@ -22199,9 +22167,9 @@ function WaitlistForm({ onSuccess }) {
22199
22167
  id: "gdprConsent",
22200
22168
  label: /* @__PURE__ */ jsxs166(Fragment54, { children: [
22201
22169
  t("auth.gdpr.terms_prefix"),
22202
- /* @__PURE__ */ jsx262(Link, { href: "/terms", target: "_blank", rel: "noopener", className: "underline", children: t("auth.gdpr.terms_of_service") }),
22170
+ /* @__PURE__ */ jsx262(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("auth.gdpr.terms_of_service") }),
22203
22171
  t("auth.gdpr.and"),
22204
- /* @__PURE__ */ jsx262(Link, { href: "/privacy", target: "_blank", rel: "noopener", className: "underline", children: t("auth.gdpr.privacy_policy") })
22172
+ /* @__PURE__ */ jsx262(Link, { href: "/privacy", target: "_blank", rel: "noopener", children: t("auth.gdpr.privacy_policy") })
22205
22173
  ] }),
22206
22174
  required: true
22207
22175
  }
@@ -22307,7 +22275,7 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
22307
22275
  import { flexRender as flexRender2, getCoreRowModel as getCoreRowModel2, useReactTable as useReactTable2 } from "@tanstack/react-table";
22308
22276
  import { RefreshCw as RefreshCw4, Users as Users2 } from "lucide-react";
22309
22277
  import { useTranslations as useTranslations110 } from "next-intl";
22310
- import { useCallback as useCallback48, useEffect as useEffect71, useState as useState98 } from "react";
22278
+ import { useCallback as useCallback48, useEffect as useEffect71, useMemo as useMemo37, useState as useState98 } from "react";
22311
22279
 
22312
22280
  // src/features/waitlist/hooks/useWaitlistTableStructure.tsx
22313
22281
  import { Send } from "lucide-react";
@@ -22436,6 +22404,16 @@ function WaitlistList() {
22436
22404
  }
22437
22405
  }, "handleInvite");
22438
22406
  const columns = useWaitlistTableStructure({ onInvite: handleInvite });
22407
+ const statusItems = useMemo37(
22408
+ () => ({
22409
+ all: t("waitlist.admin.all_statuses"),
22410
+ pending: t("waitlist.admin.status.pending"),
22411
+ confirmed: t("waitlist.admin.status.confirmed"),
22412
+ invited: t("waitlist.admin.status.invited"),
22413
+ registered: t("waitlist.admin.status.registered")
22414
+ }),
22415
+ [t]
22416
+ );
22439
22417
  const table = useReactTable2({
22440
22418
  data: entries,
22441
22419
  columns,
@@ -22453,7 +22431,7 @@ function WaitlistList() {
22453
22431
  ] })
22454
22432
  ] }),
22455
22433
  /* @__PURE__ */ jsxs171("div", { className: "flex items-center gap-4", children: [
22456
- /* @__PURE__ */ jsxs171(Select, { value: statusFilter, onValueChange: (value) => setStatusFilter(value ?? "all"), children: [
22434
+ /* @__PURE__ */ jsxs171(Select, { items: statusItems, value: statusFilter, onValueChange: (value) => setStatusFilter(value ?? "all"), children: [
22457
22435
  /* @__PURE__ */ jsx267(SelectTrigger, { className: "w-40", children: /* @__PURE__ */ jsx267(SelectValue, { placeholder: t("waitlist.admin.filter_placeholder") }) }),
22458
22436
  /* @__PURE__ */ jsxs171(SelectContent, { children: [
22459
22437
  /* @__PURE__ */ jsx267(SelectItem, { value: "all", children: t("waitlist.admin.all_statuses") }),
@@ -22477,7 +22455,7 @@ __name(WaitlistList, "WaitlistList");
22477
22455
  // src/features/rbac/components/RbacContainer.tsx
22478
22456
  import { Loader2Icon as Loader2Icon4 } from "lucide-react";
22479
22457
  import { useTranslations as useTranslations112 } from "next-intl";
22480
- import { memo as memo2, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo37, useRef as useRef40, useState as useState100 } from "react";
22458
+ import { memo as memo2, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo38, useRef as useRef40, useState as useState100 } from "react";
22481
22459
 
22482
22460
  // src/features/rbac/components/RbacPermissionCell.tsx
22483
22461
  import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon12 } from "lucide-react";
@@ -22832,11 +22810,11 @@ function RbacContainer() {
22832
22810
  setSelectedModuleId(id);
22833
22811
  setActivePicker(null);
22834
22812
  }, []);
22835
- const sortedModuleIds = useMemo37(() => {
22813
+ const sortedModuleIds = useMemo38(() => {
22836
22814
  if (!matrix) return [];
22837
22815
  return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
22838
22816
  }, [matrix, moduleNames]);
22839
- const roleIds = useMemo37(() => {
22817
+ const roleIds = useMemo38(() => {
22840
22818
  if (roleNames) {
22841
22819
  return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
22842
22820
  }
@@ -22854,14 +22832,14 @@ function RbacContainer() {
22854
22832
  setSelectedModuleId(sortedModuleIds[0]);
22855
22833
  }
22856
22834
  }, [selectedModuleId, sortedModuleIds]);
22857
- const activeValue = useMemo37(() => {
22835
+ const activeValue = useMemo38(() => {
22858
22836
  if (!activePicker || !matrix) return void 0;
22859
22837
  const block = matrix[activePicker.moduleId];
22860
22838
  if (!block) return void 0;
22861
22839
  const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
22862
22840
  return cellValue(tokens, activePicker.action);
22863
22841
  }, [activePicker, matrix]);
22864
- const activeSegments = useMemo37(() => {
22842
+ const activeSegments = useMemo38(() => {
22865
22843
  if (!activePicker) return [];
22866
22844
  return modulePaths[activePicker.moduleId] ?? [];
22867
22845
  }, [activePicker, modulePaths]);
@@ -22932,7 +22910,7 @@ __name(RbacContainer, "RbacContainer");
22932
22910
  // src/features/rbac/components/RbacByRoleContainer.tsx
22933
22911
  import { Loader2Icon as Loader2Icon5 } from "lucide-react";
22934
22912
  import { useTranslations as useTranslations113 } from "next-intl";
22935
- import { Fragment as Fragment56, memo as memo3, useCallback as useCallback51, useEffect as useEffect74, useMemo as useMemo38, useRef as useRef41, useState as useState101 } from "react";
22913
+ import { Fragment as Fragment56, memo as memo3, useCallback as useCallback51, useEffect as useEffect74, useMemo as useMemo39, useRef as useRef41, useState as useState101 } from "react";
22936
22914
  import { jsx as jsx271, jsxs as jsxs175 } from "react/jsx-runtime";
22937
22915
  function findToken2(tokens, action) {
22938
22916
  if (!tokens) return void 0;
@@ -22982,11 +22960,11 @@ function RbacByRoleContainer() {
22982
22960
  setSelectedRoleId(id);
22983
22961
  setActivePicker(null);
22984
22962
  }, []);
22985
- const sortedRoleIds = useMemo38(() => {
22963
+ const sortedRoleIds = useMemo39(() => {
22986
22964
  if (!roleNames) return [];
22987
22965
  return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
22988
22966
  }, [roleNames]);
22989
- const sortedModuleIds = useMemo38(() => {
22967
+ const sortedModuleIds = useMemo39(() => {
22990
22968
  if (!matrix) return [];
22991
22969
  return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
22992
22970
  }, [matrix, moduleNames]);
@@ -22995,14 +22973,14 @@ function RbacByRoleContainer() {
22995
22973
  setSelectedRoleId(sortedRoleIds[0]);
22996
22974
  }
22997
22975
  }, [selectedRoleId, sortedRoleIds]);
22998
- const activeValue = useMemo38(() => {
22976
+ const activeValue = useMemo39(() => {
22999
22977
  if (!activePicker || !matrix) return void 0;
23000
22978
  const block = matrix[activePicker.moduleId];
23001
22979
  if (!block) return void 0;
23002
22980
  const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
23003
22981
  return cellValue2(tokens, activePicker.action);
23004
22982
  }, [activePicker, matrix]);
23005
- const activeSegments = useMemo38(() => {
22983
+ const activeSegments = useMemo39(() => {
23006
22984
  if (!activePicker) return [];
23007
22985
  return modulePaths[activePicker.moduleId] ?? [];
23008
22986
  }, [activePicker, modulePaths]);
@@ -23406,6 +23384,7 @@ export {
23406
23384
  TableCellAvatar,
23407
23385
  HeaderChildrenProvider,
23408
23386
  useHeaderChildren,
23387
+ useHeaderRootLabel,
23409
23388
  HeaderLeftContentProvider,
23410
23389
  useHeaderLeftContent,
23411
23390
  BreadcrumbNavigation,
@@ -23646,4 +23625,4 @@ export {
23646
23625
  useOAuthClients,
23647
23626
  useOAuthClient
23648
23627
  };
23649
- //# sourceMappingURL=chunk-BBBQGJEG.mjs.map
23628
+ //# sourceMappingURL=chunk-WEDLGKSS.mjs.map