@schematichq/schematic-components 2.22.0-rc.2 → 2.22.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.
@@ -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.0-rc.2",
14387
+ "X-Schematic-Components-Version": "2.22.0",
14388
14388
  "X-Schematic-Session-ID": sessionId
14389
14389
  });
14390
14390
  var normalizeCurrencyFilter = (filter2) => {
@@ -21368,7 +21368,6 @@ var SubscriptionSidebar = (0, import_react45.forwardRef)(
21368
21368
  ]);
21369
21369
  const {
21370
21370
  amountOff,
21371
- discountAmount,
21372
21371
  dueNow,
21373
21372
  newCharges,
21374
21373
  percentOff,
@@ -21380,8 +21379,6 @@ var SubscriptionSidebar = (0, import_react45.forwardRef)(
21380
21379
  } = (0, import_react45.useMemo)(() => {
21381
21380
  return {
21382
21381
  amountOff: charges?.amountOff ?? 0,
21383
- // Read loosely until the prod OpenAPI spec includes discount_amount.
21384
- discountAmount: charges?.discountAmount ?? 0,
21385
21382
  dueNow: charges?.dueNow ?? 0,
21386
21383
  newCharges: charges?.newCharges ?? 0,
21387
21384
  percentOff: charges?.percentOff ?? 0,
@@ -22175,9 +22172,7 @@ var SubscriptionSidebar = (0, import_react45.forwardRef)(
22175
22172
  children: [
22176
22173
  /* @__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 }) }) }),
22177
22174
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: formatCurrency(
22178
- // Prefer the discount Stripe applied; derive from
22179
- // `percentOff` only for API responses that predate it.
22180
- discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
22175
+ newCharges / 100 * percentOff,
22181
22176
  selectedPlanCurrency
22182
22177
  ) }) })
22183
22178
  ]
@@ -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.0-rc.2",
14297
+ "X-Schematic-Components-Version": "2.22.0",
14298
14298
  "X-Schematic-Session-ID": sessionId
14299
14299
  });
14300
14300
  var normalizeCurrencyFilter = (filter2) => {
@@ -21309,7 +21309,6 @@ var SubscriptionSidebar = forwardRef7(
21309
21309
  ]);
21310
21310
  const {
21311
21311
  amountOff,
21312
- discountAmount,
21313
21312
  dueNow,
21314
21313
  newCharges,
21315
21314
  percentOff,
@@ -21321,8 +21320,6 @@ var SubscriptionSidebar = forwardRef7(
21321
21320
  } = useMemo19(() => {
21322
21321
  return {
21323
21322
  amountOff: charges?.amountOff ?? 0,
21324
- // Read loosely until the prod OpenAPI spec includes discount_amount.
21325
- discountAmount: charges?.discountAmount ?? 0,
21326
21323
  dueNow: charges?.dueNow ?? 0,
21327
21324
  newCharges: charges?.newCharges ?? 0,
21328
21325
  percentOff: charges?.percentOff ?? 0,
@@ -22116,9 +22113,7 @@ var SubscriptionSidebar = forwardRef7(
22116
22113
  children: [
22117
22114
  /* @__PURE__ */ jsx41(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ jsx41(Text, { children: t3("X% off", { percent: percentOff }) }) }),
22118
22115
  /* @__PURE__ */ jsx41(Box, { children: /* @__PURE__ */ jsx41(Text, { children: formatCurrency(
22119
- // Prefer the discount Stripe applied; derive from
22120
- // `percentOff` only for API responses that predate it.
22121
- discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
22116
+ newCharges / 100 * percentOff,
22122
22117
  selectedPlanCurrency
22123
22118
  ) }) })
22124
22119
  ]
@@ -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.0-rc.2",
14744
+ "X-Schematic-Components-Version": "2.22.0",
14745
14745
  "X-Schematic-Session-ID": sessionId
14746
14746
  });
14747
14747
  var normalizeCurrencyFilter = (filter) => {
@@ -21744,7 +21744,6 @@ var SubscriptionSidebar = (0, import_react44.forwardRef)(
21744
21744
  ]);
21745
21745
  const {
21746
21746
  amountOff,
21747
- discountAmount,
21748
21747
  dueNow,
21749
21748
  newCharges,
21750
21749
  percentOff,
@@ -21756,8 +21755,6 @@ var SubscriptionSidebar = (0, import_react44.forwardRef)(
21756
21755
  } = (0, import_react44.useMemo)(() => {
21757
21756
  return {
21758
21757
  amountOff: charges?.amountOff ?? 0,
21759
- // Read loosely until the prod OpenAPI spec includes discount_amount.
21760
- discountAmount: charges?.discountAmount ?? 0,
21761
21758
  dueNow: charges?.dueNow ?? 0,
21762
21759
  newCharges: charges?.newCharges ?? 0,
21763
21760
  percentOff: charges?.percentOff ?? 0,
@@ -22551,9 +22548,7 @@ var SubscriptionSidebar = (0, import_react44.forwardRef)(
22551
22548
  children: [
22552
22549
  /* @__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 }) }) }),
22553
22550
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { children: formatCurrency(
22554
- // Prefer the discount Stripe applied; derive from
22555
- // `percentOff` only for API responses that predate it.
22556
- discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
22551
+ newCharges / 100 * percentOff,
22557
22552
  selectedPlanCurrency
22558
22553
  ) }) })
22559
22554
  ]
@@ -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.0-rc.2",
14422
+ "X-Schematic-Components-Version": "2.22.0",
14423
14423
  "X-Schematic-Session-ID": sessionId
14424
14424
  });
14425
14425
  var normalizeCurrencyFilter = (filter2) => {
@@ -21434,7 +21434,6 @@ var SubscriptionSidebar = forwardRef7(
21434
21434
  ]);
21435
21435
  const {
21436
21436
  amountOff,
21437
- discountAmount,
21438
21437
  dueNow,
21439
21438
  newCharges,
21440
21439
  percentOff,
@@ -21446,8 +21445,6 @@ var SubscriptionSidebar = forwardRef7(
21446
21445
  } = useMemo19(() => {
21447
21446
  return {
21448
21447
  amountOff: charges?.amountOff ?? 0,
21449
- // Read loosely until the prod OpenAPI spec includes discount_amount.
21450
- discountAmount: charges?.discountAmount ?? 0,
21451
21448
  dueNow: charges?.dueNow ?? 0,
21452
21449
  newCharges: charges?.newCharges ?? 0,
21453
21450
  percentOff: charges?.percentOff ?? 0,
@@ -22241,9 +22238,7 @@ var SubscriptionSidebar = forwardRef7(
22241
22238
  children: [
22242
22239
  /* @__PURE__ */ jsx41(Box, { $opacity: "0.625", $lineHeight: 1.15, children: /* @__PURE__ */ jsx41(Text, { children: t3("X% off", { percent: percentOff }) }) }),
22243
22240
  /* @__PURE__ */ jsx41(Box, { children: /* @__PURE__ */ jsx41(Text, { children: formatCurrency(
22244
- // Prefer the discount Stripe applied; derive from
22245
- // `percentOff` only for API responses that predate it.
22246
- discountAmount > 0 ? discountAmount : newCharges / 100 * percentOff,
22241
+ newCharges / 100 * percentOff,
22247
22242
  selectedPlanCurrency
22248
22243
  ) }) })
22249
22244
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematichq/schematic-components",
3
- "version": "2.22.0-rc.2",
3
+ "version": "2.22.0",
4
4
  "main": "dist/schematic-components.cjs.js",
5
5
  "module": "dist/schematic-components.esm.js",
6
6
  "types": "dist/schematic-components.d.ts",