@schematichq/schematic-components 2.22.0 → 2.22.1
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.
|
@@ -14384,7 +14384,7 @@ var reducer = (state, action) => {
|
|
|
14384
14384
|
// src/context/EmbedProvider.tsx
|
|
14385
14385
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
14386
14386
|
var getCustomHeaders = (sessionId) => ({
|
|
14387
|
-
"X-Schematic-Components-Version": "2.22.
|
|
14387
|
+
"X-Schematic-Components-Version": "2.22.1",
|
|
14388
14388
|
"X-Schematic-Session-ID": sessionId
|
|
14389
14389
|
});
|
|
14390
14390
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -21368,6 +21368,7 @@ var SubscriptionSidebar = (0, import_react45.forwardRef)(
|
|
|
21368
21368
|
]);
|
|
21369
21369
|
const {
|
|
21370
21370
|
amountOff,
|
|
21371
|
+
discountAmount,
|
|
21371
21372
|
dueNow,
|
|
21372
21373
|
newCharges,
|
|
21373
21374
|
percentOff,
|
|
@@ -21379,6 +21380,7 @@ var SubscriptionSidebar = (0, import_react45.forwardRef)(
|
|
|
21379
21380
|
} = (0, import_react45.useMemo)(() => {
|
|
21380
21381
|
return {
|
|
21381
21382
|
amountOff: charges?.amountOff ?? 0,
|
|
21383
|
+
discountAmount: charges?.discountAmount ?? 0,
|
|
21382
21384
|
dueNow: charges?.dueNow ?? 0,
|
|
21383
21385
|
newCharges: charges?.newCharges ?? 0,
|
|
21384
21386
|
percentOff: charges?.percentOff ?? 0,
|
|
@@ -22172,7 +22174,9 @@ var SubscriptionSidebar = (0, import_react45.forwardRef)(
|
|
|
22172
22174
|
children: [
|
|
22173
22175
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: t3("X% off", { percent: percentOff }) }) }),
|
|
22174
22176
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: formatCurrency(
|
|
22175
|
-
|
|
22177
|
+
// Prefer the discount Stripe applied; derive from
|
|
22178
|
+
// `percentOff` only for API responses that predate it.
|
|
22179
|
+
discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
|
|
22176
22180
|
selectedPlanCurrency
|
|
22177
22181
|
) }) })
|
|
22178
22182
|
]
|
|
@@ -14294,7 +14294,7 @@ var reducer = (state, action) => {
|
|
|
14294
14294
|
// src/context/EmbedProvider.tsx
|
|
14295
14295
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
14296
14296
|
var getCustomHeaders = (sessionId) => ({
|
|
14297
|
-
"X-Schematic-Components-Version": "2.22.
|
|
14297
|
+
"X-Schematic-Components-Version": "2.22.1",
|
|
14298
14298
|
"X-Schematic-Session-ID": sessionId
|
|
14299
14299
|
});
|
|
14300
14300
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -21309,6 +21309,7 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
21309
21309
|
]);
|
|
21310
21310
|
const {
|
|
21311
21311
|
amountOff,
|
|
21312
|
+
discountAmount,
|
|
21312
21313
|
dueNow,
|
|
21313
21314
|
newCharges,
|
|
21314
21315
|
percentOff,
|
|
@@ -21320,6 +21321,7 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
21320
21321
|
} = useMemo19(() => {
|
|
21321
21322
|
return {
|
|
21322
21323
|
amountOff: charges?.amountOff ?? 0,
|
|
21324
|
+
discountAmount: charges?.discountAmount ?? 0,
|
|
21323
21325
|
dueNow: charges?.dueNow ?? 0,
|
|
21324
21326
|
newCharges: charges?.newCharges ?? 0,
|
|
21325
21327
|
percentOff: charges?.percentOff ?? 0,
|
|
@@ -22113,7 +22115,9 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
22113
22115
|
children: [
|
|
22114
22116
|
/* @__PURE__ */ jsx41(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ jsx41(Text, { children: t3("X% off", { percent: percentOff }) }) }),
|
|
22115
22117
|
/* @__PURE__ */ jsx41(Box, { children: /* @__PURE__ */ jsx41(Text, { children: formatCurrency(
|
|
22116
|
-
|
|
22118
|
+
// Prefer the discount Stripe applied; derive from
|
|
22119
|
+
// `percentOff` only for API responses that predate it.
|
|
22120
|
+
discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
|
|
22117
22121
|
selectedPlanCurrency
|
|
22118
22122
|
) }) })
|
|
22119
22123
|
]
|
|
@@ -14741,7 +14741,7 @@ var reducer = (state, action) => {
|
|
|
14741
14741
|
// src/context/EmbedProvider.tsx
|
|
14742
14742
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
14743
14743
|
var getCustomHeaders = (sessionId) => ({
|
|
14744
|
-
"X-Schematic-Components-Version": "2.22.
|
|
14744
|
+
"X-Schematic-Components-Version": "2.22.1",
|
|
14745
14745
|
"X-Schematic-Session-ID": sessionId
|
|
14746
14746
|
});
|
|
14747
14747
|
var normalizeCurrencyFilter = (filter) => {
|
|
@@ -21744,6 +21744,7 @@ var SubscriptionSidebar = (0, import_react44.forwardRef)(
|
|
|
21744
21744
|
]);
|
|
21745
21745
|
const {
|
|
21746
21746
|
amountOff,
|
|
21747
|
+
discountAmount,
|
|
21747
21748
|
dueNow,
|
|
21748
21749
|
newCharges,
|
|
21749
21750
|
percentOff,
|
|
@@ -21755,6 +21756,7 @@ var SubscriptionSidebar = (0, import_react44.forwardRef)(
|
|
|
21755
21756
|
} = (0, import_react44.useMemo)(() => {
|
|
21756
21757
|
return {
|
|
21757
21758
|
amountOff: charges?.amountOff ?? 0,
|
|
21759
|
+
discountAmount: charges?.discountAmount ?? 0,
|
|
21758
21760
|
dueNow: charges?.dueNow ?? 0,
|
|
21759
21761
|
newCharges: charges?.newCharges ?? 0,
|
|
21760
21762
|
percentOff: charges?.percentOff ?? 0,
|
|
@@ -22548,7 +22550,9 @@ var SubscriptionSidebar = (0, import_react44.forwardRef)(
|
|
|
22548
22550
|
children: [
|
|
22549
22551
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: t2("X% off", { percent: percentOff }) }) }),
|
|
22550
22552
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: formatCurrency(
|
|
22551
|
-
|
|
22553
|
+
// Prefer the discount Stripe applied; derive from
|
|
22554
|
+
// `percentOff` only for API responses that predate it.
|
|
22555
|
+
discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
|
|
22552
22556
|
selectedPlanCurrency
|
|
22553
22557
|
) }) })
|
|
22554
22558
|
]
|
|
@@ -14419,7 +14419,7 @@ var reducer = (state, action) => {
|
|
|
14419
14419
|
// src/context/EmbedProvider.tsx
|
|
14420
14420
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
14421
14421
|
var getCustomHeaders = (sessionId) => ({
|
|
14422
|
-
"X-Schematic-Components-Version": "2.22.
|
|
14422
|
+
"X-Schematic-Components-Version": "2.22.1",
|
|
14423
14423
|
"X-Schematic-Session-ID": sessionId
|
|
14424
14424
|
});
|
|
14425
14425
|
var normalizeCurrencyFilter = (filter2) => {
|
|
@@ -21434,6 +21434,7 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
21434
21434
|
]);
|
|
21435
21435
|
const {
|
|
21436
21436
|
amountOff,
|
|
21437
|
+
discountAmount,
|
|
21437
21438
|
dueNow,
|
|
21438
21439
|
newCharges,
|
|
21439
21440
|
percentOff,
|
|
@@ -21445,6 +21446,7 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
21445
21446
|
} = useMemo19(() => {
|
|
21446
21447
|
return {
|
|
21447
21448
|
amountOff: charges?.amountOff ?? 0,
|
|
21449
|
+
discountAmount: charges?.discountAmount ?? 0,
|
|
21448
21450
|
dueNow: charges?.dueNow ?? 0,
|
|
21449
21451
|
newCharges: charges?.newCharges ?? 0,
|
|
21450
21452
|
percentOff: charges?.percentOff ?? 0,
|
|
@@ -22238,7 +22240,9 @@ var SubscriptionSidebar = forwardRef7(
|
|
|
22238
22240
|
children: [
|
|
22239
22241
|
/* @__PURE__ */ jsx41(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ jsx41(Text, { children: t3("X% off", { percent: percentOff }) }) }),
|
|
22240
22242
|
/* @__PURE__ */ jsx41(Box, { children: /* @__PURE__ */ jsx41(Text, { children: formatCurrency(
|
|
22241
|
-
|
|
22243
|
+
// Prefer the discount Stripe applied; derive from
|
|
22244
|
+
// `percentOff` only for API responses that predate it.
|
|
22245
|
+
discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
|
|
22242
22246
|
selectedPlanCurrency
|
|
22243
22247
|
) }) })
|
|
22244
22248
|
]
|