@fluid-app/portal-sdk 0.1.394 → 0.1.395

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.
@@ -5,7 +5,7 @@ import { i as useCountriesApi } from "./ContactsTranslationBridge-BfletLC8.mjs";
5
5
  import { a as usePortalTenantClient, n as payKeys, r as storeKeys } from "./query-keys-oPgLh6FY.mjs";
6
6
  import { a as useActiveLocale, r as useDomainDict } from "./static-dict-adapter-CMDcV28R.mjs";
7
7
  import { t as createTranslationContext } from "./translation-api-context-factory-dNziJNS1.mjs";
8
- import { $ as Dialog, An as AlertDialogTitle, Bt as isProtectedDayOfYearToken, Cn as AlertDialog, D as SelectTrigger, Dn as AlertDialogDescription, E as SelectItem, En as AlertDialogContent, Gt as getWeekYear, Ht as warnOrThrowProtectedError, Kn as cn$1, Kt as getISOWeek, M as Input, O as SelectValue, On as AlertDialogFooter, Pt as Calendar$1, Qt as addWeeks, Rt as isAfter, S as SheetTitle, T as SelectContent, Tn as AlertDialogCancel, Ut as longFormatters, V as Label, Vt as isProtectedWeekYearToken, Wn as PortalContainerProvider, Wt as getWeek, Zt as addYears, _ as Sheet, _n as BreadcrumbPage, an as getDefaultOptions$1, cn as toDate, ct as Popover, dn as millisecondsInMinute, dt as PopoverTrigger, fn as millisecondsInSecond, g as Skeleton, gn as BreadcrumbList, hn as BreadcrumbLink, in as startOfWeek, it as DialogHeader, jn as Button, kn as AlertDialogHeader, ln as constructFrom, mn as BreadcrumbItem, nn as getTimezoneOffsetInMilliseconds, on as addMonths, p as fluidToast, pn as Breadcrumb, qt as enUS, rn as startOfISOWeek, rt as DialogFooter, sn as addDays, st as DialogTitle, tt as DialogContent, un as millisecondsInHour, ut as PopoverContent, v as SheetContent, vn as BreadcrumbSeparator, w as Select, zt as format } from "./src-DX_SrMKJ.mjs";
8
+ import { $ as Dialog, An as AlertDialogTitle, Bt as isProtectedDayOfYearToken, Cn as AlertDialog, D as SelectTrigger, Dn as AlertDialogDescription, E as SelectItem, En as AlertDialogContent, Gt as getWeekYear, Ht as warnOrThrowProtectedError, Kn as cn$1, Kt as getISOWeek, M as Input, O as SelectValue, On as AlertDialogFooter, Pt as Calendar$1, Qt as addWeeks, Rt as isAfter, S as SheetTitle, T as SelectContent, Tn as AlertDialogCancel, Ut as longFormatters, V as Label, Vt as isProtectedWeekYearToken, Wn as PortalContainerProvider, Wt as getWeek, Zt as addYears, _ as Sheet, _n as BreadcrumbPage, an as getDefaultOptions$1, cn as toDate, ct as Popover, dn as millisecondsInMinute, dt as PopoverTrigger, fn as millisecondsInSecond, g as Skeleton, gn as BreadcrumbList, hn as BreadcrumbLink, in as startOfWeek, it as DialogHeader, jn as Button, kn as AlertDialogHeader, ln as constructFrom, mn as BreadcrumbItem, nn as getTimezoneOffsetInMilliseconds, on as addMonths, p as fluidToast, pn as Breadcrumb, qt as enUS, rn as startOfISOWeek, rt as DialogFooter, sn as addDays, st as DialogTitle, tt as DialogContent, un as millisecondsInHour, ut as PopoverContent, v as SheetContent, vn as BreadcrumbSeparator, w as Select, yn as Badge, zt as format } from "./src-DX_SrMKJ.mjs";
9
9
  import { n as ScreenHeaderBreadcrumbs } from "./ScreenHeaderContext-BwNHuXK9.mjs";
10
10
  import { t as useStore } from "./use-store-CMkp2oqW.mjs";
11
11
  import { n as useAppNavigation } from "./AppNavigationContext-DKrqfc9z.mjs";
@@ -5950,15 +5950,27 @@ function QuantityInput({ inputId, quantity, maxQuantity, isUpdatingQuantity, onQ
5950
5950
  ]
5951
5951
  });
5952
5952
  }
5953
- /** One itemized discount row in the pricing summary (label + negative amount). */
5954
- function DiscountLine({ label, amount }) {
5953
+ /**
5954
+ * One itemized discount row in the pricing summary: label, optional code
5955
+ * pill(s), and a negative amount. Codes render as pills on the line rather than
5956
+ * baked into the label text. `code` accepts a single code or a list so stacked
5957
+ * codes are supported if the pricing model ever exposes more than one.
5958
+ */
5959
+ function DiscountLine({ label, amount, code }) {
5960
+ const codes = (Array.isArray(code) ? code : code ? [code] : []).filter(Boolean);
5955
5961
  return /* @__PURE__ */ jsxs("div", {
5956
- className: "mt-2 flex justify-between text-sm",
5957
- children: [/* @__PURE__ */ jsx("p", {
5958
- className: "text-muted-foreground text-sm font-medium",
5959
- children: label
5962
+ className: "mt-2 flex items-start justify-between gap-2 text-sm",
5963
+ children: [/* @__PURE__ */ jsxs("div", {
5964
+ className: "flex flex-wrap items-center gap-x-2 gap-y-1",
5965
+ children: [/* @__PURE__ */ jsx("p", {
5966
+ className: "text-muted-foreground text-sm font-medium",
5967
+ children: label
5968
+ }), codes.map((c, i) => /* @__PURE__ */ jsx(Badge, {
5969
+ variant: "secondary",
5970
+ children: c
5971
+ }, `${c}-${i}`))]
5960
5972
  }), /* @__PURE__ */ jsxs("p", {
5961
- className: "text-muted-foreground text-sm font-medium",
5973
+ className: "text-muted-foreground text-sm font-medium whitespace-nowrap",
5962
5974
  children: ["-", amount]
5963
5975
  })]
5964
5976
  });
@@ -6115,7 +6127,8 @@ function SubscriptionItemsSection({ subscription, displayQuantity, displayNextBi
6115
6127
  amount: formatCurrency(pricing.legacyDiscountUnit * quantity)
6116
6128
  }),
6117
6129
  pricing.attachedDiscountUnit > 0 && /* @__PURE__ */ jsx(DiscountLine, {
6118
- label: pricing.attachedDiscountCode ? `${t("discount")} (${pricing.attachedDiscountCode})` : t("discount"),
6130
+ label: t("discount"),
6131
+ code: pricing.attachedDiscountCode,
6119
6132
  amount: formatCurrency(pricing.attachedDiscountUnit * quantity)
6120
6133
  })
6121
6134
  ] }),
@@ -7667,4 +7680,4 @@ const subscriptionsScreenPropertySchema = {
7667
7680
  //#endregion
7668
7681
  export { subscriptionsScreenPropertySchema as n, SubscriptionsScreen as t };
7669
7682
 
7670
- //# sourceMappingURL=SubscriptionsScreen-D73rtFkC.mjs.map
7683
+ //# sourceMappingURL=SubscriptionsScreen-BN2n4Elu.mjs.map