@fluid-app/portal-sdk 0.1.345 → 0.1.346
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SubscriptionsScreen-CBarjPh2.mjs → SubscriptionsScreen-1lmFXxOj.mjs} +1 -1
- package/dist/{SubscriptionsScreen-Bhvhbdh3.mjs → SubscriptionsScreen-BDBYmSR2.mjs} +13 -18
- package/dist/SubscriptionsScreen-BDBYmSR2.mjs.map +1 -0
- package/dist/{SubscriptionsScreen-DPh8mKe0.cjs → SubscriptionsScreen-BFihupo4.cjs} +13 -18
- package/dist/SubscriptionsScreen-BFihupo4.cjs.map +1 -0
- package/dist/{SubscriptionsScreen-DkYV9l07.cjs → SubscriptionsScreen-D8GiMk_3.cjs} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +13 -13
- package/dist/SubscriptionsScreen-Bhvhbdh3.mjs.map +0 -1
- package/dist/SubscriptionsScreen-DPh8mKe0.cjs.map +0 -1
|
@@ -26,7 +26,7 @@ import "./MediaRenderer-Db1KsIza.mjs";
|
|
|
26
26
|
import "./CarouselWidget-SrCl4cSn.mjs";
|
|
27
27
|
import "./CatchUpWidget-B_in7Bjq.mjs";
|
|
28
28
|
import "./src-CJw6JbdS.mjs";
|
|
29
|
-
import { n as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-
|
|
29
|
+
import { n as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-BDBYmSR2.mjs";
|
|
30
30
|
import "./ChartWidget-CIr3v8x6.mjs";
|
|
31
31
|
import "./ContainerWidget-BHWPtBmF.mjs";
|
|
32
32
|
import "./ImageWidget-B3ZTuy4v.mjs";
|
|
@@ -2479,7 +2479,7 @@ function mapDetailSubscription(bff) {
|
|
|
2479
2479
|
max_skips: bff.plan?.max_skips ?? null,
|
|
2480
2480
|
price_adjustment_type: null,
|
|
2481
2481
|
price_adjustment_amount: null,
|
|
2482
|
-
max_quantity: null,
|
|
2482
|
+
max_quantity: bff.product?.max_quantity ?? null,
|
|
2483
2483
|
active: true,
|
|
2484
2484
|
company_default: null,
|
|
2485
2485
|
created_at: "",
|
|
@@ -3228,25 +3228,20 @@ function formatLongDate(iso) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
3230
3230
|
/**
|
|
3231
|
-
* Render the subscription bill amount
|
|
3232
|
-
*
|
|
3233
|
-
*
|
|
3231
|
+
* Render the per-cycle subscription bill amount (`price × quantity`).
|
|
3232
|
+
*
|
|
3233
|
+
* `sub.price` (mapped from the BFF's `total`) is the per-unit price, not the
|
|
3234
|
+
* line total — the variant column it ultimately reads from is a plain
|
|
3235
|
+
* decimal column, and the detail page also computes `price * quantity` for
|
|
3236
|
+
* its bill rows. At qty=1 the multiplication is a no-op so the bug stayed
|
|
3237
|
+
* hidden until qty>1 surfaced the mismatch with the detail view.
|
|
3234
3238
|
*/
|
|
3235
3239
|
function formatPrice(sub) {
|
|
3236
|
-
|
|
3237
|
-
if (fromBff && fromBff.trim().length > 0) return fromBff;
|
|
3238
|
-
return sub.price.toFixed(2);
|
|
3240
|
+
return (sub.price * (sub.quantity ?? 1)).toFixed(2);
|
|
3239
3241
|
}
|
|
3240
|
-
/**
|
|
3241
|
-
* Mirror of `formatPrice` for the detail subscription shape used inside a
|
|
3242
|
-
* `Bundle.subscriptions[]`. The detail variant carries `price_in_currency`
|
|
3243
|
-
* directly (no nested `product` like the list variant), so this peels off
|
|
3244
|
-
* one less layer.
|
|
3245
|
-
*/
|
|
3242
|
+
/** Detail-shape counterpart for bundle member rows. */
|
|
3246
3243
|
function formatDetailPrice(sub) {
|
|
3247
|
-
|
|
3248
|
-
if (fromBff && fromBff.trim().length > 0) return fromBff;
|
|
3249
|
-
return sub.price.toFixed(2);
|
|
3244
|
+
return (sub.price * (sub.quantity ?? 1)).toFixed(2);
|
|
3250
3245
|
}
|
|
3251
3246
|
/**
|
|
3252
3247
|
* Compute progress through a billing cycle. Returns `null` when either
|
|
@@ -3426,7 +3421,7 @@ function FilterPills({ active, counts, onChange, onBundleClick, t }) {
|
|
|
3426
3421
|
const BUNDLE_INLINE_LIMIT = 2;
|
|
3427
3422
|
function BundleCard({ bundle, onSubscriptionClick, t }) {
|
|
3428
3423
|
const [popoverOpen, setPopoverOpen] = useState(false);
|
|
3429
|
-
const total = bundle.subscriptions.reduce((sum, s) => sum + s.price, 0);
|
|
3424
|
+
const total = bundle.subscriptions.reduce((sum, s) => sum + s.price * (s.quantity ?? 1), 0);
|
|
3430
3425
|
const nextBillLong = bundle.next_bill_date ? formatLongDate(bundle.next_bill_date) : null;
|
|
3431
3426
|
const inlineMembers = bundle.subscriptions.slice(0, BUNDLE_INLINE_LIMIT);
|
|
3432
3427
|
const overflowCount = bundle.subscriptions.length - inlineMembers.length;
|
|
@@ -7380,4 +7375,4 @@ const subscriptionsScreenPropertySchema = {
|
|
|
7380
7375
|
//#endregion
|
|
7381
7376
|
export { subscriptionsScreenPropertySchema as n, SubscriptionsScreen as t };
|
|
7382
7377
|
|
|
7383
|
-
//# sourceMappingURL=SubscriptionsScreen-
|
|
7378
|
+
//# sourceMappingURL=SubscriptionsScreen-BDBYmSR2.mjs.map
|